Skip to content

Commit

Permalink
Fix last flaws with the integration of local_recompletion
Browse files Browse the repository at this point in the history
  • Loading branch information
abias committed Dec 18, 2023
1 parent 5abd05b commit 1c2bede
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions classes/task/reset_course_completion.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@
// Require plugin library.
require_once($CFG->dirroot.'/enrol/semco/locallib.php');

// Require local_recompletion plugin library.
require_once($CFG->dirroot.'/local/recompletion/locallib.php');
// If local_recompletion is installed.
if (enrol_semco_check_local_recompletion() == true) {
// Require local_recompletion plugin library.
require_once($CFG->dirroot . '/local/recompletion/locallib.php');
}

/**
* Enrolment method "SEMCO" - Scheduled task for resetting course completion on subsequent enrolments.
Expand Down
2 changes: 1 addition & 1 deletion lang/de/enrol_semco.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
$string['settings_coursecompletionheading'] = 'Kursabschluss';
$string['settings_coursecompletionnotfound'] = '<p>Das SEMCO Einschreibeplugin ist in der Lage, den Kursabschluss eines Nutzers zurückzusetzen sobald dieser ein weiteres Mal von SEMCO in einen Kurs eingeschrieben wird.<br />
Um diesen Reset umzusetzen und zu vermeiden, das Rad neu zu erfinden, hat dieses Plugin eine lose Abhängigkeit zu <a href="https://moodle.org/plugins/local_recompletion">local_recompletion</a> von Dan Marsden.</p><p>
Bitte installieren Sie local_recompletion mit mindestens der Version 2023092801 falls Sie planen, mehrfache Kurseinschreibungen mit SEMCO zu nutzen und den Kursabschluss dabei zurücksetzen wollen.<br />
Bitte installieren Sie local_recompletion mit mindestens der Version 2023111402 falls Sie planen, mehrfache Kurseinschreibungen mit SEMCO zu nutzen und den Kursabschluss dabei zurücksetzen wollen.<br />
Falls Sie dies nicht planen, müssen Sie local_recompletion nicht installieren.</p>';
$string['settings_enrolmentheading'] = 'Einschreibungsprozess';
$string['settings_notifyonmissedreset'] = 'Benachrichtigung bei verpasstem Kursabschluss-Zurücksetzen';
Expand Down
2 changes: 1 addition & 1 deletion lang/en/enrol_semco.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
$string['settings_coursecompletionheading'] = 'Course completion';
$string['settings_coursecompletionnotfound'] = '<p>The SEMCO enrolment plugin is able to reset a user\'s course completion if he gets enrolled into a particular course by SEMCO once more.<br />
To realize this course completion reset and to avoid to re-invent the wheel, this plugin has a soft dependency to <a href="https://moodle.org/plugins/local_recompletion">local_recompletion</a> by Dan Marsden.</p><p>
Please install local_recompletion with at least version 2023092801 alongside this plugin if you plan to use subsequent user enrolments into the same course and need to reset course completion.<br />
Please install local_recompletion with at least version 2023111402 alongside this plugin if you plan to use subsequent user enrolments into the same course and need to reset course completion.<br />
If you do not need plan to reset course completion, you do not need to install local_recompletion.</p>';
$string['settings_enrolmentheading'] = 'Enrolment process';
$string['settings_notifyonmissedreset'] = 'Notify on missed course completion reset';
Expand Down

0 comments on commit 1c2bede

Please sign in to comment.