diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..07aca5c --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,3 @@ +Changes in version 3.36.25.1 (2015122501) +------------------------------------------------------------------ +- Fix: Coding style diff --git a/README.md b/README.md index b4d9b47..97ab81b 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ Game module for Moodle -Copyright (C) 2004-2012 Vasilis Daloukas (http://bdaloukas.gr) +Copyright (C) 2004-2015 by Vasilis Daloukas (http://bdaloukas.gr) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -66,3 +66,16 @@ Upgrade * Delete the files from mod/game * Copy the new files to mod/game + +To install it using git, type this command in the root of your Moodle install: +``` +git clone https://github.com/bdaloukas/moodle-mod_game.git mod +mv moodle-mod_game game +cd game +git checkout MOODLE_20_STABLE + +``` + +Alternatively, download the zip from +, +unzip it into the local folder, and then rename the new folder to "game". diff --git a/export.php b/export.php index f6d51d5..c2e9ecb 100755 --- a/export.php +++ b/export.php @@ -128,7 +128,7 @@ class mod_game_exporthtml_form extends moodleform { } $cm = get_coursemodule_from_instance('game', $game->id, $game->course); - $context = get_context_instance(CONTEXT_MODULE, $cm->id); + $context = game_get_context_module_instance( $cm->id); require_once("exporthtml.php"); game_OnExportHTML( $game, $context, $html); diff --git a/exporthtml.php b/exporthtml.php index 1e43e44..8d4ab23 100755 --- a/exporthtml.php +++ b/exporthtml.php @@ -159,7 +159,7 @@ function game_onexporthtml_cross_repair_questions( $game, $context, $filename, $ $params = array( 'component' => $component, 'filearea' => $filearea, 'itemid' => $id, 'filename' => $fileimage, 'contextid' => $context, 'contextid' => $contextcourse->id); $rec = $DB->get_record( 'files', $params); - if ( $rec == false { + if ( $rec == false) { break; } @@ -350,7 +350,7 @@ function game_onexporthtml_snakes( $game, $html, $destdir, $context) { $board = game_snakes_get_board( $game); if ( ($game->sourcemodule == 'quiz') or ($game->sourcemodule == 'question')) { - $questionsm = game_millionaire_html_getquestions( $game, $context, $maxquestions, $countofquestionsm, $retfeedback, $files); + $questionsm = game_millionaire_html_getquestions( $game, $context, $maxquestions, $countofquestionsm, $retfeedback, $destdir, $files); } else { $questionsm = array(); $countofquestionsm = 0; diff --git a/exporthtml_snakes.php b/exporthtml_snakes.php index aeae40f..2c263c0 100755 --- a/exporthtml_snakes.php +++ b/exporthtml_snakes.php @@ -1,4 +1,19 @@ -. + /** * This page export the game snakes to html * @@ -46,7 +61,7 @@ background: #999 url('images/backdropJungle.png') no-repeat fixed left top;