Browse Source

CONTRIB-4724: New function module_scale_used_anywhere() should be implemented

MOODLE_20_STABLE
ubuntu 11 years ago
parent
commit
e0349fd2d4
  1. 19
      lib.php
  2. 4
      version.php

19
lib.php

@ -1268,3 +1268,22 @@ function game_get_completion_state($course, $cm, $userid, $type) {
return $grade && $grade->score > 0;
}
/**
* Checks if scale is being used by any instance of Game
*
* This is used to find out if scale used anywhere
*
* @global object
* @param int $scaleid
* @return boolean True if the scale is used by any Game
*/
function game_scale_used_anywhere($scaleid) {
global $DB;
if ($scaleid and $DB->record_exists('game', array('grade'=>-$scaleid))) {
return true;
} else {
return false;
}
}

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 = 2013122503; // The current module version (Date: YYYYMMDDXX)
$module->version = 2013122504; // 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.12.25.3';
$module->release = '3.12.25.4';

Loading…
Cancel
Save