Browse Source

phpdocs compatibility

MOODLE_20_STABLE
bdaloukas 8 years ago
parent
commit
4eaaa8833a
  1. 4
      attempt.php
  2. 74
      backup/moodle2/backup_game_activity_task.class.php
  3. 218
      backup/moodle2/backup_game_stepslib.php
  4. 246
      backup/moodle2/restore_game_activity_task.class.php
  5. 363
      backup/moodle2/restore_game_stepslib.php
  6. 7
      bookquiz/play.php
  7. 5
      bookquiz/questions.php
  8. 8
      classes/event/course_module_instance_list_viewed.php
  9. 5
      classes/plugininfo/gametool.php
  10. 8
      cross/cross_class.php
  11. 63
      cross/play.php
  12. 30
      cryptex/cryptexdb_class.php
  13. 2
      cryptex/play.php
  14. 4
      db/importsnakes.php
  15. 5
      db/upgrade.php
  16. 59
      export/exporthtml.php
  17. 18
      export/exporthtml_millionaire.php
  18. 99
      export/exportjavame.php
  19. 7
      export/html/snakes/css/modal.css
  20. 17
      export/html/snakes/css/snakes.css
  21. 11
      export/html/snakes/css/subModal.css
  22. 2
      export/html/snakes/js/snakes-mod.js
  23. 79
      hangman/play.php
  24. 24
      hiddenpicture/picture.php
  25. 354
      lang/en/game.php

4
attempt.php

@ -17,9 +17,9 @@
/**
* This page prints a particular attempt of game
*
* @author bdaloukas
* @copyright 2007 Vasilis Daloukas
* @package mod_game
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
**/
require_once( "../../config.php");
require_once( "lib.php");

74
backup/moodle2/backup_game_activity_task.class.php

