Removing remaining references to RQP in core code. I had not realised there were so many.

This commit is contained in:
tjhunt 2007-05-24 17:25:37 +00:00
parent 98518b6221
commit 6e9debfbf1
5 changed files with 13 additions and 57 deletions

View File

@ -52,7 +52,6 @@
<li><a href="help.php?module=quiz&amp;file=responsesdownload.html">Responses Download</a></li>
<li><a href="help.php?module=quiz&amp;file=responsesoptions.html">Responses Options</a></li>
<li><a href="help.php?module=quiz&amp;file=review2.html">Allow review</a></li>
<li><a href="help.php?module=quiz&amp;file=rqp.html">Remote Questions (RQP)</a></li>
<li><a href="help.php?module=quiz&amp;file=shortanswer.html">Short Answer questions</a></li>
<li><a href="help.php?module=quiz&amp;file=shuffleanswers.html">Shuffle answers</a></li>
<li><a href="help.php?module=quiz&amp;file=shufflequestions.html">Shuffle questions</a></li>

View File

@ -48,7 +48,6 @@ define("DESCRIPTION", "description");
define("NUMERICAL", "numerical");
define("MULTIANSWER", "multianswer");
define("CALCULATED", "calculated");
define("RQP", "rqp");
define("ESSAY", "essay");
/**#@-*/

View File

@ -30,12 +30,12 @@
// (CL,pk->id,fk->category,files) |
// | question_dataset_items
// | (CL,pk->id,fk->definition)
// | question_rqp_type
// | (SL,pk->id)
// | |
// -------------------------------------------------------------------------------------------------------------- |
// | | | | | | | question_rqp
// | | | | | | |--(CL,pk->id,fk->question)
// |
// |
// |
// --------------------------------------------------------------------------------------------------------------
// | | | | | | |
// | | | | | | |
// | | | | question_calculated | |
// question_truefalse | question_multichoice | (CL,pl->id,fk->question) | |
// (CL,pk->id,fk->question) | (CL,pk->id,fk->question) | . | | question_randomsamatch
@ -64,9 +64,6 @@
// .
// question_states
// (UL,pk->id,fk->attempt,question)
// |
// question_rqp_states
// (UL,pk->id,fk->stateid)
//
// Meaning: pk->primary key field of the table
// fk->foreign key to link with parent
@ -322,8 +319,6 @@
fwrite ($bf,full_tag("GRADE",$level + 2,false,$state->grade));
fwrite ($bf,full_tag("RAW_GRADE",$level + 2,false,$state->raw_grade));
fwrite ($bf,full_tag("PENALTY",$level + 2,false,$state->penalty));
// now back up question type specific state information
$status = backup_question_rqp_state ($bf,$preferences,$state->id, $level + 2);
//End state
$status = fwrite ($bf,end_tag("STATE",$level + 1,true));
}
@ -363,28 +358,6 @@
return $status;
}
//Backup question_rqp_state contents (executed from backup_question_states)
function backup_question_rqp_state ($bf,$preferences,$state, $level = 8) {
global $CFG;
$status = true;
$rqp_state = get_record("question_rqp_states","stateid",$state);
//If there is a state
if ($rqp_state) {
//Write start tag
$status = fwrite ($bf,start_tag("RQP_STATE",$level,true));
//Print state contents
fwrite ($bf,full_tag("RESPONSES",$level + 1,false,$rqp_state->responses));
fwrite ($bf,full_tag("PERSISTENT_DATA",$level + 1,false,$rqp_state->persistent_data));
fwrite ($bf,full_tag("TEMPLATE_VARS",$level + 1,false,$rqp_state->template_vars));
//Write end tag
$status = fwrite ($bf,end_tag("RQP_STATE",$level,true));
}
return $status;
}
//Returns an array of categories id
function question_category_ids_by_backup ($backup_unique_code) {

View File

@ -38,12 +38,12 @@
// (CL,pk->id,fk->category,files) |
// | question_dataset_items
// | (CL,pk->id,fk->definition)
// | question_rqp_type
// | (SL,pk->id)
// | |
// -------------------------------------------------------------------------------------------------------------- |
// | | | | | | | question_rqp
// | | | | | | |--(CL,pk->id,fk->question)
// |
// |
// |
// --------------------------------------------------------------------------------------------------------------
// | | | | | | |
// | | | | | | |
// | | | | question_calculated | |
// question_truefalse | question_multichoice | (CL,pl->id,fk->question) | |
// (CL,pk->id,fk->question) | (CL,pk->id,fk->question) | . | | question_randomsamatch
@ -72,9 +72,6 @@
// .
// question_states
// (UL,pk->id,fk->attempt,question)
// |
// question_rqp_states
// (UL,pk->id,fk->stateid)
//
// Meaning: pk->primary key field of the table
// fk->foreign key to link with parent
@ -678,11 +675,7 @@
if ($newid) {
//We have the newid, update backup_ids
backup_putid($restore->backup_unique_code,"question_states",$oldid,
$newid);
//Now process question type specific state information
$qtype = get_field('question', 'qtype', 'id', $state->question);
$status = $QTYPES[$qtype]->restore_state($newid,$res_info,$restore);
backup_putid($restore->backup_unique_code, 'question_states', $oldid, $newid);
} else {
$status = false;
}

View File

@ -1381,13 +1381,5 @@ class default_questiontype {
// There is nothing to decode
return $state->answer;
}
//This function restores the question_rqp_states
function restore_state($state_id,$info,$restore) {
// The default question type does not keep its own state information
return true;
}
}
?>