Skip to content

Conversation

@Kpfp2711
Copy link

Adds full OneRoster 1.2 support, including:

  • New v1p2 endpoint and associated classes
  • Nested v1p1 compatibility under v1p2
  • StatusInfo testing structure and test cases

Includes:

  • classes/local/v1p2/ and nested v1p1/ classes
  • tests/local/imsx_StatusInfo/ for HTTP status handling

✅ Tested: PHPUnit tests added and ready for integration.

This is part of the upgrade to support OneRoster 1.2 endpoints and spec compliance in Moodle.

Ruben-Cooper and others added 10 commits November 2, 2024 14:46
Sync: Removed optional csv headers as being required

Processing: Minor Improvements and Code Simplified

Added Csv header validation

Processing: check zip file contains manifest.csv file
Co-Authored-By: SkaarsOfficial <[email protected]>
Co-Authored-By: josh20504 <[email protected]>
* adding csv data in the form of arrays
* adding unit test for the csv files
* adding helper functions for processing csv files

Processing: synchronize completion

* synchronize is able to process csv data and stores it into the database
* Fixed comments and added proper headers

Processing: Users and Orgs

* Process the users and orgs data
* added better csv data examples in csv_data_helper

Restored missing testcase files

Processing: Array Filter

* execute function takes in csv data and  returns that data in the right format
* unit tests to confirm the format

Processing: creating XMLDB table

* only the orgs table was created

Processing: Converts CSVs to Arrays

* added a function that converts CSV data into Arrays
* Clean-up some functions into helper functions

Create test wrapper for CSV client executor

Co-Authored-By: Gustavo Almeida <[email protected]>
Co-Authored-By: SkaarsOfficial <[email protected]>
- deleted all helper file in enrol_oneroster and moved them into a single helper file in enrol_oneroster\classes\local
- moved all the forms into the form folder
- updated the language file
- updated the tests to process a zip folder filled with csv data
- added new fixture which is zip folder with csv data
- added new tests for every function used in helper file
- cleaned up code for final submission into main

UI: csv implementation inc org selector and syncronise

Still work in progress multiple issues and errors still occurring.

Processsing: Updated UI

- UI didn't work but now work
- Orgs is now hard-coded
note: this will be changed after

Processing: Completed UI and tests

- finalized csv_client processing
- added data type validation for all the csv data
- revamped process_csv with more error messages
- added two new ZIP folder with csv data (full_data_set and minimal_data_set)
- made new tests for all the new functions added to csv_client_helper

Processing: Fixing Minor Errors

- only class was called before, now all of the classes in the school can be called

Processing: Fix csv_client and update configurations

- Fixed array handling in csv_data_helper
- Updated csv_client configurations to properly handle type casting values

Co-Authored-By: Gustavo Almeida <[email protected]>
Exception handling and form session data added

removed hardcoded org

Processing: Completion of Synchronise function

- Synchronize function now adds users to the database
- new password validation function
- added back oneroster_testcase.php and v1p1_testcase.php

quick fix

- dynamically changed validate_and_save_users_to_database

Final Review Submission

- Small changes with the layout of the code
- updated fixtures

Co-Authored-By: Gustavo Almeida <[email protected]>
Co-Authored-By: Gustavo Almeida <[email protected]>
Co-Authored-By: SkaarsOfficial <[email protected]>
Co-Authored-By: josh20504 <[email protected]>
- Added endpoint.php to define the v1p2 endpoint logic.
- Added endpoint_test.php to verify endpoint returns correct container.
- Ensures class complies with dependency injection for testing.

@copyright Khushi
@n11558385Harry n11558385Harry deleted the khushi-v1p2-test branch September 4, 2025 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants