MDL-38603 Reorganise Workshop settings form
authorDavid Mudrák <david@moodle.com>
Wed, 17 Apr 2013 09:34:55 +0000 (11:34 +0200)
committerDavid Mudrák <david@moodle.com>
Thu, 18 Apr 2013 21:31:35 +0000 (23:31 +0200)
Example submissions settings moved into a dedicated section.
Self-assessment setting moved to the assessment section. There is no
need for the dedicated Workshop features section any more. All Workshop
feedback settings moved into a dedicated section.

Reorganised grading settings - the grading strategy put into the top
place as it is the essential setting. All other three settings are
related to calculating actual grades.

No advanced setting fields in the Workshop form. Mixing collapsible
sections with advanced fields (that are not even marked as "advanced"
any more) does not work well.

AMOS BEGIN
 CPY [feedback,mod_assign],[feedbacksettings,mod_workshop]
AMOS END

mod/workshop/lang/en/workshop.php
mod/workshop/mod_form.php

index c438f07..73fd955 100644 (file)
@@ -24,7 +24,6 @@
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
-$string['accesscontrol'] = 'Access control';
 $string['aggregategrades'] = 'Re-calculate grades';
 $string['aggregation'] = 'Grades aggregation';
 $string['allocate'] = 'Allocate submissions';
@@ -129,6 +128,7 @@ $string['feedbackauthor'] = 'Feedback for the author';
 $string['feedbackauthorattachment'] = 'Attachment';
 $string['feedbackby'] = 'Feedback by {$a}';
 $string['feedbackreviewer'] = 'Feedback for the reviewer';
+$string['feedbacksettings'] = 'Feedback';
 $string['formataggregatedgrade'] = '{$a->grade}';
 $string['formataggregatedgradeover'] = '<del>{$a->grade}</del><br /><ins>{$a->over}</ins>';
 $string['formatpeergrade'] = '<span class="grade">{$a->grade}</span> <span class="gradinggrade">({$a->gradinggrade})</span>';
@@ -162,8 +162,7 @@ $string['latesubmissions'] = 'Late submissions';
 $string['latesubmissions_desc'] = 'Allow submissions after the deadline';
 $string['latesubmissions_help'] = 'If enabled, an author may submit their work after the submissions deadline or during the assessment phase. Late submissions cannot be edited though.';
 $string['latesubmissionsallowed'] = 'Late submissions are allowed';
-$string['maxbytes'] = 'Maximum file size';
-$string['miscellaneoussettings'] = 'Miscellaneous settings';
+$string['maxbytes'] = 'Maximum submission attachment size';
 $string['modulename'] = 'Workshop';
 $string['modulename_help'] = 'The workshop activity module enables the collection, review and peer assessment of students\' work.
 
@@ -189,7 +188,7 @@ $string['noyoursubmission'] = 'You have not submitted your work yet';
 $string['nullgrade'] = '-';
 $string['overallfeedback'] = 'Overall feedback';
 $string['overallfeedbackfiles'] = 'Maximum number of overall feedback attachments';
-$string['overallfeedbackmaxbytes'] = 'Maximum file size';
+$string['overallfeedbackmaxbytes'] = 'Maximum overall feedback attachment size';
 $string['overallfeedbackmode'] = 'Overall feedback mode';
 $string['overallfeedbackmode_0'] = 'Disabled';
 $string['overallfeedbackmode_1'] = 'Enabled and optional';
@@ -296,7 +295,6 @@ $string['withoutsubmission'] = 'Reviewer without own submission';
 $string['workshop:addinstance'] = 'Add a new workshop';
 $string['workshop:allocate'] = 'Allocate submissions for review';
 $string['workshop:editdimensions'] = 'Edit assessment forms';
-$string['workshopfeatures'] = 'Workshop features';
 $string['workshop:ignoredeadlines'] = 'Ignore time restrictions';
 $string['workshop:manageexamples'] = 'Manage example submissions';
 $string['workshopname'] = 'Workshop name';
