Permalink
Browse files

MDL-37602 Overall feedback can be configured in the workshop settings…

… form

Three new fields are added into the into the Assessment settings section
of the form. The default value for the overallfeedbackmaxbytes is the
same as the maximum size for submission attachments (which seems to be a
reasonable value). If there is a demand and a strong use case, these
values can became per-site configurable (I can see no big benefit of
doing so right now).

AMOS BEGIN
 CPY [maxbytes,mod_workshop],[overallfeedbackmaxbytes,mod_workshop]
AMOS END
  • Loading branch information...
1 parent 7426229 commit 1c6b484dabd6cc07b1607f1a7e33680c8cc6cf9b @mudrd8mz mudrd8mz committed Mar 25, 2013
Showing with 31 additions and 0 deletions.
  1. +7 −0 mod/workshop/lang/en/workshop.php
  2. +24 −0 mod/workshop/mod_form.php
@@ -184,6 +184,13 @@
$string['noworkshops'] = 'There are no workshops in this course';
$string['noyoursubmission'] = 'You have not submitted your work yet';
$string['nullgrade'] = '-';
+$string['overallfeedbackfiles'] = 'Maximum number of overall feedback attachments';
+$string['overallfeedbackmaxbytes'] = 'Maximum file size';
+$string['overallfeedbackmode'] = 'Overall feedback mode';
+$string['overallfeedbackmode_0'] = 'Disabled';
+$string['overallfeedbackmode_1'] = 'Enabled and optional';
+$string['overallfeedbackmode_2'] = 'Enabled and required';
+$string['overallfeedbackmode_help'] = 'If enabled, a text field is displayed at the bottom of the assessment form. Reviewers can put the overall assessment of the submission there, or provide additional explanation of their assessment.';
$string['page-mod-workshop-x'] = 'Any workshop module page';
$string['participant'] = 'Participant';
$string['participantrevierof'] = 'Participant is reviewer of';
View
@@ -164,6 +164,30 @@ public function definition() {
$mform->addElement('editor', 'instructreviewerseditor', $label, null,
workshop::instruction_editors_options($this->context));
+ $mform->addElement('select', 'overallfeedbackmode', get_string('overallfeedbackmode', 'mod_workshop'), array(
+ 0 => get_string('overallfeedbackmode_0', 'mod_workshop'),
+ 1 => get_string('overallfeedbackmode_1', 'mod_workshop'),
+ 2 => get_string('overallfeedbackmode_2', 'mod_workshop')));
+ $mform->addHelpButton('overallfeedbackmode', 'overallfeedbackmode', 'mod_workshop');
+ $mform->setDefault('overallfeedbackmode', 1);
+ $mform->setAdvanced('overallfeedbackmode');
+
+ $options = array();
+ for ($i = 7; $i >= 0; $i--) {
+ $options[$i] = $i;
+ }
+ $mform->addElement('select', 'overallfeedbackfiles', get_string('overallfeedbackfiles', 'workshop'), $options);
+ $mform->setDefault('overallfeedbackfiles', 0);
+ $mform->setAdvanced('overallfeedbackfiles');
+ $mform->disabledIf('overallfeedbackfiles', 'overallfeedbackmode', 'eq', 0);
+
+ $options = get_max_upload_sizes($CFG->maxbytes, $this->course->maxbytes);
+ $mform->addElement('select', 'overallfeedbackmaxbytes', get_string('overallfeedbackmaxbytes', 'workshop'), $options);
+ $mform->setAdvanced('overallfeedbackmaxbytes');
+ $mform->setDefault('overallfeedbackmaxbytes', $workshopconfig->maxbytes);
+ $mform->disabledIf('overallfeedbackmaxbytes', 'overallfeedbackmode', 'eq', 0);
+ $mform->disabledIf('overallfeedbackmaxbytes', 'overallfeedbackfiles', 'eq', 0);
+
$label = get_string('examplesmode', 'workshop');
$options = workshop::available_example_modes_list();
$mform->addElement('select', 'examplesmode', $label, $options);

0 comments on commit 1c6b484

Please sign in to comment.