Skip to content

Commit 912897e

Browse files
committed
Enhance documentation for local_psaelmsync_sync function to include additional details on processing and logging
1 parent a09cb37 commit 912897e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ function local_psaelmsync_is_ignored_course($elm_course_id) {
1818
return in_array((string)(int)$elm_course_id, $ignored_ids, true);
1919
}
2020

21+
/**
22+
* The primary function to sync enrolments from the ELM system via the CData API.
23+
* This function is designed to be run as a scheduled task and will:
24+
* - Fetch enrolment records from the CData API with a date filter.
25+
* - Process each record to enrol or suspend users in Moodle courses.
26+
* - Log the results of each record processing in a custom log table.
27+
* - Send email notifications for any errors encountered during processing.
28+
* - Log the overall run details including counts of enrolments, suspensions, errors, and skipped records.
29+
* - Check for inactivity and send notifications if no enrolments or suspensions have been processed within a specified timeframe.
30+
*/
2131
function local_psaelmsync_sync() {
2232

2333
global $DB;

0 commit comments

Comments
 (0)