index 685c6f5..6f68e20 100644 (file)
@@ -78,21 +78,14 @@ class mod_workshop_mod_form extends moodleform_mod {
         // Introduction
         $this->add_intro_editor(false, get_string('introduction', 'workshop'));
 
-        // Workshop features ----------------------------------------------------------
-        $mform->addElement('header', 'workshopfeatures', get_string('workshopfeatures', 'workshop'));
-
-        $label = get_string('useexamples', 'workshop');
-        $text = get_string('useexamples_desc', 'workshop');
-        $mform->addElement('checkbox', 'useexamples', $label, $text);
-        $mform->addHelpButton('useexamples', 'useexamples', 'workshop');
-
-        $label = get_string('useselfassessment', 'workshop');
-        $text = get_string('useselfassessment_desc', 'workshop');
-        $mform->addElement('checkbox', 'useselfassessment', $label, $text);
-        $mform->addHelpButton('useselfassessment', 'useselfassessment', 'workshop');
-
         // Grading settings -----------------------------------------------------------
         $mform->addElement('header', 'gradingsettings', get_string('gradingsettings', 'workshop'));
+        $mform->setExpanded('gradingsettings');
+
+        $label = get_string('strategy', 'workshop');
+        $mform->addElement('select', 'strategy', $label, workshop::available_strategies_list());
+        $mform->setDefault('strategy', $workshopconfig->strategy);
+        $mform->addHelpButton('strategy', 'strategy', 'workshop');
 
         $grades = workshop::available_maxgrades_list();
         $gradecategories = grade_get_categories_menu($this->course->id);
@@ -113,18 +106,12 @@ class mod_workshop_mod_form extends moodleform_mod {
         $mform->setDefault('gradinggrade', $workshopconfig->gradinggrade);
         $mform->addHelpButton('gradinggradegroup', 'gradinggrade', 'workshop');
 
-        $label = get_string('strategy', 'workshop');
-        $mform->addElement('select', 'strategy', $label, workshop::available_strategies_list());
-        $mform->setDefault('strategy', $workshopconfig->strategy);
-        $mform->addHelpButton('strategy', 'strategy', 'workshop');
-
         $options = array();
         for ($i=5; $i>=0; $i--) {
             $options[$i] = $i;
         }
         $label = get_string('gradedecimals', 'workshop');
         $mform->addElement('select', 'gradedecimals', $label, $options);
-        $mform->setAdvanced('gradedecimals');
         $mform->setDefault('gradedecimals', $workshopconfig->gradedecimals);
 
         // Submission settings --------------------------------------------------------
@@ -150,7 +137,6 @@ class mod_workshop_mod_form extends moodleform_mod {
         $text = get_string('latesubmissions_desc', 'workshop');
         $mform->addElement('checkbox', 'latesubmissions', $label, $text);
         $mform->addHelpButton('latesubmissions', 'latesubmissions', 'workshop');
-        $mform->setAdvanced('latesubmissions');
 
         // Assessment settings --------------------------------------------------------
         $mform->addElement('header', 'assessmentsettings', get_string('assessmentsettings', 'workshop'));
@@ -159,13 +145,20 @@ class mod_workshop_mod_form extends moodleform_mod {
         $mform->addElement('editor', 'instructreviewerseditor', $label, null,
                             workshop::instruction_editors_options($this->context));
 
+        $label = get_string('useselfassessment', 'workshop');
+        $text = get_string('useselfassessment_desc', 'workshop');
+        $mform->addElement('checkbox', 'useselfassessment', $label, $text);
+        $mform->addHelpButton('useselfassessment', 'useselfassessment', 'workshop');
+
+        // Feedback -------------------------------------------------------------------
+        $mform->addElement('header', 'feedbacksettings', get_string('feedbacksettings', 'workshop'));
+
         $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--) {
@@ -173,55 +166,52 @@ class mod_workshop_mod_form extends moodleform_mod {
         }
         $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('conclusion', 'workshop');
+        $mform->addElement('editor', 'conclusioneditor', $label, null,
+                            workshop::instruction_editors_options($this->context));
+        $mform->addHelpButton('conclusioneditor', 'conclusion', 'workshop');
+
+        // Example submissions --------------------------------------------------------
+        $mform->addElement('header', 'examplesubmissionssettings', get_string('examplesubmissions', 'workshop'));
+
+        $label = get_string('useexamples', 'workshop');
+        $text = get_string('useexamples_desc', 'workshop');
+        $mform->addElement('checkbox', 'useexamples', $label, $text);
+        $mform->addHelpButton('useexamples', 'useexamples', 'workshop');
+
         $label = get_string('examplesmode', 'workshop');
         $options = workshop::available_example_modes_list();
         $mform->addElement('select', 'examplesmode', $label, $options);
         $mform->setDefault('examplesmode', $workshopconfig->examplesmode);
         $mform->disabledIf('examplesmode', 'useexamples');
-        $mform->setAdvanced('examplesmode');
-
-        // Miscellaneous settings
-        $mform->addElement('header', 'miscellaneoussettings', get_string('miscellaneoussettings', 'workshop'));
-
-        $label = get_string('conclusion', 'workshop');
-        $mform->addElement('editor', 'conclusioneditor', $label, null,
-                            workshop::instruction_editors_options($this->context));
-        $mform->addHelpButton('conclusioneditor', 'conclusion', 'workshop');
 
-        // Access control -------------------------------------------------------------
-        $mform->addElement('header', 'accesscontrol', get_string('accesscontrol', 'workshop'));
+        // Availability ---------------------------------------------------------------
+        $mform->addElement('header', 'accesscontrol', get_string('availability', 'core'));
 
         $label = get_string('submissionstart', 'workshop');
         $mform->addElement('date_time_selector', 'submissionstart', $label, array('optional' => true));
-        $mform->setAdvanced('submissionstart');
 
         $label = get_string('submissionend', 'workshop');
         $mform->addElement('date_time_selector', 'submissionend', $label, array('optional' => true));
-        $mform->setAdvanced('submissionend');
 
         $label = get_string('submissionendswitch', 'mod_workshop');
         $mform->addElement('checkbox', 'phaseswitchassessment', $label);
-        $mform->setAdvanced('phaseswitchassessment');
         $mform->disabledIf('phaseswitchassessment', 'submissionend[enabled]');
         $mform->addHelpButton('phaseswitchassessment', 'submissionendswitch', 'mod_workshop');
 
         $label = get_string('assessmentstart', 'workshop');
         $mform->addElement('date_time_selector', 'assessmentstart', $label, array('optional' => true));
-        $mform->setAdvanced('assessmentstart');
 
         $label = get_string('assessmentend', 'workshop');
         $mform->addElement('date_time_selector', 'assessmentend', $label, array('optional' => true));
-        $mform->setAdvanced('assessmentend');
 
         $coursecontext = context_course::instance($this->course->id);
         plagiarism_get_form_elements_module($mform, $coursecontext, 'mod_workshop');