diff --git a/cryptex/play.php b/cryptex/play.php
index ff904f5..a6c0543 100755
--- a/cryptex/play.php
+++ b/cryptex/play.php
@@ -266,15 +266,15 @@ width: 240pt;
}
}
- $question = "$i. ".$q->questiontext;
- $question = game_filterquestion(str_replace( array( "\'", '\"'), array( "'", '"'), $question), $q->questionid, $context->id, $game->course);
+ $question = game_show_query( $game, $q, "$i. ".$q->questiontext, $context);
$question2 = strip_tags($question); //ADDED BY DP (AUG 2009) - fixes " breaking the Answer button for this question
+
if( ($onlyshow == false) and ($showsolution == false)){
if( ($game->param8 == 0) || ($game->param8 > $q->tries))
$question .= ' ';
}
+ echo $question;
- echo $question;
if( $showsolution){
echo " $q->answertext";
}
diff --git a/hiddenpicture/play.php b/hiddenpicture/play.php
index aa728b5..acc3411 100755
--- a/hiddenpicture/play.php
+++ b/hiddenpicture/play.php
@@ -260,14 +260,14 @@ function game_hiddenpicture_showhiddenpicture( $id, $game, $attempt, $hiddenpict
//Grade
echo "
".get_string( 'grade', 'game').' : '.round( $attempt->score * 100).' %';
- game_hiddenpicture_showquestion_glossary( $id, $query);
+ game_hiddenpicture_showquestion_glossary( $game, $id, $query);
$cells = substr( $cells, 1);
$foundcells = substr( $foundcells, 1);
game_showpicture( $id, $game, $attempt, $query, $cells, $foundcells, true);
}
-function game_hiddenpicture_showquestion_glossary( $id, $query)
+function game_hiddenpicture_showquestion_glossary( $game, $id, $query)
{
global $CFG, $DB;
@@ -286,7 +286,10 @@ function game_hiddenpicture_showquestion_glossary( $id, $query)
// Add a hidden field with glossaryentryid
echo '\n";
- echo game_filtertext( $entry->definition, 0).'
';
+ $temp = $game->glossaryid;
+ $game->glossaryid = $game->glossaryid2;
+ echo game_show_query( $game, $query, $entry->definition);
+ $game->glossaryid = $temp;
echo get_string( 'answer').': ';
echo "
";
@@ -363,7 +366,7 @@ function game_hiddenpicture_check_questions( $id, $game, &$attempt, &$hiddenpict
return true;
}
-function game_hiddenpicture_check_mainquestion( $id, $game, &$attempt, &$hiddenpicture, $finishattempt)
+function game_hiddenpicture_check_mainquestion( $id, $game, &$attempt, &$hiddenpicture, $finishattempt, $context)
{
global $QTYPES, $CFG, $DB;
@@ -480,3 +483,4 @@ function game_showpicture( $id, $game, $attempt, $query, $cells, $foundcells, $u
echo "";
}
}
+
diff --git a/lib.php b/lib.php
index 383705e..96d8d97 100755
--- a/lib.php
+++ b/lib.php
@@ -1010,8 +1010,9 @@ function mod_game_pluginfile($course, $cm, $context, $filearea, $args, $forcedow
{
$questionid = $args[ 0];
$file = $args[ 1];
-
- if (!$contextcourse = get_context_instance(CONTEXT_COURSE, $course->id)) {
+ $a = explode( '/', $context->path);
+ $courseid = $a[ 2];
+ if (!$contextcourse = get_context_instance(CONTEXT_COURSE, $courseid)) {
print_error('nocontext');
}
$a = array( 'component' => 'question', 'filearea' => 'questiontext',
diff --git a/millionaire/play.php b/millionaire/play.php
index fb4b1b2..d0029d1 100755
--- a/millionaire/play.php
+++ b/millionaire/play.php
@@ -177,7 +177,7 @@ function game_millionaire_showgrid( $game, $millionaire, $id, $query, $aAnswer,
break;
case 12:
//$question = game_filterquestion($question, $query->questionid, $context->id, $game->course);
- $question = game_show_query( $game, $query, $question, $context);
+ $question = game_show_query( $game, $query, $question);
echo "