MDL-66360 mod_forum: added settings for send notifications default val
AMOS BEGIN CPY [sendstudentnotifications, mod_assign],[sendstudentnotifications, mod_forum] CPY [sendstudentnotifications_help, mod_assign],[sendstudentnotifications_help, mod_forum] AMOS END
This commit is contained in:
committed by
Simey Lameze
parent
3ab419ad5a
commit
77580567a3
@@ -639,6 +639,8 @@ $string['searchuserid'] = 'The Moodle ID of the author';
|
||||
$string['searchwhichforums'] = 'Choose which forums to search';
|
||||
$string['searchwords'] = 'These words can appear anywhere in the post';
|
||||
$string['seeallposts'] = 'See all posts made by this user';
|
||||
$string['sendstudentnotificationsdefault'] = 'Default setting for "Notify students"';
|
||||
$string['sendstudentnotificationsdefault_help'] = 'Set the default value for the "Notify students" checkbox on the grading form.';
|
||||
$string['settings'] = 'Settings';
|
||||
$string['shortpost'] = 'Short post';
|
||||
$string['showingcountoftotaldiscussions'] = 'Showing {$a->count} of {$a->total} discussions';
|
||||
|
||||
@@ -235,6 +235,8 @@ 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,6 +306,14 @@ class mod_forum_mod_form extends moodleform_mod {
|
||||
$mform->setDefault($gradepassfieldname, '');
|
||||
$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');
|
||||
}
|
||||
|
||||
function definition_after_data() {
|
||||
|
||||
Reference in New Issue
Block a user