From e2163016c8bb2c2eac35cdcec0a8841a0e6a4952 Mon Sep 17 00:00:00 2001 From: Isaac Flores Date: Mon, 18 May 2009 20:05:02 +0200 Subject: [PATCH] [svn r20795] minor - logic changes - replace COURSEMANAGER by COURSEMANAGERLOWSECURITY in test tool - (partial FS#3909) --- main/exercice/answer.class.php | 14 +++++++------- main/exercice/exercise.class.php | 6 +++--- main/exercice/exercise_result.php | 6 +++--- main/exercice/exercise_show.php | 6 +++--- main/exercice/question.class.php | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/main/exercice/answer.class.php b/main/exercice/answer.class.php index b4b526ce0f..c81cb5271b 100644 --- a/main/exercice/answer.class.php +++ b/main/exercice/answer.class.php @@ -23,7 +23,7 @@ * 5 arrays are created to receive the attributes of each answer belonging to a specified question * @package dokeos.exercise * @author Olivier Brouckaert -* @version $Id: answer.class.php 20776 2009-05-18 12:43:44Z pcool $ +* @version $Id: answer.class.php 20795 2009-05-18 18:05:02Z iflorespaz $ */ @@ -401,8 +401,8 @@ class Answer $questionId=$this->questionId; $sql = "UPDATE $TBL_REPONSES SET " . - "answer = '".Database::escape_string(Security::remove_XSS(api_html_entity_decode($answer),COURSEMANAGER))."', " . - "comment = '".Database::escape_string(Security::remove_XSS(api_html_entity_decode($comment),COURSEMANAGER))."', " . + "answer = '".Database::escape_string(Security::remove_XSS(api_html_entity_decode($answer),COURSEMANAGERLOWSECURITY))."', " . + "comment = '".Database::escape_string(Security::remove_XSS(api_html_entity_decode($comment),COURSEMANAGERLOWSECURITY))."', " . "ponderation = '".Database::escape_string($weighting)."', " . "position = '".Database::escape_string($position)."', " . "destination = '".Database::escape_string($destination)."' " . @@ -434,9 +434,9 @@ class Answer for($i=1;$i <= $this->new_nbrAnswers;$i++) { - $answer = Database::escape_string(Security::remove_XSS(api_html_entity_decode($this->new_answer[$i]),COURSEMANAGER)); + $answer = Database::escape_string(Security::remove_XSS(api_html_entity_decode($this->new_answer[$i]),COURSEMANAGERLOWSECURITY)); $correct = Database::escape_string($this->new_correct[$i]); - $comment = Database::escape_string(Security::remove_XSS(api_html_entity_decode($this->new_comment[$i]),COURSEMANAGER)); + $comment = Database::escape_string(Security::remove_XSS(api_html_entity_decode($this->new_comment[$i]),COURSEMANAGERLOWSECURITY)); $weighting = Database::escape_string($this->new_weighting[$i]); $position = Database::escape_string($this->new_position[$i]); $hotspot_coordinates = Database::escape_string($this->new_hotspot_coordinates[$i]); @@ -484,9 +484,9 @@ class Answer for($i=1;$i <= $this->nbrAnswers;$i++) { - $answer = Database::escape_string(Security::remove_XSS(api_html_entity_decode($this->answer[$i]),COURSEMANAGER)); + $answer = Database::escape_string(Security::remove_XSS(api_html_entity_decode($this->answer[$i]),COURSEMANAGERLOWSECURITY)); $correct = Database::escape_string($this->correct[$i]); - $comment = Database::escape_string(Security::remove_XSS(api_html_entity_decode($this->comment[$i]),COURSEMANAGER)); + $comment = Database::escape_string(Security::remove_XSS(api_html_entity_decode($this->comment[$i]),COURSEMANAGERLOWSECURITY)); $weighting = Database::escape_string($this->weighting[$i]); $position = Database::escape_string($this->position[$i]); $hotspot_coordinates = Database::escape_string($this->hotspot_coordinates[$i]); diff --git a/main/exercice/exercise.class.php b/main/exercice/exercise.class.php index 36f5483527..1134af505f 100644 --- a/main/exercice/exercise.class.php +++ b/main/exercice/exercise.class.php @@ -25,7 +25,7 @@ * Exercise class: This class allows to instantiate an object of type Exercise * @package dokeos.exercise * @author Olivier Brouckaert -* @version $Id: exercise.class.php 20788 2009-05-18 16:18:01Z iflorespaz $ +* @version $Id: exercise.class.php 20795 2009-05-18 18:05:02Z iflorespaz $ */ @@ -540,7 +540,7 @@ class Exercise if($id) { /* title='".Database::escape_string(Security::remove_XSS($exercise))."', - description='".Database::escape_string(Security::remove_XSS(api_html_entity_decode($description),COURSEMANAGER))."'"; + description='".Database::escape_string(Security::remove_XSS(api_html_entity_decode($description),COURSEMANAGERLOWSECURITY))."'"; */ $sql="UPDATE $TBL_EXERCICES SET title='".Database::escape_string($exercise)."', @@ -578,7 +578,7 @@ class Exercise } else { //is anonymous user $cond1=Database::escape_string(Security::remove_XSS($exercise)); - $cond2=Database::escape_string(Security::remove_XSS(api_html_entity_decode($description),COURSEMANAGER)); + $cond2=Database::escape_string(Security::remove_XSS(api_html_entity_decode($description),COURSEMANAGERLOWSECURITY)); }*/ $sql="INSERT INTO $TBL_EXERCICES(start_time,end_time,title,description,sound,type,random,active, results_disabled, max_attempt,feedback_type) VALUES( diff --git a/main/exercice/exercise_result.php b/main/exercice/exercise_result.php index 135785eeed..9a97277349 100644 --- a/main/exercice/exercise_result.php +++ b/main/exercice/exercise_result.php @@ -29,7 +29,7 @@ * @author Olivier Brouckaert, main author * @author Roan Embrechts, some refactoring * @author Julio Montoya Armas switchable fill in blank option added -* @version $Id: exercise_result.php 20776 2009-05-18 12:43:44Z pcool $ +* @version $Id: exercise_result.php 20795 2009-05-18 18:05:02Z iflorespaz $ * * @todo split more code up in functions, move functions to library? */ @@ -370,7 +370,7 @@ function display_fill_in_blanks_answer($answer) ?> - + - + diff --git a/main/exercice/exercise_show.php b/main/exercice/exercise_show.php index 2350c7abb0..10477b38df 100644 --- a/main/exercice/exercise_show.php +++ b/main/exercice/exercise_show.php @@ -4,7 +4,7 @@ * * @package dokeos.exercise * @author Julio Montoya Armas Added switchable fill in blank option added -* @version $Id: exercise_show.php 20776 2009-05-18 12:43:44Z pcool $ +* @version $Id: exercise_show.php 20795 2009-05-18 18:05:02Z iflorespaz $ * * @todo remove the debug code and use the general debug library * @todo use the Database:: functions @@ -263,7 +263,7 @@ function display_fill_in_blanks_answer($answer,$id,$questionId) ?> - + @@ -286,7 +286,7 @@ function display_free_answer($answer,$id,$questionId) { ?> - +