]> git.mjollnir.org Git - moodle.git/commitdiff
Removing calls to depricated stripslashes. It is no longer needed with dmllib 2.0.
authortjhunt <tjhunt>
Mon, 14 Jul 2008 15:29:30 +0000 (15:29 +0000)
committertjhunt <tjhunt>
Mon, 14 Jul 2008 15:29:30 +0000 (15:29 +0000)
question/format/hotpot/format.php
question/format/qti_two/format.php
question/format/xml/format.php
question/type/multianswer/questiontype.php
question/type/shortanswer/questiontype.php

index 55cada9bdaf287d1f4fad92ca9113a76052da15a..d3a4056b90181eabddb91f8a7504ac510873ff2b 100644 (file)
@@ -664,13 +664,7 @@ function hotpot_convert_relative_urls($str, $baseurl, $filename) {
     return $str;
 }
 
-function hotpot_convert_relative_url($baseurl, $filename, $opentag, $url, $closetag, $stripslashes=true) {
-    if ($stripslashes) {
-        $opentag = stripslashes($opentag);
-        $url = stripslashes($url);
-        $closetag = stripslashes($closetag);
-    }
-
+function hotpot_convert_relative_url($baseurl, $filename, $opentag, $url, $closetag, $depricated=true) {
     // catch <PARAM name="FlashVars" value="TheSound=soundfile.mp3">
     //    ampersands can appear as "&", "&amp;" or "&amp;#x0026;amp;"
     if (preg_match('|^'.'\w+=[^&]+'.'('.'&((amp;#x0026;)?amp;)?'.'\w+=[^&]+)*'.'$|', $url)) {
@@ -708,14 +702,10 @@ function hotpot_convert_relative_url($baseurl, $filename, $opentag, $url, $close
     return $url;
 }
 
-function hotpot_convert_url($baseurl, $filename, $url, $stripslashes=true) {
+function hotpot_convert_url($baseurl, $filename, $url, $depricated=true) {
     // maintain a cache of converted urls
     static $HOTPOT_RELATIVE_URLS = array();
 
-    if ($stripslashes) {
-        $url = stripslashes($url);
-    }
-
     // is this an absolute url? (or javascript pseudo url)
     if (preg_match('%^(http://|/|javascript:)%i', $url)) {
         // do nothing
index 8e01eb7279260f54c537d65b569374892f78434a..fc1268ecc51a23688af23dad5b6acc6021cf98df 100644 (file)
@@ -289,7 +289,7 @@ function handle_questions_media(&$questions, $path, $courseid) {
             
             // results are first written into string (and then to a file)
             $count++;
-            echo "<hr /><p><b>$count</b>. ".stripslashes($question->questiontext)."</p>";
+            echo "<hr /><p><b>$count</b>. ".$question->questiontext."</p>";
             $expout = $this->writequestion( $question , null, true, $path) . "\n";
             $expout = $this->presave_process( $expout );
             
index dc008f1188562603658d75a1b1bbe36666621ed7..b203e1ae237fe9b158f356c20f2dff23ea54a08a 100755 (executable)
@@ -135,7 +135,7 @@ class qformat_xml extends qformat_default {
         $qo->image = $this->getpath( $question, array('#','image',0,'#'), $qo->image );
         $image_base64 = $this->getpath( $question, array('#','image_base64','0','#'),'' );
         if (!empty($image_base64)) {
-            $qo->image = $this->importimagefile( $qo->image, stripslashes($image_base64) );
+            $qo->image = $this->importimagefile( $qo->image, $image_base64);
         }
         $qo->generalfeedback = $this->getpath( $question, array('#','generalfeedback',0,'#','text',0,'#'), $qo->generalfeedback, true );
         $qo->defaultgrade = $this->getpath( $question, array('#','defaultgrade',0,'#'), $qo->defaultgrade );
index 1f4a1ba407fbf3bdb4339d521ef73af0429938c9..b0635196376c772c84867773c47ce9b34e0c1c6e 100644 (file)
@@ -314,7 +314,7 @@ class embedded_cloze_qtype extends default_questiontype {
                     }
                     if ($correctanswer) {
                         $feedback = '<div class="correctness">';
-                        $feedback .= get_string('correctansweris', 'quiz', s($correctanswer, true));
+                        $feedback .= get_string('correctansweris', 'quiz', s($correctanswer));
                         $feedback .= '</div>';
                        // $strfeedbackwrapped = get_string('correctanswer and', 'quiz').get_string('feedback', 'quiz');
                     }
@@ -413,7 +413,7 @@ class embedded_cloze_qtype extends default_questiontype {
                     */
 
                     echo "<input $style $readonly $popup name=\"$inputname\"";
-                    echo "  type=\"text\" value=\"".s($response, true)."\" ".$styleinfo." /> ";
+                    echo "  type=\"text\" value=\"".s($response)."\" ".$styleinfo." /> ";
                     if (!empty($feedback) && !empty($USER->screenreader)) {
                         echo "<img src=\"$CFG->pixpath/i/feedback.gif\" alt=\"$feedback\" />";
                     }
@@ -427,7 +427,7 @@ class embedded_cloze_qtype extends default_questiontype {
                             $selected = ' selected="selected"';
                         }
                         $outputoptions .= "<option value=\"$mcanswer->id\"$selected>" .
-                                s($mcanswer->answer, true) . '</option>';
+                                s($mcanswer->answer) . '</option>';
                     }
                     // In the next line, $readonly is invalid HTML, but it works in
                     // all browsers. $disabled would be valid, but then the JS for
index a770a40667d60c65ad2782159d5c5fe91bee4d3d..5bbffcd543a19a24f58235e324387856971584ee 100644 (file)
@@ -145,7 +145,7 @@ class question_shortanswer_qtype extends default_questiontype {
         /// Print input controls
 
         if (isset($state->responses['']) && $state->responses['']!='') {
-            $value = ' value="'.s($state->responses[''], true).'" ';
+            $value = ' value="'.s($state->responses['']).'" ';
         } else {
             $value = ' value="" ';
         }
@@ -410,7 +410,7 @@ class question_shortanswer_qtype extends default_questiontype {
                 echo '<div class="correctness ' . $class . '">' . get_string($class, 'quiz');
                 if ($correctanswer && ($class == 'partiallycorrect' || $class == 'incorrect')) {
                     echo ('<div class="correctness">');
-                    print_string('correctansweris', 'quiz', s($correctanswer, true));
+                    print_string('correctansweris', 'quiz', s($correctanswer));
                     echo ('</div>');
                 }
                 echo '</div>';