Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

addslashes to "name" and "summary" when they are set from the HP quiz…

… file;

increment version to v2.1.10
  • Loading branch information...
commit 05b88e80dfbd2b8ae041df738a215e0364d582fc 1 parent 09f9727
authored January 20, 2006
2  mod/hotpot/README.TXT
... ...
@@ -1,4 +1,4 @@
1  
-This is v2.1.9 of the HotPot module
  1
+This is v2.1.10 of the HotPot module
2 2
    This module allows teachers to administer Hot Potatoes and TexToys quizzes via Moodle.
3 3
    It has been tested on:
4 4
       - Hot Potatoes 6
11  mod/hotpot/lib.php
@@ -261,7 +261,7 @@ function hotpot_set_form_values(&$hp) {
261 261
 				$ok = hotpot_update_chain($hp);
262 262
 			break;
263 263
 		}
264  
-	} else {
  264
+	} else { // $hp->quizchain==HOTPOT_NO
265 265
 		hotpot_set_name_summary_reference($hp);
266 266
 	}
267 267
 
@@ -301,7 +301,6 @@ function hotpot_set_form_values(&$hp) {
301 301
 			set_user_preference('hotpot_summarysource', $hp->summarysource);
302 302
 		}
303 303
 	}
304  
-
305 304
 	return $ok;
306 305
 }
307 306
 function hotpot_get_chain(&$cm) {
@@ -554,9 +553,9 @@ function hotpot_set_name_summary_reference(&$hp, $chain_index=NULL) {
554 553
 			switch ($hp->$textsource) {
555 554
 				case HOTPOT_TEXTSOURCE_QUIZ:
556 555
 					if ($textfield=='name') {
557  
-						$hp->exercisetitle = addslashes($hp->names[$chain_index]);
  556
+						$hp->exercisetitle = $hp->names[$chain_index];
558 557
 					} else if ($textfield=='summary') {
559  
-						$hp->exercisesubtitle = addslashes($hp->summaries[$chain_index]);
  558
+						$hp->exercisesubtitle = $hp->summaries[$chain_index];
560 559
 					}
561 560
 					break;
562 561
 				case HOTPOT_TEXTSOURCE_SPECIFIC:
@@ -577,9 +576,9 @@ function hotpot_set_name_summary_reference(&$hp, $chain_index=NULL) {
577 576
 				hotpot_get_titles_and_next_ex($hp, $xml_quiz->filepath);
578 577
 			}
579 578
 			if ($textfield=='name') {
580  
-				$hp->$textfield = $hp->exercisetitle;
  579
+				$hp->$textfield = addslashes($hp->exercisetitle);
581 580
 			} else if ($textfield=='summary') {
582  
-				$hp->$textfield = $hp->exercisesubtitle;
  581
+				$hp->$textfield = addslashes($hp->exercisesubtitle);
583 582
 			}
584 583
 		}
585 584
 		switch ($hp->$textsource) {
4  mod/hotpot/version.php
@@ -3,8 +3,8 @@
3 3
 ///  Code fragment to define the version of hotpot
4 4
 ///  This fragment is called by moodle_needs_upgrading() and /admin/index.php
5 5
 /////////////////////////////////////////////////////////////////////////////////
6  
-$module->version  = 2005090709;  // release date of this version (see note below)
7  
-$module->release  = 'v2.1.9';    // human-friendly version name (used in mod/hotpot/lib.php)
  6
+$module->version  = 2005090710;  // release date of this version (see note below)
  7
+$module->release  = 'v2.1.10';    // human-friendly version name (used in mod/hotpot/lib.php)
8 8
 $module->cron     = 0;           // period for cron to check this module (secs)
9 9
 // interpretation of YYYYMMDDXY version numbers
10 10
 //     YYYY : year

0 notes on commit 05b88e8

Please sign in to comment.
Something went wrong with that request. Please try again.