@ -1,74 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Defines backup_glossary_activity_task class
*
* @package mod_game
* @subpackage backup-moodle2
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
**/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/mod/game/backup/moodle2/backup_game_stepslib.php'); // Because it exists (must).
/**
* Defines backup_game_activity_task class
*
* game backup task that provides all the settings and steps to perform one
* complete backup of the activity
*/
class backup_game_activity_task extends backup_activity_task {
/**
* Define (add) particular settings this activity can have
*/
protected function define_my_settings() {
// No particular settings for this activity.
}
/**
* Define (add) particular steps this activity can have
*/
protected function define_my_steps() {
// Game only has one structure step.
$this->add_step(new backup_game_activity_structure_step('game_structure', 'game.xml'));
}
/**
* Encodes URLs to the index.php and view.php scripts
*
* @param string $content some HTML text that eventually contains URLs to the activity instance scripts
* @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
$base = preg_quote($CFG->wwwroot, "/");
// Link to the list of games.
$search = "/(".$base."\/mod\/game\/index.php\?id\=)([0-9]+)/";
$content = preg_replace($search, '$@GAMEINDEX*$2@$', $content);
// Link to game view by moduleid.
$search = "/(".$base."\/mod\/game\/view.php\?id\=)([0-9]+)/";
$content = preg_replace($search, '$@GAMEVIEWBYID*$2@$', $content);
return $content;
}
}

218
backup/moodle2/backup_game_stepslib.php

@ -1,218 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Define all the backup steps that will be used by the backup_game_activity_task
*
* @package mod_game
* @subpackage backup-moodle2
* @author bdaloukas
backup_game_settingslib.php
*/
/**
* Define the complete game structure for backup, with file and id annotations
*/
defined('MOODLE_INTERNAL') || die();
class backup_game_activity_structure_step extends backup_activity_structure_step {
/**
* Defines the needed structures.
*/
protected function define_structure() {
// To know if we are including userinfo.
$userinfo = $this->get_setting_value('userinfo');
// Define each element separated.
$game = new backup_nested_element('game', array('id'), array(
'name', 'sourcemodule', 'timeopen', 'timeclose', 'quizid',
'glossaryid', 'glossarycategoryid', 'questioncategoryid', 'bookid',
'gamekind', 'param1', 'param2', 'param3',
'param4', 'param5', 'param6', 'param7', 'param8', 'param9',
'shuffle', 'timemodified', 'toptext', 'bottomtext',
'grademethod', 'grade', 'decimalpoints', 'popup',
'review', 'attempts', 'glossaryid2', 'glossarycategoryid2',
'language', 'subcategories', 'maxattempts'
));
$exporthtmls = new backup_nested_element('game_export_htmls');
$exporthtml = new backup_nested_element('game_export_html', array('id'), array(
'filename', 'title', 'checkbutton', 'printbutton', 'inputsize', 'maxpicturewidth', 'maxpictureheight'));
$exportjavames = new backup_nested_element('game_export_javames');
$exportjavame = new backup_nested_element('game_export_javame', array('id'), array(
'filename', 'icon', 'createdby', 'vendor', 'name', 'description', 'version',
'maxpicturewidth', 'maxpictureheight'));
$grades = new backup_nested_element('game_grades');
$grade = new backup_nested_element('game_grade', array('id'), array(
'userid', 'score', 'timemodified'));
$repetitions = new backup_nested_element('game_repetitions');
$repetition = new backup_nested_element('game_repetition', array('id'), array(
'userid', 'questionid', 'glossaryentryid', 'repetitions'));
$attempts = new backup_nested_element('game_attempts');
$attempt = new backup_nested_element('game_attempt', array('id'), array(
'userid', 'timestart', 'timefinish', 'timelastattempt', 'lastip',
'lastremotehost', 'preview', 'attempt', 'score', 'attempts', 'language'));
$querys = new backup_nested_element('game_queries');
$query = new backup_nested_element('game_query', array('id'), array(
'gamekind', 'userid', 'sourcemodule', 'questionid', 'glossaryentryid',
'questiontext', 'score', 'timelastattempt', 'studentanswer', 'col', 'row',
'horizontal', 'answertext', 'correct', 'attachment', 'answerid', 'tries'));
$bookquizs = new backup_nested_element('game_bookquizs');
$bookquiz = new backup_nested_element('game_bookquiz', array('id'), array('lastchapterid'));
$bookquizchapters = new backup_nested_element('game_bookquiz_chapters');
$bookquizchapter = new backup_nested_element('game_bookquiz_chapter', array('id'), array( 'chapterid'));
$bookquizquestions = new backup_nested_element('game_bookquiz_questions');
$bookquizquestion = new backup_nested_element('game_bookquiz_question', array('id'), array(
'chapterid', 'questioncategoryid'));
$crosss = new backup_nested_element('game_crosss');
$cross = new backup_nested_element('game_cross', array('id'), array(
'cols', 'rows', 'words', 'wordsall', 'createscore', 'createtries',
'createtimelimit', 'createconnectors', 'createfilleds', 'createspaces', 'triesplay'));
$cryptexs = new backup_nested_element('game_cryptexs');
$cryptex = new backup_nested_element('game_cryptex', array('id'), array('letters'));
$hangmans = new backup_nested_element('game_hangmans');
$hangman = new backup_nested_element('game_hangman', array('id'), array(
'queryid', 'letters', 'allletters', 'try', 'maxtries', 'finishedword',
'corrects', 'iscorrect'));
$hiddenpictures = new backup_nested_element('game_hiddenpictures');
$hiddenpicture = new backup_nested_element('game_hiddenpicture', array('id'), array('correct', 'wrong', 'found'));
$millionaires = new backup_nested_element('game_millionaires');
$millionaire = new backup_nested_element('game_millionaire', array('id'), array('queryid', 'state', 'level'));
$snakes = new backup_nested_element('game_snakes');
$snake = new backup_nested_element('game_snake', array('id'), array('snakesdatabaseid', 'position', 'queryid', 'dice'));
$sudokus = new backup_nested_element('game_sudokus');
$sudoku = new backup_nested_element('game_sudoku', array('id'), array('level', 'data', 'opened', 'guess'));
// Build the tree.
$game->add_child( $bookquizquestions);
$bookquizquestions->add_child( $bookquizquestion);
$game->add_child( $exporthtmls);
$exporthtmls->add_child( $exporthtml);
$game->add_child( $exportjavames);
$exportjavames->add_child( $exportjavame);
$game->add_child( $grades);
$grades->add_child( $grade);
$game->add_child( $repetitions);
$repetitions->add_child( $repetition);
// All these source definitions only happen if we are including user info.
if ($userinfo) {
$game->add_child( $attempts);
$attempts->add_child( $attempt);
$attempts->add_child( $querys);
$querys->add_child( $query);
$attempts->add_child( $bookquizs);
$bookquizs->add_child( $bookquiz);
$game->add_child( $bookquizchapters);
$bookquizchapters->add_child($bookquizchapter);
$attempts->add_child( $crosss);
$crosss->add_child( $cross);
$attempts->add_child( $cryptexs);
$cryptexs->add_child( $cryptex);
$attempts->add_child( $hangmans);
$hangmans->add_child( $hangman);
$attempts->add_child( $hiddenpictures);
$hiddenpictures->add_child( $hiddenpicture);
$attempts->add_child( $millionaires);
$millionaires->add_child( $millionaire);
$attempts->add_child( $snakes);
$snakes->add_child( $snake);
$attempts->add_child( $sudokus);
$sudokus->add_child( $sudoku);
}
// Define sources.
$game->set_source_table('game', array('id' => backup::VAR_ACTIVITYID));
$bookquizquestion->set_source_table('game_bookquiz_questions', array('gameid' => backup::VAR_ACTIVITYID));
$exporthtml->set_source_table('game_export_html', array('id' => backup::VAR_ACTIVITYID));
$exportjavame->set_source_table('game_export_javame', array('id' => backup::VAR_ACTIVITYID));
// All the rest of elements only happen if we are including user info.
if ($userinfo) {
$grade->set_source_table('game_grades', array('gameid' => backup::VAR_ACTIVITYID));
$repetition->set_source_table('game_repetitions', array('gameid' => backup::VAR_ACTIVITYID));
$attempt->set_source_table('game_attempts', array( 'gameid' => backup::VAR_ACTIVITYID));
$attempt->set_source_table('game_queries', array( 'attemptid' => backup::VAR_PARENTID));
$bookquiz->set_source_table('game_bookquiz', array( 'id' => backup::VAR_ACTIVITYID));
$bookquizchapter->set_source_table('game_bookquiz_chapters', array( 'id' => backup::VAR_PARENTID));
$cross->set_source_table('game_cross', array( 'id' => backup::VAR_PARENTID));
$cryptex->set_source_table('game_cryptex', array( 'id' => backup::VAR_PARENTID));
$hangman->set_source_table('game_hangman', array( 'id' => backup::VAR_PARENTID));
$hiddenpicture->set_source_table('game_hiddenpicture', array( 'id' => backup::VAR_PARENTID));
$millionaire->set_source_table('game_millionaire', array( 'id' => backup::VAR_PARENTID));
$snake->set_source_table('game_snakes', array( 'id' => backup::VAR_PARENTID));
$sudoku->set_source_table('game_sudoku', array( 'id' => backup::VAR_PARENTID));
}
// Define id annotations.
$attempt->annotate_ids('user', 'userid');
$grade->annotate_ids('user', 'userid');
$repetition->annotate_ids('user', 'userid');
$repetition->annotate_ids('question', 'questionid');
$repetition->annotate_ids('glossary_entry', 'glossaryentryid');
$query->annotate_ids('user', 'userid');
$query->annotate_ids('question', 'questionid');
$query->annotate_ids('glossary_enrty', 'glossaryentryid');
$query->annotate_ids('question_answer', 'answerid');
$bookquizquestion->annotate_ids('book_chapter', 'chapterid');
$bookquizquestion->annotate_ids('question_category', 'questioncategoryid');
$bookquizchapter->annotate_ids('book_chapter', 'chapterid');
$hangman->annotate_ids('game_query', 'queryid');
$millionaire->annotate_ids('game_query', 'queryid');
// Define file annotations.
$game->annotate_files('mod_game', 'snakes_file', null); // This file area hasn't itemid.
$game->annotate_files('mod_game', 'snakes_board', null); // This file area hasn't itemid.
// Return the root element (game), wrapped into standard activity structure.
return $this->prepare_activity_structure( $game);
}
}

246
backup/moodle2/restore_game_activity_task.class.php

@ -1,246 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* @package mod_game
* @subpackage backup-moodle2
* @author bdaloukas
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/mod/game/backup/moodle2/restore_game_stepslib.php'); // Because it exists (must).
/**
* game restore task that provides all the settings and steps to perform one
* complete restore of the activity
*/
class restore_game_activity_task extends restore_activity_task {
/**
* Define (add) particular settings this activity can have
*/
protected function define_my_settings() {
// No particular settings for this activity.
}
/**
* Define (add) particular steps this activity can have
*/
protected function define_my_steps() {
// Game only has one structure step.
$this->add_step(new restore_game_activity_structure_step('game_structure', 'game.xml'));
}
/**
* Define the contents in the activity that must be
* processed by the link decoder
*/
static public function define_decode_contents() {
$contents = array();
$contents[] = new restore_decode_content('game', array('toptext'), 'game');
$contents[] = new restore_decode_content('game', array('bottomtext'), 'game');
return $contents;
}
/**
* Define the decoding rules for links belonging
* to the activity to be executed by the link decoder
*/
static public function define_decode_rules() {
$rules = array();
return $rules;
}
/**
* Define the restore log rules that will be applied
* by the {@link restore_logs_processor} when restoring
* game logs. It must return one array
* of {@link restore_log_rule} objects
*/
static public function define_restore_log_rules() {
$rules = array();
$rules[] = new restore_log_rule('game', 'add', 'view.php?id={course_module}', '{game}');
$rules[] = new restore_log_rule('game', 'update', 'view.php?id={course_module}', '{game}');
$rules[] = new restore_log_rule('game', 'view', 'view.php?id={course_module}', '{game}');
$rules[] = new restore_log_rule('game', 'choose', 'view.php?id={course_module}', '{game}');
$rules[] = new restore_log_rule('game', 'choose again', 'view.php?id={course_module}', '{game}');
$rules[] = new restore_log_rule('game', 'report', 'report.php?id={course_module}', '{game}');
return $rules;
}
/**
* Define the restore log rules that will be applied
* by the {@link restore_logs_processor} when restoring
* course logs. It must return one array
* of {@link restore_log_rule} objects
*
* Note this rules are applied when restoring course logs
* by the restore final task, but are defined here at
* activity level. All them are rules not linked to any module instance (cmid = 0)
*/
static public function define_restore_log_rules_for_course() {
$rules = array();
// Fix old wrong uses (missing extension).
$rules[] = new restore_log_rule('game', 'view all', 'index?id={course}', null,
null, null, 'index.php?id={course}');
$rules[] = new restore_log_rule('game', 'view all', 'index.php?id={course}', null);
return $rules;
}
public function after_restore() {
// Do something at end of restore.
global $DB;
// Get the blockid.
$gameid = $this->get_activityid();
// Extract Game configdata and update it to point to the new glossary.
$rec = $DB->get_record_select( 'game', 'id='.$gameid,
null, 'id,quizid,glossaryid,glossarycategoryid,questioncategoryid,bookid,glossaryid2,glossarycategoryid2');
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'quiz', $rec->quizid);
if ($ret != false) {
$rec->quizid = $ret->newitemid;
}
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'glossary', $rec->glossaryid);
if ($ret != false) {
$rec->glossaryid = $ret->newitemid;
}
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'glossary_categories', $rec->glossarycategoryid);
if ($ret != false) {
$rec->glossarycategoryid = $ret->newitemid;
}
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'question_categories', $rec->questioncategoryid);
if ($ret != false) {
$rec->questioncategoryid = $ret->newitemid;
}
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'book', $rec->bookid);
if ($ret != false) {
$rec->bookid = $ret->newitemid;
}
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'glossary', $rec->glossaryid2);
if ($ret != false) {
$rec->glossaryid2 = $ret->newitemid;
}
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'glossary_categories', $rec->glossarycategoryid);
if ($ret != false) {
$rec->glossarycategoryid = $ret->newitemid;
}
$DB->update_record( 'game', $rec);
// Read game_repetitions.
$recs = $DB->get_records_select( 'game_repetitions', 'gameid='.$gameid, null, '',
'id,questionid,glossaryentryid');
if ($recs != false) {
foreach ($recs as $rec) {
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'question', $rec->questionid);
if ($ret != false) {
$rec->questionid = $ret->newitemid;
}
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'glossary_entry', $rec->glossaryentryid);
if ($ret != false) {
$rec->glossaryentryid = $ret->newitemid;
}
$DB->update_record( 'game_repetitions', $rec);
}
}
// Read game_queries.
$recs = $DB->get_records_select( 'game_queries', 'gameid='.$gameid, null, '',
'id,questionid,glossaryentryid,answerid');
if ($recs != false) {
foreach ($recs as $rec) {
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'question', $rec->questionid);
if ($ret != false) {
$rec->questionid = $ret->newitemid;
}
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'glossary_entry', $rec->glossaryentryid);
if ($ret != false) {
$rec->glossaryentryid = $ret->newitemid;
}
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'question_answers', $rec->glossaryentryid);
if ($ret != false) {
$rec->answerid = $ret->newitemid;
}
$DB->update_record( 'game_queries', $rec);
}
}
// Read bookquiz.
$recs = $DB->get_records_select( 'game_bookquiz', 'id='.$gameid, null, '', 'id,lastchapterid');
if ($recs != false) {
foreach ($recs as $rec) {
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'book_chapters', $rec->lastchapterid);
if ($ret != false) {
$rec->lastchapterid = $ret->newitemid;
}
$DB->update_record( 'game_bookquiz', $rec);
}
}
// Read bookquiz_chapters.
$sql = "SELECT gbc.* ".
"FROM {game_bookquiz_chapters} gbc LEFT JOIN {game_attempts} a ON gbc.attemptid = a.id".
" WHERE a.gameid=$gameid";
$recs = $DB->get_records_sql( $sql);
if ($recs != false) {
foreach ($recs as $rec) {
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'book_chapters', $rec->chapterid);
if ($ret != false) {
$rec->chapterid = $ret->newitemid;
}
$DB->update_record( 'game_bookquiz_chapter', $rec);
}
}
// Read bookquiz_questions.
$recs = $DB->get_records_select( 'game_bookquiz_questions', 'id='.$gameid, null, '', 'id,chapterid,questioncategoryid');
if ($recs != false) {
foreach ($recs as $rec) {
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'book_chapters', $rec->chapterid);
if ($ret != false) {
$rec->chapterid = $ret->newitemid;
}
$ret = restore_dbops::get_backup_ids_record($this->get_restoreid(), 'book_chapters', $rec->questioncategoryid);
if ($ret != false) {
$rec->questioncategoryid = $ret->newitemid;
}
$DB->update_record( 'game_bookquiz_questions', $rec);
}
}
}
}

