Skip to content

Commit

Permalink
MDL-56246 gradebook: sitewide setting for grade export with feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kwiliarty committed Dec 22, 2017
1 parent 9993c1d commit 8284ffe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions admin/settings/grades.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
// enable publishing in exports/imports
$temp->add(new admin_setting_configcheckbox('gradepublishing', new lang_string('gradepublishing', 'grades'), new lang_string('gradepublishing_help', 'grades'), 0));

$temp->add(new admin_setting_configcheckbox('grade_export_exportfeedback', new lang_string('exportfeedback', 'grades'),
new lang_string('exportfeedback_desc', 'grades'), 0));

$temp->add(new admin_setting_configselect('grade_export_displaytype', new lang_string('gradeexportdisplaytype', 'grades'),
new lang_string('gradeexportdisplaytype_desc', 'grades'), GRADE_DISPLAY_TYPE_REAL, $display_types));

Expand Down
3 changes: 2 additions & 1 deletion grade/export/grade_export_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ function definition() {
}

$mform->addElement('advcheckbox', 'export_feedback', get_string('exportfeedback', 'grades'));
$mform->setDefault('export_feedback', 0);
$exportfeedback = isset($CFG->grade_export_exportfeedback) ? $CFG->grade_export_exportfeedback : 0;
$mform->setDefault('export_feedback', $exportfeedback);
$coursecontext = context_course::instance($COURSE->id);
if (has_capability('moodle/course:viewsuspendedusers', $coursecontext)) {
$mform->addElement('advcheckbox', 'export_onlyactive', get_string('exportonlyactive', 'grades'));
Expand Down
1 change: 1 addition & 0 deletions lang/en/grades.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
$string['export'] = 'Export';
$string['exportalloutcomes'] = 'Export all outcomes';
$string['exportfeedback'] = 'Include feedback in export';
$string['exportfeedback_desc'] = 'This can be overridden during export.';
$string['exportformatoptions'] = 'Export format options';
$string['exportplugins'] = 'Export plugins';
$string['exportsettings'] = 'Export settings';
Expand Down

0 comments on commit 8284ffe

Please sign in to comment.