Browse Source

Fix:Coding style

MOODLE_20_STABLE
Vasilis Daloukas 9 years ago
parent
commit
938c92ff7b
  1. 9
      classes/event/course_module_instance_list_viewed.php
  2. 8
      lib.php
  3. 8
      locallib.php
  4. 4
      version.php

9
classes/event/course_module_instance_list_viewed.php

@ -36,5 +36,12 @@ defined('MOODLE_INTERNAL') || die();
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class course_module_instance_list_viewed extends \core\event\course_module_instance_list_viewed {
// No code required here as the parent class handles it all.
public static function create_from_course(\stdClass $course) {
$params = array(
'context' => \context_course::instance($course->id)
);
$event = self::create( $params);
$event->add_record_snapshot('course', $course);
return $event;
}
}

8
lib.php

@ -1219,3 +1219,11 @@ function game_get_context_module_instance( $moduleid) {
return get_context_instance( CONTEXT_MODULE, $moduleid);
}
function game_get_context_course_instance( $courseid) {
if (class_exists( 'context_course')) {
return context_course::instance( $courseid);
}
return get_context_instance( CONTEXT_COURSE, $courseid);
}

8
locallib.php

@ -2117,14 +2117,6 @@ function game_strpos( $haystack, $needle, $offset = 0) {
return textlib_get_instance()->strpos( $haystack, $needle, $offset);
}
function game_get_context_course_instance( $courseid) {
if (class_exists( 'context_course')) {
return context_course::instance( $courseid);
}
return get_context_instance( 50, $courseid);
}
function game_show_query( $game, $query, $text) {
if ($game->glossaryid) {
$cmglossary = get_coursemodule_from_instance('glossary', $game->glossaryid, $game->course);

4
version.php

@ -36,10 +36,10 @@ if (!isset( $plugin)) {
}
$plugin->component = 'mod_game'; // Full name of the plugin (used for diagnostics).
$plugin->version = 2015122501; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2015122901; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2010112400; // Requires Moodle 2.0.
$plugin->cron = 0; // Period for cron to check this module (secs).
$plugin->release = '3.36.25.1';
$plugin->release = '3.36.29.1';
if ($useplugin != 2) {
$module = $plugin;

Loading…
Cancel
Save