Skip to content

Commit ea1956d

Browse files
author
Matthias Opitz
committed
Replaced deprecated core completion strings with local ones
1 parent 74296d8 commit ea1956d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lang/en/hsuforum.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,3 +755,9 @@
755755
$string['forumsubjectdeleted'] = 'This forum post has been removed';
756756
$string['forumbodydeleted'] = 'The content of this forum post has been removed and can no longer be accessed.';
757757
$string['gradeitem:posts'] = 'Posts';
758+
759+
// Replacements for deprecated core completion strings of Moodle 4.3+.
760+
$string['completionview'] = 'Require view';
761+
$string['completionusegrade'] = 'Require grade';
762+
$string['completionusegrade_desc'] = 'Receive a grade';
763+
$string['completionusegrade_help'] = 'If enabled, the activity is considered complete when a student receives a grade. If a pass grade for the activity is set, then pass and fail icons are displayed in the activity completion report.';

mod_form.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ protected function standard_hsuforum_coursemodule_elements() {
414414
// Automatic completion once you view it
415415
$gotcompletionoptions = false;
416416
if (plugin_supports('mod', $this->_modname, FEATURE_COMPLETION_TRACKS_VIEWS, false)) {
417-
$mform->addElement('checkbox', 'completionview', get_string('completionview', 'completion'),
417+
$mform->addElement('checkbox', 'completionview', get_string('completionview', 'mod_hsuforum'),
418418
get_string('completionview_desc', 'completion'));
419419
$mform->hideIf('completionview', 'completion', 'ne', COMPLETION_TRACKING_AUTOMATIC);
420420
// Check by default if automatic completion tracking is set.
@@ -441,7 +441,7 @@ protected function standard_hsuforum_coursemodule_elements() {
441441
get_string('completionusegrade_desc', 'completion')
442442
);
443443
$mform->hideIf('completionusegrade', 'completion', 'ne', COMPLETION_TRACKING_AUTOMATIC);
444-
$mform->addHelpButton('completionusegrade', 'completionusegrade', 'completion');
444+
$mform->addHelpButton('completionusegrade', 'completionusegrade', 'mod_hsuforum');
445445

446446
// The disabledIf logic differs between ratings and other grade items due to different field types.
447447
if ($this->_features->rating) {

0 commit comments

Comments
 (0)