Permalink
Browse files

MDL-37602 Add feedbackauthorattachment field into the workshop_assess…

…ments table

This is a flag to quickly see if some files are expected to be attached
to the overall feedback for the submission author.
  • Loading branch information...
1 parent 1c6b484 commit 3ac58f227ad0521bc4969c990d65aa92c8e8e9b2 @mudrd8mz mudrd8mz committed Mar 25, 2013
Showing with 15 additions and 1 deletion.
  1. +1 −0 mod/workshop/db/install.xml
  2. +13 −0 mod/workshop/db/upgrade.php
  3. +1 −1 mod/workshop/version.php
@@ -88,6 +88,7 @@
<FIELD NAME="gradinggradeoverby" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="The id of the user who has overridden the grade for submission."/>
<FIELD NAME="feedbackauthor" TYPE="text" NOTNULL="false" SEQUENCE="false" COMMENT="The comment/feedback from the reviewer for the author."/>
<FIELD NAME="feedbackauthorformat" TYPE="int" LENGTH="3" NOTNULL="false" DEFAULT="0" SEQUENCE="false"/>
+ <FIELD NAME="feedbackauthorattachment" TYPE="int" LENGTH="3" NOTNULL="false" DEFAULT="0" SEQUENCE="false" COMMENT="Are there some files attached to the feedbackauthor field? Sets to 1 by file_postupdate_standard_filemanager()."/>
<FIELD NAME="feedbackreviewer" TYPE="text" NOTNULL="false" SEQUENCE="false" COMMENT="The comment/feedback from the teacher for the reviewer. For example the reason why the grade for assessment was overridden"/>
<FIELD NAME="feedbackreviewerformat" TYPE="int" LENGTH="3" NOTNULL="false" DEFAULT="0" SEQUENCE="false"/>
</FIELDS>
@@ -136,6 +136,19 @@ function xmldb_workshop_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2013032500, 'workshop');
}
+ /**
+ * Add feedbackauthorattachment field into the workshop_assessments table.
+ */
+ if ($oldversion < 2013032501) {
+ $table = new xmldb_table('workshop_assessments');
+ $field = new xmldb_field('feedbackauthorattachment', XMLDB_TYPE_INTEGER, '3', null, null, null, '0', 'feedbackauthorformat');
+ if (!$dbman->field_exists($table, $field)) {
+ $dbman->add_field($table, $field);
+ }
+
+ upgrade_mod_savepoint(true, 2013032501, 'workshop');
+ }
+
return true;
}
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
-$module->version = 2013032500; // the current module version (YYYYMMDDXX)
+$module->version = 2013032501; // the current module version (YYYYMMDDXX)
$module->requires = 2013012500; // requires this Moodle version
$module->component = 'mod_workshop'; // full name of the plugin (used for diagnostics)
$module->cron = 60; // give as a chance every minute

0 comments on commit 3ac58f2

Please sign in to comment.