Browse Source

New: Writes the version of game at the form of editing the game

MOODLE_20_STABLE
bdaloukas 12 years ago
parent
commit
fb05776caf
  1. 10
      locallib.php
  2. 3
      mod_form.php
  3. 4
      version.php

10
locallib.php

@ -1897,3 +1897,13 @@ function game_debug_array( $title, $a)
print_r( $a);
echo '<br>';
}
function game_get_version()
{
global $DB;
if( ($rec = $DB->get_record( 'modules', array( 'name' => 'game'), 'id,version')) === false)
return '';
return $rec->version;
}

3
mod_form.php

@ -39,6 +39,9 @@ class mod_game_mod_form extends moodleform_mod {
$mform->setDefault('type', $gamekind);
$mform->setType('type', PARAM_ALPHA);
$mform->addElement( 'hidden', 'gameversion', game_get_version());
$mform->setType('gameversion', PARAM_INT);
$mform->addElement('header', 'general', get_string('general', 'form'));
$mform->addElement('text', 'name', 'Name', array('size'=>'64'));

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 = 2013071301; // The current module version (Date: YYYYMMDDXX)
$module->version = 2013071501; // 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.7.13.1 (2013071301)';
$module->release = '3.7.15';

Loading…
Cancel
Save