浏览代码

Added fields editingbehavior and submissionbehavior to iassign_ilm

Igor 3 年之前
父节点
当前提交
1e85833e81
共有 3 个文件被更改,包括 17 次插入2 次删除
  1. 3 1
      db/install.xml
  2. 13 0
      db/upgrade.php
  3. 1 1
      version.php

+ 3 - 1
db/install.xml

@@ -20,7 +20,9 @@
         <FIELD NAME="author"         TYPE="int"  LENGTH="10"     NOTNULL="true" UNSIGNED="true" SEQUENCE="false" DEFAULT="0"   ENUM="false" COMMENT="id of the author of the iLM"             PREVIOUS="timemodified" NEXT="timecreated"/>
         <FIELD NAME="timecreated"    TYPE="int"  LENGTH="10"     NOTNULL="true" UNSIGNED="true" SEQUENCE="false" DEFAULT="0"   ENUM="false" COMMENT="Date of registration of iLM"             PREVIOUS="author"       NEXT="evaluate"/>
         <FIELD NAME="evaluate"       TYPE="int"  LENGTH="1"                     UNSIGNED="true" SEQUENCE="false" DEFAULT="0"   ENUM="false" COMMENT="iLM has automatic evaluator? 0-no/1-yes" PREVIOUS="timecreated"  NEXT="reevaluate"/>
-        <FIELD NAME="reevaluate"     TYPE="int"  LENGTH="1"      NOTNULL="true" UNSIGNED="true" SEQUENCE="false" DEFAULT="0"   ENUM="false" COMMENT="iLM has automatic reevaluator? 0-no/1-yes" PREVIOUS="timecreated"/>
+        <FIELD NAME="reevaluate"     TYPE="int"  LENGTH="1"      NOTNULL="true" UNSIGNED="true" SEQUENCE="false" DEFAULT="0"   ENUM="false" COMMENT="iLM has automatic reevaluator? 0-no/1-yes" PREVIOUS="timecreated"  NEXT="editingbehavior" />
+        <FIELD NAME="editingbehavior"     TYPE="int"  LENGTH="10"      NOTNULL="true" UNSIGNED="true" SEQUENCE="false" DEFAULT="0"   ENUM="false" COMMENT="Activity editing behavior" PREVIOUS="reevaluate"  NEXT="submissionbehavior" />
+        <FIELD NAME="submissionbehavior"     TYPE="int"  LENGTH="10"      NOTNULL="true" UNSIGNED="true" SEQUENCE="false" DEFAULT="0"   ENUM="false" COMMENT="Activity submission behavior" PREVIOUS="editingbehavior"/>
       </FIELDS>
       <KEYS>
         <KEY   NAME="primary"        TYPE="primary" FIELDS="id"/>

+ 13 - 0
db/upgrade.php

@@ -359,6 +359,19 @@ function xmldb_iassign_upgrade ($oldversion) {
       if (!$dbman->table_exists($table)) {
           $dbman->create_table($table);
       }
+
+      // Adding fields to table iassign_ilm.
+      $table = new xmldb_table('iassign_ilm');
+
+      $field_editingbehavior = new xmldb_field('editingbehavior', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', null);
+
+      if (!$dbman->field_exists($table, $field_editingbehavior))
+        $dbman->add_field($table, $field_editingbehavior);
+
+      $field_submissionbehavior = new xmldb_field('submissionbehavior', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', null);
+
+      if (!$dbman->field_exists($table, $field_submissionbehavior))
+        $dbman->add_field($table, $field_submissionbehavior);
       
     }
 

+ 1 - 1
version.php

@@ -90,7 +90,7 @@ defined('MOODLE_INTERNAL') || die();
 // v 1.0 2012/10/16
 $plugin->component = 'mod_iassign';  // Full name of the plugin (used for diagnostics)
 $plugin->release = '2.8.01 (Build: 2020080300)'; // Human-readable version name
-$plugin->version = 2020102901;       // The current module version (Date: YYYYMMDDXX)
+$plugin->version = 2020102904;       // The current module version (Date: YYYYMMDDXX)
 $plugin->requires = 2014021100;      // Requires this Moodle version since 3.0.0)
 $plugin->maturity = MATURITY_STABLE; // How stable the plugin is: MATURITY_ALPHA, MATURITY_BETA, MATURITY_RC, MATURITY_STABLE (Moodle 2.0 and above)
 $plugin->cron = 60;