Skip to content

Commit cf2bd42

Browse files
committed
Add new course setting "email_to_teachers_on_new_work_feedback"
If setting is "on" then teachers receive an email notification when a new work feedback is added. See BT#13518
1 parent c069fc9 commit cf2bd42

File tree

5 files changed

+148
-116
lines changed

5 files changed

+148
-116
lines changed

main/course_info/infocours.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ function is_settings_editable()
327327
$group[] = $form->createElement('radio', 'email_alert_on_new_doc_dropbox', null, get_lang('DropboxEmailAlertDeactivate'), 0);
328328
$form->addGroup($group, '', array(get_lang("DropboxEmailAlert")));
329329

330-
331330
// Exercises notifications
332331
$emailAlerts = ExerciseLib::getNotificationSettings();
333332
$group = [];
@@ -342,6 +341,24 @@ function is_settings_editable()
342341
}
343342

344343
$form->addGroup($group, '', array(get_lang('Exercises')));
344+
345+
$group = array();
346+
$group[] = $form->createElement(
347+
'radio',
348+
'email_to_teachers_on_new_work_feedback',
349+
get_lang('EmailToTeachersWhenNewWorkFeedback'),
350+
get_lang('Yes'),
351+
1
352+
);
353+
$group[] = $form->createElement(
354+
'radio',
355+
'email_to_teachers_on_new_work_feedback',
356+
null,
357+
get_lang('No'),
358+
2
359+
);
360+
$form->addGroup($group, '', array(get_lang("EmailToTeachersWhenNewWorkFeedback")));
361+
345362
$form->addButtonSave(get_lang('SaveSettings'), 'submit_save');
346363

347364
$form->addHtml('

main/inc/lib/course.lib.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5548,7 +5548,8 @@ public static function getCourseSettingVariables(AppPlugin $appPlugin)
55485548
'show_system_folders',
55495549
'exercise_invisible_in_session',
55505550
'enable_forum_auto_launch',
5551-
'show_course_in_user_language'
5551+
'show_course_in_user_language',
5552+
'email_to_teachers_on_new_work_feedback'
55525553
);
55535554

55545555
if (!empty(ExerciseLib::getScoreModels())) {

0 commit comments

Comments
 (0)