mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-80575 mod_forum: correct field name for "Notify students" setting.
This commit is contained in:
parent
9587029a46
commit
bf34adae73
@ -232,8 +232,6 @@ class mod_forum_mod_form extends moodleform_mod {
|
||||
$gradefieldname = component_gradeitems::get_field_name_for_itemnumber($component, $itemnumber, 'grade');
|
||||
$gradecatfieldname = component_gradeitems::get_field_name_for_itemnumber($component, $itemnumber, 'gradecat');
|
||||
$gradepassfieldname = component_gradeitems::get_field_name_for_itemnumber($component, $itemnumber, 'gradepass');
|
||||
$sendstudentnotificationsfieldname = component_gradeitems::get_field_name_for_itemnumber($component, $itemnumber,
|
||||
'sendstudentnotifications');
|
||||
|
||||
// The advancedgradingmethod is different in that it is suffixed with an area name... which is not the
|
||||
// itemnumber.
|
||||
@ -304,13 +302,9 @@ class mod_forum_mod_form extends moodleform_mod {
|
||||
$mform->setType($gradepassfieldname, PARAM_RAW);
|
||||
$mform->hideIf($gradepassfieldname, "{$gradefieldname}[modgrade_type]", 'eq', 'none');
|
||||
|
||||
$mform->addElement(
|
||||
'selectyesno',
|
||||
$sendstudentnotificationsfieldname,
|
||||
get_string('sendstudentnotificationsdefault', 'forum')
|
||||
);
|
||||
$mform->addHelpButton($sendstudentnotificationsfieldname, 'sendstudentnotificationsdefault', 'forum');
|
||||
$mform->hideIf($sendstudentnotificationsfieldname, "{$gradefieldname}[modgrade_type]", 'eq', 'none');
|
||||
$mform->addElement('selectyesno', 'grade_forum_notify', get_string('sendstudentnotificationsdefault', 'forum'));
|
||||
$mform->addHelpButton('grade_forum_notify', 'sendstudentnotificationsdefault', 'forum');
|
||||
$mform->hideIf('grade_forum_notify', "{$gradefieldname}[modgrade_type]", 'eq', 'none');
|
||||
}
|
||||
|
||||
function definition_after_data() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user