New quiz option addded: decimalpoints

(used to decide the number of decimals showed in grades)
This commit is contained in:
stronk7
2005-02-14 18:24:24 +00:00
parent b20dfc6e14
commit 72036f9305
6 changed files with 12 additions and 1 deletions
+4
View File
@@ -310,6 +310,10 @@ function quiz_upgrade($oldversion) {
table_column('quiz_grades', 'grade', 'grade', 'real', 2, '');
}
if ($oldversion < 2005021400) {
table_column("quiz", "", "decimalpoints", "integer", "4", "", "2", "not null", "grademethod");
}
return true;
}
+1
View File
@@ -25,6 +25,7 @@ CREATE TABLE `prefix_quiz` (
`feedback` tinyint(4) NOT NULL default '0',
`correctanswers` tinyint(4) NOT NULL default '1',
`grademethod` tinyint(4) NOT NULL default '1',
`decimalpoints` tinyint(4) NOT NULL default '2',
`review` tinyint(4) NOT NULL default '0',
`questionsperpage` int(10) NOT NULL default '0',
`shufflequestions` tinyint(4) NOT NULL default '0',
+1
View File
@@ -21,6 +21,7 @@ CREATE TABLE prefix_quiz (
feedback number(4) default '0' not null,
correctanswers number(4) default '1' not null,
grademethod number(4) default '1' not null,
decimalpoints number(4) default '2' not null,
review number(4) default '0' not null,
shufflequestions number(4) default '0' not null,
shuffleanswers number(4) default '0' not null,
+4
View File
@@ -295,6 +295,10 @@ function quiz_upgrade($oldversion) {
table_column('quiz_grades', 'grade', 'grade', 'real', 2, '');
}
if ($oldversion < 2005021400) {
table_column("quiz", "", "decimalpoints", "integer", "4", "", "2", "not null", "grademethod");
}
return true;
}
+1
View File
@@ -25,6 +25,7 @@ CREATE TABLE prefix_quiz (
feedback integer NOT NULL default '0',
correctanswers integer NOT NULL default '1',
grademethod integer NOT NULL default '1',
decimalpoints integer NOT NULL default '2',
review integer NOT NULL default '0',
questionsperpage integer NOT NULL default '0',
shufflequestions integer NOT NULL default '0',
+1 -1
View File
@@ -5,7 +5,7 @@
// This fragment is called by moodle_needs_upgrading() and /admin/index.php
////////////////////////////////////////////////////////////////////////////////
$module->version = 2005012700; // The (date) version of this module
$module->version = 2005021400; // The (date) version of this module
$module->requires = 2005010100; // Requires this Moodle version
$module->cron = 0; // How often should cron check this module (seconds)?