These are no longer needed because the backup functions are part of the questiontype classes now.

This commit is contained in:
gustav_delius 2006-03-24 20:44:13 +00:00
parent 9ec656750e
commit 5c2447494d
2 changed files with 0 additions and 54 deletions

View File

@ -1,28 +0,0 @@
<?php
function multichoice_backup($bf,$preferences,$question,$level=6,$include_answers=true) {
global $CFG;
$status = true;
$multichoices = get_records("question_multichoice","question",$question,"id");
//If there are multichoices
if ($multichoices) {
//Iterate over each multichoice
foreach ($multichoices as $multichoice) {
$status = fwrite ($bf,start_tag("MULTICHOICE",$level,true));
//Print multichoice contents
fwrite ($bf,full_tag("LAYOUT",$level+1,false,$multichoice->layout));
fwrite ($bf,full_tag("ANSWERS",$level+1,false,$multichoice->answers));
fwrite ($bf,full_tag("SINGLE",$level+1,false,$multichoice->single));
fwrite ($bf,full_tag("SHUFFLEANSWERS",$level+1,false,$randomsamatch->shuffleanswers));
$status = fwrite ($bf,end_tag("MULTICHOICE",$level,true));
}
//Now print question_answers
if ($include_answers) {
$status = question_backup_answers($bf,$preferences,$question);
}
}
return $status;
}
?>

View File

@ -1,26 +0,0 @@
<?php
function shortanswer_backup($bf,$preferences,$question,$level=6,$include_answers=true) {
global $CFG;
$status = true;
$shortanswers = get_records("question_shortanswer","question",$question,"id");
//If there are shortanswers
if ($shortanswers) {
//Iterate over each shortanswer
foreach ($shortanswers as $shortanswer) {
$status = fwrite ($bf,start_tag("SHORTANSWER",$level,true));
//Print shortanswer contents
fwrite ($bf,full_tag("ANSWERS",$level+1,false,$shortanswer->answers));
fwrite ($bf,full_tag("USECASE",$level+1,false,$shortanswer->usecase));
$status = fwrite ($bf,end_tag("SHORTANSWER",$level,true));
}
//Now print question_answers
if ($include_answers) {
$status = question_backup_answers($bf,$preferences,$question);
}
}
return $status;
}
?>