Browse Source

merge and change name of swapAnswerType() to swapSimpleAnswerTypes() and update comment - refs #7485

Imanol Losada 10 years ago
parent
commit
887193e3f6
2 changed files with 4 additions and 4 deletions
  1. 1 1
      main/exercice/admin.php
  2. 3 3
      main/exercice/question.class.php

+ 1 - 1
main/exercice/admin.php

@@ -124,7 +124,7 @@ Event::delete_all_incomplete_attempts(
 $objExercise = isset($_SESSION['objExercise']) ? $_SESSION['objExercise'] : null;
 $objQuestion = isset($_SESSION['objQuestion']) ? $_SESSION['objQuestion'] : null;
 if (isset($_REQUEST['convertAnswer'])) {
-    $objQuestion = $objQuestion->swapAnswerTypes();
+    $objQuestion = $objQuestion->swapSimpleAnswerTypes();
     $_SESSION['objQuestion'] = $objQuestion;
 }
 $objAnswer   = isset($_SESSION['objAnswer']) ? $_SESSION['objAnswer'] : null;

+ 3 - 3
main/exercice/question.class.php

@@ -637,14 +637,14 @@ abstract class Question
     }
 
     /**
-    Sets the title
+     * Sets the title
      */
     public function setTitle($title) {
         $this->question = $title;
     }
 
     /**
-    Sets the title
+     * Sets extra info
      */
     public function setExtra($extra) {
         $this->extra = $extra;
@@ -1632,7 +1632,7 @@ abstract class Question
      * Swap between unique and multiple type answers
      * @return object
      */
-    function swapAnswerTypes()
+    function swapSimpleAnswerTypes()
     {
         $oppositeAnswers = array(
             UNIQUE_ANSWER => MULTIPLE_ANSWER,