Browse Source

New Cross:Show/Hide print button

MOODLE_20_STABLE
bdaloukas 11 years ago
parent
commit
9f8ff52581
  1. 8
      cross/play.php
  2. 1
      lang/en/game.php
  3. 10
      mod_form.php
  4. 4
      version.php

8
cross/play.php

@ -970,9 +970,11 @@ if( $showhtmlsolutions)
echo ' &nbsp;&nbsp;&nbsp;&nbsp;<button id="finishattemptbutton" type="button" onclick="CheckServerClick( 1);" style="display: none;">'.get_string( 'cross_endofgamebutton', 'game');
echo '</button>';
echo ' &nbsp;&nbsp;&nbsp;&nbsp;<button id="printbutton" type="button" onclick="OnPrint( 0);" style="display: none;">'.get_string( 'print', 'game');
echo '</button>';
if( $game->param5 == 1 or $game->param5 == NULL)
{
echo ' &nbsp;&nbsp;&nbsp;&nbsp;<button id="printbutton" type="button" onclick="OnPrint( 0);" style="display: none;">'.get_string( 'print', 'game');
echo '</button>';
}
echo "</div>\r\n";
}

1
lang/en/game.php

@ -214,6 +214,7 @@ $string[ 'cross_max_attempts'] = 'Maximum number of attempts';
$string[ 'cross_maxwords'] = 'Maximum number of words';
$string[ 'cross_minwords'] = 'Minimum number of words';
$string[ 'cross_options'] = 'Crossword options';
$string[ 'cross_showprint'] = 'Show print button';
$string[ 'cryptex_maxtries'] = 'Max tries';
$string[ 'cryptex_options'] = 'Cryptex options';
$string[ 'gameclose'] = 'Close the game';

10
mod_form.php

@ -240,6 +240,8 @@ class mod_game_mod_form extends moodleform_mod {
$crosslayoutoptions[0] = get_string('cross_layout0', 'game');
$crosslayoutoptions[1] = get_string('cross_layout1', 'game');
$mform->addElement('select','param3', get_string('cross_layout', 'game'), $crosslayoutoptions);
$mform->setType('param5', PARAM_INT);
$mform->addElement('selectyesno', 'param5', get_string('cross_showprint','game'));
}
//---------------------------------------------------------------------------
@ -423,7 +425,7 @@ class mod_game_mod_form extends moodleform_mod {
function set_data($default_values) {
global $DB;
if( isset( $default_values->type))
{
//Default values for every game.
@ -438,7 +440,7 @@ class mod_game_mod_form extends moodleform_mod {
}else if( $default_values->type == 'millionaire')
{
$default_values->shuffle = 1;
}
}
}
if( isset( $default_values->gamekind)){
@ -448,6 +450,10 @@ class mod_game_mod_form extends moodleform_mod {
}else if( $default_values->gamekind == 'millionaire'){
if( isset( $default_values->param8))
$default_values->param8 = '#'.substr( '000000'.strtoupper( dechex( $default_values->param8)),-6);
}else if( $default_values->gamekind == 'cross')
{
if( $default_values->param5 == NULL)
$default_values->param5 = 1;
}
//repair questioncategoryid

4
version.php

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

Loading…
Cancel
Save