Browse Source

Fix: export to html of millionaire

MOODLE_20_STABLE
Vasilis Daloukas 11 years ago
parent
commit
8a639e8343
  1. 2
      exporthtml.php
  2. 20
      exporthtml_millionaire.php
  3. 4
      version.php

2
exporthtml.php

@ -300,7 +300,7 @@
file_put_contents( $destdir.'/'.$filename, $ret . "\r\n" . $output_string); file_put_contents( $destdir.'/'.$filename, $ret . "\r\n" . $output_string);
//Copy the standard pictures of Millionaire //Copy the standard pictures of Millionaire
$src = $CFG->dirroot.'/mod/game/millionaire/1'; $src = $CFG->dirroot.'/mod/game/pix/millionaire/1';
$handle = opendir( $src); $handle = opendir( $src);
while (false!==($item = readdir($handle))) { while (false!==($item = readdir($handle))) {
if($item != '.' && $item != '..') { if($item != '.' && $item != '..') {

20
exporthtml_millionaire.php

@ -175,7 +175,7 @@ function game_millionaire_html_print( $game, $questions, $maxquestions)
if( flag5050) if( flag5050)
return; return;
document.getElementById( "Help5050").src = "5050x.gif"; document.getElementById( "Help5050").src = "5050x.png";
flag5050 = 1; flag5050 = 1;
for(pos = posCorrect;pos == posCorrect;pos = 1+Math.floor(Math.random()*countQuestions)); for(pos = posCorrect;pos == posCorrect;pos = 1+Math.floor(Math.random()*countQuestions));
@ -195,7 +195,7 @@ function game_millionaire_html_print( $game, $questions, $maxquestions)
if( flagTelephone) if( flagTelephone)
return; return;
flagTelephone = 1; flagTelephone = 1;
document.getElementById( "HelpTelephone").src = "telephonex.gif"; document.getElementById( "HelpTelephone").src = "telephonex.png";
if( countQuestions < 2){ if( countQuestions < 2){
wrong = posCorrect; wrong = posCorrect;
@ -224,7 +224,7 @@ function game_millionaire_html_print( $game, $questions, $maxquestions)
if( flagPeople) if( flagPeople)
return; return;
flagPeople = 1; flagPeople = 1;
document.getElementById( "HelpPeople").src = "peoplex.gif"; document.getElementById( "HelpPeople").src = "peoplex.png";
sum = 0; sum = 0;
var aPercent = new Array(); var aPercent = new Array();
@ -279,9 +279,9 @@ function game_millionaire_html_print( $game, $questions, $maxquestions)
flagTelephone = 0; flagTelephone = 0;
flagPeople = 0; flagPeople = 0;
document.getElementById( "Help5050").src = "5050.gif"; document.getElementById( "Help5050").src = "5050.png";
document.getElementById( "HelpPeople").src = "people.gif"; document.getElementById( "HelpPeople").src = "people.png";
document.getElementById( "HelpTelephone").src = "telephone.gif"; document.getElementById( "HelpTelephone").src = "telephone.png";
document.getElementById( "info").innerHTML = ""; document.getElementById( "info").innerHTML = "";
UpdateLevel( 1); UpdateLevel( 1);
@ -425,10 +425,10 @@ var Base64 = {
<tr height=10%> <tr height=10%>
<td style='background:#408080' rowspan=3 colspan=2> <td style='background:#408080' rowspan=3 colspan=2>
<input type="image" name="Help5050" id="Help5050" Title="50 50" src="5050.gif" alt="" border="0" onmousedown=OnHelp5050();>&nbsp; <input type="image" name="Help5050" id="Help5050" Title="50 50" src="5050.png" alt="" border="0" onmousedown=OnHelp5050();>&nbsp;
<input type="image" name="HelpTelephone" id="HelpTelephone" Title="<?php echo get_string( 'millionaire_telephone', 'game');?>" src="telephone.gif" alt="" border="0" onmousedown="OnHelpTelephone();">&nbsp; <input type="image" name="HelpTelephone" id="HelpTelephone" Title="<?php echo get_string( 'millionaire_telephone', 'game');?>" src="telephone.png" alt="" border="0" onmousedown="OnHelpTelephone();">&nbsp;
<input type="image" name="HelpPeople" id="HelpPeople" Title="<?php echo get_string( 'millionaire_helppeople', 'game');?>" src="people.gif" alt="" border="0" onmousedown="OnHelpPeople();">&nbsp; <input type="image" name="HelpPeople" id="HelpPeople" Title="<?php echo get_string( 'millionaire_helppeople', 'game');?>" src="people.png" alt="" border="0" onmousedown="OnHelpPeople();">&nbsp;
<input type="image" name="Quit" id="Quit" Title="<?php echo get_string( 'millionaire_quit', 'game');?>" src="x.gif" alt="" border="0" onmousedown=OnQuit();>&nbsp; <input type="image" name="Quit" id="Quit" Title="<?php echo get_string( 'millionaire_quit', 'game');?>" src="x.png" alt="" border="0" onmousedown=OnQuit();>&nbsp;
</td> </td>
<td rowspan=<?php echo 16+$maxquestions;?> style='background:#408080'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td> <td rowspan=<?php echo 16+$maxquestions;?> style='background:#408080'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td id="levela15" align=right>15</td> <td id="levela15" align=right>15</td>

4
version.php

@ -11,7 +11,7 @@
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
$module->component = 'mod_game'; // Full name of the plugin (used for diagnostics) $module->component = 'mod_game'; // Full name of the plugin (used for diagnostics)
$module->version = 2013122601; // The current module version (Date: YYYYMMDDXX) $module->version = 2014011401; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2010112400; // Requires Moodle 2.0 $module->requires = 2010112400; // Requires Moodle 2.0
$module->cron = 0; // Period for cron to check this module (secs) $module->cron = 0; // Period for cron to check this module (secs)
$module->release = '3.12.26.1'; $module->release = '3.13.14';

Loading…
Cancel
Save