MDL-49673 mod_assign: option to hide grader

This commit is contained in:
Alex Walker 2016-06-01 15:21:41 +01:00 committed by Dan Marsden
parent 33a388eff7
commit f14afd2936
9 changed files with 189 additions and 3 deletions

View file

@ -188,5 +188,15 @@ $capabilities = array(
'manager' => CAP_ALLOW
)
),
'mod/assign:showhiddengrader' => array(
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => array(
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),
);

View file

@ -28,6 +28,7 @@
<FIELD NAME="requireallteammemberssubmit" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="If enabled, a submission will not be accepted until all team members have submitted it."/>
<FIELD NAME="teamsubmissiongroupingid" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="A grouping id to get groups for team submissions"/>
<FIELD NAME="blindmarking" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Hide student/grader identities until the reveal identities action is performed"/>
<FIELD NAME="hidegrader" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Hide the grader's identity from students. The opposite of blind marking."/>
<FIELD NAME="revealidentities" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Show identities for a blind marking assignment"/>
<FIELD NAME="attemptreopenmethod" TYPE="char" LENGTH="10" NOTNULL="true" DEFAULT="none" SEQUENCE="false" COMMENT="How to determine when students are allowed to open a new submission. Valid options are none, manual, untilpass"/>
<FIELD NAME="maxattempts" TYPE="int" LENGTH="6" NOTNULL="true" DEFAULT="-1" SEQUENCE="false" COMMENT="What is the maximum number of student attempts allowed for this assignment? -1 means unlimited."/>

View file

@ -174,5 +174,19 @@ function xmldb_assign_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2018120500) {
// Define field hidegrader to be added to assign.
$table = new xmldb_table('assign');
$field = new xmldb_field('hidegrader', XMLDB_TYPE_INTEGER, '2', null,
XMLDB_NOTNULL, null, '0', 'blindmarking');
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Assignment savepoint reached.
upgrade_mod_savepoint(true, 2018120500, 'assign');
}
return true;
}