Skip to content

Commit

Permalink
Removed anonymity and hidegrades
Browse files Browse the repository at this point in the history
These will be controlled by capabilities, as suggested by Eloy.
  • Loading branch information
mudrd8mz committed Jan 4, 2010
1 parent 0968b1a commit 7a02d1f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 54 deletions.
12 changes: 5 additions & 7 deletions mod/workshop/db/install.xml
Original file line number Diff line number Diff line change
@@ -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"
>
Expand All @@ -21,16 +21,14 @@
<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"/>
Expand Down
11 changes: 1 addition & 10 deletions mod/workshop/lang/en_utf8/workshop.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,13 @@
$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';
Expand Down Expand Up @@ -104,8 +97,6 @@
$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';
Expand Down
32 changes: 12 additions & 20 deletions mod/workshop/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@

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
*/
Expand Down Expand Up @@ -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;
}


Expand Down
13 changes: 0 additions & 13 deletions mod/workshop/mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,6 @@ function definition() {
/// 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);
Expand Down Expand Up @@ -172,12 +165,6 @@ function definition() {
$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) {
Expand Down
4 changes: 0 additions & 4 deletions mod/workshop/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
$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));
Expand Down

0 comments on commit 7a02d1f

Please sign in to comment.