Skip to content

Commit

Permalink
Merge branch 'MDL-69400-311' of https://github.com/abgreeve/moodle in…
Browse files Browse the repository at this point in the history
…to MOODLE_311_STABLE
  • Loading branch information
snake committed Jul 7, 2022
2 parents bf3f06b + 69ce532 commit d3d988f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions mod/forum/lib.php
Expand Up @@ -6989,3 +6989,20 @@ function forum_grading_areas_list() {
'forum' => get_string('grade_forum_header', 'forum'),
];
}

/**
* This callback will check the provided instance of this module
* and make sure there are up-to-date events created for it.
*
* @param int $courseid Not used.
* @param stdClass $instance Forum module instance.
* @param stdClass $cm Course module object.
*/
function forum_refresh_events(int $courseid, stdClass $instance, stdClass $cm): void {
global $CFG;

// This function is called by cron and we need to include the locallib for calls further down.
require_once($CFG->dirroot . '/mod/forum/locallib.php');

forum_update_calendar($instance, $cm->id);
}

0 comments on commit d3d988f

Please sign in to comment.