Merge branch 'MDL-33778' of git://github.com/timhunt/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2012-06-19 00:54:39 +02:00
commit e165512d3a
3 changed files with 29 additions and 3 deletions

View File

@ -55,8 +55,8 @@
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" NEXT="quizstatisticsid"/>
<FIELD NAME="quizstatisticsid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" PREVIOUS="id" NEXT="questionid"/>
<FIELD NAME="questionid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" PREVIOUS="quizstatisticsid" NEXT="subqid"/>
<FIELD NAME="subqid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" PREVIOUS="questionid" NEXT="aid"/>
<FIELD NAME="aid" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" PREVIOUS="subqid" NEXT="response"/>
<FIELD NAME="subqid" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" PREVIOUS="questionid" NEXT="aid"/>
<FIELD NAME="aid" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" PREVIOUS="subqid" NEXT="response"/>
<FIELD NAME="response" TYPE="text" LENGTH="big" NOTNULL="false" SEQUENCE="false" PREVIOUS="aid" NEXT="rcount"/>
<FIELD NAME="rcount" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" PREVIOUS="response" NEXT="credit"/>
<FIELD NAME="credit" TYPE="number" LENGTH="15" NOTNULL="true" SEQUENCE="false" DECIMALS="5" PREVIOUS="rcount"/>

View File

@ -37,6 +37,32 @@ function xmldb_quiz_statistics_upgrade($oldversion) {
// Moodle v2.2.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2012061800) {
// Changing type of field subqid on table quiz_question_response_stats to char.
$table = new xmldb_table('quiz_question_response_stats');
$field = new xmldb_field('subqid', XMLDB_TYPE_CHAR, '100', null, XMLDB_NOTNULL, null, null, 'questionid');
// Launch change of type for field subqid.
$dbman->change_field_type($table, $field);
// Statistics savepoint reached.
upgrade_plugin_savepoint(true, 2012061800, 'quiz', 'statistics');
}
if ($oldversion < 2012061801) {
// Changing type of field aid on table quiz_question_response_stats to char.
$table = new xmldb_table('quiz_question_response_stats');
$field = new xmldb_field('aid', XMLDB_TYPE_CHAR, '100', null, null, null, null, 'subqid');
// Launch change of type for field aid.
$dbman->change_field_type($table, $field);
// Statistics savepoint reached.
upgrade_plugin_savepoint(true, 2012061801, 'quiz', 'statistics');
}
return true;
}

View File

@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2012061700;
$plugin->version = 2012061801;
$plugin->requires = 2012061700;
$plugin->cron = 18000;
$plugin->component = 'quiz_statistics';