Permalink
Browse files

Changed "eachattemptbuildsonthelast" column name to

"attemptonlast". Seems to work.
  • Loading branch information...
1 parent 533af80 commit d6478d4f820c56b6be34fc8f8989b18d471bc0f7 stronk7 committed Aug 4, 2003
Showing with 10 additions and 6 deletions.
  1. +1 −1 mod/quiz/attempt.php
  2. +4 −0 mod/quiz/db/mysql.php
  3. +1 −1 mod/quiz/db/mysql.sql
  4. +4 −4 mod/quiz/mod.html
View
@@ -193,7 +193,7 @@
$result = NULL; // Default
$questions = NULL; // Default
- if ($quiz->eachattemptbuildsonthelast) {
+ if ($quiz->attemptonlast) {
$latestfinishedattempt->attempt = 0;
foreach ($attempts as $attempt) {
if ($attempt->timefinish
View
@@ -126,6 +126,10 @@ function quiz_upgrade($oldversion) {
execute_sql(" ALTER TABLE {$CFG->prefix}quiz ADD eachattemptbuildsonthelast TINYINT(4) DEFAULT '0' NOT NULL AFTER `attempts` ");
}
+ if ($oldversion < 2003080400) {
+ table_column("quiz", "eachattemptbuildsonthelast", "attemptonlast", "TINYINT", "4", "UNSIGNED", "0", "NOT NULL", "");
+ }
+
return true;
}
View
@@ -21,7 +21,7 @@ CREATE TABLE `prefix_quiz` (
`timeopen` int(10) unsigned NOT NULL default '0',
`timeclose` int(10) unsigned NOT NULL default '0',
`attempts` smallint(6) NOT NULL default '0',
- `eachattemptbuildsonthelast` tinyint(4) NOT NULL default '0',
+ `attemptonlast` tinyint(4) NOT NULL default '0',
`feedback` tinyint(4) NOT NULL default '0',
`correctanswers` tinyint(4) NOT NULL default '1',
`grademethod` tinyint(4) NOT NULL default '1',
View
@@ -19,8 +19,8 @@
if (!isset($form->attempts)) {
$form->attempts = 0;
}
- if (!isset($form->eachattemptbuildsonthelast)) {
- $form->eachattemptbuildsonthelast = 0;
+ if (!isset($form->attemptonlast)) {
+ $form->attemptonlast = 0;
}
if (!isset($form->grademethod)) {
$form->grademethod = "";
@@ -140,8 +140,8 @@
$options = array();
$options[0] = get_string("no");
$options[1] = get_string("yes");
- choose_from_menu($options, "eachattemptbuildsonthelast",
- "$form->eachattemptbuildsonthelast", "");
+ choose_from_menu($options, "attemptonlast",
+ "$form->attemptonlast", "");
helpbutton("eachattemptbuildsonthelast",
get_string("eachattemptbuildsonthelast", "quiz"),
"quiz");

0 comments on commit d6478d4

Please sign in to comment.