diff --git a/main/exercice/exercice.php b/main/exercice/exercice.php
index 90c48ea90d..a0bf9126ab 100644
--- a/main/exercice/exercice.php
+++ b/main/exercice/exercice.php
@@ -1,5 +1,5 @@
' . stripslashes($user_tags[$i]) . '';
+ $answer .= '' . $user_tags[$i] . '';
} else {
// adds a tabulation if no word has been typed by the student
$answer .= ' ';
@@ -461,12 +461,12 @@ if ($formSent) {
// increments total score
$totalScore += $answerWeighting[$i];
// adds the word in green at the end of the string
- $answer .= stripslashes($user_tags[$i]);
+ $answer .= $user_tags[$i];
}
elseif (!empty ($user_tags[$i])) {
// else if the word entered by the student IS NOT the same as the one defined by the professor
// adds the word in red at the end of the string, and strikes it
- $answer .= '' . stripslashes($user_tags[$i]) . '';
+ $answer .= '' . $user_tags[$i] . '';
} else {
// adds a tabulation if no word has been typed by the student
$answer .= ' ';
@@ -565,7 +565,7 @@ if ($formSent) {
if (preg_match_all('#([0-9a-z ]*)#', $val, $arr1)) {
$val = $arr1[1][0];
}
- $val = addslashes($val);
+ $val = $val;
$val = strip_tags($val);
$sql = "select position from $table_ans where question_id='" . Database :: escape_string($questionId) . "' and answer='" . Database :: escape_string($val) . "' AND correct=0";
$res = api_sql_query($sql, __FILE__, __LINE__);
@@ -682,7 +682,7 @@ $quizID = $objExercise->selectId();
$exerciseAttempts = $objExercise->selectAttempts();
$exerciseTitle = $objExercise->selectTitle();
$exerciseDescription = $objExercise->selectDescription();
-$exerciseDescription = stripslashes($exerciseDescription);
+$exerciseDescription = $exerciseDescription;
$exerciseSound = $objExercise->selectSound();
$randomQuestions = $objExercise->isRandom();
$exerciseType = $objExercise->selectType();
diff --git a/main/exercice/exercise.class.php b/main/exercice/exercise.class.php
index 4b602964b8..7844befbe3 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 20644 2009-05-14 16:42:28Z cvargas1 $
+* @version $Id: exercise.class.php 20776 2009-05-18 12:43:44Z pcool $
*/
@@ -521,9 +521,9 @@ class Exercise
$TBL_QUIZ_QUESTION= Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
$id=$this->id;
- $exercise=addslashes($this->exercise);
- $description=addslashes($this->description);
- $sound=addslashes($this->sound);
+ $exercise=$this->exercise;
+ $description=$this->description;
+ $sound=$this->sound;
$type=$this->type;
$attempts=$this->attempts;
$feedbacktype=$this->feedbacktype;
@@ -540,7 +540,7 @@ class Exercise
if($id) {
$sql="UPDATE $TBL_EXERCICES SET
title='".Database::escape_string(Security::remove_XSS($exercise))."',
- description='".Database::escape_string(Security::remove_XSS(stripslashes(api_html_entity_decode($description)),COURSEMANAGER))."'";
+ description='".Database::escape_string(Security::remove_XSS(api_html_entity_decode($description),COURSEMANAGER))."'";
if ($type_e != 'simple') {
$sql .= ", sound='".Database::escape_string($sound)."',
type='".Database::escape_string($type)."',
@@ -568,7 +568,7 @@ class Exercise
VALUES(
'$start_time','$end_time',
'".Database::escape_string(Security::remove_XSS($exercise))."',
- '".Database::escape_string(Security::remove_XSS(stripslashes(api_html_entity_decode($description)),COURSEMANAGER))."',
+ '".Database::escape_string(Security::remove_XSS(api_html_entity_decode($description),COURSEMANAGER))."',
'".Database::escape_string($sound)."',
'".Database::escape_string($type)."',
'".Database::escape_string($random)."',
diff --git a/main/exercice/exercise_result.php b/main/exercice/exercise_result.php
index 41e487582a..135785eeed 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 20697 2009-05-15 15:42:37Z cvargas1 $
+* @version $Id: exercise_result.php 20776 2009-05-18 12:43:44Z pcool $
*
* @todo split more code up in functions, move functions to library?
*/
@@ -150,7 +150,6 @@ if(!is_array($exerciseResult) || !is_array($questionList) || !is_object($objExer
// define basic exercise info to print on screen
$exerciseTitle=$objExercise->selectTitle();
$exerciseDescription=$objExercise->selectDescription();
-$exerciseDescription=stripslashes($exerciseDescription);
$gradebook = '';
if (isset($_SESSION['gradebook'])){
@@ -350,10 +349,10 @@ function display_unique_or_multiple_answer($answerType, $studentChoice, $answer,
{
if(!$answerCorrect)
{
- echo ''.nl2br(make_clickable(stripslashes($answerComment))).'';
+ echo ''.nl2br(make_clickable($answerComment)).'';
}
else{
- echo ''.nl2br(make_clickable(stripslashes($answerComment))).'';
+ echo ''.nl2br(make_clickable($answerComment)).'';
}
}
else
@@ -382,7 +381,7 @@ function display_free_answer($answer)
?>
|