]> git.mjollnir.org Git - moodle.git/commitdiff
Removing remaining references to RQP in core code. I had not realised there were...
authortjhunt <tjhunt>
Thu, 24 May 2007 17:25:37 +0000 (17:25 +0000)
committertjhunt <tjhunt>
Thu, 24 May 2007 17:25:37 +0000 (17:25 +0000)
lang/en_utf8/help/quiz/index.html
lib/questionlib.php
question/backuplib.php
question/restorelib.php
question/type/questiontype.php

index e0971b54643e9cde704bb51b48fdcb05d7f5cd97..975ac0faa66d6740863377e65932c712a8e2e776 100644 (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>
index ebd60fd906b57832a378df5e50e02eb0ea83c3cb..dffa7ea76c658869c3e55ee8e0f5b2bd2106481b 100644 (file)
@@ -48,7 +48,6 @@ define("DESCRIPTION",   "description");
 define("NUMERICAL",     "numerical");
 define("MULTIANSWER",   "multianswer");
 define("CALCULATED",    "calculated");
-define("RQP",           "rqp");
 define("ESSAY",         "essay");
 /**#@-*/
 
index 51a49dbd85ac4f4fab047db832bd61b40710763d..3637f944f27dadc6723b0410a3cd6aeaaff6369b 100644 (file)
     //        (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
                 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));
             }
         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) {
 
index 23a80b188303de61f1bcdca2da862038000e9140..2c00b47e184f86f5ac6c8dd5638327bdb93aadb2 100644 (file)
     //        (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
 
             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;
             }
index 2c2fa6218e5ec4ada0c3dde3d3e0d309c868c0b5..9cbf081f074389ac4fa08dec786b6080dc64539a 100644 (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;
-    }
-
 }
-
 ?>