MDL-37490 mod_assign: Add setting to show the due date on the course page.

This commit is contained in:
Gareth J Barnard 2013-04-19 13:41:51 +01:00
parent b3be471f52
commit ef8a6dfb33
9 changed files with 69 additions and 8 deletions

View file

@ -17,6 +17,7 @@
<FIELD NAME="sendnotifications" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Allows the disabling of email notifications in the assign module."/>
<FIELD NAME="sendlatenotifications" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Allows separate enabling of notifications for late assignment submissions."/>
<FIELD NAME="duedate" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="The due date for the assignment. Displayed to students."/>
<FIELD NAME="displayduedate" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="If true the due date will be displayed."/>
<FIELD NAME="allowsubmissionsfromdate" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="If set, submissions will only be accepted after this date."/>
<FIELD NAME="grade" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="The maximum grade for this assignment. Can be negative to indicate the use of a scale."/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="The time the settings for this assign module instance were last modified."/>

View file

@ -207,6 +207,17 @@ function xmldb_assign_upgrade($oldversion) {
// Moodle v2.4.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2012112902) {
// Define field displayduedate to be added to assign.
$table = new xmldb_table('assign');
$field = new xmldb_field('displayduedate', XMLDB_TYPE_INTEGER, '2', null, null, null, '0', 'duedate');
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
// Assign savepoint reached.
upgrade_mod_savepoint(true, 2012112902, 'assign');
}
if ($oldversion < 2013030600) {
upgrade_set_timeout(60*20);