363
backup/moodle2/restore_game_stepslib.php

@ -1,363 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Define all the restore steps that will be used by the restore_game_activity_task
*
* @package mod_game
* @subpackage backup-moodle2
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Structure step to restore one game activity
*/
class restore_game_activity_structure_step extends restore_activity_structure_step {
/**
* Defines the neeeded structures.
*/
protected function define_structure() {
$paths = array();
$userinfo = $this->get_setting_value('userinfo');
$paths[] = new restore_path_element('game', '/activity/game');
$paths[] = new restore_path_element('game_export_html', '/activity/game/game_export_htmls/game_export_html');
$paths[] = new restore_path_element('game_export_javame', '/activity/game/game_export_htmls/game_export_javame');
$paths[] = new restore_path_element(
'game_bookquiz_question', '/activity/game/game_bookquiz_questions/game_bookquiz_question');
if ($userinfo) {
$paths[] = new restore_path_element('game_grade', '/activity/game/game_grades/game_grade');
$paths[] = new restore_path_element('game_repetition', '/activity/game/game_repetiotions/game_repetition');
$paths[] = new restore_path_element('game_attempt', '/activity/game/game_attempts/game_attempt');
$paths[] = new restore_path_element('game_query', '/activity/game/game_querys/game_query');
$paths[] = new restore_path_element('game_bookquiz', '/activity/game/game_bookquizs/game_bookquiz');
$paths[] = new restore_path_element('game_bookquiz_chapter',
'/activity/game/game_bookquiz_chapters/game_bookquiz_chapter');
$paths[] = new restore_path_element('game_cross', '/activity/game/game_crosss/game_cross');
$paths[] = new restore_path_element('game_cryptex', '/activity/game/game_cryptexs/game_cryptex');
$paths[] = new restore_path_element('game_hangman', '/activity/game/game_hangmans/game_hangman');
$paths[] = new restore_path_element('game_hiddenpicture', '/activity/game/game_hiddenpictures/game_hiddenpicture');
$paths[] = new restore_path_element('game_millionaire', '/activity/game/game_millionaires/game_millionaire');
$paths[] = new restore_path_element('game_snake', '/activity/game/game_snakes/game_snake');
$paths[] = new restore_path_element('game_sudoku', '/activity/game/game_sudokus/game_sudoku');
}
// Return the paths wrapped into standard activity structure.
return $this->prepare_activity_structure($paths);
}
/**
* Restores the game table.
*
* @param stdClass $data
*/
protected function process_game($data) {
global $DB;
$data = (object)$data;
$oldid = $data->id;
$data->course = $this->get_courseid();
$data->timemodified = $this->apply_date_offset($data->timemodified);
// Insert the game record.
$newitemid = $DB->insert_record('game', $data);
// Immediately after inserting "activity" record, call this.
$this->apply_activity_instance($newitemid);
}
/**
* Restores the game_export_html table.
*
* @param stdClass $data
*/
protected function process_game_export_html($data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
if ($data->id != 0) {
$DB->insert_record('game_export_html', $data);
}
}
/**
* Restores the game_export_javame table.
*
* @param stdClass $game
*/
protected function process_game_export_javame( $data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
if ($data->id != 0) {
$DB->insert_record('game_export_javame', $data);
}
}
/**
* Restores the game_grades table.
*
* @param stdClass $data
*/
protected function process_game_grade( $data) {
global $DB;
$data = (object)$data;
$oldid = $data->id;
$data->gameid = $this->get_new_parentid('game');
$data->userid = $this->get_mappingid('user', $data->userid);
$DB->insert_record('game_grades', $data);
}
/**
* Restores the game_repetitions table.
*
* @param stdClass $data
*/
protected function process_game_repetition( $data) {
global $DB;
$data = (object)$data;
$oldid = $data->id;
$data->gameid = $this->get_new_parentid('game');
$data->userid = $this->get_mappingid('user', $data->userid);
$DB->insert_record('game_repetitions', $data);
}
/**
* Restores the game_attempts table.
*
* @param stdClass $data
*/
protected function process_game_attempt( $data) {
global $DB;
$data = (object)$data;
$oldid = $data->id;
$data->gameid = $this->get_new_parentid('game');
$data->userid = $this->get_mappingid('user', $data->userid);
if (!isset( $data->timestart)) {
$data->timestart = 0;
}
if (!isset( $data->timefinish)) {
$data->timefinish = 0;
}
if (!isset( $data->timelastattempt)) {
$data->timelastattempt = 0;
}
$data->timestart = $this->apply_date_offset($data->timestart);
$data->timefinish = $this->apply_date_offset($data->timefinish);
$data->timelastattempt = $this->apply_date_offset($data->timelastattempt);
$newitemid = $DB->insert_record('game_attempts', $data);
$this->set_mapping('game_attempt', $oldid, $newitemid);
}
/**
* Restores the game_queries table.
*
* @param stdClass $data
*/
protected function process_game_query( $data) {
global $DB;
$data = (object)$data;
$oldid = $data->id;
$data->gameid = $this->get_new_parentid('game');
$data->attemptid = get_mappingid('game_attempt', $data->attemptid);
$data->userid = $this->get_mappingid('user', $data->userid);
$newitemid = $DB->insert_record('game_queries', $data);
$this->set_mapping('game_query', $oldid, $newitemid);
}
/**
* Restores the game_bookquiz table.
*
* @param stdClass $data
*/
protected function process_game_bookquiz( $data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
$DB->insert_record('game_bookquiz', $data);
}
/**
* Restores the game_bookauiz_chapters table.
*
* @param stdClass $data
*/
protected function process_game_bookquiz_chapter( $data) {
global $DB;
$data = (object)$data;
$data->gameid = $this->get_new_parentid('game');
$DB->insert_record('game_bookquiz_chapters', $data);
}
/**
* Restores the game_bookquiz_questions table.
*
* @param stdClass $data
*/
protected function process_game_bookquiz_question( $data) {
global $DB;
$data = (object)$data;
$data->gameid = $this->get_new_parentid('game');
$DB->insert_record('game_bookquiz_questions', $data);
}
/**
* Restores the game_cross table.
*
* @param stdClass $data
*/
protected function process_game_cross( $data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
$DB->insert_record('game_cross', $data);
}
/**
* Restores the game_cryptex table.
*
* @param stdClass $data
*/
protected function process_game_cryptex( $data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
$DB->insert_record('game_cryptex', $data);
}
/**
* Restores the game_hangman table.
*
* @param stdClass $data
*/
protected function process_game_hangman( $data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
$data->queryid = $this->get_mappingid('game_query', $data->queryid);
$DB->insert_record('game_hangman', $data);
}
/**
* Restores the game_hiddenpicture table.
*
* @param stdClass $data
*/
protected function process_game_hiddenpicture( $data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
$DB->insert_record('game_hiddenpicture', $data);
}
/**
* Restores the game_millionaire table.
*
* @param stdClass $data
*/
protected function process_game_millionaire( $data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
$data->queryid = $this->get_mappingid('game_query', $data->queryid);
$DB->insert_record('game_millionaire', $data);
}
/**
* Restores the game_snakes table.
*
* @param stdClass $data
*/
protected function process_game_snake( $data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
$data->queryid = $this->get_mappingid('game_query', $data->queryid);
$DB->insert_record('game_snakes', $data);
}
/**
* Restores the game_sudoku table.
*
* @param stdClass $data
*/
protected function process_game_sudoku( $data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
$DB->insert_record('game_sudoku', $data);
}
/**
* Add Game related files, no need to match by itemname (just internally handled context).
*/
protected function after_execute() {
$this->add_related_files('mod_game', 'snakes_file', null);
$this->add_related_files('mod_game', 'snakes_board', null);
}
}

