Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-7932 workshop 1.x allows empty generalcomment and teachercomment

  • Loading branch information...
commit 4c26a3a86595fdbdaf3951f3b4c134f175584544 1 parent c5c1cd3
@mudrd8mz mudrd8mz authored
Showing with 7 additions and 5 deletions.
  1. +5 −5 mod/workshop/db/install.xml
  2. +2 −0  mod/workshop/locallib.php
View
10 mod/workshop/db/install.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="mod/workshop/db" VERSION="20070206" COMMENT="XMLDB file for Moodle mod/workshop"
+<XMLDB PATH="mod/workshop/db" VERSION="20091029" COMMENT="XMLDB file for Moodle mod/workshop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
@@ -40,7 +40,7 @@
<FIELD NAME="password" TYPE="char" LENGTH="32" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="usepassword"/>
</FIELDS>
<KEYS>
- <KEY NAME="primary" TYPE="primary" FIELDS="id" />
+ <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="course" UNIQUE="false" FIELDS="course"/>
@@ -114,8 +114,8 @@
<FIELD NAME="mailed" TYPE="int" LENGTH="3" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="teachergraded" NEXT="resubmission"/>
<FIELD NAME="resubmission" TYPE="int" LENGTH="3" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="mailed" NEXT="donotuse"/>
<FIELD NAME="donotuse" TYPE="int" LENGTH="3" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="resubmission" NEXT="generalcomment"/>
- <FIELD NAME="generalcomment" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="donotuse" NEXT="teachercomment"/>
- <FIELD NAME="teachercomment" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="generalcomment"/>
+ <FIELD NAME="generalcomment" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="donotuse" NEXT="teachercomment"/>
+ <FIELD NAME="teachercomment" TYPE="text" LENGTH="small" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="generalcomment"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="workshopid"/>
@@ -189,4 +189,4 @@
</SENTENCES>
</STATEMENT>
</STATEMENTS>
-</XMLDB>
+</XMLDB>
View
2  mod/workshop/locallib.php
@@ -1651,6 +1651,8 @@ function workshop_list_teacher_submissions($workshop, $user) {
$assessment->userid = $user->id;
$assessment->grade = -1; // set impossible grade
$assessment->timecreated = $yearfromnow;
+ $assessment->generalcomment = '';
+ $assessment->teachercomment = '';
if (!$assessment->id = insert_record("workshop_assessments", $assessment)) {
error("Could not insert workshop assessment!");
}
Please sign in to comment.
Something went wrong with that request. Please try again.