moodleou / moodle-mod_oublog

Alternative blog module for Moodle 2 (including course blogs)
31 stars 27 forks source link

Grade core string deprecated in Moodle 3.11 #120

Open logan-reynolds opened 2 years ago

logan-reynolds commented 2 years ago

When doing basic operational tests with latest commit of mod_oublog on the MOODLE_39_STABLE branch (version 2020091401 release 3.9 r1) running against Moodle 3.11.2 with PHP 7.4, I'm seeing the following string deprecation warning when going to add an instance to course:

String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation

    line 394 of /lib/classes/string_manager_standard.php: call to debugging()
    line 7283 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
    line 180 of /mod/oublog/mod_form.php: call to get_string()
    line 214 of /lib/formslib.php: call to mod_oublog_mod_form->definition()
    line 130 of /course/moodleform_mod.php: call to moodleform->__construct()
    line 150 of /course/modedit.php: call to moodleform_mod->__construct()
drobayo commented 2 years ago

Maybe this can work here: mod_form Change $mform->addElement('header', 'modstandardgrade', get_string('grade')); with $mform->addElement('header', 'modstandardgrade', get_string('gradenoun'));

Change: mform->addElement('modgrade', 'grade', get_string('grade')); with mform->addElement('modgrade', 'grade', get_string('gradenoun'));