backup_quiz_questions_version()

backup_quiz_questions_version()

by Herbert Keijers -
Number of replies: 4
I updated an 1.4.x test moodle to 1.5 dev. (using cvs update -dPA)
Cron used to work but failed now backing up courses.
An "manual" ../backup/try.php gives apache error:
"cannot redeclare backup_quiz_questions_version() in ../mod/quiz/backuplib.php in line 682"
Any thoughts ... ?
Average of ratings: -
In reply to Herbert Keijers

Re: backup_quiz_questions_version()

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Herbert,

just these days we are working intensively with quizzes backup/restore so it's going to be unstable (in fact, restore of quizzes is disabled just now).

About your error, I think you aren't using the latest version of the file because I cannot see anything related to that error in line 682. The latest available version should be:
//$Id: backuplib.php,v 1.25 2005/05/08 15:11:31 gustav_delius Exp $


An, finally, Such try.php script....uhm, once more, I think we should remove it. It's really an old-development reminiscence and, although it's simply a wrapper to scheduled backups I'm not pretty sure if it's correct to have it there...

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: backup_quiz_questions_version()

by Herbert Keijers -
Eloy, yes I was still using v 1.23

Upgraded, but I think there is a typo. Got message:

quiz module needs upgrading


(mysql): ALTER TABLE mdl_quiz_questions ADD penalty float DEFAULT '0.1' not null AFTER `defaultgrade`  
1060: Duplicate column name 'penalty'

Fout


(mysql): ALTER TABLE mdl_quiz_newest_states CHANGE new newest INTEGER(10) unsigned DEFAULT '0' not null 



Have no time at this moment to investigate ...
In reply to Herbert Keijers

Re: backup_quiz_questions_version()

by Herbert Keijers -
Weird error ...
Can't find any duplication of penalty in ../quiz/db

Anyway, backup is working as sheduled.
In reply to Herbert Keijers

Re: backup_quiz_questions_version()

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Uhm,

it seems that some of your CVS updates was incorrect (unfinished?) and you finished with a strange mix of files belonging to different daily versions....

If such error was the unique one, and now you are 100% updated, I think that you can safely ignore it (because such DB field exists in your server).

If you got other errors, then, uhmmm, perhaps your DB can have some inconsistencies... sad

Ciao smile