mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
These are no longer needed because the backup functions are part of the questiontype classes now.
This commit is contained in:
parent
9ec656750e
commit
5c2447494d
@ -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;
|
||||
}
|
||||
?>
|
@ -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;
|
||||
}
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user