mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Changed "eachattemptbuildsonthelast" column name to
"attemptonlast". Seems to work.
This commit is contained in:
parent
533af805b8
commit
d6478d4f82
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user