]> git.mjollnir.org Git - moodle.git/commitdiff
Use standard elements for setting the grades and scales
authorDavid Mudrak <david.mudrak@gmail.com>
Mon, 4 Jan 2010 17:50:59 +0000 (17:50 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Mon, 4 Jan 2010 17:50:59 +0000 (17:50 +0000)
mod/workshop/grading/accumulative/assessment_form.php
mod/workshop/grading/accumulative/edit_form.php
mod/workshop/lang/en_utf8/workshop.php

index b847ed8d2e71fb0b1358203c72bd3f2b8397fa8e..a1d35025d8312337ab9779da88589dd3bb047f2a 100644 (file)
@@ -62,13 +62,12 @@ class workshop_accumulative_assessment_form extends workshop_assessment_form {
             $mform->addElement('html', $desc);
 
             // grade for this aspect
-            $label = 'Grade'; // todo i18n 
-            $label .= ' / ' . $fields['grade__idx_' . $i];
-            $options = array(10,9,8,7,6,5,4,3,2,1,0); // todo
+            $label = get_string('dimensiongrade', 'workshop');
+            $options = make_grades_menu($fields['grade__idx_' . $i]);
             $mform->addElement('select', 'grade__idx_' . $i, $label, $options);
 
             // comment
-            $label = 'Comment'; //todo i18n
+            $label = get_string('dimensioncomment', 'workshop');
             //$mform->addElement('editor', 'peercomment__idx_' . $i, $label, null, array('maxfiles' => 0));
             $mform->addElement('textarea', 'peercomment__idx_' . $i, $label, array('cols' => 60, 'rows' => 5));
         }
index b7b1906ce5c7568cd5a4a445a28c5995d05b822f..97b0f81bebc6368d50e2813f6494714e49081715 100644 (file)
@@ -52,7 +52,6 @@ class workshop_edit_accumulative_strategy_form extends workshop_edit_strategy_fo
         // value not to be overridden by submitted value
         $mform->setConstants(array('norepeats' => $norepeats));
 
-        $gradeoptions = array(20 => 20, 10 => 10, 8=>8, 5 => 5);
         $weights = workshop_get_dimension_weights();
 
         for ($i = 0; $i < $norepeats; $i++) {
@@ -60,8 +59,10 @@ class workshop_edit_accumulative_strategy_form extends workshop_edit_strategy_fo
             $mform->addElement('hidden', 'dimensionid__idx_'.$i);   // the id in workshop_forms_accumulative
             $mform->addElement('editor', 'description__idx_'.$i.'_editor', get_string('dimensiondescription', 'workshop'),
                                     array('cols' => 20), $descriptionopts);
-            $mform->addElement('select', 'grade__idx_'.$i, get_string('grade'), $gradeoptions);
+            $mform->addElement('modgrade', 'grade__idx_'.$i, get_string('dimensionmaxgrade','workshop'), null, true);
+            $mform->setDefault('grade__idx_'.$i, 10);
             $mform->addElement('select', 'weight__idx_'.$i, get_string('dimensionweight', 'workshop'), $weights);
+            $mform->setDefault('weight__idx_'.$i, 1);
         }
 
         $mform->registerNoSubmitButton('noadddims');
index bcb896c912d4f5dfb20be535844794991f06de55..9d4ca29ac2675b255a04b829632999e3b5d913e2 100644 (file)
 
 defined('MOODLE_INTERNAL') || die();
 
-$string['strategyhaschanged'] = 'The workshop grading strategy has changed since the form was opened for editing.';
-$string['editsubmission'] = 'Edit submission';
+$string[''] = '';
+$string[''] = '';
+$string[''] = '';
+$string[''] = '';
+$string[''] = '';
+$string[''] = '';
 $string[''] = '';
 $string[''] = '';
 $string[''] = '';
@@ -89,12 +93,16 @@ $string['confignoerrorsgrade0'] = 'The default word describing the negative asse
 $string['confignoerrorsgrade1'] = 'The default word describing the positive assessment of an assertion in "Number of errors" grading strategy.';
 $string['confignsassessments'] = 'Default number of allocated submissions to be reviewed by a user in the assessment phase';
 $string['configstrategy'] = 'Default grading strategy for workshops';
+$string['dimensioncomment'] = 'Comment';
 $string['dimensiondescription'] = 'Description';
+$string['dimensiongrade'] = 'Grade';
+$string['dimensionmaxgrade'] = 'Best possible grade / Scale to use';
 $string['dimensionnumberaccumulative'] = 'Aspect $a';
 $string['dimensionnumbernoerrors'] = 'Assertion $a';
 $string['dimensionweight'] = 'Weight';
 $string['editingassessmentform'] = 'Editing assessment form';
 $string['editingsubmission'] = 'Editing submission';
+$string['editsubmission'] = 'Edit submission';
 $string['err_removegrademappings'] = 'Unable to remove the unused grade mappings';
 $string['examplesbeforeassessment'] = 'Examples are available after own submission and must be assessed before peer/self assessment phase';
 $string['examplesbeforesubmission'] = 'Examples must be assessed before own submission';
@@ -148,6 +156,7 @@ $string['saveandcontinue'] = 'Save and continue editing';
 $string['saveandpreview'] = 'Save and preview';
 $string['strategyaccumulative'] = 'Accumulative grading';
 $string['strategy'] = 'Grading strategy';
+$string['strategyhaschanged'] = 'The workshop grading strategy has changed since the form was opened for editing.';
 $string['strategynoerrors'] = 'Number of errors';
 $string['strategynograding'] = 'No grading';
 $string['strategyrubric'] = 'Rubric grading';