MDL-60820 workshop: Fix default value of submissiontypefile
authorDavid Mudrák <david@moodle.com>
Wed, 5 Sep 2018 09:20:54 +0000 (11:20 +0200)
committerDavid Mudrák <david@moodle.com>
Wed, 5 Sep 2018 09:29:53 +0000 (11:29 +0200)
mod/workshop/classes/external/workshop_summary_exporter.php
mod/workshop/db/upgrade.php

index 0b2de7f..d7a8332 100644 (file)
@@ -154,7 +154,7 @@ class workshop_summary_exporter extends exporter {
             ),
             'submissiontypefile' => array (
                 'type' => PARAM_INT,
-                'default' => 2,
+                'default' => 1,
                 'description' => 'Indicates whether a file upload is required as part of each submission. ' .
                         '0 for no, 1 for optional, 2 for required.',
                 'optional' => true
index 0019f2b..91dbde6 100644 (file)
@@ -79,7 +79,7 @@ function xmldb_workshop_upgrade($oldversion) {
             $dbman->add_field($table, $field);
         }
 
-        $field = new xmldb_field('submissiontypefile', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '2',
+        $field = new xmldb_field('submissiontypefile', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '1',
                 'submissiontypetext');
 
         // Conditionally launch add field submissiontypefile.