7
bookquiz/play.php

@ -14,6 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Plays the game bookquiz.
*
* @package mod_game
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**

5
bookquiz/questions.php

@ -17,8 +17,9 @@
/**
* The script supports book
*
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package game
* @package mod_game
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
**/
defined('MOODLE_INTERNAL') || die();

8
classes/event/course_module_instance_list_viewed.php

@ -20,7 +20,7 @@
* The mod_game instance list viewed event.
*
* @package mod_game
* @copyright 2014 Vasilis Daloukas
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@ -42,8 +42,12 @@ defined('MOODLE_INTERNAL') || die();
* @copyright 2007 Vasilis Daloukas
* @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 {
/**
* Create the event.
*
* @param stdClass $course
*/
public static function create_from_course(\stdClass $course) {
$params = array(
'context' => \context_course::instance($course->id)

5
classes/plugininfo/gametool.php

@ -38,6 +38,11 @@ defined('MOODLE_INTERNAL') || die();
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class gametool extends base {
/**
* returns true to is_uninstall_allowed.
*
* @return true
*/
public function is_uninstall_allowed() {
return true;
}

8
cross/cross_class.php

@ -16,6 +16,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Cross class
*
* @package mod_game
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/*

63
cross/play.php

@ -16,13 +16,29 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
// This files plays the game "Crossword".
/**
* This files plays the game "Crossword".
*
* @package mod_game
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require( "cross_class.php");
require( "crossdb_class.php");
/**
* Plays the game crossword.
*
* @param int $id
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $cross
* @param string $g
* @param boolean $endofgame
* param stdClass $context
*/
function game_cross_continue( $id, $game, $attempt, $cross, $g, $endofgame, $context) {
if ($endofgame) {
if ($g == '') {
@ -45,6 +61,13 @@ function game_cross_continue( $id, $game, $attempt, $cross, $g, $endofgame, $con
return game_cross_play( $id, $game, $attempt, $crossm, '', false, false, false, false, false, false, false, true, $context);
}
/**
* Creates a new cross.
*
* @param stdClass $game
* @param int $attemptid
* @param stdClass $crossm
*/
function game_cross_new( $game, $attemptid, &$crossm) {
global $DB, $USER;
@ -102,6 +125,12 @@ function game_cross_new( $game, $attemptid, &$crossm) {
}
}
/**
* Shows the legend.
*
* @param array $legend
* @param string $title
*/
function showlegend( $legend, $title) {
if (count( $legend) == 0) {
return;
@ -114,6 +143,24 @@ function showlegend( $legend, $title) {
}
}
/**
* Plays the game crossword.
*
* @param int $id
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $crossrec
* @param string $g
* @param boolean $onlyshow
* @param boolean $showsolution
* @param boolean $endofgame
* @param boolean $print
* @param boolean $checkbutton
* @param boolean $showhtmlsolutions
* @param boolean $showhtmlprintbutton
* @param boolean $showstudentguess
* @param stdClass $context
*/
function game_cross_play( $id, $game, $attempt, $crossrec, $g, $onlyshow, $showsolution,
$endofgame, $print, $checkbutton, $showhtmlsolutions, $showhtmlprintbutton, $showstudentguess, $context) {
global $CFG, $DB;
@ -1134,6 +1181,18 @@ function game_cross_show_welcome1() {
<?php
}
/**
* Show the legend (horizontal and vertical)
*
* @param int $id
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $cross
* @param string $g
* @param boolean $endofgame
* param stdClass $context
*/
function game_cross_show_legends( $cross) {
ShowLegend( $cross->mlegendh, get_string( 'cross_across', 'game'));
ShowLegend( $cross->mlegendv, get_string( 'cross_down', 'game'));

30
cryptex/cryptexdb_class.php

@ -14,6 +14,14 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* The class CryptexDB loads/save the cryptex from/to database.
*
* @package mod_game
* @copyright 2007 Vasilis Daloukas
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
@ -28,8 +36,8 @@ class CryptexDB extends CrossDB {
* Save cryptex.
*
* @param stdClass $game
* @param array &$crossm
* @param array &$crossd
* @param array $crossm
* @param array $crossd
* @param int id
* @param $letters
*
@ -60,8 +68,8 @@ class CryptexDB extends CrossDB {
/**
* Compute letters.
*
* @param array &$crossm
* @param array &$crossd
* @param array $crossm
* @param array $crossd
*
* @return the letters.
*/
@ -130,7 +138,7 @@ class CryptexDB extends CrossDB {
* @param $rows
* @param $letters
* @param $mask
* @param boolean $showsolution
* @param $showsolution
* @param $textdir
*/
public function displaycryptex( $cols, $rows, $letters, $mask, $showsolution, $textdir) {
@ -226,9 +234,9 @@ class CryptexDB extends CrossDB {
* Loads the cryptex from database.
*
* @param array $crossm
* @param &$mask
* @param &$corrects
* @param &$language
* @param $mask
* @param $corrects
* @param $language
*
* @return questions
*/
@ -293,9 +301,9 @@ class CryptexDB extends CrossDB {
/**
* Calss the computedata of class Cross.
*
* @param &$crossm
* @param &$crossd
* @param &$letters
* @param $crossm
* @param $crossd
* @param $letters
* @param $minwords
* @param $maxwords
* @param $mtimelimit

2
cryptex/play.php

@ -28,7 +28,7 @@ require_once( "cryptexdb_class.php");
/**
* Plays the game cryptex.
*
* @param int $id
* @param $id
* @param stdClass $game
* @param stdClass $atttempt
* @param $cryptexrec

4
db/importsnakes.php

@ -26,6 +26,10 @@ defined('MOODLE_INTERNAL') || die();
game_importsnakes();
/**
* Imports the snakes database.
*/
function game_importsnakes() {
global $DB;

5
db/upgrade.php

@ -41,6 +41,11 @@
defined('MOODLE_INTERNAL') || die();
/**
* Upgrades database
*
* @param $oldversion
*/
function xmldb_game_upgrade($oldversion) {
global $CFG, $DB;

59
export/exporthtml.php

@ -27,6 +27,13 @@ defined('MOODLE_INTERNAL') || die();
require_once( "locallib.php");
require_once( "exportjavame.php");
/**
* Exports to html.
*
* @param stdClass $game
* @param stdClass $context
* @param string $html
*/
function game_onexporthtml( $game, $context, $html) {
global $CFG;
@ -50,6 +57,14 @@ function game_onexporthtml( $game, $context, $html) {
remove_dir( $destdir);
}
/**
* Exports cross to html.
*
* @param stdClass $game
* @param stdClass $context
* @param string $html
* @param string $destdir
*/
function game_onexporthtml_cross( $game, $context, $html, $destdir) {
global $CFG, $DB;
@ -89,6 +104,14 @@ function game_onexporthtml_cross( $game, $context, $html, $destdir) {
game_send_stored_file( $filename);
}
/**
* Repairs questions.
*
* @param stdClass $game
* @param stdClass $context
* @param string $filename
* @param string $destdir
*/
function game_onexporthtml_cross_repair_questions( $game, $context, $filename, $destdir) {
global $CFG, $DB;
@ -207,6 +230,12 @@ function game_onexporthtml_cross_repair_questions( $game, $context, $filename, $
return $filezip;
}
/**
* Prints the header.
*
* @param string $title
* @param boolean $showbody
] */
function game_export_printheader( $title, $showbody=true) {
$ret = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'."\n";
$ret .= '<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="el" xml:lang="el">'."\n";
@ -222,6 +251,14 @@ function game_export_printheader( $title, $showbody=true) {
return $ret;
}
/**
* Exports to html a hangman game.
*
* @param stdClass $game
* @param stdClass $context
* @param string $html
* @param string $destdir
*/
function game_onexporthtml_hangman( $game, $context, $html, $destdir) {
global $CFG, $DB;
@ -283,6 +320,14 @@ function game_onexporthtml_hangman( $game, $context, $html, $destdir) {
game_send_stored_file( $filezip);
}
/**
* Exports to html.
*
* @param stdClass $game
* @param stdClass $context
* @param string $html
* @param string $destdir
*/
function game_onexporthtml_millionaire( $game, $context, $html, $destdir) {
global $CFG, $DB;
@ -336,6 +381,14 @@ function game_onexporthtml_millionaire( $game, $context, $html, $destdir) {
game_send_stored_file($filezip);
}
/**
* Exports to html a "Snakes and Ladders" game.
*
* @param stdClass $game
* @param string $html
* @param string $destdir
* @param stdClass $context
*/
function game_onexporthtml_snakes( $game, $html, $destdir, $context) {
require_once( "exporthtml_millionaire.php");
@ -417,6 +470,12 @@ function game_onexporthtml_snakes( $game, $html, $destdir, $context) {
game_send_stored_file($filezip);
}
/**
* Copy files from source directory to dest directory.
*
* @param string $src
* @param string $destdir
*/
function game_copyfiles( $src, $destdir) {
$handle = opendir( $src);
while (($item = readdir($handle)) !== false) {

18
export/exporthtml_millionaire.php

@ -24,6 +24,17 @@
defined('MOODLE_INTERNAL') || die();
/**
* Exports millionaire.
*
* @param stdClass $game
* @param stdClass $context
* @param $maxanswers
* @param $countofquestions
* @param $retfeedback
* @param $destdir
* @param $files
*/
function game_millionaire_html_getquestions( $game, $context, &$maxanswers, &$countofquestions, &$retfeedback, $destdir, &$files) {
global $CFG, $DB, $USER;
@ -97,6 +108,13 @@ function game_millionaire_html_getquestions( $game, $context, &$maxanswers, &$co
return $ret;
}
/**
* Exports to html a "Millionaire" game.
*
* @param stdClass $game
* @param $questions
* @param $maxquestions
*/
function game_millionaire_html_print( $game, $questions, $maxquestions) {
$color1 = 'black';
$color2 = 'DarkOrange';

99
export/exportjavame.php

@ -24,6 +24,12 @@
defined('MOODLE_INTERNAL') || die();
/**
* Exports to javame.
*
* @param stdClass $game
* @param $javame
*/
function game_onexportjavame( $game, $javame) {
global $CFG, $DB;
@ -88,6 +94,16 @@ function game_onexportjavame( $game, $javame) {
game_send_stored_file( $file);
}
/**
* Exports data.
*
* @param $src
* @param $destmobiledir
* @param $destdir
* @param stdClass $game
* @param $maxwidth
* @param $maxheight
*/
function game_exportjavame_exportdata( $src, $destmobiledir, $destdir, $game, $maxwidth, $maxheight) {
global $CFG;
@ -138,6 +154,17 @@ function game_exportjavame_exportdata( $src, $destmobiledir, $destdir, $game, $m
fclose( $fp);
}
/**
* Exports data of hangman with pictures.
*
* @param $src
* @param $destmobiledir
* @param $destdir
* @param $game
* @param $map
* @param $maxwidth
* @param @maxheight
*/
function game_exportjavame_exportdata_hangmanp( $src, $destmobiledir, $destdir, $game, $map, $maxwidth, $maxheight) {
global $CFG;
@ -164,6 +191,15 @@ function game_exportjavame_exportdata_hangmanp( $src, $destmobiledir, $destdir,
fclose( $fp);
}
/**
* Exports to javame.
*
* @param stdClass $game
* @param stdClass $context
* @param string $exportattachments
* @param $dest
* @param $files
*/
function game_exmportjavame_getanswers( $game, $context, $exportattachment, $dest, &$files) {
$map = array();
$files = array();
@ -180,6 +216,14 @@ function game_exmportjavame_getanswers( $game, $context, $exportattachment, $des
return false;
}
/**
* Exports to javame.
*
* @param stdClass $game
* @param stdClass $context
* @param string $destdir
* @param $files
*/
function game_exmportjavame_getanswers_question( $game, $context, $destdir, &$files) {
$select = 'hidden = 0 AND category='.$game->questioncategoryid;
@ -189,6 +233,14 @@ function game_exmportjavame_getanswers_question( $game, $context, $destdir, &$fi
$select, '*', $game->course, $destdir, $files);
}
/**
* Exports to javame.
*
* @param stdClass $game
* @param stdClass $context
* @param string $destdir
* @param $files
*/
function game_exmportjavame_getanswers_quiz( $game, $context, $destdir, $files) {
global $CFG;
@ -201,6 +253,18 @@ function game_exmportjavame_getanswers_quiz( $game, $context, $destdir, $files)
return game_exmportjavame_getanswers_question_select( $game, $context, $table, $select, "q.*", $game->course, $destdir, $files);
}
/**
* Exports to javame.
*
* @param stdClass $game
* @param stdClass $context
* @param string $table
* @param $select
* @param $fields
* @param $courseid
* @param $destdir
* @param $files
*/
function game_exmportjavame_getanswers_question_select( $game, $context, $table, $select, $fields, $courseid, $destdir, &$files) {
global $CFG, $DB;
@ -235,6 +299,15 @@ function game_exmportjavame_getanswers_question_select( $game, $context, $table,
return $map;
}
/**
* Exports to javame.
*
* @param stdClass $game
* @param stdClass $context
* @param $exportattachments
* @param $destdir
* @param $files
*/
function game_exmportjavame_getanswers_glossary( $game, $context, $exportattachment, $destdir, &$files) {
global $CFG, $DB;
@ -312,6 +385,13 @@ function game_exmportjavame_getanswers_glossary( $game, $context, $exportattachm
return $map;
}
/**
* Create manifest mf.
*
* @param $dir
* @param $javame
* @param $destmobiledir
*/
function game_create_manifest_mf( $dir, $javame, $destmobiledir) {
$fp = fopen( $dir.'/MANIFEST.MF', "w");
fputs( $fp, "Manifest-Version: 1.0\r\n");
@ -328,6 +408,13 @@ function game_create_manifest_mf( $dir, $javame, $destmobiledir) {
fclose( $fp);
}
/**
* Creates a jar file.
*
* @param $srcdir
* @param stdClass $course
* @param $javame
*/
function game_create_jar( $srcdir, $course, $javame) {
global $CFG;
@ -351,6 +438,11 @@ function game_create_jar( $srcdir, $course, $javame) {
return (file_exists( $filejar) ? $filejar : '');
}
/**
* Exports to javame.
*
* @param stdClass $form
*/
function game_showanswers_appendselect( $form) {
switch( $form->gamekind){
case 'hangman':
@ -368,6 +460,13 @@ function game_showanswers_appendselect( $form) {
return '';
}
/**
* Copy images
*
* @param $filename
* @param $dest
* @param $maxwidth
*/
function game_export_javame_smartcopyimage( $filename, $dest, $maxwidth) {
if ($maxwidth == 0) {
copy( $filename, $dest);

7
export/html/snakes/css/modal.css

@ -2,8 +2,11 @@
#fade { /*--Transparent background layer--*/
display: none; /*--hidden by default--*/
background: #000;
position: fixed; left: 0; top: 0;
width: 100%; height: 100%;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: .80;
z-index: 9999;
}

17
export/html/snakes/css/snakes.css

@ -7,7 +7,7 @@ Any Duplication of this code should be avoided*/
margin-left: 5px;
margin-top: 2px;
margin-bottom: 2px;
padding: 0px;
padding: 0;
float: left;
height: 52px;
width: 52px;
@ -32,12 +32,12 @@ Any Duplication of this code should be avoided*/
}
.img1 {
position:absolute;
display:none;
position: absolute;
display: none;
}
body {
background:#ccc;
background: #ccc;
}
#player {
@ -96,12 +96,13 @@ body {
float: left;
font-size: 1.2em;
position: fixed;
top: 50%; left: 50%;
top: 50%;
left: 50%;
z-index: 99999;
/*--CSS3 Box Shadows--*/
-webkit-box-shadow: 0px 0px 20px #000;
-moz-box-shadow: 0px 0px 20px #000;
box-shadow: 0px 0px 20px #000;
-webkit-box-shadow: 0 0 20px #000;
-moz-box-shadow: 0 0 20px #000;
box-shadow: 0 0 20px #000;
/*--CSS3 Rounded Corners--*/
-webkit-border-radius: 10px;
-moz-border-radius: 10px;

11
export/html/snakes/css/subModal.css

@ -14,16 +14,16 @@
* I find setting the color in the css gives me more flexibility
* than the PNG solution.
*/
background-color:transparent !important;
background-color: transparent !important;
background-color: #333;
/* this hack is for opera support
* you can uncomment the background-image if you don't care about opera.
* this gives you the flexibility to use any bg color that you want, instead of the png
*/
background-image: url("../images/maskBG.png") !important; // For browsers Moz, Opera, etc.
background-image:none;
background-image: none;
background-repeat: repeat;
display:none;
display: none;
}
#popupContainer {
@ -46,9 +46,10 @@
position: relative;
z-index: 202;
}
#popupTitleBar {
background-color: #090;
color: # 000;
color: #000;
font-weight: bold;
height: 1.3em;
padding: 5px;
@ -59,10 +60,12 @@
position: relative;
z-index: 203;
}
#popupTitle {
float:left;
font-size: 1.1em;
}
#popupControls {
float: right;
cursor: pointer;

2
export/html/snakes/js/snakes-mod.js

@ -41,7 +41,7 @@ quest[15] = "one";
var z = 0;
var allQuest;
for () {
for (;;) {
if (quest[z] === null) {
break;
}

79
hangman/play.php

@ -24,6 +24,17 @@
defined('MOODLE_INTERNAL') || die();
/**
* Plays the game hangman
*
* @param $id
* @param $game
* @param $attempt
* @param $hangman
* @param $newletter
* @param $action
* @param stdClass $context
*/
function game_hangman_continue( $id, $game, $attempt, $hangman, $newletter, $action, $context) {
global $DB, $USER;
@ -200,6 +211,13 @@ function game_hangman_continue( $id, $game, $attempt, $hangman, $newletter, $act
game_hangman_play( $id, $game, $attempt, $newrec, false, false, $context);
}
/**
* On finish game.
*
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $hangman
*/
function game_hangman_onfinishgame( $game, $attempt, $hangman) {
global $DB;
@ -212,6 +230,17 @@ function game_hangman_onfinishgame( $game, $attempt, $hangman) {
}
}
/**
* Plays the hangman game.
*
* @param $id
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $hangman
* @param boolean $onlyshow
* @param boolean $showsolution
* @param stdClass $context
*/
function game_hangman_play( $id, $game, $attempt, $hangman, $onlyshow, $showsolution, $context) {
global $CFG, $DB, $OUTPUT;
@ -289,6 +318,24 @@ function game_hangman_play( $id, $game, $attempt, $hangman, $onlyshow, $showsolu
}
}
/**
* Shows page.
*
* @param $done
* @param $correct
* @param $wrong
* @param $max
* @param wordline
* @param @wordline2
* @param $links
* @param stdClass $game
* @param $attempt
* @param $hangman
* @param $query
* @param boolean $onlyshow
* @param boolean $showsolution
* @param $stdClass $context
*/
function hangman_showpage(&$done, &$correct, &$wrong, $max, &$wordline, &$wordline2, &$links,
$game, &$attempt, &$hangman, &$query, $onlyshow, $showsolution, $context) {
global $USER, $CFG, $DB;
@ -434,8 +481,16 @@ function hangman_showpage(&$done, &$correct, &$wrong, $max, &$wordline, &$wordli
game_update_queries( $game, $attempt, $query, $score, $answer);
}
// This word is correct.
// If reach the max number of words I have to finish else continue with next word.
/**
* This word is correct. If reach the max number of words I have to finish else continue with next word.
*
* @param $id
* @param $wordline
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $hangman
* @param $query
*/
function hangman_oncorrect( $id, $wordline, $game, $attempt, $hangman, $query) {
global $DB;
@ -452,6 +507,18 @@ function hangman_oncorrect( $id, $wordline, $game, $attempt, $hangman, $query) {
game_hangman_show_nextword( $id, $game, $attempt, $hangman);
}
/**
* On incorrect.
*
* @param $id
* @param $wordline
* @param $word
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $hangman
* @param boolean $onlyshow
* @param boolean $showsolution
*/
function hangman_onincorrect( $id, $wordline, $word, $game, $attempt, $hangman, $onlyshow, $showsolution) {
echo "\r\n<br/><br/><font size=\"5\">\n$wordline</font>\r\n";
@ -474,6 +541,14 @@ function hangman_onincorrect( $id, $wordline, $word, $game, $attempt, $hangman,
game_hangman_show_nextword( $id, $game, $attempt, $hangman, true);
}
/**
* Shows the next word.
*
* @param $id
* @param stdClass $game
* @param stdClass $attempt
* @param stdClass $hangman
*/
function game_hangman_show_nextword( $id, $game, $attempt, $hangman) {
global $CFG, $DB;

24
hiddenpicture/picture.php

@ -36,6 +36,18 @@ $rows = required_param('rows', PARAM_INT);
$filenamenumbers = required_param('n', PARAM_PATH); // Path to numbers picture.
create_image( $id, $attemptid, $foundcells, $cells, $filehash, $cols, $rows, $filenamenumbers);
/**
* Create an image.
*
* @param $id
* @param $attemptid
* @param $foundcells
* @param $cells
* @param $filehash
* @param $cols
* @param $rows
* @param $filenamenumbers
*/
function create_image( $id, $attemptid, $foundcells, $cells, $filehash, $cols, $rows, $filenamenumbers) {
global $CFG;
@ -108,6 +120,18 @@ function create_image( $id, $attemptid, $foundcells, $cells, $filehash, $cols, $
imagedestroy ($imghandle);
}
/**
* Show number.
*
* @param $imghandle
* @param $imgnumbers
* @param $number
* @param $x1
* @param $y1
* @param $width
* @param $height
* @param $sizenumbers
*/
function shownumber( $imghandle, $imgnumbers, $number, $x1 , $y1, $width, $height, $sizenumbers) {
if ($number < 10) {
$widthnumber = $sizenumbers[ 0] / 10;

354
lang/en/game.php

@ -1,354 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
// Translated by Vasilis Daloukas.
// File bookquiz/importodt.php.
$string[ 'bookquiz_not_select_book'] = 'You have not select book';
// File bookquiz/play.php.
$string[ 'bookquiz_empty'] = 'The book is empty';
$string[ 'sudoku_submit'] = 'Grade answers';
// File bookquiz/questions.php.
$string[ 'bookquiz_categories'] = 'Categories';
$string[ 'bookquiz_chapters'] = 'Chapters';
$string[ 'bookquiz_numquestions'] = 'Questions';
// Classes.
$string[ 'eventgamecreated'] = 'Game created';
$string[ 'eventgamedeleted'] = 'Game deleted';
$string[ 'eventgamesupdated'] = 'Game updated';
$string[ 'eventgameviewed'] = 'Game viewed';
$string[ 'eventgameplayed'] = 'Game played';
// File cross/cross_class.php.
$string[ 'lettersall'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
// File cross/crossdb_class.php.
$string[ 'and'] = 'and';
$string[ 'cross_correct'] = 'corrert character';
$string[ 'cross_corrects'] = 'correct characters';
$string[ 'cross_error'] = 'wrong character';
$string[ 'cross_errors'] = 'wrong characters';
$string[ 'cross_found_many'] = 'Found';
$string[ 'cross_found_one'] = 'Found';
$string[ 'grade'] = 'Grade';
$string[ 'cross_disabletransformuppercase'] = 'Disables text-transform:uppercase in CSS';
// File cross/play.php.
$string[ 'cross_across'] = 'Across';
$string[ 'cross_checkbutton'] = 'Check crossword';
$string[ 'cross_down'] = 'Down';
$string[ 'cross_endofgamebutton'] = 'End of crossword game';
$string[ 'cross_error_containsbadchars'] = 'The word contains illegal characteres';
$string[ 'cross_error_wordlength1'] = 'The correct word contains ';
$string[ 'cross_error_wordlength2'] = ' letters.';
$string[ 'cross_pleasewait'] = 'Please wait while cross is loading';
$string[ 'cross_welcome'] = '<h3>Welcome!</h3><p>Click on a word to begin/continue.</p>';
$string[ 'letter'] = 'letter';
$string[ 'letters'] = 'letters';
$string[ 'nextgame'] = 'New game';
$string[ 'no_words'] = 'There are no words';
$string[ 'print'] = 'Print';
$string[ 'win'] = 'Congratulations !!!';
// File cryptex/play.php.
$string[ 'finish'] = 'End of game';
// File db/access.php.
$string[ 'game:addinstance'] = 'Add a new game';
$string[ 'game:attempt'] = 'Play game';
$string[ 'game:deleteattempts'] = 'Delete attempts';
$string[ 'game:grade'] = 'Grade games manually';
$string[ 'game:manage'] = 'Manage';
$string[ 'game:manageoverrides'] = 'Manage game overrides';
$string[ 'game:preview'] = 'Preview Games';
$string[ 'game:reviewmyattempts'] = 'reviewmyattempts';
$string[ 'game:view'] = 'view';
$string[ 'game:viewreports'] = 'viewreports';
// File hangman/play.php.
$string[ 'hangman_correct_phrase'] = 'The correct phrase was: ';
$string[ 'hangman_correct_word'] = 'The correct word was: ';
$string[ 'hangman_gradeinstance'] = 'Grade in whole game';
$string[ 'hangman_letters'] = 'Letters: ';
$string[ 'hangman_restletters_many'] = 'You have <b>{$a}</b> tries';
$string[ 'hangman_restletters_one'] = 'You have <b>ONLY 1</b> try';
$string[ 'hangman_wrongnum'] = 'Wrong: %d out of %d';
$string[ 'nextword'] = 'Next word';
// File hiddenpicture/play.php.
$string[ 'hiddenpicture_mainsubmit'] = 'Grade main answer';
$string[ 'hiddenpicture_nocols'] = 'Have to specify the number of cols horizontaly';
$string[ 'hiddenpicture_nomainquestion'] = 'There are no glossary entries on glossary {$a->name} with an attached picture';
$string[ 'hiddenpicture_norows'] = 'Have to specify the number of cols verticaly';
$string[ 'must_select_glossary'] = 'You must select a glossary';
$string[ 'no_questions'] = "There are no questions";
$string[ 'noglossaryentriesfound'] = 'No glossary entries found';
// File millionaire/play.php.
$string[ 'millionaire_must_select_questioncategory'] = 'You must select one question category';
$string[ 'millionaire_must_select_quiz'] = 'You must select one quiz';
$string[ 'millionaire_lettersall'] = '-';
// File report/overview/report.php.
$string[ 'allattempts'] = 'Show all tries';
$string[ 'allstudents'] = 'Show all $a';
$string[ 'attemptduration'] = 'Attempt duration';
$string[ 'attemptsonly'] = 'Show only students with attempts';
$string[ 'deleteattemptcheck'] = 'Are you absolutely sure you want to completely delete these attempts?';
$string[ 'displayoptions'] = 'Display options';
$string[ 'downloadods'] = 'Download in ODS format';
$string[ 'feedback'] = 'Feedback';
$string[ 'noattemptsonly'] = 'Show $a with no attempts only';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring have made $a->attemptnum attempts';
$string[ 'pagesize'] = 'Questions per page:';
$string[ 'reportoverview'] = 'Overview';
$string[ 'selectall'] = 'Select all';
$string[ 'selectnone'] = 'Deselect all';
$string[ 'showdetailedmarks'] = 'Show mark details';
$string[ 'startedon'] = 'Started on';
$string[ 'timecompleted'] = 'Completed';
$string[ 'unfinished'] = 'open';
$string[ 'withselected'] = 'With selected';
// File snakes/play.php.
$string[ 'snakes_dice'] = 'Dice, $a spots.';
$string[ 'snakes_player'] = 'Player, position: $a.';
// File sudoku/create.php.
$string[ 'sudoku_create_count'] = 'Number of sudokus that will be created';
$string[ 'sudoku_create_start'] = 'Start creating sudokus';
$string[ 'sudoku_creating'] = 'Creating <b>{$a}</b> sudoku';
// File sudoku/play.php.
$string[ 'sudoku_finishattemptbutton'] = 'End of game';
$string[ 'sudoku_guessnumber'] = 'Guess the correct number';
$string[ 'sudoku_noentriesfound'] = 'No words found in glossary';
// File export.php.
$string[ 'export'] = 'Export';
$string[ 'html_hascheckbutton'] = 'Has check button:';
$string[ 'html_hasprintbutton'] = 'Has print button:';
$string[ 'html_title'] = 'Title of html:';
$string[ 'javame_createdby'] = 'Created by:';
$string[ 'javame_description'] = 'Description:';
$string[ 'javame_filename'] = 'Filename:';
$string[ 'javame_icon'] = 'Icon:';
$string[ 'javame_maxpictureheight'] = 'Max picture height:';
$string[ 'javame_maxpicturewidth'] = 'Max picture width:';
$string[ 'javame_name'] = 'Name:';
$string[ 'javame_type'] = 'Type:';
$string[ 'javame_vendor'] = 'Vendor:';
$string[ 'javame_version'] = 'Version:';
// File exporthtml_hangman.php.
$string[ 'hangman_loose'] = '<BIG><B>Game over</B></BIG>';
$string[ 'html_hangman_new'] = 'New';
// File exporthtml_millionaire.php.
$string[ 'millionaire_helppeople'] = 'Help of people';
$string[ 'millionaire_info_people'] = 'People say';
$string[ 'millionaire_info_telephone'] = 'I think that the correct answer is ';
$string[ 'millionaire_info_wrong_answer'] = 'Your answer is wrong<br>The right answer is:';
$string[ 'millionaire_quit'] = 'Quit';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'For the millionaire the source must be {$a} or questions and not';
$string[ 'millionaire_telephone'] = 'Help of telephone';
$string[ 'must_select_questioncategory'] = 'You must select a question category';
$string[ 'must_select_quiz'] = 'You must select a quiz';
// File exporthtml_snakes.php.
$string[ 'html_snakes_check'] = 'Check';
$string[ 'html_snakes_correct'] = 'Correct!';
$string[ 'html_snakes_no_selection'] = 'Have to select something!';
$string[ 'html_snakes_wrong'] = "Your answer isn't correct. Stay on the same seat.";
$string[ 'score'] = 'Score';
// File index.php.
$string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
$string[ 'helpcross'] = 'This game takes words from either a Glossary or quiz short answer questions and generates a random crossword puzzle. Teacher can set the maximum number of columns/rows or words that contains. Student can press the button “Check crossword” to check if the answers are correct. Every crossword is dynamic so it is different to every student.';
$string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
$string[ 'helphangman'] = 'This game takes words from either a Glossary or quiz short answer questions and generates a hangman puzzle. Teacher can set the number of words that each game contains, if shows the first or last letter, or if show the question or the answer at the end.';
$string[ 'helphiddenpicture'] = 'The hidden picture game uncovers each piece of a picture for each question correctly answered by the student. Each number in the hidden picture game displays a question to the student such that when the student answers the question correctly, the number is uncovered to display a piece of the picture.';
$string[ 'helpmillionaire'] = 'A question is displayed to the student which if answered correctly moves up to the next number in the game until the user has completed the questions. If a question is answered incorrectly, the game is over.';
$string[ 'helpsnakes'] = 'A question is displayed to the student which if answered correctly, displays a number on the dice, then game piece moves up the number displayed on the dice.';
$string[ 'helpsudoku'] = 'This game shows a sudoku puzzle to the students with not enough numbers to allow it to be solved. For each question the student correctly answers an additional number is slotted into the puzzle to make it easier to solve.';
$string['modulename'] = 'Game';
$string['modulename_help'] = 'This module contains 8 games: Hangman,Crossword, Cryptex, Millionaire, Sudoku, The hidden picture, Snakes and Ladders and Book with questions';
$string[ 'modulenameplural'] = 'Games';
$string[ 'pluginadministration'] = 'Game administration';
$string[ 'pluginname'] = 'Game';
// File lib.php.
$string[ 'attempt'] = 'Attempt';
$string[ 'bookquiz_questions'] = 'Associate question categories to chapter of book';
$string[ 'export_to_html'] = 'Export to HTML';
$string[ 'export_to_javame'] = 'Export to Javame';
$string[ 'game_bookquiz'] = 'Book with questions';
$string[ 'game_cross'] = 'Crossword';
$string[ 'game_cryptex'] = 'Cryptex';
$string[ 'game_hangman'] = 'Hangman';
$string[ 'game_hiddenpicture'] = 'Hidden Picture';
$string[ 'game_millionaire'] = 'Millionaire';
$string[ 'game_snakes'] = 'Snakes and Ladders';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Info';
$string[ 'noattempts'] = 'No attempts have been made on this game';
$string[ 'percent'] = 'Percent';
$string[ 'reset_game_all'] = 'Delete tries from all games';
$string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
$string[ 'results'] = 'Results';
$string[ 'showanswers'] = 'Show answers';
$string[ 'showattempts'] = 'Show attempts';
// File locallib.php.
$string[ 'attemptfirst'] = 'First attempt';
$string[ 'attemptlast'] = 'Last attempt';
$string[ 'convertfrom'] = '-';
$string[ 'convertto'] = '-';
$string[ 'gradeaverage'] = 'Average grade';
$string[ 'gradehighest'] = 'Highest grade';
// File mod_form.php.
$string[ 'bookquiz_layout'] = 'Layout';
$string[ 'bookquiz_layout0'] = 'Question at the top of the book';
$string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
$string[ 'bookquiz_options'] = 'Bookquiz options';
$string[ 'bottomtext'] = 'Text at the bottom of page';
$string[ 'cross_layout'] = 'Layout';
$string[ 'cross_layout0'] = 'Phrases on the bottom of cross';
$string[ 'cross_layout1'] = 'Phrases on the right of cross';
$string[ 'cross_maxcols'] = 'Maximum number of cols/rows';
$string[ 'cross_max_attempts'] = 'Maximum number of attempts';
$string[ 'cross_maxcomputetime'] = 'Maximum compute time in seconds';
$string[ 'cross_maxwords'] = 'Maximum number of words';
$string[ 'cross_minwords'] = 'Minimum number of words';
$string[ 'cross_options'] = 'Crossword options';
$string[ 'cryptex_maxtries'] = 'Max tries';
$string[ 'cryptex_options'] = 'Cryptex options';
$string[ 'disablesummarize'] = 'Disable summarize';
$string[ 'gameclose'] = 'Close the game';
$string[ 'gameopen'] = 'Open the game';
$string[ 'gameopenclose'] = 'Open and close dates';
$string[ 'gameopenclose_help'] = 'Students can only start their attempt(s) after the open time and they must complete their attempts before the close time.';
$string[ 'grademethod'] = 'Grading method';
$string[ 'glossary_only_approved'] = "Only approved or teacher's glossary entries";
$string[ 'hangman_allowspaces'] = 'Allow spaces in words';
$string[ 'hangman_allowsub'] = 'Allow the symbol - in words';
$string[ 'hangman_imageset'] = 'Select the images of hangman';
$string[ 'hangman_language'] = 'Language of words';
$string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
$string[ 'hangman_maxtries'] = 'Number of words per game';
$string[ 'hangman_options'] = 'Hangman options';
$string[ 'hangman_showcorrectanswer'] = 'Show the correct answer after the end';
$string[ 'hangman_showfirst'] = 'Show first letter of hangman';
$string[ 'hangman_showlast'] = 'Show last letter of hangman';
$string[ 'hangman_showquestion'] = 'Show the questions ?';
$string[ 'language_user_defined'] = 'User defined language';
$string[ 'hiddenpicture_across'] = 'Cells horizontal';
$string[ 'hiddenpicture_down'] = 'Cells down';
$string[ 'hiddenpicture_height'] = 'Set height of picture to (in pixels)';
$string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options';
$string[ 'hiddenpicture_pictureglossary'] = 'The glossary for main question and picture';
$string[ 'hiddenpicture_width'] = 'Set width of picture to (in pixels)';
$string[ 'millionaire_background'] = 'Background color';
$string[ 'millionaire_options'] = 'Millionaire\' options';
$string[ 'millionaire_shuffle'] = 'Randomize questions';
$string[ 'snakes_background'] = 'Background';
$string[ 'snakes_cols'] = 'Cols';
$string[ 'snakes_data'] = 'Positions of Snakes and Ladders';
$string[ 'snakes_file'] = 'File for background';
$string[ 'snakes_footerx'] = 'Space at bootom left (in pixels)';
$string[ 'snakes_footery'] = 'Space at bottom right (in pixels)';
$string[ 'snakes_headerx'] = 'Space at up left (in pixels)';
$string[ 'snakes_headery'] = 'Space at up right (in pixels)';
$string[ 'snakes_layout0'] = 'Question at the top of the image';
$string[ 'snakes_layout1'] = 'Question at the bottom of the image';
$string[ 'snakes_options'] = '\'Snakes and Ladders\' options';
$string[ 'snakes_rows'] = 'Rows';
$string[ 'sourcemodule'] = 'Source of questions';
$string[ 'sourcemodule_book'] = 'Select a book';
$string[ 'sourcemodule_glossary'] = 'Select glossary';
$string[ 'sourcemodule_glossarycategory'] = 'Select category of glossary';
$string[ 'sourcemodule_include_subcategories'] = 'Include subcategories';
$string[ 'sourcemodule_question'] = 'Questions';
$string[ 'sourcemodule_questioncategory'] = 'Select question category';
$string[ 'sourcemodule_quiz'] = 'Select quiz';
$string[ 'sudoku_maxquestions'] = 'Maximum number of questions';
$string[ 'sudoku_options'] = 'Sudoku options';
$string[ 'toptext'] = 'Text at the top of page';
$string[ 'userdefined'] = 'User defined';
// File preview.php.
$string[ 'only_teachers'] = 'Only teacher can see this page';
$string[ 'preview'] = 'Preview';
// File review.php.
$string[ 'attempts'] = 'Attempts';
$string[ 'completedon'] = 'Completed on';
$string[ 'outof'] = '{$a->grade} out of a maximum of {$a->maxgrade}';
$string[ 'review'] = 'Review';
$string[ 'reviewofattempt'] = 'Review of Attempt {$a}';
$string[ 'showall'] = 'Show all';
$string[ 'startagain'] = 'Start again';
$string[ 'timetaken'] = 'Time taken';
// File settings.php.
$string[ 'hangmanimagesets'] = 'Number of image sets used by hangman';
$string[ 'hidebookquiz'] = 'Hide the "Book with questions" game';
$string[ 'hidecross'] = 'Hide the Crossword game';
$string[ 'hidecryptex'] = 'Hide the Cryptex game';
$string[ 'hidehangman'] = 'Hide the Hangman game';
$string[ 'hidehiddenpicture'] = 'Hide the "Hidden Picture" game';
$string[ 'hidemillionaire'] = 'Hide the Millionaire game';
$string[ 'hidesnakes'] = 'Hide the "Snakes and Ladders" game';
$string[ 'hidesudoku'] = 'Hide the Sudoku game';
$string[ 'confighangmanimagesets'] = 'Configs how many set of images are used by hangman';
$string[ 'confighidebookquiz'] = 'Configs if the "Book with questions" game is shown to teachers or not';
$string[ 'confighidecross'] = 'Configs if the Crossword game is shown to teachers or not';
$string[ 'confighidecryptex'] = 'Configs if the Cryptex game is shown to teachers or not';
$string[ 'confighidehangman'] = 'Configs if the Hangman game is shown to teachers or not';
$string[ 'confighidehiddenpicture'] = 'Configs if the "Hidden Picture" game is shown to teachers or not';
$string[ 'confighidemillionaire'] = 'Configs if the Millionaire game is shown to teachers or not';
$string[ 'confighidesnakes'] = 'Configs if the "Snakes and Ladders" game is shown to teachers or not';
$string[ 'confighidesudoku'] = 'Configs if the Sudoku game is shown to teachers or not';
// File showanswers.php.
$string[ 'clearrepetitions'] = 'Clear statistics';
$string[ 'computerepetitions'] = 'Compute statistics again';
$string[ 'feedbacks'] = 'Messages correct answer';
$string[ 'repetitions'] = 'Repetitions';
// File showattempts.php.
$string[ 'lastip'] = 'IP student';
$string[ 'showsolution'] = 'solution';
$string[ 'timefinish'] = 'End of game';
$string[ 'timelastattempt'] = 'Last attempt';
$string[ 'timestart'] = 'Start';
// File tabs.php.
// File view.php.
$string[ 'attemptgamenow'] = 'Attempt game now';
$string[ 'comment'] = 'Comment';
$string[ 'continueattemptgame'] = 'Continue a previous attempt of game';
$string[ 'gameclosed'] = 'This game closed on {$a}';
$string[ 'gamecloseson'] = 'This game will close at {$a}';
$string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
$string[ 'gameopenedon'] = 'This game opened at {$a}';
$string[ 'reattemptgame'] = 'Reattempt game';
$string[ 'yourfinalgradeis'] = 'Your final grade for this game is {$a}.';
Loading…
Cancel
Save