Sfoglia il codice sorgente

Added field store_all_submissions to iassign_statement

Igor 3 anni fa
parent
commit
1cec9110ba
3 ha cambiato i file con 11 aggiunte e 2 eliminazioni
  1. 2 1
      db/install.xml
  2. 8 0
      db/upgrade.php
  3. 1 1
      version.php

+ 2 - 1
db/install.xml

@@ -116,7 +116,8 @@
         <FIELD NAME="max_experiment"           TYPE="int"  LENGTH="10"     NOTNULL="true"  UNSIGNED="true"  DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="Maximum number of attempts. 0 - unlimited"                        PREVIOUS="visible"              NEXT="dependency"/>
         <FIELD NAME="dependency"               TYPE="char" LENGTH="255"    NOTNULL="true"  UNSIGNED="true"  DEFAULT="0" SEQUENCE="false" ENUM="false" COMMENT="List the activities that this activity depends. 0 - independent"  PREVIOUS="max_experiment"       NEXT="automatic_evaluate"/>
         <FIELD NAME="automatic_evaluate"       TYPE="int"  LENGTH="1"      NOTNULL="false" UNSIGNED="true"  DEFAULT="1" SEQUENCE="false" ENUM="false" COMMENT="Using automatic evaluation activity?0 - no / 1 - yes"             PREVIOUS="dependency"           NEXT="show_answer"/>
-        <FIELD NAME="show_answer"              TYPE="int"  LENGTH="1"      NOTNULL="false" UNSIGNED="true"  DEFAULT="1" SEQUENCE="false" ENUM="false" COMMENT="Show automatic evaluation results to students? 0 - no / 1 - yes"  PREVIOUS="automatic_evaluate"/>
+        <FIELD NAME="show_answer"              TYPE="int"  LENGTH="1"      NOTNULL="false" UNSIGNED="true"  DEFAULT="1" SEQUENCE="false" ENUM="false" COMMENT="Show automatic evaluation results to students? 0 - no / 1 - yes"  PREVIOUS="automatic_evaluate" NEXT="store_all_submissions"/>
+        <FIELD NAME="store_all_submissions"            TYPE="int"  LENGTH="10"     NOTNULL="true"  UNSIGNED="true"   DEFAULT="0"  SEQUENCE="false" ENUM="false" COMMENT="If all submissions must be stored" PREVIOUS="show_answer" />
       </FIELDS>
       <KEYS>
         <KEY NAME="primary"       TYPE="primary" FIELDS="id" NEXT="iassignid"/>

+ 8 - 0
db/upgrade.php

@@ -373,6 +373,14 @@ function xmldb_iassign_upgrade ($oldversion) {
       if (!$dbman->field_exists($table, $field_submissionbehavior))
         $dbman->add_field($table, $field_submissionbehavior);
       
+      // Adding field to table iassign_statement:
+      $table = new xmldb_table('iassign_statement');
+
+      $field_store_all_submissions = new xmldb_field('store_all_submissions', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', null);
+
+      if (!$dbman->field_exists($table, $field_store_all_submissions))
+        $dbman->add_field($table, $field_store_all_submissions);
+
     }
 
   // log event -----------------------------------------------------

+ 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 = 2020102904;       // The current module version (Date: YYYYMMDDXX)
+$plugin->version = 2020102905;       // 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;