]> git.mjollnir.org Git - moodle.git/commitdiff
Removed anonymity and hidegrades
authorDavid Mudrak <david.mudrak@gmail.com>
Mon, 4 Jan 2010 17:45:03 +0000 (17:45 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Mon, 4 Jan 2010 17:45:03 +0000 (17:45 +0000)
These will be controlled by capabilities, as suggested by Eloy.

mod/workshop/db/install.xml
mod/workshop/lang/en_utf8/workshop.php
mod/workshop/lib.php
mod/workshop/mod_form.php
mod/workshop/settings.php

index dffd618068aec12785767e2f11d945d23867097f..271dfc46d8892f7b945bdcd62ed8eea72c4fc1f5 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="mod/workshop/db" VERSION="20090605" COMMENT="XMLDB file for Moodle mod/workshop"
+<XMLDB PATH="mod/workshop/db" VERSION="20090630" COMMENT="XMLDB file for Moodle mod/workshop"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
 >
         <FIELD NAME="strategy" TYPE="char" LENGTH="30" NOTNULL="true" SEQUENCE="false" COMMENT="The type of the current grading strategy used in this workshop" PREVIOUS="gradinggrade" NEXT="nattachments"/>
         <FIELD NAME="nattachments" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Number of required submission attachments" PREVIOUS="strategy" NEXT="latesubmissions"/>
         <FIELD NAME="latesubmissions" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Allow submitting the work after the deadline" PREVIOUS="nattachments" NEXT="maxbytes"/>
-        <FIELD NAME="maxbytes" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="100000" SEQUENCE="false" COMMENT="Maximum size of the one attached file" PREVIOUS="latesubmissions" NEXT="anonymity"/>
-        <FIELD NAME="anonymity" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="The anonymity mode (0 = not anonymous, 1 = authors hidden to reviewers, 2 = reviewers hidden to authors, 3 = fully anonymous)" PREVIOUS="maxbytes" NEXT="assesswosubmission"/>
-        <FIELD NAME="assesswosubmission" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="If a student should participate in peer assessment phase even if she has not managed to submit her own work" PREVIOUS="anonymity" NEXT="nsassessments"/>
+        <FIELD NAME="maxbytes" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="100000" SEQUENCE="false" COMMENT="Maximum size of the one attached file" PREVIOUS="latesubmissions" NEXT="assesswosubmission"/>
+        <FIELD NAME="assesswosubmission" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="If a student should participate in peer assessment phase even if she has not managed to submit her own work" PREVIOUS="maxbytes" NEXT="nsassessments"/>
         <FIELD NAME="nsassessments" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Number of required assessments of other students' work" PREVIOUS="assesswosubmission" NEXT="nexassessments"/>
         <FIELD NAME="nexassessments" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="If useexamples == 1: the number of required assessments of teacher examples (0 = all, greater than 0: the number)" PREVIOUS="nsassessments" NEXT="examplesmode"/>
         <FIELD NAME="examplesmode" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="0 = example assessments are voluntary, 1 = examples must be assessed before submission, 2 = examples are available after own submission and must be assessed before peer/self assessment phase" PREVIOUS="nexassessments" NEXT="teacherweight"/>
         <FIELD NAME="teacherweight" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" COMMENT="The weight of the teacher's assessments" PREVIOUS="examplesmode" NEXT="agreeassessments"/>
-        <FIELD NAME="agreeassessments" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Boolean - determines if author may comment assessments and agree/disagree with it" PREVIOUS="teacherweight" NEXT="hidegrades"/>
-        <FIELD NAME="hidegrades" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Boolean - if agreeassessments==1, should the grades be hidden for author? If hidden, only comments are visible" PREVIOUS="agreeassessments" NEXT="assessmentcomps"/>
-        <FIELD NAME="assessmentcomps" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" DEFAULT="2" SEQUENCE="false" COMMENT="Comparison of assessments = required level of assessment similarity (0 = very lax, 1 = lax, 2 = fair, 3 = strict, 4 = very strict)" PREVIOUS="hidegrades" NEXT="submissionstart"/>
+        <FIELD NAME="agreeassessments" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="Boolean - determines if author may comment assessments and agree/disagree with it" PREVIOUS="teacherweight" NEXT="assessmentcomps"/>
+        <FIELD NAME="assessmentcomps" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" DEFAULT="2" SEQUENCE="false" COMMENT="Comparison of assessments = required level of assessment similarity (0 = very lax, 1 = lax, 2 = fair, 3 = strict, 4 = very strict)" PREVIOUS="agreeassessments" NEXT="submissionstart"/>
         <FIELD NAME="submissionstart" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="0 = will be started manually, greater than 0 the timestamp of the start of the submission phase" PREVIOUS="assessmentcomps" NEXT="submissionend"/>
         <FIELD NAME="submissionend" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="0 = will be closed manually, greater than 0 the timestamp of the end of the submission phase" PREVIOUS="submissionstart" NEXT="assessmentstart"/>
         <FIELD NAME="assessmentstart" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" COMMENT="0 = will be started manually, greater than 0 the timestamp of the start of the assessment phase" PREVIOUS="submissionend" NEXT="assessmentend"/>
index a87b2fe8357ed8b6bd5889cffda5a7221cc4bafd..61ab3f81c2452962989af8384684de5b87d29143 100644 (file)
@@ -52,20 +52,13 @@ $string[''] = '';
 $string[''] = '';
 $string[''] = '';
 $string[''] = '';
-$string[''] = '';
-$string[''] = '';
-$string['assessingsubmission'] = 'Assessing submission';
 $string['accesscontrol'] = 'Access control';
 $string['addmoredimensionsaccumulative'] = 'Blanks for $a more aspects';
 $string['addmoredimensionsnoerrors'] = 'Blanks for $a more assertions';
 $string['agreeassessments'] = 'Assessments must be agreed';
 $string['agreeassessmentsdesc'] = 'Authors may comment assessments of their work and agree/disagree with it';
-$string['anonymity'] = 'Anonymity mode';
-$string['anonymityauthors'] = 'Reviewers can\'t see authors\' names';
-$string['anonymityboth'] = 'Fully anonymous';
-$string['anonymitynone'] = 'Not anonymous';
-$string['anonymityreviewers'] = 'Authors can\'t see reviewers\' names';
 $string['assessallexamples'] = 'Assess all examples';
+$string['assessingsubmission'] = 'Assessing submission';
 $string['assessmentcomps'] = 'Required level of assessments similarity';
 $string['assessmentend'] = 'End of assessment phase';
 $string['assessmentform'] = 'Assessment form';
@@ -104,8 +97,6 @@ $string['examplesvoluntary'] = 'Assessment of example submission is voluntary';
 $string['gradeforassessment'] = 'Grade for assessment';
 $string['gradeforsubmission'] = 'Grade for submission';
 $string['gradingsettings'] = 'Grading settings';
-$string['hidegradesdesc'] = 'If assessments must be agreed, should the grades be hidden from the author? If grades are hidden, authors can see only comments';
-$string['hidegrades'] = 'Hide grades before agreement';
 $string['introduction'] = 'Introduction';
 $string['latesubmissionsdesc'] = 'Allow submitting the work after the deadline';
 $string['latesubmissions'] = 'Late submissions';
index 3b7a7b0810455207fcb267429a59cdc7a69ec9b7..0ab7d0143d4b665a458f434f112ee61f91ca9b4c 100644 (file)
 
 defined('MOODLE_INTERNAL') || die();
 
-/**
- * The internal codes of the anonymity levels
- */
-define('WORKSHOP_ANONYMITY_NONE',       0);     /* not anonymous */
-define('WORKSHOP_ANONYMITY_AUTHORS',    1);     /* authors hidden from reviewers */
-define('WORKSHOP_ANONYMITY_REVIEWERS',  2);     /* reviewers hidden from authors */
-define('WORKSHOP_ANONYMITY_BOTH',       3);     /* fully anonymous */
-
-
 /**
  * The internal codes of the example assessment modes
  */
@@ -349,19 +340,20 @@ function workshop_get_strategies() {
 
 
 /**
- * Return an array of available anonymity modes
- *
- * @return array Array 'anonymity DB code'=>'anonymity mode name'
+ * Return an array of the localized allocation names
+ * 
+ * @access public
+ * @return array Array ['string' => 'string']
  */
-function workshop_get_anonymity_modes() {
-    
-    $modes = array();
-    $modes[WORKSHOP_ANONYMITY_NONE]      = get_string('anonymitynone', 'workshop');
-    $modes[WORKSHOP_ANONYMITY_AUTHORS]   = get_string('anonymityauthors', 'workshop');
-    $modes[WORKSHOP_ANONYMITY_REVIEWERS] = get_string('anonymityreviewers', 'workshop');
-    $modes[WORKSHOP_ANONYMITY_BOTH]      = get_string('anonymityboth', 'workshop');
+function workshop_get_allocations() {
 
-    return $modes;
+    $installed = get_list_of_plugins('mod/workshop/allocation');
+    $forms = array();
+    foreach ($installed as $allocation) {
+        $forms[$allocation] = get_string('allocation' . $allocation, 'workshop');
+    }
+
+    return $forms;
 }
 
 
index 0c18937a69573e90cb4894fc26a18498c971315f..8ead07b0b8afa9352a7447f499985bc3ceca9bef 100644 (file)
@@ -125,13 +125,6 @@ class mod_workshop_mod_form extends moodleform_mod {
 /// Assessment settings
         $mform->addElement('header', 'assessmentsettings', get_string('assessmentsettings', 'workshop'));
 
-        $options = workshop_get_anonymity_modes();
-        $label = get_string('anonymity', 'workshop');
-        $mform->addElement('select', 'anonymity', $label, $options);
-        $mform->setDefault('anonymity', $workshopconfig->anonymity);
-        $mform->setHelpButton('anonymity', array('anonymity', $label, 'workshop'));
-        $mform->disabledIf('anonymity', 'usepeerassessment');
-
         $label = get_string('nsassessments', 'workshop');
         $options = workshop_get_numbers_of_assessments();
         $mform->addElement('select', 'nsassessments', $label, $options);
@@ -172,12 +165,6 @@ class mod_workshop_mod_form extends moodleform_mod {
         $mform->setHelpButton('agreeassessments', array('agreeassessments', $label, 'workshop'));
         $mform->setAdvanced('agreeassessments');
 
-        $label = get_string('hidegrades', 'workshop');
-        $text = get_string('hidegradesdesc', 'workshop');
-        $mform->addElement('advcheckbox', 'hidegrades', $label, $text);
-        $mform->setHelpButton('hidegrades', array('hidegrades', $label, 'workshop'));
-        $mform->setAdvanced('hidegrades');
-
         $label = get_string('assessmentcomps', 'workshop');
         $levels = array();
         foreach (workshop_get_comparison_levels() as $code => $level) {
index 7a6f127cb6e370e40fc69a47e8247379fcafa832..8f1412234ff6c86e275aac98575be41b4a6f1d3d 100644 (file)
@@ -46,10 +46,6 @@ $settings->add(new admin_setting_configselect('workshop/maxbytes', get_string('m
 $settings->add(new admin_setting_configselect('workshop/strategy', get_string('strategy', 'workshop'),
                     get_string('configstrategy', 'workshop'), 'accumulative', workshop_get_strategies()));
 
-$options = workshop_get_anonymity_modes();
-$settings->add(new admin_setting_configselect('workshop/anonymity', get_string('anonymity', 'workshop'),
-                    get_string('configanonymity', 'workshop'), WORKSHOP_ANONYMITY_NONE, $options));
-
 $options = workshop_get_numbers_of_assessments();
 $settings->add(new admin_setting_configselect('workshop/nsassessments', get_string('nsassessments', 'workshop'),
                     get_string('confignsassessments', 'workshop'), 3, $options));