Changed "eachattemptbuildsonthelast" column name to

"attemptonlast". Seems to work.
This commit is contained in:
stronk7 2003-08-04 10:31:12 +00:00
parent 533af805b8
commit d6478d4f82
4 changed files with 10 additions and 6 deletions

View File

@ -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 File

@ -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 File

@ -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 File

@ -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");