Browse Source

First commit 2.0 to git

MOODLE_20_STABLE
bdaloukas 12 years ago
parent
commit
ebcd4567da
  1. 271
      attempt.php
  2. 70
      backup/moodle2/backup_game_activity_task.class.php
  3. 27
      backup/moodle2/backup_game_settingslib.php
  4. 214
      backup/moodle2/backup_game_stepslib.php
  5. 233
      backup/moodle2/restore_game_activity_task.class.php
  6. 267
      backup/moodle2/restore_game_stepslib.php
  7. 866
      bookquiz/importodt.php
  8. 468
      bookquiz/importppt.php
  9. 370
      bookquiz/play.php
  10. 180
      bookquiz/questions.php
  11. 135
      bookquiz/toc.php
  12. 202
      bookquiz/view.php
  13. 745
      cross/cross_class.php
  14. 244
      cross/crossdb_class.php
  15. 1128
      cross/play.php
  16. 229
      cryptex/cryptexdb_class.php
  17. 332
      cryptex/play.php
  18. 101
      db/access.php
  19. 8
      db/createsnakes.php
  20. 53
      db/importsnakes.php
  21. 1849
      db/importsudoku.php
  22. 353
      db/install.xml
  23. 1482
      db/upgrade.php
  24. BIN
      docs/Readme_en.pdf
  25. BIN
      docs/database.pdf
  26. 1048
      docs/database.xmi
  27. BIN
      docs/readme_el.pdf
  28. 267
      export.php
  29. 40
      export/html/snakes/css/game.css
  30. 41
      export/html/snakes/css/modal.css
  31. 134
      export/html/snakes/css/snakes.css
  32. 15
      export/html/snakes/css/style.css
  33. 69
      export/html/snakes/css/subModal.css
  34. 78
      export/html/snakes/js/common.js
  35. 18
      export/html/snakes/js/jquery-1.6.1.min.js
  36. 298
      export/html/snakes/js/jquery-ui-1.7.2.custom.min.js
  37. 473
      export/html/snakes/js/snakes-mod.js
  38. 295
      export/html/snakes/js/subModal.js
  39. BIN
      export/html/snakes/maskBG.png
  40. 14
      export/html/snakes/modalContent.html
  41. BIN
      export/javame/hangman/simple/KeyCanvas.class
  42. 537
      export/javame/hangman/simple/KeyCanvas.java
  43. BIN
      export/javame/hangman/simple/hangman-1.class
  44. BIN
      export/javame/hangman/simple/hangman.class
  45. 566
      export/javame/hangman/simple/hangman.java
  46. 3
      export/javame/hangman/simple/lang/el_utf8/language.txt
  47. 4
      export/javame/hangman/simple/lang/en_utf8/language.txt
  48. 4
      export/javame/hangman/simple/lang/es_utf8/language.txt
  49. BIN
      export/javame/hangmanp/simple/hangmanp-1.class
  50. BIN
      export/javame/hangmanp/simple/hangmanp.class
  51. 33
      export/javame/hangmanp/simple/hangmanp.java
  52. BIN
      export/javame/hangmanp/simple/keycanvasp.class
  53. 570
      export/javame/hangmanp/simple/keycanvasp.java
  54. 3
      export/javame/hangmanp/simple/lang/el_utf8/language.txt
  55. 4
      export/javame/hangmanp/simple/lang/en_utf8/language.txt
  56. 4
      export/javame/hangmanp/simple/lang/es_utf8/language.txt
  57. 418
      exporthtml.php
  58. 360
      exporthtml_hangman.php
  59. 526
      exporthtml_millionaire.php
  60. 502
      exporthtml_snakes.php
  61. 391
      exportjavame.php
  62. 487
      hangman/play.php
  63. 79
      header.php
  64. BIN
      hiddenpicture/numbers.png
  65. 107
      hiddenpicture/picture.php
  66. 482
      hiddenpicture/play.php
  67. BIN
      images/soundplay.gif
  68. 96
      index.php
  69. 305
      lang/ca/game.php
  70. 304
      lang/de/game.php
  71. 307
      lang/el/game.php
  72. 304
      lang/en/game.php
  73. 305
      lang/es/game.php
  74. 304
      lang/eu/game.php
  75. 304
      lang/fr/game.php
  76. 304
      lang/he/game.php
  77. 306
      lang/hr/game.php
  78. 305
      lang/it/game.php
  79. 306
      lang/lt/game.php
  80. 305
      lang/nl/game.php
  81. 305
      lang/no/game.php
  82. 304
      lang/pl/game.php
  83. 305
      lang/pt_br/game.php
  84. 305
      lang/ru/game.php
  85. 304
      lang/sq/game.php
  86. 304
      lang/uk/game.php
  87. 304
      lang/zh_cn/game.php
  88. 1101
      lib.php
  89. 1896
      locallib.php
  90. 638
      millionaire/play.php
  91. 473
      mod_form.php
  92. 92
      pagelib.php
  93. BIN
      pix/bookquiz/add.gif
  94. BIN
      pix/bookquiz/generateimscp.gif
  95. BIN
      pix/bookquiz/nav_exit.gif
  96. BIN
      pix/bookquiz/nav_next.gif
  97. BIN
      pix/bookquiz/nav_prev.gif
  98. BIN
      pix/bookquiz/nav_prev_dis.gif
  99. BIN
      pix/bookquiz/nav_sep.gif
  100. BIN
      pix/bookquiz/print_book.gif

271
attempt.php

@ -0,0 +1,271 @@
<?php // $Id: attempt.php,v 1.22 2012/07/25 23:07:43 bdaloukas Exp $
/**
* This page prints a particular attempt of game
*
* @author bdaloukas
* @version $Id: attempt.php,v 1.22 2012/07/25 23:07:43 bdaloukas Exp $
* @package game
**/
require_once( "../../config.php");
require_once( "lib.php");
require_once( "locallib.php");
require_once( "hangman/play.php");
require_once( "cross/play.php");
require_once( "cryptex/play.php");
require_once( "millionaire/play.php");
require_once( "sudoku/play.php");
require_once( "bookquiz/play.php");
require_once( "snakes/play.php");
require_once( "hiddenpicture/play.php");
$action = optional_param('action', "", PARAM_ALPHANUM); // action
game_show_header( $id, $game, $course, $context);
game_do_attempt( $id, $game, $action, $course, $context);
function game_show_header( &$id, &$game, &$course, &$context)
{
global $DB, $USER, $PAGE, $OUTPUT;
$id = optional_param('id', 0, PARAM_INT); // Course Module ID, or
$q = optional_param('q', 0, PARAM_INT); // game ID
if ($id) {
if (! $cm = get_coursemodule_from_id('game', $id)) {
print_error('invalidcoursemodule');
}
if (! $course = $DB->get_record('course', array('id' => $cm->course))) {
print_error('coursemisconf');
}
if (! $game = $DB->get_record('game', array('id' => $cm->instance))) {
print_error('invalidcoursemodule');
}
} else {
if (! $game = $DB->get_record('game', array('id' => $q))) {
print_error('invalidgameid', 'game');
}
if (! $course = $DB->get_record('course', array('id' => $game->course))) {
print_error('invalidcourseid');
}
if (! $cm = get_coursemodule_from_instance('game', $game->id, $course->id)) {
print_error('invalidcoursemodule');
}
}
/// Check login and get context.
require_login($course->id, false, $cm);
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
require_capability('mod/game:view', $context);
/// Cache some other capabilites we use several times.
$canattempt = has_capability('mod/game:attempt', $context);
$canreviewmine = has_capability('mod/game:reviewmyattempts', $context);
/// Create an object to manage all the other (non-roles) access rules.
$timenow = time();
//$accessmanager = new game_access_manager(game::create($game->id, $USER->id), $timenow);
/// If no questions have been set up yet redirect to edit.php
//if (!$game->questions && has_capability('mod/game:manage', $context)) {
// redirect($CFG->wwwroot . '/mod/game/edit.php?cmid=' . $cm->id);
//}
/// Log this request.
add_to_log($course->id, 'game', 'view', "view.php?id=$cm->id", $game->id, $cm->id);
/// Initialize $PAGE, compute blocks
$PAGE->set_url('/mod/game/view.php', array('id' => $cm->id));
$edit = optional_param('edit', -1, PARAM_BOOL);
if ($edit != -1 && $PAGE->user_allowed_editing()) {
$USER->editing = $edit;
}
$PAGE->requires->yui2_lib('event');
// Note: MDL-19010 there will be further changes to printing header and blocks.
// The code will be much nicer than this eventually.
$title = $course->shortname . ': ' . format_string($game->name);
if ($PAGE->user_allowed_editing() && !empty($CFG->showblocksonmodpages)) {
$buttons = '<table><tr><td><form method="get" action="view.php"><div>'.
'<input type="hidden" name="id" value="'.$cm->id.'" />'.
'<input type="hidden" name="edit" value="'.($PAGE->user_is_editing()?'off':'on').'" />'.
'<input type="submit" value="'.get_string($PAGE->user_is_editing()?'blockseditoff':'blocksediton').'" /></div></form></td></tr></table>';
$PAGE->set_button($buttons);
}
$PAGE->set_title($title);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
}
function game_do_attempt( $id, $game, $action, $course, $context)
{
global $OUTPUT;
$forcenew = optional_param('forcenew', false, PARAM_BOOL); // Teacher has requested new preview
$endofgame = optional_param('endofgame', false, PARAM_BOOL);
$pos = optional_param('pos', 0, PARAM_INT);
$num = optional_param('num', 0, PARAM_INT);
$q = optional_param('q', 0, PARAM_INT);
$attemptid = optional_param('attemptid', 0, PARAM_INT);
$g = optional_param('g', '', PARAM_RAW);
$finishattempt = optional_param('finishattempt', '', PARAM_TEXT);
$answer = optional_param('answer', '', PARAM_TEXT);
$continue = false;
/// Print the main part of the page
switch( $action)
{
case 'crosscheck':
$attempt = game_getattempt( $game, $detail);
$g = game_cross_unpackpuzzle( $g);
game_cross_continue( $id, $game, $attempt, $detail, $g, $finishattempt, $context);
break;
case 'crossprint':
$attempt = game_getattempt( $game, $detail);
game_cross_play( $id, $game, $attempt, $detail, '', true, false, false, true, $context);
break;
case 'sudokucheck': //the student tries to answer a question
$attempt = game_getattempt( $game, $detail);
game_sudoku_check_questions( $id, $game, $attempt, $detail, $finishattempt, $course, $context);
$continue = true;
break;
case 'sudokucheckg': //the student tries to guess a glossaryenry
$attempt = game_getattempt( $game, $detail);
$endofgame = array_key_exists( 'endofgame', $_GET);
$continue = game_sudoku_check_glossaryentries( $id, $game, $attempt, $detail, $endofgame, $course);
$continue = true;
break;
case 'sudokucheckn': //the user tries to guess a number
$attempt = game_getattempt( $game, $detail);
game_sudoku_check_number( $id, $game, $attempt, $detail, $pos, $num, $context);
$continue = false;
break;
case 'cryptexcheck': //the user tries to guess a question
$attempt = game_getattempt( $game, $detail);
game_cryptex_check( $id, $game, $attempt, $detail, $q, $answer, $context);
break;
case 'bookquizcheck': //the student tries to answer a question
$attempt = game_getattempt( $game, $detail);
game_bookquiz_check_questions( $id, $game, $attempt, $detail, $context);
break;
case 'snakescheck': //the student tries to answer a question
$attempt = game_getattempt( $game, $detail);
game_snakes_check_questions( $id, $game, $attempt, $detail, $context);
break;
case 'snakescheckg': //the student tries to answer a question from glossary
$attempt = game_getattempt( $game, $detail);
game_snakes_check_glossary( $id, $game, $attempt, $detail, $context);
break;
case 'hiddenpicturecheck': //the student tries to answer a question
$attempt = game_getattempt( $game, $detail);
$continue = game_hiddenpicture_check_questions( $id, $game, $attempt, $detail, $finishattempt, $context);
break;
case 'hiddenpicturecheckg': //the student tries to guess a glossaryenry
$attempt = game_getattempt( $game, $detail);
game_hiddenpicture_check_mainquestion( $id, $game, $attempt, $detail, $endofgame, $context);
break;
default:
$continue = true;
break;
}
if( $continue){
game_create( $game, $id, $forcenew, $course, $context);
}
/// Finish the page
echo $OUTPUT->footer();
}
function game_create( $game, $id, $forcenew, $course, $context)
{
global $USER, $CFG, $DB;
$attempt = game_getattempt( $game, $detail);
$chapterid = optional_param('chapterid', 0, PARAM_INT);
$newletter = optional_param('newletter', '', PARAM_ALPHA);
$action2 = optional_param('action2', '', PARAM_ALPHA);
switch( $game->gamekind)
{
case 'cross':
game_cross_continue( $id, $game, $attempt, $detail, '', $forcenew, $context);
break;
case 'hangman':
game_hangman_continue( $id, $game, $attempt, $detail, $newletter, $action2, $context);
break;
case 'millionaire':
game_millionaire_continue( $id, $game, $attempt, $detail, $context);
break;
case 'bookquiz':
game_bookquiz_continue( $id, $game, $attempt, $detail, $chapterid, $context);
break;
case 'sudoku':
game_sudoku_continue( $id, $game, $attempt, $detail, '', $context);
break;
case 'cryptex':
game_cryptex_continue( $id, $game, $attempt, $detail, $forcenew, $context);
break;
case 'snakes':
game_snakes_continue( $id, $game, $attempt, $detail, $context);
break;
case 'hiddenpicture':
game_hiddenpicture_continue( $id, $game, $attempt, $detail, $context);
break;
default:
print_error( "Game {$game->gamekind} not found");
break;
}
}
function game_cross_unpackpuzzle( $g)
{
$ret = "";
$len = textlib::strlen( $g);
while( $len)
{
for( $i=0; $i < $len; $i++)
{
$c = textlib::substr( $g, $i, 1);
if( $c >= '1' and $c <= '9'){
if( $i > 0){
//found escape character
if( textlib::substr( $g, $i-1, 1) == '/'){
$g = textlib::substr( $g, 0, $i-1).textlib::substr( $g, $i);
$i--;
$len--;
continue;
}
}
break;
}
}
if( $i < $len){
//found the start of a number
for( $j=$i+1; $j < $len; $j++)
{
$c = textlib::substr( $g, $j, 1);
if( $c < '0' or $c > '9'){
break;
}
}
$count = textlib::substr( $g, $i, $j-$i);
$ret .= textlib::substr( $g, 0, $i) . str_repeat( '_', $count);
$g = textlib::substr( $g, $j);
$len = textlib::strlen( $g);
}else
{
$ret .= $g;
break;
}
}
return $ret;
}

70
backup/moodle2/backup_game_activity_task.class.php

@ -0,0 +1,70 @@
<?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
* class backup_game_activity_task
* @author
* @version $Id: backup_game_activity_task.class.php,v 1.2 2012/07/25 11:16:04 bdaloukas Exp $
* @package game
**/
require_once($CFG->dirroot . '/mod/game/backup/moodle2/backup_game_stepslib.php'); // Because it exists (must)
require_once($CFG->dirroot . '/mod/game/backup/moodle2/backup_game_settingslib.php'); // Because it exists (optional)
/**
* 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'));
}
/**
* Code the transformations to perform in the activity in
* order to get transportable (encoded) links
*/
static public function encode_content_links($content) {
global $CFG;
$base = preg_quote($CFG->wwwroot,"/");
// Link to the list of gamess
$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;
}
}

27
backup/moodle2/backup_game_settingslib.php

@ -0,0 +1,27 @@
<?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 moodlecore
* @subpackage backup-moodle2
* @copyright 2010 onwards YOUR_NAME_GOES_HERE {@link YOUR_URL_GOES_HERE}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// This activity has not particular settings but the inherited from the generic
// backup_activity_task so here there isn't any class definition, like the ones
// existing in /backup/moodle2/backup_settingslib.php (activities section)

214
backup/moodle2/backup_game_stepslib.php

@ -0,0 +1,214 @@
<?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
* @version $Id: backup_game_stepslib.php,v 1.5 2012/07/25 11:16:04 bdaloukas Exp $
*/
/**
* Define all the backup steps that will be used by the backup_game_activity_task
*/
/**
* Define the complete game structure for backup, with file and id annotations
*/
class backup_game_activity_structure_step extends backup_activity_structure_step {
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'
));
$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'));
$bookquiz_chapters = new backup_nested_element('game_bookquiz_chapters');
$bookquiz_chapter = new backup_nested_element('game_bookquiz_chapter', array('id'), array( 'chapterid'));
$bookquiz_questions = new backup_nested_element('game_bookquiz_questions');
$bookquiz_question = 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($bookquiz_questions);
$bookquiz_questions->add_child($bookquiz_question);
$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($bookquiz_chapters);
$bookquiz_chapters->add_child($bookquiz_chapter);
$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));
$bookquiz_question->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));
$bookquiz_chapter->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');
$bookquiz_question->annotate_ids('book_chapter', 'chapterid');
$bookquiz_question->annotate_ids('question_category', 'questioncategoryid');
$bookquiz_chapter->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);
}
}

233
backup/moodle2/restore_game_activity_task.class.php

@ -0,0 +1,233 @@
<?php // $Id: restore_game_activity_task.class.php,v 1.3 2012/07/25 11:16:04 bdaloukas Exp $
// 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
* @version $Id: restore_game_activity_task.class.php,v 1.3 2012/07/25 11:16:04 bdaloukas Exp $
*/
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);
//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);
}
}
//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);
}
}
//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);
}
}
//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);
}
}
//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);
}
}
}
}

267
backup/moodle2/restore_game_stepslib.php

@ -0,0 +1,267 @@
<?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
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Define all the restore steps that will be used by the restore_game_activity_task
*/
/**
* Structure step to restore one game activity
*/
class restore_game_activity_structure_step extends restore_activity_structure_step {
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);
}
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);
}
protected function process_game_export_html($data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
$DB->insert_record('game_export_html', $data);
}
protected function process_game_export_javame($data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
$DB->insert_record('game_export_javame', $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);
}
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);
}
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);
}
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);
}
protected function process_game_bookquiz($data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
$DB->insert_record('game_bookquiz', $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);
}
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);
}
protected function process_game_cross($data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
$DB->insert_record('game_cross', $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);
}
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);
}
protected function process_game_hiddenpicture($data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
$DB->insert_record('game_hiddenpicture', $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);
}
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);
}
protected function process_game_sudoku($data) {
global $DB;
$data = (object)$data;
$data->id = $this->get_new_parentid('game');
$DB->insert_record('game_sudoku', $data);
}
protected function after_execute() {
// Add Game related files, no need to match by itemname (just internally handled context)
$this->add_related_files('mod_game', 'snakes_file', null);
$this->add_related_files('mod_game', 'snakes_board', null);
}
}

866
bookquiz/importodt.php

@ -0,0 +1,866 @@
<?php // $Id: importodt.php,v 1.5 2012/07/25 11:16:04 bdaloukas Exp $
/**
* This is a very rough importer for odt
*
* The script supports book
* Is based on class office from http://www.phpclasses.org/browse/package/2586.html
*
* @version $Id: importodt.php,v 1.5 2012/07/25 11:16:04 bdaloukas Exp $
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package game
**/
require_once("../../../config.php");
require_once( "../header.php");
require_once("../locallib.php");
$subchapter = optional_param('subchapter', '', PARAM_ALPHA);
$overwrite = optional_param('overwrite', 0, PARAM_INT);
$attempt = game_getattempt( $game, $detail);
$bookid = $game->bookid;
if( $bookid == 0){
print_error( get_string( 'bookquiz_not_select_book', 'game'));
}
if ($form = data_submitted())
{ /// Filename
if (empty($_FILES['newfile']))
{ // file was just uploaded
notify(get_string("uploadproblem") );
}
if ((!is_uploaded_file($_FILES['newfile']['tmp_name']) or $_FILES['newfile']['size'] == 0))
{
notify(get_string("uploadnofilefound") );
} else
{ // Valid file is found
if ( readdata( $course->id, 'game', $dirtemp, $r_levels, $r_titles, $r_texts, $dirfordelete))
{ // first try to reall all of the data in
if( $overwrite){
game_bookquiz_deletebook( $course->id, $bookid);
}
$pageobjects = extract_data( $course->id, 'book', $bookid, $dirtemp, $subchapter, $r_levels, $r_titles, $r_texts); // parse all the html files into objects
clean_temp( $dirfordelete); // all done with files so dump em
$objects = game_bookquiz_create_objects( $pageobjects, $bookid); // function to preps the data to be sent to DB
if( !game_bookquiz_save_objects($objects))
{ // sends it to DB
print_error('could not save');
}
}else
print_error('could not get data');
print_continue("{$CFG->wwwroot}/mod/game/view.php?id=$cm->id");
echo $OUTPUT->footer($course);
exit;
}
}
/// Print upload form
print_heading_with_help( get_string( "bookquiz_import_odt", "game"), "importodt", "game");
echo $OUTPUT->box_start('center');
?>
<form id="theform" enctype="multipart/form-data" method="post">
<input type="hidden" name="id" value="<?php echo $cm->id; ?>" />
<table cellpadding="5">
<tr><td align="right"><b>
<?php print_string("upload"); ?> :</td><td>
<input name="newfile" type="file" size="50" />
<tr valign="top">
<td valign="top" align="right">
<b><?php echo get_string( 'bookquiz_subchapter', 'game');?>:</b>
</td>
<td>
<input name="subchapter" type="checkbox" value="1" checked="1" /> </td>
</tr>
<tr valign="top"><td align="right"><b></b></td><td align="left"><select id="overwrite" name="overwrite" >
<option value="0" selected="selected">Προσθήκη στο τέλος</option>
<option value="1">Αντικατάσταση</option>
</select>
</td></tr>
</td></tr><tr><td>&nbsp;</td><td>
<input type="submit" name="save" value="<?php echo get_string("uploadthisfile"); ?>" />
</td></tr>
</table>
</form>
<?php
echo $OUTPUT->box_end();
echo $OUTPUT->footer($course);
// START OF FUNCTIONS
//the r_basedir variable contains the directory where the temp files are
//At the end the directory must be deleted
function readdata( $courseid, $modname, &$r_basedir, &$r_levels, &$r_titles, &$r_texts, &$dirfordelete)
{
// this function expects a odt file to be uploaded. Then it parses
// the content.xml to determine.
// Then copies the image
global $CFG;
// create a random upload directory in temp
$newdir = $CFG->dataroot."/temp/$modname";
if (!file_exists( $newdir))
mkdir( $newdir);
$i = 1;
srand((double)microtime()*1000000);
while(true)
{
$r_basedir = "$modname/$i-".rand(0,10000);
$newdir = $CFG->dataroot.'/temp/'.$r_basedir;
if (!file_exists( $newdir))
{
mkdir( $newdir);
$newdir .= '/';
break;
}
$i++;
}
$dirfordelete = $r_basedir;
$r_basedir .= '/';
$zipfile = $_FILES["newfile"]["name"];
$tempzipfile = $_FILES["newfile"]["tmp_name"];
// create our directory
$path_parts = pathinfo($zipfile);
$dirname = substr($zipfile, 0, strpos($zipfile, '.'.$path_parts['extension'])); // take off the extension
if (!file_exists($newdir.$dirname)){
mkdir($newdir.$dirname);
}
// move our uploaded file to temp/game
move_uploaded_file( $tempzipfile, $newdir.$zipfile);
//if the file ends with .lnk then use .odt instead
if( substr( $zipfile, -4) == ".lnk")
$zipfile = substr( $zipfile, 0, -4).".odt";
// unzip it!
unzip_file ( $newdir.$zipfile, $newdir.$dirname, false);
$r_basedir .= $dirname; // update the base
$newdir .= $dirname;
// this is the file where we get the names of the files for the slides (in the correct order too)
$content = $newdir.'/content.xml';
$data = file_get_contents( $content);
$content = $newdir.'/styles.xml';
if (file_exists( $content)){
$datastyle = file_get_contents( $content);
}else
{
$datastyle = '';
}
oo_game_convert_ver2( $data, $datastyle, $r_levels, $r_titles, $r_texts);
return true;
}
////////////////////////
function oo_game_convert_ver2( $data, $datastyle, &$r_levels, &$r_titles, &$r_texts)
{
$r_levels = array();
$r_titles = array();
$r_texts = array();
// we have tables, encode it here so all <text:p in them don't get preg_match_all few lines later
IF(ereg('table:table', $data))
{
$data = str_replace('<table:table', '<text:p text:style-name="RKRK"><table:table', $data);
$data = str_replace('</table:table>', '</table:table></text:p>', $data);
$data = preg_replace('#<table:table(.*?)</table:table>#es', "base64_encode('\\1')", $data);
}
$styles = array();
game_bookquiz_convert_ver2_computestyles( $datastyle, $styles, true);
game_bookquiz_convert_ver2_computestyles( $data, $styles, false);
game_bookquiz_splitsections($data, $positions, $inputs, $titles, $titleframes, $texts);
for( $i=0; $i < count( $positions); $i++)
{
preg_match_all( "#text:outline-level=\"([0-9]*)\"#es", $inputs[ $i], $matches);
$levels = $matches[ 1];
if( count( $levels) > 0){
$level = $levels[ 0];
}else
{
$level = 0;
}
$r_levels[] = $level;
$r_titles[] = strip_tags( $titles[ $i]);
$textframe = game_bookquiz_convert($titleframes[ $i], $styles, $images);
$text = game_bookquiz_convert($texts[ $i], $styles, $images);
if( $textframe != ''){
$text = $textframe.'<BR>'.$text;
}
echo "<hr><b>".$titles[ $i]."</b><br>".$text."\r\n\r\n\r\n\r\n";
$r_texts[] = $text;
}
}
function extract_data( $courseid, $modname, $id, $basedir, $subchapter, $levels, $titles, $texts)
{
global $CFG;
global $matches;
$dirtemp = $CFG->dataroot.'/temp/'.$basedir;
for($i=0; $i < count( $levels); $i++){
echo $levels[ $i]." ".$titles[ $i]."<BR>";
}
$extractedpages = array();
// directory for images
make_mod_upload_directory( $courseid); // make sure moddata is made
make_upload_directory( $courseid.'/moddata/'.$modname, false);
make_upload_directory( $courseid.'/moddata/'.$modname."/".$id, false); // we store our images in a subfolder in here
$imagedir = $CFG->dataroot.'/'.$courseid.'/moddata/'.$modname."/".$id;
if ($CFG->slasharguments)
$imagelink = $CFG->wwwroot.'/file.php/'.$courseid.'/moddata/'.$modname."/".$id;
else
$imagelink = $CFG->wwwroot.'/file.php?file=/'.$courseid.'/moddata/'.$modname."/".$id;
// try to make a unique subfolder to store the images
$i = 1;
while(true)
{
$newdir = $imagedir.'/'.$i;
if (!file_exists( $newdir))
{
// ok doesnt exist so make the directory and update our paths
mkdir( $newdir);
$imagedir = $newdir;
$imagelink = $imagelink.'/'.$i;
break;
}
$i++;
}
for( $i=0; $i < count( $titles); $i++)
{
// start building our page
$page = new stdClass;
$page->title = $titles[ $i];
$page->content = $texts[ $i];
//$page->source = $path_parts['basename']; // need for book only
$page->subchapter = ( $levels[ $i] >= 2);
//check if the nexts are subchapters
for( $j=$i+1; $j < count( $titles); $j++){
if( $levels[ $j] > 2){
$page->content .= '<br><b><u>'.$titles[ $j].'</u></b><br>'.$texts[ $j];
$i = $j;
continue;
}
break;
}
preg_match_all('#="Pictures/([a-z .A-Z_0-9]*)"#es', $page->content, $imgs);
foreach ($imgs[1] as $img)
{
$src = $dirtemp.'/Pictures/'.$img;
$dest = $imagedir.'/'.$img;
rename( $src, $dest);
$page->content = str_replace( "Pictures/$img", $imagelink."/".$img, $page->content);
}
// add the page to the array;
$extractedpages[] = $page;
} // end $pages foreach loop
return $extractedpages;
}
/**
Clean up the temp directory
*/
function clean_temp( $base)
{
global $CFG;
// this function is broken, use it to clean up later
// should only clean up what we made as well because someone else could be importing ppt as well
$dir = $CFG->dataroot.'/temp/'.$base;
remove_dir( $dir);
//game_full_rmdir( $dir);
}
/**
Creates objects an chapter object that is to be inserted into the database
*/
function game_bookquiz_create_objects( $pageobjects, $bookid)
{
global $DB;
$chapters = array();
$lastpagenum = $DB->get_field('book_chapters', 'MAX(pagenum) as num', array( 'bookid' => $bookid));
foreach ($pageobjects as $pageobject)
{
$chapter = new stdClass;
// same for all chapters
$chapter->bookid = $bookid;
$chapter->pagenum = ++$lastpagenum;
$chapter->timecreated = time();
$chapter->timemodified = time();
$chapter->subchapter = 0;
if ($pageobject->title == '')
$chapter->title = "Page $count"; // no title set so make a generic one
else
$chapter->title = addslashes($pageobject->title);
$chapter->subchapter = $pageobject->subchapter;
$content = str_replace("\n", '', $pageobject->content);
$content = str_replace("\r", '', $content);
$content = str_replace('&#13;', '', $content); // puts in returns?
$content = '<p>'.$content.'</p>';
$chapter->content = addslashes( $content);
$chapters[] = $chapter;
}
return $chapters;
}
/**
Save the chapter objects to the database
*/
function game_bookquiz_save_objects($chapters)
{
global $DB;
// nothing fancy, just save them all in order
foreach ($chapters as $chapter)
{
if (!$newid=$DB->insert_record('book_chapters', $chapter)) {
print_error('Could not insert to table book_chapters');
}
}
return true;
}
//splits the data to
function game_bookquiz_splitsections($data, &$positions, &$inputs, &$titles, &$titleframes, &$texts)
{
preg_match_all('#<text:h (.*?)>(.*?)</text:h>#es', $data, $matches, PREG_OFFSET_CAPTURE);
$in = $matches[ 1] ;
$title = $matches[ 2];
$positions = array();
$inputs = array();
$titles = array();
$oldposition = 0;
$oldlen = 0;
for($i=0; $i < count( $in); $i++)
{
$inputs[] = $in[ $i][ 0];
$newposition = $in[ $i][ 1];
$positions[] = $newposition;
$titlenet = $title[ $i][ 0];
$titleframe = '';
//frames inside header
preg_match_all('#<draw:frame (.*?)>(.*?)</draw:frame>#es', $titlenet, $titlematches, PREG_OFFSET_CAPTURE);
$frames = $titlematches[ 2];
if( count( $frames) > 0){
for($j=0; $j < count( $frames); $j++)
{
$titleframe .= $frames[ $j][ 0];
$titlenet = substr( $titlenet, $frames[ $j][ 1] + strlen( $frames[ $j][ 0]) + 13);
}
}
$titles[] = $titlenet;
$titleframes[] = $titleframe;
if( $i > 0){
$texts[] = substr( $data, $oldposition+$oldlen, $newposition - $oldposition - $oldlen);
}
$oldlen = strlen( $title[ $i][ 0]) + strlen( $in[ $i][ 0]) + 10;
$oldposition = $newposition;
}
$newposition = strlen( $data);
$texts[] = substr( $data, $oldposition+$oldlen, $newposition - $oldposition - $oldlen);
}
function game_bookquiz_convert( $data, $styles, &$images)
{
$images = array();
// get data
preg_match_all('#<text:p text:style-name="([a-z A-Z_0-9]*)">(.*?)</text:p>#es', $data, $text);
$originals = $text[ 0];
$names = $text[ 1];
$texts = $text[ 2];
for( $i=0; $i < count( $texts); $i++)
{
$name = $names[ $i];
$text = $texts[ $i];
//repairs draw:frame
$pattern = "#<draw:frame draw:style-name=\"([a-z .A-Z_0-9]*)\" (.*?)<draw:image xlink:href=\"Pictures/([a-z .A-Z_0-9]*)(.*?)</draw:frame>#es";
preg_match_all( $pattern, $text, $matches);
if( count( $matches[ 1]) ){
$new = game_bookquiz_convert_image( $matches, $styles, $images);
$data = str_replace( $originals[ $i], $new, $data);
}else IF($name == 'RKRK')
{
$new = game_bookquiz_convert_RKRK( $text);
$data = str_replace( $originals[ $i], $new, $data);
}else
{
$new = '<P>'.game_bookquiz_convert_text( $text, $styles).'</P>';
$data = str_replace( $originals[ $i], $new, $data);
}
}
// repairs text:span text:style-name
preg_match_all( '#<text:span text:style-name="([a-z .A-Z_0-9]*)">(.*?)</text:span>#es', $data, $text);
$originals = $text[ 0];
$names = $text[ 1];
$texts = $text[ 2];
for( $i=0; $i < count( $texts); $i++)
{
$name = $names[ $i];
$text = $texts[ $i];
$pattern = "#<draw:frame draw:style-name=\"([a-z .A-Z_0-9]*)\" (.*?)<draw:image xlink:href=\"Pictures/([a-z .A-Z_0-9]*)(.*?)</draw:frame>#es";
preg_match_all( $pattern, $text, $matches);
if( count( $matches[ 1]) ){
$new = game_bookquiz_convert_image( $matches, $styles, $images);
$data = str_replace( $originals[ $i], $new, $data);
}else IF($name == 'RKRK')
{
$new = game_bookquiz_convert_RKRK( $text);
$data = str_replace( $originals[ $i], $new, $data);
}else
{
$new = "<span ".$styles[ $name].'>'.game_bookquiz_convert_text( $text, $styles).'</span>';
$data = str_replace( $originals[ $i], $new, $data);
}
}
// repairs text:a
preg_match_all( '#<text:a (.*?) xlink:href="(.*?)">(.*?)</text:a>#es', $data, $text);
$originals = $text[ 0];
$hrefs = $text[ 2];
$texts = $text[ 3];
for( $i=0; $i < count( $texts); $i++)
{
$href = $hrefs[ $i];
$text = $texts[ $i];
$new = "<a href=\"$href\">$text</a>";
$data = str_replace( $originals[ $i], $new, $data);
}
//repair text:list
preg_match_all( '#<text:list text:style-name="([a-z A-Z_0-9]*)">(.*?)</text:list>#es', $data, $text);
$originals = $text[ 0];
$names = $text[ 1];
$texts = $text[ 2];
for( $i=0; $i < count( $texts); $i++)
{
$new = '<UL>'.$texts[ $i].'</UL>';
$data = str_replace( $originals[ $i], $new, $data);
//I have to repair the listitems
preg_match_all( '#<text:list-item>(.*?)</text:list-item>#es', $data, $listitems);
$originallistitems = $listitems[ 0];
$items = $listitems[ 1];
for( $j=0; $j < count( $items); $j++){
$new = '<LI>'.$items[ $j];
$data = str_replace( $originallistitems[ $j], $new, $data);
}
}
$data = str_replace( '<text:line-break/>', '<br>', $data);
return $data;
}
function game_bookquiz_convert_text( $text, $styles)
{
$pattern = "#<text:span text:style-name=\"([a-z .A-Z_0-9]*)\">(.*?)</text:span>#es";
preg_match_all( $pattern, $text, $matches);
$originals = $matches[ 0];
$names = $matches[ 1];
$spantexts = $matches[ 2];
for( $i=0; $i < count( $names); $i++)
{
$name = $names[ $i];
$style = $styles[ $name];
$new = "<text:span style=\"$style\">".$spantexts[ $i]."</text:span>";
$text = str_replace( $originals[ $i], $new, $text);
}
return $text;
}
function game_bookquiz_convert_image( $matches, $xmlstyles, &$images)
{
$ret = '';
$styles = $matches[ 1];
$pictures = $matches[ 3];
for( $j=0; $j < count( $pictures); $j++){
$style = $styles[ $j];
$ret .= '<div class="'.$style.'"><img src="Pictures/'.$pictures[$j].'"></div>';
$images[] = $pictures[$j];
}
return $ret;
}
function game_bookquiz_convert_RKRK( $text)
{
$table = base64_decode($text);
$table = stripslashes($table);
$table = strtr($table, array('</table:table>' => '</table>', '<table:table-row>' => '<tr>', '</table:table-row>' => '</tr>', '</table:table-cell>' => '</td>', '</table:table-header-rows>' => '', '<table:table-header-rows>' => '', '>' => ">\n", '</text:p>' => ''));
//preg_match_all('#table:name="([a-z A-Z_0-9]*)" table:style-name="([a-z A-Z_0-9]*)">#es', $table, $repl);
preg_match_all('#table:name="(.*?)" table:style-name="(.*?)">#es', $table, $repl);
foreach($repl[0] as $val)
{
//$table = str_replace($val, '<table border="1"><tr><td>', $table);
$table = str_replace($val, '<table border="1"><tr>', $table);
}
//preg_match_all('#<text:p text:style-name="([a-z A-Z_0-9]*)">#es', $table, $repl);
preg_match_all('#<text:p text:style-name="(.*?)">#es', $table, $repl);
foreach($repl[0] as $key => $val)
{
$table = str_replace($val, '', $table);
}
preg_match_all('#<table:table-column (.*?)">#es', $table, $repl);
foreach($repl[0] as $val)
{
$table = str_replace($val, '', $table);
}
//preg_match_all('#<table:table-cell table:style-name="([\.a-z A-Z_0-9]*)" office:value-type="([a-z A-Z_0-9]*)">#es', $table, $repl);
preg_match_all('#<table:table-cell table:style-name="(.*?)" office:value-type=(.*?)">#es', $table, $repl);
foreach($repl[0] as $val)
{
$table = str_replace($val, '<td>', $table);
}
//maybe there are a lot of pictures inside a table
preg_match_all('#xlink:href="Pictures/([a-z.A-Z_0-9]*)"#es', $table, $repl);
foreach( $repl[ 1] as $picture)
{
$table = str_replace('<draw:image xlink:href="Pictures/'.$picture.'" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>', '<img src="Pictures/'.$picture.'">', $table);
}
if( strpos( $table,"</table>") === false)
$table .= "</table>";
$ret = '<BR>'.$table.'<BR>';
return $ret;
}
/*
function game_bookquiz_oo_unzip($file, $dir)
{
unzip_file ( $file, $dir, false);
$dir .= '/';
if( file_exists( $dir.'content.xml')){
$content = file_get_contents( $dir.'content.xml');
}else
{
$content = '';
}
if( file_exists( $dir.'styles.xml')){
$contentstyles = file_get_contents( $dir.'styles.xml');
}else
{
$contentstyles = '';
}
$img = array();
$handle = opendir($dir.'Pictures');
while (false!==($item = readdir($handle))) {
if($item != '.' && $item != '..') {
if(!is_dir($dir.'/'.$item)) {
$img[ $item] = file_get_contents( $dir.'/'.$item);
}else{
unlink($dir.'/'.$item);
}
}
}
}
*/
function old_game_bookquiz_oo_unzip($file, $save, $dir)
{
IF($zip = game_zip_open($file))
{
while ($zip_entry = game_zip_read($zip))
{
$filename = game_zip_entry_name($zip_entry);
IF($filename == 'content.xml' and game_zip_entry_open($zip, $zip_entry, "r"))
{
$content = game_zip_entry_read($zip_entry, game_zip_entry_filesize($zip_entry));
game_zip_entry_close($zip_entry);
}
IF( $filename == 'styles.xml' and game_zip_entry_open($zip, $zip_entry, "r"))
{
$contentstyles = game_zip_entry_read($zip_entry, game_zip_entry_filesize($zip_entry));
game_zip_entry_close($zip_entry);
}
IF(ereg('Pictures/', $filename) and !ereg('Object', $filename) and game_zip_entry_open($zip, $zip_entry, "r"))
{
$img[$filename] = game_zip_entry_read($zip_entry, game_zip_entry_filesize($zip_entry));
game_zip_entry_close($zip_entry);
}
}
IF(isset($content))
{
IF($save == false)
return array($content, $img);
else
{
file_put_contents("$dir/content.xml", $content);
IF(isset($contentstyles)){
file_put_contents("$dir/styles.xml", $contentstyles);
}
IF(is_array($img))
{
IF(!is_dir("$dir/Pictures"))
mkdir( "$dir/Pictures");
foreach($img as $key => $val)
file_put_contents("$dir/$key", $val);
}
}
}
}
}
function game_bookquiz_deletebook( $courseid, $bookid)
{
global $CFG;
if( !delete_records( 'book_chapters', 'bookid', $bookid)){
print_error( "Can't delete records from book_chapters bookid=$bookid");
}
game_full_rmdir( "$CFG->dataroot/$courseid/moddata/book/$bookid");
}
function game_bookquiz_convert_ver2_computestyles( $data, &$styles, $isstyle)
{
preg_match_all('#<style:style style:name="(.*?)"(.*?)>(.*?)</style:style>#es', $data, $style);
$stylenames = $style[ 1];
$styleinfos = $style[ 2];
$styledatas = $style[ 3];
for($i=0; $i < count( $stylenames); $i++){
$name = $stylenames[ $i];
$change = false;
for(;;){
$pos1 = strpos( $styledatas[ $i], 'style:parent-style-name');
$pos2 = strpos( $styledatas[ $i], '/>');
if( ($pos1 === false) or ($pos2 === false)){
break;
}
if( $pos1 > $pos2){
break;
}
//is a parent style
$s = substr( $styledatas[ $i], 0, $pos2+2);
game_bookquiz_convertstyle_parent( $s, $styles);
$styledatas[ $i] = substr( $styledatas[ $i], $pos2 + 2);
$change = true;
}
if( $change){
//Must to recompute name, styledatas, styleinfos
preg_match_all('#<style:style style:name="(.*?)"(.*?)>(.*?)</style:style>#es', $data, $style);
$name = $style[ 1][ 0];
$styleinfos[ $i] = $style[ 2][ 0];
$styledatas[ $i] = $style[ 3][ 0];
}
$styles[ $name] = game_bookquiz_convertstyle( $styledatas[ $i], $styleinfos[ $i], $styles);
}
}
function game_bookquiz_convertstyle_parent( $data, &$styles)
{
$styleitems = array();
preg_match_all( '#(.*?)style:name="(.*?)"(.*?)style:parent-style-name="(.*?)"(.*?)#es', $data, $infos);
$names = $infos[ 2];
$parents = $infos[ 4];
if( count( $parents)){
if( array_key_exists( $parents[ 0], $styles)){
//is a child style. Must to copy the properties of the parent style
$a = explode( ';', $styles[ $parents[ 0]]);
foreach( $a as $s){
$pos = strpos( $s, ':');
$key = substr( $s, 0, $pos);
$item = substr( $s, $pos + 1);
if( $item == ''){
continue;
}
$styleitems[ $key] = $item;
}
}
$name = $names[ 0];
}
$style = '';
foreach( $styleitems as $key => $item){
$style .= ';'.$key.':'.$item;
}
$styles[ $name] = substr( $style, 1);
}
function game_bookquiz_convertstyle( $data, $styleinfo, $styles)
{
$styleitems = array();
preg_match_all( '#<style:paragraph-properties (.*?)/>#es', $data, $infos);
$lines = $infos[ 1];
if( count( $lines)){
$line = $lines[ 0]; //print_object( $lines);
if( $line != ''){
game_bookquiz_convertstyle_paragraph( $line, $styleitems);
}
}
preg_match_all( '#<style:text-properties (.*?)/>#es', $data, $infos);
$lines = $infos[ 1];
if( count( $lines)){
$line = $lines[ 0];
if( $line != ''){
game_bookquiz_convertstyle_textproperties( $line, $styleitems);
}
}
if( count( $styleitems) == 0){
return '';
}
$style = '';
foreach( $styleitems as $key => $item){
$style .= ';'.$key.':'.$item;
}
return substr( $style, 1);
}
function game_bookquiz_convertstyle_paragraph( $line, &$styleitems)
{
preg_match_all( '#(.*?)=(.*?) #es', $line.' ', $datas);
$data1 = $datas[ 1];
$data2 = $datas[ 2];
$ret = '';
for( $i=0; $i < count( $data1); $i++){
$eq1 = $data1[ $i];
$eq2 = $data2[ $i];
if( (substr( $eq2, 0, 1) == '"') and (substr( $eq2, -1, 1) == '"')){
$eq2 = substr( $eq2, 1, -1);
}
switch( $eq1){
case 'fo:text-align':
$styleitems[ 'align'] = $eq2;
//print_object( $styleitems);
break;
case 'fo:background-color':
$styleitems[ 'background-color'] = $eq2;
break;
}
}
}
function game_bookquiz_convertstyle_textproperties( $line, &$styleitems)
{
preg_match_all( '#(.*?)=(.*?) #es', $line.' ', $datas);
$data1 = $datas[ 1];
$data2 = $datas[ 2];
$ret = '';
for( $i=0; $i < count( $data1); $i++){
$eq1 = $data1[ $i];
$eq2 = $data2[ $i];
if( (substr( $eq2, 0, 1) == '"') and (substr( $eq2, -1, 1) == '"')){
$eq2 = substr( $eq2, 1, -1);
}
switch( $eq1){
case 'fo:font-size':
case 'fo:color':
case 'fo:background-color':
case 'fo:font-style':
case 'fo:font-weight':
$styleitems[ substr( $eq1, 3)] = $eq2;
break;
case 'style_text_underline_style':
if( $eq2 == 'solid'){
$styleitems[ 'text-decoration'] = 'underline';
}
break;
}
}
}

468
bookquiz/importppt.php

@ -0,0 +1,468 @@
<?php // $Id: importppt.php,v 1.3 2012/07/25 11:16:05 bdaloukas Exp $
/**
* This is a very rough importer for powerpoint slides
* Export a powerpoint presentation with powerpoint as html pages
* Do it with office 2002 (I think?) and no special settings
* Then zip the directory with all of the html pages
* and the zip file is what you want to upload
*
* The script supports book and lesson.
*
* @version $Id: importppt.php,v 1.3 2012/07/25 11:16:05 bdaloukas Exp $
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package lesson
**/
require_once("../../config.php");
require_once("locallib.php");
$id = required_param('id', PARAM_INT); // Course Module ID
$pageid = optional_param('pageid', '', PARAM_INT); // Page ID
global $matches;
if (! $cm = get_coursemodule_from_id('lesson', $id)) {
print_error('Course Module ID was incorrect');
}
if (! $course = $DB->get_record('course', array( 'id' => $cm->course))) {
print_error('Course is misconfigured');
}
// allows for adaption for multiple modules
if(! $modname = $DB->get_field('modules', 'name', array( 'id' => $cm->module))) {
print_error('Could not find module name');
}
if (! $mod = $DB->get_record($modname, array( "id" => $cm->instance))) {
print_error('Course module is incorrect');
}
require_login($course->id, false);
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
require_capability('mod/lesson:edit', $context);
$strimportppt = get_string("importppt", "lesson");
$strlessons = get_string("modulenameplural", "lesson");
echo $OUTPUT->heading("$strimportppt", " $strimportppt", "<a href=\"index.php?id=$course->id\">$strlessons</a> -> <a href=\"{$CFG->wwwroot}/mod/$modname/view.php?id=$cm->id\">".format_string($mod->name,true)."</a>-> $strimportppt");
if ($form = data_submitted()) { /// Filename
if (empty($_FILES['newfile'])) { // file was just uploaded
notify(get_string("uploadproblem") );
}
if ((!is_uploaded_file($_FILES['newfile']['tmp_name']) or $_FILES['newfile']['size'] == 0)) {
notify(get_string("uploadnofilefound") );
} else { // Valid file is found
if ($rawpages = readdata($_FILES, $course->id, $modname))
{ // first try to reall all of the data in
$pageobjects = extract_data($rawpages, $course->id, $mod->name, $modname); // parse all the html files into objects
clean_temp(); // all done with files so dump em
$mod_create_objects = $modname.'_create_objects';
$mod_save_objects = $modname.'_save_objects';
$objects = $mod_create_objects($pageobjects, $mod->id); // function to preps the data to be sent to DB
if(! $mod_save_objects($objects, $mod->id, $pageid)) { // sends it to DB
print_error( 'could not save');
}
} else {
print_error('could not get data');
}
echo "<hr>";
print_continue("{$CFG->wwwroot}/mod/$modname/view.php?id=$cm->id");
echo $OUTPUT->footer($course);
exit;
}
}
/// Print upload form
print_heading_with_help($strimportppt, "importppt", "lesson");
echo $OUTPUT->box_start('center');
echo "<form id=\"theform\" enctype=\"multipart/form-data\" method=\"post\">";
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n";
echo "<input type=\"hidden\" name=\"pageid\" value=\"$pageid\" />\n";
echo "<table cellpadding=\"5\">";
echo "<tr><td align=\"right\">";
print_string("upload");
echo ":</td><td>";
echo "<input name=\"newfile\" type=\"file\" size=\"50\" />";
echo "</td></tr><tr><td>&nbsp;</td><td>";
echo "<input type=\"submit\" name=\"save\" value=\"".get_string("uploadthisfile")."\" />";
echo "</td></tr>";
echo "</table>";
echo "</form>";
echo $OUTPUT->box_end();
echo $OUTPUT->footer($course);
// START OF FUNCTIONS
function readdata($file, $courseid, $modname) {
// this function expects a zip file to be uploaded. Then it parses
// outline.htm to determine the slide path. Then parses each
// slide to get data for the content
global $CFG;
// create an upload directory in temp
make_upload_directory('temp/'.$modname);
$base = $CFG->dataroot."/temp/$modname/";
$zipfile = $_FILES["newfile"]["name"];
$tempzipfile = $_FILES["newfile"]["tmp_name"];
// create our directory
$path_parts = pathinfo($zipfile);
$dirname = substr($zipfile, 0, strpos($zipfile, '.'.$path_parts['extension'])); // take off the extension
if (!file_exists($base.$dirname)) {
mkdir($base.$dirname);
}
// move our uploaded file to temp/lesson
move_uploaded_file($tempzipfile, $base.$zipfile);
// unzip it!
unzip_file($base.$zipfile, $base, false);
$base = $base.$dirname; // update the base
// this is the file where we get the names of the files for the slides (in the correct order too)
$outline = $base.'/outline.htm';
$pages = array();
if (file_exists($outline) and is_readable($outline)) {
$outlinecontents = file_get_contents($outline);
$filenames = array();
preg_match_all("/javascript:GoToSld\('(.*)'\)/", $outlinecontents, $filenames); // this gets all of our files names
// file $pages with the contents of all of the slides
foreach ($filenames[1] as $file) {
$path = $base.'/'.$file;
if (is_readable($path)) {
$pages[$path] = file_get_contents($path);
} else {
return false;
}
}
} else {
// cannot find the outline, so grab all files that start with slide
$dh = opendir($base);
while (false !== ($file = readdir($dh))) { // read throug the directory
if ('slide' == substr($file, 0, 5)) { // check for name (may want to check extension later)
$path = $base.'/'.$file;
if (is_readable($path)) {
$pages[$path] = file_get_contents($path);
} else {
return false;
}
}
}
ksort($pages); // order them by file name
}
if (empty($pages)) {
return false;
}
return $pages;
}
function extract_data($pages, $courseid, $lessonname, $modname) {
// this function attempts to extract the content out of the slides
// the slides are ugly broken xml. and the xml is broken... yeah...
global $CFG;
global $matches;
$extratedpages = array();
// directory for images
make_mod_upload_directory($courseid); // make sure moddata is made
make_upload_directory($courseid.'/moddata/'.$modname, false); // we store our images in a subfolder in here
$imagedir = $CFG->dataroot.'/'.$courseid.'/moddata/'.$modname;
if ($CFG->slasharguments) {
$imagelink = $CFG->wwwroot.'/file.php/'.$courseid.'/moddata/'.$modname;
} else {
$imagelink = $CFG->wwwroot.'/file.php?file=/'.$courseid.'/moddata/'.$modname;
}
// try to make a unique subfolder to store the images
$lessonname = str_replace(' ', '_', $lessonname); // get rid of spaces
$i = 0;
while(true) {
if (!file_exists($imagedir.'/'.$lessonname.$i)) {
// ok doesnt exist so make the directory and update our paths
mkdir($imagedir.'/'.$lessonname.$i);
$imagedir = $imagedir.'/'.$lessonname.$i;
$imagelink = $imagelink.'/'.$lessonname.$i;
break;
}
$i++;
}
foreach ($pages as $file => $content) {
// to make life easier on our preg_match_alls, we strip out all tags except
// for div and img (where our content is). We want div because sometimes we
// can identify the content in the div based on the div's class
$tags = '<div><img>'; // should also allow <b><i>
$string = strip_tags($content,$tags);
//echo s($string);
$matches = array();
// this will look for a non nested tag that is closed
// want to allow <b><i>(maybe more) tags but when we do that
// the preg_match messes up.
preg_match_all("/(<([\w]+)[^>]*>)([^<\\2>]*)(<\/\\2>)/", $string, $matches);
//(<([\w]+)[^>]*>)([^<\\2>]*)(<\/\\2>) original pattern
//(<(div+)[^>]*>)[^(<div*)](<\/div>) work in progress
$path_parts = pathinfo($file);
$file = substr($path_parts['basename'], 0, strpos($path_parts['basename'], '.')); // get rid of the extension
$imgs = array();
// this preg matches all images
preg_match_all("/<img[^>]*(src\=\"(".$file."\_image[^>^\"]*)\"[^>]*)>/i", $string, $imgs);
// start building our page
$page = new stdClass;
$page->title = '';
$page->contents = array();
$page->images = array();
$page->source = $path_parts['basename']; // need for book only
// this foreach keeps the style intact. Found it doesn't help much. But if you want back uncomment
// this foreach and uncomment the line with the comment imgstyle in it. Also need to comment out
// the $page->images[]... line in the next foreach
/*foreach ($imgs[1] as $img) {
$page->images[] = '<img '.str_replace('src="', "src=\"$imagelink/", $img).' />';
}*/
foreach ($imgs[2] as $img) {
copy($path_parts['dirname'].'/'.$img, $imagedir.'/'.$img);
$page->images[] = "<img src=\"$imagelink/$img\" title=\"$img\" />"; // comment out this line if you are using the above foreach loop
}
for($i = 0; $i < count($matches[1]); $i++) { // go through all of our div matches
$class = isolate_class($matches[1][$i]); // first step in isolating the class
// check for any static classes
switch ($class) {
case 'T': // class T is used for Titles
$page->title = $matches[3][$i];
break;
case 'B': // I would guess that all bullet lists would start with B then go to B1, B2, etc
case 'B1': // B1-B4 are just insurance, should just hit B and all be taken care of
case 'B2':
case 'B3':
case 'B4':
$page->contents[] = build_list('<ul>', $i, 0); // this is a recursive function that will grab all the bullets and rebuild the list in html
break;
default:
if ($matches[3][$i] != '&#13;') { // odd crap generated... sigh
if (substr($matches[3][$i], 0, 1) == ':') { // check for leading : ... hate MS ...
$page->contents[] = substr($matches[3][$i], 1); // get rid of :
} else {
$page->contents[] = $matches[3][$i];
}
}
break;
}
}
// add the page to the array;
$extratedpages[] = $page;
} // end $pages foreach loop
return $extratedpages;
}
/**
A recursive function to build a html list
*/
function build_list($list, &$i, $depth) {
global $matches; // not sure why I global this...
while($i < count($matches[1])) {
$class = isolate_class($matches[1][$i]);
if (strstr($class, 'B')) { // make sure we are still working with bullet classes
if ($class == 'B') {
$this_depth = 0; // calling class B depth 0
} else {
// set the depth number. So B1 is depth 1 and B2 is depth 2 and so on
$this_depth = substr($class, 1);
if (!is_numeric($this_depth)) {
print_error( 'Depth not parsed!');
}
}
if ($this_depth < $depth) {
// we are moving back a level in the nesting
break;
}
if ($this_depth > $depth) {
// we are moving in a lvl in nesting
$list .= '<ul>';
$list = build_list($list, $i, $this_depth);
// once we return back, should go to the start of the while
continue;
}
// no depth changes, so add the match to our list
if ($cleanstring = ppt_clean_text($matches[3][$i])) {
$list .= '<li>'.ppt_clean_text($matches[3][$i]).'</li>';
}
$i++;
} else {
// not a B class, so get out of here...
break;
}
}
// end the list and return it
$list .= '</ul>';
return $list;
}
/**
Given an html tag, this function will
*/
function isolate_class($string) {
if($class = strstr($string, 'class=')) { // first step in isolating the class
$class = substr($class, strpos($class, '=')+1); // this gets rid of <div blawblaw class= there are no "" or '' around the class name ...sigh...
if (strstr($class, ' ')) {
// spaces found, so cut off everything off after the first space
return substr($class, 0, strpos($class, ' '));
} else {
// no spaces so nothing else in the div tag, cut off the >
return substr($class, 0, strpos($class, '>'));
}
} else {
// no class defined in the tag
return '';
}
}
/**
This function strips off the random chars that ppt puts infront of bullet lists
*/
function ppt_clean_text($string) {
$chop = 1; // default: just a single char infront of the content
// look for any other crazy things that may be infront of the content
if (strstr($string, '&lt;') and strpos($string, '&lt;') == 0) { // look for the &lt; in the sting and make sure it is in the front
$chop = 4; // increase the $chop
}
// may need to add more later....
$string = substr($string, $chop);
if ($string != '&#13;') {
return $string;
} else {
return false;
}
}
/**
Clean up the temp directory
*/
function clean_temp() {
global $CFG;
// this function is broken, use it to clean up later
// should only clean up what we made as well because someone else could be importing ppt as well
//delDirContents($CFG->dataroot.'/temp/lesson');
}
/**
Creates objects an chapter object that is to be inserted into the database
*/
function book_create_objects($pageobjects, $bookid) {
$chapters = array();
$chapter = new stdClass;
// same for all chapters
$chapter->bookid = $bookid;
$chapter->pagenum = $DB->count_records('book_chapters', array( 'bookid' => $bookid))+1;
$chapter->timecreated = time();
$chapter->timemodified = time();
$chapter->subchapter = 0;
$i = 1;
foreach ($pageobjects as $pageobject) {
$page = prep_page($pageobject, $i); // get title and contents
$chapter->importsrc = addslashes($pageobject->source); // add the source
$chapter->title = $page->title;
$chapter->content = $page->contents;
$chapters[] = $chapter;
// increment our page number and our counter
$chapter->pagenum = $chapter->pagenum + 1;
$i++;
}
return $chapters;
}
/**
Builds the title and content strings from an object
*/
function prep_page($pageobject, $count) {
if ($pageobject->title == '') {
$page->title = "Page $count"; // no title set so make a generic one
} else {
$page->title = addslashes($pageobject->title);
}
$page->contents = '';
// nab all the images first
foreach ($pageobject->images as $image) {
$image = str_replace("\n", '', $image);
$image = str_replace("\r", '', $image);
$image = str_replace("'", '"', $image); // imgstyle
$page->contents .= addslashes($image);
}
// go through the contents array and put <p> tags around each element and strip out \n which I have found to be uneccessary
foreach ($pageobject->contents as $content) {
$content = str_replace("\n", '', $content);
$content = str_replace("\r", '', $content);
$content = str_replace('&#13;', '', $content); // puts in returns?
$content = '<p>'.$content.'</p>';
$page->contents .= addslashes($content);
}
return $page;
}
/**
Save the chapter objects to the database
*/
function book_save_objects($chapters, $bookid, $pageid='0') {
global $DB;
// nothing fancy, just save them all in order
foreach ($chapters as $chapter) {
if (!$chapter->id = $DB->insert_record('book_chapters', $chapter)) {
print_error('Could not update your book');
}
}
return true;
}

370
bookquiz/play.php

@ -0,0 +1,370 @@
<?php // $Id: play.php,v 1.8 2012/07/25 22:46:42 bdaloukas Exp $
function game_bookquiz_continue( $id, $game, $attempt, $bookquiz, $chapterid, $context)
{
if( $attempt != false and $bookquiz != false){
return game_bookquiz_play( $id, $game, $attempt, $bookquiz, $chapterid, $context);
}
if( $attempt == false){
$attempt = game_addattempt( $game);
}
$bookquiz = new stdClass();
$bookquiz->lastchapterid = 0;
$bookquiz->id = $attempt->id;
$bookquiz->bookid = $game->bookid;
if( !game_insert_record( 'game_bookquiz', $bookquiz)){
print_error( 'game_bookquiz_continue: error inserting in game_bookquiz');
}
return game_bookquiz_play( $id, $game, $attempt, $bookquiz, 0, $context);
}
function game_bookquiz_play( $id, $game, $attempt, $bookquiz, $chapterid, $context)
{
global $DB, $OUTPUT, $cm;
if( $bookquiz->lastchapterid == 0){
game_bookquiz_play_computelastchapter( $game, $bookquiz);
if( $bookquiz->lastchapterid == 0){
print_error( get_string( 'bookquiz_empty', 'game'));
}
}
if( $chapterid == 0){
$chapterid = $bookquiz->lastchapterid;
}else
{
if( ($DB->set_field( 'game_bookquiz', 'lastchapterid', $chapterid, array( 'id' => $bookquiz->id))) == false){
print_error( "Can't update table game_bookquiz with lastchapterid to $chapterid");
}
}
$book = $DB->get_record( 'book', array('id' => $game->bookid));
if( !$chapter = $DB->get_record( 'book_chapters', array('id' => $chapterid))){
print_error('Error reading book chapters.');
}
$select = "bookid = $game->bookid AND hidden = 0";
$chapters = $DB->get_records_select('book_chapters', $select, null, 'pagenum', 'id, pagenum, subchapter, title, hidden');
$okchapters = array();
if( ($recs = $DB->get_records( 'game_bookquiz_chapters', array( 'attemptid' => $attempt->id))) != false){
foreach( $recs as $rec){
//1 means correct answer
$okchapters[ $rec->chapterid] = 1;
}
}
//2 means current
//$okchapters[ $chapterid] = 2;
$showquestions = false;
$a = array( 'gameid' => $game->id, 'chapterid' => $chapterid);
if( ($questions = $DB->get_records( 'game_bookquiz_questions', $a)) === false){
if( !array_key_exists( $chapterid, $okchapters)){
$okchapters[ $chapterid] = 1;
$newrec = new stdClass();
$newrec->attemptid = $attempt->id;
$newrec->chapterid = $chapterid;
if( !$DB->insert_record( 'game_bookquiz_chapters', $newrec)){
print_error( "Can't insert to table game_bookquiz_chapters");
}
}
}else
{
//Have to select random one question
$questionid = game_bookquiz_selectrandomquestion( $questions);
if( $questionid != 0){
$showquestions = true;
}
}
/// prepare chapter navigation icons
$previd = null;
$nextid = null;
$found = 0;
$scoreattempt = 0;
foreach ($chapters as $ch) {
$scoreattempt++;
if ($found) {
$nextid= $ch->id;
break;
}
if ($ch->id == $chapter->id) {
$found = 1;
}
if (!$found) {
$previd = $ch->id;
}
}
if ($ch == current($chapters)) {
$nextid = $ch->id;
}
if( count( $chapters)){
$scoreattempt = ($scoreattempt-1) / count( $chapters);
}
$chnavigation = '';
if ($previd) {
$chnavigation .= '<a title="'.get_string('navprev', 'book').'" href="attempt.php?id='.$id.'&chapterid='.$previd.'"><img src="'.$OUTPUT->pix_url('bookquiz/nav_prev', 'mod_game').'" class="bigicon" alt="'.get_string('navprev', 'book').'"/></a>';
} else {
$chnavigation .= '<img src="'.$OUTPUT->pix_url('bookquiz/nav_prev_dis', 'mod_game').'" class="bigicon" alt="" />';
}
$nextbutton = '';
if ($nextid) {
if( !$showquestions){
$chnavigation .= '<a title="'.get_string('navnext', 'book').'" href="attempt.php?id='.$id.'&chapterid='.$nextid.'"><img src="'.$OUTPUT->pix_url('bookquiz/nav_next', 'mod_game').'" class="bigicon" alt="'.get_string('navnext', 'book').'" ></a>';
$nextbutton = '<center>';
$nextbutton .= '<form name="form" method="get" action="attempt.php">';
$nextbutton .= '<input type="hidden" name="id" value="'.$id.'" >'."\r\n";
$nextbutton .= '<input type="hidden" name="chapterid" value="'.$nextid.'" >'."\r\n";
$nextbutton .= '<input type="submit" value="'.get_string( 'continue').'">';
$nextbutton .= '</center>';
$showquestions = false;
game_updateattempts_maxgrade( $game, $attempt, $scoreattempt, 0);
}
} else {
game_updateattempts_maxgrade( $game, $attempt, 1, 0);
$sec = '';
if( !isset( $cm))
$cm = get_coursemodule_from_id('game', $game->id);
if ($section = $DB->get_record('course_sections', array( 'id' => $cm->section))) {
$sec = $section->section;
}
if (! $cm = $DB->get_record('course_modules', array( 'id' => $id))) {
print_error("Course Module ID was incorrect id=$id");
}
$chnavigation .= '<a title="'.get_string('navexit', 'book').'" href="../../course/attempt.php?id='.$cm->course.'"><img src="'.$OUTPUT->pix_url('bookquiz/nav_exit', 'mod_game').'" class="bigicon" alt="'.get_string('navexit', 'book').'" /></a>';
}
require( 'toc.php');
$tocwidth = '10%';
if( $showquestions){
if( $game->param3 == 0)
game_bookquiz_showquestions( $id, $questionid, $chapter->id, $nextid, $scoreattempt, $game, $context);
}
?>
<table border="0" cellspacing="0" width="100%" valign="top" cellpadding="2">
<!-- subchapter title and upper navigation row //-->
<tr>
<td width="<?php echo 10;?>" valign="bottom">
</td>
<td valign="top">
<table border="0" cellspacing="0" width="100%" valign="top" cellpadding="0">
<tr>
<td align="right"><?php echo $chnavigation ?></td>
</tr>
</table>
</td>
</tr>
<!-- toc and chapter row //-->
<tr>
<td width="<?php echo $tocwidth ?>" valign="top" align="left">
<?php
echo $OUTPUT->box_start('generalbox');
echo $toc;
echo $OUTPUT->box_end();
?>
</td>
<td valign="top" align="left">
<?php
echo $OUTPUT->box_start('generalbox');
$content = '';
if (!$book->customtitles) {
if ($currsubtitle == '&nbsp;') {
$content .= '<p class="book_chapter_title">'.$currtitle.'</p>';
} else {
$content .= '<p class="book_chapter_title">'.$currtitle.'<br />'.$currsubtitle.'</p>';
}
}
$content .= $chapter->content;
$nocleanoption = new object();
$nocleanoption->noclean = true;
echo '<div>';
if( $nextbutton != ''){
echo $nextbutton;
}
echo format_text($content, FORMAT_HTML, $nocleanoption, $id);
if( $nextbutton != ''){
echo $nextbutton;
}
echo '</div>';
echo $OUTPUT->box_end();
/// lower navigation
echo '<p align="right">'.$chnavigation.'</p>';
?>
</td>
</tr>
</table>
<?php
if( $showquestions){
if( $game->param3 != 0)
game_bookquiz_showquestions( $id, $questionid, $chapter->id, $nextid, $scoreattempt, $game, $context);
}
}
function game_bookquiz_play_computelastchapter( $game, &$bookquiz)
{
global $DB;
$pagenum = $DB->get_field( 'book_chapters', 'min(pagenum) as p', array('bookid' => $game->bookid));
if( $pagenum){
$bookquiz->lastchapterid = $DB->get_field( 'book_chapters', 'id', array('bookid' => $game->bookid, 'pagenum' => $pagenum));
if( $bookquiz->lastchapterid){
//update the data in table game_bookquiz
if( ($DB->set_field( 'game_bookquiz', 'lastchapterid', $bookquiz->lastchapterid, array('id' => $bookquiz->id))) == false){
print_error( "Can't update table game_bookquiz with lastchapterid to $bookquiz->lastchapterid");
}
}
}
}
function game_bookquiz_showquestions( $id, $questionid, $chapterid, $nextchapterid, $scoreattempt, $game, $context)
{
$onlyshow = false;
$showsolution = false;
$questionlist = $questionid;
$questions = game_sudoku_getquestions( $questionlist);
global $CFG;
/// Start the form
echo "<form id=\"responseform\" method=\"post\" action=\"{$CFG->wwwroot}/mod/game/attempt.php\" onclick=\"this.autocomplete='off'\">\n";
if( ($onlyshow === false) and ($showsolution === false)){
echo "<center><input type=\"submit\" name=\"finishattempt\" value=\"".get_string('sudoku_submit', 'game')."\"></center>\n";
}
// Add a hidden field with the quiz id
echo '<div>';
echo '<input type="hidden" name="id" value="' . s($id) . "\" />\n";
echo '<input type="hidden" name="action" value="bookquizcheck" />';
echo '<input type="hidden" name="chapterid" value="'.$chapterid.'" />';
echo '<input type="hidden" name="scoreattempt" value="'.$scoreattempt.'" />';
echo '<input type="hidden" name="nextchapterid" value="'.$nextchapterid.'" />';
/// Print all the questions
// Add a hidden field with questionids
echo '<input type="hidden" name="questionids" value="'.$questionlist."\" />\n";
$number=0;
foreach ($questions as $question) {
game_print_question( $game, $question, $context);
}
echo "</div>";
// Finish the form
echo '</div>';
if( ($onlyshow === false) and ($showsolution === false)){
echo "<center><input type=\"submit\" name=\"finishattempt\" value=\"".get_string('sudoku_submit', 'game')."\"></center>\n";
}
echo "</form>\n";
}
function game_bookquiz_selectrandomquestion( $questions)
{
global $DB;
$categorylist = '';
if( $questions == false){
return 0;
}
foreach( $questions as $rec){
$categorylist .= ',' . $rec->questioncategoryid;
}
$select = 'category in ('.substr( $categorylist, 1). ") AND qtype in ('shortanswer', 'truefalse', 'multichoice')";
if( ($recs = $DB->get_records_select( 'question', $select, null, '', 'id,id')) == false){
return 0;
}
$a = array();
foreach( $recs as $rec){
$a[ $rec->id] = $rec->id;
}
if( count( $a) == 0){
return 0;
}else
{
return array_rand( $a);
}
}
function game_bookquiz_check_questions( $id, $game, $attempt, $bookquiz, $context)
{
global $USER, $DB;
$scoreattempt = optional_param('scoreattempt', 0, PARAM_INT);
$responses = data_submitted();
$questionlist = $responses->questionids;
$questions = game_sudoku_getquestions( $questionlist);
$grades = game_grade_questions( $questions);
$scorequestion = 0;
$scoreattempt = 0;
$chapterid = required_param('chapterid', PARAM_INT);
$nextchapterid = required_param('nextchapterid', PARAM_INT);
foreach($questions as $question) {
if( !array_key_exists( $question->id, $grades)){
//no answered
continue;
}
$grade = $grades[ $question->id];
if( $grade->grade < 0.5){
continue;
}
//found one correct answer
if( !$DB->get_field( 'game_bookquiz_chapters', 'id', array( 'attemptid' => $attempt->id, 'chapterid' => $chapterid)))
{
$newrec = new stdClass();
$newrec->attemptid = $attempt->id;
$newrec->chapterid = $chapterid;
if( !$DB->insert_record( 'game_bookquiz_chapters', $newrec, false)){
print_object( $newrec);
print_error( "Can't insert to table game_bookquiz_chapters");
}
}
//Have to go to next page.
$bookquiz->lastchapterid = $nextchapterid;
$scorequestion = 1;
break;
}
$query = new stdClass();
$query->id = 0;
$query->attemptid = $attempt->id;
$query->gameid = $game->id;
$query->userid = $USER->id;
$query->sourcemodule = 'question';
$query->questionid = $question->id;
$query->glossaryentryid = 0;
$query->questiontext = $question->questiontext;
$query->timelastattempt = time();
game_update_queries( $game, $attempt, $query, $scorequestion, '');
game_updateattempts( $game, $attempt, $scoreattempt, 0);
game_bookquiz_continue( $id, $game, $attempt, $bookquiz, $bookquiz->lastchapterid, $context);
}

180
bookquiz/questions.php

@ -0,0 +1,180 @@
<?php // $Id: questions.php,v 1.6 2012/07/25 11:16:05 bdaloukas Exp $
/**
* The script supports book
*
* @version $Id: questions.php,v 1.6 2012/07/25 11:16:05 bdaloukas Exp $
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package game
**/
require_once("../../../config.php");
require_once( "../header.php");
require_once("../locallib.php");
$attempt = game_getattempt( $game, $detail);
if( $game->bookid == 0){
print_error( get_string( 'bookquiz_not_select_book', 'game'));
}
if ($form = data_submitted())
{ /// Filename
$ids = explode( ',', $form->ids);
game_bookquiz_save( $game->id, $game->bookid, $ids, $form);
redirect("{$CFG->wwwroot}/mod/game/bookquiz/questions.php?id=$cm->id", '', 0);
}
/// Print upload form
$OUTPUT->heading( $course->fullname);
$select = "gameid={$game->id}";
$categories = array();
if( ($recs = $DB->get_records_select( 'game_bookquiz_questions', $select, null, '', 'chapterid,questioncategoryid')) != false){
foreach( $recs as $rec){
$categories[ $rec->chapterid] = $rec->questioncategoryid;
}
}
$context = get_context_instance(50, $COURSE->id);
$select = " contextid in ($context->id)";
$a = array();
if( $recs = $DB->get_records_select( 'question_categories', $select, null, 'id,name')){
foreach( $recs as $rec){
$s = $rec->name;
if( ($count = $DB->count_records( 'question', array( 'category' => $rec->id))) != 0){
$s .= " ($count)";
}
$a[ $rec->id] = $s;
}
}
$sql = "SELECT chapterid, COUNT(*) as c ".
"FROM {game_bookquiz_questions} gbq,{question} q ".
"WHERE gbq.questioncategoryid=q.category ".
"AND gameid=$game->id ".
"GROUP BY chapterid";
$numbers = array();
if( ($recs = $DB->get_records_sql( $sql)) != false){
foreach( $recs as $rec){
$numbers[ $rec->chapterid] = $rec->c;
}
}
echo '<form name="form" method="post" action="questions.php">';
echo '<table border=1>';
echo '<tr>';
echo '<td><center>'.get_string( 'bookquiz_chapters', 'game').'</td>';
echo '<td><center>'.get_string( 'bookquiz_categories', 'game').'</td>';
echo '<td><center>'.get_string( 'bookquiz_numquestions', 'game').'</td>';
echo "</tr>\r\n";
$ids = '';
if( ($recs =$DB->get_records( 'book_chapters', array('bookid' => $game->bookid), 'pagenum', 'id,title')) != false)
{
foreach( $recs as $rec){
echo '<tr>';
echo '<td>'.$rec->title.'</td>';
echo '<td>';
if( array_key_exists( $rec->id, $categories))
$categoryid = $categories[ $rec->id];
else
$categoryid = 0;
echo game_showselectcontrol( 'categoryid_'.$rec->id, $a, $categoryid, '');
echo '</td>';
echo '<td>';
if( array_key_exists( $rec->id, $numbers)){
echo '<center>'.$numbers[ $rec->id].'</center>';
}else
{
echo '&nbsp;';
}
echo '</td>';
echo "</tr>\r\n";
$ids .= ','.$rec->id;
}
}
?>
</table>
<br>
<!-- These hidden variables are always the same -->
<input type="hidden" name=id value="<?php p($id) ?>" />
<input type="hidden" name=q value="<?php p($q) ?>" />
<input type="hidden" name=ids value="<?php p( substr( $ids, 1)) ?>" />
<center>
<input type="submit" value="<?php print_string("savechanges") ?>" />
</center>
</form>
<?php
echo $OUTPUT->footer($course);
function game_bookquiz_save( $gameid, $bookid, $ids, $form)
{
global $DB;
$questions = array();
$recids = array();
if( ($recs = $DB->get_records( 'game_bookquiz_questions', array( 'gameid' => $gameid), '', 'id,chapterid,questioncategoryid')) != false){
foreach( $recs as $rec){
$questions[ $rec->chapterid] = $rec->questioncategoryid;
$recids[ $rec->chapterid] = $rec->id;
}
}
foreach( $ids as $chapterid){
$name = 'categoryid_'.$chapterid;
$categoryid = $form->$name;
if( !array_key_exists( $chapterid, $questions)){
if( $categoryid == 0){
continue;
}
$rec = new stdClass();
$rec->gameid = $gameid;
$rec->chapterid = $chapterid;
$rec->questioncategoryid = $categoryid;
if (($newid=$DB->insert_record('game_bookquiz_questions', $rec)) == false) {
print_object( $rec);
print_error( "Can't insert to game_bookquiz_questions");
}
continue;
}
$cat = $questions[ $chapterid];
if( $cat == $categoryid){
$recids[ $chapterid] = 0;
continue;
}
if( $categoryid == 0){
if( !delete_records( 'game_bookquiz_questions', 'id', $recids[ $chapterid])){
print_error( "Can't delete game_bookquiz_questions");
}
}else
{
unset( $updrec);
$updrec->id = $recids[ $chapterid];
$updrec->questioncategoryid = $categoryid;
if (($DB->update_record( 'game_bookquiz_questions', $updrec)) == false) {
print_object( $rec);
print_error( "Can't update game_bookquiz_questions");
}
}
$recids[ $chapterid] = 0;
}
foreach( $recids as $chapterid => $id){
if( $id == 0){
continue;
}
}
}

135
bookquiz/toc.php

@ -0,0 +1,135 @@
<?PHP // $Id: toc.php,v 1.1 2008/03/26 17:40:38 arborrow Exp $
defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
define('NUM_NONE', '0');
define('NUM_NUMBERS', '1');
define('NUM_BULLETS', '2');
define('NUM_INDENTED', '3');
/// included from mod/book/view.php and print.php
///
/// uses:
/// $chapters - all book chapters
/// $chapter - may be false
/// $cm - course module
/// $book - book
/// $edit - force editing view
/// fills:
/// $toc
/// $title (not for print)
$currtitle = ''; //active chapter title (plain text)
$currsubtitle = ''; //active subchapter if any
$prevtitle = '&nbsp;';
$toc = ''; //representation of toc (HTML)
$nch = 0; //chapter number
$ns = 0; //subchapter number
$title = '';
$first = 1;
if (!isset($print)) {
$print = 0;
}
switch ($book->numbering) {
case NUM_NONE:
$toc .= '<div class="book_toc_none">';
break;
case NUM_NUMBERS:
$toc .= '<div class="book_toc_numbered">';
break;
case NUM_BULLETS:
$toc .= '<div class="book_toc_bullets">';
break;
case NUM_INDENTED:
$toc .= '<div class="book_toc_indented">';
break;
}
if ($print) { ///TOC for printing
$toc .= '<a name="toc"></a>';
if ($book->customtitles) {
$toc .= '<h1>'.get_string('toc', 'book').'</h1>';
} else {
$toc .= '<p class="book_chapter_title">'.get_string('toc', 'book').'</p>';
}
$titles = array();
$toc .= '<ul>';
foreach($chapters as $ch) {
$title = trim(strip_tags($ch->title));
if (!$ch->hidden) {
if (!$ch->subchapter) {
$nch++;
$ns = 0;
$toc .= ($first) ? '<li>' : '</ul></li><li>';
if ($book->numbering == NUM_NUMBERS) {
$title = "$nch $title";
}
} else {
$ns++;
$toc .= ($first) ? '<li><ul><li>' : '<li>';
if ($book->numbering == NUM_NUMBERS) {
$title = "$nch.$ns $title";
}
}
$titles[$ch->id] = $title;
$toc .= '<a title="'.htmlspecialchars($title).'" href="#ch'.$ch->id.'">'.$title.'</a>';
$toc .= (!$ch->subchapter) ? '<ul>' : '</li>';
$first = 0;
}
}
$toc .= '</ul></li></ul>';
} else { //normal students view
$toc .= '<font size="-1"><ul>';
foreach($chapters as $ch) {
$title = trim(strip_tags($ch->title));
if (!$ch->hidden) {
if (!$ch->subchapter) {
$nch++;
$ns = 0;
$toc .= ($first) ? '<li>' : '</ul></li><li>';
if ($book->numbering == NUM_NUMBERS) {
$title = "$nch $title";
}
$prevtitle = $title;
} else {
$ns++;
$toc .= ($first) ? '<li><ul><li>' : '<li>';
if ($book->numbering == NUM_NUMBERS) {
$title = "$nch.$ns $title";
}
}
if ($ch->id == $chapter->id) {
$toc .= '<strong>'.$title.'</strong>';
if ($ch->subchapter) {
$currtitle = $prevtitle;
$currsubtitle = $title;
} else {
$currtitle = $title;
$currsubtitle = '&nbsp;';
}
} else {
if( array_key_exists( $ch->id, $okchapters)){
$toc .= '<a title="'.htmlspecialchars($title).'" href="attempt.php?id='.$id.'&chapterid='.$ch->id.'">'.$title.'</a>';
}else
{
$toc .= htmlspecialchars($title);
}
}
$toc .= (!$ch->subchapter) ? '<ul>' : '</li>';
$first = 0;
}
}
$toc .= '</ul></li></ul></font>';
}
$toc .= '</div>';
$toc = str_replace('<ul></ul>', '', $toc); //cleanup of invalid structures
?>

202
bookquiz/view.php

@ -0,0 +1,202 @@
<?PHP // $Id: view.php,v 1.5 2012/07/25 11:16:05 bdaloukas Exp $
require_once('../../config.php');
require_once('lib.php');
$id = required_param('id', PARAM_INT); // Course Module ID
$chapterid = optional_param('chapterid', 0, PARAM_INT); // Chapter ID
$edit = optional_param('edit', -1, PARAM_BOOL); // Edit mode
// =========================================================================
// security checks START - teachers edit; students view
// =========================================================================
if (!$cm = get_coursemodule_from_id('book', $id)) {
print_error('Course Module ID was incorrect');
}
if (!$course = $DB->get_record('course', array( 'id'=> $cm->course))) {
print_error('Course is misconfigured');
}
if (!$book = $DB->get_record('book', array( 'id' => $cm->instance))) {
print_error('Course module is incorrect');
}
require_course_login($course, true, $cm);
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
/// read chapters
$select = $allowedit ? "bookid = $book->id" : "bookid = $book->id AND hidden = 0";
$chapters = $DB->get_records_select('book_chapters', $select, null, 'pagenum', 'id, pagenum, subchapter, title, hidden');
/// check chapterid and read chapter data
if ($chapterid == '0') { // go to first chapter if no given
foreach($chapters as $ch) {
if ($allowedit) {
$chapterid = $ch->id;
break;
}
if (!$ch->hidden) {
$chapterid = $ch->id;
break;
}
}
}
if (!$chapter = $DB->get_record('book_chapters', array('id' => $chapterid))) {
print_error('Error reading book chapters.');
}
//check all variables
unset($id);
unset($chapterid);
/// chapter is hidden for students
if (!$allowedit && $chapter->hidden) {
print_error('Error reading book chapters.');
}
/// chapter not part of this book!
if ($chapter->bookid != $book->id) {
print_error('Chapter not part of this book!');
}
// =========================================================================
// security checks END
// =========================================================================
add_to_log($course->id, 'book', 'view', 'view.php?id='.$cm->id.'&amp;chapterid='.$chapter->id, $book->id, $cm->id);
///read standard strings
$strbooks = get_string('modulenameplural', 'book');
$strbook = get_string('modulename', 'book');
$strTOC = get_string('TOC', 'book');
/// prepare header
if ($course->category) {
$navigation = '<a href="../../course/view.php?id='.$course->id.'">'.$course->shortname.'</a> ->';
} else {
$navigation = '';
}
$buttons = $allowedit ? '<table cellspacing="0" cellpadding="0"><tr><td>'.update_module_button($cm->id, $course->id, $strbook).'</td>'.
'<td>&nbsp;</td><td>'.book_edit_button($cm->id, $course->id, $chapter->id).'</td></tr></table>'
: '&nbsp;';
/// prepare chapter navigation icons
$previd = null;
$nextid = null;
$found = 0;
foreach ($chapters as $ch) {
if ($found) {
$nextid= $ch->id;
break;
}
if ($ch->id == $chapter->id) {
$found = 1;
}
if (!$found) {
$previd = $ch->id;
}
}
if ($ch == current($chapters)) {
$nextid = $ch->id;
}
$chnavigation = '';
echo "previd=$previd nextid=$nextid<br>";
if ($previd) {
$chnavigation .= '<a title="'.get_string('navprev', 'book').'" href="view.php?id='.$cm->id.'&amp;chapterid='.$previd.'"><img src="'.$OUTPUT->pix_url('bookquiz/nav_prev', 'mod_game').'" class="bigicon" alt="'.get_string('navprev', 'book').'"/></a>';
} else {
$chnavigation .= '<img src="'.$OUTPUT->pix_url('bookquiz/nav_prev_dis', 'mod_game').'" class="bigicon" alt="" />';
}
if ($nextid) {
$chnavigation .= '<a title="'.get_string('navnext', 'book').'" href="view.php?id='.$cm->id.'&amp;chapterid='.$nextid.'"><img src="'.$OUTPUT->pix_url('bookquiz/nav_next', 'mod_game').'" class="bigicon" alt="'.get_string('navnext', 'book').'" /></a>';
} else {
$sec = '';
if ($section = $DB->get_record('course_sections', array( 'id' => $cm->section))) {
$sec = $section->section;
}
$chnavigation .= '<a title="'.get_string('navexit', 'book').'" href="../../course/view.php?id='.$course->id.'#section-'.$sec.'"><img src="'.$OUTPUT->pix_url('bookquiz/nav_exit', 'mod_game').'" class="bigicon" alt="'.get_string('navexit', 'book').'" /></a>';
}
echo "chnavigation=$chnavigation<br>";
/// prepare print icons
if ($book->disableprinting) {
$printbook = '';
$printchapter = '';
} else {
$printbook = '<a title="'.get_string('printbook', 'book').'" href="print.php?id='.$cm->id.'" onclick="this.target=\'_blank\'"><img src="'.$OUTPUT->pix_url('bookquiz/print_book', 'mod_game').'" class="bigicon" alt="'.get_string('printbook', 'book').'"/></a>';
$printchapter = '<a title="'.get_string('printchapter', 'book').'" href="print.php?id='.$cm->id.'&amp;chapterid='.$chapter->id.'" onclick="this.target=\'_blank\'"><img src="'.$OUTPUT->pix_url('bookquiz/print_chapter', 'mod_game').'" class="bigicon" alt="'.get_string('printchapter', 'book').'"/></a>';
}
// =====================================================
// Book display HTML code
// =====================================================
echo "OK";
?>
<table border="0" cellspacing="0" width="100%" valign="top" cellpadding="2">
<!-- subchapter title and upper navigation row //-->
<tr>
<td width="<?php echo 10;?>" valign="bottom">
</td>
<td valign="top">
<table border="0" cellspacing="0" width="100%" valign="top" cellpadding="0">
<tr>
<td align="right"><?php echo 'help'.$chnavigation ?></td>
</tr>
</table>
</td>
</tr>
<!-- toc and chapter row //-->
<tr>
<td width="<?php echo $tocwidth ?>" valign="top" align="left">
<?php
echo $OUTPUT->box_start('generalbox');
echo $toc;
echo $OUTPUT->box_end();
if ($allowedit && $edit) {
echo '<font size="1"><br />';
helpbutton('faq', get_string('faq','book'), 'book', true, true);
echo '</font>';
}
?>
</td>
<td valign="top" align="right">
<?php
echo $OUTPUT->box_start('generalbox');
$content = '';
if (!$book->customtitles) {
if ($currsubtitle == '&nbsp;') {
$content .= '<p class="book_chapter_title">'.$currtitle.'</p>';
} else {
$content .= '<p class="book_chapter_title">'.$currtitle.'<br />'.$currsubtitle.'</p>';
}
}
$content .= $chapter->content;
$nocleanoption = new object();
$nocleanoption->noclean = true;
echo '<div class="book_content">';
echo format_text($content, FORMAT_HTML, $nocleanoption, $course->id);
echo '</div>';
echo $OUTPUT->box_end();
/// lower navigation
echo '<p>'.$chnavigation.'</p>';
?>
</td>
</tr>
</table>
<?php
echo $OUTPUT->footer($course);
?>

745
cross/cross_class.php

@ -0,0 +1,745 @@
<?php
/*
Crossing Words for
Codewalkers PHP Coding Contest of July 2002
(http://codewalkers.com/php-contest.php)
Author Àngel Fenoy from Arenys de Mar, Barcelona.
*/
class Cross
{
var $m_input_answers; //contains the words and the answers
var $m_words; //the words that will be used
var $m_time_limit = 30;
//computed by computenextcross
var $m_best_cross_pos; //the best puzzle
var $m_best_cross_dir; //the best puzzle
var $m_best_cross_word; //the best puzzle
var $m_best_puzzle;
var $m_bests; //best score as a phrase
var $m_best_score; //the best score
var $m_best_connectors;
var $m_best_filleds;
var $m_best_spaces;
var $m_best_N20;
//computepuzzleinfo
var $m_mincol; //computed by ComputePuzzleInfo
var $m_maxcol; //computed by ComputePuzzleInfo
var $m_minrow; //computed by ComputePuzzleInfo
var $m_maxrow; //computed by ComputePuzzleInfo
var $m_cLetter; //computed by ComputePuzzleInfo
var $m_reps; //repetition of each word
var $m_average_reps;//average of repetitions
function setwords( $answers, $maxcols, $reps)
{
$this->m_reps = array();
foreach( $reps as $word => $r){
$this->m_reps[ game_upper( $word)] = $r;
}
$this->m_average_reps=0;
foreach( $reps as $r)
$this->m_average_reps += $r;
if( count( $reps))
$this->m_average_reps /= count( $reps);
$this->m_input_answers = array();
foreach( $answers as $word => $answer){
$this->m_input_answers[ game_upper( $word)] = $answer;
}
$this->m_words = array();
$maxlen = 0;
foreach( $this->m_input_answers as $word => $answer)
{
$len = textlib::strlen( $word);
if( $len > $maxlen){
$maxlen = $len;
}
}
$N20 = $maxlen;
$this->m_N20min = round( $N20 - $N20/4);
$this->m_N20max = round( $N20 + $N20/4);
if( $this->m_N20max > $maxcols and $maxcols > 0){
$this->m_N20max = $maxcols;
}
if( $this->m_N20min > $this->m_N20max){
$this->m_N20min = $this->m_N20max;
}
$this->m_words = array();
foreach( $this->m_input_answers as $word => $answer)
{
$len =textlib::strlen( $word);
if( $len <= $this->m_N20max){
$this->m_words[] = game_upper( $word);
}
}
$this->randomize();
return count( $this->m_words);
}
function randomize()
{
$n = count( $this->m_words);
for($j=0; $j <= $n/4; $j++)
{
$i = array_rand( $this->m_words);
$this->swap( $this->m_words[ $i], $this->m_words[ 0]);
}
}
function computedata( &$crossm, &$crossd, &$letters, $maxwords)
{
$t1 = time();
$ctries = 0;
$m_best_score = 0;
$m_best_connectors = $m_best_filleds = $m_best_spaces = 0;
$m_best_N20 = 0;
$nochange = 0;
for(;;)
{
//selects the size of the cross
$N20 = mt_rand( $this->m_N20min, $this->m_N20max);
if( !$this->computenextcross( $N20, $t1, $ctries, $maxwords, $nochange))
break;
$ctries++;
if (time() - $t1 > $this->m_time_limit - 3){
break;
}
if( $nochange > 10)
break;
}
$this->computepuzzleinfo( $this->m_best_N20, $this->m_best_cross_pos, $this->m_best_cross_dir, $this->m_best_cross_word, false);
set_time_limit( 30);
return $this->savepuzzle( $crossm, $crossd, $ctries, time()-$t1);
}
function computenextcross( $N20, $t1, $ctries, $maxwords, &$nochange)
{
$MAXW = $N20;
$N21 = $N20 + 1;
$N22 = $N20 + 2;
$N2222 = $N22 * $N22;
$base_puzzle = str_repeat('0', $N22) .
str_repeat('0' . str_repeat('.', $N20) . '0', $N20) .
str_repeat('0', $N22);
$cross_pos = array();
$cross_dir = array();
$cross_word = array();
$magics = array();
for ($n = 2; $n < $N21; $n++)
{
$a = array();
for ($r = 2; $r < ($n + 2); $r++)
$a[] = $r;
uasort($a, array( $this, 'cmp_magic'));
$magics[ $n] = $a;
}
uasort($this->m_words, array( $this, 'cmp'));
$words = ';' . implode(';', $this->m_words) . ';';
$puzzle = $base_puzzle;
$row = mt_rand(3, max( 3, $N20-3));
$col = mt_rand(3, max( 3, $N20-3));
$pos = $N22 * $row + $col;
$poss = array();
$ret = $this->scan_pos($pos, 'h', true, $puzzle, $words, $magics, $poss, $cross_pos, $cross_dir, $cross_word, $N20);
while ($s = sizeof($poss))
{
$p = array_shift($poss);
if ($this->scan_pos($p[0], $p[1], false, $puzzle, $words, $magics, $poss, $cross_pos, $cross_dir, $cross_word, $N20)){
$n_words = count( $cross_word);
if( $maxwords){
if( $n_words >= $maxwords){
break;
}
}
}
if (time() - $t1 > $this->m_time_limit - 3){
return false;
}
}
$n_words = count( $cross_word);
$score = $this->computescore( $puzzle, $N20, $N22, $N2222, $n_words, $n_connectors, $n_filleds, $cSpaces, $cross_word);
if ($score > $this->m_best_score)
{
$this->m_best_cross_pos = $cross_pos;
$this->m_best_cross_dir = $cross_dir;
$this->m_best_cross_word = $cross_word;
$this->m_best_puzzle = $puzzle;
$this->m_bests = array('Words' => "$n_words * 5 = " . ($n_words * 5),
'Connectors' => "$n_connectors * 3 = " . ($n_connectors * 3),
'Filled in spaces' => $n_filleds,
"N20" => $N20
);
$this->m_best_score = $score;
$this->m_best_connectors = $n_connectors;
$this->m_best_filleds = $n_filleds;
$this->m_best_spaces = $cSpaces;
$this->m_best_N20 = $N20;
$nochange = 0;
}else
{
$nochange++;
}
return true;
}
function computescore( $puzzle, $N20, $N22, $N2222, $n_words, &$n_connectors, &$n_filleds, &$cSpaces, $cross_word)
{
$n_connectors = $n_filleds = 0;
$puzzle00 = str_replace('.', '0', $puzzle);
$used=0;
for ($n = 0; $n < $N2222; $n++)
{
if ($puzzle00[$n]){
$used ++;
if (($puzzle00[$n - 1] or $puzzle00[$n + 1]) and ($puzzle00[$n - $N22] or $puzzle00[$n + $N22])){
$n_connectors++;
} else{
$n_filleds++;
}
}
}
$cSpaces = substr_count( $puzzle, ".");
$score = ($n_words * 5) + ($n_connectors * 3) + $n_filleds;
$sum_rep = 0;
foreach( $cross_word as $word){
$word = textlib::substr( $word, 1, -1);
if( array_key_exists( $word, $this->m_reps))
$sum_rep += $this->m_reps[ $word] - $this->m_average_reps;
}
return $score-10*$sum_rep;
}
function computepuzzleinfo( $N20, $cross_pos, $cross_dir, $cross_word, $bPrint=false)
{
$bPrint=false;
$N22 = $N20 + 2;
$this->m_mincol = $N22;
$this->m_maxcol = 0;
$this->m_minrow = $N22;
$this->m_maxrow = 0;
$this->m_cletter = 0;
if( count( $cross_word) == 0){
return;
}
if( $bPrint)
echo "<BR><BR>PuzzleInfo N20=$N20 words=".count($cross_word)."<BR>";
for($i = 0; $i < count($cross_pos); $i++)
{
$pos = $cross_pos[ $i];
$col = $pos % $N22;
$row = floor( $pos / $N22);
$dir = $cross_dir[ $i];
$len = textlib::strlen($cross_word[ $i])-3;
if( $bPrint)
echo "col=$col row=$row dir=$dir word=".$cross_word[ $i]."<br>";
$this->m_cletter += $len;
if( $col < $this->m_mincol)
$this->m_mincol = $col;
if( $row < $this->m_minrow)
$this->m_minrow = $row;
if( $dir == 'h')
$col += $len;
else
$row += $len;
if( $col > $this->m_maxcol)
$this->m_maxcol = $col;
if( $row > $this->m_maxrow)
$this->m_maxrow = $row;
}
if( $bPrint)
echo "mincol={$this->m_mincol} maxcol={$this->m_maxcol} minrow={$this->m_minrow} maxrow={$this->m_maxrow}<br>";
if( $this->m_mincol > $this->m_maxcol)
$this->m_mincol = $this->m_maxcol;
if( $this->m_minrow > $this->m_maxrow)
$this->m_minrow = $this->m_maxrow;
}
function savepuzzle( &$crossm, &$crossd, $ctries, $time)
{
$N22 = $this->m_best_N20 + 2;
$cols = $this->m_maxcol - $this->m_mincol + 1;
$rows = $this->m_maxrow - $this->m_minrow + 1;
//if( $cols < $rows)
// $bSwapColRow = 1;
//else
$bSwapColRow = 0;
if( $bSwapColRow)
{
Swap( $cols, $rows);
Swap( $this->m_mincol, $this->m_minrow);
Swap( $this->m_maxcol, $this->m_maxrow);
}
$crossm = new stdClass();
$crossm->datebegin = time();
$crossm->time = $time;
$crossm->cols = $cols;
$crossm->rows = $rows;
$crossm->words = count( $this->m_best_cross_pos);
$crossm->wordsall = count( $this->m_input_answers);
$crossm->createscore = $this->m_best_score;
$crossm->createtries = $ctries;
$crossm->createtimelimit = $this->m_time_limit;
$crossm->createconnectors = $this->m_best_connectors;
$crossm->createfilleds = $this->m_best_filleds;
$crossm->createspaces = $this->m_best_spaces;
for($i = 0; $i < count($this->m_best_cross_pos); $i++)
{
$pos = $this->m_best_cross_pos[ $i];
$col = $pos % $N22;
$row = floor( ($pos-$col) / $N22);
$col += - $this->m_mincol + 1;
$row += - $this->m_minrow + 1;
$dir = $this->m_best_cross_dir[ $i];
$word = $this->m_best_cross_word[ $i];
$word = substr( $word, 1, strlen( $word)-2);
$rec = new stdClass();
$rec->col = $col;
$rec->row = $row;
$rec->horizontal = ($dir == "h" ? 1 : 0);
$rec->answertext = $word;
$rec->questiontext = $this->m_input_answers[ $word];
if( $rec->horizontal)
$key = sprintf( 'h%10d %10d', $rec->row, $rec->col);
else
$key = sprintf( 'v%10d %10d', $rec->col, $rec->row);
$crossd[ $key] = $rec;
}
if( count( $crossd) > 1){
ksort( $crossd);
}
return (count( $crossd) > 0);
}
function swap( &$a, &$b)
{
$temp = $a;
$a = $b;
$b = $temp;
}
function displaycross($puzzle, $N20)
{
$N21 = $N20 + 1;
$N22 = $N20 + 2;
$N2222 = $N22 * $N22;
$N2221 = $N2222 - 1;
$N2200 = $N2222 - $N22;
$ret = "<table border=0 cellpadding=2 cellspacing=1><tr>";
for ($n = 0;; $n ++) {
$c = textlib::substr( $puzzle, $n, 1);
if (($m = $n % $N22) == 0 or $m == $N21 or $n < $N22 or $n > $N2200) {
$ret .= "<td class=marc> </td>";
} elseif ( $c == '0') {
$ret .= "<td class=limit> </td>";
} elseif ($c == '.') {
$ret .= "<td class=blanc> </td>";
} else {
if ((textlib::substr( $puzzle, $n - 1, 1) > '0' or
textlib::substr( $puzzle, $n + 1, 1) > '0') and
(textlib::substr( $puzzle, $n - $N22, 1) > '0'
or textlib::substr( $puzzle, $n + $N22, 1) > '0')) {
$ret .= "<td align=center class=connector>$c</td>";
} else {
$ret .= "<td align=center class=filled>$c</td>";
}
}
if ($n == $N2221) {
return "$ret</tr></table>";
} elseif ($m == $N21) {
$ret .= "</tr><tr>";
}
}
return $ret.'</tr></table>';
}
function scan_pos($pos, $dir, $val_blanc, &$puzzle, &$words, &$magics, &$poss, &$cross_pos, &$cross_dir, &$cross_word, $N20)
{
$MAXW = $N20;
$N22 = $N20 + 2;
$N2222 = $N22 * $N22;
if ($dir == 'h'){
$inc = 1;
if ($pos + $inc >= $N2222){
return false;
}
$oinc = $N22;
$new_dir = 'v';
}else
{
$inc = $N22;
if ($pos + $inc >= $N2222){
return false;
}
$oinc = 1;
$new_dir = 'h';
}
$regex = textlib::substr( $puzzle, $pos, 1);
if ( ($regex == '0' or $regex == '.') and (! $val_blanc)){
return false;
}
if ((textlib::substr( $puzzle, $pos - $inc, 1) > '0')){
return false;
}
if ((textlib::substr( $puzzle, $pos + $inc, 1) > '0')){
return false;
}
$left = $right = 0;
for ($limit_a = $pos - $inc; ($w = textlib::substr( $puzzle, $limit_a, 1)) !== '0'; $limit_a -= $inc)
{
if ($w == '.' and ((textlib::substr( $puzzle, $limit_a - $oinc, 1) > '0') or (textlib::substr( $puzzle, $limit_a + $oinc, 1) > '0'))){
break;
}
if (++$left == $MAXW){
$left --;
break;
}
$regex = $w . $regex;
}
for ($limit_b = $pos + $inc; ($w = textlib::substr( $puzzle, $limit_b, 1)) !== '0'; $limit_b += $inc)
{
if ($w== '.' and ((textlib::substr( $puzzle, $limit_b - $oinc, 1) > '0') or (textlib::substr( $puzzle, $limit_b + $oinc, 1) > '0'))){
break;
}
if (++$right == $MAXW){
$right--;
break;
}
$regex .= $w;
}
if (($len_regex = textlib::strlen($regex)) < 2){
return false;
}
foreach ($magics[$len_regex] as $m => $lens)
{
$ini = max(0, ($left + 1) - $lens);
$fin = $left;
$pos_p = max($limit_a + $inc, $pos - (($lens - 1 ) * $inc));
for($pos_c = $ini; $pos_c <= $fin; $pos_c++, $pos_p += $inc)
{
if (textlib::substr( $puzzle, $pos_p - $inc, 1) > '0'){
continue;
}
$w = textlib::substr($regex, $pos_c, $lens);
if( !$this->my_preg_match( $w, $words, $word))
continue;
$larr0 = $pos_p + ((textlib::strlen( $word) - 2) * $inc);
if ($larr0 >= $N2222){
continue;
}
if (textlib::substr( $puzzle, $larr0, 1) > '0'){
continue;
}
$words = str_replace( $word, ';', $words);
$len = textlib::strlen( $word) ;
for ($n = 1, $pp = $pos_p; $n < $len - 1; $n++, $pp += $inc)
{
$this->setchar( $puzzle, $pp, textlib::substr( $word , $n, 1));
if ($pp == $pos)
continue;
$c = textlib::substr( $puzzle, $pp, 1);
$poss[] = array($pp, $new_dir, ord( $c));
}
$cross_pos[] = $pos_p;
$cross_dir[] = ($new_dir == 'h' ? 'v' : 'h');
$cross_word[] = $word;
$this->setchar( $puzzle, $pos_p - $inc, '0');
$this->setchar( $puzzle, $pp, '0');
return true;
}
}
return false;
}
function my_preg_match( $w, $words, &$word)
{
$a = explode( ";", $words);
$len_w = textlib::strlen( $w);
foreach( $a as $test)
{
if( textlib::strlen( $test) != $len_w)
continue;
for( $i=0; $i <$len_w; $i++)
{
if( textlib::substr( $w, $i, 1) == '.')
continue;
if( textlib::substr( $w, $i, 1) != textlib::substr( $test, $i, 1) )
break;
}
if( $i < $len_w)
continue;
$word = ';'.$test.';';
return true;
}
return false;
}
function setchar( &$s, $pos, $char)
{
$ret = "";
if( $pos > 0)
$ret .= textlib::substr( $s, 0, $pos);
$s = $ret . $char . textlib::substr( $s, $pos+1, textlib::strlen( $s)-$pos-1);
}
function showhtml_base( $crossm, $crossd, $showsolution, $showhtmlsolutions, $showstudentguess, $context, $game)
{
$this->m_LegendH = array();
$this->m_LegendV = array();
$sRet = "CrosswordWidth = {$crossm->cols};\n";
$sRet .= "CrosswordHeight = {$crossm->rows};\n";
$sRet .= "Words=".count( $crossd).";\n";
$sWordLength = "";
$sguess = "";
$ssolutions = '';
$shtmlsolutions = '';
$sWordX = "";
$sWordY = "";
$sClue = "";
$LastHorizontalWord = -1;
$i = -1;
$LegendV = array();
$LegendH = array();
if( $game->glossaryid)
{
$cmglossary = get_coursemodule_from_instance('glossary', $game->glossaryid, $game->course);
$contextglossary = get_context_instance(CONTEXT_MODULE, $cmglossary->id);
}
foreach ($crossd as $rec)
{
if( $rec->horizontal == false and $LastHorizontalWord == -1){
$LastHorizontalWord = $i;
}
$i++;
$sWordLength .= ",".textlib::strlen( $rec->answertext);
if( $rec->questionid != 0)
{
$q = game_filterquestion(str_replace( '\"', '"', $rec->questiontext), $rec->questionid, $context->id, $game->course);
$rec->questiontext = game_repairquestion( $q);
}else
{
//glossary
$q = game_filterglossary(str_replace( '\"', '"', $rec->questiontext), $rec->glossaryentryid, $contextglossary->id, $game->course);
$rec->questiontext = game_repairquestion( $q);
}
$sClue .= ',"'.game_tojavascriptstring( game_filtertext( $rec->questiontext, 0))."\"\r\n";
if( $showstudentguess)
$sguess .= ',"'.$rec->studentanswer.'"';
else
$sguess .= ",''";
$sWordX .= ",".($rec->col-1);
$sWordY .= ",".($rec->row-1);
if( $showsolution){
$ssolutions .= ',"'.$rec->answertext.'"';
}else
{
$ssolutions .= ',""';
}
if( $showhtmlsolutions){
$shtmlsolutions .= ',"'.base64_encode( $rec->answertext).'"';
}
$attachment = '';
//if( game_issoundfile( $rec->attachment)){
// $attachment = game_showattachment( $rec->attachment);
//}
$s = $rec->questiontext.$attachment;
if( $rec->horizontal){
if( array_key_exists( $rec->row, $LegendH)){
$LegendH[ $rec->row][] = $s;
}else
{
$LegendH[ $rec->row] = array( $s);
}
}else
{
if( array_key_exists( $rec->col, $LegendV)){
$LegendV[ $rec->col][] = $s;
}else
{
$LegendV[ $rec->col] = array( $s);
}
}
}
$letters = get_string( 'lettersall', 'game');
$this->m_LegendH = array();
foreach( $LegendH as $key => $value)
{
if( count( $value) == 1)
$this->m_LegendH[ $key] = $value[ 0];
else
{
for( $i=0; $i < count( $value); $i++)
{
$this->m_LegendH[ $key.textlib::substr( $letters, $i, 1)] = $value[ $i];
}
}
}
$this->m_LegendV = array();
foreach( $LegendV as $key => $value)
{
if( count( $value) == 1)
$this->m_LegendV[ $key] = $value[ 0];
else
{
for( $i=0; $i < count( $value); $i++)
{
$this->m_LegendV[ $key.textlib::substr( $letters, $i, 1)] = $value[ $i];
}
}
}
ksort( $this->m_LegendH);
ksort( $this->m_LegendV);
$sRet .= "WordLength = new Array( ".textlib::substr( $sWordLength, 1).");\n";
$sRet .= "Clue = new Array( ".textlib::substr( $sClue, 1).");\n";
$sguess = str_replace( ' ', '_', $sguess);
$sRet .= "Guess = new Array( ".textlib::substr( $sguess, 1).");\n";
$sRet .= "Solutions = new Array( ".textlib::substr( $ssolutions, 1).");\n";
if( $showhtmlsolutions){
$sRet .= "HtmlSolutions = new Array( ".textlib::substr( $shtmlsolutions, 1).");\n";
}
$sRet .= "WordX = new Array( ".textlib::substr( $sWordX, 1).");\n";
$sRet .= "WordY = new Array( ".textlib::substr( $sWordY, 1).");\n";
$sRet .= "LastHorizontalWord = $LastHorizontalWord;\n";
return $sRet;
}
function cmp($a, $b) {
return textlib::strlen($b) - textlib::strlen($a);
}
function cmp_magic($a, $b) {
return (textlib::strlen($a) + mt_rand(0, 3)) - (textlib::strlen($b) - mt_rand(0, 1));
}
}

244
cross/crossdb_class.php

@ -0,0 +1,244 @@
<?php // $Id: crossdb_class.php,v 1.17 2012/07/25 11:16:05 bdaloukas Exp $
/**
* This class is a cross that can load and save to a table
*
* @author bdaloukas
* @version $Id: crossdb_class.php,v 1.17 2012/07/25 11:16:05 bdaloukas Exp $
* @package game
**/
class CrossDB extends Cross
{
function savecross( $game, &$crossm, $crossd, $id)
{
global $DB, $USER;
$crossm->id = $id;
$crossm->sourcemodule = $game->sourcemodule;
$this->delete_records( $id);
if (!(game_insert_record( "game_cross", $crossm))){
print_error( 'Insert page: new page game_cross not inserted');
}
foreach( $crossd as $rec)
{
$rec->attemptid = $id;
$rec->questiontext = addslashes( $rec->questiontext);
$rec->gamekind = $game->gamekind;
$rec->gameid = $game->id;
$rec->userid = $USER->id;
$rec->sourcemodule = $game->sourcemodule;
if (!$DB->insert_record( 'game_queries', $rec)){
print_error( 'Insert page: new page game_queries not inserted');
}
game_update_repetitions($game->id, $USER->id, $rec->questionid, $rec->glossaryentryid);
}
return true;
}
function delete_records( $id)
{
global $DB;
if( !$DB->delete_records( 'game_queries', array( 'attemptid' => $id))){
print_error( "Can't delete from game_queries attemptid=$id");
}
if( !$DB->delete_records( 'game_cross', array( 'id' => $id))){
print_error( "Can't delete from game_cross id=$id");
}
}
function loadcross( $g, &$done, &$html, $game, $attempt, $crossrec, $onlyshow, $showsolution, &$finishattempt, $showhtmlsolutions, &$language, $showstudentguess, $context)
{
global $DB;
$info = '';
$correctLetters = 0;
$allLetters = 0;
$wrongLetters = 0;
$html = '';
$done = false;
if( $g == ""){
$game_questions = false;
}
$this->m_mincol = $this->m_minrow = 0;
$this->m_maxcol = $crossrec->cols;
$this->m_maxrow = $crossrec->rows;
if( $g == ""){
$g = str_repeat( ' ', $this->m_maxcol * $this->m_maxrow);
}
$load = false;
$puzzle = str_repeat('.', $this->m_maxrow * $this->m_maxcol);
if ($recs = $DB->get_records( 'game_queries', array( 'attemptid' => $crossrec->id)))
{
$a = array();
foreach ($recs as $rec)
{
if( $rec->horizontal)
$key = sprintf( 'h%10d %10d', $rec->row, $rec->col);
else
$key = sprintf( 'v%10d %10d', $rec->col, $rec->row);
$a[ $key] = $rec;
}
ksort( $a);
$b = array();
$correctletters = $wrongletters = $restletters = 0;
foreach( $a as $rec){
$this->updatecrossquestions( $rec, $g, $pos, $correctletters, $wrongletters, $restletters, $game, $attempt, $crossrec);
$b[] = $rec;
if( ($rec->col != 0) and ($rec->row != 0)){
$load = true;
}
if( $language == ''){
$language = game_detectlanguage( $rec->answertext);
}
}
$info = $this->game_cross_computecheck( $correctletters, $wrongletters, $restletters, $game, $attempt, $done, $onlyshow, $showsolution, $finishattempt);
$html = $this->showhtml_base( $crossrec, $b, $showsolution, $showhtmlsolutions, $showstudentguess, $context, $game);
}
if( $load == false)
{
$finishattempt = true;
}
return $info;
}
function game_cross_computecheck( $correctletters, $wrongletters, $restletters, $game, $attempt, &$done, $onlyshow, $showsolution, $finishattempt)
{
$ret = '';
if( $correctletters == 0 and $wrongletters == 0){
return $ret;
}
$and = get_string( 'and', 'game');
$a = array();
if( $correctletters)
$a[] = $correctletters.' '.( $correctletters > 1 ? get_string( 'cross_corrects', 'game') :get_string( 'cross_correct', 'game'));
if( $wrongletters)
$a[] = $wrongletters.' '.( $wrongletters > 1 ? get_string( 'cross_errors', 'game') : get_string( 'cross_error', 'game'));
if( $correctletters > 1 or $wrongletters > 1) {
$ret = get_string( 'cross_found_many', 'game');
}else
{
$ret = get_string( 'cross_found_one', 'game');
}
$i = 0;
foreach( $a as $msg)
{
$i++;
if( $i == 1){
$ret .= ' '.$msg;
}else if( $i == count($a))
{
$ret .= ' '.get_string( 'and', 'game').' '.$msg;
}else
{
$ret .= ', '.$msg;
}
}
$done = ( $restletters == 0 ? true : false);
if( $finishattempt == false){
if( $onlyshow or $showsolution){
return $ret;
}
}else{
$done = 1;
}
$grade = $correctletters / ($correctletters + $restletters);
$ret .= '<br>'.get_string( 'grade', 'game').' '.round( $grade * 100).' %';
game_updateattempts( $game, $attempt, $grade, $done);
return $ret;
}
//rec is a record of cross_questions
function updatecrossquestions( &$rec, &$g, &$pos, &$correctletters, &$wrongletters, &$restletters, $game, $attempt, $crossrec)
{
global $DB, $USER;
$word = $rec->answertext;
$len = textlib::strlen( $word);
$guess = textlib::substr( $g, $pos, $len);
$len_guess = textlib::strlen( $guess);;
$pos += $len;
$is_empty = true;
for($i = 0; $i < $len; $i++)
{
if( $i < $len_guess)
$letterguess = textlib::substr( $guess, $i, 1);
else
$letterguess = " ";
if( $letterguess != ' ')
$is_empty = false;
$letterword= textlib::substr( $word, $i, 1);
if( $letterword != $letterguess)
{
if( ($letterguess != ' ' and $letterguess != '_') or ($letterword == ' ')){
$wrongletters++;
}
game_setchar( $guess, $i, '_');
$restletters++;
}else if( $letterguess == ' '){
if( $guess == $word){
$correctletters++;
}else
{
$wrongletters++;
game_setchar( $guess, $i, '_');
}
}else
{
$correctletters++;
}
}
if( $is_empty){
return;
}
if( ($rec->studentanswer == $guess )){
return;
}
$rec->studentanswer = $guess;
$updrec = new stdClass();
$updrec->studentanswer = $guess;
$updrec->id = $rec->id;
if (!$DB->update_record( 'game_queries', $updrec, $rec->id)){
print_error( 'Update game_queries: not updated');
}
$score = $correctletters / $len;
game_update_queries( $game, $attempt, $rec, $score, $guess);
}
}

1128
cross/play.php

File diff suppressed because it is too large

229
cryptex/cryptexdb_class.php

@ -0,0 +1,229 @@
<?PHP
class CryptexDB extends CrossDB
{
function savecryptex( $game, &$crossm, $crossd, $id, $letters)
{
global $USER;
CrossDB::delete_records( $id);
if( (CrossDB::savecross( $game, $crossm, $crossd, $id)) == false){
return false;
}
$crossm->id = $id;
$newrec = new stdClass();
$newrec->id = $id;
$newrec->letters = $letters;
if (!($cryptexid = game_insert_record( "game_cryptex", $newrec))){
print_error( 'Insert page: new page game_cryptex not inserted');
}
return $newrec;
}
function computeletters( $crossm, $crossd)
{
$letters = '';
$cols = $crossm->cols + 1;
$letters = str_repeat('.', $crossm->cols).'#';
$letters = str_repeat($letters, $crossm->rows) ;
$freqs1 = array();
$count1 = $count2 = 0;
foreach( $crossd as $rec)
{
$pos = $rec->col - 1 + ($rec->row-1) * $cols;
$s = $rec->answertext;
$len = textlib::strlen( $s);
$a = array();
for( $i=0; $i < $len; $i++){
$a[] = textlib::substr( $s, $i, 1);
}
for( $i=0; $i < $len; $i++){
$this->setchar( $letters, $pos, $a[ $i]);
$pos += ( $rec->horizontal ? 1 : $cols);
$freqs1[ ++$count1] = $a[ $i];
if( $i+1 < $len){
$freqs2[ ++$count2] = $a[ $i].$a[ $i+1];
}
}
}
$len = textlib::strlen( $letters);
$spaces = 0;
for( $i=0; $i < $len; $i++){
if( textlib::substr( $letters, $i, 1) == '.'){
$spaces++;
}
}
$step = 1;
while( $spaces)
{
if( $step == 1){
$step = 2;
$i = array_rand( $freqs1);
$this->insertchar( $letters, $crossm->cols, $crossm->rows, $freqs1[ $i], $spaces);
}else
{
$step=1;
$i = array_rand( $freqs2);
$this->insertchars( $letters, $crossm->cols, $crossm->rows, $freqs2[ $i], $spaces);
}
}
$ret_letters = "";
for( $row=0; $row < $crossm->rows; $row++){
$ret_letters .= textlib::substr( $letters, $cols * $row, ($cols-1));
}
return $ret_letters;
}
function displaycryptex( $cols, $rows, $letters, $mask, $showsolution, $textdir)
{
echo "<table border=1 $textdir>";
for( $row=0; $row < $rows; $row++)
{
echo "<tr>";
for( $col=0; $col < $cols; $col++){
$pos = $cols * $row+$col;
$c = textlib::substr( $letters, $pos, 1);
$m = textlib::substr( $mask, $pos, 1);
if( $showsolution and $m > '0'){
echo "<td align=center><b><FONT color=red>".$c."</font></td>";
}else if( $m == '1'){
echo "<td align=center><b><FONT color=red>".$c."</font></td>";
}else
{
echo "<td align=center>".$c."</td>";
}
}
echo "</tr>\r\n";
}
echo "</table>";
}
function insertchar( &$letters, $cols, $rows, $char, &$spaces)
{
$len = textlib::strlen( $letters);
for( $i=0; $i < $len; $i++){
if( textlib::substr( $letters, $i, 1) == '.'){
$this->setchar( $letters, $i, $char);
$spaces--;
return;
}
}
}
function insertchars( &$letters, $cols, $rows, $char, &$spaces)
{
$len = textlib::strlen( $letters);
for( $i=0; $i < $len; $i++){
if( textlib::substr( $letters, $i, 1) == '.' and textlib::substr( $letters, $i+1, 1) == '.' ){
$this->setchar( $letters, $i, textlib::substr( $char, 0, 1));
$this->setchar( $letters, $i+1, textlib::substr( $char, 1, 1));
$spaces-=2;
return true;
}
if( textlib::substr( $letters, $i, 1) == '.' and textlib::substr( $letters, $i+$cols+1, 1) == '.' ){
$this->setchar( $letters, $i, textlib::substr( $char, 0, 1));
$this->setchar( $letters, $i + $cols+1, textlib::substr( $char, 1, 1));
$spaces-=2;
return true;
}
}
return false;
}
function gethash( $word)
{
$x = 37;
$len = count( textlib::strlen( $word));
for($i=0; $i < $len; $i++){
$x = $x xor ord( textlib::substr( $word, $i, 1));
}
return $x;
}
function loadcryptex( $crossm, &$mask, &$corrects, &$language)
{
global $DB;
$questions = array();
$corrects = array();
$mask = str_repeat( '0', $crossm->cols * $crossm->rows);
if ($recs = $DB->get_records( 'game_queries', array( 'attemptid' => $crossm->id)))
{
foreach ($recs as $rec)
{
if( $rec->questiontext == ''){
$rec->questiontext = ' ';
}
$key = $this->gethash( $rec->questiontext).'-'.$rec->answertext.'-'.$rec->id;
$questions[ $key] = $rec;
$word = $rec->answertext;
$pos = $crossm->cols * ($rec->row-1)+($rec->col-1);
$len = textlib::strlen( $word);
$found = ($rec->answertext == $rec->studentanswer);
for( $i=0; $i < $len; $i++)
{
$c = ( $found ? '1' : '2');
if( textlib::substr( $mask, $pos, 1) != '1'){
game_setchar( $mask, $pos, $c);
}
$pos += ($rec->horizontal ? 1 : $crossm->cols);
}
if( $found){
$corrects[ $rec->id] = 1;
}
if( $language == ''){
$language = game_detectlanguage( $rec->answertext);
}
}
ksort( $questions);
}
return $questions;
}
function setwords( $answers, $maxcols, $reps)
{
return Cross::setwords( $answers, $maxcols, $reps);
}
function computedata( &$crossm, &$crossd, &$letters, $maxwords)
{
if( !cross::computedata( $crossm, $crossd, $letters, $maxwords)){
return false;
}
$letters = $this->computeletters( $crossm, $crossd);
return true;
}
}

332
cryptex/play.php

@ -0,0 +1,332 @@
<?php // $Id: play.php,v 1.20 2012/08/03 05:52:50 bdaloukas Exp $
/**
* This page plays the cryptex game
*
* @author bdaloukas
* @version $Id: play.php,v 1.20 2012/08/03 05:52:50 bdaloukas Exp $
* @package game
**/
require_once( "cryptexdb_class.php");
function game_cryptex_continue( $id, $game, $attempt, $cryptexrec, $endofgame, $context)
{
global $DB, $USER;
if( $endofgame){
game_updateattempts( $game, $attempt, -1, true);
$endofgame = false;
}
if( $attempt != false and $cryptexrec != false){
$crossm = $DB->get_record( 'game_cross', array( 'id' => $attempt->id));
return game_cryptex_play( $id, $game, $attempt, $cryptexrec, $crossm, false, false, false, $context);
}
if( $attempt === false){
$attempt = game_addattempt( $game);
}
$cryptex = new CryptexDB();
$questions = array();
$infos = array();
$answers = array();
$recs = game_questions_shortanswer( $game);
if( $recs == false){
print_error( get_string( 'no_words', 'game'));
}
$infos = array();
$reps = array();
foreach( $recs as $rec){
if( $game->param7 == false){
if( textlib::strpos( $rec->answertext, ' ')){
continue; //spaces not allowed
}
}
$rec->answertext = game_upper( $rec->answertext);
$answers[ $rec->answertext] = game_repairquestion( $rec->questiontext);
$infos[ $rec->answertext] = array( $game->sourcemodule, $rec->questionid, $rec->glossaryentryid);
$a = array( 'gameid' => $game->id, 'userid' => $USER->id, 'questionid' => $rec->questionid, 'glossaryentryid' => $rec->glossaryentryid);
if(($rec2 = $DB->get_record('game_repetitions', $a, 'id,repetitions r')) != false){
$reps[ $rec->answertext] = $rec2->r;
}
}
$cryptex->setwords( $answers, $game->param1, $reps);
if( $cryptex->computedata( $crossm, $crossd, $letters, $game->param2)){
$new_crossd = array();
foreach( $crossd as $rec)
{
if( array_key_exists( $rec->answertext, $infos)){
$info = $infos[ $rec->answertext];
$rec->id = 0;
$rec->sourcemodule = $info[ 0];
$rec->questionid = $info[ 1];
$rec->glossaryentryid = $info[ 2];
}
game_update_queries( $game, $attempt, $rec, 0, '');
$new_crossd[] = $rec;
}
$cryptexrec = $cryptex->savecryptex( $game, $crossm, $new_crossd, $attempt->id, $letters);
}
game_updateattempts( $game, $attempt, 0, 0);
return game_cryptex_play( $id, $game, $attempt, $cryptexrec, $crossm, false, false, false, $context);
}
function cryptex_showlegend( $legend, $title)
{
if( count( $legend) == 0)
return;
echo "<br><b>$title</b><br>";
foreach( $legend as $key => $line)
echo "$key: $line<br>";
}
//q means game_queries.id
function game_cryptex_check( $id, $game, $attempt, $cryptexrec, $q, $answer, $context)
{
global $DB;
if( $attempt === false){
game_cryptex_continue( $id, $game, $attempt, $cryptexrec, false);
return;
}
$crossm = $DB->get_record_select( 'game_cross', "id=$attempt->id");
$query = $DB->get_record_select( 'game_queries', "id=$q");
$answer1 = trim( game_upper( $query->answertext));
$answer2 = trim( game_upper( $answer));
$len1 = textlib::strlen( $answer1);
$len2 = textlib::strlen( $answer2);
$equal = ( $len1 == $len2);
if( $equal){
for( $i=0; $i < $len1; $i++)
{
if( textlib::substr( $answer1, $i, 1) != textlib::substr( $answer2, $i, 1))
{
$equal = true;
break;
}
}
}
if( $equal == false)
{
game_update_queries( $game, $attempt, $query, 0, $answer2, true);
game_cryptex_play( $id, $game, $attempt, $cryptexrec, $crossm, true, false, false, $context);
return;
}
game_update_queries( $game, $attempt, $query, 1, $answer2);
$onlyshow=false;
$showsolution=false;
game_cryptex_play( $id, $game, $attempt, $cryptexrec, $crossm, true, $onlyshow, $showsolution, $context);
}
function game_cryptex_play( $id, $game, $attempt, $cryptexrec, $crossm, $updateattempt=false, $onlyshow=false, $showsolution=false, $context)
{
global $DB;
global $CFG;
if( $game->toptext != ''){
echo $game->toptext.'<br>';
}
echo '<br>';
$cryptex = new CryptexDB();
$language = $attempt->language;
$questions = $cryptex->loadcryptex( $crossm, $mask, $corrects, $attempt->language);
if( $language != $attempt->language){
if( !$DB->set_field( 'game_attempts', 'language', $attempt->language, array( 'id' => $attempt->id))){
print_error( "game_cross_play: Can't set language");
}
}
if( $attempt->language != '')
$wordrtl = game_right_to_left( $attempt->language);
else
$wordrtl = right_to_left();
$reverseprint = ($wordrtl != right_to_left());
if( $reverseprint)
$textdir = 'dir="'.($wordrtl ? 'rtl' : 'ltr').'"';
else
$textdir = '';
$len = textlib::strlen( $mask);
//count1 means there is a guested letter
//count2 means there is a letter that not guessed
$count1 = $count2 = 0;
for($i=0; $i < $len; $i++)
{
$c = textlib::substr( $mask, $i, 1);
if( $c == '1'){
$count1++;
}else if( $c == '2')
{
$count2++;
}
}
if( $count1 + $count2 == 0){
$gradeattempt = 0;
}else
{
$gradeattempt = $count1 / ($count1 + $count2);
}
$finished = ($count2 == 0);
if( ($finished === false) && ($game->param8 > 0))
{
$found = false;
foreach ( $questions as $q)
{
if ( $q->tries < $game->param8)
$found = true;
}
if( $found == false)
$finished = true; //rich max tries
}
if( $updateattempt){
game_updateattempts( $game, $attempt, $gradeattempt, $finished);
}
if( ($onlyshow == false) and ($showsolution == false)){
if( $finished){
game_cryptex_onfinished( $id, $game, $attempt, $cryptexrec);
}
}
?>
<style type="text/css"><!--
.answerboxstyle {
background-color: #FFFAF0;
border-color: #808080;
border-style: solid;
border-width: 1px;
display: block;
padding: .75em;
width: 240pt;
}
--></style>
<?php
echo '<table border=0>';
echo '<tr><td>';
$cryptex->displaycryptex( $crossm->cols, $crossm->rows, $cryptexrec->letters, $mask, $showsolution, $textdir);
?>
</td>
<td width=10%>&nbsp;</td>
<td>
<form method="get" action="<?php echo $CFG->wwwroot?>/mod/game/attempt.php">
<div id="answerbox" class="answerboxstyle" style="display:none;">
<div id="wordclue" name="wordclue" class="cluebox"> </div>
<input id="action" name="action" type="hidden" value="cryptexcheck">
<input id="q" name="q" type="hidden" >
<input id="id" name="id" value="<?php echo $id; ?>" type="hidden">
<div style="margin-top:1em;"><input id="answer" name="answer" type="text" size="24"
style="font-weight: bold; text-transform:uppercase;" autocomplete="off"></div>
<table border="0" cellspacing="0" cellpadding="0" width="100%" style="margin-top:1em;"><tr>
<td align="right">
<button id="okbutton" type="submit" class="button" style="font-weight: bold;">OK</button> &nbsp;
<button id="cancelbutton" type="button" class="button" onclick="DeselectCurrentWord();">Cancel</button>
</td></tr></table>
</form>
</td>
</tr>
</table>
<?php
$grade = round( 100 * $gradeattempt);
echo '<br>'.get_string( 'grade', 'game').' '.$grade.' %';
echo "<br><br>";
$i = 0;
$else = '';
$contextglossary = false;
foreach( $questions as $key => $q){//print_r( $q);
$i++;
if( $showsolution == false){
//When I want to show the solution a want to show the questions to.
if( array_key_exists( $q->id, $corrects)){
continue;
}
}
$question = "$i. ".$q->questiontext;
$question = game_filterquestion(str_replace( '\"', '"', $question), $q->questionid, $context->id, $game->course);
$question2 = strip_tags($question); //ADDED BY DP (AUG 2009) - fixes " breaking the Answer button for this question
if( ($onlyshow == false) and ($showsolution == false)){
if( ($game->param8 == 0) || ($game->param8 > $q->tries))
$question .= ' &nbsp;<input type="submit" value="'.get_string( 'answer').'" onclick="OnCheck( '.$q->id.',\''.$question2.'\');" />';
}
echo $question;
if( $showsolution){
echo " &nbsp;&nbsp;&nbsp;$q->answertext<B></b>";
}
echo '<br>';
}
if( $game->bottomtext != ''){
echo '<br><br>'.$game->bottomtext;
}
?>
<script>
function OnCheck( id, question)
{
document.getElementById("q").value = id;
document.getElementById("wordclue").innerHTML = question;
// Finally, show the answer box.
document.getElementById("answerbox").style.display = "block";
try
{
document.getElementById("answer").focus();
document.getElementById("answer").select();
}
catch (e)
{
}
}
</script>
<?php
}
function game_cryptex_onfinished( $id, $game, $attempt, $cryptexrec)
{
global $CFG, $DB;
if (! $cm = $DB->get_record( 'course_modules', array( 'id' => $id))) {
print_error( "Course Module ID was incorrect id=$id");
}
echo '<B>'.get_string( 'win', 'game').'</B><BR>';
echo '<br>';
echo "<a href=\"{$CFG->wwwroot}/mod/game/attempt.php?id=$id&forcenew=1\">".get_string( 'nextgame', 'game').'</a> &nbsp; &nbsp; &nbsp; &nbsp; ';
echo "<a href=\"{$CFG->wwwroot}/course/view.php?id=$cm->course\">".get_string( 'finish', 'game').'</a> ';
echo "<br><br>\r\n";
}

101
db/access.php

@ -0,0 +1,101 @@
<?php
/**
* Capability definitions for the game module.
*
* For naming conventions, see lib/db/access.php.
*/
$capabilities = array(
// Ability to see that the game exists, and the basic information
// about it, for example the start date and time limit.
'mod/game:view' => array(
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => array(
'guest' => CAP_ALLOW,
'student' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),
// Ability to do the game as a 'student'.
'mod/game:attempt' => array(
'riskbitmask' => RISK_SPAM,
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => array(
'student' => CAP_ALLOW,
'guest' => CAP_ALLOW
)
),
// Ability for a 'Student' to review their previous attempts. Review by
// 'Teachers' is controlled by mod/game:viewreports.
'mod/game:reviewmyattempts' => array(
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => array(
'student' => CAP_ALLOW
),
'clonepermissionsfrom' => 'moodle/game:attempt'
),
// Edit the game settings, add and remove questions.
'mod/game:manage' => array(
'riskbitmask' => RISK_SPAM,
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),
// Edit the game overrides
'mod/game:manageoverrides' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),
// View the game reports.
'mod/game:viewreports' => array(
'riskbitmask' => RISK_PERSONAL,
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => array(
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),
// Delete attempts using the overview report.
'mod/game:deleteattempts' => array(
'riskbitmask' => RISK_DATALOSS,
'captype' => 'write',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),
'mod/game:addinstance' => array(
'riskbitmask' => RISK_XSS,
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
),
'clonepermissionsfrom' => 'moodle/course:manageactivities'
)
);

8
db/createsnakes.php

@ -0,0 +1,8 @@
<?php
require( "../../../config.php");
execute_sql("truncate TABLE {game_snakes_database}");
require( "importsnakes.php");

53
db/importsnakes.php

@ -0,0 +1,53 @@
<?php // $Id: importsnakes.php,v 1.5 2012/07/25 11:16:05 bdaloukas Exp $
game_importsnakes();
function game_importsnakes()
{
global $DB;
if( $DB->count_records( 'game_snakes_database') != 0){
return;
}
$newrec = new stdClass();
$newrec->name = '8x8 - 4 Snakes - 4 Ladders';
$newrec->cols = 8;
$newrec->rows = 8;
$newrec->fileboard = 'fidaki.jpg';
$newrec->direction = 1;
$newrec->headerx = 4;
$newrec->headery = 4;
$newrec->footerx = 4;
$newrec->footery = 4;
$newrec->width = 487;
$newrec->height = 487;
$newrec->data = 'L3-18,S5-19,S8-27,L24-39,L29-53,S32-62,S41-58,L48-63';
game_importsnakes_do( $newrec);
$newrec = new stdClass();
$newrec->name = '6x6 - 3 Snakes - 3 Ladders';
$newrec->cols = 6;
$newrec->rows = 6;
$newrec->fileboard = 'fidaki2.jpg';
$newrec->direction = 1;
$newrec->headerx = 8;
$newrec->headery = 8;
$newrec->footerx = 8;
$newrec->footery = 8;
$newrec->width = 502;
$newrec->height = 436;
$newrec->data = 'L2-25,S4-23,L8-18,S16-20,L19-29,S27-33';
game_importsnakes_do( $newrec);
}
function game_importsnakes_do( $newrec)
{
global $DB;
if( !$DB->insert_record( 'game_snakes_database', $newrec)){
print_object( $newrec);
print_error( "Can't insert to table game_snakes_database");
}
}

1849
db/importsudoku.php

File diff suppressed because it is too large

353
db/install.xml

@ -0,0 +1,353 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="mod/game/db" VERSION="2011082604" COMMENT="XMLDB file for Moodle mod/game"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
<TABLES>
<TABLE NAME="game" COMMENT="game" NEXT="game_attempts">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="name"/>
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" PREVIOUS="id" NEXT="course"/>
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="name" NEXT="sourcemodule"/>
<FIELD NAME="sourcemodule" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false" PREVIOUS="course" NEXT="timeopen"/>
<FIELD NAME="timeopen" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="sourcemodule" NEXT="timeclose"/>
<FIELD NAME="timeclose" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="timeopen" NEXT="quizid"/>
<FIELD NAME="quizid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="timeclose" NEXT="glossaryid"/>
<FIELD NAME="glossaryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="quizid" NEXT="glossarycategoryid"/>
<FIELD NAME="glossarycategoryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="glossaryid" NEXT="questioncategoryid"/>
<FIELD NAME="questioncategoryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="glossarycategoryid" NEXT="bookid"/>
<FIELD NAME="bookid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="questioncategoryid" NEXT="gamekind"/>
<FIELD NAME="gamekind" TYPE="char" LENGTH="20" NOTNULL="false" SEQUENCE="false" PREVIOUS="bookid" NEXT="param1"/>
<FIELD NAME="param1" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="gamekind" NEXT="param2"/>
<FIELD NAME="param2" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="param1" NEXT="param3"/>
<FIELD NAME="param3" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="param2" NEXT="param4"/>
<FIELD NAME="param4" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="param3" NEXT="param5"/>
<FIELD NAME="param5" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="param4" NEXT="param6"/>
<FIELD NAME="param6" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="param5" NEXT="param7"/>
<FIELD NAME="param7" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="param6" NEXT="param8"/>
<FIELD NAME="param8" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="param7" NEXT="param9"/>
<FIELD NAME="param9" TYPE="text" LENGTH="medium" NOTNULL="false" SEQUENCE="false" PREVIOUS="param8" NEXT="param10"/>
<FIELD NAME="param10" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="param9" NEXT="shuffle"/>
<FIELD NAME="shuffle" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="false" DEFAULT="1" SEQUENCE="false" PREVIOUS="param10" NEXT="timemodified"/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="shuffle" NEXT="gameinputid"/>
<FIELD NAME="gameinputid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="timemodified" NEXT="toptext"/>
<FIELD NAME="toptext" TYPE="text" NOTNULL="false" SEQUENCE="false" PREVIOUS="gameinputid" NEXT="bottomtext"/>
<FIELD NAME="bottomtext" TYPE="text" NOTNULL="false" SEQUENCE="false" PREVIOUS="toptext" NEXT="grademethod"/>
<FIELD NAME="grademethod" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="bottomtext" NEXT="grade"/>
<FIELD NAME="grade" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="grademethod" NEXT="decimalpoints"/>
<FIELD NAME="decimalpoints" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="grade" NEXT="popup"/>
<FIELD NAME="popup" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="decimalpoints" NEXT="review"/>
<FIELD NAME="review" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="popup" NEXT="attempts"/>
<FIELD NAME="attempts" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="review" NEXT="glossaryid2"/>
<FIELD NAME="glossaryid2" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="attempts" NEXT="glossarycategoryid2"/>
<FIELD NAME="glossarycategoryid2" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="glossaryid2" NEXT="language"/>
<FIELD NAME="language" TYPE="char" LENGTH="10" NOTNULL="false" SEQUENCE="false" PREVIOUS="glossarycategoryid2" NEXT="subcategories"/>
<FIELD NAME="subcategories" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="language"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="game_attempts" COMMENT="game_attempts" PREVIOUS="game" NEXT="game_grades">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="gameid"/>
<FIELD NAME="gameid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="id" NEXT="userid"/>
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="gameid" NEXT="timestart"/>
<FIELD NAME="timestart" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" PREVIOUS="userid" NEXT="timefinish"/>
<FIELD NAME="timefinish" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" PREVIOUS="timestart" NEXT="timelastattempt"/>
<FIELD NAME="timelastattempt" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" PREVIOUS="timefinish" NEXT="lastip"/>
<FIELD NAME="lastip" TYPE="char" LENGTH="30" NOTNULL="false" SEQUENCE="false" PREVIOUS="timelastattempt" NEXT="lastremotehost"/>
<FIELD NAME="lastremotehost" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false" PREVIOUS="lastip" NEXT="preview"/>
<FIELD NAME="preview" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="lastremotehost" NEXT="attempt"/>
<FIELD NAME="attempt" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="preview" NEXT="score"/>
<FIELD NAME="score" TYPE="float" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="attempt" NEXT="attempts"/>
<FIELD NAME="attempts" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="score" NEXT="language"/>
<FIELD NAME="language" TYPE="char" LENGTH="10" NOTNULL="false" SEQUENCE="false" PREVIOUS="attempts"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="gameiduseridfinished" UNIQUE="false" FIELDS="gameid, userid, timefinish"/>
</INDEXES>
</TABLE>
<TABLE NAME="game_grades" COMMENT="game_grades" PREVIOUS="game_attempts" NEXT="game_queries">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="gameid"/>
<FIELD NAME="gameid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="id" NEXT="userid"/>
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="gameid" NEXT="score"/>
<FIELD NAME="score" TYPE="float" NOTNULL="true" UNSIGNED="false" SEQUENCE="false" PREVIOUS="userid" NEXT="timemodified"/>
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" PREVIOUS="score"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="userid" UNIQUE="false" FIELDS="userid" NEXT="gameid"/>
<INDEX NAME="gameid" UNIQUE="false" FIELDS="gameid" PREVIOUS="userid"/>
</INDEXES>
</TABLE>
<TABLE NAME="game_queries" COMMENT="game_queries" PREVIOUS="game_grades" NEXT="game_hangman">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="attemptid"/>
<FIELD NAME="attemptid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="id" NEXT="gamekind"/>
<FIELD NAME="gamekind" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" PREVIOUS="attemptid" NEXT="gameid"/>
<FIELD NAME="gameid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="gamekind" NEXT="userid"/>
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="gameid" NEXT="sourcemodule"/>
<FIELD NAME="sourcemodule" TYPE="char" LENGTH="20" NOTNULL="false" SEQUENCE="false" PREVIOUS="userid" NEXT="questionid"/>
<FIELD NAME="questionid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="sourcemodule" NEXT="glossaryentryid"/>
<FIELD NAME="glossaryentryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="questionid" NEXT="questiontext"/>
<FIELD NAME="questiontext" TYPE="text" NOTNULL="false" SEQUENCE="false" PREVIOUS="glossaryentryid" NEXT="score"/>
<FIELD NAME="score" TYPE="float" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="questiontext" NEXT="timelastattempt"/>
<FIELD NAME="timelastattempt" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="score" NEXT="studentanswer"/>
<FIELD NAME="studentanswer" TYPE="text" NOTNULL="false" SEQUENCE="false" PREVIOUS="timelastattempt" NEXT="col"/>
<FIELD NAME="col" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="studentanswer" NEXT="row"/>
<FIELD NAME="row" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="col" NEXT="horizontal"/>
<FIELD NAME="horizontal" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="row" NEXT="answertext"/>
<FIELD NAME="answertext" TYPE="text" NOTNULL="false" SEQUENCE="false" PREVIOUS="horizontal" NEXT="correct"/>
<FIELD NAME="correct" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="answertext" NEXT="attachment"/>
<FIELD NAME="attachment" TYPE="char" LENGTH="200" NOTNULL="false" SEQUENCE="false" PREVIOUS="correct" NEXT="answerid"/>
<FIELD NAME="answerid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="attachment" NEXT="tries"/>
<FIELD NAME="tries" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" PREVIOUS="answerid"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="attemptid" UNIQUE="false" FIELDS="attemptid"/>
</INDEXES>
</TABLE>
<TABLE NAME="game_hangman" COMMENT="game_hangman" PREVIOUS="game_queries" NEXT="game_cross">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" NEXT="queryid"/>
<FIELD NAME="queryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" PREVIOUS="id" NEXT="letters"/>
<FIELD NAME="letters" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" PREVIOUS="queryid" NEXT="allletters"/>
<FIELD NAME="allletters" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" PREVIOUS="letters" NEXT="try"/>
<FIELD NAME="try" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="allletters" NEXT="maxtries"/>
<FIELD NAME="maxtries" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="try" NEXT="finishedword"/>
<FIELD NAME="finishedword" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="maxtries" NEXT="corrects"/>
<FIELD NAME="corrects" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="finishedword" NEXT="iscorrect"/>
<FIELD NAME="iscorrect" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="corrects"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="game_cross" COMMENT="game_cross" PREVIOUS="game_hangman" NEXT="game_cryptex">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" NEXT="cols"/>
<FIELD NAME="cols" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false" PREVIOUS="id" NEXT="rows"/>
<FIELD NAME="rows" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="cols" NEXT="words"/>
<FIELD NAME="words" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="rows" NEXT="wordsall"/>
<FIELD NAME="wordsall" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="words" NEXT="createscore"/>
<FIELD NAME="createscore" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="wordsall" NEXT="createtries"/>
<FIELD NAME="createtries" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="createscore" NEXT="createtimelimit"/>
<FIELD NAME="createtimelimit" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="createtries" NEXT="createconnectors"/>
<FIELD NAME="createconnectors" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="createtimelimit" NEXT="createfilleds"/>
<FIELD NAME="createfilleds" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="createconnectors" NEXT="createspaces"/>
<FIELD NAME="createspaces" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="createfilleds" NEXT="triesplay"/>
<FIELD NAME="triesplay" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="createspaces"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="game_cryptex" COMMENT="game_cryptex" PREVIOUS="game_cross" NEXT="game_millionaire">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" NEXT="letters"/>
<FIELD NAME="letters" TYPE="text" NOTNULL="false" SEQUENCE="false" PREVIOUS="id"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="game_millionaire" COMMENT="game_millionaire" PREVIOUS="game_cryptex" NEXT="game_sudoku">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" NEXT="queryid"/>
<FIELD NAME="queryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="id" NEXT="state"/>
<FIELD NAME="state" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="queryid" NEXT="level"/>
<FIELD NAME="level" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="state"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="game_sudoku" COMMENT="game_sudoku" PREVIOUS="game_millionaire" NEXT="game_sudoku_database">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" NEXT="level"/>
<FIELD NAME="level" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" PREVIOUS="id" NEXT="data"/>
<FIELD NAME="data" TYPE="char" LENGTH="81" NOTNULL="true" SEQUENCE="false" PREVIOUS="level" NEXT="opened"/>
<FIELD NAME="opened" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="data" NEXT="guess"/>
<FIELD NAME="guess" TYPE="char" LENGTH="81" NOTNULL="false" SEQUENCE="false" PREVIOUS="opened"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="game_sudoku_database" COMMENT="game_sudoku_database" PREVIOUS="game_sudoku" NEXT="game_bookquiz">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="level"/>
<FIELD NAME="level" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="id" NEXT="opened"/>
<FIELD NAME="opened" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="level" NEXT="data"/>
<FIELD NAME="data" TYPE="char" LENGTH="81" NOTNULL="false" SEQUENCE="false" PREVIOUS="opened"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="data" UNIQUE="true" FIELDS="data"/>
</INDEXES>
</TABLE>
<TABLE NAME="game_bookquiz" COMMENT="game_bookquiz" PREVIOUS="game_sudoku_database" NEXT="game_bookquiz_chapters">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" NEXT="lastchapterid"/>
<FIELD NAME="lastchapterid" TYPE="char" LENGTH="81" NOTNULL="true" SEQUENCE="false" PREVIOUS="id"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="game_bookquiz_chapters" COMMENT="game_bookquiz_chapters" PREVIOUS="game_bookquiz" NEXT="game_bookquiz_questions">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="attemptid"/>
<FIELD NAME="attemptid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" SEQUENCE="false" PREVIOUS="id" NEXT="chapterid"/>
<FIELD NAME="chapterid" TYPE="char" LENGTH="81" NOTNULL="true" SEQUENCE="false" PREVIOUS="attemptid"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="attemptidchapterid" UNIQUE="false" FIELDS="attemptid, chapterid"/>
</INDEXES>
</TABLE>
<TABLE NAME="game_bookquiz_questions" COMMENT="game_bookquiz" PREVIOUS="game_bookquiz_chapters" NEXT="game_export_javame">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="gameid"/>
<FIELD NAME="gameid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="id" NEXT="chapterid"/>
<FIELD NAME="chapterid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="gameid" NEXT="questioncategoryid"/>
<FIELD NAME="questioncategoryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="chapterid"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="gameidchapterid" UNIQUE="false" FIELDS="gameid, chapterid"/>
</INDEXES>
</TABLE>
<TABLE NAME="game_export_javame" COMMENT="game_export_javame" PREVIOUS="game_bookquiz_questions" NEXT="game_export_html">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="filename"/>
<FIELD NAME="filename" TYPE="char" LENGTH="20" NOTNULL="false" SEQUENCE="false" PREVIOUS="id" NEXT="icon"/>
<FIELD NAME="icon" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" PREVIOUS="filename" NEXT="createdby"/>
<FIELD NAME="createdby" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false" PREVIOUS="icon" NEXT="vendor"/>
<FIELD NAME="vendor" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false" PREVIOUS="createdby" NEXT="name"/>
<FIELD NAME="name" TYPE="char" LENGTH="20" NOTNULL="false" SEQUENCE="false" PREVIOUS="vendor" NEXT="description"/>
<FIELD NAME="description" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" PREVIOUS="name" NEXT="version"/>
<FIELD NAME="version" TYPE="char" LENGTH="10" NOTNULL="false" SEQUENCE="false" PREVIOUS="description" NEXT="maxpicturewidth"/>
<FIELD NAME="maxpicturewidth" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="version" NEXT="maxpictureheight"/>
<FIELD NAME="maxpictureheight" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="maxpicturewidth" NEXT="type"/>
<FIELD NAME="type" TYPE="char" LENGTH="10" NOTNULL="false" SEQUENCE="false" PREVIOUS="maxpictureheight"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="game_export_html" COMMENT="game_export_html" PREVIOUS="game_export_javame" NEXT="game_snakes">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="filename"/>
<FIELD NAME="filename" TYPE="char" LENGTH="30" NOTNULL="false" SEQUENCE="false" PREVIOUS="id" NEXT="title"/>
<FIELD NAME="title" TYPE="char" LENGTH="200" NOTNULL="false" SEQUENCE="false" PREVIOUS="filename" NEXT="checkbutton"/>
<FIELD NAME="checkbutton" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="title" NEXT="printbutton"/>
<FIELD NAME="printbutton" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="checkbutton" NEXT="inputsize"/>
<FIELD NAME="inputsize" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="printbutton" NEXT="maxpicturewidth"/>
<FIELD NAME="maxpicturewidth" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="inputsize" NEXT="maxpictureheight"/>
<FIELD NAME="maxpictureheight" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="maxpicturewidth" NEXT="type"/>
<FIELD NAME="type" TYPE="char" LENGTH="10" NOTNULL="false" SEQUENCE="false" PREVIOUS="maxpictureheight"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="game_snakes" COMMENT="game_snakes" PREVIOUS="game_export_html" NEXT="game_snakes_database">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" NEXT="snakesdatabaseid"/>
<FIELD NAME="snakesdatabaseid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="id" NEXT="position"/>
<FIELD NAME="position" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="snakesdatabaseid" NEXT="queryid"/>
<FIELD NAME="queryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="position" NEXT="dice"/>
<FIELD NAME="dice" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="queryid"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="game_snakes_database" COMMENT="game_snakes_database" PREVIOUS="game_snakes" NEXT="game_course">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="name"/>
<FIELD NAME="name" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" PREVIOUS="id" NEXT="cols"/>
<FIELD NAME="cols" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="name" NEXT="rows"/>
<FIELD NAME="rows" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="cols" NEXT="data"/>
<FIELD NAME="data" TYPE="text" NOTNULL="false" SEQUENCE="false" PREVIOUS="rows" NEXT="fileboard"/>
<FIELD NAME="fileboard" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" PREVIOUS="data" NEXT="direction"/>
<FIELD NAME="direction" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="fileboard" NEXT="headerx"/>
<FIELD NAME="headerx" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="direction" NEXT="headery"/>
<FIELD NAME="headery" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="headerx" NEXT="footerx"/>
<FIELD NAME="footerx" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="headery" NEXT="footery"/>
<FIELD NAME="footery" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="footerx" NEXT="width"/>
<FIELD NAME="width" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="footery" NEXT="height"/>
<FIELD NAME="height" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="width"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="game_course" COMMENT="game_course" PREVIOUS="game_snakes_database" NEXT="game_course_inputs">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="messagewin"/>
<FIELD NAME="messagewin" TYPE="text" NOTNULL="false" SEQUENCE="false" PREVIOUS="id" NEXT="messageloose"/>
<FIELD NAME="messageloose" TYPE="text" NOTNULL="false" SEQUENCE="false" PREVIOUS="messagewin"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="game_course_inputs" COMMENT="game_course_inputs" PREVIOUS="game_course" NEXT="game_hiddenpicture">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="name"/>
<FIELD NAME="name" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" PREVIOUS="id" NEXT="course"/>
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" SEQUENCE="false" PREVIOUS="name" NEXT="sourcemodule"/>
<FIELD NAME="sourcemodule" TYPE="char" LENGTH="20" NOTNULL="false" SEQUENCE="false" PREVIOUS="course" NEXT="ids"/>
<FIELD NAME="ids" TYPE="text" NOTNULL="false" SEQUENCE="false" PREVIOUS="sourcemodule"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="game_hiddenpicture" COMMENT="game_hiddenpicture" PREVIOUS="game_course_inputs" NEXT="game_repetitions">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" NEXT="correct"/>
<FIELD NAME="correct" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" PREVIOUS="id" NEXT="wrong"/>
<FIELD NAME="wrong" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" PREVIOUS="correct" NEXT="found"/>
<FIELD NAME="found" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" PREVIOUS="wrong"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="game_repetitions" COMMENT="game_repetitions" PREVIOUS="game_hiddenpicture">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="gameid"/>
<FIELD NAME="gameid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" PREVIOUS="id" NEXT="userid"/>
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" PREVIOUS="gameid" NEXT="questionid"/>
<FIELD NAME="questionid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" PREVIOUS="userid" NEXT="glossaryentryid"/>
<FIELD NAME="glossaryentryid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" PREVIOUS="questionid" NEXT="repetitions"/>
<FIELD NAME="repetitions" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="false" DEFAULT="0" SEQUENCE="false" PREVIOUS="glossaryentryid"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="main" UNIQUE="true" FIELDS="gameid, userid, questionid, glossaryentryid"/>
</INDEXES>
</TABLE>
</TABLES>
</XMLDB>

1482
db/upgrade.php

File diff suppressed because it is too large

BIN
docs/Readme_en.pdf

Binary file not shown.

BIN
docs/database.pdf

Binary file not shown.

1048
docs/database.xmi

File diff suppressed because it is too large

BIN
docs/readme_el.pdf

Binary file not shown.

267
export.php

@ -0,0 +1,267 @@
<?php // $Id: export.php,v 1.22 2012/07/25 11:16:03 bdaloukas Exp $
/**
* This page exports a game to another platform e.g. html, jar
*
* @author bdaloukas
* @version $Id: export.php,v 1.22 2012/07/25 11:16:03 bdaloukas Exp $
* @package game
**/
require( '../../config.php');
ob_start();
require_once ($CFG->dirroot.'/lib/formslib.php');
require( 'locallib.php');
require( 'header.php');
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
if (!has_capability('mod/game:viewreports', $context))
return;
$target = optional_param('target', "", PARAM_ALPHANUM); // action
class mod_game_exporthtml_form extends moodleform {
function definition() {
global $CFG, $game;
$mform = $this->_form;
$html = $this->_customdata['html'];
//-------------------------------------------------------------------------------
$mform->addElement('header', 'general', get_string('general', 'form'));
if( $game->gamekind == 'hangman'){
$options = array();
$options[ '0'] = 'Hangman with phrases';
$options[ 'hangmanp'] = 'Hangman with pictures';
$mform->addElement('select', 'type', get_string('javame_type', 'game'), $options);
if( $html->type == 0)
$mform->setDefault('type', '0');
else
$mform->setDefault('type', 'hangmanp');
}
//filename
$mform->addElement('text', 'filename', get_string('javame_filename', 'game'), array('size'=>'30'));
$mform->setDefault('filename',$html->filename);
//html title
$mform->addElement('text', 'title', get_string('html_title', 'game'), array('size'=>'80'));
$mform->setDefault('title',$html->title);
//fields for hangman
if( $game->gamekind == 'hangman')
{
$mform->addElement('text', 'maxpicturewidth', get_string('javame_maxpicturewidth', 'game'), array('size'=>'5'));
$mform->setDefault('maxpicturewidth',$html->maxpicturewidth);
$mform->addElement('text', 'maxpictureheight', get_string('javame_maxpictureheight', 'game'), array('size'=>'5'));
$mform->setDefault('maxpictureheight',$html->maxpictureheight);
}
//fiels for cross
if( $game->gamekind == 'cross')
{
$mform->addElement('selectyesno', 'checkbutton', get_string('html_hascheckbutton', 'game'));
$mform->setDefault('checkbutton',$html->checkbutton);
$mform->addElement('selectyesno', 'printbutton', get_string('html_hasprintbutton', 'game'));
$mform->setDefault('printbutton',$html->printbutton);
}
$mform->addElement('hidden', 'q', $game->id);
$mform->addElement('hidden', 'target', 'html');
//-------------------------------------------------------------------------------
$mform->addElement('submit', 'submitbutton', get_string( 'export', 'game'));
$mform->closeHeaderBefore('submitbutton');
//-------------------------------------------------------------------------------
}
function validation($data, $files) {
global $CFG, $USER, $DB;
$errors = parent::validation($data, $files);
return $errors;
}
function export() {
global $game, $DB;
$mform = $this->_form;
$html = new stdClass();
$html->id = $this->_customdata['html']->id;
$html->type = optional_param('type', 0, PARAM_ALPHANUM);
$html->filename = $mform->getElementValue('filename');
$html->title = $mform->getElementValue('title');
$html->maxpicturewidth = optional_param('maxpicturewidth', 0, PARAM_INT);
$html->maxpictureheight = optional_param('maxpictureheight', 0, PARAM_INT);
if( $mform->elementExists( 'checkbutton')){
$checkbuttonvalue = $mform->getElementValue('checkbutton');
$html->checkbutton = $checkbuttonvalue[ 0];
}
if( $mform->elementExists( 'printbutton')){
$printbuttonvalue = $mform->getElementValue('printbutton');
$html->printbutton = $printbuttonvalue[ 0];
}
if (!($DB->update_record( 'game_export_html', $html))){
print_error("game_export_html: not updated id=$html->id");
}
$cm = get_coursemodule_from_instance('game', $game->id, $game->course);
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
require_once("exporthtml.php");
game_OnExportHTML( $game, $context, $html);
}
}
class mod_game_exportjavame_form extends moodleform {
function definition() {
global $CFG, $DB, $game;
$mform = $this->_form;
$javame = $this->_customdata['javame'];
//-------------------------------------------------------------------------------
$mform->addElement('header', 'general', get_string('general', 'form'));
if( $game->gamekind == 'hangman'){
$options = array();
$options[ '0'] = 'Hangman with phrases';
$options[ 'hangmanp'] = 'Hangman with pictures';
$mform->addElement('select', 'type', get_string('javame_type', 'game'), $options);
}
//filename
$mform->addElement('text', 'filename', get_string('javame_filename', 'game'), array('size'=>'30'));
$mform->setDefault('filename',$javame->filename);
$mform->addElement('text', 'icon', get_string('javame_icon', 'game'));
$mform->setDefault('icon',$javame->icon);
$mform->addElement('text', 'createdby', get_string('javame_createdby', 'game'));
$mform->setDefault('createdby',$javame->createdby);
$mform->addElement('text', 'vendor', get_string('javame_vendor', 'game'));
$mform->setDefault('vendor',$javame->vendor);
$mform->addElement('text', 'name', get_string('javame_name', 'game'), array('size'=>'80'));
$mform->setDefault('name',$javame->name);
$mform->addElement('text', 'description', get_string('javame_description', 'game'), array('size'=>'80'));
$mform->setDefault('description',$javame->description);
$mform->addElement('text', 'version', get_string('javame_version', 'game'), array('size'=>'10'));
$mform->setDefault('version',$javame->version);
$mform->addElement('text', 'maxpicturewidth', get_string('javame_maxpicturewidth', 'game'), array('size'=>'5'));
$mform->setDefault('maxpicturewidth',$javame->maxpicturewidth);
$mform->addElement('text', 'maxpictureheight', get_string('javame_maxpictureheight', 'game'), array('size'=>'5'));
$mform->setDefault('maxpictureheight',$javame->maxpictureheight);
$mform->addElement('hidden', 'q', $game->id);
$mform->addElement('hidden', 'target', 'javame');
//-------------------------------------------------------------------------------
$mform->addElement('submit', 'submitbutton', get_string( 'export', 'game'));
$mform->closeHeaderBefore('submitbutton');
//-------------------------------------------------------------------------------
//$this->set_data($currententry);
}
function validation($data, $files) {
global $CFG, $USER, $DB;
$errors = parent::validation($data, $files);
return $errors;
}
function export() {
global $game, $DB;
$mform = $this->_form;
$javame = $this->_customdata['javame'];
$javame->type = optional_param('type', 0, PARAM_ALPHANUM);
$javame->filename = $mform->getElementValue('filename');
$javame->icon = $mform->getElementValue('icon');
$javame->createdby = $mform->getElementValue('createdby');
$javame->vendor = $mform->getElementValue('vendor');
$javame->name = $mform->getElementValue('name');
$javame->description = $mform->getElementValue('description');
$javame->version = $mform->getElementValue('version');
$javame->maxpicturewidth = $mform->getElementValue('maxpicturewidth');
$javame->maxpictureheight = $mform->getElementValue('maxpictureheight');
if (!($DB->update_record( 'game_export_javame', $javame))){
print_error("game_export_javame: not updated id=$javame->id");
}
require_once("exportjavame.php");
game_OnExportJavaME( $game, $javame);
}
}
// create form and set initial data
if( $target == 'html'){
$html = $DB->get_record( 'game_export_html', array( 'id' => $game->id));
if( $html == false){
$html = new stdClass();
$html->id = $game->id;
$html->checkbutton = 1;
$html->printbutton = 1;
game_insert_record( 'game_export_html', $html);
$html = $DB->get_record( 'game_export_html', array( 'id' => $game->id));
}
$html->type = 0;
$mform = new mod_game_exporthtml_form(null, array('id'=>$id, 'html' => $html));
}else
{
$javame = $DB->get_record( 'game_export_javame', array( 'id' => $game->id));
if( $javame == false){
$javame = new stdClass();
$javame->id = $game->id;
$javame->filename = $game->gamekind;
game_insert_record( 'game_export_javame', $javame);
$javame = $DB->get_record( 'game_export_javame', array( 'id' => $game->id));
}
$mform = new mod_game_exportjavame_form(null, array('id'=>$id, 'javame' => $javame));
}
if ($mform->is_cancelled()){
ob_end_flush();
if ($id){
redirect("view.php?id=$cm->id&amp;mode=entry&amp;hook=$id");
} else {
redirect("view.php?id=$cm->id");
}
} else if ($entry = $mform->get_data()) {
$mform->export();
}else
{
ob_end_flush();
if (!empty($id)) {
$PAGE->navbar->add(get_string('export', 'game'));}
$mform->display();
// echo $OUTPUT->footer();
}
$OUTPUT->footer();
function game_send_stored_file($file) {
if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}else
print_error("export.php: File does not exists ".$file);
}

40
export/html/snakes/css/game.css

@ -0,0 +1,40 @@
.nodis
{
list-style-type:none;
}
#cont
{
position:relative;
display:none;
}
.img1
{
position:absolute;
display:none;
}
#dicecont
{
float:right;
width:250px;
background-image: url(../images/meter.png);
background-repeat: repeat;
font-family: Arial, Helvetica, sans-serif;
font-weight: normal;
/*font-variant: small-caps;*/
color: #FFFFFF;
border: 0.5em solid #333333;
top: 30px;
position: absolute;
left: 500px;
font-size: 14px;
padding: 10px;
}

41
export/html/snakes/css/modal.css

@ -0,0 +1,41 @@
@charset "utf-8";
#fade { /*--Transparent background layer--*/
display: none; /*--hidden by default--*/
background: #000;
position: fixed; left: 0; top: 0;
width: 100%; height: 100%;
opacity: .80;
z-index: 9999;
}
.popup_block{
display: none; /*--hidden by default--*/
background: #fff;
padding: 20px;
border: 20px solid #ddd;
float: left;
font-size: 1.2em;
position: fixed;
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;
/*--CSS3 Rounded Corners--*/
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
img.btn_close {
float: right;
margin: -55px -55px 0 0;
}
/*--Making IE6 Understand Fixed Positioning--*/
*html #fade {
position: absolute;
}
*html .popup_block {
position: absolute;
}

134
export/html/snakes/css/snakes.css

@ -0,0 +1,134 @@
/*This Code is a sole propritary of
Husain Limdiyawala(MSc IT DA-IICT)
Any Duplication of this code should be avoided*/
.blocks
{
font-family: Arial, Helvetica, sans-serif;
/*color: #FFFFFF;*/
margin-left: 5px;
margin-top:2px;
margin-bottom:2px;
padding: 0px;
float:left;
height: 52px;
width: 52px;
display:block;
position:relative;
background-image: url(../square52.png);
}
.nodis
{
list-style-type:none;
}
#cont
{
position:relative;
display:none;
}
#diceimg
{
display:none;
width:45px;
height:44px;
}
.img1
{
position:absolute;
display:none;
}
body
{
background:#CCCCCC;
}
#player
{
display:none;
z-index:5;
position:absolute;
}
#players
{
margin-top: 0.3em;
margin-bottom: 1em;
}
#dicecont
{
float:right;
width:170px;
background-image: url(../images/meter.png);
background-repeat: repeat;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
/*font-variant: small-caps;*/
color: #FFFFFF;
border: 0.5em solid #333333;
top: 30px;
position: absolute;
right: 880px;
}
#playbtn
{
margin-left:0.5em;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
/*font-variant: small-caps;*/
color: #000000;
background-color: #FC0;
padding: 1em;
}
/*-- from modal window coding --*/
#fade { /*--Transparent background layer--*/
display: none; /*--hidden by default--*/
background: #000;
position: fixed; left: 0; top: 0;
width: 100%; height: 100%;
opacity: .80;
z-index: 9999;
}
.popup_block{
display: none; /*--hidden by default--*/
background: #fff;
padding: 20px;
border: 20px solid #ddd;
float: left;
font-size: 1.2em;
position: fixed;
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;
/*--CSS3 Rounded Corners--*/
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
img.btn_close {
float: right;
margin: -55px -55px 0 0;
border: 0;
}
/*--Making IE6 Understand Fixed Positioning--*/
*html #fade {
position: absolute;
}
*html .popup_block {
position: absolute;
}

15
export/html/snakes/css/style.css

@ -0,0 +1,15 @@
body {
background-color: #efefef;
}
body, html, input {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
color: #333333;
}
.info {
font-style:italic;
font-size: 0.9em;
color: #666666;
}

69
export/html/snakes/css/subModal.css

@ -0,0 +1,69 @@
/**
* POPUP CONTAINER STYLES
*/
#popupMask {
position: absolute;
z-index: 200;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
opacity: .4;
filter: alpha(opacity=50);
/* this hack is so it works in IE
* I find setting the color in the css gives me more flexibility
* than the PNG solution.
*/
background-color:transparent !important;
background-color: #333333;
/* 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-repeat: repeat;
display:none;
}
#popupContainer {
position: absolute;
z-index: 201;
top: 0px;
left: 0px;
display:none;
padding: 0px;
}
#popupInner {
border: 2px solid #000000;
background-color: #ffffff;
}
#popupFrame {
margin: 0px;
width: 100%;
height: 100%;
position: relative;
z-index: 202;
}
#popupTitleBar {
background-color: #090;
color: # 000;
font-weight: bold;
height: 1.3em;
padding: 5px;
border-bottom: 2px solid #000000;
border-top: 1px solid #78A3F2;
border-left: 1px solid #78A3F2;
border-right: 1px solid #204095;
position: relative;
z-index: 203;
}
#popupTitle {
float:left;
font-size: 1.1em;
}
#popupControls {
float: right;
cursor: pointer;
cursor: hand;
}

78
export/html/snakes/js/common.js

@ -0,0 +1,78 @@
function addEvent(obj, evType, fn){
if (obj.addEventListener){
obj.addEventListener(evType, fn, false);
return true;
} else if (obj.attachEvent){
var r = obj.attachEvent("on"+evType, fn);
return r;
} else {
return false;
}
}
function removeEvent(obj, evType, fn, useCapture){
if (obj.removeEventListener){
obj.removeEventListener(evType, fn, useCapture);
return true;
} else if (obj.detachEvent){
var r = obj.detachEvent("on"+evType, fn);
return r;
} else {
alert("Handler could not be removed");
}
}
/**
* Code below taken from - http://www.evolt.org/article/document_body_doctype_switching_and_more/17/30655/
*
* Modified 4/22/04 to work with Opera/Moz (by webmaster at subimage dot com)
*
* Gets the full width/height because it's different for most browsers.
*/
function getViewportHeight() {
if (window.innerHeight!=window.undefined) return window.innerHeight;
if (document.compatMode=='CSS1Compat') return document.documentElement.clientHeight;
if (document.body) return document.body.clientHeight;
return window.undefined;
}
function getViewportWidth() {
var offset = 17;
var width = null;
if (window.innerWidth!=window.undefined) return window.innerWidth;
if (document.compatMode=='CSS1Compat') return document.documentElement.clientWidth;
if (document.body) return document.body.clientWidth;
}
/**
* Gets the real scroll top
*/
function getScrollTop() {
if (self.pageYOffset) // all except Explorer
{
return self.pageYOffset;
}
else if (document.documentElement && document.documentElement.scrollTop)
// Explorer 6 Strict
{
return document.documentElement.scrollTop;
}
else if (document.body) // all other Explorers
{
return document.body.scrollTop;
}
}
function getScrollLeft() {
if (self.pageXOffset) // all except Explorer
{
return self.pageXOffset;
}
else if (document.documentElement && document.documentElement.scrollLeft)
// Explorer 6 Strict
{
return document.documentElement.scrollLeft;
}
else if (document.body) // all other Explorers
{
return document.body.scrollLeft;
}
}

18
export/html/snakes/js/jquery-1.6.1.min.js

File diff suppressed because one or more lines are too long

298
export/html/snakes/js/jquery-ui-1.7.2.custom.min.js

File diff suppressed because one or more lines are too long

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

@ -0,0 +1,473 @@
/*This code was originally based on code by
Husain Limdiyawala(MSc IT DA-IICT)*/
$(document).ready(function () {
});
//Global Variables
var totblocks=0;
var data="";
var currentblock=0;
var position=0;
var lastposition = new Array();
var randomno=0;
var tots= new Array();
var l=0;
var srcsnake=new Array(4);
var destsnake=new Array(4);
var ladsrc = new Array(3);
var laddest = new Array(3);
var quest = new Array(); //available questions along with multiple answers
var COR_answered = new Array(); //record all questions (along with answers) the user responded CORRECTLY
var WRO_answered = new Array(); //record all questions (along with answers) the user responded WRONGLY
//var door = new Array(1)
var user = new Array();
//var pythons = new Array(1);
//Constract table with questions and answers and pick question to display
quest[0]="Spell 1";
quest[1]="one";
quest[2]="two";
quest[3]="three";
quest[4]="Spell 2";
quest[5]="two";
quest[6]="three";
quest[7]="four";
quest[8]="Spell 3";
quest[9]="three";
quest[10]="two";
quest[11]="four";
quest[12]="Spell 4";
quest[13]="four";
quest[14]="three";
quest[15]="one";
z=0;
for (z=0;quest[z]!=null;z++);
allQuest=z/4;
function selectQuest(all)
{
pickOne = Math.floor((Math.random() * all));
return pickOne;
}
//The Below Function will hide all the snakes
function hideAll()
{
document.getElementById("img1").style.display = "none";
document.getElementById("img2").style.display = "none";
document.getElementById("img3").style.display = "none";
document.getElementById("img4").style.display = "none";
document.getElementById("lad1").style.display = "none";
document.getElementById("lad2").style.display = "none";
document.getElementById("lad3").style.display = "none";
}
//The Below Function will Render The Main Board
function paintBoard(a)
{
totblocks = (a*a);
if((a*a) % 2 == 0)
{
currentblock = (a*a) - a + 1;
for(j=0;j<(a/2);j++)
{
for(i=0;i<a;i++)
{
data += "<div class='blocks' id='" + currentblock + "'>" + currentblock + "</div>";
currentblock++;
}
currentblock -= (a+1);
for(i=0;i<a;i++)
{
data += "<div id='" + currentblock + "' class ='blocks'>" + currentblock + "</div>";
currentblock--;
}
currentblock -= (a-1);
}
}
else
{
currentblock = (a*a);
for(j=0;j<(a/2);j++)
{
for(i=0;i<a;i++)
{
data += "<div class='blocks' id='" + currentblock + "'>" + currentblock + "</div>";
currentblock--;
}
currentblock -= (a-1);
if(currentblock < 2)
break;
for(i=0;i<a;i++)
{
data += "<div id='" + currentblock + "' class ='blocks'>" + currentblock + "</div>";
currentblock++;
}
currentblock -= (a+1);
}
}
document.getElementById("cont").style.width = (a*52+52) + "px"
document.getElementById("cont").innerHTML = data;
$("#cont").slideDown("slow");
$("#cont").effect("shake",3000);
$("img:hidden").fadeIn(5000);
if(a == 6)
{
registerSnake(158,196,"img1",14,3,0);
registerSnake(62,183,"img2",27,24,1);
registerSnake(175,18,"img3",18,4,2);
registerSnake(10,45,"img4",32,23,3);
registerLadder(27,132,"lad1",28,34,0);
registerLadder(90,22,"lad2",19,30,1);
registerLadder(179,137,"lad3",2,16,2);
//registerDoor("5",5,0);
//registerDoor("21",21,1)
//registerPython("15",15,0)
}
else if(a == 8)
{
registerSnake(300,380,"img1",44,29,0);
registerSnake(180,550,"img2",51,46,1);
registerSnake(290,50,"img3",41,40,2);
registerSnake(500,280,"img4",27,22,3);
registerLadder(350,515,"lad1",19,35,0);
registerLadder(180,230,"lad2",43,54,1);
registerLadder(80,350,"lad3",53,60,2);
//registerDoor("14",14,0);
//registerDoor("26",26,1)
//registerPython("32",32,0)
}
}
//The below Function will simulate throwing of a dice
function throwDice(i)
{
randomno = Math.floor((Math.random() * 6)) + 1;
document.getElementById("diceimg").src = "images/dice_" + randomno + ".PNG";
document.getElementById("diceimg").style.display = "block";
if(lastposition[i]>0)
{
document.getElementById(lastposition[i]).style.background = "url(images/square52.png)";
}
tots[i] += randomno;
if(totblocks - tots[i] >= 0)
{
lastposition[i] = tots[i];
document.getElementById(tots[i]).style.background = "url(images/pawn1.png)";
}
else
{
tots[i] -= randomno;
document.getElementById(tots[i]).style.background = "url(images/pawn1.png)";
}
}
//The below Function Checks The Snake Biting for a user
function snakescheck(k)
{
i=0;
for(i=0;i<=srcsnake.length;i++)
{
if(srcsnake[i] == tots[k])
{
alert("Ωχ! Σε τσίμπησε φίδι στο τετράγωνο " + srcsnake[i] + " και θα πρέπει να γυρίσεις στο τετράγωνο " + destsnake[i] + ", εκτός κι αν απαντήσεις σωστά στην ερώτηση που ακολουθεί.");
document.getElementById(destsnake[i]).style.background = "url(images/pawn1.png)";
document.getElementById(tots[k]).style.background = "url(images/square52.png)";
lastposition[k] = destsnake[i];
tots[k] = destsnake[i];
break;
}
}
if(!checkWin(k))
alert("???d?se?!S???a??t???a!");
}
//The below function checks the ladders for a user
function laddercheck(k)
{
i=0;
for(i=0;i<=ladsrc.length;i++)
{
if(ladsrc[i] == tots[k])
{
alert("Υπάρχει μια σκάλα στο τετράγωνο " + ladsrc[i] + " και θα σας οδηγήσει κατευθείαν στο τετράγωνο " + laddest[i] +"αν απαντήσεις σωστά στην ερώτηση που ακολουθεί.");
document.getElementById(laddest[i]).style.background = "url(images/pawn1.png)";
document.getElementById(tots[k]).style.background = "url(images/square52.png)";
lastposition[k] = laddest[i];
tots[k] = laddest[i];
break;
}
}
if(!checkWin(k))
alert("You have won!");
}
//The below function checks the existence of doors
/*function doorcheck(k)
{
i=0;
for(i=0;i<=door.length;i++)
{
if(door[i] == tots[k])
{
var randomdoor = Math.floor((Math.random() * totblocks)) + 1;
alert("Magic Door Entered!! You are redirected to " + randomdoor);
document.getElementById(randomdoor).style.background = "url(images/pawn.png) #000000";
document.getElementById(tots[k]).style.background = "url(images/door.png) #000000";
lastposition[k] = randomdoor;
tots[k] = randomdoor;
}
}
if(!checkWin(k))
alert("You Have Won!!");
} */
//The below Function checks for pythons
function pythoncheck(k)
{
i=0;
for(i=0;i<pythons.length;i++)
{
if(pythons[i] == tots[k])
{
alert("You have been eaten up by a python.Your game is over");
document.getElementById(tots[k]).style.background = "url(images/csnake.gif) #000000";
lastposition[k] = null;
tots[k] = null;
break;
}
}
}
//The below function will register a snake
function registerSnake(tp,lft,dv,src,dest,i)
{
document.getElementById(dv).style.top = tp + "px";
document.getElementById(dv).style.left = lft + "px";
srcsnake[i] = src;
destsnake[i] = dest;
}
//The below function will register a ladder.
function registerLadder(tp,lft,dv,src,dest,i)
{
document.getElementById(dv).style.top = tp + "px";
document.getElementById(dv).style.left = lft + "px";
ladsrc[i] = src;
laddest[i] = dest;
}
//The below function will register a door.
/*function registerDoor(dv,srcc,i)
{
document.getElementById(dv).style.background = "url(images/door.png) #000000";
door[i] = srcc;
}
//The below function will register a python.
function registerPython(dv,srcc,i)
{
document.getElementById(dv).style.background = "url(images/csnake.gif) #000000";
pythons[i] = srcc;
}
*/
//The below function checks the change in the boardtype selection combobox
function selectBoard()
{
totblocks=0;
data="";
currentblock=0;
position=0;
hideAll();
if(document.getElementById("boardtype").value != null)
{
paintBoard(parseInt(document.getElementById("boardtype").value));
}
}
//The below function checks the change in the player selection combobox
function selectPlayer()
{
if(document.getElementById("players").value != null)
{
user[document.getElementById("players").value-1] = 0;
tots[document.getElementById("players").value-1] = 0;
lastposition[document.getElementById("players").value-1] = 0;
for(var j=0;j < lastposition.length;j++)
{
lastposition[j] = 0;
tots[j] = 0;
}
}
}
//The below function starts the play
function play()
{
if(tots[l] != null)
{
//...&&(quest[0]!=NULL)
disableField();
document.getElementById("status").innerHTML = "<ul class='nodis'><li>O Paiktis " + (l+1) + " </li><li>brisketai sto tetragwno " + tots[l] + "</li><li></li></ul>";
//
Question();
document.getElementById("status").innerHTML = "<ul class='nodis'><li>O Paiktis " + (l+1) + " </li><li>vrisketai sto tetragwno " + tots[l] + "</li></ul>";
}
else
document.getElementById("status").innerHTML = "<ul class='nodis'><li>Molis exases...</li></ul>";
if(l == lastposition.length-1)
l = 0;
else
l++;
}
//The below function regulates the play
function doit(i)
{
throwDice(i);
if(checkWin(i))
{
//doorcheck(i);
snakescheck(i);
laddercheck(i);
//pythoncheck(i);
}
else
alert("ÏëïêëÞñùóåò ôçí ðßóôá, óõã÷áñçôÞñéá!!!");
}
//The below function checks whether the player has won or not
function checkWin(i)
{
if(tots[i] == totblocks)
return false;
else
return true;
}
//The below function will disable both the combobox
function disableField()
{
document.getElementById("players").disabled = "disabled";
document.getElementById("boardtype").disabled = "disabled";
}
function Question()
{
picked=selectQuest(allQuest);
alert("Randomly selected number:" +picked);
Q1=prompt(quest[picked*4],"Απάντηση");
if (Q1==quest[picked*4+1])
{
alert("Σωστά!")
doit(l);
COR_answered.concat(quest.splice(picked*4,4));
}
else
{
alert("Η απάντηση δεν ήταν σωστή. Χάνεις τη σειρά σου για αυτό το γύρο!")
//document.getElementById("playbtn").disabled = "disabled";
WRO_answered.concat(quest.splice(picked*4,4));
}
//remove question and answers from available questions - (thus not allowing to have a Repeated question) ---XOXOXO
allQuest--;
}

295
export/html/snakes/js/subModal.js

@ -0,0 +1,295 @@
var gPopupMask = null;
var gPopupContainer = null;
var gPopFrame = null;
var gReturnFunc;
var gPopupIsShown = false;
var gDefaultPage = "/loading.html";
var gHideSelects = false;
var gReturnVal = null;
var gTabIndexes = new Array();
// Pre-defined list of tags we want to disable/enable tabbing into
var gTabbableTags = new Array("A","BUTTON","TEXTAREA","INPUT","IFRAME");
// If using Mozilla or Firefox, use Tab-key trap.
if (!document.all) {
document.onkeypress = keyDownHandler;
}
/**
* Initializes popup code on load.
*/
function initPopUp() {
// Add the HTML to the body
theBody = document.getElementsByTagName('BODY')[0];
popmask = document.createElement('div');
popmask.id = 'popupMask';
popcont = document.createElement('div');
popcont.id = 'popupContainer';
popcont.innerHTML = '' +
'<div id="popupInner">' +
'<div id="popupTitleBar">' +
'<div id="popupTitle"></div>' +
'<div id="popupControls">' +
'<img src="close.gif" onclick="hidePopWin(false);" id="popCloseBox" />' +
'</div>' +
'</div>' +
'<iframe src="'+ gDefaultPage +'" style="width:100%;height:100%;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="100%" height="100%"></iframe>' +
'</div>';
theBody.appendChild(popmask);
theBody.appendChild(popcont);
gPopupMask = document.getElementById("popupMask");
gPopupContainer = document.getElementById("popupContainer");
gPopFrame = document.getElementById("popupFrame");
// check to see if this is IE version 6 or lower. hide select boxes if so
// maybe they'll fix this in version 7?
var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10);
if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE") > -1) {
gHideSelects = true;
}
// Add onclick handlers to 'a' elements of class submodal or submodal-width-height
var elms = document.getElementsByTagName('a');
for (i = 0; i < elms.length; i++) {
if (elms[i].className.indexOf("submodal") == 0) {
// var onclick = 'function (){showPopWin(\''+elms[i].href+'\','+width+', '+height+', null);return false;};';
// elms[i].onclick = eval(onclick);
elms[i].onclick = function(){
// default width and height
var width = 400;
var height = 200;
// Parse out optional width and height from className
params = this.className.split('-');
if (params.length == 3) {
width = parseInt(params[1]);
height = parseInt(params[2]);
}
showPopWin(this.href,width,height,null); return false;
}
}
}
}
addEvent(window, "load", initPopUp);
/**
* @argument width - int in pixels
* @argument height - int in pixels
* @argument url - url to display
* @argument returnFunc - function to call when returning true from the window.
* @argument showCloseBox - show the close box - default true
*/
function showPopWin(url, width, height, returnFunc, showCloseBox) {
// show or hide the window close widget
if (showCloseBox == null || showCloseBox == true) {
document.getElementById("popCloseBox").style.display = "block";
} else {
document.getElementById("popCloseBox").style.display = "none";
}
gPopupIsShown = true;
disableTabIndexes();
gPopupMask.style.display = "block";
gPopupContainer.style.display = "block";
// calculate where to place the window on screen
centerPopWin(width, height);
var titleBarHeight = parseInt(document.getElementById("popupTitleBar").offsetHeight, 10);
gPopupContainer.style.width = width + "px";
gPopupContainer.style.height = (height+titleBarHeight) + "px";
setMaskSize();
// need to set the width of the iframe to the title bar width because of the dropshadow
// some oddness was occuring and causing the frame to poke outside the border in IE6
gPopFrame.style.width = parseInt(document.getElementById("popupTitleBar").offsetWidth, 10) + "px";
gPopFrame.style.height = (height) + "px";
// set the url
gPopFrame.src = url;
gReturnFunc = returnFunc;
// for IE
if (gHideSelects == true) {
hideSelectBoxes();
}
window.setTimeout("setPopTitle();", 600);
}
//
var gi = 0;
function centerPopWin(width, height) {
if (gPopupIsShown == true) {
if (width == null || isNaN(width)) {
width = gPopupContainer.offsetWidth;
}
if (height == null) {
height = gPopupContainer.offsetHeight;
}
//var theBody = document.documentElement;
var theBody = document.getElementsByTagName("BODY")[0];
//theBody.style.overflow = "hidden";
var scTop = parseInt(getScrollTop(),10);
var scLeft = parseInt(theBody.scrollLeft,10);
setMaskSize();
//window.status = gPopupMask.style.top + " " + gPopupMask.style.left + " " + gi++;
var titleBarHeight = parseInt(document.getElementById("popupTitleBar").offsetHeight, 10);
var fullHeight = getViewportHeight();
var fullWidth = getViewportWidth();
gPopupContainer.style.top = (scTop + ((fullHeight - (height+titleBarHeight)) / 2)) + "px";
gPopupContainer.style.left = (scLeft + ((fullWidth - width) / 2)) + "px";
//alert(fullWidth + " " + width + " " + gPopupContainer.style.left);
}
}
addEvent(window, "resize", centerPopWin);
addEvent(window, "scroll", centerPopWin);
window.onscroll = centerPopWin;
/**
* Sets the size of the popup mask.
*
*/
function setMaskSize() {
var theBody = document.getElementsByTagName("BODY")[0];
var fullHeight = getViewportHeight();
var fullWidth = getViewportWidth();
// Determine what's bigger, scrollHeight or fullHeight / width
if (fullHeight > theBody.scrollHeight) {
popHeight = fullHeight;
} else {
popHeight = theBody.scrollHeight;
}
if (fullWidth > theBody.scrollWidth) {
popWidth = fullWidth;
} else {
popWidth = theBody.scrollWidth;
}
gPopupMask.style.height = popHeight + "px";
gPopupMask.style.width = popWidth + "px";
}
/**
* @argument callReturnFunc - bool - determines if we call the return function specified
* @argument returnVal - anything - return value
*/
function hidePopWin(callReturnFunc) {
gPopupIsShown = false;
var theBody = document.getElementsByTagName("BODY")[0];
theBody.style.overflow = "";
restoreTabIndexes();
if (gPopupMask == null) {
return;
}
gPopupMask.style.display = "none";
gPopupContainer.style.display = "none";
if (callReturnFunc == true && gReturnFunc != null) {
// Set the return code to run in a timeout.
// Was having issues using with an Ajax.Request();
gReturnVal = window.frames["popupFrame"].returnVal;
window.setTimeout('gReturnFunc(gReturnVal);', 1);
}
gPopFrame.src = gDefaultPage;
// display all select boxes
if (gHideSelects == true) {
displaySelectBoxes();
}
}
/**
* Sets the popup title based on the title of the html document it contains.
* Uses a timeout to keep checking until the title is valid.
*/
function setPopTitle() {
return;
if (window.frames["popupFrame"].document.title == null) {
window.setTimeout("setPopTitle();", 10);
} else {
document.getElementById("popupTitle").innerHTML = window.frames["popupFrame"].document.title;
}
}
// Tab key trap. iff popup is shown and key was [TAB], suppress it.
// @argument e - event - keyboard event that caused this function to be called.
function keyDownHandler(e) {
if (gPopupIsShown && e.keyCode == 9) return false;
}
// For IE. Go through predefined tags and disable tabbing into them.
function disableTabIndexes() {
if (document.all) {
var i = 0;
for (var j = 0; j < gTabbableTags.length; j++) {
var tagElements = document.getElementsByTagName(gTabbableTags[j]);
for (var k = 0 ; k < tagElements.length; k++) {
gTabIndexes[i] = tagElements[k].tabIndex;
tagElements[k].tabIndex="-1";
i++;
}
}
}
}
function returnRefresh()
{
//alert("I am active!");
window.location.reload();
}
// For IE. Restore tab-indexes.
function restoreTabIndexes() {
if (document.all) {
var i = 0;
for (var j = 0; j < gTabbableTags.length; j++) {
var tagElements = document.getElementsByTagName(gTabbableTags[j]);
for (var k = 0 ; k < tagElements.length; k++) {
tagElements[k].tabIndex = gTabIndexes[i];
tagElements[k].tabEnabled = true;
i++;
}
}
}
}
/**
* Hides all drop down form select boxes on the screen so they do not appear above the mask layer.
* IE has a problem with wanted select form tags to always be the topmost z-index or layer
*
* Thanks for the code Scott!
*/
function hideSelectBoxes() {
var x = document.getElementsByTagName("SELECT");
for (i=0;x && i < x.length; i++) {
x[i].style.visibility = "hidden";
}
}
/**
* Makes all drop down form select boxes on the screen visible so they do not
* reappear after the dialog is closed.
*
* IE has a problem with wanting select form tags to always be the
* topmost z-index or layer.
*/
function displaySelectBoxes() {
var x = document.getElementsByTagName("SELECT");
for (i=0;x && i < x.length; i++){
x[i].style.visibility = "visible";
}
}

BIN
export/html/snakes/maskBG.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

14
export/html/snakes/modalContent.html

@ -0,0 +1,14 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1253" />
<title>ÏëïêëÞñùóç ðáé÷íéäéïý</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="css/subModal.css" />
</head>
<body bgcolor="#CCFF66" style="font-family: Arial, Helvetica, sans-serif; font-weight: normal; font-size:13px;">
<h2>Óõã÷áñçôÞñéá! </h2>Ìüëéò ïëïêëÞñùóåò ìå åðéôõ÷ßá ôï ðáé÷íßäé.<p>Ôï óêïñ óïõ äåß÷íåé ôï <strong>ðïóïóôü % ôùí óùóôþí áðáíôÞóåùí</strong>, óôï óýíïëï ôùí åñùôÞóåùí ðïõ óïõ Ýãéíáí.</p><p>Èá Þèåëåò íá îáíáäïêéìÜóåéò;</p> <button onclick="window.top.hidePopWin(true)">Íáé, èá ðáßîù îáíÜ!</button> <button onclick="window.top.hidePopWin()">¼÷é, åõ÷áñéóôþ</button>
</body>
</html>

BIN
export/javame/hangman/simple/KeyCanvas.class

Binary file not shown.

537
export/javame/hangman/simple/KeyCanvas.java

@ -0,0 +1,537 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;
import java.util.Hashtable;
import java.util.Random;
class KeyCanvas extends Canvas {
//private Font mFont = Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_MEDIUM);
private String mMessage = "";
private String m_letters;
private String m_lastletter;
private String m_answer;
private String m_question;
private String m_allletters;
private String m_guess;
private String m_wrong;
private int m_wrongletters;
private String m_encoding="";
private int m_state=0;
//0=start 1=play 2=next word 3=lose 4=win
private String m_init_letters;
private String m_init_allletters;
private int m_count_games=0;
private int m_count_wins=0;
private String m_filewords;
public Hashtable m_hashLocales;
private int m_keysize = 0;
private int [] m_key;
public KeyCanvas() throws IOException {
m_state = 0;
m_key = new int[ m_keysize+1];
m_key[ 0] = 0;
SelectFileWords();
//LoadEncoding();
LoadLocales();
addCommand(new Command( getlocale( "exit"), Command.EXIT, 0));
}
private String decrypt( String s){
String ret="";
if( m_keysize <=0 ){
return s;
}
int len=s.length();
for(int i=0; i < len; i+=m_keysize){
for(int j=0; j < m_keysize; j++){
int pos=i + m_key[ j];
if( pos < len){
ret = ret + s.charAt( pos);
}
}
}
return ret;
}
private String getlocale( String key){
return (String)m_hashLocales.get( key);
}
private void SelectFileWords() throws IOException{
Class c = this.getClass();
InputStream is = c.getResourceAsStream( "hangman/hangman.txt");
InputStreamReader reader = new InputStreamReader( is, "UTF-8");
String line = null;
// Read a single line from the file. null represents the EOF.
while ((line = readLine(reader)) != null) {
int pos = line.indexOf( "=");
if( pos >= 0){
m_filewords = "hangman/" + line.substring( 0, pos);
}
break;
}
reader.close();
}
private String readLine(InputStreamReader reader) throws IOException {
// Test whether the end of file has been reached. If so, return null.
int readChar = reader.read();
if (readChar <= -1) {
return null;
}
StringBuffer string = new StringBuffer();
// Read until end of file or new line
while (readChar > -1 && readChar != '\n') {
// Append the read character to the string. Some operating systems
// such as Microsoft Windows prepend newline character ('\n') with
// carriage return ('\r'). This is part of the newline character and
// therefore an exception that should not be appended to the string.
if (readChar != '\r') {
string.append( (char )readChar);
}
// Read the next character
readChar = reader.read();
}
return string.toString();
}
private void LoadLocales() throws IOException{
m_hashLocales = new Hashtable();
Class c = this.getClass();
InputStream is = c.getResourceAsStream( "hangman/language.txt");
InputStreamReader reader = new InputStreamReader( is, "UTF-8");
String line = null;
String key, data;
// Read a single line from the file. null represents the EOF.
while ((line = readLine(reader)) != null) {
int pos = line.indexOf( "=");
if( pos >= 0){
key = line.substring( 0, pos);
data = line.substring( pos+1);
m_hashLocales.put(key, data);
}
}
reader.close();
}
protected boolean SetCurrentWord( String line) throws IOException{
int pos=line.indexOf( '=');
if( pos == -1){
return false;
}
m_answer = line.substring( 0, pos);
m_question = line.substring( pos+1);
return true;
}
protected int SelectWord( String fname) throws IOException{
Class c = this.getClass();
InputStream is = c.getResourceAsStream( fname);
InputStreamReader reader = new InputStreamReader( is, "UTF-8");
String line = null;
int count=0;
// Read a single line from the file. null represents the EOF.
while ((line = readLine(reader)) != null) {
// Append the read line to the main form with a linefeed ('\n')
count = count + 1;
}
reader.close();
//select randomly one word
Random r = new Random();
int curline = r.nextInt();
curline = curline % count;
if( curline < 0)
curline = curline + count;
InputStreamReader reader2 = new InputStreamReader(
getClass().getResourceAsStream(fname), "UTF-8");
int i = 0;
// Read a single line from the file. null represents the EOF.
while ((line = readLine(reader2)) != null) {
if( i == curline){
line = decrypt( line);
SetCurrentWord( line);
return 1;
}
i = i + 1;
}
reader.close();
return 0;
}
public void paint(Graphics g) {
switch( m_state){
case 0:
try {
paint_state_start(g);
} catch (IOException ex) {
ex.printStackTrace();
}
break;
case 1:
try {
paint_state_play( g);
} catch (StringIndexOutOfBoundsException ex) {
ex.printStackTrace();
}
break;
case 2:
try {
paint_state_nextword(g);
} catch (IOException ex) {
ex.printStackTrace();
}
break;
case 3:
paint_state_lose( g);
break;
case 4:
try {
paint_state_win(g);
} catch (IOException ex) {
ex.printStackTrace();
}
break;
}
}
private void paint_state_start(Graphics g) throws IOException{
m_init_letters = getlocale( "keyboardletters");
m_init_allletters = m_init_letters;
String sRemove = "1234567890:#";
for(int i=0; i < sRemove.length(); i++){
for(;;){
int pos = m_init_allletters.indexOf( sRemove.charAt(i));
if( pos < 0)
break;
m_init_allletters = m_init_allletters.substring( 0, pos) + m_init_allletters.substring( pos+1);
}
}
m_state = 2;
paint_state_nextword( g);
}
private void paint_state_nextword(Graphics g) throws IOException{
m_letters = m_init_letters;
m_allletters = m_init_allletters;
SelectWord( m_filewords);
m_lastletter = "";
int len = m_answer.length();
m_guess = "";
m_wrong = "";
for(int i=0; i < len; i++){
m_guess = m_guess + "-";
}
m_wrongletters = 0;
m_state = 1; //play
paint_state_play( g);
}
private void paint_state_win(Graphics g) throws IOException{
m_count_games++;
m_count_wins++;
m_state = 2;
paint_state_nextword( g);
}
private void paint_state_lose(Graphics g){
m_count_games++;
//clear the screen
g.setColor(255,255,255);
g.fillRect(0, 0, getWidth(), getHeight());
//set color to black
g.setColor(0,0,0);
//get the font height
int y=10;
int iHeight=g.getFont().getHeight();
String s = m_answer;
if( m_wrong.length() > 0){
s = s + " (" + m_wrong + ")";
}
s = s + " [" + String.valueOf( m_count_wins) + "/" + String.valueOf( m_count_games) + "]";
y = drawtextmultiline( g, s, 0, y);
y = drawtextmultiline( g, m_question, 0, y+iHeight);
m_state = 2;
}
private void paint_state_play(Graphics g){
//clear the screen
g.setColor(255,255,255);
g.fillRect(0, 0, getWidth(), getHeight());
//set color to black
g.setColor(0,0,0);
//get the font height
int y=0;
Font font = g.getFont();
int iHeight=g.getFont().getHeight();
String s = m_guess;
if( m_wrong.compareTo( "") != 0){
s = s + " (" + m_wrong + ")";
}
s = s + " (" + String.valueOf( m_count_wins) + "/" + String.valueOf( m_count_games) + ")";
y = drawtextmultiline( g, s, 0, y);
int x = getWidth() - 3 * font.charWidth( '-');
y = drawtextmultiline( g, mMessage, x, y) + iHeight;
y = drawtextmultiline( g, m_question, 0, y) + iHeight;
Image im = null;
try {
String filename = "/hangman/hangman_" + String.valueOf(m_wrongletters) + ".jpg";
im = Image.createImage( filename);
} catch (IOException ex) {
ex.printStackTrace();
}
int xMul = (100 * getWidth()) / im.getWidth();
int yMul = (100 * (getHeight() - y)) / im.getHeight();
if( yMul < xMul){
xMul = yMul;
}
int cx = (xMul * im.getWidth()) / 100;
int cy = (yMul * im.getHeight()) / 100;
Image resize = resizeImage( im, cx, cy);
g.drawImage(resize, 0, y, Graphics.LEFT | Graphics.TOP);
}
protected int drawtextmultiline(Graphics g, String text, int x, int y){
Font font = g.getFont();
int fontHeight = font.getHeight();
//change string to char data
char[] data = new char[text.length()];
text.getChars(0, text.length(), data, 0);
int width = getWidth();
int lineWidth = 0;
int charWidth = 0;
int xStart = x;
char ch;
for(int ccnt=0; ccnt < data.length; ccnt++)
{
ch = data[ccnt];
//measure the char to draw
charWidth = font.charWidth(ch);
lineWidth = lineWidth + charWidth;
//see if a new line is needed
if (lineWidth > width)
{
y = y + fontHeight;
lineWidth = 0;
x = xStart;
}
//draw the char
g.drawChar(ch, x, y,
Graphics.TOP|Graphics.LEFT);
x = x + charWidth;
}
return y;
}
protected void keyPressed(int keyCode) {
char number;
if( m_state == 2){
repaint();
return;
}
if( (keyCode >= 49) && (keyCode <= 57)){
String numbers = "123456789";
number = numbers.charAt(keyCode - 49);
int pos = m_letters.indexOf( number + ":");
String letters = "";
String letters2 = m_letters.substring( pos+2);
if( pos >= 0){
pos = letters2.indexOf( '#');
if( pos >= 0){
letters = letters2.substring( 0, pos);
//Compute the letters that correspond to the key pressed
if( m_lastletter.compareTo( "") != 0){
pos = letters.indexOf( m_lastletter);
if( pos >= 0){
pos = pos + 1;
if( pos >= letters.length()){
pos = 0;
}
}else{
//different key
pos = 0;
}
}else{
pos = 0;
}
if( (pos < letters.length()) && (pos >= 0)){
m_lastletter = letters.substring( pos, pos+1);
mMessage = m_lastletter;
repaint();
}
return;
}
}
repaint();
return;
}
int gameAction = getGameAction(keyCode);
switch (gameAction) {
case FIRE:
OnFire();
break;
default:
mMessage = String.valueOf( keyCode);
break;
}
}
protected void OnFire() {
int pos = m_guess.indexOf( m_lastletter);
if( pos >= 0){
//Already used
return;
}
char ch = m_lastletter.charAt( 0);
pos = m_answer.indexOf( ch);
if( pos >= 0){
//correct letter
//Maybe there are many letters
for(pos=0; pos < m_guess.length();pos++){
if( m_answer.charAt( pos) == ch){
m_guess = m_guess.substring( 0, pos) + m_lastletter + m_guess.substring( pos+1);
}
}
pos = m_allletters.indexOf( m_lastletter);
if( pos >= 0){
m_allletters = m_allletters.substring( 0, pos) + "." + m_allletters.substring( pos+1);
}
remove_lastletter_from_keyboard();
if( m_guess.indexOf( '-') < 0){
m_state = 4; //state=win;
}
repaint();
return;
}
pos = m_allletters.indexOf( m_lastletter);
if( pos < 0){
return;
}
//wrong letter
m_wrongletters = m_wrongletters + 1;
pos = m_allletters.indexOf( m_lastletter);
if( pos >= 0){
m_allletters = m_allletters.substring( 0, pos) + "." + m_allletters.substring( pos+1);
m_wrong = m_wrong + m_lastletter;
}
remove_lastletter_from_keyboard();
if( m_wrongletters >= 6){
m_state = 3; //state=lose
}
repaint();
}
private void remove_lastletter_from_keyboard(){
int pos = m_letters.indexOf( m_lastletter);
if( pos >= 0){
m_letters = m_letters.substring( 0, pos) + m_letters.substring( pos+1);
}
}
private Image resizeImage(Image src, int cx, int cy) {
int srcWidth = src.getWidth();
int srcHeight = src.getHeight();
Image tmp = Image.createImage(cx, srcHeight);
Graphics g = tmp.getGraphics();
int ratio = (srcWidth << 16) / cx;
int pos = ratio/2;
//Horizontal Resize
for (int x = 0; x < cx; x++) {
g.setClip(x, 0, 1, srcHeight);
g.drawImage(src, x - (pos >> 16), 0, Graphics.LEFT | Graphics.TOP);
pos += ratio;
}
Image resizedImage = Image.createImage(cx, cy);
g = resizedImage.getGraphics();
ratio = (srcHeight << 16) / cy;
pos = ratio/2;
//Vertical resize
for (int y = 0; y < cy; y++) {
g.setClip(0, y, cx, 1);
g.drawImage(tmp, 0, y - (pos >> 16), Graphics.LEFT | Graphics.TOP);
pos += ratio;
}
return resizedImage;
}//resize image
}

BIN
export/javame/hangman/simple/hangman-1.class

Binary file not shown.

BIN
export/javame/hangman/simple/hangman.class

Binary file not shown.

566
export/javame/hangman/simple/hangman.java

@ -0,0 +1,566 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;
import javax.microedition.midlet.MIDlet;
import java.util.Hashtable;
import java.util.Random;
public class hangman extends MIDlet {
public void startApp() {
Displayable d = null;
try {
d = new KeyCanvas();
} catch (IOException ex) {
ex.printStackTrace();
}
d.setCommandListener(new CommandListener() {
public void commandAction(Command c, Displayable s) {
notifyDestroyed();
}
});
Display.getDisplay(this).setCurrent(d);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
}
class KeyCanvas extends Canvas {
//private Font mFont = Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_MEDIUM);
private String mMessage = "";
private String m_letters;
private String m_lastletter;
private String m_answer;
private String m_question;
private String m_allletters;
private String m_guess;
private String m_wrong;
private int m_wrongletters;
private String m_encoding="";
private int m_state=0;
//0=start 1=play 2=next word 3=lose 4=win
private String m_init_letters;
private String m_init_allletters;
private int m_count_games=0;
private int m_count_wins=0;
private String m_filewords;
public Hashtable m_hashLocales;
private int m_keysize = 0;
private int [] m_key;
public KeyCanvas() throws IOException {
m_state = 0;
m_key = new int[ m_keysize+1];
m_key[ 0] = 0;
SelectFileWords();
//LoadEncoding();
LoadLocales();
addCommand(new Command( getlocale( "exit"), Command.EXIT, 0));
}
private String decrypt( String s){
String ret="";
if( m_keysize <=0 ){
return s;
}
int len=s.length();
for(int i=0; i < len; i+=m_keysize){
for(int j=0; j < m_keysize; j++){
int pos=i + m_key[ j];
if( pos < len){
ret = ret + s.charAt( pos);
}
}
}
return ret;
}
private String getlocale( String key){
return (String)m_hashLocales.get( key);
}
private void SelectFileWords() throws IOException{
Class c = this.getClass();
InputStream is = c.getResourceAsStream( "hangman/hangman.txt");
InputStreamReader reader = new InputStreamReader( is, "UTF-8");
String line = null;
// Read a single line from the file. null represents the EOF.
while ((line = readLine(reader)) != null) {
int pos = line.indexOf( "=");
if( pos >= 0){
m_filewords = "hangman/" + line.substring( 0, pos);
}
break;
}
reader.close();
}
private String readLine(InputStreamReader reader) throws IOException {
// Test whether the end of file has been reached. If so, return null.
int readChar = reader.read();
if (readChar <= -1) {
return null;
}
StringBuffer string = new StringBuffer();
// Read until end of file or new line
while (readChar > -1 && readChar != '\n') {
// Append the read character to the string. Some operating systems
// such as Microsoft Windows prepend newline character ('\n') with
// carriage return ('\r'). This is part of the newline character and
// therefore an exception that should not be appended to the string.
if (readChar != '\r') {
string.append( (char )readChar);
}
// Read the next character
readChar = reader.read();
}
return string.toString();
}
private void LoadLocales() throws IOException{
m_hashLocales = new Hashtable();
Class c = this.getClass();
InputStream is = c.getResourceAsStream( "hangman/language.txt");
InputStreamReader reader = new InputStreamReader( is, "UTF-8");
String line = null;
String key, data;
// Read a single line from the file. null represents the EOF.
while ((line = readLine(reader)) != null) {
int pos = line.indexOf( "=");
if( pos >= 0){
key = line.substring( 0, pos);
data = line.substring( pos+1);
m_hashLocales.put(key, data);
}
}
reader.close();
}
protected boolean SetCurrentWord( String line) throws IOException{
int pos=line.indexOf( '=');
if( pos == -1){
return false;
}
m_answer = line.substring( 0, pos);
m_question = line.substring( pos+1);
return true;
}
protected int SelectWord( String fname) throws IOException{
Class c = this.getClass();
InputStream is = c.getResourceAsStream( fname);
InputStreamReader reader = new InputStreamReader( is, "UTF-8");
String line = null;
int count=0;
// Read a single line from the file. null represents the EOF.
while ((line = readLine(reader)) != null) {
// Append the read line to the main form with a linefeed ('\n')
count = count + 1;
}
reader.close();
//select randomly one word
Random r = new Random();
int curline = r.nextInt();
curline = curline % count;
if( curline < 0)
curline = curline + count;
InputStreamReader reader2 = new InputStreamReader(
getClass().getResourceAsStream(fname), "UTF-8");
int i = 0;
// Read a single line from the file. null represents the EOF.
while ((line = readLine(reader2)) != null) {
if( i == curline){
line = decrypt( line);
SetCurrentWord( line);
return 1;
}
i = i + 1;
}
reader.close();
return 0;
}
public void paint(Graphics g) {
switch( m_state){
case 0:
try {
paint_state_start(g);
} catch (IOException ex) {
ex.printStackTrace();
}
break;
case 1:
try {
paint_state_play( g);
} catch (StringIndexOutOfBoundsException ex) {
ex.printStackTrace();
}
break;
case 2:
try {
paint_state_nextword(g);
} catch (IOException ex) {
ex.printStackTrace();
}
break;
case 3:
paint_state_lose( g);
break;
case 4:
try {
paint_state_win(g);
} catch (IOException ex) {
ex.printStackTrace();
}
break;
}
}
private void paint_state_start(Graphics g) throws IOException{
m_init_letters = getlocale( "keyboardletters");
m_init_allletters = m_init_letters;
String sRemove = "1234567890:#";
for(int i=0; i < sRemove.length(); i++){
for(;;){
int pos = m_init_allletters.indexOf( sRemove.charAt(i));
if( pos < 0)
break;
m_init_allletters = m_init_allletters.substring( 0, pos) + m_init_allletters.substring( pos+1);
}
}
m_state = 2;
paint_state_nextword( g);
}
private void paint_state_nextword(Graphics g) throws IOException{
m_letters = m_init_letters;
m_allletters = m_init_allletters;
SelectWord( m_filewords);
m_lastletter = "";
int len = m_answer.length();
m_guess = "";
m_wrong = "";
for(int i=0; i < len; i++){
m_guess = m_guess + "-";
}
m_wrongletters = 0;
m_state = 1; //play
paint_state_play( g);
}
private void paint_state_win(Graphics g) throws IOException{
m_count_games++;
m_count_wins++;
m_state = 2;
paint_state_nextword( g);
}
private void paint_state_lose(Graphics g){
m_count_games++;
//clear the screen
g.setColor(255,255,255);
g.fillRect(0, 0, getWidth(), getHeight());
//set color to black
g.setColor(0,0,0);
//get the font height
int y=10;
int iHeight=g.getFont().getHeight();
String s = m_answer;
if( m_wrong.length() > 0){
s = s + " (" + m_wrong + ")";
}
s = s + " [" + String.valueOf( m_count_wins) + "/" + String.valueOf( m_count_games) + "]";
y = drawtextmultiline( g, s, 0, y);
y = drawtextmultiline( g, m_question, 0, y+iHeight);
m_state = 2;
}
private void paint_state_play(Graphics g){
//clear the screen
g.setColor(255,255,255);
g.fillRect(0, 0, getWidth(), getHeight());
//set color to black
g.setColor(0,0,0);
//get the font height
int y=0;
Font font = g.getFont();
int iHeight=g.getFont().getHeight();
String s = m_guess;
if( m_wrong.compareTo( "") != 0){
s = s + " (" + m_wrong + ")";
}
s = s + " (" + String.valueOf( m_count_wins) + "/" + String.valueOf( m_count_games) + ")";
y = drawtextmultiline( g, s, 0, y);
int x = getWidth() - 3 * font.charWidth( '-');
y = drawtextmultiline( g, mMessage, x, y) + iHeight;
y = drawtextmultiline( g, m_question, 0, y) + iHeight;
Image im = null;
try {
String filename = "/hangman/hangman_" + String.valueOf(m_wrongletters) + ".jpg";
im = Image.createImage( filename);
} catch (IOException ex) {
ex.printStackTrace();
}
int xMul = (100 * getWidth()) / im.getWidth();
int yMul = (100 * (getHeight() - y)) / im.getHeight();
if( yMul < xMul){
xMul = yMul;
}
int cx = (xMul * im.getWidth()) / 100;
int cy = (yMul * im.getHeight()) / 100;
Image resize = resizeImage( im, cx, cy);
g.drawImage(resize, 0, y, Graphics.LEFT | Graphics.TOP);
}
protected int drawtextmultiline(Graphics g, String text, int x, int y){
Font font = g.getFont();
int fontHeight = font.getHeight();
//change string to char data
char[] data = new char[text.length()];
text.getChars(0, text.length(), data, 0);
int width = getWidth();
int lineWidth = 0;
int charWidth = 0;
int xStart = x;
char ch;
for(int ccnt=0; ccnt < data.length; ccnt++)
{
ch = data[ccnt];
//measure the char to draw
charWidth = font.charWidth(ch);
lineWidth = lineWidth + charWidth;
//see if a new line is needed
if (lineWidth > width)
{
y = y + fontHeight;
lineWidth = 0;
x = xStart;
}
//draw the char
g.drawChar(ch, x, y,
Graphics.TOP|Graphics.LEFT);
x = x + charWidth;
}
return y;
}
protected void keyPressed(int keyCode) {
char number;
if( m_state == 2){
repaint();
return;
}
if( (keyCode >= 49) && (keyCode <= 57)){
String numbers = "123456789";
number = numbers.charAt(keyCode - 49);
int pos = m_letters.indexOf( number + ":");
String letters = "";
String letters2 = m_letters.substring( pos+2);
if( pos >= 0){
pos = letters2.indexOf( '#');
if( pos >= 0){
letters = letters2.substring( 0, pos);
//Compute the letters that correspond to the key pressed
if( m_lastletter.compareTo( "") != 0){
pos = letters.indexOf( m_lastletter);
if( pos >= 0){
pos = pos + 1;
if( pos >= letters.length()){
pos = 0;
}
}else{
//different key
pos = 0;
}
}else{
pos = 0;
}
if( (pos < letters.length()) && (pos >= 0)){
m_lastletter = letters.substring( pos, pos+1);
mMessage = m_lastletter;
repaint();
}
return;
}
}
repaint();
return;
}
int gameAction = getGameAction(keyCode);
switch (gameAction) {
case FIRE:
OnFire();
break;
default:
mMessage = String.valueOf( keyCode);
break;
}
}
protected void OnFire() {
int pos = m_guess.indexOf( m_lastletter);
if( pos >= 0){
//Already used
return;
}
char ch = m_lastletter.charAt( 0);
pos = m_answer.indexOf( ch);
if( pos >= 0){
//correct letter
//Maybe there are many letters
for(pos=0; pos < m_guess.length();pos++){
if( m_answer.charAt( pos) == ch){
m_guess = m_guess.substring( 0, pos) + m_lastletter + m_guess.substring( pos+1);
}
}
pos = m_allletters.indexOf( m_lastletter);
if( pos >= 0){
m_allletters = m_allletters.substring( 0, pos) + "." + m_allletters.substring( pos+1);
}
remove_lastletter_from_keyboard();
if( m_guess.indexOf( '-') < 0){
m_state = 4; //state=win;
}
repaint();
return;
}
pos = m_allletters.indexOf( m_lastletter);
if( pos < 0){
return;
}
//wrong letter
m_wrongletters = m_wrongletters + 1;
pos = m_allletters.indexOf( m_lastletter);
if( pos >= 0){
m_allletters = m_allletters.substring( 0, pos) + "." + m_allletters.substring( pos+1);
m_wrong = m_wrong + m_lastletter;
}
remove_lastletter_from_keyboard();
if( m_wrongletters >= 6){
m_state = 3; //state=lose
}
repaint();
}
private void remove_lastletter_from_keyboard(){
int pos = m_letters.indexOf( m_lastletter);
if( pos >= 0){
m_letters = m_letters.substring( 0, pos) + m_letters.substring( pos+1);
}
}
private Image resizeImage(Image src, int cx, int cy) {
int srcWidth = src.getWidth();
int srcHeight = src.getHeight();
Image tmp = Image.createImage(cx, srcHeight);
Graphics g = tmp.getGraphics();
int ratio = (srcWidth << 16) / cx;
int pos = ratio/2;
//Horizontal Resize
for (int x = 0; x < cx; x++) {
g.setClip(x, 0, 1, srcHeight);
g.drawImage(src, x - (pos >> 16), 0, Graphics.LEFT | Graphics.TOP);
pos += ratio;
}
Image resizedImage = Image.createImage(cx, cy);
g = resizedImage.getGraphics();
ratio = (srcHeight << 16) / cy;
pos = ratio/2;
//Vertical resize
for (int y = 0; y < cy; y++) {
g.setClip(0, y, cx, 1);
g.drawImage(tmp, 0, y - (pos >> 16), Graphics.LEFT | Graphics.TOP);
pos += ratio;
}
return resizedImage;
}//resize image
}

3
export/javame/hangman/simple/lang/el_utf8/language.txt

@ -0,0 +1,3 @@
encoding=el_utf8
exit=Έξοδος
keyboardletters=2:ΑΒΓ#3:ΔΕΖ#4:ΗΘΙ#5:ΚΛΜ#6:ΝΞΟ#7:ΠΡΣ#8:ΤΥΦ#9:ΧΨΩ#

4
export/javame/hangman/simple/lang/en_utf8/language.txt

@ -0,0 +1,4 @@
encoding=en_utf8
exit=Exit
keyboardletters=2:ABC#3:DEF#4:GHI#5:JKL#6:MNO#7:PQRS#8:TUV#9:WXYZ#

4
export/javame/hangman/simple/lang/es_utf8/language.txt

@ -0,0 +1,4 @@
encoding=es_utf8
exit=Salir
keyboardletters=2:ABC2ÁªÀÇ#3:DEF3ÉÈ#4:GHI4ÍÌ#5:JKL5#6:MNÑO6ÓÒº#7:PQRS7#8:TUV8ÚÜÙ#9:WXYZ9#

BIN
export/javame/hangmanp/simple/hangmanp-1.class

Binary file not shown.

BIN
export/javame/hangmanp/simple/hangmanp.class

Binary file not shown.

33
export/javame/hangmanp/simple/hangmanp.java

@ -0,0 +1,33 @@
import java.io.IOException;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;
public class hangmanp extends MIDlet {
public void startApp() {
Displayable d = null;
try {
d = new keycanvasp();
} catch (IOException ex) {
ex.printStackTrace();
}
d.setCommandListener(new CommandListener() {
public void commandAction(Command c, Displayable s) {
notifyDestroyed();
}
});
Display.getDisplay(this).setCurrent(d);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
}

BIN
export/javame/hangmanp/simple/keycanvasp.class

Binary file not shown.

570
export/javame/hangmanp/simple/keycanvasp.java

@ -0,0 +1,570 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.Font;
import javax.microedition.lcdui.Graphics;
import java.util.Hashtable;
import java.util.Random;
class keycanvasp extends Canvas {
//private Font mFont = Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_MEDIUM);
private String mMessage = "";
private String m_letters;
private String m_lastletter;
private String m_dirphoto;
//read from photo.txt
private String m_file;
private String m_answer;
private String m_info;
//private String m_question;
private String m_allletters;
private String m_guess;
private String m_wrong;
private int m_wrongletters;
private int m_state=0;
//0=start 1=play 2=next word 3=lose 4=win
private String m_init_letters;
private String m_init_allletters;
private int m_count_games=0;
private int m_count_wins=0;
public Hashtable m_hashLocales;
private int m_keysize = 0;
private int [] m_key;
public keycanvasp() throws IOException {
m_state = 0;
m_key = new int[ m_keysize+1];
m_key[ 0] = 0;
SelectFileWords();
LoadLocales();
addCommand(new Command( getlocale( "exit"), Command.EXIT, 0));
}
private String decrypt( String s){
String ret="";
if( m_keysize <=0 ){
return s;
}
int len=s.length();
for(int i=0; i < len; i+=m_keysize){
for(int j=0; j < m_keysize; j++){
int pos=i + m_key[ j];
if( pos < len){
ret = ret + s.charAt( pos);
}
}
}
return ret;
}
private String getlocale( String key){
return (String)m_hashLocales.get( key);
}
private void SelectFileWords() throws IOException{
Class c = this.getClass();
InputStream is = c.getResourceAsStream( "hangmanp/hangmanp.txt");
InputStreamReader reader = new InputStreamReader( is, "UTF-8");
String line = null;
// Read a single line from the file. null represents the EOF.
while ((line = readLine(reader)) != null) {
int pos = line.indexOf( "=");
if( pos >= 0){
m_dirphoto = "/hangmanp/" + line.substring( 0, pos);
}
break;
}
reader.close();
}
private String readLine(InputStreamReader reader) throws IOException {
// Test whether the end of file has been reached. If so, return null.
int readChar = reader.read();
if (readChar <= -1) {
return null;
}
StringBuffer string = new StringBuffer();
// Read until end of file or new line
while (readChar > -1 && readChar != '\n') {
// Append the read character to the string. Some operating systems
// such as Microsoft Windows prepend newline character ('\n') with
// carriage return ('\r'). This is part of the newline character and
// therefore an exception that should not be appended to the string.
if (readChar != '\r') {
string.append( (char )readChar);
}
// Read the next character
readChar = reader.read();
}
return string.toString();
}
private void LoadLocales() throws IOException{
m_hashLocales = new Hashtable();
Class c = this.getClass();
InputStream is = c.getResourceAsStream( "hangmanp/language.txt");
InputStreamReader reader = new InputStreamReader( is, "UTF-8");
String line = null;
String key, data;
// Read a single line from the file. null represents the EOF.
while ((line = readLine(reader)) != null) {
int pos = line.indexOf( "=");
if( pos >= 0){
key = line.substring( 0, pos);
data = line.substring( pos+1);
m_hashLocales.put(key, data);
}
}
reader.close();
}
protected boolean SetCurrentWord( String line) throws IOException{
int pos=line.indexOf( '=');
if( pos == -1){
return false;
}
m_file = line.substring( 0, pos);
m_answer = line.substring( pos+1);
pos=m_answer.indexOf( ',');
if( pos == -1){
m_info = "";
}else
{
m_info = line.substring( pos+1);
m_answer = line.substring( 0, pos);
}
return true;
}
protected int SelectWord( String fname) throws IOException{
Class c = this.getClass();
InputStream is = c.getResourceAsStream( fname);
if( is == null)
is = c.getResourceAsStream( fname);
if( is == null)
{
fname = "/hangmanp/01/photo.txt";
is = c.getResourceAsStream( fname);
}
InputStreamReader reader = new InputStreamReader( is, "UTF-8");
String line = null;
int count=0;
// Read a single line from the file. null represents the EOF.
while ((line = readLine(reader)) != null) {
// Append the read line to the main form with a linefeed ('\n')
count = count + 1;
}
reader.close();
//select randomly one word
Random r = new Random();
int curline = r.nextInt();
curline = curline % count;
if( curline < 0)
curline = curline + count;
is = c.getResourceAsStream( fname);
InputStreamReader reader2 = new InputStreamReader( is, "UTF-8");
int i = 0;
// Read a single line from the file. null represents the EOF.
while ((line = readLine(reader2)) != null) {
if( i == curline){
line = decrypt( line);
SetCurrentWord( line);
return 1;
}
i = i + 1;
}
reader.close();
return 0;
}
public void paint(Graphics g) {
switch( m_state){
case 0:
try {
paint_state_start(g);
} catch (IOException ex) {
ex.printStackTrace();
}
break;
case 1:
try {
paint_state_play( g);
} catch (StringIndexOutOfBoundsException ex) {
ex.printStackTrace();
}
break;
case 2:
try {
paint_state_nextword(g);
} catch (IOException ex) {
ex.printStackTrace();
}
break;
case 3:
paint_state_lose( g);
break;
case 4:
try {
paint_state_win(g);
} catch (IOException ex) {
ex.printStackTrace();
}
break;
}
}
private void paint_state_start(Graphics g) throws IOException{
m_init_letters = getlocale( "keyboardletters");
m_init_allletters = m_init_letters;
String sRemove = "1234567890:#";
for(int i=0; i < sRemove.length(); i++){
for(;;){
int pos = m_init_allletters.indexOf( sRemove.charAt(i));
if( pos < 0)
break;
m_init_allletters = m_init_allletters.substring( 0, pos) + m_init_allletters.substring( pos+1);
}
}
m_state = 2;
paint_state_nextword( g);
}
private void paint_state_nextword(Graphics g) throws IOException{
m_letters = m_init_letters;
m_allletters = m_init_allletters;
SelectWord( m_dirphoto + "/photo.txt");
m_lastletter = "";
int len = m_answer.length();
m_guess = "";
m_wrong = "";
for(int i=0; i < len; i++){
m_guess = m_guess + "-";
}
m_wrongletters = 0;
m_state = 1; //play
paint_state_play( g);
}
private void paint_state_win(Graphics g) throws IOException{
m_count_games++;
m_count_wins++;
m_state = 2;
paint_state_nextword( g);
}
private void paint_state_lose(Graphics g){
m_count_games++;
//clear the screen
g.setColor(255,255,255);
g.fillRect(0, 0, getWidth(), getHeight());
//set color to black
g.setColor(0,0,0);
//get the font height
int y=10;
int iHeight=g.getFont().getHeight();
String s = m_answer;
if( m_wrong.length() > 0){
s = s + " (" + m_wrong + ")";
}
s = s + " [" + String.valueOf( m_count_wins) + "/" + String.valueOf( m_count_games) + "]";
y = drawtextmultiline( g, s, 0, y);
y = drawtextmultiline( g, m_info, 0, y+iHeight);
m_state = 2;
}
private void paint_state_play(Graphics g){
//clear the screen
g.setColor(255,255,255);
g.fillRect(0, 0, getWidth(), getHeight());
//set color to black
g.setColor(0,0,0);
//get the font height
int y=0;
Font font = g.getFont();
int iHeight=g.getFont().getHeight();
String s = m_guess;
if( m_wrong.compareTo( "") != 0){
s = s + " (" + m_wrong + ")";
}
s = s + " (" + String.valueOf( m_count_wins) + "/" + String.valueOf( m_count_games) + ")";
y = drawtextmultiline( g, s, 0, y);
int x = getWidth() - 3 * font.charWidth( '-');
y = drawtextmultiline( g, mMessage, x, y) + iHeight;
y = drawtextmultiline( g, m_info, 0, y) + iHeight;
Image im = null;
try {
String filename = m_dirphoto + "/" + m_file;
im = Image.createImage( filename);
} catch (IOException ex) {
ex.printStackTrace();
}
if( im == null)
{
try {
String filename = "/hangmanp/01/";
filename = filename + m_file;
im = Image.createImage(filename);
} catch (IOException ex) {
ex.printStackTrace();
}
}
int xMul = (100 * getWidth()) / im.getWidth();
int yMul = (100 * (getHeight() - y)) / im.getHeight();
if( yMul < xMul){
xMul = yMul;
}
int cx = (xMul * im.getWidth()) / 100;
int cy = (yMul * im.getHeight()) / 100;
Image resize = resizeImage( im, cx, cy);
g.drawImage(resize, 0, y, Graphics.LEFT | Graphics.TOP);
}
protected int drawtextmultiline(Graphics g, String text, int x, int y){
Font font = g.getFont();
int fontHeight = font.getHeight();
//change string to char data
char[] data = new char[text.length()];
text.getChars(0, text.length(), data, 0);
int width = getWidth();
int lineWidth = 0;
int charWidth = 0;
int xStart = x;
char ch;
for(int ccnt=0; ccnt < data.length; ccnt++)
{
ch = data[ccnt];
//measure the char to draw
charWidth = font.charWidth(ch);
lineWidth = lineWidth + charWidth;
//see if a new line is needed
if (lineWidth > width)
{
y = y + fontHeight;
lineWidth = 0;
x = xStart;
}
//draw the char
g.drawChar(ch, x, y,
Graphics.TOP|Graphics.LEFT);
x = x + charWidth;
}
return y;
}
protected void keyPressed(int keyCode) {
char number;
if( m_state == 2){
repaint();
return;
}
if( (keyCode >= 49) && (keyCode <= 57)){
String numbers = "123456789";
number = numbers.charAt(keyCode - 49);
int pos = m_letters.indexOf( number + ":");
String letters = "";
String letters2 = m_letters.substring( pos+2);
if( pos >= 0){
pos = letters2.indexOf( '#');
if( pos >= 0){
letters = letters2.substring( 0, pos);
//Compute the letters that correspond to the key pressed
if( m_lastletter.compareTo( "") != 0){
pos = letters.indexOf( m_lastletter);
if( pos >= 0){
pos = pos + 1;
if( pos >= letters.length()){
pos = 0;
}
}else{
//different key
pos = 0;
}
}else{
pos = 0;
}
if( (pos < letters.length()) && (pos >= 0)){
m_lastletter = letters.substring( pos, pos+1);
mMessage = m_lastletter;
repaint();
}
return;
}
}
repaint();
return;
}
int gameAction = getGameAction(keyCode);
switch (gameAction) {
case FIRE:
OnFire();
break;
default:
mMessage = String.valueOf( keyCode);
break;
}
}
protected void OnFire() {
int pos = m_guess.indexOf( m_lastletter);
if( pos >= 0){
//Already used
return;
}
char ch = m_lastletter.charAt( 0);
pos = m_answer.indexOf( ch);
if( pos >= 0){
//correct letter
//Maybe there are many letters
for(pos=0; pos < m_guess.length();pos++){
if( m_answer.charAt( pos) == ch){
m_guess = m_guess.substring( 0, pos) + m_lastletter + m_guess.substring( pos+1);
}
}
pos = m_allletters.indexOf( m_lastletter);
if( pos >= 0){
m_allletters = m_allletters.substring( 0, pos) + "." + m_allletters.substring( pos+1);
}
remove_lastletter_from_keyboard();
if( m_guess.indexOf( '-') < 0){
m_state = 4; //state=win;
}
repaint();
return;
}
pos = m_allletters.indexOf( m_lastletter);
if( pos < 0){
return;
}
//wrong letter
m_wrongletters = m_wrongletters + 1;
pos = m_allletters.indexOf( m_lastletter);
if( pos >= 0){
m_allletters = m_allletters.substring( 0, pos) + "." + m_allletters.substring( pos+1);
m_wrong = m_wrong + m_lastletter;
}
remove_lastletter_from_keyboard();
if( m_wrongletters >= 6){
m_state = 3; //state=lose
}
repaint();
}
private void remove_lastletter_from_keyboard(){
int pos = m_letters.indexOf( m_lastletter);
if( pos >= 0){
m_letters = m_letters.substring( 0, pos) + m_letters.substring( pos+1);
}
}
private Image resizeImage(Image src, int cx, int cy) {
int srcWidth = src.getWidth();
int srcHeight = src.getHeight();
Image tmp = Image.createImage(cx, srcHeight);
Graphics g = tmp.getGraphics();
int ratio = (srcWidth << 16) / cx;
int pos = ratio/2;
//Horizontal Resize
for (int x = 0; x < cx; x++) {
g.setClip(x, 0, 1, srcHeight);
g.drawImage(src, x - (pos >> 16), 0, Graphics.LEFT | Graphics.TOP);
pos += ratio;
}
Image resizedImage = Image.createImage(cx, cy);
g = resizedImage.getGraphics();
ratio = (srcHeight << 16) / cy;
pos = ratio/2;
//Vertical resize
for (int y = 0; y < cy; y++) {
g.setClip(0, y, cx, 1);
g.drawImage(tmp, 0, y - (pos >> 16), Graphics.LEFT | Graphics.TOP);
pos += ratio;
}
return resizedImage;
}//resize image
}

3
export/javame/hangmanp/simple/lang/el_utf8/language.txt

@ -0,0 +1,3 @@
encoding=el_utf8
exit=Έξοδος
keyboardletters=2:ΑΒΓ#3:ΔΕΖ#4:ΗΘΙ#5:ΚΛΜ#6:ΝΞΟ#7:ΠΡΣ#8:ΤΥΦ#9:ΧΨΩ#

4
export/javame/hangmanp/simple/lang/en_utf8/language.txt

@ -0,0 +1,4 @@
encoding=en_utf8
exit=Exit
keyboardletters=2:ABC#3:DEF#4:GHI#5:JKL#6:MNO#7:PQRS#8:TUV#9:WXYZ#

4
export/javame/hangmanp/simple/lang/es_utf8/language.txt

@ -0,0 +1,4 @@
encoding=es_utf8
exit=Salir
keyboardletters=2:ABC2ÁªÀÇ#3:DEF3ÉÈ#4:GHI4ÍÌ#5:JKL5#6:MNÑO6ÓÒº#7:PQRS7#8:TUV8ÚÜÙ#9:WXYZ9#

418
exporthtml.php

@ -0,0 +1,418 @@
<?php // $Id: exporthtml.php,v 1.23 2012/07/25 11:16:03 bdaloukas Exp $
/**
* This page export the game to html for games: cross, hangman
*
* @author bdaloukas
* @version $Id: exporthtml.php,v 1.23 2012/07/25 11:16:03 bdaloukas Exp $
* @package game
**/
require_once( "locallib.php");
require_once( "exportjavame.php");
function game_OnExportHTML( $game, $context, $html){
global $CFG;
$destdir = game_export_createtempdir();
switch( $game->gamekind){
case 'cross';
game_OnExportHTML_cross( $game, $context, $html, $destdir);
break;
case 'hangman':
game_OnExportHTML_hangman( $game, $context, $html, $destdir);
break;
case 'snakes':
game_OnExportHTML_snakes( $game, $html, $destdir, $context);
break;
case 'millionaire':
game_OnExportHTML_millionaire( $game, $context, $html, $destdir);
break;
}
remove_dir( $destdir);
}
function game_OnExportHTML_cross( $game, $context, $html, $destdir){
global $CFG, $DB;
if( $html->filename == ''){
$html->filename = 'cross';
}
$filename = $html->filename . '.htm';
require( "cross/play.php");
$attempt = game_getattempt( $game, $crossrec, true);
if( $crossrec == false){
game_cross_new( $game, $attempt->id, $crossm);
$attempt = game_getattempt( $game, $crossrec);
}
$ret = game_export_printheader( $html->title);
echo "$ret<br>";
ob_start();
game_cross_play( 0, $game, $attempt, $crossrec, '', true, false, false, false, $html->checkbutton, true, $html->printbutton, false, $context);
$output_string = ob_get_contents();
ob_end_clean();
$course = $DB->get_record( 'course', array( 'id' => $game->course));
$filename = $html->filename . '.htm';
file_put_contents( $destdir.'/'.$filename, $ret . "\r\n" . $output_string);
$filename = game_OnExportHTML_cross_repair_questions( $game, $context, $filename, $destdir);
game_send_stored_file( $filename);
}
function game_OnExportHTML_cross_repair_questions( $game, $context, $filename, $destdir)
{
global $CFG, $DB;
$file_handle = fopen( $destdir.'/'.$filename, "rb");
$found = false;
$files = array();
$contextcourse = false;
$linesbefore = array();
$linesafter = array();
while (!feof($file_handle) ) {
$line = fgets( $file_handle);
if( $found)
{
if( strpos( $line, 'new Array'))
{
$linesafter[] = $line;
break;
}
$array .= $line;
continue;
}
if( strpos( $line, 'Clue = new Array') === false)
{
$linesbefore[] = $line;
continue;
}
$array = $line;
$found = true;
}
while (!feof($file_handle) ) {
$linesafter[] = fgets( $file_handle);
}
fclose($file_handle);
$search = $CFG->wwwroot.'/pluginfile.php';
$pos = 0;
$search = '"'.$CFG->wwwroot.'/pluginfile.php/'.$context->id.'/mod_game/';
$len = strlen( $search);
$start = 0;
$filescopied = false;
for(;;)
{
$pos1 = strpos( $array, $search, $start);
if( $pos1 == false)
break;
$pos2 = strpos( $array, '\"', $pos1+$len);
if( $pos2 == false)
break;
//Have to copy the files
if( $contextcourse === false)
{
mkdir( $destdir.'/images');
if (!$contextcourse = get_context_instance(CONTEXT_COURSE, $game->course)) {
print_error('nocontext');
}
$fs = get_file_storage();
}
$inputs = explode( '/', substr( $array, $pos1+$len, $pos2-$pos1-$len));
$filearea = $inputs[ 0];
$id = $inputs[ 1];
$fileimage = urldecode( $inputs[ 2]);
$component = 'question';
$params = array( 'component' => $component, 'filearea' => $filearea,
'itemid' => $id, 'filename' => $fileimage, 'contextid' => $context, 'contextid' => $contextcourse->id);
$rec = $DB->get_record( 'files', $params);
if( $rec == false)
{
print_r( $params);
break;
}
if (!$file = $fs->get_file_by_hash($rec->pathnamehash) or $file->is_directory())
continue;
$posext = strrpos( $fileimage, '.');
$filenoext = substr( $fileimage, $posext);
$ext = substr( $fileimage, $posext+1);
for($i=0;;$i++)
{
$newfile = $filenoext.$i;
$newfile = md5( $newfile).'.'.$ext;
if( !array_search( $newfile, $files))
break;
}
$file->copy_content_to( $destdir.'/images/'.$newfile);
$filescopied = true;
$array = substr( $array, 0, $pos1+1).'images/'.$newfile.substr( $array, $pos2);
}
if( $filescopied == false)
return $destdir.'/'.$filename;
$linesbefore[] = $array;
foreach( $linesafter as $line)
$linesbefore [] = $line;
file_put_contents( $destdir.'/'.$filename, $linesbefore);
$pos = strrpos( $filename, '.');
if( $pos === false)
$filezip = $filename.'.zip';
else
$filezip = substr( $filename, 0, $pos).'.zip';
$filezip = game_create_zip( $destdir, $game->course, $filezip);
return $filezip;
}
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";
$ret .= "<head>\n";
$ret .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
$ret .= '<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">'."\n";
$ret .= "<title>$title</title>\n";
$ret .= "</head>\n";
if( $showbody)
$ret .= "<body>";
return $ret;
}
function game_OnExportHTML_hangman( $game, $context, $html, $destdir){
global $CFG, $DB;
if( $html->filename == ''){
$html->filename = 'hangman';
}
if( $game->param10 <= 0)
$game->param10 = 6;
$filename = $html->filename . '.htm';
$ret = game_export_printheader( $html->title, false);
$ret .= "\r<body onload=\"reset()\">\r";
$export_attachment = ( $html->type == 'hangmanp');
$map = game_exmportjavame_getanswers( $game, $context, $export_attachment, $destdir, $files);
if( $map == false){
print_error( get_string('no_words', 'game'));
}
ob_start();
//Here is the code of hangman
require_once( "exporthtml_hangman.php");
$output_string = ob_get_contents();
ob_end_clean();
$courseid = $game->course;
$course = $DB->get_record( 'course', array( 'id' => $courseid));
$filename = $html->filename . '.htm';
file_put_contents( $destdir.'/'.$filename, $ret . "\r\n" . $output_string);
if( $html->type != 'hangmanp')
{
//Not copy the standard pictures when we use the "Hangman with pictures"
$src = $CFG->dirroot.'/mod/game/pix/hangman/1';
$handle = opendir( $src);
while (false!==($item = readdir($handle))) {
if($item != '.' && $item != '..') {
if(!is_dir($src.'/'.$item)) {
$itemdest = $item;
if( strpos( $item, '.') === false)
continue;
copy( $src.'/'.$item, $destdir.'/'.$itemdest);
}
}
}
}
$filezip = game_create_zip( $destdir, $courseid, $html->filename.'.zip');
game_send_stored_file( $filezip);
}
function game_OnExportHTML_millionaire( $game, $context, $html, $destdir){
global $CFG, $DB;
if( $html->filename == ''){
$html->filename = 'millionaire';
}
$filename = $html->filename . '.htm';
$ret = game_export_printheader( $html->title, false);
$ret .= "\r<body onload=\"Reset();\">\r";
//Here is the code of millionaire
require( "exporthtml_millionaire.php");
$questions = game_millionaire_html_getquestions( $game, $context, $maxanswers, $maxquestions, $retfeedback, $destdir, $files);
ob_start();
game_millionaire_html_print( $game, $questions, $maxanswers);
//End of millionaire code
$output_string = ob_get_contents();
ob_end_clean();
$courseid = $game->course;
$course = $DB->get_record( 'course', array( 'id' => $courseid));
$filename = $html->filename . '.htm';
file_put_contents( $destdir.'/'.$filename, $ret . "\r\n" . $output_string);
//Copy the standard pictures of Millionaire
$src = $CFG->dirroot.'/mod/game/millionaire/1';
$handle = opendir( $src);
while (false!==($item = readdir($handle))) {
if($item != '.' && $item != '..') {
if(!is_dir($src.'/'.$item)) {
$itemdest = $item;
if( strpos( $item, '.') === false)
continue;
copy( $src.'/'.$item, $destdir.'/'.$itemdest);
}
}
}
$filezip = game_create_zip( $destdir, $courseid, $html->filename.'.zip');
game_send_stored_file($filezip);
}
function game_OnExportHTML_snakes( $game, $html, $destdir, $context){
require_once( "exporthtml_millionaire.php");
global $CFG, $DB;
if( $html->filename == ''){
$html->filename = 'snakes';
}
$filename = $html->filename . '.htm';
$ret = '';
$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);
else
{
$questionsM = array();
$countofquestionsM = 0;
$retfeedback = '';
}
$questionsS = game_exmportjavame_getanswers( $game, $context, false, $destdir, $files);
ob_start();
//Here is the code of hangman
require( "exporthtml_snakes.php");
$output_string = ob_get_contents();
ob_end_clean();
$courseid = $game->course;
$course = $DB->get_record( 'course', array( 'id' => $courseid));
$filename = $html->filename . '.htm';
file_put_contents( $destdir.'/'.$filename, $ret . "\r\n" . $output_string);
$src = $CFG->dirroot.'/mod/game/export/html/snakes';
game_copyfiles( $src, $destdir);
mkdir( $destdir .'/css');
$src = $CFG->dirroot.'/mod/game/export/html/snakes/css';
game_copyfiles( $src, $destdir.'/css');
mkdir( $destdir .'/js');
$src = $CFG->dirroot.'/mod/game/export/html/snakes/js';
game_copyfiles( $src, $destdir.'/js');
mkdir( $destdir .'/images');
$destfile = $destdir.'/images/'.$board->fileboard;
if( $game->param3 != 0)
{
//Is a standard board
copy( $board->imagesrc, $destfile);
}else
{
$cmg = get_coursemodule_from_instance('game', $game->id, $game->course);
$modcontext = get_context_instance(CONTEXT_MODULE, $cmg->id);
$fs = get_file_storage();
$files = $fs->get_area_files($modcontext->id, 'mod_game', 'snakes_board', $game->id);
foreach ($files as $f) {
if( $f->is_directory())
continue;
break;
}
$f->copy_content_to( $destfile);
}
$a = array( 'player1.png', 'dice1.png', 'dice2.png', 'dice3.png', 'dice4.png', 'dice5.png', 'dice6.png', 'numbers.png');
foreach( $a as $file)
copy( $CFG->dirroot.'/mod/game/snakes/1/'.$file, $destdir.'/images/'.$file);
$filezip = game_create_zip( $destdir, $courseid, $html->filename.'.zip');
game_send_stored_file($filezip);
}
function game_copyfiles( $src, $destdir)
{
$handle = opendir( $src);
while (($item = readdir($handle)) !== false)
{
if( $item == '.' or $item == '..')
continue;
if( strpos( $item, '.') === false)
continue;
if(is_dir($src.'/'.$item))
continue;
copy( $src.'/'.$item, $destdir.'/'.$item);
}
closedir($handle);
}

360
exporthtml_hangman.php

@ -0,0 +1,360 @@
<?php // $Id: exporthtml_hangman.php,v 1.10 2012/07/25 11:16:03 bdaloukas Exp $
/**
* This page export the game hangman to html
*
* @author bdaloukas
* @version $Id: exporthtml_hangman.php,v 1.10 2012/07/25 11:16:03 bdaloukas Exp $
* @package game
**/
?>
<script type="text/javascript">
// Hangman for Moodle by Vasilis Daloukas
// The script is based on HangMan II script- By Chris Fortey (http://www.c-g-f.net/)
var can_play = true;
<?php
$destdir = game_export_createtempdir();
$export_attachment = ( $html->type == 'hangmanp');
$map = game_exmportjavame_getanswers( $game, $context, $export_attachment, $destdir, $files);
if( $map == false){
print_error( 'No Questions');
}
$questions = '';
$words = '';
$lang = '';
$allletters = '';
$images = '';
foreach( $map as $line)
{
$answer = game_upper( $line->answer);
if( $game->param7){
//Have to delete space
$answer = str_replace(' ', '', $answer);
}
if( $game->param8){
//Have to delete -
$answer = str_replace('-', '', $answer);
}
if( $lang == ''){
$lang = $game->language;
if( $lang == '')
$lang = game_detectlanguage( $answer);
if( $lang == '')
$lang = current_language();
$allletters = game_getallletters( $answer, $lang);
}
if( game_getallletters( $answer, $lang) != $allletters)
continue;
if( $html->type == 'hangmanp'){
$file = $line->attachment;
$pos = strrpos( $file, '.');
if( $pos == false)
continue;
}
if( $html->type == 'hangmanp'){
$src = $line->attachment;
$pos = strrpos( $file, '.');
if( $pos == false)
continue;
}
if( $questions != '')
$questions .= ', ';
if( $words != '')
$words .= ', ';
$questions .= '"'.base64_encode( $line->question).'"';
$words .= '"'.base64_encode( $line->answer).'"';
if( $html->type == 'hangmanp'){
$file = $line->id.substr( $file, $pos);
game_export_javame_smartcopyimage( $src, $destdir.'/'.$file, $html->maxpicturewidth, $html->maxpictureheight);
if( $images != '')
$images .= ', ';
$images .= '"'.$file.'"';
}
}
if($game->param7){
$allletters .= '_';
}
if($game->param8){
$allletters .= '-';
}
echo "var questions = new Array($questions);\r";
echo "var words = new Array($words);\r";
if( $html->type == 'hangmanp')
echo "var images = new Array($images);\r";
?>
var to_guess = "";
var display_word = "";
var used_letters = "";
var wrong_guesses = 0;
var used_letters_all = "";
var all_letters = new Array(<?php
$len = textlib::strlen( $allletters);
for( $i=0; $i < $len; $i++)
{
if( $i > 0)
echo ',';
echo '"'.textlib::substr( $allletters, $i, 1).'"';
}
?>);
function selectLetter(l)
{
if (can_play == false)
{
}
if (used_letters.indexOf(l) != -1)
{
return;
}
used_letters_all += l;
if( to_guess.indexOf(l) == -1)
{
used_letters += l;
document.getElementById('usedLetters').innerHTML = used_letters;
}
if (to_guess.indexOf(l) != -1)
{
// correct letter guess
pos = 0;
temp_mask = display_word;
while (to_guess.indexOf(l, pos) != -1)
{
pos = to_guess.indexOf(l, pos);
end = pos + 1;
start_text = temp_mask.substring(0, pos);
end_text = temp_mask.substring(end, temp_mask.length);
temp_mask = start_text + l + end_text;
pos = end;
}
display_word = temp_mask;
document.getElementById('displayWord').innerHTML=display_word;
if (display_word.indexOf("#") == -1)
{
// won
alert( "<?php echo game_get_string_lang( 'win', 'game', $lang); ?>");
can_play = false;
reset();
}
}else
{
wrong_guesses++;
<?php
if( $html->type != 'hangmanp'){
?>eval("document.hm.src=\"hangman_" + wrong_guesses + ".jpg\"");
// incortect letter guess
eval("document.hm.src=\"hangman_" + wrong_guesses + ".jpg\"");
<?php
}
?>
if (wrong_guesses == <?php echo $game->param10 + 1;?>)
{
// lost
alert( "<?php echo strip_tags( game_get_string_lang( 'hangman_loose', 'game', $lang)); ?>");
can_play = false;
reset();
}
}
showallletters();
}
function stripHTML(oldString) {
return oldString.replace(/<&#91;^>&#93;*>/g, "");
}
function reset()
{
selectWord();
document.getElementById('usedLetters').innerHTML = "&nbsp;";
used_letters = "";
used_letters_all = "";
wrong_guesses = 0;
showallletters();
<?php
if( $html->type != 'hangmanp'){
echo ' document.hm.src="hangman_0.jpg"'."\r";
}
?>
}
function showallletters()
{
var letters = "";
var next = all_letters.length / 4;
var letter = "";
for( i=0; i < all_letters.length; i++)
{
if( i > next)
{
next += all_letters.length / 4;
letters += " ";
}
letter = all_letters[ i];
if( used_letters_all.length > 0)
{
if( used_letters_all.indexOf( letter) > -1)
continue;
}
letters = letters + "<a href=\"javascript:selectLetter('" + letter + "');\">" + letter + "</a>"
}
document.getElementById( "letters").innerHTML = letters;
}
function selectWord()
{
can_play = true;
random_number = Math.round(Math.random() * (words.length - 1));
to_guess = Base64.decode( words[random_number]);
to_question = Base64.decode( questions[random_number]);
// display masked word
masked_word = createMask(to_guess);
document.getElementById('displayWord').innerHTML=masked_word;
display_word = masked_word;
<?php
if( $html->type == 'hangmanp')
echo " document.hm.src = images[ random_number];\r";
else
echo " document.getElementById('question').innerHTML=to_question;\r";
?>
}
function createMask(m)
{
mask = "";
word_lenght = m.length;
for (i = 0; i < word_lenght; i ++)
{
mask += "#";
}
return mask;
}
/**
*
* Base64 encode / decode
* http://www.webtoolkit.info/
*
**/
var Base64 = {
// private property
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
// public method for decoding
decode : function (input) {
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
while (i < input.length) {
enc1 = this._keyStr.indexOf(input.charAt(i++));
enc2 = this._keyStr.indexOf(input.charAt(i++));
enc3 = this._keyStr.indexOf(input.charAt(i++));
enc4 = this._keyStr.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1);
if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}
}
output = Base64._utf8_decode(output);
return output;
},
// private method for UTF-8 decoding
_utf8_decode : function (utftext) {
var string = "";
var i = 0;
var c = c1 = c2 = 0;
while ( i < utftext.length ) {
c = utftext.charCodeAt(i);
if (c < 128) {
string += String.fromCharCode(c);
i++;
}
else if((c > 191) && (c < 224)) {
c2 = utftext.charCodeAt(i+1);
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i += 2;
}
else {
c2 = utftext.charCodeAt(i+1);
c3 = utftext.charCodeAt(i+2);
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
}
return string;
}
}
</script>
</head>
<div id="question"></div>
<img src="<?php echo ($html->type == 'hangmanp' ? '' : 'hangman_0.jpg');?>" name="hm"> <a href="javascript:reset();"><?php echo game_get_string_lang( 'html_hangman_new', 'game', $lang); ?></a>
<form name="game">
<div id="displayWord"> </div>
<div id="usedLetters"> </div>
</form>
<div id="letters"></div>
</body>

526
exporthtml_millionaire.php

@ -0,0 +1,526 @@
<?php // $Id: exporthtml_millionaire.php,v 1.14 2012/07/25 11:16:03 bdaloukas Exp $
/**
* This page export the game millionaire to html
*
* @author bdaloukas
* @version $Id: exporthtml_millionaire.php,v 1.14 2012/07/25 11:16:03 bdaloukas Exp $
* @package game
**/
function game_millionaire_html_getquestions( $game, $context, &$maxanswers, &$countofquestions, &$retfeedback, $destdir, &$files)
{
global $CFG, $DB, $USER;
$maxanswers = 0;
$countofquestions = 0;
$files = array();
if( ($game->sourcemodule != 'quiz') and ($game->sourcemodule != 'question')){
print_error( get_string('millionaire_sourcemodule_must_quiz_question', 'game', get_string( 'modulename', 'quiz')).' '.get_string( 'modulename', $game->sourcemodule));
}
if( $game->sourcemodule == 'quiz'){
if( $game->quizid == 0){
print_error( get_string( 'must_select_quiz', 'game'));
}
$select = "qtype='multichoice' AND quiz='$game->quizid' ".
" AND qqi.question=q.id";
$table = "{question} q,{quiz_question_instances} qqi";
}else
{
if( $game->questioncategoryid == 0){
print_error( get_string( 'must_select_questioncategory', 'game'));
}
//include subcategories
$select = 'category='.$game->questioncategoryid;
if( $game->subcategories){
$cats = question_categorylist( $game->questioncategoryid);
if( strpos( $cats, ',') > 0){
$select = 'category in ('.$cats.')';
}
}
$select .= " AND qtype='multichoice'";
$table = "{question} q";
}
$select .= " AND q.hidden=0";
$sql = "SELECT q.id as id, q.questiontext FROM $table WHERE $select";
$recs = $DB->get_records_sql( $sql);
$ret = '';
$retfeedback = '';
foreach( $recs as $rec){
$recs2 = $DB->get_records( 'question_answers', array( 'question' => $rec->id), 'fraction DESC', 'id,answer,feedback');
//Must parse the questiontext and get the name of files.
$line = $rec->questiontext;
$line = game_export_split_files( $game->course, $context, 'questiontext', $rec->id, $rec->questiontext, $destdir, $files);
$linefeedback = '';
foreach( $recs2 as $rec2)
{
$line .= '#'.str_replace( array( '"', '#'), array( "'", ' '), game_export_split_files( $game->course, $context, 'answer', $rec2->id, $rec2->answer, $destdir, $files));
$linefeedback .= '#'.str_replace( array( '"', '#'), array( "'", ' '), $rec2->feedback);
}
if( $ret != '')
$ret .= ",\r";
$ret .= '"'.base64_encode( $line).'"';
if( $retfeedback != '')
$retfeedback .= ",\r";
$retfeedback .= '"'.base64_encode( $linefeedback).'"';
if( count( $recs2) > $maxanswers)
$maxanswers = count( $recs2);
$countofquestions++;
}
return $ret;
}
function game_millionaire_html_print( $game, $questions, $maxquestions)
{
$color1 = 'black';
$color2 = 'DarkOrange';
$colorback="white";
$stylequestion = "background:$colorback;color:$color1";
$stylequestionselected = "background:$colorback;color:$color2";
?>
<body onload="Reset();">
<script type="text/javascript">
//Millionaire for Moodle by Vasilis Daloukas
<?php echo 'var questions = new Array('.$questions.");\r"; ?>
var current_question = 0;
var level = 0;
var posCorrect = 0;
var infoCorrect = "";
var flag5050 = 0;
var flagTelephone = 0;
var flagPeople = 0;
var countQuestions = 0;
var maxQuestions = <?php echo $maxquestions;?>;
function Highlite( ans)
{
document.getElementById( "btAnswer" + ans).style.backgroundColor = '<?php echo $color2;?>';
}
function Restore( ans)
{
document.getElementById( "btAnswer" + ans).style.backgroundColor = '<?php echo $colorback;?>';
}
function OnSelectAnswer( ans)
{
if( posCorrect == ans)
{
if( level+1 > 15)
{
alert( "<?php echo get_string( 'win', 'game');?>");
Reset();
}else
{
UpdateLevel( level+1);
SelectNextQuestion();
}
}else
{
OnGameOver( ans);
}
}
function OnGameOver( ans)
{
document.getElementById( "info").innerHTML = "<?php echo get_string( 'millionaire_info_wrong_answer', 'game');?> "+document.getElementById( "lblAnswer" + posCorrect).innerHTML;
Highlite( posCorrect);
Restore( ans);
document.getElementById( "lblAnswer" + posCorrect).style.backgroundColor = '<?php echo $color2;?>';
alert( "<?php echo strip_tags( get_string( 'hangman_loose', 'game')); ?>");
Restore( posCorrect);
document.getElementById( "lblAnswer" + posCorrect).style.backgroundColor = '<?php echo $colorback;?>';
Reset();
}
function UpdateLevel( newlevel)
{
if( level > 0)
{
document.getElementById( "levela" + level).bgColor = "<?php echo $colorback;?>";
document.getElementById( "levelb" + level).bgColor = "<?php echo $colorback;?>";
document.getElementById( "levelc" + level).bgColor = "<?php echo $colorback;?>";
document.getElementById( "levela" + level).style.color = "<?php echo $color1;?>";
document.getElementById( "levelb" + level).style.color = "<?php echo $color1;?>";
document.getElementById( "levelc" + level).style.color = "<?php echo $color1;?>";
}
level = newlevel;
document.getElementById( "levela" + level).bgColor = "<?php echo $color2;?>";
document.getElementById( "levelb" + level).bgColor = "<?php echo $color2;?>";
document.getElementById( "levelc" + level).bgColor = "<?php echo $color2;?>";
document.getElementById( "levela" + level).style.color = "<?php echo $colorback;?>";
document.getElementById( "levelb" + level).style.color = "<?php echo $colorback;?>";
document.getElementById( "levelc" + level).style.color = "<?php echo $colorback;?>";
}
function OnHelp5050( ans)
{
if( flag5050)
return;
document.getElementById( "Help5050").src = "5050x.gif";
flag5050 = 1;
for(pos = posCorrect;pos == posCorrect;pos = 1+Math.floor(Math.random()*countQuestions));
for( i=1; i <= countQuestions; i++)
{
if( (i != pos) && (i != posCorrect))
{
document.getElementById( "lblAnswer" + i).style.visibility = 'hidden';
document.getElementById( "btAnswer" + i).style.visibility = 'hidden';
}
}
}
function OnHelpTelephone( ans)
{
if( flagTelephone)
return;
flagTelephone = 1;
document.getElementById( "HelpTelephone").src = "telephonex.gif";
if( countQuestions < 2){
wrong = posCorrect;
}else
{
for(;;)
{
wrong = 1+Math.floor(Math.random()*countQuestions);
if( wrong != posCorrect)
break;
}
}
//with 80% gives the correct answer
if( Math.random() <= 0.8)
pos = posCorrect;
else
pos = wrong;
info = "<?php echo get_string( 'millionaire_info_telephone','game').'<br><b>';?> ";
info += document.getElementById( "lblAnswer" + pos).innerHTML;
document.getElementById( "info").innerHTML = info;
}
function OnHelpPeople( ans)
{
if( flagPeople)
return;
flagPeople = 1;
document.getElementById( "HelpPeople").src = "peoplex.gif";
sum = 0;
var aPercent = new Array();
for( i = 0; i < countQuestions-1; i++)
{
percent = Math.floor(Math.random()*(100-sum));
aPercent[ i] = percent;
sum += percent;
}
aPercent[ countQuestions - 1] = 100 - sum;
if( Math.random() <= 0.8)
{
//with percent 80% sets in the correct answer the biggest percent
max_pos = 0;
for( i=1; i < countQuestions; i++)
{
if( aPercent[ i] >= aPercent[ max_pos])
max_pos = i;
}
temp = aPercent[ max_pos];
aPercent[ max_pos] = aPercent[ posCorrect-1];
aPercent[ posCorrect-1] = temp;
}
var letters = "<?php echo get_string( 'lettersall', 'game');?>";
info = "<?php echo '<br>'.get_string( 'millionaire_info_people', 'game').':<br>';?>";
for( i=0; i < countQuestions; i++){
info += "<br>" + letters.charAt( i) + " : " + aPercent[ i] + " %";
}
document.getElementById( "info").innerHTML = info;
}
function OnQuit( ans)
{
Reset();
}
function Reset()
{
for(i=1; i <= 15; i++)
{
document.getElementById( "levela" + i).bgColor = "<?php echo $colorback;?>";
document.getElementById( "levelb" + i).bgColor = "<?php echo $colorback;?>";
document.getElementById( "levelc" + i).bgColor = "<?php echo $colorback;?>";
document.getElementById( "levela" + i).style.color = "<?php echo $color1;?>";
document.getElementById( "levelb" + i).style.color = "<?php echo $color1;?>";
document.getElementById( "levelc" + i).style.color = "<?php echo $color1;?>";
}
flag5050 = 0;
flagTelephone = 0;
flagPeople = 0;
document.getElementById( "Help5050").src = "5050.gif";
document.getElementById( "HelpPeople").src = "people.gif";
document.getElementById( "HelpTelephone").src = "telephone.gif";
document.getElementById( "info").innerHTML = "";
UpdateLevel( 1);
SelectNextQuestion();
}
function RandomizeAnswers( elements)
{
posCorrect = 1;
countQuestions = elements.length-1;
for( i=1; i <= countQuestions; i++)
{
pos = 1+Math.floor(Math.random()*countQuestions);
if( posCorrect == i)
posCorrect = pos;
else if( posCorrect == pos)
posCorrect = i;
var temp = elements[ i];
elements[ i] = elements[ pos];
elements[ pos] = temp;
}
}
function SelectNextQuestion()
{
current_question = Math.floor(Math.random()*questions.length);
question = Base64.decode( questions[ current_question]);
var elements = new Array();
elements = question.split('#');
RandomizeAnswers( elements);
document.getElementById( "question").innerHTML = elements[ 0];
for( i=1; i < elements.length; i++)
{
document.getElementById( "lblAnswer" + i).innerHTML = elements[ i];
document.getElementById( "lblAnswer" + i).style.visibility = 'visible';
document.getElementById( "btAnswer" + i).style.visibility = 'visible';
}
for( i=elements.length; i<= maxQuestions; i++)
{
document.getElementById( "lblAnswer" + i).style.visibility = 'hidden';
document.getElementById( "btAnswer" + i).style.visibility = 'hidden';
}
document.getElementById( "info").innerHTML = "";
}
/**
*
* Base64 encode / decode
* http://www.webtoolkit.info/
*
**/
var Base64 = {
// private property
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
// public method for decoding
decode : function (input) {
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
while (i < input.length) {
enc1 = this._keyStr.indexOf(input.charAt(i++));
enc2 = this._keyStr.indexOf(input.charAt(i++));
enc3 = this._keyStr.indexOf(input.charAt(i++));
enc4 = this._keyStr.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1);
if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}
}
output = Base64._utf8_decode(output);
return output;
},
// private method for UTF-8 decoding
_utf8_decode : function (utftext) {
var string = "";
var i = 0;
var c = c1 = c2 = 0;
while ( i < utftext.length ) {
c = utftext.charCodeAt(i);
if (c < 128) {
string += String.fromCharCode(c);
i++;
}
else if((c > 191) && (c < 224)) {
c2 = utftext.charCodeAt(i+1);
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i += 2;
}
else {
c2 = utftext.charCodeAt(i+1);
c3 = utftext.charCodeAt(i+2);
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
}
return string;
}
}
</script>
<table cellpadding=0 cellspacing=0 border=0>
<tr style='background:#408080'>
<td rowspan=<?php echo 17+$maxquestions;?>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td colspan=6>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td rowspan=<?php echo 17+$maxquestions;?>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
</tr>
<tr height=10%>
<td style='background:#408080' rowspan=3 colspan=2>
<input type="image" name="Help5050" id="Help5050" Title="50 50" src="5050.gif" alt="" border="0" onmousedown=OnHelp5050();>&nbsp;
<input type="image" name="HelpTelephone" id="HelpTelephone" Title="<?php echo get_string( 'millionaire_telephone', 'game');?>" src="telephone.gif" alt="" border="0" onmousedown="OnHelpTelephone();">&nbsp;
<input type="image" name="HelpPeople" id="HelpPeople" Title="<?php echo get_string( 'millionaire_helppeople', 'game');?>" src="people.gif" alt="" border="0" onmousedown="OnHelpPeople();">&nbsp;
<input type="image" name="Quit" id="Quit" Title="<?php echo get_string( 'millionaire_quit', 'game');?>" src="x.gif" alt="" border="0" onmousedown=OnQuit();>&nbsp;
</td>
<td rowspan=<?php echo 16+$maxquestions;?> style='background:#408080'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td id="levela15" align=right>15</td>
<td id="levelb15">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td id="levelc15" align=right> 150000</td>
</tr>
<tr><td id="levela14" align=right>14</td>
<td id="levelb14"></td><td id="levelc14" align=right> 800000</td>
</tr>
<tr><td id="levela13" align=right>13</td>
<td id="levelb13"></td><td id="levelc13" align=right> 400000</td>
</tr>
<tr><td rowspan=12 colspan=2 valign=top style='background:<?php echo $colorback;?>;color:<?php echo $color1;?>'><div id="question">aa</div></td>
<td id="levela12" align=r0ight>12</div></td>
<td id="levelb12"></td><td id="levelc12" align=right> 200000</td>
</tr>
<tr><td id="levela11" align=right>11</td>
<td id="levelb11"></td><td id="levelc11" align=right> 10000</td>
</tr>
<tr><td id="levela10" align=right>10</td>
<td id="levelb10"></td><td id="levelc10" align=right> 5000</td>
</tr>
<tr><td id="levela9" align=right>9</td>
<td id="levelb9"></td><td id="levelc9" align=right> 4000</td>
</tr>
<tr><td id="levela8" align=right>8</td>
<td id="levelb8"></td><td id="levelc8" align=right> 2000</td>
</tr>
<tr><td id="levela7" align=right>7</td>
<td id="levelb7"></td><td id="levelc7" align=right> 1500</td>
</tr>
<tr><td id="levela6" align=right>6</td>
<td id="levelb6"></td><td id="levelc6" align=right> 1000</td>
</tr>
<tr><td id="levela5" align=right>5</td>
<td id="levelb5"></td><td id="levelc5" align=right> 500</td>
</tr>
<tr><td id="levela4" align=right>4</td>
<td id="levelb4"></td><td id="levelc4" align=right> 400</td>
</tr>
<tr><td id="levela3" align=right>3</td>
<td id="levelb3"></td><td id="levelc3" align=right> 300</td>
</tr>
<tr><td id="levela2" align=right>2</td>
<td id="levelb2"></td><td id="levelc2" align=right> 200</td>
</tr>
<tr><td id="levela1" align=right>1</td>
<td id="levelb1"></td><td id="levelc1" align=right> 100</td>
</tr>
<tr style='background:#408080'><td colspan=10>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
</tr>
<?php
$letters = get_string( 'lettersall', 'game');
for($i=1 ; $i <= $maxquestions; $i++)
{
$s = textlib::substr( $letters, $i-1, 1);
echo "<tr>\n";
echo "<td style='background:$colorback;color:$color1'>";
echo "<input style=\"background:$colorback;color:$color1;\" type=\"submit\" name=\"btAnswer$i\" value=\"$s\" id=\"btAnswer$i\"";
echo " onmouseover=\"Highlite( $i);\" onmouseout=\"Restore( $i);\" onmousedown=\"OnSelectAnswer( $i);\">";
echo "</td>\n";
echo "<td style=\"background:$colorback;color:$color1;\" width=100%> &nbsp; <span id=lblAnswer$i style=\"background:$colorback;color:$color1\" onmouseover=\"Highlite($i);\r \n\" onmouseout=\"Restore( $i);\" onmousedown=\"OnSelectAnswer( $i);\"></span></td>\n";
if( $i == 1)
{
echo "<td style='background:#408080' rowspan=".$maxquestions." colspan=3><div id=\"info\"></div></td>\n";
}
echo "</tr>\n";
}
?>
<tr><td colspan=10 style='background:#408080'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
</table>
</body>
</html>
<?php
}

502
exporthtml_snakes.php

@ -0,0 +1,502 @@
<?php // $Id: exporthtml_snakes.php,v 1.4 2011/07/23 12:34:08 bdaloukas Exp $
/**
* This page export the game snakes to html
*
* @author bdaloukas
* @version $Id: exporthtml_snakes.php,v 1.4 2011/07/23 12:34:08 bdaloukas Exp $
* @package game
**/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $html->title;?></title>
<link href="css/game.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/subModal.css" />
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/subModal.js"></script>
<style type="text/css">
#pawn
{
position:absolute;
}
img
{
border:hidden
}
body
{
background: #999 url('images/backdropJungle.png') no-repeat fixed left top;
}
.score
{color: #FC3;
font-size: 40px;
}
</style>
</head>
<body>
<script language="JavaScript">
//Snakes for Moodle by Maria Rigkou
var boards = 1;
var board_images = new Array( boards);
var board_names = new Array( boards);
var pawn_width = new Array(boards);
var pawn_height = new Array(boards);
var board_cols = new Array(boards);
var board_rows = new Array(boards);
var board_contents = new Array (boards);
var board_headerx = new Array(boards);
var board_headery = new Array(boards);
var board_footerx = new Array(boards);
var board_footery = new Array(boards);
var board_width = new Array(boards);
var board_height = new Array(boards);
var board_data = new Array(boards);
var pawn_width = new Array(boards);
var pawn_height = new Array(boards);
var current_board = 0;
var current_position=0;
var current_quest = 0;
var mchoice_count = 0;
var mchoice_positions =new Array( 1);
var quest_text = ""; //Question
var quest_resp = ""; // Answer
var quest_feedb = ""; // feedback
var quest_total = 25; // Count of questions
board_names[ 0] = "<?php echo $game->name; ?>";
board_images[ 0] = '<?php echo $board->fileboard; ?>';
board_cols [0] = <?php echo $board->cols; ?>;
board_rows [0] = <?php echo $board->rows; ?>;
board_contents [0] = '<?php echo $board->data; ?>';
board_headerx [0] = <?php echo $board->headerx; ?>;
board_headery [0] = <?php echo $board->headery; ?>;
board_footerx [0] = <?php echo $board->footerx; ?>;
board_footery [0] = <?php echo $board->footery; ?>;
board_width [0] = <?php echo $board->width; ?>;
board_height [0] = <?php echo $board->height; ?>;
pawn_width [0] = 40;
pawn_height [0]= 40;
<?php
echo "var countofquestionsM=$countofquestionsM;\r\n";
echo 'var countofquestionsS='.count($questionsS).";\r\n";
foreach( $questionsS as $line)
{
$s = $line->question.'#'.str_replace( array( '"', '#'), array( "'", ' '), $line->answer);
if( $questionsM != '')
$questionsM .= ",\r";
$questionsM .= '"'.base64_encode( game_upper( $s)).'"';
$s = '#'.str_replace( array( '"', '#'), array( "'", ' '), $line->feedback);
if( $retfeedback != '')
$retfeedback .= ",\r";
$retfeedback .= '"'.base64_encode( $s).'"';
}
$rettimesasked = '';
for($i=0;$i<$countofquestionsM+count($questionsS);$i++)
$rettimesasked .= ',0';
$rettimesasked = substr( $rettimesasked, 1);
echo "var questions=new Array( $questionsM);\r\n";
echo "var feedbacks=new Array( $retfeedback);\r\n";
echo "var quest_times_asked=new Array( $rettimesasked);//How many times is used a question\r\n";
?>
var current_dice=0;
var feedb_correct_S = "<?php print_string( 'html_snakes_correct', 'game'); ?>";
var feedb_wrong_S = "<?php print_string( 'html_snakes_wrong', 'game'); ?>";
var str_score = "<?php print_string( 'score', 'game'); ?>";
var str_check = "<?php print_string( 'html_snakes_check', 'game'); ?>";
var str_no_selection = "<?php print_string( 'html_snakes_no_selection', 'game'); ?>";
var correct_ans = 0; //counter of correct answers
var all_ans = 0; //counter of all answers
var score = 0;
ShowMainForm();
display_quest();
function ShowMainForm()
{
var pawn_x =0;
var pawn_y=0;
var direction=0;
var cols = board_cols[current_board];
var rows = board_rows[current_board];
var col_width = (board_width[current_board]-board_headerx[current_board]-board_footerx[current_board])/cols;
var col_height = (board_height[current_board]-board_headery[current_board]-board_footery[current_board])/rows;
document.write('<img id="boardimage" src="images/meter.png">');
document.getElementById("boardimage").src = "images/" + board_images[ current_board];
document.write('<div id="dicecont">&nbsp;</div>');
if( current_position >= 0)
{
direction=Math.floor((current_position /cols))%2;
if (direction==1)
axis_x=(cols-(current_position %cols)-1);
else
axis_x=current_position %cols;
axis_y=Math.floor((current_position /rows));
pawn_x=board_headerx[current_board]+(axis_x*col_width)+(col_width-pawn_width[current_board])/2;
pawn_y=board_footery[current_board]+pawn_height[current_board]+(axis_y*col_height)+(col_height-pawn_height[current_board])/2;
document.write('<div id="pawn1"><img id="pawn" alt="" src="images/player1.png"></div>');
move_pawn();
}
}
function selectBoard()
{
current_board = document.getElementById("boardtype").value;
document.getElementById("boardimage").src = "images/" + board_images[ current_board];
}
function select_quest()
{
var quest_total = countofquestionsM + countofquestionsS;
var quest_candidates= new Array();
var i, q;
for (i=0;i<3;i++) {
quest_candidates[i]=Math.floor((Math.random() * quest_total));
}
current_quest = quest_candidates[0];
for (i=1;i<3;i++) {
if (quest_times_asked[quest_candidates[i]]>quest_times_asked[current_quest])
current_quest=quest_candidates[i];
}
q=Base64decode( questions[ current_quest]);
quest_resp = decode_multiple_choice( q);
quest_text = quest_resp[ 0];
quest_feedb = Base64decode( feedbacks[ current_quest]);
}
function IsMultipleChoiceQuestion()
{
return (current_quest < countofquestionsM);
}
function check_answer()
{
all_ans=all_ans+1;
if( IsMultipleChoiceQuestion())
check_answer_M();
else
check_answer_S();
move_pawn();
}
function check_answer_M()
{
document.getElementById("check_btn").style.display = "none";
var useranswer;
var n=document.snakesform.radio_answer.length;
for(useranswer=0;useranswer < n;useranswer++)
{
if( document.snakesform.radio_answer[ useranswer].checked)
break;
}
if( useranswer >= n)
{
alert( str_no_selection);
document.getElementById("feedb").innerHTML= "";
document.getElementById("check_btn").style.display = "block";
return;
}
var feedbacks = decode_multiple_choice(quest_feedb);
var j;
for (j=0;j<n;j++) {
document.snakesform.radio_answer[ j].disabled = "true";
}
document.getElementById("feedb").innerHTML= feedbacks[ mchoice_positions[useranswer]];
document.getElementById("feedb").style.display = "block";
if ( mchoice_positions[ useranswer] == 1)
{
current_position += current_dice;
correct_ans =correct_ans+1; //calculate new score----
score = Math.round((correct_ans/all_ans)*100);
document.getElementById("show_score").innerHTML='<strong>'+str_score+': </strong><strong class="score">' +score+ '</strong>';
check_game_over();
check_exists_ladder();
}
else
{
score = Math.round((correct_ans/all_ans)*100);
document.getElementById("show_score").innerHTML='<strong>'+str_score+': </strong><strong class="score">' +score+ '</strong>';
check_exists_snake();
}
document.getElementById("OK_btn").style.display = "block";
}
function check_answer_S()
{
document.getElementById("answer").disabled = "true";
document.getElementById("check_btn").style.display = "none";
if (document.getElementById("answer").value.toUpperCase() == quest_resp[ 1].toUpperCase())
{
document.getElementById("feedb").style.display = "block";
current_position += current_dice;
correct_ans =correct_ans+1; //calculate new score
score = Math.round((correct_ans/all_ans)*100);
document.getElementById("show_score").innerHTML='<strong>'+str_score+': </strong><strong class="score">' +score+ '</strong>';
check_game_over();
check_exists_ladder();
}
else
{
document.getElementById("feedb_wrong").style.display = "block";
score = Math.round((correct_ans/all_ans)*100);
document.getElementById("show_score").innerHTML='<strong>'+str_score+': </strong><strong class="score">' +score+ '</strong>';
check_exists_snake();
}
document.getElementById("OK_btn").style.display = "block";
}
function check_game_over()
{
var out=(board_cols[current_board]*board_rows[current_board]);
if (current_position > out-1)
{
current_position=out-1;
showPopWin('modalContent.html', 350, 220, returnRefresh); // modal
}
}
function check_exists_ladder()
{
var find = "L" + (current_position+1) + "-";
var pos = board_contents[ current_board].indexOf( find);
if( pos < 0)
return;
var s = board_contents[ current_board].substr( pos+find.length)
pos = s.indexOf( ',');
if( pos >= 0)
s = s.substr( 0, pos);
current_position = s-1;
}
function check_exists_snake()
{
var find = "-" + (current_position+1) + ",";
var s= ',' +board_contents[ current_board] + ',';
for(;;)
{
var pos = s.indexOf( find);
if( pos < 0)
return;
var pos_start = s.lastIndexOf( ',', pos-1);
var kind = s.substr( pos_start+1, 1);
if( kind != "S")
{
s = s.substr( pos+1);
continue;
}
s = s.substr( pos_start+2);
pos = s.indexOf( '-');
current_position = s.substr( 0, pos)-1;
break;
}
}
function decode_multiple_choice(s)
{
var ret = new Array();
var i=0;
for(;;)
{
var pos=s.indexOf( '#');
if( pos < 0)
{
ret[ i++] = s;
return ret;
}
ret[ i++] = s.substr( 0, pos);
s = s.substr( pos+1);
}
}
function display_quest()
{
current_dice = Math.floor((Math.random() * 6)) + 1;
select_quest();
if( IsMultipleChoiceQuestion())
display_quest_M();
else
display_quest_S();
}
function display_quest_M()
{
s = '<table width="250px"><tr><td><div id="show_dice"> <img src = "images/dice' + current_dice + '.png"> </div> </td><td align=right><div id="show_score" style="color: #FFFFFF; font-weight:bold; font-size: 20px;"><strong>'+str_score+': </strong><strong class="score">' +score+ '</strong></div></td></tr></table>';
s = s + '<div id="question_area">' + quest_text+'</div>';
s = s + '<form name="snakesform">';
mchoice_count = quest_resp.length-1;
mchoice_positions = new Array( mchoice_count);
for(i=0; i < mchoice_count ; i++)
mchoice_positions[ i] = i+1;
for(i=0; i < mchoice_count ; i++)
{
var j = Math.floor((Math.random() * mchoice_count));
var temp = mchoice_positions[ i];
mchoice_positions[ i] = mchoice_positions[ j];
mchoice_positions[ j] = temp;
}
for(i=0; i < mchoice_count;i++)
s = s + '<input type="radio" name="radio_answer" id="radio_answer" value="'+i+'" />'+quest_resp[ mchoice_positions[ i]] + '<br />';
s = s + '<br /><input type="button" id="check_btn" value="'+str_check+'" onclick="check_answer();"> <br /> <div id="feedb_area"> <div id="feedb_wrong" style="display:none; color:yellow;"> '+quest_feedb+' </div> <br /><div id="feedb" style="display:none; color:yellow;"> '+quest_feedb+'. Θα προχωρήσεις '+current_dice+' τετράγωνα μπροστά!</div><br /> <div id="OK_btn" style="display:none;"><input type="button" onclick="display_quest();" value="OK"/></div> </div></form>';
document.getElementById("dicecont").innerHTML = s;
document.getElementById("question_area").style.display = "block";
document.getElementById("check_btn").style.display = "block";
}
function display_quest_S()
{
document.getElementById("dicecont").innerHTML = '<table width="250px"><tr><td><div id="show_dice"> <img src = "images/dice' + current_dice + '.png"> </div> </td><td align=right><div id="show_score" style="color: #FFFFFF; font-weight:bold; font-size: 20px;"><strong>'+str_score+': </strong><strong class="score">' +score+ '</strong></div></td></tr></table><div id="question_area">' +quest_text+'</div> <br /><input type="text" id="answer"/><br /><br /> <input type="button" id="check_btn" value="'+str_check+'" onclick="check_answer();"> <br /> <div id="feedb_area"> <div id="feedb_wrong" style="display:none; color:yellow;"> '+feedb_wrong_S+' </div> <div id="feedb" style="display:none; color:yellow;"> '+feedb_correct_S+'</div> <br /><div id="OK_btn" style="display:none;"><input type="button" onclick="display_quest();" value="OK"/></div> </div>';
document.getElementById("question_area").style.display = "block";
document.getElementById("check_btn").style.display = "block";
}
function move_pawn()
{
var pawn_x =0;
var pawn_y=0;
var direction=0;
var cols = board_cols[current_board];
var rows = board_rows[current_board];
var col_width = (board_width[current_board]-board_headerx[current_board]-board_footerx[current_board])/cols;
var col_height = (board_height[current_board]-board_headery[current_board]-board_footery[current_board])/rows;
if( current_position >= 0)
{
direction=Math.floor((current_position /cols))%2;
if (direction == 1) {
axis_x=(cols-(current_position %cols)-1);
}else
axis_x=current_position %cols;
axis_y=Math.floor((current_position /rows));
pawn_x=board_headerx[current_board]+(axis_x*col_width)+(col_width-pawn_width[current_board])/2;
pawn_y=board_footery[current_board]+pawn_height[current_board]+(axis_y*col_height)+(col_height-pawn_height[current_board])/2;
document.getElementById("pawn1").style.position='relative';
document.getElementById("pawn1").style.left=pawn_x+'px';
document.getElementById("pawn1").style.bottom=pawn_y+'px';
}
}
function Base64decode(input) {
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
while (i < input.length) {
enc1 = keyStr.indexOf(input.charAt(i++));
enc2 = keyStr.indexOf(input.charAt(i++));
enc3 = keyStr.indexOf(input.charAt(i++));
enc4 = keyStr.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1);
if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}
}
output = Base64_utf8_decode(output);
return output;
};
// private method for UTF-8 decoding
function Base64_utf8_decode(utftext) {
var string = "";
var i = 0;
var c = c1 = c2 = 0;
while ( i < utftext.length ) {
c = utftext.charCodeAt(i);
if (c < 128) {
string += String.fromCharCode(c);
i++;
}
else if((c > 191) && (c < 224)) {
c2 = utftext.charCodeAt(i+1);
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i += 2;
}
else {
c2 = utftext.charCodeAt(i+1);
c3 = utftext.charCodeAt(i+2);
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
}
return string;
}
</script>
</body>
</html>

391
exportjavame.php

@ -0,0 +1,391 @@
<?php // $Id: exportjavame.php,v 1.18 2012/07/25 11:16:03 bdaloukas Exp $
/**
* This page export the game to javame for mobile phones
*
* @author bdaloukas
* @version $Id: exportjavame.php,v 1.18 2012/07/25 11:16:03 bdaloukas Exp $
* @package game
**/
function game_OnExportJavaME( $game, $javame){
global $CFG, $DB;
$courseid = $game->course;
$course = $DB->get_record( 'course', array( 'id' => $courseid));
$destdir = game_export_createtempdir();
if( $javame->type == 'hangmanp'){
$destmobiledir = 'hangmanp';
}else{
$destmobiledir = 'hangman';
}
$src = $CFG->dirroot.'/mod/game/export/javame/'.$destmobiledir.'/simple';
if( $javame->filename == ''){
$javame->filename = 'moodle'.$destmobiledir;
}
$handle = opendir( $src);
while (false!==($item = readdir($handle))) {
if($item != '.' && $item != '..') {
if(!is_dir($src.'/'.$item)) {
$itemdest = $item;
if( substr( $item, -5) == '.java'){
continue; //don't copy the java source code files
}
if( substr( $itemdest, -8) == '-1.class'){
$itemdest = substr( $itemdest, 0, -8).'$1.class';
}
copy( $src.'/'.$item, $destdir.'/'.$itemdest);
}
}
}
mkdir( $destdir.'/META-INF');
game_exportjavame_exportdata( $src, $destmobiledir, $destdir, $game, $javame->maxpicturewidth, $javame->maxpictureheight);
game_create_manifest_mf( $destdir.'/META-INF', $javame, $destmobiledir);
$filejar = game_create_jar( $destdir, $course, $javame);
if( $filejar == ''){
$filezip = game_create_zip( $destdir, $course->id, $javame->filename.'.zip');
}else{
$filezip = '';
}
if( $destdir != ''){
remove_dir( $destdir);
}
if( $filezip != ''){
echo "unzip the $filezip in a directory and when you are in this directory use the command <br><b>jar cvfm {$javame->filename}.jar META-INF/MANIFEST.MF<br></b> to produce the jar files<br><br>";
}
$file = ($filejar != '' ? $filejar : $filezip);
game_send_stored_file( $file);
}
function game_exportjavame_exportdata( $src, $destmobiledir, $destdir, $game, $maxwidth, $maxheight){
global $CFG;
mkdir( $destdir.'/'.$destmobiledir);
$handle = opendir( $src);
while (false!==($item = readdir($handle))) {
if($item != '.' && $item != '..') {
if(!is_dir($src.'/'.$item)) {
if( substr( $item, -4) == '.jpg'){
copy( $src.'/'.$item, $destdir."/$destmobiledir/".$item);
}
}
}
}
$lang = $game->language;
if( $lang == '')
$lang = current_language();
copy( $src. '/lang/'.$lang.'/language.txt', $destdir."/$destmobiledir/language.txt");
$export_attachment = ( $destmobiledir == 'hangmanp');
$map = game_exmportjavame_getanswers( $game, $export_attachment, false, $destdir, $files);
if( $map == false){
print_error( 'No Questions');
}
if( $destmobiledir == 'hangmanp'){
game_exportjavame_exportdata_hangmanp( $src, $destmobiledir, $destdir, $game, $map, $maxwidth, $maxheight);
return;
}
$fp = fopen( $destdir."/$destmobiledir/hangman.txt","w");
fputs( $fp, "1.txt=$destmobiledir\r\n");
fclose( $fp);
$fp = fopen( $destdir."/$destmobiledir/1.txt","w");
foreach( $map as $line){
$s = game_upper( $line->answer) . '=' . $line->question;
fputs( $fp, "$s\r\n");
}
fclose( $fp);
}
function game_exportjavame_exportdata_hangmanp( $src, $destmobiledir, $destdir, $game, $map, $maxwidth, $maxheight)
{
global $CFG;
$fp = fopen( $destdir."/$destmobiledir/$destmobiledir.txt","w");
fputs( $fp, "01=01\r\n");
fclose( $fp);
$destdirphoto = $destdir.'/'.$destmobiledir.'/01';
mkdir( $destdirphoto);
$fp = fopen( $destdirphoto.'/photo.txt',"w");
foreach( $map as $line){
$file = $line->attachment;
$pos = strrpos( $file, '.');
if( $pos != false){
$file = $line->id.substr( $file, $pos);
$src = $CFG->dataroot.'/'.$game->course.'/moddata/'.$line->attachment;
game_export_javame_smartcopyimage( $src, $destdirphoto.'/'.$file, $maxwidth, $maxheight);
$s = $file . '=' . game_upper( $line->answer);
fputs( $fp, "$s\r\n");
}
}
fclose( $fp);
}
function game_exmportjavame_getanswers( $game, $context, $export_attachment, $dest, &$files){
$map = array();
$files = array();
switch( $game->sourcemodule){
case 'question':
return game_exmportjavame_getanswers_question( $game, $context, $dest, $files);
case 'glossary':
return game_exmportjavame_getanswers_glossary( $game, $context, $export_attachment, $dest, $files);
case 'quiz':
return game_exmportjavame_getanswers_quiz( $game, $context, $dest, $files);
}
return false;
}
function game_exmportjavame_getanswers_question( $game, $context, $destdir, &$files){
$select = 'hidden = 0 AND category='.$game->questioncategoryid;
$select .= game_showanswers_appendselect( $game);
return game_exmportjavame_getanswers_question_select( $game, $context, 'question', $select, '*', $game->course, $destdir, $files);
}
function game_exmportjavame_getanswers_quiz( $game, $context, $destdir, $files)
{
global $CFG;
$select = "quiz='$game->quizid' ".
" AND qqi.question=q.id".
" AND q.hidden=0".
game_showanswers_appendselect( $game);
$table = "{question} q,{quiz_question_instances} qqi";
return game_exmportjavame_getanswers_question_select( $game, $context, $table, $select, "q.*", $game->course, $destdir, $files);
}
function game_exmportjavame_getanswers_question_select( $game, $context, $table, $select, $fields, $courseid, $destdir, &$files)
{
global $CFG, $DB;
if( ($questions = $DB->get_records_select( $table, $select, null, '', $fields)) === false){
return;
}
$line = 0;
$map = array();
foreach( $questions as $question){
unset( $ret);
$ret->qtype = $question->qtype;
$ret->question = $question->questiontext;
$ret->question = str_replace( array( '"', '#'), array( "'", ' '),
game_export_split_files( $game->course, $context, 'questiontext', $question->id, $ret->question, $destdir, $files));
switch( $question->qtype){
case 'shortanswer':
$rec = $DB->get_record( 'question_answers', array( 'question' => $question->id), 'id,answer,feedback');
$ret->answer = $rec->answer;
$ret->feedback = $rec->feedback;
$map[] = $ret;
break;
default:
break;
}
}
return $map;
}
function game_exmportjavame_getanswers_glossary( $game, $context, $export_attachment, $destdir, &$files)
{
global $CFG, $DB;
$table = '{glossary_entries} ge';
$select = "glossaryid={$game->glossaryid}";
if( $game->glossarycategoryid){
$select .= " AND gec.entryid = ge.id ".
" AND gec.categoryid = {$game->glossarycategoryid}";
$table .= ",{glossary_entries_categories} gec";
}
if( $export_attachment){
$select .= " AND attachment <> ''";
}
$fields = 'ge.id,definition,concept';
if( $export_attachment){
$fields .= ',attachment';
}
$sql = "SELECT $fields FROM $table WHERE $select ORDER BY definition";
if( ($questions = $DB->get_records_sql( $sql)) === false){
return false;
}
$fs = get_file_storage();
$map = array();
$cmglossary = false;
foreach( $questions as $question){
$ret = new stdClass();
$ret->id = $question->id;
$ret->qtype = 'shortanswer';
$ret->question = strip_tags( $question->definition);
$ret->answer = $question->concept;
$ret->feedback = '';
$ret->attachment = '';
//Copies the appropriate files from the file storage to destdir
if( $export_attachment){
if( $question->attachment != ''){
if( $cmglossary === false)
{
$cmglossary = get_coursemodule_from_instance('glossary', $game->glossaryid, $game->course);
$contextglossary = get_context_instance(CONTEXT_MODULE, $cmglossary->id);
}
$ret->attachment = "glossary/{$game->glossaryid}/$question->id/$question->attachment";
$myfiles = $fs->get_area_files( $contextglossary->id, 'mod_glossary', 'attachment', $ret->id);
$i=0;
foreach ($myfiles as $f) {
if( $f->is_directory())
continue;
$filename = $f->get_filename();
$url = "{$CFG->wwwroot}/pluginfile.php/{$f->get_contextid()}/mod_glossary/attachment}";
$fileurl = $url.$f->get_filepath().$f->get_itemid().'/'.$filename;
$pos = strrpos( $filename, '.');
$ext = substr( $filename, $pos);
$destfile = $ret->id;
if( $i > 0)
$destfile .= '_'.$i;
$destfile = $destdir.'/'.$destfile.$ext;
$f->copy_content_to( $destfile);
$ret->attachment = $destfile;
$i++;
$files[] = $destfile;
}
}
}
$map[] = $ret;
}
return $map;
}
function game_create_manifest_mf( $dir, $javame, $destmobiledir){
$fp = fopen( $dir.'/MANIFEST.MF',"w");
fputs( $fp, "Manifest-Version: 1.0\r\n");
fputs( $fp, "Ant-Version: Apache Ant 1.7.0\r\n");
fputs( $fp, "Created-By: {$javame->createdby}\r\n");
fputs( $fp, "MIDlet-1: MoodleHangman,,$destmobiledir\r\n");
fputs( $fp, "MIDlet-Vendor: {$javame->vendor}\r\n");
fputs( $fp, "MIDlet-Name: {$javame->vendor}\r\n");
fputs( $fp, "MIDlet-Description: {$javame->description}\r\n");
fputs( $fp, "MIDlet-Version: {$javame->version}\r\n");
fputs( $fp, "MicroEdition-Configuration: CLDC-1.0\r\n");
fputs( $fp, "MicroEdition-Profile: MIDP-1.0\r\n");
fclose( $fp);
}
function game_create_jar( $srcdir, $course, $javame){
global $CFG;
$dir = $CFG->dataroot . '/' . $course->id;
$filejar = $dir . "/export/{$javame->filename}.jar";
if (!file_exists( $dir)){
mkdir( $dir);
}
if (!file_exists( $dir.'/export')){
mkdir( $dir.'/export');
}
if (file_exists( $filejar)){
unlink( $filejar);
}
$cmd = "cd $srcdir;jar cvfm $filejar META-INF/MANIFEST.MF *";
exec( $cmd);
return (file_exists( $filejar) ? "{$javame->filename}.jar" : '');
}
function game_showanswers_appendselect( $form)
{
switch( $form->gamekind){
case 'hangman':
case 'cross':
case 'crypto':
return " AND qtype='shortanswer'";
case 'millionaire':
return " AND qtype = 'multichoice'";
case 'sudoku':
case 'bookquiz':
case 'snakes':
return " AND qtype in ('shortanswer', 'truefalse', 'multichoice')";
}
return '';
}
function game_export_javame_smartcopyimage( $filename, $dest, $maxwidth)
{
if( $maxwidth == 0){
copy( $filename, $dest);
return;
}
$size = getimagesize( $filename);
if( $size == false){
copy( $filename, $dest);
return;
}
$mul = $maxwidth / $size[ 0];
if( $mul > 1){
copy( $filename, $dest);
return;
}
$mime = $size[ 'mime'];
switch( $mime){
case 'image/png':
$src_image = imageCreateFromPNG( $filename);
break;
case 'image/jpeg':
$src_image = imagecreatefromjpeg( $filename);
break;
case 'image/gif':
$src_image = imageCreateFromGIF( $filename);
break;
default:
die('Aknown mime type $mime');
return false;
}
$dst_w = $size[ 0] * $mul;
$dst_h = $size[ 1] * $mul;
$dst_image = imagecreatetruecolor( $dst_w, $dst_h);
imagecopyresampled( $dst_image, $src_image, 0, 0, 0, 0, $dst_w, $dst_h, $size[ 0], $size[ 1]);
imagejpeg( $dst_image, $dest);
}

487
hangman/play.php

@ -0,0 +1,487 @@
<?php // $Id: play.php,v 1.27 2012/07/25 11:16:05 bdaloukas Exp $
// This file plays the game hangman
function game_hangman_continue( $id, $game, $attempt, $hangman, $newletter, $action, $context)
{
global $DB, $USER;
if( $attempt != false and $hangman != false){
if( ($action == 'nextword') and ($hangman->finishedword != 0)){
//finish with one word and continue to another
if( !$DB->set_field( 'game_hangman', 'finishedword', 0, array( 'id' => $hangman->id))){
error( "game_hangman_continue: Can't update game_hangman");
}
}else
{
return game_hangman_play( $id, $game, $attempt, $hangman, false, false, $context);
}
}
$updatehangman = (($attempt != false) and ($hangman != false));
//new game
srand ((double)microtime()*1000003);
//I try 10 times to find a new question
$found = false;
$min_num = 0;
$unchanged = 0;
for($i=1; $i <= 10; $i++)
{
$rec = game_question_shortanswer( $game, $game->param7, false);
if( $rec === false){
continue;
}
$answer = game_upper( $rec->answertext, $game->language);
if( $game->language == '')
{
$game->language = game_detectlanguage( $answer);
$answer = game_upper( $rec->answertext, $game->language);
}
$answer2 = $answer;
if( $game->param7){
//Have to delete space
$answer2 = str_replace( ' ', '', $answer2);
}
if( $game->param8){
//Have to delete -
$answer2 = str_replace( '-', '', $answer2);
}
$allletters = game_getallletters( $answer2, $game->language);
if( $allletters == ''){
continue;
}
if( $game->param7){
$allletters .= '_';
}
if( $game->param8){
$allletters .= '-';
}
if( $game->param7 == false){
//I don't allow spaces
if( strpos( $answer, " ")){
continue;
}
}
$copy = false;
$select2 = 'gameid=? AND userid=? AND questionid=? AND glossaryentryid=?';
if( ($rec2 = $DB->get_record_select( 'game_repetitions', $select2, array( $game->id, $USER->id, $rec->questionid, $rec->glossaryentryid), 'id,repetitions r')) != false){
if( ($rec2->r < $min_num) or ($min_num == 0)){
$min_num = $rec2->r;
$copy = true;
}
}else
{
$min_num = 0;
$copy = true;
}
if( $copy){
$found = true;
$min = new stdClass();
$min->questionid = $rec->questionid;
$min->glossaryentryid = $rec->glossaryentryid;
$min->attachment = $rec->attachment;
$min->questiontext = $rec->questiontext;
$min->answerid = $rec->answerid;
$min->answer = $answer;
$min->language = $game->language;
$min->allletters = $allletters;
if( $min_num == 0)
break; //We found an unused word
}else
$unchanged++;
if( $unchanged > 2)
{
if( $found)
break;
}
}
if( $found == false){
print_error( get_string( 'no_words', 'game'));
}
//Found one word for hangman
if( $attempt == false){
$attempt = game_addattempt( $game);
}
if( !$DB->set_field( 'game_attempts', 'language', $min->language, array( 'id' => $attempt->id))){
print_error( "game_hangman_continue: Can't set language");
}
$query = new stdClass();
$query->attemptid = $attempt->id;
$query->gameid = $game->id;
$query->userid = $USER->id;
$query->sourcemodule = $game->sourcemodule;
$query->questionid = $min->questionid;
$query->glossaryentryid = $min->glossaryentryid;
$query->attachment = $min->attachment;
$query->questiontext = addslashes( $min->questiontext);
$query->score = 0;
$query->timelastattempt = time();
$query->answertext = $min->answer;
$query->answerid = $min->answerid;
if( !($query->id = $DB->insert_record( 'game_queries', $query))){
print_object( $query);
print_error( "game_hangman_continue: Can't insert to table game_queries");
}
$newrec = new stdClass();
$newrec->id = $attempt->id;
$newrec->queryid = $query->id;
if( $updatehangman == false){
$newrec->maxtries = $game->param4;
if( $newrec->maxtries == 0){
$newrec->maxtries = 1;
}
$newrec->finishedword = 0;
$newrec->corrects = 0;
}
$newrec->allletters = $min->allletters;
$letters = '';
if( $game->param1){
$letters .= textlib::substr( $min->answer, 0, 1);
}
if( $game->param2){
$letters .= textlib::substr( $min->answer, -1, 1);
}
$newrec->letters = $letters;
if( $updatehangman == false){
if( !game_insert_record( 'game_hangman', $newrec)){
print_error( 'game_hangman_continue: error inserting in game_hangman');
}
}else
{
if( !$DB->update_record( 'game_hangman', $newrec)){
print_error( 'game_hangman_continue: error updating in game_hangman');
}
$newrec = $DB->get_record( 'game_hangman', array( 'id' => $newrec->id));
}
game_update_repetitions( $game->id, $USER->id, $query->questionid, $query->glossaryentryid);
game_hangman_play( $id, $game, $attempt, $newrec, false, false, $context);
}
function game_hangman_onfinishgame( $game, $attempt, $hangman)
{
global $DB;
$score = $hangman->corrects / $hangman->maxtries;
game_updateattempts( $game, $attempt, $score, true);
if( !$DB->set_field( 'game_hangman', 'finishedword', 0, array( 'id' => $hangman->id))){
print_error( "game_hangman_onfinishgame: Can't update game_hangman");
}
}
function game_hangman_play( $id, $game, $attempt, $hangman, $onlyshow, $showsolution, $context)
{
global $CFG, $DB, $OUTPUT;
$query = $DB->get_record( 'game_queries', array( 'id' => $hangman->queryid));
if( $attempt->language != '')
$wordrtl = game_right_to_left( $attempt->language);
else
$wordrtl = right_to_left();
$reverseprint = ($wordrtl != right_to_left());
if( $game->toptext != ''){
echo $game->toptext.'<br>';
}
$max=$game->param10; // maximum number of wrong
if( $max <= 0)
$max = 6;
hangman_showpage( $done, $correct, $wrong, $max, $word_line, $word_line2, $links, $game, $attempt, $hangman, $query, $onlyshow, $showsolution, $context);
if (!$done)
{
if ($wrong > $max){
$wrong = $max;
}
if( $game->param3 == 0){
$game->param3 = 1;
}
echo "\r\n<br/><img src=\"".$OUTPUT->pix_url('hangman/'.$game->param3.'/hangman_'.$wrong, 'mod_game')."\"";
$message = sprintf( get_string( 'hangman_wrongnum', 'game'), $wrong, $max);
echo ' ALIGN="MIDDLE" BORDER="0" HEIGHT="100" alt="'.$message.'"/>';
if ($wrong >= $max){
//This word is incorrect. If reach the max number of word I have to finish else continue with next word
hangman_onincorrect( $id, $word_line, $query->answertext, $game, $attempt, $hangman, $onlyshow, $showsolution);
}else
{
$i = $max-$wrong;
if( $i > 1)
echo ' '.get_string( 'hangman_restletters_many', 'game', $i);
else
echo ' '.get_string( 'hangman_restletters_one', 'game');
if( $reverseprint){
echo '<SPAN dir="'.($wordrtl ? 'rtl' : 'ltr').'">';
}
echo "<br/><font size=\"5\">\n$word_line</font>\r\n";
if( $word_line2 != ''){
echo "<br/><font size=\"5\">\n$word_line2</font>\r\n";
}
if( $reverseprint){
echo "</SPAN>";
}
if( $hangman->finishedword == false){
echo "<br/><br/><BR/>".get_string( 'hangman_letters', 'game').$links."\r\n";
}
}
}else
{
//This word is correct. If reach the max number of word I have to finish else continue with next word
hangman_oncorrect( $id, $word_line, $game, $attempt, $hangman, $query);
}
echo "<br/><br/>".get_string( 'grade', 'game').' : '.round( $query->percent * 100).' %';
if( $hangman->maxtries > 1){
echo '<br/><br/>'.get_string( 'hangman_gradeinstance', 'game').' : '.round( $hangman->corrects / $hangman->maxtries * 100).' %';
}
if( $game->bottomtext != ''){
echo '<br><br>'.$game->bottomtext;
}
}
function hangman_showpage(&$done, &$correct, &$wrong, $max, &$word_line, &$word_line2, &$links, $game, &$attempt, &$hangman, &$query, $onlyshow, $showsolution, $context)
{
global $USER, $CFG, $DB;
$id = optional_param('id', 0, PARAM_INT); // Course Module ID, or
$word = $query->answertext;
$newletter = optional_param('newletter', "", PARAM_TEXT);
if( $newletter == '_'){
$newletter = ' ';
}
$letters = $hangman->letters;
if( $newletter != NULL)
{
if( textlib::strpos( $letters,$newletter) === false){
$letters .= $newletter;
}
}
$links="";
$alpha = $hangman->allletters;
$wrong = 0;
if( $query->questionid)
{
$query->questiontext = game_filterquestion(str_replace( '\"', '"', $query->questiontext), $query->questionid, $context->id, $game->course);
}else
{
$cmglossary = get_coursemodule_from_instance('glossary', $game->glossaryid, $game->course);
$contextglossary = get_context_instance(CONTEXT_MODULE, $cmglossary->id);
$query->questiontext = game_filterglossary(str_replace( '\"', '"', $query->questiontext), $query->glossaryentryid, $contextglossary->id, $game->course);
}
if( $game->param5){
$s = trim( game_filtertext( $query->questiontext, $game->course));
if( $s != '.' and $s <> ''){
echo "<br/><b>".$s.'</b>';
}
if( $query->attachment != ''){
$file = "{$CFG->wwwroot}/file.php/$game->course/moddata/$query->attachment";
echo "<img src=\"$file\" />";
}
echo "<br/><br/>";
}
$word_line = $word_line2 = "";
$len = textlib::strlen( $word);
$done = 1;
$answer = '';
$correct = 0;
for ($x=0; $x < $len; $x++)
{
$char = textlib::substr( $word, $x, 1);
if( $showsolution){
$word_line2 .= ( $char == " " ? '&nbsp; ' : $char);
$done = 0;
}
if ( textlib::strpos($letters, $char) === false){
$word_line.="_<font size=\"1\">&nbsp;</font>\r\n";
$done = 0;
$answer .= '_';
}else
{
$word_line .= ( $char == " " ? '&nbsp; ' : $char);
$answer .= $char;
$correct++;
}
}
$len_alpha = textlib::strlen($alpha);
$fontsize = 5;
for ($c=0; $c < $len_alpha; $c++)
{
$char = textlib::substr( $alpha, $c, 1);
if ( textlib::strpos($letters, $char) === false)
{
//User doesn't select this character
$params = 'id='.$id.'&amp;newletter='.urlencode( $char);
if( $onlyshow or $showsolution){
$links .= $char;
}else
{
$links .= "<font size=\"$fontsize\"><a href=\"attempt.php?$params\">$char</a></font>\r\n";
}
continue;
}
if ( textlib::strpos($word, $char) === false)
{
$links .= "\r\n<font size=\"$fontsize\" color=\"red\">$char </font>";
$wrong++;
}else
{
$links .= "\r\n<B><font size=\"$fontsize\">$char </font></B> ";
}
}
$finishedword = ($done or $wrong >= $max);
$finished = false;
$updrec = new stdClass();
$updrec->id = $hangman->id;
$updrec->letters = $letters;
if( $finishedword){
if( $hangman->finishedword == 0){
//only one time per word increace the variable try
$hangman->try = $hangman->try + 1;
if( $hangman->try > $hangman->maxtries){
$finished = true;
}
if( $done){
$hangman->corrects = $hangman->corrects + 1;
$updrec->corrects = $hangman->corrects;
}
}
$updrec->try = $hangman->try;
$updrec->finishedword = 1;
}
$query->percent = ($correct -$wrong/$max) / textlib::strlen( $word);
if( $query->percent < 0){
$query->percent = 0;
}
if( $onlyshow or $showsolution){
return;
}
if( !$DB->update_record( 'game_hangman', $updrec)){
print_error( "hangman_showpage: Can't update game_hangman id=$updrec->id");
}
if( $done){
$score = 1;
}else if( $wrong >= $max){
$score = 0;
}else
{
$score = -1;
}
game_updateattempts( $game, $attempt, $score, $finished);
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
function hangman_oncorrect( $id, $word_line, $game, $attempt, $hangman, $query)
{
global $DB;
echo "<BR/><BR/><font size=\"5\">\n$word_line</font>\r\n";
echo '<p><BR/><font size="5" color="green">'.get_string( 'win', 'game').'</font><BR/><BR/></p>';
if( $query->answerid){
$feedback = $DB->get_field( 'question_answers', 'feedback', array( 'id' => $query->answerid));
if( $feedback != ''){
echo "$feedback<br>";
}
}
game_hangman_show_nextword( $id, $game, $attempt, $hangman);
}
function hangman_onincorrect( $id, $word_line, $word, $game, $attempt, $hangman, $onlyshow, $showsolution)
{
echo "\r\n<BR/><BR/><font size=\"5\">\n$word_line</font>\r\n";
if( $onlyshow or $showsolution)
return;
echo '<p><BR/><font size="5" color="red">'.get_string( 'hangman_loose', 'game').'</font><BR/><BR/></p>';
if( $game->param6){
//show the correct answer
if( textlib::strpos($word, ' ') != false)
echo '<br/>'.get_string( 'hangman_correct_phrase', 'game');
else
echo '<br/>'.get_string( 'hangman_correct_word', 'game');
echo '<B>'.$word."</B><BR/><BR/>\r\n";
}
game_hangman_show_nextword( $id, $game, $attempt, $hangman, true);
}
function game_hangman_show_nextword( $id, $game, $attempt, $hangman)
{
global $CFG, $DB;
echo '<br/>';
if( ($hangman->try < $hangman->maxtries) or ($hangman->maxtries == 0)){
//continue to next word
$params = "id=$id&action2=nextword\">".get_string( 'nextword', 'game').'</a> &nbsp; &nbsp; &nbsp; &nbsp;';
echo "<a href=\"{$CFG->wwwroot}/mod/game/attempt.php?$params";
}else
{
game_hangman_onfinishgame( $game, $attempt, $hangman);
echo "<a href=\"{$CFG->wwwroot}/mod/game/attempt.php?id=$id\">".get_string( 'nextgame', 'game').'</a> &nbsp; &nbsp; &nbsp; &nbsp; ';
}
if (! $cm = $DB->get_record('course_modules', array( 'id' => $id))) {
print_error( "Course Module ID was incorrect id=$id");
}
echo "<a href=\"{$CFG->wwwroot}/course/view.php?id=$cm->course\">".get_string( 'finish', 'game').'</a> ';
}

79
header.php

@ -0,0 +1,79 @@
<?php
require_once(dirname(__FILE__) . '/../../config.php');
require_once($CFG->libdir.'/gradelib.php');
require_once($CFG->dirroot.'/mod/game/locallib.php');
require_once($CFG->libdir . '/completionlib.php');
$id = optional_param('id', 0, PARAM_INT); // Course Module ID, or
$q = optional_param('q', 0, PARAM_INT); // game ID
if ($id) {
if (! $cm = get_coursemodule_from_id('game', $id)) {
print_error('invalidcoursemodule');
}
if (! $course = $DB->get_record('course', array('id' => $cm->course))) {
print_error('coursemisconf');
}
if (! $game = $DB->get_record('game', array('id' => $cm->instance))) {
print_error('invalidcoursemodule');
}
} else {
if (! $game = $DB->get_record('game', array('id' => $q))) {
print_error('invalidgameid q='.$q, 'game');
}
if (! $course = $DB->get_record('course', array('id' => $game->course))) {
print_error('invalidcourseid');
}
if (! $cm = get_coursemodule_from_instance('game', $game->id, $course->id)) {
print_error('invalidcoursemodule');
}
}
/// Check login and get context.
require_login($course->id, false, $cm);
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
require_capability('mod/game:view', $context);
/// Cache some other capabilites we use several times.
$canattempt = has_capability('mod/game:attempt', $context);
$canreviewmine = has_capability('mod/game:reviewmyattempts', $context);
/// Create an object to manage all the other (non-roles) access rules.
$timenow = time();
//$accessmanager = new game_access_manager(game::create($game->id, $USER->id), $timenow);
/// If no questions have been set up yet redirect to edit.php
//if (!$game->questions && has_capability('mod/game:manage', $context)) {
// redirect($CFG->wwwroot . '/mod/game/edit.php?cmid=' . $cm->id);
//}
/// Log this request.
add_to_log($course->id, 'game', 'view', "view.php?id=$cm->id", $game->id, $cm->id);
/// Initialize $PAGE, compute blocks
$PAGE->set_url('/mod/game/view.php', array('id' => $cm->id));
$edit = optional_param('edit', -1, PARAM_BOOL);
if ($edit != -1 && $PAGE->user_allowed_editing()) {
$USER->editing = $edit;
}
$PAGE->requires->yui2_lib('event');
// Note: MDL-19010 there will be further changes to printing header and blocks.
// The code will be much nicer than this eventually.
$title = $course->shortname . ': ' . format_string($game->name);
if ($PAGE->user_allowed_editing() && !empty($CFG->showblocksonmodpages)) {
$buttons = '<table><tr><td><form method="get" action="view.php"><div>'.
'<input type="hidden" name="id" value="'.$cm->id.'" />'.
'<input type="hidden" name="edit" value="'.($PAGE->user_is_editing()?'off':'on').'" />'.
'<input type="submit" value="'.get_string($PAGE->user_is_editing()?'blockseditoff':'blocksediton').'" /></div></form></td></tr></table>';
$PAGE->set_button($buttons);
}
$PAGE->set_title($title);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();

BIN
hiddenpicture/numbers.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

107
hiddenpicture/picture.php

@ -0,0 +1,107 @@
<?php // $Id: picture.php,v 1.3 2010/07/26 00:13:32 bdaloukas Exp $
require( '../../../config.php');
$id = required_param('id', PARAM_INT); // Course Module ID
$attemptid = required_param('id2', PARAM_INT); // Course Module ID
$foundcells = required_param('f', PARAM_SEQUENCE); //CSV
$cells = required_param('cells', PARAM_SEQUENCE); //CSV
$filehash = required_param('p', PARAM_PATH);
$cols = required_param('cols', PARAM_INT);
$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);
function create_image( $id, $attemptid, $foundcells, $cells, $filehash, $cols, $rows, $filenamenumbers)
{
global $CFG;
$a = explode( ',', $foundcells);
$found = array();
foreach( $a as $s){
$found[ $s] = 1;
}
$a = explode( ',', $cells);
$cells = array();
foreach( $a as $s){
$cells[ $s] = 1;
}
$file = get_file_storage()->get_file_by_hash( $filehash);
$image = $file->get_imageinfo();
if( $image === false){
die("Aknown filehash $filehash");
return false;
}
$img_handle = imagecreatefromstring($file->get_content());
$mime = $image[ 'mimetype'];
$img_numbers = imageCreateFromPNG( $filenamenumbers);
$size_numbers = getimagesize ($filenamenumbers);
Header ("Content-type: $mime");
$color = ImageColorAllocate ($img_handle, 100, 100, 100);
$width = $image[ 'width'];
$height = $image[ 'height'];
$pos = 0;
$font = 1;
for($y = 0; $y < $rows; $y++){
for( $x=0; $x < $cols; $x++){
$pos++;
if( !array_key_exists( $pos, $found)){
$x1 = $x * $width / $cols;
$y1 = $y * $height / $rows;
imagefilledrectangle( $img_handle, $x1, $y1, $x1 + $width / $cols, $y1 + $height / $rows, $color);
if( array_key_exists( $pos, $cells)){
shownumber( $img_handle, $img_numbers, $pos, $x1 , $y1, $width / $cols, $height / $rows, $size_numbers);
}
}
}
}
switch( $mime){
case 'image/png':
ImagePng ($img_handle);
break;
case 'image/jpeg':
ImageJpeg ($img_handle);
break;
case 'image/gif':
ImageGif ($img_handle);
break;
default:
die('Aknown mime type $mime');
return false;
}
ImageDestroy ($img_handle);
}
function shownumber( $img_handle, $img_numbers, $number, $x1 , $y1, $width, $height, $size_numbers){
if( $number < 10){
$width_number = $size_numbers[ 0] / 10;
$dstX = $x1 + $width / 3;
$dstY = $y1 + $height / 3;
$srcX = $number * $size_numbers[ 0] / 10;
$srcW = $size_numbers[ 0]/10;
$srcH = $size_numbers[ 1];
$dstW = $width / 10;
$dstH = $dstW * $srcH / $srcW;
imagecopyresized( $img_handle, $img_numbers, $dstX, $dstY, $srcX, 0, $dstW, $dstH, $srcW, $srcH);
}else
{
$number1 = floor( $number / 10);
$number2 = $number % 10;
shownumber( $img_handle, $img_numbers, $number1, $x1-$width/20, $y1, $width, $height, $size_numbers);
shownumber( $img_handle, $img_numbers, $number2, $x1+$width/20, $y1, $width, $height, $size_numbers);
}
}

482
hiddenpicture/play.php

@ -0,0 +1,482 @@
<?php // $Id: play.php,v 1.19 2012/08/15 09:26:55 bdaloukas Exp $
// This file plays the game Hidden Picture
function game_hiddenpicture_continue( $id, $game, $attempt, $hiddenpicture, $context)
{
global $DB, $USER;
if( $attempt != false and $hiddenpicture != false){
//Continue a previous attempt
return game_hiddenpicture_play( $id, $game, $attempt, $hiddenpicture, false, $context);
}
if( $attempt == false){
//Start a new attempt
$attempt = game_addattempt( $game);
}
$cols = $game->param1;
$rows = $game->param2;
if( $cols == 0){
print_error( get_string( 'hiddenpicture_nocols', 'game'));
}
if( $rows == 0){
print_error( get_string( 'hiddenpicture_norows', 'game'));
}
//new attempt
$n = $game->param1 * $game->param2;
$recs = game_questions_selectrandom( $game, CONST_GAME_TRIES_REPETITION*$n);
$selected_recs = game_select_from_repetitions( $game, $recs, $n);
$newrec = game_hiddenpicture_selectglossaryentry( $game, $attempt);
if( $recs === false){
print_error( get_string( 'no_questions', 'game'));
}
$positions = array();
$pos=1;
for($col=0; $col < $cols; $col++){
for( $row=0; $row < $rows; $row++){
$positions[] = $pos++;
}
}
$i = 0;
$field = ($game->sourcemodule == 'glossary' ? 'glossaryentryid' : 'questionid');
foreach( $recs as $rec)
{
if( $game->sourcemodule == 'glossary')
$key = $rec->glossaryentryid;
else
$key = $rec->questionid;
if( !array_key_exists( $key, $selected_recs))
continue;
$query = new stdClass();
$query->attemptid = $newrec->id;
$query->gamekind = $game->gamekind;
$query->gameid = $game->id;
$query->userid = $USER->id;
$pos = array_rand( $positions);
$query->col = $positions[ $pos];
unset( $positions[ $pos]);
$query->sourcemodule = $game->sourcemodule;
$query->questionid = $rec->questionid;
$query->glossaryentryid = $rec->glossaryentryid;
$query->score = 0;
if( ($query->id = $DB->insert_record( 'game_queries', $query)) == 0){
print_error( 'error inserting in game_queries');
}
game_update_repetitions($game->id, $USER->id, $query->questionid, $query->glossaryentryid);
}
//The score is zero
game_updateattempts( $game, $attempt, 0, 0);
game_hiddenpicture_play( $id, $game, $attempt, $newrec, false, $context);
}
//Create the game_hiddenpicture record
function game_hiddenpicture_selectglossaryentry( $game, $attempt){
global $CFG, $DB, $USER;
srand( (double)microtime()*1000000);
if( $game->glossaryid2 == 0){
print_error( get_string( 'must_select_glossary', 'game'));
}
$select = "ge.glossaryid={$game->glossaryid2}";
$table = '{glossary_entries} ge';
if( $game->glossarycategoryid2){
$table .= ",{glossary_entries_categories} gec";
$select .= " AND gec.entryid = ge.id AND gec.categoryid = {$game->glossarycategoryid2}";
}
if( $game->param7 == 0){
//Allow spaces
$select .= " AND concept NOT LIKE '% %'";
}
$sql = "SELECT ge.id,attachment FROM $table WHERE $select";
if( ($recs=$DB->get_records_sql( $sql)) == false){
$a->name = "'".$DB->get_field('glossary', 'name', array( 'id' => $game->glossaryid2))."'";
print_error( get_string( 'hiddenpicture_nomainquestion', 'game', $a));
return false;
}
$ids = array();
$keys = array();
$fs = get_file_storage();
$cmg = get_coursemodule_from_instance('glossary', $game->glossaryid2, $game->course);
$context = get_context_instance(CONTEXT_MODULE, $cmg->id);
foreach( $recs as $rec){
$files = $fs->get_area_files($context->id, 'mod_glossary', 'attachment', $rec->id, "timemodified", false);
if( $files)
{
foreach( $files as $key => $file)
{
$s = strtoupper( $file->get_filename());
$s = substr( $s, -4);
if( $s == '.GIF' or $s == '.JPG' or $s == '.PNG'){
$ids[] = $rec->id;
$keys[] = $file->get_pathnamehash();
}
}
}
}
if( count( $ids) == 0){
$a->name = "'".$DB->get_field( 'glossary', 'name', array( 'id' => $game->glossaryid2))."'";
print_error( get_string( 'hiddenpicture_nomainquestion', 'game', $a));
return false;
}
//Have to select randomly one glossaryentry
$poss = array();
for($i=0;$i<count($ids);$i++){
$poss[] = $i;
}
shuffle( $poss);
$min_num = 0;
$attachement = '';
for($i=0;$i<count($ids);$i++){
$pos = $poss[ $i];
$tempid = $ids[ $pos];
$a = array( 'gameid' => $game->id, 'userid' => $USER->id, 'questionid' => 0, 'glossaryentryid' => $tempid);
if(($rec2 = $DB->get_record('game_repetitions', $a, 'id,repetitions r')) != false){
if( ($rec2->r < $min_num) or ($min_num == 0)){
$min_num = $rec2->r;
$glossaryentryid = $tempid;
$attachement = $keys[ $pos];
}
}
else{
$glossaryentryid = $tempid;
$attachement = $keys[ $pos];
break;
}
}
$sql = 'SELECT id, concept as answertext, definition as questiontext, id as glossaryentryid, 0 as questionid, glossaryid, attachment'.
' FROM {glossary_entries} WHERE id = '.$glossaryentryid;
if( ($rec = $DB->get_record_sql( $sql)) == false)
return false;
$query = new stdClass();
$query->attemptid = $attempt->id;
$query->gamekind = $game->gamekind;
$query->gameid = $game->id;
$query->userid = $USER->id;
$query->col = 0;
$query->sourcemodule = 'glossary';
$query->questionid = 0;
$query->glossaryentryid = $rec->glossaryentryid;
$query->attachment = $attachement;
$query->questiontext = $rec->questiontext;
$query->answertext = $rec->answertext;
$query->score = 0;
if( ($query->id = $DB->insert_record( 'game_queries', $query)) == 0){
print_error( 'Error inserting in game_queries');
}
$newrec = new stdClass();
$newrec->id = $attempt->id;
$newrec->correct = 0;
if( !game_insert_record( 'game_hiddenpicture', $newrec)){
print_error( 'Error inserting in game_hiddenpicture');
}
game_update_repetitions($game->id, $USER->id, $query->questionid, $query->glossaryentryid);
return $newrec;
}
function game_hiddenpicture_play( $id, $game, $attempt, $hiddenpicture, $showsolution, $context)
{
if( $game->toptext != ''){
echo $game->toptext.'<br>';
}
//Show picture
$offsetquestions = game_sudoku_compute_offsetquestions( $game->sourcemodule, $attempt, $numbers, $correctquestions);
unset( $offsetquestions[ 0]);
game_hiddenpicture_showhiddenpicture( $id, $game, $attempt, $hiddenpicture, $showsolution, $offsetquestions, $correctquestions, $id, $attempt, $showsolution);
//Show questions
$onlyshow = false;
$showsolution = false;
switch( $game->sourcemodule)
{
case 'quiz':
case 'question':
game_sudoku_showquestions_quiz( $id, $game, $attempt, $hiddenpicture, $offsetquestions, $numbers, $correctquestions, $onlyshow, $showsolution, $context);
break;
case 'glossary':
game_sudoku_showquestions_glossary( $id, $game, $attempt, $hiddenpicture, $offsetquestions, $numbers, $correctquestions, $onlyshow, $showsolution);
break;
}
if( $game->bottomtext != ''){
echo '<br><br>'.$game->bottomtext;
}
}
function game_hidden_picture_computescore( $game, $hiddenpicture){
$correct = $hiddenpicture->correct;
if( $hiddenpicture->found){
$correct++;
}
$remaining = $game->param1 * $game->param2 - $hiddenpicture->correct;
$div2 = $correct + $hiddenpicture->wrong + $remaining;
if( $hiddenpicture->found){
$percent = ($correct + $remaining) / $div2;
}else{
$percent = $correct / $div2;
}
return $percent;
}
function game_hiddenpicture_showhiddenpicture( $id, $game, $attempt, $hiddenpicture, $showsolution, $offsetquestions, $correctquestions){
global $DB;
$foundcells='';
foreach( $correctquestions as $key => $val){
$foundcells .= ','.$key;
}
$cells='';
foreach( $offsetquestions as $key => $val){
if( $key != 0){
$cells .= ','.$key;
}
}
$query = $DB->get_record_select( 'game_queries', "attemptid=$hiddenpicture->id AND col=0", null, 'id,glossaryentryid,attachment,questiontext');
//Grade
echo "<br/>".get_string( 'grade', 'game').' : '.round( $attempt->score * 100).' %';
game_hiddenpicture_showquestion_glossary( $id, $query);
$cells = substr( $cells, 1);
$foundcells = substr( $foundcells, 1);
game_showpicture( $id, $game, $attempt, $query, $cells, $foundcells, true);
}
function game_hiddenpicture_showquestion_glossary( $id, $query)
{
global $CFG, $DB;
$entry = $DB->get_record( 'glossary_entries', array( 'id' => $query->glossaryentryid));
/// Start the form
echo '<br>';
echo "<form id=\"responseform\" method=\"post\" action=\"{$CFG->wwwroot}/mod/game/attempt.php\" onclick=\"this.autocomplete='off'\">\n";
echo "<center><input type=\"submit\" name=\"finishattempt\" value=\"".get_string('hiddenpicture_mainsubmit', 'game')."\"></center>\n";
// Add a hidden field with the queryid
echo '<input type="hidden" name="id" value="' . s($id) . "\" />\n";
echo '<input type="hidden" name="action" value="hiddenpicturecheckg" />';
echo '<input type="hidden" name="queryid" value="' . $query->id . "\" />\n";
// Add a hidden field with glossaryentryid
echo '<input type="hidden" name="glossaryentryid" value="'.$query->glossaryentryid."\" />\n";
echo game_filtertext( $entry->definition, 0).'<br>';
echo get_string( 'answer').': ';
echo "<input type=\"text\" name=\"answer\" size=30 /><br>";
echo "</form><br>\n";
}
function game_hiddenpicture_check_questions( $id, $game, &$attempt, &$hiddenpicture, $finishattempt)
{
global $QTYPES, $DB;
$responses = data_submitted();
$offsetquestions = game_sudoku_compute_offsetquestions( $game->sourcemodule, $attempt, $numbers, $correctquestions);
$questionlist = game_sudoku_getquestionlist( $offsetquestions);
$questions = game_sudoku_getquestions( $questionlist);
$actions = question_extract_responses($questions, $responses, QUESTION_EVENTSUBMIT);
$correct = $wrong = 0;
foreach($questions as $question) {
if( !array_key_exists( $question->id, $actions)){
//no answered
continue;
}
unset( $state);
unset( $cmoptions);
$question->maxgrade = 100;
$state->responses = $actions[ $question->id]->responses;
$state->event = QUESTION_EVENTGRADE;
$cmoptions = array();
$QTYPES[$question->qtype]->grade_responses( $question, $state, $cmoptions);
unset( $query);
$select = "attemptid=$attempt->id";
$select .= " AND questionid=$question->id";
if( ($query->id = $DB->get_field_select( 'game_queries', 'id', $select)) == 0){
print_error("problem game_hiddenpicture_check_questions (select=$select)");
}
$answertext = $state->responses[ ''];
if( $answertext != ''){
$grade = $state->raw_grade;
if( $grade < 50){
//wrong answer
game_update_queries( $game, $attempt, $query, $grade/100, $answertext);
$wrong++;
}else{
//correct answer
game_update_queries( $game, $attempt, $query, 1, $answertext);
$correct++;
}
}
}
$hiddenpicture->correct += $correct;
$hiddenpicture->wrong += $wrong;
if( !$DB->update_record( 'game_hiddenpicture', $hiddenpicture)){
print_error( 'game_hiddenpicture_check_questions: error updating in game_hiddenpicture');
}
$attempt->score = game_hidden_picture_computescore( $game, $hiddenpicture);
if( !$DB->update_record( 'game_attempts', $attempt)){
print_error( 'game_hiddenpicture_check_questions: error updating in game_attempt');
}
game_sudoku_check_last( $id, $game, $attempt, $hiddenpicture, $finishattempt);
return true;
}
function game_hiddenpicture_check_mainquestion( $id, $game, &$attempt, &$hiddenpicture, $finishattempt)
{
global $QTYPES, $CFG, $DB;
$responses = data_submitted();
$glossaryentryid = $responses->glossaryentryid;
$queryid = $responses->queryid;
// Load the glossary entry
if (!($entry = $DB->get_record( 'glossary_entries', array( 'id' => $glossaryentryid)))) {
print_error( get_string( 'noglossaryentriesfound', 'game'));
}
$answer = $responses->answer;
$correct = false;
if( $answer != ''){
if( game_upper( $entry->concept) == game_upper( $answer)){
$correct = true;
}
}
// Load the query
if (!($query = $DB->get_record( 'game_queries', array( 'id' => $queryid)))) {
print_error( "The query $queryid not found");
}
game_update_queries( $game, $attempt, $query, $correct, $answer);
if( $correct){
$hiddenpicture->found = 1;
}else{
$hiddenpicture->wrong++;
}
if( !$DB->update_record( 'game_hiddenpicture', $hiddenpicture)){
print_error( 'game_hiddenpicture_check_mainquestion: error updating in game_hiddenpicture');
}
$score = game_hidden_picture_computescore( $game, $hiddenpicture);
game_updateattempts( $game, $attempt, $score, $correct);
if( $correct == false){
game_hiddenpicture_play( $id, $game, $attempt, $hiddenpicture, false, $context);
return true;
}
//Finish the game
$query = $DB->get_record_select( 'game_queries', "attemptid=$hiddenpicture->id AND col=0", null, 'id,glossaryentryid,attachment,questiontext');
game_showpicture( $id, $game, $attempt, $query, '', '', false);
echo '<p><BR/><font size="5" color="green">'.get_string( 'win', 'game').'</font><BR/><BR/></p>';
global $CFG;
echo '<br/>';
echo "<a href=\"$CFG->wwwroot/mod/game/attempt.php?id=$id\">";
echo get_string( 'nextgame', 'game').'</a> &nbsp; &nbsp; &nbsp; &nbsp;';
if (! $cm = $DB->get_record( 'course_modules', array( 'id' => $id))) {
print_error( "Course Module ID was incorrect id=$id");
}
echo "<a href=\"{$CFG->wwwroot}/course/view.php?id=$cm->course\">".get_string( 'finish', 'game').'</a> ';
return false;
}
function game_showpicture( $id, $game, $attempt, $query, $cells, $foundcells, $usemap)
{
global $CFG;
$filenamenumbers = str_replace( "\\", '/', $CFG->dirroot)."/mod/game/hiddenpicture/numbers.png";
if( $usemap){
$cols = $game->param1;
$rows = $game->param2;
}else{
$cols = $rows = 0;
}
$params = "id=$id&id2=$attempt->id&f=$foundcells&cols=$cols&rows=$rows&cells=$cells&p={$query->attachment}&n=$filenamenumbers";
$imagesrc = "hiddenpicture/picture.php?$params";
$fs = get_file_storage();
$file = get_file_storage()->get_file_by_hash( $query->attachment);
$image = $file->get_imageinfo();
if( $game->param4 > 10){
$width = $game->param4;
$height = $image[ 'height'] * $width / $image[ 'width'];
}else if( $game->param5 > 10){
$height = $game->param5;
$width = $image[ 'width'] * $height / $image[ 'height'];
}else
{
$width = $image[ 'width'];
$height = $image[ 'height'];
}
echo "<IMG SRC=\"$imagesrc\" width=$width ";
if( $usemap){
echo " USEMAP=\"#mapname\" ";
}
echo " BORDER=\"1\">\r\n";
if( $usemap){
echo "<MAP NAME=\"mapname\">\r\n";
$pos=0;
for($row=0; $row < $rows; $row++){
for( $col=0; $col < $cols; $col++){
$pos++;
$x1 = $col * $width / $cols;
$y1 = $row * $height / $rows;
$x2 = $x1 + $width / $cols;
$y2 = $y1 + $height / $rows;
$q = "a$pos";
echo "<AREA SHAPE=\"rect\" COORDS=\"$x1,$y1,$x2,$y2\" HREF=\"#$q\" ALT=\"$pos\">\r\n";
}
}
echo "</MAP>";
}
}

BIN
images/soundplay.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

96
index.php

@ -0,0 +1,96 @@
<?php // $Id: index.php,v 1.8 2012/08/29 20:55:25 bdaloukas Exp $
/**
* This page lists all the instances of game module in a particular course
*
* @author
* @version $Id: index.php,v 1.8 2012/08/29 20:55:25 bdaloukas Exp $
* @package game
**/
require_once("../../config.php");
require_once("lib.php");
require_once("locallib.php");
$id = required_param('id', PARAM_INT); // course
if (! $course = $DB->get_record( 'course', array( 'id' => $id))) {
print_error( 'Course ID is incorrect');
}
require_login($course->id);
add_to_log($course->id, 'game', 'view all', "index.php?id=$course->id", "");
/// Get all required strings game
$strgames = get_string( 'modulenameplural', 'game');
$strgame = get_string('modulename', 'game');
/// Print the header
$PAGE->set_url('/mod/game/index.php', array('id'=>$id));
$coursecontext = get_context_instance(CONTEXT_COURSE, $id);
$PAGE->set_pagelayout('incourse');
add_to_log($course->id, "game", "view all", "index.php?id=$course->id", "");
// Print the header.
$strgames = get_string("modulenameplural", "game");
$streditquestions = '';
$editqcontexts = new question_edit_contexts($coursecontext);
$PAGE->navbar->add($strgames);
$PAGE->set_title($strgames);
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
/// Get all the appropriate data
if (! $games = get_all_instances_in_course("game", $course)) {
notice("There are no games", "../../course/view.php?id=$course->id");
die;
}
/// Print the list of instances (your module will probably extend this)
$timenow = time();
$strname = get_string("name");
$strweek = get_string("week");
$strtopic = get_string("topic");
if ($course->format == "weeks") {
$table->head = array ($strweek, $strname);
$table->align = array ("center", "left");
} else if ($course->format == "topics") {
$table->head = array ($strtopic, $strname);
$table->align = array ("center", "left", "left", "left");
} else {
$table->head = array ($strname);
$table->align = array ("left", "left", "left");
}
foreach ($games as $game) {
if (!$game->visible) {
//Show dimmed if the mod is hidden
$link = "<a class=\"dimmed\" href=\"view.php?id=$game->coursemodule\">$game->name</a>";
} else {
//Show normal if the mod is visible
$link = "<a href=\"view.php?id=$game->coursemodule\">$game->name</a>";
}
if ($course->format == "weeks" or $course->format == "topics") {
$table->data[] = array ($game->section, $link);
} else {
$table->data[] = array ($link);
}
}
echo "<br />";
print_table($table);
/// Finish the page
echo $OUTPUT->footer($course);
?>

305
lang/ca/game.php

@ -0,0 +1,305 @@
<?php // $Id: game.php,v 1.7 2012/07/26 05:38:58 bdaloukas Exp $
// game.php - created with Moodle 1.9.1+ (Build: 20080702) (2007101514)
// translation to catalan (ca_utf8). Thanks to Josep Ramon.
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Importar arxiu OpenOffice (odt)';
$string[ 'bookquiz_not_select_book'] = 'Vd no ha seleccionat un llibre';
$string[ 'bookquiz_subchapter'] = 'Crei subcapítols';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'El llibre està buid';
$string[ 'sudoku_submit'] = 'Avaluar respostes';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Categories';
$string[ 'bookquiz_chapters'] = 'Capítols';
//cross/cross_class.php
$string[ 'lettersall'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
//cross/crossdb_class.php
$string[ 'and'] = 'y';
$string[ 'cross_correct'] = 'correcte';
$string[ 'cross_corrects'] = 'correctes';
$string[ 'cross_error'] = 'error';
$string[ 'cross_errors'] = 'errors';
$string[ 'cross_found_many'] = 'Trobat';
$string[ 'cross_found_one'] = 'Trobat';
$string[ 'grade'] = 'Nota';
//cross/play.php
$string[ 'cross_across'] = 'Horitzontal';
$string[ 'cross_checkbutton'] = 'Revisar mots encreuats';
$string[ 'cross_down'] = 'Avall';
$string[ 'cross_endofgamebutton'] = 'Fí del joc dels mots encreuats';
$string[ 'cross_error_containsbadchars'] = 'La paraula conté caracters no autoritzats';
$string[ 'cross_error_wordlength1'] = 'La paraula correcta conté ';
$string[ 'cross_error_wordlength2'] = ' lletres.';
$string[ 'cross_pleasewait'] = 'Si et plau espera mentre es carrega l\'encreuat';
$string[ 'cross_welcome'] = '<h3>¡Benvingut!</h3><p>Fes clic en una paraula per començar.</p>';
$string[ 'letter'] = 'lletra';
$string[ 'letters'] = 'lletres';
$string[ 'nextgame'] = 'Següent joc';
$string[ 'no_words'] = 'Cap paraula trobada';
$string[ 'print'] = 'Imprimir';
//cryptex/play.php
$string[ 'finish'] = 'Fi del joc';
//db/access.php
$string[ 'game:attempt'] = 'Juga el joc';
$string[ 'game:deleteattempts'] = 'Esborrar intents';
$string[ 'game:manage'] = 'Administrar';
$string[ 'game:reviewmyattempts'] = 'Revisar els meus intents';
$string[ 'game:view'] = 'Veure';
$string[ 'game:viewreports'] = 'Veure informes';
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'La frase correcta era: ';
$string[ 'hangman_correct_word'] = 'La paraula correcta era: ';
$string[ 'hangman_gradeinstance'] = 'Nivell en el joc complet';
$string[ 'hangman_letters'] = 'Lletres: ';
$string[ 'hangman_restletters_many'] = 'Vd. té <b>$a</b> intents';
$string[ 'hangman_restletters_one'] = 'Vd. té <b>ÚNICAMENT 1</b> intent';
$string[ 'hangman_wrongnum'] = 'Dolentes: %%d de %%d';
$string[ 'nextword'] = 'Següent paraula';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = 'Qualificació de la pregunta principal';
$string[ 'hiddenpicture_nocols'] = 'Cal especificar el nombre de fileres horitzontals';
$string[ 'hiddenpicture_nomainquestion'] = 'No hi ha entrades en el glossari $a->name amb una imatge annexada';
$string[ 'hiddenpicture_norows'] = 'Cal especificar el nombre de columnes verticals';
$string[ 'must_select_glossary'] = 'Vd ha de seleccionar un glossari';
$string[ 'noglossaryentriesfound'] = 'No hi ha entrades de glossari';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Cal seleccionar una categoria de preguntes';
$string[ 'millionaire_must_select_quiz'] = 'Cal seleccionar un qüestionari';
//report/overview/report.php
$string[ 'allattempts'] = 'Mostrar tots els intents';
$string[ 'allstudents'] = 'Mostrar tots $a';
$string[ 'attemptsonly'] = 'Mostrar únicament estudiants amb intents';
$string[ 'deleteattemptcheck'] = 'Està absolutament segur de voler esborrar completament aquests intents?';
$string[ 'displayoptions'] = 'Mostrar opcions';
$string[ 'downloadods'] = 'Descarregar en format ODS';
$string[ 'feedback'] = 'Retroalimentació';
$string[ 'noattemptsonly'] = 'Mostrar $a únicament sense intents';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring ha fet $a->attemptnum intents';
$string[ 'pagesize'] = 'Preguntes per pàgina:';
$string[ 'reportoverview'] = 'Llistat';
$string[ 'selectall'] = 'Seleccionar tots';
$string[ 'selectnone'] = 'Desmarcar tots';
$string[ 'showdetailedmarks'] = 'Mostrar detalls de marca';
$string[ 'startedon'] = 'Començà en';
$string[ 'timecompleted'] = 'Completat';
$string[ 'unfinished'] = 'obert';
$string[ 'withselected'] = 'Amb seleccionats';
//snakes/play.php
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Nombre de sudokus que seran creats';
$string[ 'sudoku_create_start'] = 'Començar creant sudokus';
$string[ 'sudoku_creating'] = 'Creant <b>$a</b> sudoku';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Fi del joc de sudoku';
$string[ 'sudoku_guessnumber'] = 'Endevini el nombre correcte';
$string[ 'sudoku_noentriesfound'] = 'Cap paraula trobada al glossari';
//export.php
$string[ 'export'] = 'Exporta a mòbil';
$string[ 'html_hascheckbutton'] = 'Botó de prova:';
$string[ 'html_hasprintbutton'] = 'Botó impresió:';
$string[ 'html_title'] = 'Títol d\'html:';
$string[ 'javame_createdby'] = 'Creat per:';
$string[ 'javame_description'] = 'Descripció:';
$string[ 'javame_filename'] = 'Nom de l\'arxiu:';
$string[ 'javame_icon'] = 'Icona:';
$string[ 'javame_maxpictureheight'] = 'Alçada màxima de la imatge:';
$string[ 'javame_maxpicturewidth'] = 'Amplada màxima de la imatge:';
$string[ 'javame_name'] = 'Nom:';
$string[ 'javame_type'] = 'Tipus:';
$string[ 'javame_vendor'] = 'Venedor:';
$string[ 'javame_version'] = 'Versió';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Fí del joc</B></BIG>';
$string[ 'html_hangman_new'] = 'Nou';
//exporthtml_millionaire.php
$string[ 'millionaire_helppeople'] = 'Ajut del públic';
$string[ 'millionaire_info_people'] = 'La gent diu';
$string[ 'millionaire_info_telephone'] = 'Jo penso que la resposta correcta és';
$string[ 'millionaire_info_wrong_answer'] = 'La seva resposta és incorrecta<br>La resposta correcta és:';
$string[ 'millionaire_quit'] = 'Sortir';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'Pel millonari la font és $a o preguntes i no';
$string[ 'millionaire_telephone'] = 'Trucada telefònica';
$string[ 'must_select_questioncategory'] = 'Cal seleccionar una categoria de preguntes';
$string[ 'must_select_quiz'] = 'Cal seleccionar un qüestionari';
//exporthtml_snakes.php
$string[ 'score'] = 'Punts';
//index.php
$string[ 'modulename'] = 'Joc';
$string[ 'modulenameplural'] = 'Jocs';
$string[ 'pluginname'] = 'Joc';
//lib.php
$string[ 'attempt'] = 'Intent $a';
$string[ 'bookquiz_questions'] = 'Associa categories de preguntes amb capítuls del llibre';
$string[ 'export_to_html'] = 'Exportar a HTML';
$string[ 'export_to_javame'] = 'Exportar a Javame';
$string[ 'game_bookquiz'] = 'Llibre amb preguntes';
$string[ 'game_cross'] = 'Mots encreuats';
$string[ 'game_cryptex'] = 'Sopa de Lletres';
$string[ 'game_hangman'] = 'Penjat';
$string[ 'game_hiddenpicture'] = 'Imatge amagada';
$string[ 'game_millionaire'] = 'Millionari';
$string[ 'game_snakes'] = 'Serps i Escales';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Info';
$string[ 'noattempts'] = 'No s\'ha fet cap intent en aquest qüestionari';
$string[ 'percent'] = 'Percentatge';
$string[ 'results'] = 'Resultats';
$string[ 'showanswers'] = 'Mostrar respostes';
$string[ 'showattempts'] = 'Mostrar els intents';
//locallib.php
$string[ 'attemptfirst'] = 'Primer intent';
$string[ 'attemptlast'] = 'Darrer intent';
$string[ 'gradeaverage'] = 'Nota promig';
$string[ 'gradehighest'] = 'Nota més alta';
//mod_form.php
$string[ 'bottomtext'] = 'Text al final';
$string[ 'cross_layout'] = 'Disseny';
$string[ 'cross_layout0'] = 'Frases a la part inferior dels mots encreuats';
$string[ 'cross_layout1'] = 'Frases a la part dreta dels mots encreuats';
$string[ 'cross_maxcols'] = 'Nombre màxim de columnes dels mots encreuats';
$string[ 'cross_maxwords'] = 'Màxim nombre de paraules dels mots encreuats';
$string[ 'cross_options'] = 'Opcions dels Mots encreuats';
$string[ 'cryptex_maxcols'] = 'Máxim nombre de columnes/fileres en la Sopa de Lletres';
$string[ 'cryptex_maxtries'] = 'Nombre màxim d\'intents';
$string[ 'cryptex_maxwords'] = 'Màxim nombre de paraules en Sopa de Lletres';
$string[ 'cryptex_options'] = 'Opcions del Criptograma';
$string[ 'grademethod'] = 'Mètode de qüalificació';
$string[ 'hangman_allowspaces'] = 'Permetre espais en les paraules';
$string[ 'hangman_allowsub'] = 'Permetre símbols en las paraules';
$string[ 'hangman_imageset'] = 'Seleccioni les imatges pel penjat';
$string[ 'hangman_language'] = 'Idioma de les paraules';
$string[ 'hangman_maxtries'] = 'Nombre de paraules per joc';
$string[ 'hangman_options'] = 'Opcions del Penjat';
$string[ 'hangman_showcorrectanswer'] = 'Mostrar la resposta correcta després del final';
$string[ 'hangman_showfirst'] = 'Mostrar la primera lletra del penjat';
$string[ 'hangman_showlast'] = 'Mostrar la darrera lletra del penjat';
$string[ 'hangman_showquestion'] = '¿ Mostrar les preguntes ?';
$string[ 'hiddenpicture_across'] = 'Caselles horizontals';
$string[ 'hiddenpicture_down'] = 'Caselles verticals';
$string[ 'hiddenpicture_height'] = 'Establir l\'alçada de la imatge en';
$string[ 'hiddenpicture_options'] = '\'Imatge Amagada\' opcions';
$string[ 'hiddenpicture_pictureglossary'] = 'El glossari per la qüestió principal';
$string[ 'hiddenpicture_width'] = 'Establir l\'amplada de la imatge en';
$string[ 'millionaire_background'] = 'Color de fons';
$string[ 'millionaire_options'] = 'Opcions del Millionari';
$string[ 'millionaire_shuffle'] = 'Barrejar preguntes';
$string[ 'snakes_background'] = 'Fons';
$string[ 'snakes_cols'] = 'Columnes';
$string[ 'snakes_footerx'] = 'Espai inferior esquerre';
$string[ 'snakes_footery'] = 'Espai inferior dret';
$string[ 'snakes_headerx'] = 'Espai superior esquerre';
$string[ 'snakes_headery'] = 'Espai superior dret';
$string[ 'snakes_options'] = '\'Serps i Escales\' opcions';
$string[ 'snakes_rows'] = 'Fileres';
$string[ 'sourcemodule'] = 'Font de preguntes';
$string[ 'sourcemodule_book'] = 'Seleccioni un llibre';
$string[ 'sourcemodule_glossary'] = 'Seleccioni un glossari';
$string[ 'sourcemodule_glossarycategory'] = 'Seleccioni una categoria del glossario.';
$string[ 'sourcemodule_include_subcategories'] = 'Incloure subcategories';
$string[ 'sourcemodule_question'] = 'Preguntes';
$string[ 'sourcemodule_questioncategory'] = 'Seleccioni una categoria de preguntas';
$string[ 'sourcemodule_quiz'] = 'Seleccioni un qüestionari';
$string[ 'sudoku_maxquestions'] = 'Máxim nombre de preguntes';
$string[ 'sudoku_options'] = 'Opcions del Sudoku';
$string[ 'toptext'] = 'Text de la part superior';
$string[ 'userdefined'] = 'Definit per l\'usuari';
//preview.php
$string[ 'only_teachers'] = 'Només el professor pot veure aquesta pàgina';
$string[ 'preview'] = 'Visualitzar';
//review.php
$string[ 'attempts'] = 'Intents';
$string[ 'completedon'] = 'Completat en';
$string[ 'outof'] = '$a->grade de un màxim de $a->maxgrade';
$string[ 'review'] = 'Revisar';
$string[ 'reviewofattempt'] = 'Revisar intents $a';
$string[ 'startagain'] = 'Començar de nou';
$string[ 'timetaken'] = 'Temps utilitzat';
//showanswers.php
$string[ 'clearrepetitions'] = 'Esborrar estadístiques';
$string[ 'computerepetitions'] = 'Recalcular estadístiques';
$string[ 'feedbacks'] = 'Missatges de resposta correcta';
$string[ 'repetitions'] = 'Repeticions';
//showattempts.php
$string[ 'lastip'] = 'IP de l\'estudiant';
$string[ 'showsolution'] = 'solució';
$string[ 'timefinish'] = 'Fi del joc';
$string[ 'timelastattempt'] = 'Darrer intent';
$string[ 'timestart'] = 'Començament';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Intentar jugar ara';
$string[ 'continueattemptgame'] = 'Continueu un intent previ de joc';
$string[ 'reattemptgame'] = 'Joc de reintent';
$string[ 'yourfinalgradeis'] = 'La seva nota fina en aquest joc és $a.';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//cross/play.php $string[ 'win'] = 'Congratulations !!!';
//db/access.php $string[ 'game:grade'] = 'Grade games manually';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//db/access.php $string[ 'game:preview'] = 'Preview Games';
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions";
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.';
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.';
//exporthtml_snakes.php $string[ 'html_snakes_check'] = 'Check';
//exporthtml_snakes.php $string[ 'html_snakes_correct'] = 'Correct!';
//exporthtml_snakes.php $string[ 'html_snakes_no_selection'] = 'Have to select something!';
//exporthtml_snakes.php $string[ 'html_snakes_wrong'] = "Your answer isn't correct. Stay on the same seat.";
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'snakes_data'] = 'Positions of Snakes and Ladders';
//mod_form.php $string[ 'snakes_file'] = 'File for background';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//review.php $string[ 'showall'] = 'Show all';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

304
lang/de/game.php

@ -0,0 +1,304 @@
<?php // $Id: game.php,v 1.13 2012/07/30 06:00:16 bdaloukas Exp $
// translated to Deutsch (de) by Dimitris Mpelos, Joachim Vogelgesang, Klaus Steitz
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'OpenOffice Datei hinzufügen (odt)';
$string[ 'bookquiz_not_select_book'] = 'Sie haben kein Buch gewählt!';
$string[ 'bookquiz_subchapter'] = 'Unterkapitel erstellen';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'Das Buch ist leer.';
$string[ 'sudoku_submit'] = 'Antworten bewerten';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Kategorien';
$string[ 'bookquiz_chapters'] = 'Kapitel';
$string[ 'bookquiz_questions'] = 'Fragekategorien mit Buchkapiteln verknüpfen';
//cross/cross_class.php
$string[ 'lettersall'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
//cross/crossdb_class.php
$string[ 'and'] = 'und';
$string[ 'cross_correct'] = 'richtig';
$string[ 'cross_corrects'] = 'richtige';
$string[ 'cross_error'] = 'Fehler';
$string[ 'cross_errors'] = 'Fehler';
$string[ 'cross_found_many'] = 'gefunden';
$string[ 'cross_found_one'] = 'gefunden';
$string[ 'grade'] = 'Bewertung';
//cross/play.php
$string[ 'cross_across'] = 'waagerecht';
$string[ 'cross_checkbutton'] = 'Kreuzworträtsel kontrollieren';
$string[ 'cross_down'] = 'senkrecht';
$string[ 'cross_endofgamebutton'] = 'Ende des Kreuzworträtselspiels';
$string[ 'cross_error_containsbadchars'] = 'Das Wort enthält ungültige Symbole';
$string[ 'cross_error_wordlength1'] = 'Das richtige Wort enthält ';
$string[ 'cross_error_wordlength2'] = ' Buchstaben.';
$string[ 'cross_pleasewait'] = 'Bitte warten, Rätsel wird geladen';
$string[ 'cross_welcome'] = '<h3>Willkommen zum Kreuzworträtsel!</h3><p>Klicken Sie links auf eine Wortlücke um zu beginnen.</p>';
$string[ 'letter'] = 'Buchstabe';
$string[ 'letters'] = 'Buchstaben';
$string[ 'nextgame'] = 'Neues Spiel';
$string[ 'no_words'] = 'Keine Wörter gefunden!';
$string[ 'print'] = 'Drucken';
$string[ 'win'] = 'Glückwunsch, Sie haben gewonnen !!!';
//cryptex/play.php
$string[ 'finish'] = 'Spiel beenden';
//db/access.php
$string[ 'game:attempt'] = 'Spiel starten';
$string[ 'game:deleteattempts'] = 'Versuche löschen';
$string[ 'game:grade'] = 'Spiele manuell bewerten';
$string[ 'game:manage'] = 'Verwalten';
$string[ 'game:manageoverrides'] = 'Manage game overrides';
$string[ 'game:preview'] = 'Vorschau der Spiele';
$string[ 'game:reviewmyattempts'] = 'Meine Versuche wiederholen';
$string[ 'game:view'] = 'ansehen';
$string[ 'game:viewreports'] = 'Berichte ansehen';
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'Der richtige Satz war: ';
$string[ 'hangman_correct_word'] = 'Das richtige Wort war: ';
$string[ 'hangman_gradeinstance'] = 'Bewertung des gesamten Spiels';
$string[ 'hangman_letters'] = 'Buchstaben: ';
$string[ 'hangman_restletters_many'] = 'Sie haben <b>{$a}</b> Versuche';
$string[ 'hangman_restletters_one'] = 'Sie haben <b>ONLY 1</b> Versuche';
$string[ 'hangman_wrongnum'] = 'Falsch: %d von %d';
$string[ 'nextword'] = 'nächstes Wort';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = 'Meine Antwort bewerten';
$string[ 'hiddenpicture_nocols'] = 'Die Anzahl der horizontalen Spalten muss angegeben werden';
$string[ 'hiddenpicture_nomainquestion'] = 'Es gibt keine Wörterbucheinträge im Wörterbuch {$a->name} mit angefügtem Bild';
$string[ 'hiddenpicture_norows'] = 'Die Anzahl der vertikalen Spalten muss angegeben werden.';
$string[ 'must_select_glossary'] = 'Wähle ein Glossar';
$string[ 'no_questions'] = 'Es sind keine Fragen vorhanden';
$string[ 'noglossaryentriesfound'] = 'Keine Wörterbucheinträge gefunden';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Sie müssen eine Kategorie wählen';
$string[ 'millionaire_must_select_quiz'] = 'Sie müssen ein Quiz wählen';
//report/overview/report.php
$string[ 'allattempts'] = 'Zeige alle Versuche';
$string[ 'allstudents'] = 'Alle anzeigen $a';
$string[ 'attemptduration'] = 'Benötigte Zeit';
$string[ 'attemptsonly'] = 'Nur Teilnehmer mit Versuchen zeigen';
$string[ 'deleteattemptcheck'] = 'Sind Sie sicher, dass Sie diese(n) Versuch(e) löschen wollen?';
$string[ 'displayoptions'] = 'Anzeige-Optionen';
$string[ 'downloadods'] = 'Download im ODS-Format';
$string[ 'feedback'] = 'Rückmeldung';
$string[ 'noattemptsonly'] = 'Nur $a ohne Versuche anzeigen';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring absolvierte(n) $a->attemptnum Versuch(e)';
$string[ 'pagesize'] = 'Fragen pro Seite:';
$string[ 'reportoverview'] = 'Überblick';
$string[ 'selectall'] = 'Alle auswählen';
$string[ 'selectnone'] = 'Alle abwählen';
$string[ 'showdetailedmarks'] = 'Bewertungsdetails anzeigen';
$string[ 'startedon'] = 'Gestartet am';
$string[ 'timecompleted'] = 'Abgeschlossen';
$string[ 'unfinished'] = 'offen';
$string[ 'withselected'] = 'ausgewählte';
//snakes/play.php
$string[ 'snakes_dice'] = 'Würfle, {$a} Augen.';
$string[ 'snakes_player'] = 'Spieler, Position: $a.';
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Anzahl der Sudokus, die erstellt werden';
$string[ 'sudoku_create_start'] = 'Beginne mit dem Erstellen';
$string[ 'sudoku_creating'] = 'Erstelle <b>{$a}</b> Sudoku';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Ende des Sudoku Spiels';
$string[ 'sudoku_guessnumber'] = 'Die richtige Nummer erraten';
$string[ 'sudoku_noentriesfound'] = 'Keine Wörter im Wörterbuch gefunden!';
//export.php
$string[ 'export'] = 'Export';
$string[ 'html_hascheckbutton'] = 'Prüftaste:';
$string[ 'html_hasprintbutton'] = 'Drucktaste:';
$string[ 'html_title'] = 'Titel der html-Datei (Browser-Titelzeile):';
$string[ 'javame_createdby'] = 'Erstellt von:';
$string[ 'javame_description'] = 'Beschreibung:';
$string[ 'javame_filename'] = 'Dateiname:';
$string[ 'javame_icon'] = 'Icon:';
$string[ 'javame_maxpictureheight'] = 'Größte Bildhöhe:';
$string[ 'javame_maxpicturewidth'] = 'Größte Bildbreite:';
$string[ 'javame_name'] = 'Name:';
$string[ 'javame_type'] = 'Typ:';
$string[ 'javame_vendor'] = 'Anbieter:';
$string[ 'javame_version'] = 'Version:';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Sie haben verloren!</B></BIG>';
$string[ 'html_hangman_new'] = 'Neu';
//exporthtml_millionaire.php
$string[ 'millionaire_helppeople'] = 'Publikums-Joker';
$string[ 'millionaire_info_people'] = 'Ergebnis';
$string[ 'millionaire_info_telephone'] = 'Ich glaube, die richtige Antwort ist';
$string[ 'millionaire_info_wrong_answer'] = 'Ihre Antwort ist falsch!<br>Die richtige Antwort ist:';
$string[ 'millionaire_quit'] = 'Spiel beenden';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'Für Wer wird Millionär: die Quelle der Fragen muss {$a} oder Fragen sein, und nicht';
$string[ 'millionaire_telephone'] = 'Telefon-Joker';
$string[ 'must_select_questioncategory'] = 'Sie müssen eine Fragenkategorie wählen!';
$string[ 'must_select_quiz'] = 'Sie müssen einen Test auswählen';
//exporthtml_snakes.php
$string[ 'html_snakes_check'] = 'Wähle';
$string[ 'html_snakes_correct'] = 'Richtig!';
$string[ 'html_snakes_no_selection'] = 'Bitte wählen Sie etwas aus!';
$string[ 'html_snakes_wrong'] = 'Ihre Antwort ist falsch. Sie bleiben auf dem gleichen Feld.';
$string[ 'score'] = 'Bewertung';
//index.php
$string[ 'helpbookquiz'] = 'Nach korrekter Beantwortung der Frage kann das nächste Kapitel geöffnet werden.';
$string[ 'helpcross'] = 'Dieses Spiel verwendet Wörter aus Glossaren oder Kurzantwort-Fragen aus Tests zur Generierung eines Kreuzworträtsels. Sie können die maximalen Zeilen und Spalten einstellen. Die Teilnehmenden können zum Überprüfen ihrer Antworten auf "Kreuzworträtsel kontrollieren" klicken. Die Rätsel werden dynamisch generiert und sehen dadurch bei jedem Versuch anders aus.';
$string[ 'helpcryptex'] = 'Bei diesem Spiel werden wie bei einen Kreuzworträtsel die Umschreibungen der gesuchten Wörter angegeben. Die Wörter sind aber bereits in einem Gitter versteckt waagrecht oder senkrecht angeordnet. Bei jedem neuen Versuch werden die Wörter wieder anders angeordnet.';
$string[ 'helphangman'] = 'Dieses Spiel verwendet Wörter aus Glossaren oder Kurzantwort-Fragen aus Tests als Begriffe für Galgenmännchen. Sie können die Anzahl der Wörter des Spiels einstellen, ob der erste oder letzte Buchstabe angezeigt werden soll und, ob die Frage oder Antwort am Ende angezeigt werden soll.';
$string[ 'helphiddenpicture'] = 'Mit jeder richtigen Antwort wird ein Stück eines verdeckten Bildes enthüllt. Mit jeder Zahl auf dem Bild ist eine Frage verknüpft. Nach richtiger Beantwortung der Frage wird der entsprechende Bereich des Bildes sichtbar.';
$string[ 'helpmillionaire'] = 'In dieser Simulation des bekannten "Wer wird Millionär?" Spiels können solange neue Fragen beantwortet werden bis die Antwort falsch ist. Mit jeder richtigen Antwort steigt der virtuell erspielte Betrag. Genau wie im Original stehen drei Joker zur Verfügung. Als Quelle dienen Multiple Choice Fragen mit vier möglichen Antworten, von denen eine korrekt ist.';
$string[ 'helpsnakes'] = 'Durch richtiges Beantworten der Fragen im Leiterspiel kann um die durch den Würfel angezeigte Zahl vorgerückt werden. Endet der Zug auf dem Anfangsfeld einer Leiter, wird auf deren Endfeld vorgerückt. Endet er auf einer Schlange, wird auf deren Endfeld zurück gerückt, das näher am Start liegt.';
$string[ 'helpsudoku'] = 'Dieses Spiel generiert ein Sudoku-Rätsel, das nicht genügend Ziffern enthält, um es lösen zu können. Mit jeder richtig beantworteten Frage wird eine Ziffer ergänzt, um das Sudoku einfacher lösen zu können.';
$string[ 'modulename'] = 'Spiel';
$string[ 'modulenameplural'] = 'Spiele';
$string[ 'pluginadministration'] = 'Spielaktivitätsverwaltung';
$string[ 'pluginname'] = 'Spiel';
//lib.php
$string[ 'attempt'] = 'Versuch';
$string[ 'bookquiz_questions'] = 'Verknüpfe Fragenkategorie zu Buchkapitel';
$string[ 'export_to_html'] = 'Export nach HTML';
$string[ 'export_to_javame'] = 'Export nach Javame';
$string[ 'game_bookquiz'] = 'Buch mit Fragen';
$string[ 'game_cross'] = 'Kreuzworträtsel';
$string[ 'game_cryptex'] = 'Suchrätsel';
$string[ 'game_hangman'] = 'Galgenmännchen';
$string[ 'game_hiddenpicture'] = 'Verstecktes Bild';
$string[ 'game_millionaire'] = 'Wer wird Millionär';
$string[ 'game_snakes'] = 'Schlangen und Leitern';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Info';
$string[ 'noattempts'] = 'Für dieses Spiel wurden keine Versuche gemacht';
$string[ 'percent'] = 'Prozent';
$string[ 'reset_game_all'] = 'Versuche aller Spiele löschen';
$string[ 'reset_game_deleted_course'] = 'Versuche gelöschter Kurse löschen';
$string[ 'results'] = 'Ergebnisse';
$string[ 'showanswers'] = 'Antworten zeigen';
$string[ 'showattempts'] = 'Versuche anzeigen';
//locallib.php
$string[ 'attemptfirst'] = 'Erster Versuch';
$string[ 'attemptlast'] = 'Letzter Versuch';
$string[ 'convertfrom'] = '-';
$string[ 'convertto'] = '-';
$string[ 'gradeaverage'] = 'Durchschnittsbewertung';
$string[ 'gradehighest'] = 'Höchste Bewertung';
//mod_form.php
$string[ 'bookquiz_layout'] = 'Layout';
$string[ 'bookquiz_layout0'] = 'Fragen oben anzeigen';
$string[ 'bookquiz_layout1'] = 'Fragen unten anzeigen';
$string[ 'bookquiz_options'] = 'Buch Optionen';
$string[ 'bottomtext'] = 'Text am Ende der Seite';
$string[ 'cross_layout'] = 'Layout';
$string[ 'cross_layout0'] = 'Sätze auf der Unterseite des Kreuzes';
$string[ 'cross_layout1'] = 'Sätze rechts des Kreuzes';
$string[ 'cross_maxcols'] = 'Höchstzahl an Zeilen des Kreuzworträtsels';
$string[ 'cross_maxwords'] = 'Höchstzahl von Wörtern des Kreuzworträtsels';
$string[ 'cross_options'] = 'Kreuzworträtsel-Optionen';
$string[ 'cryptex_maxcols'] = 'Maximale Spalten/Zeilen des Rätsels';
$string[ 'cryptex_maxtries'] = 'Maximale Versuche';
$string[ 'cryptex_maxwords'] = 'Maximale Anzahl an Wörtern des Rätsels';
$string[ 'cryptex_options'] = 'Rätsel-Optionen';
$string[ 'gameclose'] = 'Spiel schließen';
$string[ 'gameopen'] = 'Spiel öffnen';
$string[ 'grademethod'] = 'Bewertungsmethode';
$string[ 'hangman_allowspaces'] = 'Wortzwischenräume erlauben';
$string[ 'hangman_allowsub'] = 'Symbol in Wörtern erlauben';
$string[ 'hangman_imageset'] = 'Das Bild des Spiels wählen';
$string[ 'hangman_language'] = 'Wortsprache';
$string[ 'hangman_maximum_number_of_errors'] = 'Maximale Anzahl von Versuchen (Bilder mit Namensschema hangman_0.jpg, hangman_1.jpg, ...)';
$string[ 'hangman_maxtries'] = 'Wörterzahl pro Spiel';
$string[ 'hangman_options'] = 'Galgenmännchen-Optionen';
$string[ 'hangman_showcorrectanswer'] = 'Die richtige Anwort erscheint am Ende des Spiels';
$string[ 'hangman_showfirst'] = 'Ersten Buchstaben des Wortes zeigen';
$string[ 'hangman_showlast'] = 'Letzten Buchstaben des Wortes zeigen';
$string[ 'hangman_showquestion'] = 'Fragen zeigen?';
$string[ 'hiddenpicture_across'] = 'Horizontale Zellen';
$string[ 'hiddenpicture_down'] = 'Vertikale Zellen';
$string[ 'hiddenpicture_height'] = 'Höhe des Bildes';
$string[ 'hiddenpicture_options'] = '\'Verstecktes Bild\' Optionen';
$string[ 'hiddenpicture_pictureglossary'] = 'Wörterbuch für Hauptfrage und Bild';
$string[ 'hiddenpicture_width'] = 'Breite des Bildes';
$string[ 'millionaire_background'] = 'Hintergrundfarbe';
$string[ 'millionaire_options'] = 'Millionär-Optionen';
$string[ 'millionaire_shuffle'] = 'Zufallsfragen';
$string[ 'snakes_background'] = 'Hintergrund';
$string[ 'snakes_cols'] = 'Spalten';
$string[ 'snakes_data'] = 'Positionen für Schlangen und Leitern';
$string[ 'snakes_file'] = 'Datei für Hintergrund';
$string[ 'snakes_footerx'] = 'Raum unten links';
$string[ 'snakes_footery'] = 'Raum unten rechts';
$string[ 'snakes_headerx'] = 'Raum nach links oben';
$string[ 'snakes_headery'] = 'Raum nach links unten';
$string[ 'snakes_layout0'] = 'Frage über dem Bild';
$string[ 'snakes_layout1'] = 'Frage unter dem Bild';
$string[ 'snakes_options'] = '\'Schlangen und Leitern\' Optionen';
$string[ 'snakes_rows'] = 'Reihen';
$string[ 'sourcemodule'] = 'Fragen-Quelle';
$string[ 'sourcemodule_book'] = 'Ein Buch wählen';
$string[ 'sourcemodule_glossary'] = 'Wörtebuch wählen';
$string[ 'sourcemodule_glossarycategory'] = 'Wörtebuch-Kategorie wählen!';
$string[ 'sourcemodule_include_subcategories'] = 'Unterkategorien einschließen';
$string[ 'sourcemodule_question'] = 'Fragen';
$string[ 'sourcemodule_questioncategory'] = 'Fragenkategorie wählen';
$string[ 'sourcemodule_quiz'] = 'Quiz wählen';
$string[ 'sudoku_maxquestions'] = 'Maximale Anzahl von Fragen erreicht';
$string[ 'sudoku_options'] = 'Sudoku-Optionen';
$string[ 'toptext'] = 'Text oben';
$string[ 'userdefined'] = 'benutzerdefiniert';
//preview.php
$string[ 'only_teachers'] = 'Nur Lehrende können diese Seite sehen';
$string[ 'preview'] = 'Vorschau';
//review.php
$string[ 'attempts'] = 'Versuche';
$string[ 'completedon'] = 'Beendet am';
$string[ 'outof'] = '{$a->grade} von maximal {$a->maxgrade}';
$string[ 'review'] = 'Überprüfung';
$string[ 'reviewofattempt'] = 'Überprüfung eines Versuchs {$a}';
$string[ 'showall'] = 'Zeige alle';
$string[ 'startagain'] = 'Neu starten';
$string[ 'timetaken'] = 'Zeitaufwand';
//showanswers.php
$string[ 'clearrepetitions'] = 'Statistiken löschen';
$string[ 'computerepetitions'] = 'Statistiken neu berechnen';
$string[ 'feedbacks'] = 'Meldungen bei korrekter Antwort';
$string[ 'repetitions'] = 'Wiederholungen';
//showattempts.php
$string[ 'lastip'] = 'Benutzer IP';
$string[ 'showsolution'] = 'Lösung';
$string[ 'timefinish'] = 'Spiel beendet';
$string[ 'timelastattempt'] = 'Letzter Versuch';
$string[ 'timestart'] = 'Start';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Jetzt Spiel starten';
$string[ 'comment'] = 'Kommentar';
$string[ 'continueattemptgame'] = 'Einen früheren Versuch des Spiels fortführen';
$string[ 'gameclosed'] = 'Das Spiel ist beendet {$a}';
$string[ 'gamecloseson'] = 'Das Spiel endet um {$a}';
$string[ 'gamenotavailable'] = 'Das Spiel ist erst verfügbar ab {$a}';
$string[ 'gameopenedon'] = 'Das Spiel begann um {$a}';
$string[ 'reattemptgame'] = 'Spiel nochmals probieren';
$string[ 'yourfinalgradeis'] = 'Ihre Endbewertung für dieses Spiel ist {$a}.';

307
lang/el/game.php

@ -0,0 +1,307 @@
<?php // $Id: game.php,v 1.13 2012/07/26 05:38:59 bdaloukas Exp $
// game.php - created with Moodle 2.0
// translated to Ελληνικά (el) by Vasilis Daloukas
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Εισαγωγή από ένα αρχείο OpenOffice (odt)';
$string[ 'bookquiz_not_select_book'] = 'Δεν έχετε επιλέξει βιβλίο';
$string[ 'bookquiz_subchapter'] = 'Δημιουργία υποκεφαλαίων';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'Το βιβλίο είναι άδειο';
$string[ 'sudoku_submit'] = 'Βαθμολόγηση απαντήσεων';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Κατηγορίες';
$string[ 'bookquiz_chapters'] = 'Κεφάλαια';
$string[ 'bookquiz_numquestions'] = 'Ερωτήσεις';
//cross/cross_class.php
$string[ 'lettersall'] = 'ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ';
//cross/crossdb_class.php
$string[ 'and'] = 'και';
$string[ 'cross_correct'] = 'σωστό';
$string[ 'cross_corrects'] = 'σωστά';
$string[ 'cross_error'] = 'λάθος';
$string[ 'cross_errors'] = 'λάθη';
$string[ 'cross_found_many'] = 'Βρέθηκαν';
$string[ 'cross_found_one'] = 'Βρέθηκε';
$string[ 'grade'] = 'Βαθμός';
//cross/play.php
$string[ 'cross_across'] = 'Οριζόντια';
$string[ 'cross_checkbutton'] = 'Έλεγχος σταυρολέξου';
$string[ 'cross_down'] = 'Κατακόρυφα';
$string[ 'cross_endofgamebutton'] = 'Τέλος του σταυρολέξου';
$string[ 'cross_error_containsbadchars'] = 'Η λέξη που δώσατε περιέχει μη επιτρεπτούς χαρακτήρες';
$string[ 'cross_error_wordlength1'] = 'Η σωστή λέξη περιέχει ';
$string[ 'cross_error_wordlength2'] = ' γράμματα.';
$string[ 'cross_pleasewait'] = 'Παρακαλώ περιμένετε όση ώρα το σταυρόλεξο φορτώνει';
$string[ 'cross_welcome'] = '<h3>Καλωσήρθατε!</h3><p>Κάντε κλικ σε μία λέξη για να ξεκινήσετε.</p>';
$string[ 'letter'] = 'γράμμα';
$string[ 'letters'] = 'γράμματα';
$string[ 'nextgame'] = 'Νέο παιχνίδι';
$string[ 'no_words'] = 'Δεν βρέθηκε καμία λέξη';
$string[ 'print'] = 'Εκτύπωση';
$string[ 'win'] = 'Συγχαρητήρια !!!';
//cryptex/play.php
$string[ 'finish'] = 'Τέλος παιχνιδιού';
//db/access.php
$string[ 'game:attempt'] = 'Παίξιμο παιχνιδιών';
$string[ 'game:deleteattempts'] = 'Διαγραφή προσπαθειών του παιχνιδιού';
$string[ 'game:grade'] = 'Χειροκίνηση βαθμολόγηση των παιχνιδιών';
$string[ 'game:manage'] = 'Διαχείριση των παιχνιδιών';
$string[ 'game:preview'] = 'Προεπισκόπηση των παιχνιδιών';
$string[ 'game:reviewmyattempts'] = 'Ανασκόπηση των δικών σου προσπαθειών';
$string[ 'game:view'] = 'Εμφάνιση πληροφοριών του παιχνιδιού';
$string[ 'game:viewreports'] = 'Εμφάνιση των αναφορών του παιχνιδιού';
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'Η σωστή φράση ήταν: ';
$string[ 'hangman_correct_word'] = 'Η σωστή λέξη ήταν: ';
$string[ 'hangman_gradeinstance'] = 'Βαθμολογία σε όλο το παιχνίδι';
$string[ 'hangman_letters'] = 'Γράμματα : ';
$string[ 'hangman_restletters_many'] = 'Έχετε <b>{$a}</b> προσπάθειες ακόμη';
$string[ 'hangman_restletters_one'] = 'Έχετε ακόμη <b>ΜΟΝΟ 1</b> προσπάθεια';
$string[ 'hangman_wrongnum'] = 'Λανθασμένα: %%d out of %%d';
$string[ 'nextword'] = 'Επόμενη λέξη';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = "Βαθμολόγησε την κυρίως ερώτηση";
$string[ 'hiddenpicture_nocols'] = 'Πρέπει να ορίσετε τον αριθμό των κελιών οριζόντια';
$string[ 'hiddenpicture_nomainquestion'] = 'Δεν υπάρχει καμία εγγραφή στο λεξικό {$a->name} που να περιλαμβάνει και εικόνα';
$string[ 'hiddenpicture_norows'] = 'Πρέπει να ορίσετε τον αριθμό των κελιών κατακόρυφα';
$string[ 'must_select_glossary'] = 'Πρέπει να επιλέξετε οπωσδήποτε ένα λεξιλόγιο';
$string[ 'no_questions'] = 'Δεν βρέθηκαν ερωτήσεις';
$string[ 'noglossaryentriesfound'] = 'Δεν βρέθηκαν λέξεις στο λεξικό';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Πρέπει οπωσδήποτε να διαλέξετε μία κατηγορία ερωτήσεων';
$string[ 'millionaire_must_select_quiz'] = 'Πρέπει οπωσδήποτε να διαλέξετε ένα Κουίζ';
//report/overview/report.php
$string[ 'allattempts'] = 'Δείξε όλες τις προσπάθειες';
$string[ 'allstudents'] = 'Δείξε όλα {$a}';
$string[ 'attemptduration'] = 'Διάρκεια παιχνιδιού';
$string[ 'attemptsonly'] = 'Δείξε μόνο τους μαθητές που έχουν προσπαθήσει';
$string[ 'deleteattemptcheck'] = 'Είστε απόλυτα σίγουροι ότι θέλετε να σβήσετε αυτές τις προσπάθειες;';
$string[ 'displayoptions'] = 'Εμφάνιση παραμέτρων';
$string[ 'downloadods'] = 'Αποθήκευση σε μορφή ODS';
$string[ 'feedback'] = 'Απάντηση';
$string[ 'noattemptsonly'] = 'Εμφάνιση {$a} που δεν έχουν καθόλου προσπάθειες';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring έκαναν $a->attemptnum προσπάθειες';
$string[ 'pagesize'] = 'Ερωτήσεις ανά σελίδα:';
$string[ 'reportoverview'] = 'Σύνοψη';
$string[ 'selectall'] = 'Επιλογή όλων';
$string[ 'selectnone'] = 'Αποεπιλογή όλων';
$string[ 'showdetailedmarks'] = 'Λεπτομέρειες ερωτήσεων';
$string[ 'startedon'] = 'Ξεκίνησε στις';
$string[ 'timecompleted'] = 'Συμπληρωμένο';
$string[ 'unfinished'] = 'Ατελείωτο';
$string[ 'withselected'] = 'Με τα επιλεγμένα';
//snakes/play.php
$string[ 'snakes_dice'] = 'Το ζάρι έφερε {$a}.';
$string[ 'snakes_player'] = 'Η τρέχουσα θέση του παίχτη είναι: {$a}.';
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Αριθμός από sudoku που θα δημιουργηθούν';
$string[ 'sudoku_create_start'] = 'Έναρξη δημιουργίας sudoku';
$string[ 'sudoku_creating'] = 'Δημιουργήθηκε <b>{$a}</b> sudoku';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Τέλος παιχνιδιού';
$string[ 'sudoku_guessnumber'] = 'Μαντέψτε το νούμερο';
$string[ 'sudoku_noentriesfound'] = 'Δεν βρέθηκαν λέξεις στο λεξικό';
//export.php
$string[ 'export'] = 'Εξαγωγή';
$string[ 'html_hascheckbutton'] = 'Να έχει κουμπί ελέγχου σωστής απάντησης:';
$string[ 'html_hasprintbutton'] = 'Να έχει κουμπί εκτύπωσης:';
$string[ 'html_title'] = 'Τίτλος της ιστοσελίδας:';
$string[ 'javame_createdby'] = 'Δημιουργήθηκε από:';
$string[ 'javame_description'] = 'Περιγραφή:';
$string[ 'javame_filename'] = 'Όνομα αρχείου:';
$string[ 'javame_icon'] = 'Εικονίδιο:';
$string[ 'javame_maxpictureheight'] = 'Μέγιστο ύψος εικόνας:';
$string[ 'javame_maxpicturewidth'] = 'Μέγιστο πλάτος εικόνας:';
$string[ 'javame_name'] = 'Όνομα:';
$string[ 'javame_type'] = 'Τύπος:';
$string[ 'javame_vendor'] = 'Vendor:';
$string[ 'javame_version'] = 'Έκδοση:';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Τέλος παιχνιδιού</B></BIG>';
$string[ 'html_hangman_new'] = 'Νέα';
//exporthtml_millionaire.php
$string[ 'millionaire_helppeople'] = 'Βοήθεια του κοινού';
$string[ 'millionaire_info_people'] = 'Το κοινό λέει';
$string[ 'millionaire_info_telephone'] = 'Νομίζω ότι σωστή απάντηση είναι η';
$string[ 'millionaire_info_wrong_answer'] = 'Η απάντησή σας είναι λάθος<br>Η σωστή απάντηση είναι η :';
$string[ 'millionaire_quit'] = 'Έξοδος';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'Για τον εκατομμυριούχο η πηγή των ερωτήσεων έπρεπε να είναι {$a} ή Ερωτήσεις και όχι';
$string[ 'millionaire_telephone'] = 'Βοήθεια του τηλεφώνου';
$string[ 'must_select_questioncategory'] = 'Πρέπει να επιλέξετε οπωσδήποτε μία κατηγορία ερωτήσεων';
$string[ 'must_select_quiz'] = 'Πρέπει να επιλέξετε ένα κουίζ';
//exporthtml_snakes.php
$string[ 'html_snakes_check'] = 'Έλεγχος';
$string[ 'html_snakes_correct'] = 'Πολύ σωστά!';
$string[ 'html_snakes_no_selection'] = 'Δεν επιλέξατε κάτι!';
$string[ 'html_snakes_wrong'] = "Η απάντησή σου ήταν λάθος. Παραμένεις στη θέση σου.";
$string[ 'score'] = 'Βαθμολογία';
//index.php
$string[ 'helpbookquiz'] = 'Όταν ο μαθητής απαντά σωστά μια ερώτηση πάει στο επόμενο κεφάλαιο του βιβλίου.';
$string[ 'helpcross'] = 'Αυτό το παιχνίδι δέχεται λέξεις από το λεξικό ή τη βάση ερωτήσεων του Moodle και δημιουργεί ένα τυχαίο σταυρόλεξο. Ο καθηγητής μπορεί να ορίσει το μέγιστο αριθμό γραμμών/στηλών ή λέξεων. Κάθε σταυρόλεξο είναι δυναμικό και έτσι ο κάθε μαθητής βλέπει διαφορετικό σταυρόλεξο.';
$string[ 'helpcryptex'] = 'Αυτό το παιχνίδι μοιάζει με το σταυρόλεξο αλλά οι απαντήσεις είναι κρυμμένες μέσα στο κρυπτόλεξο οριζόντια ή κατακόρυφα.';
$string[ 'helphangman'] = 'Αυτό το παιχνίδι χρησιμοποιεί λέξεις από το λεξικό ή τη βάση ερωτήσεων του Moodle και δημιουργεί το γνωστό παιχνίδι Κρεμάλα. Ο καθηγητής μπορεί να καθορίσει τον αριθμό των λέξεων που θα περιέχει κάθε παιχνίδι, αν θα δείχνει το πρώτο ή το τελευταίο γράμμα ή αν θα εμφανίζει την απάντηση στο τέλος.';
$string[ 'helphiddenpicture'] = 'Το παιχνίδι αυτό μετά από κάθε επιτυχημένη απάντηση σε μια ερώτηση αποκαλύπτει ένα μικρό κομμάτι της εικόνας βοηθώντας έτσι το μαθητή να απαντήσει στην κυρίως ερώτηση.';
$string[ 'helpmillionaire'] = 'Σε αυτό το παιχνίδι εμφανίζεται μια ερώτηση πολλαπλής επιλογής και αν ο μαθητής την απαντήσει σωστά προχωρά στο επόμενο επίπεδο.';
$string[ 'helpsnakes'] = 'Αυτό το παιχνίδι εμφανίζει στο μαθητή ένα ζάρι και μια ερώτηση. Αν ο μαθητής απαντήσει σωστά στην ερώτηση προχωράει στην πίστα τόσες θέσεις όσες λέει το ζάρι.';
$string[ 'helpsudoku'] = 'Αυτό το παιχνίδι εμφανίζει ένα άλυτο sudoku. Σε κάποια τετράγωνα υπάρχουν ερωτήσεις. Αν ο μαθητής απαντήσει σωστά μια τέτοια ερώτηση του αποκαλύπτει το νούμερο που υπάρχει σε αυτό το τετράγωνο.';
$string[ 'modulename'] = 'Παιχνίδι';
$string[ 'modulenameplural'] = 'Παιχνίδια';
$string[ 'pluginadministration'] = 'Διαχείριση παιχνιδιού';
$string[ 'pluginname'] = 'Παιχνίδι';
//lib.php
$string[ 'attempt'] = 'Προσπάθεια';
$string[ 'bookquiz_questions'] = 'Αντιστοίχιση κατηγοριών ερωτήσεων με κεφάλαια';
$string[ 'export_to_html'] = 'Εξαγωγή σε HTML';
$string[ 'export_to_javame'] = 'Εξαγωγή σε JavaMe για κινητά τηλέφωνα';
$string[ 'game_bookquiz'] = 'Βιβλίο με ερωτήσεις';
$string[ 'game_cross'] = 'Σταυρόλεξο';
$string[ 'game_cryptex'] = 'Κρυπτόλεξο';
$string[ 'game_hangman'] = 'Κρεμάλα';
$string[ 'game_hiddenpicture'] = "Η κρυμμένη εικόνα";
$string[ 'game_millionaire'] = 'Εκατομμυριούχος';
$string[ 'game_snakes'] = 'Φιδάκι';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Πληροφορίες';
$string[ 'noattempts'] = 'Καμιά προσπάθεια δεν έγινε γι\' αυτό το παιχνίδι';
$string[ 'percent'] = 'Ποσοστό';
$string[ 'reset_game_all'] = 'Διαγραφή προσπαθειών από όλα τα παιχνίδια';
$string[ 'reset_game_deleted_course'] = 'Διαγραφή προσπαθειών από όλα τα διαγραμμένα μαθήματα';
$string[ 'results'] = 'Αποτελέσματα';
$string[ 'showanswers'] = 'Εμφάνιση απαντήσεων';
$string[ 'showattempts'] = 'Εμφάνιση προσπαθειών';
//locallib.php
$string[ 'attemptfirst'] = 'Πρώτη προσπάθεια';
$string[ 'attemptlast'] = 'Τελευταία προσπάθεια';
$string[ 'convertfrom'] = 'ἈΆἈἈἊΈἘἚΕΕΉΊΪἸἹΌΎΫύΏῶῶ';
$string[ 'convertto'] = 'ΑΑΑΑΑΕΕΕΕΕΗΙΙΙΙΟΥΥΥΩΩΩ';
$string[ 'gradeaverage'] = 'Μέσος βαθμός';
$string[ 'gradehighest'] = 'Ο υψηλότερος βαθμός';
//mod_form.php
$string[ 'bookquiz_layout'] = 'Μορφή εμφάνισης';
$string[ 'bookquiz_layout0'] = 'Εμφάνιση των ερωτήσεων στο πάνω μέρος του βιβλίου';
$string[ 'bookquiz_layout1'] = 'Εμφάνιση των ερωτήσεων στο κάτω μέρος του βιβλίου';
$string[ 'bookquiz_options'] = 'Παράμετροι του παιχνιδίου "Βιβλίο με ερωτήσεις"';
$string[ 'bottomtext'] = 'Κείμενο στο κάτω μέρος της σελίδας';
$string[ 'cross_layout'] = 'Τρόπος εμφάνισης';
$string[ 'cross_layout0'] = 'Οι ορισμοί κάτω από το σταυρόλεξο';
$string[ 'cross_layout1'] = 'Οι ορισμοί στα δεξιά του σταυρολέξου';
$string[ 'cross_maxcols'] = 'Μέγιστος αριθμός γραμμών/στηλών στο σταυρόλεξο';
$string[ 'cross_maxwords'] = 'Μέγιστος αριθμός λέξεων στο σταυρόλεξο';
$string[ 'cross_options'] = 'Παράμετροι Σταυρολέξου';
$string[ 'cryptex_maxcols'] = 'Μέγιστος αριθμός γραμμών/στηλών στο κρυπτόλεξο';
$string[ 'cryptex_maxtries'] = 'Μέγιστος αριθμός προσπαθειών';
$string[ 'cryptex_maxwords'] = 'Μέγιστος αριθμός λέξεων στο κρυπτόλεξο';
$string[ 'cryptex_options'] = 'Παράμετροι Κρυπτόλεξου';
$string[ 'gameclose'] = 'Κλείσιμο του παιχνιδιού';
$string[ 'gameopen'] = 'Άνοιγμα του παιχνιδιού';
$string[ 'grademethod'] = 'Μέθοδος βαθμολόγησης';
$string[ 'hangman_allowspaces'] = 'Να επιτρέπονται τα κενά στις λέξεις';
$string[ 'hangman_allowsub'] = 'Nα επιτρέπεται το σύμβολο - στις λέξεις';
$string[ 'hangman_imageset'] = 'Διαλέξτε συλλογή φωτογραφιών';
$string[ 'hangman_language'] = 'Γλώσσα στην οποία είναι οι λέξεις';
$string[ 'hangman_maximum_number_of_errors'] = 'Μέγιστος αριθμός λάθος γραμμάτων (πρέπει να υπάρχουν τα αντίστοιχα αρχεία με όνομα hangman_0.jpg, hangman_1.jpg, ...)';
$string[ 'hangman_maxtries'] = 'Αριθμός λέξεων ανά παιχνίδι';
$string[ 'hangman_options'] = 'Παράμετροι Κρεμάλας';
$string[ 'hangman_showcorrectanswer'] = 'Να εμφανίζει τη σωστή απάντηση μετά το τέλος του παιχνιδιού ;';
$string[ 'hangman_showfirst'] = 'Να εμφανίζει το πρώτο γράμμα της λέξης';
$string[ 'hangman_showlast'] = 'Να εμφανίζει το τελευταίο γράμμα της λέξης';
$string[ 'hangman_showquestion'] = 'Να εμφανίζει τις ερωτήσεις ;';
$string[ 'hiddenpicture_across'] = "Αριθμός κελιών οριζόντια";
$string[ 'hiddenpicture_down'] = "Αριθμός κελιών κατακόρυφα";
$string[ 'hiddenpicture_height'] = 'Ορισμός ύψους εικόνας';
$string[ 'hiddenpicture_options'] = 'Παράμετροι Κρυμμένης Εικόνας';
$string[ 'hiddenpicture_pictureglossary'] = 'Το λεξικό για την κυρίως ερώτηση';
$string[ 'hiddenpicture_width'] = 'Ορισμός πλάτους εικόνας';
$string[ 'millionaire_background'] = 'Χρώμα φόντου';
$string[ 'millionaire_options'] = 'Παράμετροι Εκατομμυριούχου';
$string[ 'millionaire_shuffle'] = 'Ανακάτεμα ερωτήσεων';
$string[ 'snakes_background'] = 'Πίστα';
$string[ 'snakes_cols'] = 'Στήλες';
$string[ 'snakes_data'] = 'Πίστα';
$string[ 'snakes_file'] = 'Αρχείο πίστας';
$string[ 'snakes_footerx'] = 'Αριστερό περιθώριο (pixels)';
$string[ 'snakes_footery'] = 'Κάτω περιθώριο (pixels)';
$string[ 'snakes_headerx'] = 'Δεξί περιθώριο (pixels)';
$string[ 'snakes_headery'] = 'Πάνω περιθώριο (pixels)';
$string[ 'snakes_layout0'] = 'Εμφάνιση των ερωτήσεων στο πάνω μέρος της πίστας';
$string[ 'snakes_layout1'] = 'Εμφάνιση των ερωτήσεων στο κάτω μέρος της πίστας';
$string[ 'snakes_options'] = 'Παράμετροι για το Φιδάκι';
$string[ 'snakes_rows'] = 'Γραμμές';
$string[ 'sourcemodule'] = 'Πηγή ερωτήσεων';
$string[ 'sourcemodule_book'] = 'Διαλέξτε βιβλίο';
$string[ 'sourcemodule_glossary'] = 'Διαλέξτε λεξικό';
$string[ 'sourcemodule_glossarycategory'] = 'Διαλέξτε κατηγορία λεξικού';
$string[ 'sourcemodule_include_subcategories'] = 'Να συμπεριλαμβάνονται οι υποκατηγορίες';
$string[ 'sourcemodule_question'] = 'Ερωτήσεις';
$string[ 'sourcemodule_questioncategory'] = 'Διαλέξτε κατηγορία ερωτήσεων';
$string[ 'sourcemodule_quiz'] = 'Διαλέξτε κουιζ';
$string[ 'sudoku_maxquestions'] = 'Μέγιστος αριθμός ερωτήσεων';
$string[ 'sudoku_options'] = 'Παράμετροι Sudoku';
$string[ 'toptext'] = 'Κείμενο στο πάνω μέρος της σελίδας';
$string[ 'userdefined'] = "Πίστα ορισμένη από το χρήστη";
//preview.php
$string[ 'only_teachers'] = 'Μόνο teacher μπορούν να δουν αυτή τη σελίδα';
$string[ 'preview'] = 'Προεπισκόπηση';
//review.php
$string[ 'attempts'] = 'Προσπάθειες';
$string[ 'completedon'] = 'Ολοκληρώθηκε στις';
$string[ 'outof'] = '{$a->grade} από μέγιστο {$a->maxgrade}';
$string[ 'review'] = 'Επανεξέταση';
$string[ 'reviewofattempt'] = 'Επανεξέταση της προσπάθειας {$a}';
$string[ 'showall'] = 'Εμφάνιση όλων';
$string[ 'startagain'] = 'Προσπάθεια ξανά';
$string[ 'timetaken'] = 'Χρόνος που χρειάστηκε';
//showanswers.php
$string[ 'clearrepetitions'] = 'Μηδενισμός στατιστικών';
$string[ 'computerepetitions'] = 'Επαναϋπολογισμός στατιστικών';
$string[ 'feedbacks'] = 'Μήνυμα σωστής απάντησης';
$string[ 'repetitions'] = 'Επαναλήψεις';
//showattempts.php
$string[ 'lastip'] = 'IP σπουδαστή';
$string[ 'showsolution'] = 'Λύση';
$string[ 'timefinish'] = 'Τέλος παιχνιδιού';
$string[ 'timelastattempt'] = 'Τελευταία προσπάθεια';
$string[ 'timestart'] = 'Έναρξη';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Προσπάθεια παιχνιδιού τώρα';
$string[ 'comment'] = 'Σχόλια';
$string[ 'continueattemptgame'] = 'Συνέχιση του παιχνιδιού';
$string[ 'gameclosed'] = 'Το παιχνίδι έκλεισε στις {$a}';
$string[ 'gamecloseson'] = 'Το παιχνίδι θα κλείσει στις {$a}';
$string[ 'gamenotavailable'] = 'Το παιχνίδι δε θα είναι διαθέσιμο μέχρι: {$a}';
$string[ 'gameopenedon'] = 'Το παιχνίδι άνοιξε στις {$a}';
$string[ 'reattemptgame'] = 'Προσπάθεια παιχνιδιού ξανά';
$string[ 'yourfinalgradeis'] = 'Ο τελικός σου βαθμός γι\' αυτό το παιχνίδι είναι {$a}';
//Untranslated
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';

304
lang/en/game.php

@ -0,0 +1,304 @@
<?php // $Id: game.php,v 1.22 2012/07/26 05:38:59 bdaloukas Exp $
// translated by Vasilis Daloukas
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Import from an OpenOffice file (odt)';
$string[ 'bookquiz_not_select_book'] = 'You have not select book';
$string[ 'bookquiz_subchapter'] = 'Create subchapters';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'The book is empty';
$string[ 'sudoku_submit'] = 'Grade answers';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Categories';
$string[ 'bookquiz_chapters'] = 'Chapters';
$string[ 'bookquiz_numquestions'] = 'Questions';
//cross/cross_class.php
$string[ 'lettersall'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
//cross/crossdb_class.php
$string[ 'and'] = 'and';
$string[ 'cross_correct'] = 'corrert';
$string[ 'cross_corrects'] = 'corrects';
$string[ 'cross_error'] = 'error';
$string[ 'cross_errors'] = 'errors';
$string[ 'cross_found_many'] = 'Found';
$string[ 'cross_found_one'] = 'Found';
$string[ 'grade'] = 'Grade';
//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.</p>';
$string[ 'letter'] = 'letter';
$string[ 'letters'] = 'letters';
$string[ 'nextgame'] = 'New game';
$string[ 'no_words'] = 'There are no words';
$string[ 'print'] = 'Print';
$string[ 'win'] = 'Congratulations !!!';
//cryptex/play.php
$string[ 'finish'] = 'End of game';
//db/access.php
$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';
//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';
//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';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'You must select one question category';
$string[ 'millionaire_must_select_quiz'] = 'You must select one quiz';
//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';
//snakes/play.php
$string[ 'snakes_dice'] = 'Dice, $a spots.';
$string[ 'snakes_player'] = 'Player, position: $a.';
//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';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'End of game';
$string[ 'sudoku_guessnumber'] = 'Guess the correct number';
$string[ 'sudoku_noentriesfound'] = 'No words found in glossary';
//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:';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Game over</B></BIG>';
$string[ 'html_hangman_new'] = 'New';
//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';
//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';
//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[ 'modulenameplural'] = 'Games';
$string[ 'pluginadministration'] = 'Game administration';
$string[ 'pluginname'] = 'Game';
//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';
//locallib.php
$string[ 'attemptfirst'] = 'First attempt';
$string[ 'attemptlast'] = 'Last attempt';
$string[ 'convertfrom'] = '-';
$string[ 'convertto'] = '-';
$string[ 'gradeaverage'] = 'Average grade';
$string[ 'gradehighest'] = 'Highest grade';
//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 of crossword';
$string[ 'cross_maxwords'] = 'Maximum number of words of crossword';
$string[ 'cross_options'] = 'Crossword options';
$string[ 'cryptex_maxcols'] = 'Maximum number of cols/rows in cryptex';
$string[ 'cryptex_maxtries'] = 'Max tries';
$string[ 'cryptex_maxwords'] = 'Maximum number of words in cryptex';
$string[ 'cryptex_options'] = 'Cryptex ofptions';
$string[ 'gameclose'] = 'Close the game';
$string[ 'gameopen'] = 'Open the game';
$string[ 'grademethod'] = 'Grading method';
$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[ 'hiddenpicture_across'] = 'Cells horizontal';
$string[ 'hiddenpicture_down'] = 'Cells down';
$string[ 'hiddenpicture_height'] = 'Set height of picture to';
$string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options';
$string[ 'hiddenpicture_pictureglossary'] = 'The glossary for main question and picture';
$string[ 'hiddenpicture_width'] = 'Set width of picture to';
$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';
$string[ 'snakes_footery'] = 'Space at bottom right';
$string[ 'snakes_headerx'] = 'Space at up left';
$string[ 'snakes_headery'] = 'Space at up right';
$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';
//preview.php
$string[ 'only_teachers'] = 'Only teacher can see this page';
$string[ 'preview'] = 'Preview';
//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';
//showanswers.php
$string[ 'clearrepetitions'] = 'Clear statistics';
$string[ 'computerepetitions'] = 'Compute statistics again';
$string[ 'feedbacks'] = 'Messages correct answer';
$string[ 'repetitions'] = 'Repetitions';
//showattempts.php
$string[ 'lastip'] = 'IP student';
$string[ 'showsolution'] = 'solution';
$string[ 'timefinish'] = 'End of game';
$string[ 'timelastattempt'] = 'Last attempt';
$string[ 'timestart'] = 'Start';
//tabs.php
//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}.';

305
lang/es/game.php

@ -0,0 +1,305 @@
<?php // $Id: game.php,v 1.8 2012/07/26 05:38:59 bdaloukas Exp $
// game.php - created with Moodle 2.0 (Build: 20080702) (2007101514)
// translated to Español - Internacional (es) by Wilmack Sanchez, Antonio Vicent, Carolina Avila
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Importar de archivo OpenOffice (odt)';
$string[ 'bookquiz_not_select_book'] = 'Ud no ha seleccionado un libro';
$string[ 'bookquiz_subchapter'] = 'Cree subcapítulos';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'El libro está vacío';
$string[ 'sudoku_submit'] = 'Evaluar respuestas';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Categorías';
$string[ 'bookquiz_chapters'] = 'Capítulos';
//cross/cross_class.php
$string[ 'lettersall'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ ';
//cross/crossdb_class.php
$string[ 'and'] = 'y';
$string[ 'cross_correct'] = 'correcta';
$string[ 'cross_corrects'] = 'correctas';
$string[ 'cross_error'] = 'error';
$string[ 'cross_errors'] = 'errores';
$string[ 'cross_found_many'] = 'Encontró';
$string[ 'cross_found_one'] = 'Encontró';
$string[ 'grade'] = 'Nota';
//cross/play.php
$string[ 'cross_across'] = 'Horizontal';
$string[ 'cross_checkbutton'] = 'Revisar crucigrama';
$string[ 'cross_down'] = 'Abajo';
$string[ 'cross_endofgamebutton'] = 'Fin del juego de crucigrama';
$string[ 'cross_error_containsbadchars'] = 'La palabra contiene caracteres no autorizados';
$string[ 'cross_error_wordlength1'] = 'La palabra correcta contiene ';
$string[ 'cross_error_wordlength2'] = ' letras.';
$string[ 'cross_pleasewait'] = 'Por favor espere mientras se carga el crucigrama';
$string[ 'cross_welcome'] = '<h3>¡Bienvenido!</h3><p>Haga clic en una palabra para comenzar.</p>';
$string[ 'letter'] = 'letra';
$string[ 'letters'] = 'letras';
$string[ 'nextgame'] = 'Siguiente juego';
$string[ 'no_words'] = 'Ninguna palabra encontrada';
$string[ 'print'] = 'Imprimir';
$string[ 'win'] = '¡¡¡ Felicitaciones !!!';
//cryptex/play.php
$string[ 'finish'] = 'Fin del juego';
//db/access.php
$string[ 'game:attempt'] = 'Juega el juego';
$string[ 'game:deleteattempts'] = 'Borrar intentos';
$string[ 'game:manage'] = 'Administrar';
$string[ 'game:reviewmyattempts'] = 'Revisar mis intentos';
$string[ 'game:view'] = 'Ver';
$string[ 'game:viewreports'] = 'Ver reportes';
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'La frase correcta fué: ';
$string[ 'hangman_correct_word'] = 'La palabra correcta fué: ';
$string[ 'hangman_gradeinstance'] = 'Nivel en el juego completo';
$string[ 'hangman_letters'] = 'Letras: ';
$string[ 'hangman_restletters_many'] = 'Ud. tiene <b>{$a}</b> intentos';
$string[ 'hangman_restletters_one'] = 'Ud. tienen <b>ÚNICAMENTE 1</b> intento';
$string[ 'hangman_wrongnum'] = 'Malas: %%d de %%d';
$string[ 'nextword'] = 'Siguiente palabra';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = 'Calificación de la pregunta principal';
$string[ 'hiddenpicture_nocols'] = 'Tiene que especificar el número de filas horizontales';
$string[ 'hiddenpicture_nomainquestion'] = 'No hay entradas en el glosario glosario {$a->name} con una imagen adjunta';
$string[ 'hiddenpicture_norows'] = 'Tiene que especificar el número de columnas verticales';
$string[ 'must_select_glossary'] = 'Ud debe seleccionar un glosario';
$string[ 'noglossaryentriesfound'] = 'No se han encontrado entradas de glosario';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Usted debe seleccionar una categoría de preguntas';
$string[ 'millionaire_must_select_quiz'] = 'Usted debe seleccionar un cuestionario';
//report/overview/report.php
$string[ 'allattempts'] = 'Mostrar todos los intentos';
$string[ 'allstudents'] = 'Mostrar todos $a';
$string[ 'attemptsonly'] = 'Mostrar únicamente estudiantes con intentos';
$string[ 'deleteattemptcheck'] = 'Esta absolútamente seguro de querer borrar completamente estos intentos?';
$string[ 'displayoptions'] = 'Mostrar opciones';
$string[ 'downloadods'] = 'Descargar en formato ODS';
$string[ 'feedback'] = 'Retroalimentación';
$string[ 'noattemptsonly'] = 'Mostrar $a unicamente sin intentos';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring ha hecho $a->attemptnum intentos';
$string[ 'pagesize'] = 'Preguntas por página:';
$string[ 'reportoverview'] = 'Listado';
$string[ 'selectall'] = 'Seleccione todos';
$string[ 'selectnone'] = 'Des-marcar todos';
$string[ 'showdetailedmarks'] = 'Mostrar detalles de marca';
$string[ 'startedon'] = 'Comenzó en';
$string[ 'timecompleted'] = 'Completado';
$string[ 'unfinished'] = 'abierto';
$string[ 'withselected'] = 'Con seleccionados';
//snakes/play.php
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Número de sudokus que serán creados';
$string[ 'sudoku_create_start'] = 'Comenzar creando sudokus';
$string[ 'sudoku_creating'] = 'Creando <b>{$a}</b> sudoku';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Fin del juego de sudoku';
$string[ 'sudoku_guessnumber'] = 'Adivine el número correcto';
$string[ 'sudoku_noentriesfound'] = 'Ninguna palabra encontrada en el glosario';
//export.php
$string[ 'export'] = 'Exporta a móvil';
$string[ 'html_hascheckbutton'] = 'Botón de prueba:';
$string[ 'html_hasprintbutton'] = 'Botón de impresión:';
$string[ 'html_title'] = 'Título de html:';
$string[ 'javame_createdby'] = 'Creado por:';
$string[ 'javame_description'] = 'Descripción:';
$string[ 'javame_filename'] = 'Nombe del archivo:';
$string[ 'javame_icon'] = 'Icono:';
$string[ 'javame_maxpictureheight'] = 'Altura máxima de la imagen:';
$string[ 'javame_maxpicturewidth'] = 'Anchura máxima de la imagen:';
$string[ 'javame_name'] = 'Nombre:';
$string[ 'javame_type'] = 'Tipo:';
$string[ 'javame_vendor'] = 'Vendedor:';
$string[ 'javame_version'] = 'Versión';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Fin del juego</B></BIG>';
$string[ 'html_hangman_new'] = 'Nuevo';
//exporthtml_millionaire.php
$string[ 'millionaire_helppeople'] = 'Ayuda del público';
$string[ 'millionaire_info_people'] = 'La gente dice';
$string[ 'millionaire_info_telephone'] = 'Yo pienso que la respuesta correcta es';
$string[ 'millionaire_info_wrong_answer'] = 'Su respuesta es incorrecta<br>La respuesta correcta es:';
$string[ 'millionaire_quit'] = 'Salir';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'Para millonario la fuente debe ser {$a} o preguntas y no';
$string[ 'millionaire_telephone'] = 'Llamada telefónica';
$string[ 'must_select_questioncategory'] = 'Ud debe seleccionar una categoría de preguntas';
$string[ 'must_select_quiz'] = 'Ud debe seleccionar un cuestionario';
//exporthtml_snakes.php
$string[ 'score'] = 'Puntaje';
//index.php
$string[ 'modulename'] = 'Juego';
$string[ 'modulenameplural'] = 'Juegos';
$string[ 'pluginname'] = 'Juego';
//lib.php
$string[ 'attempt'] = 'Intento';
$string[ 'bookquiz_questions'] = 'Asocie categorías de preguntas con capítulos del libro';
$string[ 'export_to_html'] = 'Exportar a HTML';
$string[ 'export_to_javame'] = 'Exportar a Javame';
$string[ 'game_bookquiz'] = 'Libro con preguntas';
$string[ 'game_cross'] = 'Crucigrama';
$string[ 'game_cryptex'] = 'Sopa de Letras';
$string[ 'game_hangman'] = 'Ahorcado';
$string[ 'game_hiddenpicture'] = 'Imagen oculta';
$string[ 'game_millionaire'] = 'Millonario';
$string[ 'game_snakes'] = 'Serpientes y Escaleras';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Info';
$string[ 'noattempts'] = 'Ningún intento ha sido hecho en este cuestionario';
$string[ 'percent'] = 'Porcentaje';
$string[ 'results'] = 'Resultados';
$string[ 'showanswers'] = 'Mostrar respuestas';
$string[ 'showattempts'] = 'Mostrar los intentos';
//locallib.php
$string[ 'attemptfirst'] = 'Primer intento';
$string[ 'attemptlast'] = 'Último intento';
$string[ 'gradeaverage'] = 'Nota promedio';
$string[ 'gradehighest'] = 'Nota más alta';
//mod_form.php
$string[ 'bottomtext'] = 'Texto al final';
$string[ 'cross_layout'] = 'Diseño';
$string[ 'cross_layout0'] = 'Frases en la parte inferior del crucigrama';
$string[ 'cross_layout1'] = 'Frases en la parte derecha del crucigrama';
$string[ 'cross_maxcols'] = 'Número máximo de columnas del crucigrama';
$string[ 'cross_maxwords'] = 'Máximo número de palabras del crucigrama';
$string[ 'cross_options'] = 'Opciones del Crucigrama';
$string[ 'cryptex_maxcols'] = 'Máximo número de columnas/filas en Sopa de Letras';
$string[ 'cryptex_maxtries'] = 'Número máximo de intentos';
$string[ 'cryptex_maxwords'] = 'Máximo número de palabras en Sopa de Letras';
$string[ 'cryptex_options'] = 'Opciones del Criptograma';
$string[ 'grademethod'] = 'Método de calificación';
$string[ 'hangman_allowspaces'] = 'Permitir espacios en las palabras';
$string[ 'hangman_allowsub'] = 'Permitir símbolos en las palabras';
$string[ 'hangman_imageset'] = 'Seleccione las imágenes para el ahorcado';
$string[ 'hangman_language'] = 'Idioma de las palabras';
$string[ 'hangman_maxtries'] = 'Número de palabras por juego';
$string[ 'hangman_options'] = 'Opciones del Ahorcado';
$string[ 'hangman_showcorrectanswer'] = 'Mostrar la respuesta correcta después del final';
$string[ 'hangman_showfirst'] = 'Mostrar la primera letra de ahorcado';
$string[ 'hangman_showlast'] = 'Mostrar la última letra del ahorcado';
$string[ 'hangman_showquestion'] = '¿ Mostrar las preguntas ?';
$string[ 'hiddenpicture_across'] = 'Celdas horizontales';
$string[ 'hiddenpicture_down'] = 'Celdas verticales';
$string[ 'hiddenpicture_height'] = 'Establecer la altura de la imagen en';
$string[ 'hiddenpicture_options'] = '\'Imagen Oculta\' opciones';
$string[ 'hiddenpicture_pictureglossary'] = 'El glosario para la cuestión principal';
$string[ 'hiddenpicture_width'] = 'Establecer el ancho de la imagen en';
$string[ 'millionaire_background'] = 'Color de fondo';
$string[ 'millionaire_options'] = 'Opciones del Millonario';
$string[ 'millionaire_shuffle'] = 'Mezclar preguntas';
$string[ 'snakes_background'] = 'Fondo';
$string[ 'snakes_cols'] = 'Columnas';
$string[ 'snakes_footerx'] = 'Espacio inferior izquierdo';
$string[ 'snakes_footery'] = 'Espacio inferior derecho';
$string[ 'snakes_headerx'] = 'Espacio superior izquierdo';
$string[ 'snakes_headery'] = 'Espacio superior derecho';
$string[ 'snakes_options'] = '\'Serpientes y Escaleras\' opciones';
$string[ 'snakes_rows'] = 'Filas';
$string[ 'sourcemodule'] = 'Fuente de preguntas';
$string[ 'sourcemodule_book'] = 'Seleccione un libro';
$string[ 'sourcemodule_glossary'] = 'Seleccione un glosario';
$string[ 'sourcemodule_glossarycategory'] = 'Seleccione una categoría del glosario.';
$string[ 'sourcemodule_include_subcategories'] = 'Include subcategories';
$string[ 'sourcemodule_question'] = 'Preguntas';
$string[ 'sourcemodule_questioncategory'] = 'Seleccione una categoría de preguntas';
$string[ 'sourcemodule_quiz'] = 'Seleccione un cuestionario';
$string[ 'sudoku_maxquestions'] = 'Máximo número de preguntas';
$string[ 'sudoku_options'] = 'Opciones del Sudoku';
$string[ 'toptext'] = 'Texto de la parte superior';
$string[ 'userdefined'] = 'Definido por el usuario';
//preview.php
$string[ 'only_teachers'] = 'Sólo el profesor puede ver esta página';
$string[ 'preview'] = 'Visualizar';
//review.php
$string[ 'attempts'] = 'Intentos';
$string[ 'completedon'] = 'Completado en';
$string[ 'outof'] = '{$a->grade} out of a maximum of {$a->maxgrade}';
$string[ 'review'] = 'Revisar';
$string[ 'reviewofattempt'] = 'Revisar intentos {$a}';
$string[ 'startagain'] = 'Comenzar de nuevo';
$string[ 'timetaken'] = 'Tiempo utilizado';
//showanswers.php
$string[ 'clearrepetitions'] = 'Borrar estadísticas';
$string[ 'computerepetitions'] = 'Recalcular estadísticas';
$string[ 'feedbacks'] = 'Mensajes de respuesta correcta';
$string[ 'repetitions'] = 'Repeticiones';
//showattempts.php
$string[ 'lastip'] = 'IP del estudiante';
$string[ 'showsolution'] = 'solución';
$string[ 'timefinish'] = 'Fin del juego';
$string[ 'timelastattempt'] = 'Último intento';
$string[ 'timestart'] = 'Comienzo';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Intente jugar ahora';
$string[ 'continueattemptgame'] = 'Continue un intento previo de juego';
$string[ 'reattemptgame'] = 'Juego de reintento';
$string[ 'yourfinalgradeis'] = 'Su nota final en este juego es {$a}.';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//db/access.php $string[ 'game:grade'] = 'Grade games manually';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//db/access.php $string[ 'game:preview'] = 'Preview Games';
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions";
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.';
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.';
//exporthtml_snakes.php $string[ 'html_snakes_check'] = 'Check';
//exporthtml_snakes.php $string[ 'html_snakes_correct'] = 'Correct!';
//exporthtml_snakes.php $string[ 'html_snakes_no_selection'] = 'Have to select something!';
//exporthtml_snakes.php $string[ 'html_snakes_wrong'] = "Your answer isn't correct. Stay on the same seat.";
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'snakes_data'] = 'Positions of Snakes and Ladders';
//mod_form.php $string[ 'snakes_file'] = 'File for background';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//review.php $string[ 'showall'] = 'Show all';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

304
lang/eu/game.php

@ -0,0 +1,304 @@
<?php // $Id: game.php,v 1.10 2012/07/26 05:38:59 bdaloukas Exp $
// translated to Euskara (eu) by Juan Ezeiza
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'OpenOffice (odt) fitxategitik inportatu';
$string[ 'bookquiz_not_select_book'] = 'Ez duzu libururik aukeratu';
$string[ 'bookquiz_subchapter'] = 'Azpikapituluak sortu';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'Liburua hutsik dago';
$string[ 'sudoku_submit'] = 'Erantzunak aztertu';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Kategoriak';
$string[ 'bookquiz_chapters'] = 'Kapituluak';
//cross/cross_class.php
$string[ 'lettersall'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
//cross/crossdb_class.php
$string[ 'and'] = 'eta';
$string[ 'cross_correct'] = 'zuzena';
$string[ 'cross_corrects'] = 'zuzenak';
$string[ 'cross_error'] = 'errorea';
$string[ 'cross_errors'] = 'erroreak';
$string[ 'cross_found_many'] = 'Aurkitu dira';
$string[ 'cross_found_one'] = 'Aurkitu da';
$string[ 'grade'] = 'Emaitza';
//cross/play.php
$string[ 'cross_across'] = 'Horizontala';
$string[ 'cross_checkbutton'] = 'Gurutzegrama gainbegiratu';
$string[ 'cross_down'] = 'Behera';
$string[ 'cross_endofgamebutton'] = 'Gurutzegrama bukatu da';
$string[ 'cross_error_containsbadchars'] = 'Hitzak onartzen ez diren karaktereak dauzka';
$string[ 'cross_error_wordlength1'] = 'Hitz zuzenak ';
$string[ 'cross_error_wordlength2'] = ' letra ditu.';
$string[ 'cross_pleasewait'] = 'Gurutzegrama kargatu bitartean itxaron, mesedez';
$string[ 'cross_welcome'] = '<h3>Ongi etorri!</h3><p>Hasteko hitz batean klik egin.</p>';
$string[ 'letter'] = 'letra';
$string[ 'letters'] = 'letrak';
$string[ 'nextgame'] = 'Hurrengo jolasa';
$string[ 'no_words'] = 'Ez da hitzik aurkitu';
$string[ 'print'] = 'Imprimatu';
$string[ 'win'] = 'Zorionak!!!';
//cryptex/play.php
$string[ 'finish'] = 'Jolasa bukatu da';
//db/access.php
$string[ 'game:attempt'] = 'Jolastu';
$string[ 'game:deleteattempts'] = 'Saiakerak ezabatu';
$string[ 'game:grade'] = 'Jolasak eskuz baloratu';
$string[ 'game:manage'] = 'Kudeatu';
$string[ 'game:preview'] = 'Jolasak aurreikusi';
$string[ 'game:reviewmyattempts'] = 'nire saiakerak berriro ikusi';
$string[ 'game:view'] = 'ikusi';
$string[ 'game:viewreports'] = 'txostenak ikusi';
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'Hauxe da esaldi zuzena: ';
$string[ 'hangman_correct_word'] = 'Hauxe da hitz zuzena: ';
$string[ 'hangman_gradeinstance'] = 'Maila jolas osoan';
$string[ 'hangman_letters'] = 'Letrak: ';
$string[ 'hangman_restletters_many'] = '<b>{$a}</b> saiakera dituzu';
$string[ 'hangman_restletters_one'] = '<b>Saiakera bakarra</b> daukazu';
$string[ 'hangman_wrongnum'] = 'Desegokiak: %%d %%d(e)tik';
$string[ 'nextword'] = 'Hurrengo hitza';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = 'Galdera nagusiaren erantzuna ebaluatu';
$string[ 'hiddenpicture_nocols'] = 'Lerro horizontalen kopurua zehaztu behar duzu';
$string[ 'hiddenpicture_nomainquestion'] = '{$a->name} glosategian ez dago irudia duen hitzik';
$string[ 'hiddenpicture_norows'] = 'Zutabeen kopurua zehaztu behar duzu';
$string[ 'must_select_glossary'] = 'Glosategia aukeratu behar duzu';
$string[ 'no_questions'] = "Ez dago galderarik";
$string[ 'noglossaryentriesfound'] = 'Ez da glosategi-sarrerarik aurkitu';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Galdera-kategoria aukeratu behar duzu';
$string[ 'millionaire_must_select_quiz'] = 'Galdetegi bat aukeratu beharko';
//report/overview/report.php
$string[ 'allattempts'] = 'saiakera guztiak erakutsi';
$string[ 'allstudents'] = '$a guztiak erakutsi';
$string[ 'attemptsonly'] = 'Saiatu diren ikasleak soilik erakutsi';
$string[ 'deleteattemptcheck'] = 'Saiakera hauek guztiak ezabatu nahi dituzula ziur al zaude?';
$string[ 'displayoptions'] = 'Aukerak erakutsi';
$string[ 'downloadods'] = 'ODS formatuan behera kargatu';
$string[ 'feedback'] = 'Feedback';
$string[ 'noattemptsonly'] = '$a saiakerarik gabekoak soilik erakutsi';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring $a->attemptnum saiakeren egilea da';
$string[ 'pagesize'] = 'Galderak orriko:';
$string[ 'reportoverview'] = 'zerrenda';
$string[ 'selectall'] = 'Denak aukeratu';
$string[ 'selectnone'] = 'Ezein ez aukeratu';
$string[ 'showdetailedmarks'] = 'Marka-zehaztapenak erakutsi';
$string[ 'startedon'] = 'Noiz hasia';
$string[ 'timecompleted'] = 'Osaturik';
$string[ 'unfinished'] = 'irekia';
$string[ 'withselected'] = 'Aukeratutakoekin';
//snakes/play.php
$string[ 'snakes_dice'] = 'Dadoak, $a puntuak.';
$string[ 'snakes_player'] = 'Jokalaria, kokapena: $a.';
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Sortuko den sudoku-kopurua';
$string[ 'sudoku_create_start'] = 'Sudokuak sortzen hasi';
$string[ 'sudoku_creating'] = '<b>{$a}</b> sudokua sortzen';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Sudokua bukatu da';
$string[ 'sudoku_guessnumber'] = 'Zenbaki zuzena asmatu';
$string[ 'sudoku_noentriesfound'] = 'Glosategian ez da hitzik aurkitu';
//export.php
$string[ 'export'] = 'Esportatu';
$string[ 'html_hascheckbutton'] = 'Saiakera-botoia:';
$string[ 'html_hasprintbutton'] = 'Imprimatzeko botoia:';
$string[ 'html_title'] = 'Html izenburua:';
$string[ 'javame_createdby'] = 'Egilea:';
$string[ 'javame_description'] = 'Deskribapena:';
$string[ 'javame_filename'] = 'Fitxategia:';
$string[ 'javame_icon'] = 'Ikurra:';
$string[ 'javame_maxpictureheight'] = 'Irudiaren gehienezko altuera:';
$string[ 'javame_maxpicturewidth'] = 'Irudiaren gehienezko zabalera:';
$string[ 'javame_name'] = 'Izena:';
$string[ 'javame_type'] = 'Mota:';
$string[ 'javame_vendor'] = 'Vendor:';
$string[ 'javame_version'] = 'Bertsioa:';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Jolasa bukatu da</B></BIG>';
$string[ 'html_hangman_new'] = 'Berria';
//exporthtml_millionaire.php
$string[ 'millionaire_helppeople'] = 'Publikoaren laguntza';
$string[ 'millionaire_info_people'] = 'Jendeak zera dio: ';
$string[ 'millionaire_info_telephone'] = 'Nire ustez, erantzun zuzena hau da: ';
$string[ 'millionaire_info_wrong_answer'] = 'Erantzun zuzena ezkerraldean markatuta dago.<br>Zure erantzun hau desegokia da:';
$string[ 'millionaire_quit'] = 'Irten';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'Aberatsa jolaserako iturria {$a} edo galderak izango dira eta ez';
$string[ 'millionaire_telephone'] = 'Telefono-deia';
$string[ 'must_select_questioncategory'] = 'Galdera-kategoria bat aukeratu behar duzu';
$string[ 'must_select_quiz'] = 'Galdetegi bat aukeratu behar duzu';
//exporthtml_snakes.php
$string[ 'html_snakes_check'] = 'Konprobatu';
$string[ 'html_snakes_correct'] = 'Ongi!';
$string[ 'html_snakes_no_selection'] = 'Zerbait aukeratu behar duzu!';
$string[ 'html_snakes_wrong'] = "Zure erantzuna ez da zuzena. Leku berean geratu behar duzu.";
$string[ 'score'] = 'Puntuazioak';
//index.php
$string[ 'modulename'] = 'Jolasa';
$string[ 'modulenameplural'] = 'Jolasak';
$string[ 'pluginname'] = 'Jolasa';
//lib.php
$string[ 'attempt'] = 'saiakera';
$string[ 'bookquiz_questions'] = 'Galdera-kategoriak liburuaren azpikapituluekin lotu';
$string[ 'export_to_html'] = 'HTMLera esportatu';
$string[ 'export_to_javame'] = 'Javame-ra esportatu';
$string[ 'game_bookquiz'] = 'Galdera-,liburua';
$string[ 'game_cross'] = 'Gurutzegrama';
$string[ 'game_cryptex'] = 'Hitz Zopa';
$string[ 'game_hangman'] = 'Urkatua';
$string[ 'game_hiddenpicture'] = 'Irudi izkutua';
$string[ 'game_millionaire'] = 'Aberatsa';
$string[ 'game_snakes'] = 'Sugeak eta eskailerak';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Info';
$string[ 'noattempts'] = 'Galdetegi honetan ez da saiakerarik egin';
$string[ 'percent'] = 'Portzentaia';
$string[ 'results'] = 'Emaitza';
$string[ 'showanswers'] = 'Erantzunak erakutsi';
$string[ 'showattempts'] = 'Saiakerak erakutsi';
//locallib.php
$string[ 'attemptfirst'] = 'Lehen saiakera';
$string[ 'attemptlast'] = 'Azken saiakera';
$string[ 'gradeaverage'] = 'Batezbesteko emaitza';
$string[ 'gradehighest'] = 'Emaitza altuena';
//mod_form.php
$string[ 'bottomtext'] = 'Bukaerako testua';
$string[ 'cross_layout'] = 'Kokapena';
$string[ 'cross_layout0'] = 'Definizioak behealdean';
$string[ 'cross_layout1'] = 'Definizioak eskuin aldean';
$string[ 'cross_maxcols'] = 'Gurutzegramaren gehienezko zutabe-kopurua';
$string[ 'cross_maxwords'] = 'Gurutzegramaren gehienezko hitz-kopurua';
$string[ 'cross_options'] = 'Gurutzegramaren aukerak';
$string[ 'cryptex_maxcols'] = 'Zutabe/lerroen gehienezko kopurua Hitz Zopan';
$string[ 'cryptex_maxtries'] = 'Saiakeren gehinezko kopurua';
$string[ 'cryptex_maxwords'] = 'Gehienezko hitz-kopurua Hitz Zopan';
$string[ 'cryptex_options'] = 'Hitz Zoparen aukerak';
$string[ 'grademethod'] = 'Kalifikazio-metodoa';
$string[ 'hangman_allowspaces'] = 'Hitzen arteko hutsuneak onartu';
$string[ 'hangman_allowsub'] = 'Baimendu sinboloak - hitzetan';
$string[ 'hangman_imageset'] = 'Urkatuarentzako irudiak aukeratu';
$string[ 'hangman_language'] = 'Hitzen hizkuntza';
$string[ 'hangman_maxtries'] = 'Hitz-kopurua jolaseko';
$string[ 'hangman_options'] = 'Urkatuaren aukerak';
$string[ 'hangman_showcorrectanswer'] = 'Bukatutakoan hitza erakutsi';
$string[ 'hangman_showfirst'] = 'Urkatuaren lehenengo letra erakutsi';
$string[ 'hangman_showlast'] = 'Urkatuaren azken letra erakutsi';
$string[ 'hangman_showquestion'] = 'Galderak erakutsi?';
$string[ 'hiddenpicture_across'] = 'Laukitxo horizontalen kopurua';
$string[ 'hiddenpicture_down'] = 'Laukitxo bertikalen kopurua';
$string[ 'hiddenpicture_height'] = 'Irudiaren altuera neurri honetara egokitu: ';
$string[ 'hiddenpicture_options'] = '\'Irudi Izkutuaren\' aukerak';
$string[ 'hiddenpicture_pictureglossary'] = 'Galdera nagusiaren glosategia';
$string[ 'hiddenpicture_width'] = 'Irudiaren zabalera neurri honetara egokitu: ';
$string[ 'millionaire_background'] = 'Hondoko kolorea';
$string[ 'millionaire_options'] = 'Aberatsaren aukerak';
$string[ 'millionaire_shuffle'] = 'Galderak nahastu';
$string[ 'snakes_background'] = 'Hondoa';
$string[ 'snakes_cols'] = 'Zutabeak';
$string[ 'snakes_data'] = 'Taula';
$string[ 'snakes_file'] = 'Hondorako fitxategia';
$string[ 'snakes_footerx'] = 'Beheko ezker aldeko espazioa';
$string[ 'snakes_footery'] = 'Beheko eskuin aldeko espazioa';
$string[ 'snakes_headerx'] = 'Goiko ezker aldeko espazioa';
$string[ 'snakes_headery'] = 'Goiko eskuin aldeko espazioa';
$string[ 'snakes_options'] = '\'Sugeak eta Eskailerak\' aukerak';
$string[ 'snakes_rows'] = 'Lerroak';
$string[ 'sourcemodule'] = 'Galdera-iturria';
$string[ 'sourcemodule_book'] = 'Liburu bat aukeratu';
$string[ 'sourcemodule_glossary'] = 'Glosategia aukeratu';
$string[ 'sourcemodule_glossarycategory'] = 'Glosategiaren kategoria bat aukeratu.';
$string[ 'sourcemodule_include_subcategories'] = 'Azpikategoriak sartu';
$string[ 'sourcemodule_question'] = 'Galderak';
$string[ 'sourcemodule_questioncategory'] = 'Galdera-kategoria bat aukeratu';
$string[ 'sourcemodule_quiz'] = 'Galdetegia aukeratu';
$string[ 'sudoku_maxquestions'] = 'Gehienezko galdera-kopurua';
$string[ 'sudoku_options'] = 'Sudokuren aukerak';
$string[ 'toptext'] = 'Goialdeko testua';
$string[ 'userdefined'] = 'Erabiltzaileak definitua';
//preview.php
$string[ 'only_teachers'] = 'Horri hau irakasleak bakarrik ikus dezake';
$string[ 'preview'] = 'Aurreikusi';
//review.php
$string[ 'attempts'] = 'Saiakerak';
$string[ 'completedon'] = 'Osatua';
$string[ 'outof'] = '{$a->grade} emaitza {$a->maxgrade} gehienezko puntuaziotik';
$string[ 'review'] = 'Berriro aztertu';
$string[ 'reviewofattempt'] = '{$a} saiakerak berrikusi';
$string[ 'showall'] = 'Dena erakutsi';
$string[ 'startagain'] = 'Berriz hasi';
$string[ 'timetaken'] = 'Erabilitako denbora';
//showanswers.php
$string[ 'clearrepetitions'] = 'Estatistikak garbitu';
$string[ 'computerepetitions'] = 'Estatistikak berriro kalkulatu';
$string[ 'feedbacks'] = 'Erantzun zuzeneko mezuak';
$string[ 'repetitions'] = 'Errepikapenak';
//showattempts.php
$string[ 'lastip'] = 'Ikaslearen IPa';
$string[ 'showsolution'] = 'soluzioa';
$string[ 'timefinish'] = 'Jolasa bukatu da';
$string[ 'timelastattempt'] = 'Azken saiakera';
$string[ 'timestart'] = 'Hasiera';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Orain jolasten saiatu';
$string[ 'continueattemptgame'] = 'Aurreko jolas-saiakerarekin jarraitu';
$string[ 'reattemptgame'] = 'Saiakera berriko jolasa';
$string[ 'yourfinalgradeis'] = 'Jolas honetarako zure azken nota hauxe da: {$a}.';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

304
lang/fr/game.php

@ -0,0 +1,304 @@
<?php // $Id: game.php,v 1.9 2012/07/26 05:38:59 bdaloukas Exp $
// translated to Français (fr)
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Importer à partir d\'un fichier OpenOffice (odt)';
$string[ 'bookquiz_not_select_book'] = 'Vous n\'avez pas choisi de livre';
$string[ 'bookquiz_subchapter'] = 'Créer un sous-chapitre';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'Le livre est vide';
$string[ 'sudoku_submit'] = 'Enregistrer la réponse';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Catégories';
$string[ 'bookquiz_chapters'] = 'Chapitres';
//cross/cross_class.php
$string[ 'lettersall'] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ ";
//cross/crossdb_class.php
$string[ 'and'] = 'et';
$string[ 'cross_correct'] = 'correct';
$string[ 'cross_corrects'] = 'corrects';
$string[ 'cross_error'] = 'erreur';
$string[ 'cross_errors'] = 'erreurs';
$string[ 'cross_found_many'] = 'Trouvés';
$string[ 'cross_found_one'] = 'Trouvé';
$string[ 'grade'] = 'Note';
//cross/play.php
$string[ 'cross_across'] = 'Across';
$string[ 'cross_checkbutton'] = 'Vérifier le mot-croisé';
$string[ 'cross_down'] = 'Bas';
$string[ 'cross_endofgamebutton'] = 'Fin du mot-croisé';
$string[ 'cross_error_containsbadchars'] = 'Le mot contient des caractères incorrects';
$string[ 'cross_error_wordlength1'] = 'Le mot correct contient ';
$string[ 'cross_error_wordlength2'] = ' lettres.';
$string[ 'cross_pleasewait'] = 'Attendez le chargement du mot-croisé';
$string[ 'cross_welcome'] = '<h3>Bienvenue !</h3><p>Cliquez sur un mot pour commencer.</p>';
$string[ 'letter'] = 'lettre';
$string[ 'letters'] = 'lettres';
$string[ 'nextgame'] = 'Nouveau jeu';
$string[ 'no_words'] = 'Pas de mots';
$string[ 'win'] = 'Bravo !!!';
//cryptex/play.php
$string[ 'finish'] = 'Fin du jeu';
//db/access.php
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'La phrase correcte était : ';
$string[ 'hangman_correct_word'] = 'Le mot correct était : ';
$string[ 'hangman_gradeinstance'] = 'Note pour tout l\'ensemble';
$string[ 'hangman_letters'] = 'Lettres : ';
$string[ 'hangman_restletters_many'] = 'Vous avez effectué <b>{$a}</b> tentatives';
$string[ 'hangman_restletters_one'] = 'Vous n\'avez <b>SEULEMENT QU\'UNE</b> tentative';
$string[ 'hangman_wrongnum'] = 'Non : %%d en dehors de %%d';
$string[ 'nextword'] = 'Mot suivant';
//hiddenpicture/play.php
$string[ 'must_select_glossary'] = 'Vous devez choisir un glossaire';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Vous devez choisir une catégorie de questions';
$string[ 'millionaire_must_select_quiz'] = 'Vous devez choisir un test';
//report/overview/report.php
$string[ 'allattempts'] = 'Toutes les tentatives';
$string[ 'allstudents'] = 'Tous les étudiants $a';
$string[ 'attemptsonly'] = 'Ne montrer que les étudiants qui ont tenté';
$string[ 'deleteattemptcheck'] = 'Etes-vous sûr(e) de vouloir complètement effacer ces tentatives ?';
$string[ 'displayoptions'] = 'Montrer les options';
$string[ 'downloadods'] = 'Télécharger au format ODS';
$string[ 'feedback'] = 'Rapports';
$string[ 'noattemptsonly'] = 'Montrer $a sans tentatives';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring ont effectué $a->attemptnum tentative(s)';
$string[ 'pagesize'] = 'Questions par page :';
$string[ 'reportoverview'] = 'Vue d\'ensemble';
$string[ 'selectall'] = 'Choisir tout';
$string[ 'selectnone'] = 'Déselectionner tout';
$string[ 'showdetailedmarks'] = 'Montrer les marques de détail';
$string[ 'startedon'] = 'Démarré le';
$string[ 'timecompleted'] = 'Terminé';
$string[ 'unfinished'] = 'ouvert';
$string[ 'withselected'] = 'Avec les éléments sélectionnés';
//snakes/play.php
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Nombre de sudokus a créer';
$string[ 'sudoku_create_start'] = 'Création des sudokus...';
$string[ 'sudoku_creating'] = 'Créer <b>{$a}</b> sudoku(s)';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Fin du sudoku';
$string[ 'sudoku_guessnumber'] = 'Devniez le nombre suivant';
$string[ 'sudoku_noentriesfound'] = 'Aucun mot dans le glossaire';
//export.php
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Jeu terminé</B></BIG>';
//exporthtml_millionaire.php
$string[ 'millionaire_info_people'] = 'Les gens disent';
$string[ 'millionaire_info_telephone'] = 'I think that the correct answer is ';
$string[ 'millionaire_info_wrong_answer'] = 'Vous avez donné une mauvaise réponse <br>La réponse correcte est :';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'Pour le jeu du millionaire, la source doit être {$a} ou questions et non ';
$string[ 'must_select_questioncategory'] = 'Vous devez choisir une catégorie de questions';
$string[ 'must_select_quiz'] = 'Vous devez choisir un test';
//exporthtml_snakes.php
$string[ 'score'] = 'Score';
//index.php
$string[ 'modulename'] = 'Jeu';
$string[ 'modulenameplural'] = 'Jeux';
$string[ 'pluginname'] = 'Jeu';
//lib.php
$string[ 'attempt'] = 'Tentative';
$string[ 'bookquiz_questions'] = 'Associez une catégorie de questions à un sous-chapitre';
$string[ 'game_bookquiz'] = 'Livre de questions';
$string[ 'game_cross'] = 'Mot-croisé';
$string[ 'game_cryptex'] = 'Cryptex';
$string[ 'game_hangman'] = 'Pendu';
$string[ 'game_millionaire'] = 'Millionaire';
$string[ 'game_snakes'] = 'Serpent et échelles';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Info';
$string[ 'noattempts'] = 'Aucune tentative sur ce test';
$string[ 'results'] = 'Resultats';
$string[ 'showanswers'] = 'Montrer les réponses';
//locallib.php
$string[ 'attemptfirst'] = 'Première tentative';
$string[ 'attemptlast'] = 'Dernière tentative';
$string[ 'gradeaverage'] = 'Note moyenne';
$string[ 'gradehighest'] = 'Note maximale';
//mod_form.php
$string[ 'bottomtext'] = 'Texte au bas';
$string[ 'cross_maxcols'] = 'Nombre maximum de colonnes du mot-croisé';
$string[ 'cross_maxwords'] = 'Nombre de mots maximum du mot-croisé';
$string[ 'cryptex_maxcols'] = 'Nombre maximum de col./lignes du cryptex';
$string[ 'cryptex_maxwords'] = 'Nombre maximum de mots du cryptex';
$string[ 'grademethod'] = 'Méthode de notation';
$string[ 'hangman_imageset'] = 'Choisissez les images du pendu';
$string[ 'hangman_maxtries'] = 'Nombre de mots par jeu';
$string[ 'hangman_showcorrectanswer'] = 'Montrer la réponse correcte après la fin du jeu';
$string[ 'hangman_showfirst'] = 'Montrer la première lettre du pendu';
$string[ 'hangman_showlast'] = 'Montrer la dernière lettre du pendu';
$string[ 'hangman_showquestion'] = 'Montrer les questions ?';
$string[ 'snakes_background'] = 'Arrière-plan';
$string[ 'sourcemodule'] = 'Source des questions';
$string[ 'sourcemodule_book'] = 'Choisissez un livre';
$string[ 'sourcemodule_glossary'] = 'Choisissez un glossaire';
$string[ 'sourcemodule_glossarycategory'] = 'Choisissez une catégorie ou un glossaire';
$string[ 'sourcemodule_question'] = 'Questions';
$string[ 'sourcemodule_questioncategory'] = 'Choisissez une catégorie de questions';
$string[ 'sourcemodule_quiz'] = 'Choisissez un test';
$string[ 'sudoku_maxquestions'] = 'Nombre maximum de questions';
//preview.php
$string[ 'only_teachers'] = 'Seuls les enseignants peuvent voir cette page';
$string[ 'preview'] = 'Prévisualisation';
//review.php
$string[ 'attempts'] = 'Tentatives';
$string[ 'completedon'] = 'Terminé le';
$string[ 'outof'] = '{$a->grade} hors de la plage maximum de {$a->maxgrade}';
$string[ 'review'] = 'Revue';
$string[ 'reviewofattempt'] = 'Revue de la tentative {$a}';
$string[ 'startagain'] = 'Démarrer à nouveau';
$string[ 'timetaken'] = 'Temps consomé';
//showanswers.php
$string[ 'feedbacks'] = 'Messages pour réponses correctes';
//showattempts.php
$string[ 'lastip'] = 'IP de l\'étudiant';
$string[ 'showsolution'] = 'solution';
$string[ 'timefinish'] = 'Fin du jeu';
$string[ 'timelastattempt'] = 'Dernière tentative';
$string[ 'timestart'] = 'Démarrer';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Jouer maintenant';
$string[ 'continueattemptgame'] = 'Continuer une tentative précédente du jeu';
$string[ 'reattemptgame'] = 'Tenter à nouveau';
$string[ 'yourfinalgradeis'] = 'Votre note finale pour ce jeu est {$a}.';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//cross/play.php $string[ 'print'] = 'Print';
//db/access.php $string[ 'game:attempt'] = 'Play game';
//db/access.php $string[ 'game:deleteattempts'] = 'Delete attempts';
//db/access.php $string[ 'game:grade'] = 'Grade games manually';
//db/access.php $string[ 'game:manage'] = 'Manage';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//db/access.php $string[ 'game:preview'] = 'Preview Games';
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts';
//db/access.php $string[ 'game:view'] = 'view';
//db/access.php $string[ 'game:viewreports'] = 'viewreports';
//hiddenpicture/play.php $string[ 'hiddenpicture_mainsubmit'] = 'Grade main answer';
//hiddenpicture/play.php $string[ 'hiddenpicture_nocols'] = 'Have to specify the number of cols horizontaly';
//hiddenpicture/play.php $string[ 'hiddenpicture_nomainquestion'] = 'There are no glossary entries on glossary {$a->name} with an attached picture';
//hiddenpicture/play.php $string[ 'hiddenpicture_norows'] = 'Have to specify the number of cols verticaly';
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions";
//hiddenpicture/play.php $string[ 'noglossaryentriesfound'] = 'No glossary entries found';
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.';
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.';
//export.php $string[ 'export'] = 'Export';
//export.php $string[ 'html_hascheckbutton'] = 'Has check button:';
//export.php $string[ 'html_hasprintbutton'] = 'Has print button:';
//export.php $string[ 'html_title'] = 'Title of html:';
//export.php $string[ 'javame_createdby'] = 'Created by:';
//export.php $string[ 'javame_description'] = 'Description:';
//export.php $string[ 'javame_filename'] = 'Filename:';
//export.php $string[ 'javame_icon'] = 'Icon:';
//export.php $string[ 'javame_maxpictureheight'] = 'Max picture height:';
//export.php $string[ 'javame_maxpicturewidth'] = 'Max picture width:';
//export.php $string[ 'javame_name'] = 'Name:';
//export.php $string[ 'javame_type'] = 'Type:';
//export.php $string[ 'javame_vendor'] = 'Vendor:';
//export.php $string[ 'javame_version'] = 'Version:';
//exporthtml_hangman.php $string[ 'html_hangman_new'] = 'New';
//exporthtml_millionaire.php $string[ 'millionaire_helppeople'] = 'Help of people';
//exporthtml_millionaire.php $string[ 'millionaire_quit'] = 'Quit';
//exporthtml_millionaire.php $string[ 'millionaire_telephone'] = 'Help of telephone';
//exporthtml_snakes.php $string[ 'html_snakes_check'] = 'Check';
//exporthtml_snakes.php $string[ 'html_snakes_correct'] = 'Correct!';
//exporthtml_snakes.php $string[ 'html_snakes_no_selection'] = 'Have to select something!';
//exporthtml_snakes.php $string[ 'html_snakes_wrong'] = "Your answer isn't correct. Stay on the same seat.";
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'export_to_html'] = 'Export to HTML';
//lib.php $string[ 'export_to_javame'] = 'Export to Javame';
//lib.php $string[ 'game_hiddenpicture'] = 'Hidden Picture';
//lib.php $string[ 'percent'] = 'Percent';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//lib.php $string[ 'showattempts'] = 'Show attempts';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'cross_layout'] = 'Layout';
//mod_form.php $string[ 'cross_layout0'] = 'Phrases on the bottom of cross';
//mod_form.php $string[ 'cross_layout1'] = 'Phrases on the right of cross';
//mod_form.php $string[ 'cross_options'] = 'Crossword options';
//mod_form.php $string[ 'cryptex_maxtries'] = 'Max tries';
//mod_form.php $string[ 'cryptex_options'] = 'Cryptex ofptions';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_allowspaces'] = 'Allow spaces in words';
//mod_form.php $string[ 'hangman_allowsub'] = 'Allow the symbol - in words';
//mod_form.php $string[ 'hangman_language'] = 'Language of words';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'hangman_options'] = 'Hangman options';
//mod_form.php $string[ 'hiddenpicture_across'] = 'Cells horizontal';
//mod_form.php $string[ 'hiddenpicture_down'] = 'Cells down';
//mod_form.php $string[ 'hiddenpicture_height'] = 'Set height of picture to';
//mod_form.php $string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options';
//mod_form.php $string[ 'hiddenpicture_pictureglossary'] = 'The glossary for main question and picture';
//mod_form.php $string[ 'hiddenpicture_width'] = 'Set width of picture to';
//mod_form.php $string[ 'millionaire_background'] = 'Background color';
//mod_form.php $string[ 'millionaire_options'] = 'Millionaire\' options';
//mod_form.php $string[ 'millionaire_shuffle'] = 'Randomize questions';
//mod_form.php $string[ 'snakes_cols'] = 'Cols';
//mod_form.php $string[ 'snakes_data'] = 'Positions of Snakes and Ladders';
//mod_form.php $string[ 'snakes_file'] = 'File for background';
//mod_form.php $string[ 'snakes_footerx'] = 'Space at bootom left';
//mod_form.php $string[ 'snakes_footery'] = 'Space at bottom right';
//mod_form.php $string[ 'snakes_headerx'] = 'Space at up left';
//mod_form.php $string[ 'snakes_headery'] = 'Space at up right';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//mod_form.php $string[ 'snakes_options'] = '\'Snakes and Ladders\' options';
//mod_form.php $string[ 'snakes_rows'] = 'Rows';
//mod_form.php $string[ 'sourcemodule_include_subcategories'] = 'Include subcategories';
//mod_form.php $string[ 'sudoku_options'] = 'Sudoku options';
//mod_form.php $string[ 'toptext'] = 'Text at the top of page';
//mod_form.php $string[ 'userdefined'] = 'User defined';
//review.php $string[ 'showall'] = 'Show all';
//showanswers.php $string[ 'clearrepetitions'] = 'Clear statistics';
//showanswers.php $string[ 'computerepetitions'] = 'Compute statistics again';
//showanswers.php $string[ 'repetitions'] = 'Repetitions';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

304
lang/he/game.php

@ -0,0 +1,304 @@
<?php // $Id: game.php,v 1.8 2012/07/26 05:38:59 bdaloukas Exp $
// translation to Hebrew (he) by Nadav Kavalerchik
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'יבוא מקובץ אופן אופיס (odt)';
$string[ 'bookquiz_not_select_book'] = 'לא בחרתם ספר';
$string[ 'bookquiz_subchapter'] = 'יצירת תת פרקים';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'הספר ריק';
$string[ 'sudoku_submit'] = 'Grade answers';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'סיווגים';
$string[ 'bookquiz_chapters'] = 'פרקים';
//cross/cross_class.php
$string[ 'lettersall'] = 'אבגדהוזחטיכלמנסעפצקרשתךףץןם ';
//cross/crossdb_class.php
$string[ 'and'] = 'וגם';
$string[ 'cross_correct'] = 'נכון';
$string[ 'cross_corrects'] = 'נכונים';
$string[ 'cross_error'] = 'טעות';
$string[ 'cross_errors'] = 'טעויות';
$string[ 'cross_found_many'] = 'מספר התאמות';
$string[ 'cross_found_one'] = 'התאמה בודדת';
$string[ 'grade'] = 'Grade';
//cross/play.php
$string[ 'cross_across'] = 'תשבץ';
$string[ 'cross_checkbutton'] = 'בדיקת תשבץ';
$string[ 'cross_down'] = 'מטה';
$string[ 'cross_endofgamebutton'] = 'End of crossword game';
$string[ 'cross_error_containsbadchars'] = 'המילה מכילה תווים לא תקינים';
$string[ 'cross_error_wordlength1'] = 'המילה הנכונה מכילה ';
$string[ 'cross_error_wordlength2'] = ' אותיות.';
$string[ 'cross_pleasewait'] = 'אנא המתינו בזמן שהתשבץ נטען';
$string[ 'cross_welcome'] = '<h3>ברוכים הבאים!</h3><p>לחצו על מילה להתחיל.</p>';
$string[ 'letter'] = 'אות';
$string[ 'letters'] = 'אותיות';
$string[ 'nextgame'] = 'משחק חדש';
$string[ 'no_words'] = 'לא נמצאו מילים';
$string[ 'print'] = 'Print';
$string[ 'win'] = 'כל הכבוד !!!';
//cryptex/play.php
$string[ 'finish'] = 'המשחק הסתיים';
//db/access.php
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'המשפט הנכון הוא: ';
$string[ 'hangman_correct_word'] = 'המילה הנכונה היא: ';
$string[ 'hangman_gradeinstance'] = 'הציון הכללי במשחק';
$string[ 'hangman_letters'] = 'אותיות: ';
$string[ 'hangman_restletters_many'] = 'יש לכם <b>{$a}</b> נסיונות';
$string[ 'hangman_restletters_one'] = 'יש לכם ניסיון <b>אחד</b> בלבד';
$string[ 'hangman_wrongnum'] = 'טעויות: %%d מתוך %%d';
$string[ 'nextword'] = 'מילה חדשה';
//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'] = 'יש לבחור אגרון';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'יש לבחור סיווג שאלות אחד ';
$string[ 'millionaire_must_select_quiz'] = 'יש לבחור מבחן אחד';
//report/overview/report.php
$string[ 'allattempts'] = 'הציגו את כל הניסיונות';
$string[ 'allstudents'] = 'הציגו את כל $a';
$string[ 'attemptsonly'] = 'הציגו רק תלמידים עם ניסיונות';
$string[ 'deleteattemptcheck'] = 'האם אתם בטוחים שאתם מעוניינים למחוק את התשובות המסומנות?';
$string[ 'displayoptions'] = 'תצוגת מאפיינים';
$string[ 'downloadods'] = 'הורידו גליון אלקטרוני בתצורת ODF';
$string[ 'feedback'] = 'משוב';
$string[ 'noattemptsonly'] = 'הציגו $a שטרם ענו, בלבד';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring ביצעו $a->attemptnum נסיונות';
$string[ 'pagesize'] = 'מספר השאלות בדף:';
$string[ 'reportoverview'] = 'תצוגה כללית';
$string[ 'selectall'] = 'בחירה כוללת';
$string[ 'selectnone'] = 'ביטול סימון כולל';
$string[ 'showdetailedmarks'] = 'הציגו פירוט עבור המסומנים';
$string[ 'startedon'] = 'Started on';
$string[ 'timecompleted'] = 'הושלם';
$string[ 'unfinished'] = 'open';
$string[ 'withselected'] = 'עם התשובות המסומנות';
//snakes/play.php
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'מספר לוחות סודוקו העומדים להיווצר';
$string[ 'sudoku_create_start'] = 'התחלת יצירת לוחות סודוקו';
$string[ 'sudoku_creating'] = 'מייצר <b>{$a}</b> לוחות סודוקו';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'End of sudoku game';
$string[ 'sudoku_guessnumber'] = 'נחשו את המספר הנכון';
$string[ 'sudoku_noentriesfound'] = 'לא נמצאו מילים באגרון';
//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_maxpicturewidth'] = 'Max picture width:';
$string[ 'javame_name'] = 'Name:';
$string[ 'javame_type'] = 'Type:';
$string[ 'javame_vendor'] = 'Vendor:';
$string[ 'javame_version'] = 'Version:';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>המשחק הסתיים</B></BIG>';
//exporthtml_millionaire.php
$string[ 'millionaire_info_people'] = 'אנשים אומרים';
$string[ 'millionaire_info_telephone'] = 'אני חושב/ת שהתשובה הנכונה היא ';
$string[ 'millionaire_info_wrong_answer'] = 'תשובתכם שגוייה<br>התשובה הנכונה היא:';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'עבור משחק המיליונר מקור השאלות צריך להיות {$a} או שאלות ולא';
$string[ 'must_select_questioncategory'] = 'יש לבחור סיווג לשאלות';
$string[ 'must_select_quiz'] = 'You must select a quiz';
//exporthtml_snakes.php
$string[ 'score'] = 'Score';
//index.php
$string[ 'modulename'] = 'משחק';
$string[ 'modulenameplural'] = 'משחקים';
$string[ 'pluginname'] = 'משחק';
//lib.php
$string[ 'attempt'] = 'ניסיון';
$string[ 'bookquiz_questions'] = 'קישור סיווג שאלות לפרק בספר';
$string[ 'game_bookquiz'] = 'ספר עם שאלות';
$string[ 'game_cross'] = 'תשבץ';
$string[ 'game_cryptex'] = 'Cryptex';
$string[ 'game_hangman'] = 'הצילו את האיש התלוי';
$string[ 'game_hiddenpicture'] = 'Hidden Picture';
$string[ 'game_millionaire'] = 'מי רוצה להיות מיליונר';
$string[ 'game_snakes'] = 'סולמות ונחשים';
$string[ 'game_sudoku'] = 'סודוקו';
$string[ 'info'] = 'מידע';
$string[ 'noattempts'] = 'No attempts have been made on this game';
$string[ 'percent'] = 'Percent';
$string[ 'results'] = 'תוצאות';
$string[ 'showanswers'] = 'הצגת תשובות';
//locallib.php
$string[ 'attemptfirst'] = 'ניסיון ראשון';
$string[ 'attemptlast'] = 'ניסיון אחרון';
$string[ 'gradeaverage'] = 'ציון ממוצע';
$string[ 'gradehighest'] = 'הציון הגובהה ביותר';
//mod_form.php
$string[ 'bottomtext'] = 'המלל בתחתית';
$string[ 'cross_layout'] = 'מבנה תצורה';
$string[ 'cross_layout0'] = 'המשפט יופיע תחת התשבץ';
$string[ 'cross_layout1'] = 'המשפט יופיע מימין לתשבץ';
$string[ 'cross_maxcols'] = 'מספר עמודות מירבי בתשבץ';
$string[ 'cross_maxwords'] = 'מספר מילים מירבי בתשבץ';
$string[ 'cryptex_maxcols'] = 'מספר העמודות/שורות במשחק cryptex';
$string[ 'cryptex_maxwords'] = 'מספר המילים במשחק cryptex';
$string[ 'grademethod'] = 'שיטת מתן ציונים';
$string[ 'hangman_allowspaces'] = 'אפשרות לרווחים במילים';
$string[ 'hangman_allowsub'] = 'אפשרות לתו - במילים';
$string[ 'hangman_imageset'] = 'בחרו תמונה למשחק האיש התלוי';
$string[ 'hangman_language'] = 'שפת המילים';
$string[ 'hangman_maxtries'] = 'מספר מילים בכל משחק';
$string[ 'hangman_showcorrectanswer'] = 'הצגת התשובה הנכונה בסוף כל משחק';
$string[ 'hangman_showfirst'] = 'הצגת האות הראשונה במשחק האיש התלוי';
$string[ 'hangman_showlast'] = 'הצגת האות האחרונה במשחק האיש התלוי';
$string[ 'hangman_showquestion'] = 'להציג את השאלות ?';
$string[ 'hiddenpicture_across'] = 'Cells horizontal';
$string[ 'hiddenpicture_down'] = 'Cells down';
$string[ 'hiddenpicture_height'] = 'קבעו גובה תמונה ל';
$string[ 'hiddenpicture_pictureglossary'] = 'The glossary for main question and picture';
$string[ 'hiddenpicture_width'] = 'קבעו רוחב תמונה ל';
$string[ 'snakes_background'] = 'רקע';
$string[ 'sourcemodule'] = 'מקור השאלות';
$string[ 'sourcemodule_book'] = 'בחרו ספר';
$string[ 'sourcemodule_glossary'] = 'בחרו אגרון';
$string[ 'sourcemodule_glossarycategory'] = 'בחרו סיווג עבור אגרון';
$string[ 'sourcemodule_include_subcategories'] = 'Include subcategories';
$string[ 'sourcemodule_question'] = 'שאלות';
$string[ 'sourcemodule_questioncategory'] = 'בחרו סיווג לשאלות';
$string[ 'sourcemodule_quiz'] = 'בחרו מבחן';
$string[ 'sudoku_maxquestions'] = 'מספר שאלות מירבי';
//preview.php
$string[ 'only_teachers'] = 'רק מורה יכול לראות דף זה';
$string[ 'preview'] = 'תצוגה מקדימה';
//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[ 'startagain'] = 'Start again';
$string[ 'timetaken'] = 'זמן המשחק';
//showanswers.php
$string[ 'feedbacks'] = 'ההודעה במצב של תשובה נכונה';
//showattempts.php
$string[ 'lastip'] = 'כתובת ה IP של התלמיד';
$string[ 'showsolution'] = 'פתרון';
$string[ 'timefinish'] = 'המשחק הסתיים';
$string[ 'timelastattempt'] = 'ניסיון אחרון';
$string[ 'timestart'] = 'התחלה';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'שחקו עכשיו';
$string[ 'continueattemptgame'] = 'המשיכו ניסיון משחק קודם שלכם';
$string[ 'reattemptgame'] = 'Reattempt game';
$string[ 'yourfinalgradeis'] = 'הציון הסופי שלכם למשחק זה הוא {$a}.';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//db/access.php $string[ 'game:attempt'] = 'Play game';
//db/access.php $string[ 'game:deleteattempts'] = 'Delete attempts';
//db/access.php $string[ 'game:grade'] = 'Grade games manually';
//db/access.php $string[ 'game:manage'] = 'Manage';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//db/access.php $string[ 'game:preview'] = 'Preview Games';
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts';
//db/access.php $string[ 'game:view'] = 'view';
//db/access.php $string[ 'game:viewreports'] = 'viewreports';
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions";
//hiddenpicture/play.php $string[ 'noglossaryentriesfound'] = 'No glossary entries found';
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.';
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.';
//export.php $string[ 'javame_maxpictureheight'] = 'Max picture height:';
//exporthtml_hangman.php $string[ 'html_hangman_new'] = 'New';
//exporthtml_millionaire.php $string[ 'millionaire_helppeople'] = 'Help of people';
//exporthtml_millionaire.php $string[ 'millionaire_quit'] = 'Quit';
//exporthtml_millionaire.php $string[ 'millionaire_telephone'] = 'Help of telephone';
//exporthtml_snakes.php $string[ 'html_snakes_check'] = 'Check';
//exporthtml_snakes.php $string[ 'html_snakes_correct'] = 'Correct!';
//exporthtml_snakes.php $string[ 'html_snakes_no_selection'] = 'Have to select something!';
//exporthtml_snakes.php $string[ 'html_snakes_wrong'] = "Your answer isn't correct. Stay on the same seat.";
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'export_to_html'] = 'Export to HTML';
//lib.php $string[ 'export_to_javame'] = 'Export to Javame';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//lib.php $string[ 'showattempts'] = 'Show attempts';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'cross_options'] = 'Crossword options';
//mod_form.php $string[ 'cryptex_maxtries'] = 'Max tries';
//mod_form.php $string[ 'cryptex_options'] = 'Cryptex ofptions';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'hangman_options'] = 'Hangman options';
//mod_form.php $string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options';
//mod_form.php $string[ 'millionaire_background'] = 'Background color';
//mod_form.php $string[ 'millionaire_options'] = 'Millionaire\' options';
//mod_form.php $string[ 'millionaire_shuffle'] = 'Randomize questions';
//mod_form.php $string[ 'snakes_cols'] = 'Cols';
//mod_form.php $string[ 'snakes_data'] = 'Positions of Snakes and Ladders';
//mod_form.php $string[ 'snakes_file'] = 'File for background';
//mod_form.php $string[ 'snakes_footerx'] = 'Space at bootom left';
//mod_form.php $string[ 'snakes_footery'] = 'Space at bottom right';
//mod_form.php $string[ 'snakes_headerx'] = 'Space at up left';
//mod_form.php $string[ 'snakes_headery'] = 'Space at up right';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//mod_form.php $string[ 'snakes_options'] = '\'Snakes and Ladders\' options';
//mod_form.php $string[ 'snakes_rows'] = 'Rows';
//mod_form.php $string[ 'sudoku_options'] = 'Sudoku options';
//mod_form.php $string[ 'toptext'] = 'Text at the top of page';
//mod_form.php $string[ 'userdefined'] = 'User defined';
//review.php $string[ 'showall'] = 'Show all';
//showanswers.php $string[ 'clearrepetitions'] = 'Clear statistics';
//showanswers.php $string[ 'computerepetitions'] = 'Compute statistics again';
//showanswers.php $string[ 'repetitions'] = 'Repetitions';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

306
lang/hr/game.php

@ -0,0 +1,306 @@
<?php // $Id: game.php,v 1.8 2012/07/26 05:38:59 bdaloukas Exp $
// translation to Hrvatski (hr)
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Uvezi iz OpenOffice datoteke (odt)';
$string[ 'bookquiz_not_select_book'] = 'Niste odabrali knjigu';
$string[ 'bookquiz_subchapter'] = 'Napravi podpoglavlje';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'Knjiga je prazna';
$string[ 'sudoku_submit'] = 'Ocjeni odgovore';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Kategorije';
$string[ 'bookquiz_chapters'] = 'Poglavlja';
//cross/cross_class.php
$string[ 'lettersall'] = 'ABCČĆDĐEFGHIJKLMNOPRSŠTUVZŽ';
//cross/crossdb_class.php
$string[ 'and'] = 'i';
$string[ 'cross_correct'] = 'ispravna';
$string[ 'cross_corrects'] = 'ispravnih';
$string[ 'cross_error'] = 'greška';
$string[ 'cross_errors'] = 'grešaka';
$string[ 'cross_found_many'] = 'Pronađeno';
$string[ 'cross_found_one'] = 'Pronađena';
$string[ 'grade'] = 'Ocjena';
//cross/play.php
$string[ 'cross_across'] = 'Vodoravno';
$string[ 'cross_checkbutton'] = 'Provjeri križaljku';
$string[ 'cross_down'] = 'Okomito';
$string[ 'cross_endofgamebutton'] = 'Kraj igre';
$string[ 'cross_error_containsbadchars'] = 'Riječ sadrži nedozvoljene znakove';
$string[ 'cross_error_wordlength1'] = 'Točna riječ sadrži ';
$string[ 'cross_error_wordlength2'] = ' slova.';
$string[ 'cross_pleasewait'] = 'Molimo pričekajte dok se križaljka učita';
$string[ 'cross_welcome'] = '<h3>Dobrodošli!</h3><p>Za početak igre odaberite riječ.</p>';
$string[ 'letter'] = 'slovo';
$string[ 'letters'] = 'slova';
$string[ 'nextgame'] = 'Nova igra';
$string[ 'no_words'] = 'Riječi nisu pronađene';
$string[ 'print'] = 'Ispiši';
$string[ 'win'] = 'Čestitamo !!!';
//cryptex/play.php
$string[ 'finish'] = 'Kraj igre';
//db/access.php
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'Tražena fraza je: ';
$string[ 'hangman_correct_word'] = 'Tražena riječ je: ';
$string[ 'hangman_gradeinstance'] = 'Ocjena u cijeloj igri';
$string[ 'hangman_letters'] = 'Slova: ';
$string[ 'hangman_restletters_many'] = 'Imate još <b>{$a}</b> pokušaja';
$string[ 'hangman_restletters_one'] = 'Imate još <b>SAMO 1</b> pokušaj';
$string[ 'hangman_wrongnum'] = 'Krivo: %%d od %%d';
$string[ 'nextword'] = 'Sljedeća riječ';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = 'Ocjeni glavni odgovor';
$string[ 'hiddenpicture_nocols'] = 'Treba zadati broj stupaca vodoravno';
$string[ 'hiddenpicture_nomainquestion'] = 'Nije pronađen ni jedan zapis u rječniku {$a->name} sa pridruženom slikom';
$string[ 'hiddenpicture_norows'] = 'Treba zadati broj stupaca okomito';
$string[ 'must_select_glossary'] = 'Morate odabrati rječnik';
$string[ 'noglossaryentriesfound'] = 'U rječniku nije pronađen ni jedan pojam';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Morate odabrati kategoriju pitanja';
$string[ 'millionaire_must_select_quiz'] = 'Morate odabrati tip igre';
//report/overview/report.php
$string[ 'allattempts'] = 'Prikaži sve pokušaje';
$string[ 'allstudents'] = 'Prikaži sve $a';
$string[ 'attemptsonly'] = 'Prikaži samo studente sa pokušajima';
$string[ 'deleteattemptcheck'] = 'Dali ste sigurni da želite nepovratno obrisati ove pokušaje?';
$string[ 'displayoptions'] = 'Postavke prikaza';
$string[ 'downloadods'] = 'Preuzmi u ODS formatu';
$string[ 'feedback'] = 'Povratna informacija';
$string[ 'noattemptsonly'] = 'Prikaži samo $a bez pokušaja';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring su imali $a->attemptnum pokušaja';
$string[ 'pagesize'] = 'Pitanja po stranici:';
$string[ 'reportoverview'] = 'Pregled';
$string[ 'selectall'] = 'Označi sve';
$string[ 'selectnone'] = 'Odznači sve';
$string[ 'showdetailedmarks'] = 'Prikaži detalje ocjena';
$string[ 'startedon'] = 'Započeto';
$string[ 'timecompleted'] = 'Završeno';
$string[ 'unfinished'] = 'nije završeno';
$string[ 'withselected'] = 'Sa odabranim';
//snakes/play.php
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Broju sudoku zadataka koji će se napraviti';
$string[ 'sudoku_create_start'] = 'Započni pravljenje sudou zadataka';
$string[ 'sudoku_creating'] = 'Pravim <b>{$a}</b> sudoku';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Kraj igre';
$string[ 'sudoku_guessnumber'] = 'Pogodite točan broj';
$string[ 'sudoku_noentriesfound'] = 'U rječniku nije pronađena ni jedna riječ';
//export.php
$string[ 'export'] = 'Izvoz';
$string[ 'html_hascheckbutton'] = 'Sadrži tipku za provjeru:';
$string[ 'html_hasprintbutton'] = 'Sadrži tipku za ispis:';
$string[ 'html_title'] = 'Naslov stranice:';
$string[ 'javame_createdby'] = 'Autor:';
$string[ 'javame_description'] = 'Opis:';
$string[ 'javame_filename'] = 'Ime datoteke:';
$string[ 'javame_icon'] = 'Ikona:';
$string[ 'javame_maxpictureheight'] = 'Maksimalna visina slike:';
$string[ 'javame_maxpicturewidth'] = 'Maksimalna širina slike:';
$string[ 'javame_name'] = 'Ime:';
$string[ 'javame_type'] = 'Tip:';
$string[ 'javame_vendor'] = 'Prodavač:';
$string[ 'javame_version'] = 'Verzija:';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Kraj igre</B></BIG>';
$string[ 'html_hangman_new'] = 'Nova igra';
//exporthtml_millionaire.php
$string[ 'millionaire_helppeople'] = 'Pitaj publiku';
$string[ 'millionaire_info_people'] = 'Publika kaže';
$string[ 'millionaire_info_telephone'] = 'Mislim da je točan odgovor ';
$string[ 'millionaire_info_wrong_answer'] = 'Vaš odgovor je pogrešan<br>Točan odgovor je:';
$string[ 'millionaire_quit'] = 'Kraj';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'Za Milijunaša izvor mora biti {$a} ili pitanja i ne';
$string[ 'millionaire_telephone'] = 'Pomoć zovi';
$string[ 'must_select_questioncategory'] = 'Morate odabrati kategoriju pitanja';
$string[ 'must_select_quiz'] = 'Morate odabrati igru';
//exporthtml_snakes.php
$string[ 'score'] = 'Rezultat';
//index.php
$string[ 'modulename'] = 'igru';
$string[ 'modulenameplural'] = 'Igre';
$string[ 'pluginname'] = 'igru';
//lib.php
$string[ 'attempt'] = 'Pokušaj';
$string[ 'bookquiz_questions'] = 'Pridruži kategorije pitanja poglavlju knjige';
$string[ 'export_to_html'] = 'Izvoz u HTML';
$string[ 'export_to_javame'] = 'Izvoz u Javame';
$string[ 'game_bookquiz'] = 'Knjiga sa pitanjima';
$string[ 'game_cross'] = 'Križaljka';
$string[ 'game_cryptex'] = 'Cryptex';
$string[ 'game_hangman'] = 'Vješalo';
$string[ 'game_hiddenpicture'] = 'Skrivena slika';
$string[ 'game_millionaire'] = 'Milijunaš';
$string[ 'game_snakes'] = 'Zmije i Ljestve';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Informacije';
$string[ 'noattempts'] = 'Ovu igru nitko još nije pokušao igrati';
$string[ 'percent'] = 'Postotak';
$string[ 'results'] = 'Rezultati';
$string[ 'showanswers'] = 'Prikaži odgovore';
$string[ 'showattempts'] = 'Prikaži pokušaje';
//locallib.php
$string[ 'attemptfirst'] = 'Prvi pokušaj';
$string[ 'attemptlast'] = 'Zadnji pokušaj';
$string[ 'convertfrom'] = ''; //Special convertation to capital letters
$string[ 'convertto'] = ''; //It is needed for some languages
$string[ 'gradeaverage'] = 'Prosječna ocjena';
$string[ 'gradehighest'] = 'Najveća ocjena';
//mod_form.php
$string[ 'bottomtext'] = 'Tekst na dnu';
$string[ 'cross_layout'] = 'Raspored';
$string[ 'cross_layout0'] = 'Fraze ispod križaljke';
$string[ 'cross_layout1'] = 'Fraze desno od križaljke';
$string[ 'cross_maxcols'] = 'Maksimaln broj stupaca u križaljci';
$string[ 'cross_maxwords'] = 'Maksimalan broj riječi u križaljci';
$string[ 'cross_options'] = 'Postavke križaljke';
$string[ 'cryptex_maxcols'] = 'Maksimalan broj stupaca/redova cryptexa';
$string[ 'cryptex_maxtries'] = 'Maksimalan broj pokušaja';
$string[ 'cryptex_maxwords'] = 'Maksimalan broj riječi cryptexa';
$string[ 'cryptex_options'] = 'Cryptex postavke';
$string[ 'grademethod'] = 'Metoda ocjenjivanja';
$string[ 'hangman_allowspaces'] = 'Dozvoli razmake u riječima';
$string[ 'hangman_allowsub'] = 'Dozvoli znak - u riječima';
$string[ 'hangman_imageset'] = 'Odaberite sliku vješala';
$string[ 'hangman_language'] = 'Jezik riječi';
$string[ 'hangman_maxtries'] = 'Broj riječi po igri';
$string[ 'hangman_options'] = 'Postavke vješala';
$string[ 'hangman_showcorrectanswer'] = 'Prikaži ispravan odgovor nakon završetka';
$string[ 'hangman_showfirst'] = 'Prikaži prvo slovo vješala';
$string[ 'hangman_showlast'] = 'Prikaži zadnje slovo vješala';
$string[ 'hangman_showquestion'] = 'Prikaži pitanje?';
$string[ 'hiddenpicture_across'] = 'Ćelije vodoravno';
$string[ 'hiddenpicture_down'] = 'Ćelije okomito';
$string[ 'hiddenpicture_height'] = 'Postavi visinu slike na';
$string[ 'hiddenpicture_options'] = 'Postavke skrivene slike';
$string[ 'hiddenpicture_pictureglossary'] = 'Rječnik za glavno pitanje i sliku';
$string[ 'hiddenpicture_width'] = 'Postavi širinu slike na';
$string[ 'millionaire_background'] = 'Boja pozadine';
$string[ 'millionaire_options'] = 'Postavke Milijunaša';
$string[ 'millionaire_shuffle'] = 'Izmješaj pitanja';
$string[ 'snakes_background'] = 'Pozadina';
$string[ 'snakes_options'] = 'Postavke \'Zmije i ljestve\'';
$string[ 'sourcemodule'] = 'Izvor pitanja';
$string[ 'sourcemodule_book'] = 'Odaberite knjigu';
$string[ 'sourcemodule_glossary'] = 'Odaberite rječnik';
$string[ 'sourcemodule_glossarycategory'] = 'Odaberite kategoriju rječnika';
$string[ 'sourcemodule_include_subcategories'] = 'Uključi podkategorije';
$string[ 'sourcemodule_question'] = 'Pitanja';
$string[ 'sourcemodule_questioncategory'] = 'Kategorija pitanja';
$string[ 'sourcemodule_quiz'] = 'Odaberite igru';
$string[ 'sudoku_maxquestions'] = 'Maksimalan broj pitanja';
$string[ 'sudoku_options'] = 'Sudoku postavke';
$string[ 'toptext'] = 'Tekst na vrhu';
//preview.php
$string[ 'only_teachers'] = 'Samo učitelj može vidjeti ovu stranicu';
$string[ 'preview'] = 'Pregled';
//review.php
$string[ 'attempts'] = 'Pokušaji';
$string[ 'completedon'] = 'Završeno';
$string[ 'outof'] = '{$a->grade} od maksimalno {$a->maxgrade}';
$string[ 'review'] = 'Pregled';
$string[ 'reviewofattempt'] = 'Pregled pokušaja {$a}';
$string[ 'startagain'] = 'Ponovo igraj';
$string[ 'timetaken'] = 'Proteklo vrijeme';
//showanswers.php
$string[ 'clearrepetitions'] = 'Obriši statistiku';
$string[ 'computerepetitions'] = 'Ponovo izračunaj statistiku';
$string[ 'feedbacks'] = 'Poruke ispravnih odgovora';
$string[ 'repetitions'] = 'Ponavljanja';
//showattempts.php
$string[ 'lastip'] = 'Adresa računala';
$string[ 'showsolution'] = 'Rješenje';
$string[ 'timefinish'] = 'Kraj igre';
$string[ 'timelastattempt'] = 'Posljednji pokušaj';
$string[ 'timestart'] = 'Početak';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Pokušaj ponovo';
$string[ 'continueattemptgame'] = 'Nastavi sa prethodnim pokušajem ove igre';
$string[ 'reattemptgame'] = 'Ponovni pokušaj igre';
$string[ 'yourfinalgradeis'] = 'Vaša konačna ocjena za ovu igru je {$a}.';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//db/access.php $string[ 'game:attempt'] = 'Play game';
//db/access.php $string[ 'game:deleteattempts'] = 'Delete attempts';
//db/access.php $string[ 'game:grade'] = 'Grade games manually';
//db/access.php $string[ 'game:manage'] = 'Manage';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//db/access.php $string[ 'game:preview'] = 'Preview Games';
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts';
//db/access.php $string[ 'game:view'] = 'view';
//db/access.php $string[ 'game:viewreports'] = 'viewreports';
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions";
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.';
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.';
//exporthtml_snakes.php $string[ 'html_snakes_check'] = 'Check';
//exporthtml_snakes.php $string[ 'html_snakes_correct'] = 'Correct!';
//exporthtml_snakes.php $string[ 'html_snakes_no_selection'] = 'Have to select something!';
//exporthtml_snakes.php $string[ 'html_snakes_wrong'] = "Your answer isn't correct. Stay on the same seat.";
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'snakes_cols'] = 'Cols';
//mod_form.php $string[ 'snakes_data'] = 'Positions of Snakes and Ladders';
//mod_form.php $string[ 'snakes_file'] = 'File for background';
//mod_form.php $string[ 'snakes_footerx'] = 'Space at bootom left';
//mod_form.php $string[ 'snakes_footery'] = 'Space at bottom right';
//mod_form.php $string[ 'snakes_headerx'] = 'Space at up left';
//mod_form.php $string[ 'snakes_headery'] = 'Space at up right';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//mod_form.php $string[ 'snakes_rows'] = 'Rows';
//mod_form.php $string[ 'userdefined'] = 'User defined';
//review.php $string[ 'showall'] = 'Show all';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

305
lang/it/game.php

@ -0,0 +1,305 @@
<?php // $Id: game.php,v 1.8 2012/07/26 05:38:59 bdaloukas Exp $
// game.php - created with Moodle 1.9.5
// translated to Italiano (it) by Aristogeiton Ferentinos, Myrto Papakonstantinoy and Orianta Gkotslari
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Uvezi iz OpenOffice datoteke (odt)';
$string[ 'bookquiz_not_select_book'] = 'Niste odabrali knjigu';
$string[ 'bookquiz_subchapter'] = 'Napravi podpoglavlje';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'Knjiga je prazna';
$string[ 'sudoku_submit'] = 'Ocjeni odgovore';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Kategorije';
$string[ 'bookquiz_chapters'] = 'Poglavlja';
//cross/cross_class.php
$string[ 'lettersall'] = 'ABCČĆDĐEFGHIJKLMNOPRSŠTUVZŽ';
//cross/crossdb_class.php
$string[ 'and'] = 'i';
$string[ 'cross_correct'] = 'ispravna';
$string[ 'cross_corrects'] = 'ispravnih';
$string[ 'cross_error'] = 'greška';
$string[ 'cross_errors'] = 'grešaka';
$string[ 'cross_found_many'] = 'Pronađeno';
$string[ 'cross_found_one'] = 'Pronađena';
$string[ 'grade'] = 'Ocjena';
//cross/play.php
$string[ 'cross_across'] = 'Vodoravno';
$string[ 'cross_checkbutton'] = 'Provjeri križaljku';
$string[ 'cross_down'] = 'Okomito';
$string[ 'cross_endofgamebutton'] = 'Kraj igre';
$string[ 'cross_error_containsbadchars'] = 'Riječ sadrži nedozvoljene znakove';
$string[ 'cross_error_wordlength1'] = 'Točna riječ sadrži ';
$string[ 'cross_error_wordlength2'] = ' slova.';
$string[ 'cross_pleasewait'] = 'Molimo pričekajte dok se križaljka učita';
$string[ 'cross_welcome'] = '<h3>Dobrodošli!</h3><p>Za početak igre odaberite riječ.</p>';
$string[ 'letter'] = 'slovo';
$string[ 'letters'] = 'slova';
$string[ 'nextgame'] = 'Nova igra';
$string[ 'no_words'] = 'una o più parole non sono state trovate';
$string[ 'print'] = 'Ispiši';
$string[ 'win'] = 'congratulazioni!!!';
//cryptex/play.php
$string[ 'finish'] = 'Kraj igre';
//db/access.php
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'la frase giusta era: ';
$string[ 'hangman_correct_word'] = 'la parola giusta era: ';
$string[ 'hangman_gradeinstance'] = 'Ocjena u cijeloj igri';
$string[ 'hangman_letters'] = 'Slova: ';
$string[ 'hangman_restletters_many'] = 'Imate još <b>{$a}</b> pokušaja';
$string[ 'hangman_restletters_one'] = 'Imate još <b>SAMO 1</b> pokušaj';
$string[ 'hangman_wrongnum'] = 'Krivo: %%d od %%d';
$string[ 'nextword'] = 'Sljedeća riječ';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = 'Ocjeni glavni odgovor';
$string[ 'hiddenpicture_nocols'] = 'Treba zadati broj stupaca vodoravno';
$string[ 'hiddenpicture_nomainquestion'] = 'Nije pronađen ni jedan zapis u rječniku {$a->name} sa pridruženom slikom';
$string[ 'hiddenpicture_norows'] = 'Treba zadati broj stupaca okomito';
$string[ 'must_select_glossary'] = 'Morate odabrati rječnik';
$string[ 'noglossaryentriesfound'] = 'Non sono state trovate voci di glossario';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Morate odabrati kategoriju pitanja';
$string[ 'millionaire_must_select_quiz'] = 'Morate odabrati tip igre';
//report/overview/report.php
$string[ 'allattempts'] = 'mostra tutti i tentativi';
$string[ 'allstudents'] = 'mostra tutti $a';
$string[ 'attemptsonly'] = 'indica solo gli studenti che hanno svolto tentativi';
$string[ 'deleteattemptcheck'] = 'Sei sicbookquiz_emptyuro che tu vuoi eliminare completamente questi tentativi?';
$string[ 'displayoptions'] = 'mostrare i fattori';
$string[ 'downloadods'] = 'salvare in formato ODS';
$string[ 'feedback'] = 'risposta';
$string[ 'noattemptsonly'] = 'mostra solo $a che non presentano tentativi';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring Hanno fatto $a->attemptnum tentativi';
$string[ 'pagesize'] = 'domande per pagina:';
$string[ 'reportoverview'] = 'sommario';
$string[ 'selectall'] = 'seleziona tutti';
$string[ 'selectnone'] = 'deseleziona tutti';
$string[ 'showdetailedmarks'] = 'mostra i dettagli delle valutazioni';
$string[ 'startedon'] = 'Započeto';
$string[ 'timecompleted'] = 'Završeno';
$string[ 'unfinished'] = 'nije završeno';
$string[ 'withselected'] = 'con i file selezionati';
//snakes/play.php
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Broju sudoku zadataka koji će se napraviti';
$string[ 'sudoku_create_start'] = 'Započni pravljenje sudou zadataka';
$string[ 'sudoku_creating'] = 'Pravim <b>{$a}</b> sudoku';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Kraj igre';
$string[ 'sudoku_guessnumber'] = 'Pogodite točan broj';
$string[ 'sudoku_noentriesfound'] = 'U rječniku nije pronađena ni jedna riječ';
//export.php
$string[ 'export'] = 'Izvoz';
$string[ 'html_hascheckbutton'] = 'Sadrži tipku za provjeru:';
$string[ 'html_hasprintbutton'] = 'Sadrži tipku za ispis:';
$string[ 'html_title'] = 'Naslov stranice:';
$string[ 'javame_createdby'] = 'Autor:';
$string[ 'javame_description'] = 'Opis:';
$string[ 'javame_filename'] = 'Ime datoteke:';
$string[ 'javame_icon'] = 'Ikona:';
$string[ 'javame_maxpictureheight'] = 'Maksimalna visina slike:';
$string[ 'javame_maxpicturewidth'] = 'Maksimalna širina slike:';
$string[ 'javame_name'] = 'Ime:';
$string[ 'javame_type'] = 'Tip:';
$string[ 'javame_vendor'] = 'Prodavač:';
$string[ 'javame_version'] = 'Verzija:';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Kraj igre</B></BIG>';
$string[ 'html_hangman_new'] = 'nuovo';
//exporthtml_millionaire.php
$string[ 'millionaire_helppeople'] = 'Pitaj publiku';
$string[ 'millionaire_info_people'] = 'Publika kaže';
$string[ 'millionaire_info_telephone'] = 'Mislim da je točan odgovor ';
$string[ 'millionaire_info_wrong_answer'] = 'Vaš odgovor je pogrešan<br>Točan odgovor je:';
$string[ 'millionaire_quit'] = 'Kraj';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'Za Milijunaša izvor mora biti {$a} ili pitanja i ne';
$string[ 'millionaire_telephone'] = 'Pomoć zovi';
$string[ 'must_select_questioncategory'] = 'Morate odabrati kategoriju pitanja';
$string[ 'must_select_quiz'] = 'Morate odabrati igru';
//exporthtml_snakes.php
$string[ 'score'] = 'Rezultat';
//index.php
$string[ 'modulename'] = 'igru';
$string[ 'modulenameplural'] = 'Igre';
$string[ 'pluginname'] = 'igru';
//lib.php
$string[ 'attempt'] = 'Pokušaj';
$string[ 'bookquiz_questions'] = 'Pridruži kategorije pitanja poglavlju knjige';
$string[ 'export_to_html'] = 'Izvoz u HTML';
$string[ 'export_to_javame'] = 'Izvoz u Javame';
$string[ 'game_bookquiz'] = 'Knjiga sa pitanjima';
$string[ 'game_cross'] = 'Križaljka';
$string[ 'game_cryptex'] = 'Cryptex';
$string[ 'game_hangman'] = 'Vješalo';
$string[ 'game_hiddenpicture'] = 'Skrivena slika';
$string[ 'game_millionaire'] = 'Milijunaš';
$string[ 'game_snakes'] = 'Zmije i Ljestve';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Informacije';
$string[ 'noattempts'] = 'Ovu igru nitko još nije pokušao igrati';
$string[ 'percent'] = 'Postotak';
$string[ 'results'] = 'Rezultati';
$string[ 'showanswers'] = 'Prikaži odgovore';
$string[ 'showattempts'] = 'mostra i tentativi';
//locallib.php
$string[ 'attemptfirst'] = 'Prvi pokušaj';
$string[ 'attemptlast'] = 'Zadnji pokušaj';
$string[ 'gradeaverage'] = 'Prosječna ocjena';
$string[ 'gradehighest'] = 'Najveća ocjena';
//mod_form.php
$string[ 'bottomtext'] = 'Tekst na dnu';
$string[ 'cross_layout'] = 'Raspored';
$string[ 'cross_layout0'] = 'Fraze ispod križaljke';
$string[ 'cross_layout1'] = 'Fraze desno od križaljke';
$string[ 'cross_maxcols'] = 'Maksimaln broj stupaca u križaljci';
$string[ 'cross_maxwords'] = 'Maksimalan broj riječi u križaljci';
$string[ 'cross_options'] = 'opzioni di incrocio';
$string[ 'cryptex_maxcols'] = 'Maksimalan broj stupaca/redova cryptexa';
$string[ 'cryptex_maxtries'] = 'massimo numero di tentativi';
$string[ 'cryptex_maxwords'] = 'Maksimalan broj riječi cryptexa';
$string[ 'cryptex_options'] = 'opzioni nel criptoverba';
$string[ 'grademethod'] = 'Metoda ocjenjivanja';
$string[ 'hangman_allowspaces'] = 'Dozvoli razmake u riječima';
$string[ 'hangman_allowsub'] = 'Dozvoli znak - u riječima';
$string[ 'hangman_imageset'] = 'Odaberite sliku vješala';
$string[ 'hangman_language'] = 'Jezik riječi';
$string[ 'hangman_maxtries'] = 'Broj riječi po igri';
$string[ 'hangman_options'] = 'opzioni del gioco dell\'impiccato';
$string[ 'hangman_showcorrectanswer'] = 'Prikaži ispravan odgovor nakon završetka';
$string[ 'hangman_showfirst'] = 'Prikaži prvo slovo vješala';
$string[ 'hangman_showlast'] = 'Prikaži zadnje slovo vješala';
$string[ 'hangman_showquestion'] = 'Prikaži pitanje?';
$string[ 'hiddenpicture_across'] = 'Ćelije vodoravno';
$string[ 'hiddenpicture_down'] = 'Ćelije okomito';
$string[ 'hiddenpicture_height'] = 'Postavi visinu slike na';
$string[ 'hiddenpicture_options'] = 'opzioni della figura nascosta';
$string[ 'hiddenpicture_pictureglossary'] = 'Rječnik za glavno pitanje i sliku';
$string[ 'hiddenpicture_width'] = 'Postavi širinu slike na';
$string[ 'millionaire_background'] = 'Boja pozadine';
$string[ 'millionaire_options'] = 'opzioni del gioco del milionario';
$string[ 'millionaire_shuffle'] = 'Izmješaj pitanja';
$string[ 'snakes_background'] = 'Pozadina';
$string[ 'snakes_options'] = 'opzioni del gioco delle serpentine';
$string[ 'sourcemodule'] = 'Izvor pitanja';
$string[ 'sourcemodule_book'] = 'Odaberite knjigu';
$string[ 'sourcemodule_glossary'] = 'Odaberite rječnik';
$string[ 'sourcemodule_glossarycategory'] = 'Odaberite kategoriju rječnika';
$string[ 'sourcemodule_include_subcategories'] = 'Uključi podkategorije';
$string[ 'sourcemodule_question'] = 'Pitanja';
$string[ 'sourcemodule_questioncategory'] = 'Kategorija pitanja';
$string[ 'sourcemodule_quiz'] = 'Odaberite igru';
$string[ 'sudoku_maxquestions'] = 'Maksimalan broj pitanja';
$string[ 'sudoku_options'] = 'opzioni del gioco del Sudoku';
$string[ 'toptext'] = 'testo in cima';
//preview.php
$string[ 'only_teachers'] = 'Samo učitelj može vidjeti ovu stranicu';
$string[ 'preview'] = 'Pregled';
//review.php
$string[ 'attempts'] = 'Pokušaji';
$string[ 'completedon'] = 'Završeno';
$string[ 'outof'] = '{$a->grade} od maksimalno {$a->maxgrade}';
$string[ 'review'] = 'Pregled';
$string[ 'reviewofattempt'] = 'Pregled pokušaja {$a}';
$string[ 'startagain'] = 'Ponovo igraj';
$string[ 'timetaken'] = 'Proteklo vrijeme';
//showanswers.php
$string[ 'clearrepetitions'] = 'Clear statistics';
$string[ 'computerepetitions'] = 'ricalcola le statistiche';
$string[ 'feedbacks'] = 'Poruke ispravnih odgovora';
$string[ 'repetitions'] = 'ripetizioni';
//showattempts.php
$string[ 'lastip'] = 'Adresa računala';
$string[ 'showsolution'] = 'Rješenje';
$string[ 'timefinish'] = 'Kraj igre';
$string[ 'timelastattempt'] = 'Posljednji pokušaj';
$string[ 'timestart'] = 'Početak';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Pokušaj ponovo';
$string[ 'continueattemptgame'] = 'Nastavi sa prethodnim pokušajem ove igre';
$string[ 'reattemptgame'] = 'Ponovni pokušaj igre';
$string[ 'yourfinalgradeis'] = 'Vaša konačna ocjena za ovu igru je {$a}.';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//db/access.php $string[ 'game:attempt'] = 'Play game';
//db/access.php $string[ 'game:deleteattempts'] = 'Delete attempts';
//db/access.php $string[ 'game:grade'] = 'Grade games manually';
//db/access.php $string[ 'game:manage'] = 'Manage';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//db/access.php $string[ 'game:preview'] = 'Preview Games';
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts';
//db/access.php $string[ 'game:view'] = 'view';
//db/access.php $string[ 'game:viewreports'] = 'viewreports';
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions";
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.';
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.';
//exporthtml_snakes.php $string[ 'html_snakes_check'] = 'Check';
//exporthtml_snakes.php $string[ 'html_snakes_correct'] = 'Correct!';
//exporthtml_snakes.php $string[ 'html_snakes_no_selection'] = 'Have to select something!';
//exporthtml_snakes.php $string[ 'html_snakes_wrong'] = "Your answer isn't correct. Stay on the same seat.";
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'snakes_cols'] = 'Cols';
//mod_form.php $string[ 'snakes_data'] = 'Positions of Snakes and Ladders';
//mod_form.php $string[ 'snakes_file'] = 'File for background';
//mod_form.php $string[ 'snakes_footerx'] = 'Space at bootom left';
//mod_form.php $string[ 'snakes_footery'] = 'Space at bottom right';
//mod_form.php $string[ 'snakes_headerx'] = 'Space at up left';
//mod_form.php $string[ 'snakes_headery'] = 'Space at up right';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//mod_form.php $string[ 'snakes_rows'] = 'Rows';
//mod_form.php $string[ 'userdefined'] = 'User defined';
//review.php $string[ 'showall'] = 'Show all';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

306
lang/lt/game.php

@ -0,0 +1,306 @@
<?php // $Id: game.php,v 1.3 2012/07/26 05:38:59 bdaloukas Exp $
// translated by Andrius Krisciunas
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Importuoti duomenis iš OpenOffice duomenų rinkinio (odt)'; // 'Import from an OpenOffice file (odt)';
$string[ 'bookquiz_not_select_book'] = 'Nepasirinkote knygos'; // 'You have not select book';
$string[ 'bookquiz_subchapter'] = 'Sukurti poskyrius'; // 'Create subchapters';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'Knyga tuščia'; // 'The book is empty';
$string[ 'sudoku_submit'] = 'Vertinti atsakymus'; // 'Grade answers';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Grupės'; // 'Categories';
$string[ 'bookquiz_chapters'] = 'Skyriai'; // 'Chapters';
//cross/cross_class.php
$string[ 'lettersall'] = 'AĄBCČDEĘĖFGHIĮYJKLMNOPRSŠTUŲŪVZŽ'; // 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
//cross/crossdb_class.php
$string[ 'and'] = 'ir'; // 'and';
$string[ 'cross_correct'] = 'teisingas'; // 'corrert';
$string[ 'cross_corrects'] = 'teisingi'; // 'corrects';
$string[ 'cross_error'] = 'klaida'; // 'error';
$string[ 'cross_errors'] = 'klaidos'; // 'errors';
$string[ 'cross_found_many'] = 'Rastos'; // 'Found';
$string[ 'cross_found_one'] = 'Rasta'; // 'Found';
$string[ 'grade'] = 'Vertinti'; // 'Grade';
//cross/play.php
$string[ 'cross_across'] = 'Horizontaliai'; // 'Across';
$string[ 'cross_checkbutton'] = 'Tikrinti kryžiažodį'; // 'Check crossword';
$string[ 'cross_down'] = 'Vertikaliai'; // 'Down';
$string[ 'cross_endofgamebutton'] = 'Baigti kryžiažodžio sprendimą'; // 'End of crossword game';
$string[ 'cross_error_containsbadchars'] = 'Žodyje yra neleistinų ženklų'; // 'The word contains illegal characteres';
$string[ 'cross_error_wordlength1'] = 'Teisingame žodyje yra '; // 'The correct word contains ';
$string[ 'cross_error_wordlength2'] = ' raidės.'; // ' letters.';
$string[ 'cross_pleasewait'] = 'Prašau palaukti, vyksta kryžiažodžio įkėlimas'; // 'Please wait while cross is loading';
$string[ 'cross_welcome'] = '<h3>Sveiki!</h3><p>Norėdami pradėti, paspauskite bet kurį kryžiažodžio langelį. Atsiradusiame lauke įveskite savo atsakymą.</p>'; // '<h3>Welcome!</h3><p>Click on a word to begin.</p>';
$string[ 'letter'] = 'raidė'; // 'letter';
$string[ 'letters'] = 'raidės'; // 'letters';
$string[ 'nextgame'] = 'Naujas žaidimas'; // 'New game';
$string[ 'no_words'] = 'Nėra žodžių'; // 'There are no words';
$string[ 'print'] = 'Spausdinti'; // 'Print';
$string[ 'win'] = 'Sveikiname !!!'; // 'Congratulations !!!';
//cryptex/play.php
$string[ 'finish'] = 'Žaidimo pabaiga'; // 'End of game';
//db/access.php
$string[ 'game:attempt'] = 'Pradėti žaidimą'; // 'Play game';
$string[ 'game:deleteattempts'] = 'Ištrinti bandymus'; // 'Delete attempts';
$string[ 'game:grade'] = 'Rašyti žaidimų įvertinimus'; // 'Grade games manually';
$string[ 'game:manage'] = 'Tvarkyti'; // 'Manage';
$string[ 'game:manageoverrides'] = 'Tvarkyti žaidimo išimtis'; // 'Manage game overrides';
$string[ 'game:preview'] = 'Peržiūrėti žaidimus'; // 'Preview Games';
$string[ 'game:reviewmyattempts'] = 'Peržiūrėti bandymus'; // 'reviewmyattempts';
$string[ 'game:view'] = 'žiūrėti'; // 'view';
$string[ 'game:viewreports'] = 'Peržiūrėti ataskaitas'; // 'viewreports';
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'Teisinga frazė buvo: '; // 'The correct phrase was: ';
$string[ 'hangman_correct_word'] = 'Teisingas žodis buvo: '; // 'The correct word was: ';
$string[ 'hangman_gradeinstance'] = 'Viso žaidimo įvertinimas'; // 'Grade in whole game';
$string[ 'hangman_letters'] = 'Raidės: '; // 'Letters: ';
$string[ 'hangman_restletters_many'] = 'Jums liko <b>{$a}</b> bandymai'; // 'You have <b>{$a}</b> tries';
$string[ 'hangman_restletters_one'] = 'Jums liko <b>TIK 1 - PASKUTINIS</b> bandymas'; // 'You have <b>ONLY 1</b> try';
$string[ 'hangman_wrongnum'] = 'Neteisingai: %d iš %d'; // 'Wrong: %d out of %d';
$string[ 'nextword'] = 'Sekantis žodis'; // 'Next word';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = 'Vertinti pagrindinį atsakymą'; // 'Grade main answer';
$string[ 'hiddenpicture_nocols'] = 'Reikia nurodyti stulpelių skaičių'; // 'Have to specify the number of cols horizontaly';
$string[ 'hiddenpicture_nomainquestion'] = 'Žodyne {$a->name} nėra įrašo su pridėta nuotrauka'; // 'There are no glossary entries on glossary {$a->name} with an attached picture';
$string[ 'hiddenpicture_norows'] = 'Reikia nurodyti eilučių skaičių'; // 'Have to specify the number of cols verticaly';
$string[ 'must_select_glossary'] = 'Privalote parinkti žodyną'; // 'You must select a glossary';
$string[ 'no_questions'] = "Nėra klausimų"; // "There are no questions";
$string[ 'noglossaryentriesfound'] = 'Žodyne nerasta nei vieno įrašo'; // 'No glossary entries found';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Pasirinkite klausimo kategoriją'; // 'You must select one question category';
$string[ 'millionaire_must_select_quiz'] = 'Pasirinkite klausimų sąrašą'; // 'You must select one quiz';
//report/overview/report.php
$string[ 'allattempts'] = 'Rodyti visus bandymus'; // 'Show all tries';
$string[ 'allstudents'] = 'Rodyti visus $a'; // 'Show all $a';
$string[ 'attemptsonly'] = 'Rodyti tik bandžiusius spręsti studentus'; // 'Show only students with attempts';
$string[ 'deleteattemptcheck'] = 'Ar jūs tikrai norite visiškai pašalinti šiuos bandymus?'; // 'Are you absolutely sure you want to completely delete these attempts?';
$string[ 'displayoptions'] = 'Parodyti parinktis'; // 'Display options';
$string[ 'downloadods'] = 'Atsiųsti ODS formatu'; // 'Download in ODS format';
$string[ 'feedback'] = 'Atsiliepimai'; // 'Feedback';
$string[ 'noattemptsonly'] = 'Rodyti tiktai $a nebandžiusius spręsti'; // 'Show $a with no attempts only';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring atliko $a->attemptnum bandymų'; // '$a->studentnum $a->studentstring have made $a->attemptnum attempts';
$string[ 'pagesize'] = 'Klausimų viename puslapyje:'; // 'Questions per page:';
$string[ 'reportoverview'] = 'Apžvalga'; // 'Overview';
$string[ 'selectall'] = 'Pažymėti viską'; // 'Select all';
$string[ 'selectnone'] = 'Panaikinti žymėjimą'; // 'Deselect all';
$string[ 'showdetailedmarks'] = 'Rodyti vertininmą išsamiai'; // 'Show mark details';
$string[ 'startedon'] = 'Pradėta'; // 'Started on';
$string[ 'timecompleted'] = 'Pabaigta'; // 'Completed';
$string[ 'unfinished'] = 'atverti'; // 'open';
$string[ 'withselected'] = 'Su pažymėtais'; // 'With selected';
//snakes/play.php
$string[ 'snakes_dice'] = 'Žaidimo kauliukas, $a taškų.'; // 'Dice, $a spots.';
$string[ 'snakes_player'] = 'Žaidėjo, vieta: $a.'; // 'Player, position: $a.';
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Sukuriamų sudoku žaidimų skaičius'; // 'Number of sudokus that will be created';
$string[ 'sudoku_create_start'] = 'Pradėti kurti sudoku žaidimus'; // 'Start creating sudokus';
$string[ 'sudoku_creating'] = 'Kuriamas <b>{$a}</b> sudoku'; // 'Creating <b>{$a}</b> sudoku';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Baigti žaidimą'; // 'End of game';
$string[ 'sudoku_guessnumber'] = 'Spėti teisingą skaičių'; // 'Guess the correct number';
$string[ 'sudoku_noentriesfound'] = 'Žodyne nerasta nei vieno įrašo'; // 'No words found in glossary';
//export.php
$string[ 'export'] = 'Eksportuoti'; // 'Export';
$string[ 'html_hascheckbutton'] = 'Yra tikrinimo mygtukas:'; // 'Has check button:';
$string[ 'html_hasprintbutton'] = 'Yra spausdinimo mygtukas:'; // 'Has print button:';
$string[ 'html_title'] = 'html antraštė:'; // 'Title of html:';
$string[ 'javame_createdby'] = 'Autorius:'; // 'Created by:';
$string[ 'javame_description'] = 'Aprašymas:'; // 'Description:';
$string[ 'javame_filename'] = 'Failo vardas:'; // 'Filename:';
$string[ 'javame_icon'] = 'Piktograma:'; // 'Icon:';
$string[ 'javame_maxpictureheight'] = 'Maksimalus nuotraukos aukštis:'; // 'Max picture height:';
$string[ 'javame_maxpicturewidth'] = 'Maksimalus nuotraukos plotis:'; // 'Max picture width:';
$string[ 'javame_name'] = 'Pavadinimas:'; // 'Name:';
$string[ 'javame_type'] = 'Tipas:'; // 'Type:';
$string[ 'javame_vendor'] = 'Pardavėjas:'; // 'Vendor:';
$string[ 'javame_version'] = 'Versija:'; // 'Version:';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Žaidimas baigtas</B></BIG>'; // '<BIG><B>Game over</B></BIG>';
$string[ 'html_hangman_new'] = 'Naujas žaidimas'; // 'New';
//exporthtml_millionaire.php
$string[ 'millionaire_helppeople'] = 'Salės pagalba'; // 'Help of people';
$string[ 'millionaire_info_people'] = 'Salė sako'; // 'People say';
$string[ 'millionaire_info_telephone'] = 'Man atrodo teisingas atsakymas yra '; // 'I think that the correct answer is ';
$string[ 'millionaire_info_wrong_answer'] = 'Jūsų atsakymas neteisingas. <br>Teisingas atsakymas yra:'; // 'Your answer is wrong<br>The right answer is:';
$string[ 'millionaire_quit'] = 'Baigti'; // 'Quit';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'Milijonierio žaidimui duomenys turi būti {$a} arba klausimai, bet ne'; // 'For the millionaire the source must be {$a} or questions and not';
$string[ 'millionaire_telephone'] = 'Pagalba telefonu'; // 'Help of telephone';
$string[ 'must_select_questioncategory'] = 'Pasirinkite klausimo kategoriją'; // 'You must select a question category';
$string[ 'must_select_quiz'] = 'Pasirinkite klausimų sąrašą'; // 'You must select a quiz';
//exporthtml_snakes.php
$string[ 'html_snakes_check'] = 'Tikrinti'; // 'Check';
$string[ 'html_snakes_correct'] = 'Teisingai!'; // 'Correct!';
$string[ 'html_snakes_no_selection'] = 'Turite ką nors pažymėti!'; // 'Have to select something!';
$string[ 'html_snakes_wrong'] = "Jūsų atsakymas neteisingas. Pasiliekate toje pačioje vietoje."; // "Your answer isn't correct. Stay on the same seat.";
$string[ 'score'] = 'Rezultatas'; // 'Score';
//index.php
$string[ 'modulename'] = 'Žaidimas'; // 'Game';
$string[ 'modulenameplural'] = 'Žaidimai'; // 'Games';
$string[ 'pluginadministration'] = 'Žaidimo valdymas'; // 'Game administration';
$string[ 'pluginname'] = 'Žaidimai'; // 'Game';
//lib.php
$string[ 'attempt'] = 'Bandyti'; // 'Attempt';
$string[ 'bookquiz_questions'] = 'Susieti klausimų grupes su knygos skyriumi'; // 'Associate question categories to chapter of book';
$string[ 'export_to_html'] = 'Eksportuoti į HTML'; // 'Export to HTML';
$string[ 'export_to_javame'] = 'Eksportuoti į Java'; // 'Export to Javame';
$string[ 'game_bookquiz'] = 'Knyga su klausimais'; // 'Book with questions';
$string[ 'game_cross'] = 'Kryžiažodis'; // 'Crossword';
$string[ 'game_cryptex'] = 'Cryptex'; // 'Cryptex';
$string[ 'game_hangman'] = 'Kartuvės'; // 'Hangman';
$string[ 'game_hiddenpicture'] = 'Paslėpta nuotrauka'; // 'Hidden Picture';
$string[ 'game_millionaire'] = 'Milijonierius'; // 'Millionaire';
$string[ 'game_snakes'] = 'Gyvatės ir kopėčios'; // 'Snakes and Ladders';
$string[ 'game_sudoku'] = 'Sudoku'; // 'Sudoku';
$string[ 'info'] = 'Informacija'; // 'Info';
$string[ 'noattempts'] = 'Nebuvo bandyta žaisti šio žaidimo'; // 'No attempts have been made on this game';
$string[ 'percent'] = 'Procentai'; // 'Percent';
$string[ 'reset_game_all'] = 'Šalinti bandymus iš visų žaidimų'; // 'Delete tries from all games';
$string[ 'reset_game_deleted_course'] = 'Šalinti bandymus iš pašalintų žaidimų'; // 'Delete tries from deleted courses';
$string[ 'results'] = 'Rezultatas'; // 'Results';
$string[ 'showanswers'] = 'Rodyti atsakymus'; // 'Show answers';
$string[ 'showattempts'] = 'Rodyti bandymus'; // 'Show attempts';
//locallib.php
$string[ 'attemptfirst'] = 'Pirmas bandymas'; // 'First attempt';
$string[ 'attemptlast'] = 'Paskutinis bandymas'; // 'Last attempt';
$string[ 'convertfrom'] = '-'; // '-';
$string[ 'convertto'] = '-'; // '-';
$string[ 'gradeaverage'] = 'Vidurkis'; // 'Average grade';
$string[ 'gradehighest'] = 'Aukščiausias rezultatas'; // 'Highest grade';
//mod_form.php
$string[ 'bottomtext'] = 'Tekstas puslapio apačioje'; // 'Text at the bottom of page';
$string[ 'cross_layout'] = 'Išdėstymas'; // 'Layout';
$string[ 'cross_layout0'] = 'Frazės po kryžiažodžiu'; // 'Phrases on the bottom of cross';
$string[ 'cross_layout1'] = 'Frazės kryžiažodžio dešinėje'; // 'Phrases on the right of cross';
$string[ 'cross_maxcols'] = 'Maksimalus stulpelių skaičius kryžiažodyje'; // 'Maximum number of cols of crossword';
$string[ 'cross_maxwords'] = 'Maksimalus žodžių skaičius kryžiažodyje'; // 'Maximum number of words of crossword';
$string[ 'cross_options'] = 'Kryžiažodžio parametrai'; // 'Crossword options';
$string[ 'cryptex_maxcols'] = 'Maksimalus stulpelių/eilučių skaičius cryptex žaidime'; // 'Maximum number of cols/rows in cryptex';
$string[ 'cryptex_maxtries'] = 'Maksimalus bandymų skaičius'; // 'Max tries';
$string[ 'cryptex_maxwords'] = 'Maksimalus žodžių skaičius cryptex žaidime'; // 'Maximum number of words in cryptex';
$string[ 'cryptex_options'] = 'Cryptex žaidimo parametrai'; // 'Cryptex options';
$string[ 'gameclose'] = 'Užbaigti žaidimą'; // 'Close the game';
$string[ 'gameopen'] = 'Pradėti žaidimą'; // 'Open the game';
$string[ 'grademethod'] = 'Vertinimo metodas'; // 'Grading method';
$string[ 'hangman_allowspaces'] = 'Leisti naudoti tarpus žodžiuose'; // 'Allow spaces in words';
$string[ 'hangman_allowsub'] = 'Leisti naudoti "-" (brūkšnelio ženklą) žodžiuose'; // 'Allow the symbol - in words';
$string[ 'hangman_imageset'] = 'Parinkite Kartuvių žaidimo paveiksliuką'; // 'Select the images of hangman';
$string[ 'hangman_language'] = 'Žodžių kalba'; // 'Language of words';
$string[ 'hangman_maximum_number_of_errors'] = 'Maksimalus klaidų skaičius (turi būti paveiksliukai kiekvienai klaidai - hangman_0.jpg, hangman_1.jpg, ...)'; // 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
$string[ 'hangman_maxtries'] = 'Žodžių skaičius viename žaidime'; // 'Number of words per game';
$string[ 'hangman_options'] = 'Kartuvių žaidimo parametrai'; // 'Hangman options';
$string[ 'hangman_showcorrectanswer'] = 'Pabaigoje parodyti teisingą atsakymą'; // 'Show the correct answer after the end';
$string[ 'hangman_showfirst'] = 'Rodyti pirmą žodžio raidę'; // 'Show first letter of hangman';
$string[ 'hangman_showlast'] = 'Rodyti paskutinę žodžio raidę'; // 'Show last letter of hangman';
$string[ 'hangman_showquestion'] = 'Rodyti klausimus?'; // 'Show the questions ?';
$string[ 'hiddenpicture_across'] = 'Langeliai horizontaliai'; // 'Cells horizontal';
$string[ 'hiddenpicture_down'] = 'Langeliai vertikaliai'; // 'Cells down';
$string[ 'hiddenpicture_height'] = 'Nustatyti nuotraukos aukštį'; // 'Set height of picture to';
$string[ 'hiddenpicture_options'] = '\'Paslėpta nuotrauka\' žaidimo parametrai'; // '\'Hidden Picture\' options';
$string[ 'hiddenpicture_pictureglossary'] = 'Pagrindinio klausimo ir nuotraukos žodymas'; // 'The glossary for main question and picture';
$string[ 'hiddenpicture_width'] = 'Nustatyti nuotraukos plotį'; // 'Set width of picture to';
$string[ 'millionaire_background'] = 'Fono spalva'; // 'Background color';
$string[ 'millionaire_options'] = 'Milijonieriaus žaidimo parametrai'; // 'Millionaire\' options';
$string[ 'millionaire_shuffle'] = 'Klausimų parinkimas atsitiktine tvarka'; // 'Randomize questions';
$string[ 'snakes_background'] = 'Fonas'; // 'Background';
$string[ 'snakes_cols'] = 'Stulpeliai'; // 'Cols';
$string[ 'snakes_data'] = 'Gyvačių ir kopėčių padėtis'; // 'Positions of Snakes and Ladders';
$string[ 'snakes_file'] = 'Fono failas'; // 'File for background';
$string[ 'snakes_footerx'] = 'Tarpas apačioje kairėje'; // 'Space at bootom left';
$string[ 'snakes_footery'] = 'Tarpas apačioje dešinėje'; // 'Space at bottom right';
$string[ 'snakes_headerx'] = 'Tarpas viršuje kairėje'; // 'Space at up left';
$string[ 'snakes_headery'] = 'Tarpas viršuje dešinėje'; // 'Space at up right';
$string[ 'snakes_options'] = '\'Gyvatės ir kopėčios\' žaidimo parametrai'; // '\'Snakes and Ladders\' options';
$string[ 'snakes_rows'] = 'Eilutės'; // 'Rows';
$string[ 'sourcemodule'] = 'Klausimų šaltinis'; // 'Source of questions';
$string[ 'sourcemodule_book'] = 'Parinkite knygą'; // 'Select a book';
$string[ 'sourcemodule_glossary'] = 'Parinkite žodyną'; // 'Select glossary';
$string[ 'sourcemodule_glossarycategory'] = 'Parinkite žodyno grupę'; // 'Select category of glossary';
$string[ 'sourcemodule_include_subcategories'] = 'Įtraukti pogrupį'; // 'Include subcategories';
$string[ 'sourcemodule_question'] = 'Klausimai'; // 'Questions';
$string[ 'sourcemodule_questioncategory'] = 'Parinkite klausimų grupę'; // 'Select question category';
$string[ 'sourcemodule_quiz'] = 'Parinkite kontrolinių klausimų sąrašą'; // 'Select quiz';
$string[ 'sudoku_maxquestions'] = 'Didžiausias klausimų skaičius'; // 'Maximum number of questions';
$string[ 'sudoku_options'] = 'Sudoku parametrai'; // 'Sudoku options';
$string[ 'toptext'] = 'Tekstas puslapio viršuje'; // 'Text at the top of page';
$string[ 'userdefined'] = 'Naudotojo apibrėžtas'; // 'User defined';
//preview.php
$string[ 'only_teachers'] = 'Tik mokytojai gali matyti šį puslapį'; // 'Only teacher can see this page';
$string[ 'preview'] = 'Peržiūrėti'; // 'Preview';
//review.php
$string[ 'attempts'] = 'Bandymai'; // 'Attempts';
$string[ 'completedon'] = 'Išspręsta'; // 'Completed on';
$string[ 'outof'] = '{$a->grade} balų iš {$a->maxgrade}'; // '{$a->grade} out of a maximum of {$a->maxgrade}';
$string[ 'review'] = 'Peržiūrėti'; // 'Review';
$string[ 'reviewofattempt'] = 'Peržiūrėti bandymą {$a}'; // 'Review of Attempt {$a}';
$string[ 'showall'] = 'Parodyti visus'; // 'Show all';
$string[ 'startagain'] = 'Pradėti iš naujo'; // 'Start again';
$string[ 'timetaken'] = 'Užėmė laiko'; // 'Time taken';
//showanswers.php
$string[ 'clearrepetitions'] = 'Išvalyti statistiką'; // 'Clear statistics';
$string[ 'computerepetitions'] = 'Skaičiuoti statistiką iš naujo'; // 'Compute statistics again';
$string[ 'feedbacks'] = 'Teisingų atsakymų pranešimai'; // 'Messages correct answer';
$string[ 'repetitions'] = 'Pasikartojimai'; // 'Repetitions';
//showattempts.php
$string[ 'lastip'] = 'Studento IP'; // 'IP student';
$string[ 'showsolution'] = 'Sprendimas'; // 'solution';
$string[ 'timefinish'] = 'Žaidimas pabaigtas'; // 'End of game';
$string[ 'timelastattempt'] = 'Paskutinins bandymas'; // 'Last attempt';
$string[ 'timestart'] = 'Pradėta'; // 'Start';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Pradėti dabar žaidimą'; // 'Attempt game now';
$string[ 'continueattemptgame'] = 'Tęsti anksčiau pradėtą žaidimą'; // 'Continue a previous attempt of game';
$string[ 'gameclosed'] = 'Žaidimas užbaigtas {$a}'; // 'This game closed on {$a}';
$string[ 'gamecloseson'] = 'Žaidimas bus baigiamas {$a}'; // 'This game will close at {$a}';
$string[ 'gamenotavailable'] = 'Žaidimas nebus pradedamas iki {$a}'; // 'The game will not be available until {$a}';
$string[ 'gameopenedon'] = 'Žaidimas bus pradedamas {$a}'; // 'This game opened at {$a}';
$string[ 'reattemptgame'] = 'Bandyti žaidimą dar kartą'; // 'Reattempt game';
$string[ 'yourfinalgradeis'] = 'Galutinis Jūsų žaidimo įvertinimas yra {$a}.'; // 'Your final grade for this game is {$a}.';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//view.php $string[ 'comment'] = 'Comment';

305
lang/nl/game.php

@ -0,0 +1,305 @@
<?php // $Id: game.php,v 1.9 2012/07/26 05:38:59 bdaloukas Exp $
// game.php - created with Moodle 2.0 (2007101509)
// translated to Nederlands (nl) by http://www.indegroep.nl / Fleur Deboutte
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Importeer van een OpenOffice (odt) bestand';
$string[ 'bookquiz_not_select_book'] = 'Je hebt geen boek gekozen';
$string[ 'bookquiz_subchapter'] = 'Maak subhoofdstukken aan';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'Dit boek is leeg';
$string[ 'sudoku_submit'] = 'Becijfer antwoorden';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Categorieën';
$string[ 'bookquiz_chapters'] = 'Hoofdstukken';
//cross/cross_class.php
$string[ 'lettersall'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
//cross/crossdb_class.php
$string[ 'and'] = 'en';
$string[ 'cross_correct'] = 'Correct';
$string[ 'cross_corrects'] = 'Verbeteringen';
$string[ 'cross_error'] = 'Fout';
$string[ 'cross_errors'] = 'Fouten';
$string[ 'cross_found_many'] = 'Gevonden:';
$string[ 'cross_found_one'] = 'Gevonden:';
$string[ 'grade'] = 'Cijfer';
//cross/play.php
$string[ 'cross_across'] = 'Schuin';
$string[ 'cross_checkbutton'] = 'Controleer het kruiswoordraadsel';
$string[ 'cross_down'] = 'Naar beneden';
$string[ 'cross_endofgamebutton'] = 'Einde van het kruiswoordraadsel';
$string[ 'cross_error_containsbadchars'] = 'Het woord bevat verboden tekens';
$string[ 'cross_error_wordlength1'] = 'Het juiste woord bevat';
$string[ 'cross_error_wordlength2'] = 'letters';
$string[ 'cross_pleasewait'] = 'Een moment geduld terwijl het kruiswoord ingeladen wordt';
$string[ 'cross_welcome'] = '<h3>Welkom!</h3><p>Klik op een woord om te beginnen.';
$string[ 'letter'] = 'letter';
$string[ 'letters'] = 'letters';
$string[ 'nextgame'] = 'Nieuw spel';
$string[ 'no_words'] = 'Geen woorden gevonden';
$string[ 'print'] = 'Print';
$string[ 'win'] = 'Gefeliciteerd!!';
//cryptex/play.php
$string[ 'finish'] = 'Einde van het spel';
//db/access.php
$string[ 'game:attempt'] = 'Speel het spel';
$string[ 'game:deleteattempts'] = 'Verwijder pogingen';
$string[ 'game:grade'] = 'Geef manueel punten';
$string[ 'game:manage'] = 'Beheer';
$string[ 'game:preview'] = 'Bekijk Spellen';
$string[ 'game:reviewmyattempts'] = 'Bekijk mijn pogingen';
$string[ 'game:view'] = 'Bekijk';
$string[ 'game:viewreports'] = 'Bekijk het rapport';
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'De juiste oplossing was:';
$string[ 'hangman_correct_word'] = 'Het juiste woord was:';
$string[ 'hangman_gradeinstance'] = 'Cijfer in het hele spel';
$string[ 'hangman_letters'] = 'Letters';
$string[ 'hangman_restletters_many'] = 'Je hebt <b>{$a}</b> pogingen';
$string[ 'hangman_restletters_one'] = 'Je hebt slechts <b>ÉÉN</b> poging';
$string[ 'hangman_wrongnum'] = 'Fout: %%d van de %%d';
$string[ 'nextword'] = 'Volgende woord';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = 'Cijfer hoofdantwoord';
$string[ 'hiddenpicture_nocols'] = 'Het aantal kolommen horizontaal dient ingesteld te worden';
$string[ 'hiddenpicture_nomainquestion'] = 'Er zijn geen woordenlijst onderdelen in woordenlijst {$a->name} met een toegevoegde afbeelding.';
$string[ 'hiddenpicture_norows'] = 'Het aantal rijen verticaal dient ingesteld te worden';
$string[ 'must_select_glossary'] = 'Je moet een woordenlijst kiezen';
$string[ 'no_questions'] = "Geen vragen gevonden";
$string[ 'noglossaryentriesfound'] = 'Geen woorden gevonden';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Je moet een vragencategorie kiezen';
$string[ 'millionaire_must_select_quiz'] = 'Je moet één quiz kiezen';
//report/overview/report.php
$string[ 'allattempts'] = 'Alle pogingen';
$string[ 'allstudents'] = 'Alle leerlingen';
$string[ 'attemptsonly'] = 'Laat alleen leerlingen met pogingen zien';
$string[ 'deleteattemptcheck'] = 'Weet je zeker dat je deze pogingen wilt verwijderen?';
$string[ 'displayoptions'] = 'Weergaveopties';
$string[ 'downloadods'] = 'Download in ODS formaat';
$string[ 'feedback'] = 'Reactie';
$string[ 'noattemptsonly'] = 'Laat $a zonder pogingen zien';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring heeft $a->attemptnum pogingen gedaan';
$string[ 'pagesize'] = 'Aantal vragen per pagina';
$string[ 'reportoverview'] = 'Overzicht';
$string[ 'selectall'] = 'Selecteer allemaal';
$string[ 'selectnone'] = 'Deselecteer allemaal';
$string[ 'showdetailedmarks'] = 'Laat markeringsdetails zien';
$string[ 'startedon'] = 'Gestart op';
$string[ 'timecompleted'] = 'Voltooid';
$string[ 'unfinished'] = 'open';
$string[ 'withselected'] = 'Met geselecteerde';
//snakes/play.php
$string[ 'snakes_dice'] = 'Dobbelsteen, $a ogen.';
$string[ 'snakes_player'] = 'Speler, plaats: $a.';
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Aantal sudokus die gemaakt worden';
$string[ 'sudoku_create_start'] = 'Start met het maken van sudokus';
$string[ 'sudoku_creating'] = 'Creëren van <b>{$a}</b> sudoku';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Einde van het sudoku spel';
$string[ 'sudoku_guessnumber'] = 'Gok het correcte aantal';
$string[ 'sudoku_noentriesfound'] = 'Geen woorden gevonden in de woordenlijst';
//export.php
$string[ 'export'] = 'Exporteer';
$string[ 'html_hascheckbutton'] = 'Heeft een check-knop:';
$string[ 'html_hasprintbutton'] = 'Heeft een print-knop:';
$string[ 'html_title'] = 'Html-titel:';
$string[ 'javame_createdby'] = 'Gemaakt door:';
$string[ 'javame_description'] = 'Beschrijving:';
$string[ 'javame_filename'] = 'Naam van de file:';
$string[ 'javame_icon'] = 'Icoon:';
$string[ 'javame_maxpictureheight'] = 'Max afbeeldingshoogte:';
$string[ 'javame_maxpicturewidth'] = 'Max afbeeldingsbreedte:';
$string[ 'javame_name'] = 'Naam:';
$string[ 'javame_type'] = 'Type:';
$string[ 'javame_vendor'] = 'Verkoper:';
$string[ 'javame_version'] = 'Versie:';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Spel voorbij</B></BIG>';
$string[ 'html_hangman_new'] = 'Nieuw';
//exporthtml_millionaire.php
$string[ 'millionaire_helppeople'] = 'Aan het publiek vragen';
$string[ 'millionaire_info_people'] = 'Mensen zeggen';
$string[ 'millionaire_info_telephone'] = 'Ik denk dat het juiste antwoord is...';
$string[ 'millionaire_info_wrong_answer'] = 'Helaas, je antwoord is fout.<br>Het goede antwoord is:';
$string[ 'millionaire_quit'] = 'Stop';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'Voor de miljonair moet de bron {$a} zijn of de vragen en niet';
$string[ 'millionaire_telephone'] = 'Een hulplijn bellen';
$string[ 'must_select_questioncategory'] = 'Je moet een vragencategorie kiezen';
$string[ 'must_select_quiz'] = 'Je moet een quiz/test kiezen';
//exporthtml_snakes.php
$string[ 'html_snakes_check'] = 'Check';
$string[ 'html_snakes_correct'] = 'Juist!';
$string[ 'html_snakes_no_selection'] = 'Je moet iets aanduiden!';
$string[ 'html_snakes_wrong'] = "Je antwoord is niet juist, je mag niet verdergaan op het bord.";
$string[ 'score'] = 'Score';
//index.php
$string[ 'modulename'] = 'Spel';
$string[ 'modulenameplural'] = 'Spellen';
$string[ 'pluginname'] = 'Spel';
//lib.php
$string[ 'attempt'] = 'Poging';
$string[ 'bookquiz_questions'] = 'Associeer vraagcategorieën aan het hoofdstuk van dit boek.';
$string[ 'export_to_html'] = 'Exporteer naar HTML';
$string[ 'export_to_javame'] = 'Exporteer naar Javame';
$string[ 'game_bookquiz'] = 'Boek met vragen';
$string[ 'game_cross'] = 'Kruiswoord';
$string[ 'game_cryptex'] = 'Cryptex';
$string[ 'game_hangman'] = 'Galgje';
$string[ 'game_hiddenpicture'] = 'Verborgen foto';
$string[ 'game_millionaire'] = 'Miljonair';
$string[ 'game_snakes'] = 'Slangen en Ladders';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Info';
$string[ 'noattempts'] = 'Er zijn in deze quiz/test geen pogingen gedaan';
$string[ 'percent'] = 'Percentage';
$string[ 'results'] = 'Resultaten';
$string[ 'showanswers'] = 'Laat antwoorden zien';
$string[ 'showattempts'] = 'Toon pogingen';
//locallib.php
$string[ 'attemptfirst'] = 'Eerste poging';
$string[ 'attemptlast'] = 'Laatste poging';
$string[ 'gradeaverage'] = 'Gemiddeld cijfer';
$string[ 'gradehighest'] = 'Hoogste cijfer';
//mod_form.php
$string[ 'bottomtext'] = 'Tekst aan onderkant';
$string[ 'cross_layout'] = 'Layout';
$string[ 'cross_layout0'] = 'Zinnen aan de onderkant van het kruiswoord';
$string[ 'cross_layout1'] = 'Zinnen aan de rechterkant van het kruiswoord';
$string[ 'cross_maxcols'] = 'Maximum aantal kolommen in kruiswoord';
$string[ 'cross_maxwords'] = 'Maximum aantal woorden in het kruiswoord';
$string[ 'cross_options'] = 'Kruiswoordraadsel opties';
$string[ 'cryptex_maxcols'] = 'Maximum aantal kolommen/rijen in de cryptex';
$string[ 'cryptex_maxtries'] = 'Max pogingen';
$string[ 'cryptex_maxwords'] = 'Maximum aantal woorden in de cryptex';
$string[ 'cryptex_options'] = 'Woordzoeker opties';
$string[ 'grademethod'] = 'Becijferingsmethode';
$string[ 'hangman_allowspaces'] = 'Sta spaties in woorden toe';
$string[ 'hangman_allowsub'] = 'Sta het -symbool toe in woorden';
$string[ 'hangman_imageset'] = 'Kies de plaatjes voor galgje';
$string[ 'hangman_language'] = 'Taal van de woorden';
$string[ 'hangman_maxtries'] = 'Aantal woorden per spel';
$string[ 'hangman_options'] = 'Galgje opties';
$string[ 'hangman_showcorrectanswer'] = 'Laat de juiste antwoorden aan het einde zien';
$string[ 'hangman_showfirst'] = 'Laat de eerste letter bij galgje zien';
$string[ 'hangman_showlast'] = 'Laat de laatste letter bij galgje zien';
$string[ 'hangman_showquestion'] = 'Laat de vragen zien?';
$string[ 'hiddenpicture_across'] = 'Cellen horizontaal';
$string[ 'hiddenpicture_down'] = 'Cellen naar beneden';
$string[ 'hiddenpicture_height'] = 'Stel de hoogte in op';
$string[ 'hiddenpicture_options'] = '\'Verborgen afbeelding\' opties';
$string[ 'hiddenpicture_pictureglossary'] = 'De woordenlijst voor de hoofdvraag';
$string[ 'hiddenpicture_width'] = 'Stel de breedte van de afbeelding in op';
$string[ 'millionaire_background'] = 'Achtergrondkleur';
$string[ 'millionaire_options'] = 'Miljonair\' opties';
$string[ 'millionaire_shuffle'] = 'Haal de vragen door elkaar';
$string[ 'snakes_background'] = 'Achtergrond';
$string[ 'snakes_cols'] = 'Kolommen';
$string[ 'snakes_data'] = 'Spelbord';
$string[ 'snakes_file'] = 'Achtergrond';
$string[ 'snakes_footerx'] = 'Ruimte linksonder';
$string[ 'snakes_footery'] = 'Ruimte rechtsonder';
$string[ 'snakes_headerx'] = 'Ruimte linksboven';
$string[ 'snakes_headery'] = 'Ruimte rechtsboven';
$string[ 'snakes_options'] = '\'Slangen en ladders\' opties';
$string[ 'snakes_rows'] = 'Rijen';
$string[ 'sourcemodule'] = 'Vragenbron';
$string[ 'sourcemodule_book'] = 'Kies een boek';
$string[ 'sourcemodule_glossary'] = 'Kies een woordenlijst';
$string[ 'sourcemodule_glossarycategory'] = 'Selecteer een categorie van de woordenlijst';
$string[ 'sourcemodule_include_subcategories'] = 'Subcategorieën meerekenen';
$string[ 'sourcemodule_question'] = 'Vragen';
$string[ 'sourcemodule_questioncategory'] = 'Selecteer vragencategorie';
$string[ 'sourcemodule_quiz'] = 'Selecteer quiz/test';
$string[ 'sudoku_maxquestions'] = 'Maximum aantal vragen';
$string[ 'sudoku_options'] = 'Sudoku opties';
$string[ 'toptext'] = 'Teskt bovenaan de pagina';
$string[ 'userdefined'] = 'Bepaald door de gebruiker';
//preview.php
$string[ 'only_teachers'] = 'Alleen de leraar kan deze pagina zien';
$string[ 'preview'] = 'Voorbeeld';
//review.php
$string[ 'attempts'] = 'Pogingen';
$string[ 'completedon'] = 'Voltooid op';
$string[ 'outof'] = '{$a->grade} uit een maximum van {$a->maxgrade}';
$string[ 'review'] = 'Bekijk';
$string[ 'reviewofattempt'] = 'Overzicht van Poging {$a}';
$string[ 'showall'] = 'Toon alles';
$string[ 'startagain'] = 'Start opnieuw';
$string[ 'timetaken'] = 'Gebruikte tijd';
//showanswers.php
$string[ 'clearrepetitions'] = 'Ruim statistieken op';
$string[ 'computerepetitions'] = 'Bereken statistieken opnieuw';
$string[ 'feedbacks'] = 'Berichten bij juist antwoord';
$string[ 'repetitions'] = 'Herhalingen';
//showattempts.php
$string[ 'lastip'] = 'IP leerling';
$string[ 'showsolution'] = 'oplossing';
$string[ 'timefinish'] = 'Einde van het spel';
$string[ 'timelastattempt'] = 'Laatste poging';
$string[ 'timestart'] = 'Start';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Probeer het spel nu';
$string[ 'continueattemptgame'] = 'Ga verder met een vorige poging';
$string[ 'reattemptgame'] = 'Probeer het spel opnieuw';
$string[ 'yourfinalgradeis'] = 'Je uiteindelijke cijfer voor dit spel is {$a}.';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

305
lang/no/game.php

@ -0,0 +1,305 @@
<?php // $Id: game.php,v 1.8 2012/07/26 05:39:00 bdaloukas Exp $
// game.php - created with Moodle 2.0 (2007101509)
// translation to Norsk - bokmål (no)
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Importer fra en Open Office tekstfil (odt)';
$string[ 'bookquiz_not_select_book'] = 'Du har ikke valgt bok';
$string[ 'bookquiz_subchapter'] = 'Lag underkapittel';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'Boken er tom';
$string[ 'sudoku_submit'] = 'Gi svarene karakter';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Kategorier';
$string[ 'bookquiz_chapters'] = 'Kapittel';
//cross/cross_class.php
$string[ 'lettersall'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ';
//cross/crossdb_class.php
$string[ 'and'] = 'og';
$string[ 'cross_correct'] = 'Riktig';
$string[ 'cross_corrects'] = 'Rettinger';
$string[ 'cross_error'] = 'Feil';
$string[ 'cross_errors'] = 'feil';
$string[ 'cross_found_many'] = 'Funnet';
$string[ 'cross_found_one'] = 'Funnet';
$string[ 'grade'] = 'Karakter';
//cross/play.php
$string[ 'cross_across'] = 'Horisontal/bortover';
$string[ 'cross_checkbutton'] = 'Sjekk kryssord';
$string[ 'cross_down'] = 'Nedover';
$string[ 'cross_endofgamebutton'] = 'Avslutt kryssordspillet';
$string[ 'cross_error_containsbadchars'] = 'Ordet inneholder ulovlige tegn';
$string[ 'cross_error_wordlength1'] = 'Det korrekte ordet inneholder';
$string[ 'cross_error_wordlength2'] = 'tegn';
$string[ 'cross_pleasewait'] = 'Vær vennlig å vent mens kryssordet lastes';
$string[ 'cross_welcome'] = '<h3>Velkommen!</h3><p>Klikk et ord for å begyne.</p>';
$string[ 'letter'] = 'bokstav';
$string[ 'letters'] = 'bokstaver';
$string[ 'nextgame'] = 'Nytt spill';
$string[ 'no_words'] = 'Ingen ord funnet';
$string[ 'win'] = 'Gratulerer!!!';
//cryptex/play.php
$string[ 'finish'] = 'Spill slutt';
//db/access.php
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'Korrekt setning var:';
$string[ 'hangman_correct_word'] = 'Korrekt ord var:';
$string[ 'hangman_gradeinstance'] = 'Karakter i hele spillet';
$string[ 'hangman_letters'] = 'Bokstaver:';
$string[ 'hangman_restletters_many'] = 'Du har <b>{$a}</b> forsøk';
$string[ 'hangman_restletters_one'] = 'Du har <b>BARE 1</b> forsøk';
$string[ 'hangman_wrongnum'] = 'Feil: %%d av %%d';
$string[ 'nextword'] = 'Neste ord';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = 'Karakter hovedsvar';
$string[ 'hiddenpicture_nocols'] = 'Du må angi antall kolonner horisontalt';
$string[ 'hiddenpicture_nomainquestion'] = 'Det er ingen ordbokinnlegg i ordboken {$a->name} med vedlagt bilde';
$string[ 'hiddenpicture_norows'] = 'Må angi antall kolonner vertikalt';
$string[ 'must_select_glossary'] = 'Du må velge en ordbok';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Du må velge en spørsmålskategori';
$string[ 'millionaire_must_select_quiz'] = 'Du må velge en prøve';
//report/overview/report.php
$string[ 'allattempts'] = 'Alle forsøk';
$string[ 'allstudents'] = 'Alle studenter';
$string[ 'attemptsonly'] = 'Bare vis studenter som har forsøkt';
$string[ 'deleteattemptcheck'] = 'Er du sikkker på at du vil slette disse forsøkene helt?';
$string[ 'displayoptions'] = 'Vis valg';
$string[ 'downloadods'] = 'Last ned i ODS format';
$string[ 'feedback'] = 'Tilbakemelding';
$string[ 'noattemptsonly'] = 'Vis $a uten noen forsøk';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring har gjort $a->attemptnum forsøk';
$string[ 'pagesize'] = 'Spørsmål per side';
$string[ 'reportoverview'] = 'Oversikt';
$string[ 'selectall'] = 'Velg alle';
$string[ 'selectnone'] = 'Ikke velg noen';
$string[ 'showdetailedmarks'] = 'Vis markeringsdetaljer';
$string[ 'startedon'] = 'Startet';
$string[ 'timecompleted'] = 'Ferdig';
$string[ 'unfinished'] = 'åpne';
$string[ 'withselected'] = 'Med valgte';
//snakes/play.php
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Antall sudokus som vil lages';
$string[ 'sudoku_create_start'] = 'Start med å lage sudokus';
$string[ 'sudoku_creating'] = 'Lag <b>{$a}</b>sudoku';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Slutt på sudokuspill';
$string[ 'sudoku_guessnumber'] = 'Gjett riktig tall';
$string[ 'sudoku_noentriesfound'] = 'Ingen ord funnet i ordboken';
//export.php
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Spillet slutt</B></BIG>';
//exporthtml_millionaire.php
$string[ 'millionaire_info_people'] = 'Folk sier';
$string[ 'millionaire_info_telephone'] = 'Jeg tror korrekt svar er';
$string[ 'millionaire_info_wrong_answer'] = 'Svaret ditt er feil</br>Riktig svar er:';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'I \"Vil du bli millionær\" må kilden være {$a} eller spørsmål og ikke';
$string[ 'must_select_questioncategory'] = 'Du må velge en spørsmålskategori';
$string[ 'must_select_quiz'] = 'Du må velge en prøve';
//exporthtml_snakes.php
$string[ 'score'] = 'Score';
//index.php
$string[ 'modulename'] = 'Spill';
$string[ 'modulenameplural'] = 'Spill';
$string[ 'pluginname'] = 'Spill';
//lib.php
$string[ 'attempt'] = 'Forsøk';
$string[ 'bookquiz_questions'] = 'Koble spørsmålskategorier til kapitler i bok';
$string[ 'game_bookquiz'] = 'Bok med spørsmål';
$string[ 'game_cross'] = 'Kryssord';
$string[ 'game_cryptex'] = 'Cryptex';
$string[ 'game_hangman'] = 'Hangman';
$string[ 'game_hiddenpicture'] = 'Skjult bilde';
$string[ 'game_millionaire'] = 'Millionær';
$string[ 'game_snakes'] = 'Slange og stiger';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Info';
$string[ 'noattempts'] = 'Ingen forsøk er gjort på denne prøven';
$string[ 'results'] = 'Resulat';
$string[ 'showanswers'] = 'Vis svar';
//locallib.php
$string[ 'attemptfirst'] = 'Første forsøk';
$string[ 'attemptlast'] = 'Siste forsøk';
$string[ 'gradeaverage'] = 'Gjennomsnittelig karakter';
$string[ 'gradehighest'] = 'Høyeste karakter';
//mod_form.php
$string[ 'bottomtext'] = 'Bunntekst';
$string[ 'cross_layout'] = 'Layout';
$string[ 'cross_layout0'] = 'Fraser på bunnen på tvers';
$string[ 'cross_layout1'] = 'Fraser til høyre på tvers';
$string[ 'cross_maxcols'] = 'Maksimum antall kolonner i kryssordet';
$string[ 'cross_maxwords'] = 'Maksimum antall ord i kryssordet';
$string[ 'cryptex_maxcols'] = 'Max antall kol/rader i cryptex';
$string[ 'cryptex_maxwords'] = 'Max antall ord i cryptex';
$string[ 'grademethod'] = 'Karaktermetode';
$string[ 'hangman_allowspaces'] = 'Tillatt mellomrom i ord';
$string[ 'hangman_allowsub'] = 'Tillat symbolet i ord';
$string[ 'hangman_imageset'] = 'Velg bilder for hangman';
$string[ 'hangman_language'] = 'Språk for ordene';
$string[ 'hangman_maxtries'] = 'Antall ord per spill';
$string[ 'hangman_showcorrectanswer'] = 'Vis korrekt svar når du er ferdig';
$string[ 'hangman_showfirst'] = 'Vis første bokstaven i hangman';
$string[ 'hangman_showlast'] = 'Vis siste bokstaven i hangman';
$string[ 'hangman_showquestion'] = 'Vis spørsmålet?';
$string[ 'hiddenpicture_across'] = 'Ruter horisontalt';
$string[ 'hiddenpicture_down'] = 'Ruter nedover';
$string[ 'hiddenpicture_pictureglossary'] = 'Ordbok for hovedspørsmål';
$string[ 'snakes_background'] = 'Bakgrunn';
$string[ 'sourcemodule'] = 'Spørsmålskilde';
$string[ 'sourcemodule_book'] = 'Velg en bok';
$string[ 'sourcemodule_glossary'] = 'Velg ordbok';
$string[ 'sourcemodule_glossarycategory'] = 'Velg ordbokskategori';
$string[ 'sourcemodule_question'] = 'Spørsmål';
$string[ 'sourcemodule_questioncategory'] = 'Velg spørsmålskategori';
$string[ 'sourcemodule_quiz'] = 'Velg prøve';
$string[ 'sudoku_maxquestions'] = 'Maks antall spørsmål';
//preview.php
$string[ 'only_teachers'] = 'Bare lærer kan se denne siden';
$string[ 'preview'] = 'Forhåndsvisning';
//review.php
$string[ 'attempts'] = 'Forsøk';
$string[ 'completedon'] = 'Ferdig på';
$string[ 'outof'] = '{$a->grade} av makismalt {$a->maxgrade}';
$string[ 'review'] = 'Rapport';
$string[ 'reviewofattempt'] = 'Rapport fra forsøk {$a}';
$string[ 'startagain'] = 'Start på nytt';
$string[ 'timetaken'] = 'Tid brukt';
//showanswers.php
$string[ 'feedbacks'] = 'Tilbakemelding ved riktig svar';
//showattempts.php
$string[ 'lastip'] = 'IP student';
$string[ 'showsolution'] = 'løsning';
$string[ 'timefinish'] = 'Spill slutt';
$string[ 'timelastattempt'] = 'Siste forsøk';
$string[ 'timestart'] = 'Start';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Prøv å spille nå';
$string[ 'continueattemptgame'] = 'Fortsette et tidligere forsøk av spillet';
$string[ 'reattemptgame'] = 'Prøv spillet igjen';
$string[ 'yourfinalgradeis'] = 'Din endelige karakter for spillet er {$a}.';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//cross/play.php $string[ 'print'] = 'Print';
//db/access.php $string[ 'game:attempt'] = 'Play game';
//db/access.php $string[ 'game:deleteattempts'] = 'Delete attempts';
//db/access.php $string[ 'game:grade'] = 'Grade games manually';
//db/access.php $string[ 'game:manage'] = 'Manage';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//db/access.php $string[ 'game:preview'] = 'Preview Games';
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts';
//db/access.php $string[ 'game:view'] = 'view';
//db/access.php $string[ 'game:viewreports'] = 'viewreports';
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions";
//hiddenpicture/play.php $string[ 'noglossaryentriesfound'] = 'No glossary entries found';
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.';
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.';
//export.php $string[ 'export'] = 'Export';
//export.php $string[ 'html_hascheckbutton'] = 'Has check button:';
//export.php $string[ 'html_hasprintbutton'] = 'Has print button:';
//export.php $string[ 'html_title'] = 'Title of html:';
//export.php $string[ 'javame_createdby'] = 'Created by:';
//export.php $string[ 'javame_description'] = 'Description:';
//export.php $string[ 'javame_filename'] = 'Filename:';
//export.php $string[ 'javame_icon'] = 'Icon:';
//export.php $string[ 'javame_maxpictureheight'] = 'Max picture height:';
//export.php $string[ 'javame_maxpicturewidth'] = 'Max picture width:';
//export.php $string[ 'javame_name'] = 'Name:';
//export.php $string[ 'javame_type'] = 'Type:';
//export.php $string[ 'javame_vendor'] = 'Vendor:';
//export.php $string[ 'javame_version'] = 'Version:';
//exporthtml_hangman.php $string[ 'html_hangman_new'] = 'New';
//exporthtml_millionaire.php $string[ 'millionaire_helppeople'] = 'Help of people';
//exporthtml_millionaire.php $string[ 'millionaire_quit'] = 'Quit';
//exporthtml_millionaire.php $string[ 'millionaire_telephone'] = 'Help of telephone';
//exporthtml_snakes.php $string[ 'html_snakes_check'] = 'Check';
//exporthtml_snakes.php $string[ 'html_snakes_correct'] = 'Correct!';
//exporthtml_snakes.php $string[ 'html_snakes_no_selection'] = 'Have to select something!';
//exporthtml_snakes.php $string[ 'html_snakes_wrong'] = "Your answer isn't correct. Stay on the same seat.";
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'export_to_html'] = 'Export to HTML';
//lib.php $string[ 'export_to_javame'] = 'Export to Javame';
//lib.php $string[ 'percent'] = 'Percent';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//lib.php $string[ 'showattempts'] = 'Show attempts';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'cross_options'] = 'Crossword options';
//mod_form.php $string[ 'cryptex_maxtries'] = 'Max tries';
//mod_form.php $string[ 'cryptex_options'] = 'Cryptex ofptions';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'hangman_options'] = 'Hangman options';
//mod_form.php $string[ 'hiddenpicture_height'] = 'Set height of picture to';
//mod_form.php $string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options';
//mod_form.php $string[ 'hiddenpicture_width'] = 'Set width of picture to';
//mod_form.php $string[ 'millionaire_background'] = 'Background color';
//mod_form.php $string[ 'millionaire_options'] = 'Millionaire\' options';
//mod_form.php $string[ 'millionaire_shuffle'] = 'Randomize questions';
//mod_form.php $string[ 'snakes_cols'] = 'Cols';
//mod_form.php $string[ 'snakes_data'] = 'Positions of Snakes and Ladders';
//mod_form.php $string[ 'snakes_file'] = 'File for background';
//mod_form.php $string[ 'snakes_footerx'] = 'Space at bootom left';
//mod_form.php $string[ 'snakes_footery'] = 'Space at bottom right';
//mod_form.php $string[ 'snakes_headerx'] = 'Space at up left';
//mod_form.php $string[ 'snakes_headery'] = 'Space at up right';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//mod_form.php $string[ 'snakes_options'] = '\'Snakes and Ladders\' options';
//mod_form.php $string[ 'snakes_rows'] = 'Rows';
//mod_form.php $string[ 'sourcemodule_include_subcategories'] = 'Include subcategories';
//mod_form.php $string[ 'sudoku_options'] = 'Sudoku options';
//mod_form.php $string[ 'toptext'] = 'Text at the top of page';
//mod_form.php $string[ 'userdefined'] = 'User defined';
//review.php $string[ 'showall'] = 'Show all';
//showanswers.php $string[ 'clearrepetitions'] = 'Clear statistics';
//showanswers.php $string[ 'computerepetitions'] = 'Compute statistics again';
//showanswers.php $string[ 'repetitions'] = 'Repetitions';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

304
lang/pl/game.php

@ -0,0 +1,304 @@
<?php // $Id: game.php,v 1.8 2012/07/26 05:39:00 bdaloukas Exp $
// translation to Polski (pl) by Paweł Strzałkowski
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Import z pliku OpenOffice (odt)';
$string[ 'bookquiz_not_select_book'] = 'Nie wybrałeś książki';
$string[ 'bookquiz_subchapter'] = 'Stwórz podrozdział';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'Książka jest pusta';
$string[ 'sudoku_submit'] = 'Oceń odpowiedzi';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Kategorie';
$string[ 'bookquiz_chapters'] = 'Rozdziały';
//cross/cross_class.php
//cross/crossdb_class.php
$string[ 'and'] = 'i';
$string[ 'cross_correct'] = 'prawidłowo';
$string[ 'cross_corrects'] = 'prawidłowe';
$string[ 'cross_error'] = 'błąd';
$string[ 'cross_errors'] = 'błędy';
$string[ 'cross_found_many'] = 'Znaleziono';
$string[ 'cross_found_one'] = 'Znaleziono';
$string[ 'grade'] = 'Ocena';
//cross/play.php
$string[ 'cross_across'] = 'Poziomo';
$string[ 'cross_checkbutton'] = 'Sprawdź krzyżówkę';
$string[ 'cross_down'] = 'Pionowo';
$string[ 'cross_endofgamebutton'] = 'Krzyżówka zakończona';
$string[ 'cross_error_containsbadchars'] = 'Słowo zawiera niedozwolone znaki';
$string[ 'cross_error_wordlength1'] = 'Prawidłowe słowo zawiera ';
$string[ 'cross_error_wordlength2'] = ' litery.';
$string[ 'cross_pleasewait'] = 'Prosze czekać na załadowanie krzyżówki';
$string[ 'cross_welcome'] = '<h3>Witaj!</h3><p>Kliknij na słowo aby rozpocząć.</p>';
$string[ 'letter'] = 'litera';
$string[ 'letters'] = 'litery';
$string[ 'nextgame'] = 'Nowa gra';
$string[ 'no_words'] = 'Nie znaleziono wyrazów';
$string[ 'win'] = 'Gratulacje !!!';
//cryptex/play.php
$string[ 'finish'] = 'Koniec gry';
//db/access.php
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'Prawidłowa fraza to: ';
$string[ 'hangman_correct_word'] = 'Prawidłowe słowo to: ';
$string[ 'hangman_gradeinstance'] = 'Ocena za całą grę';
$string[ 'hangman_letters'] = 'Litery: ';
$string[ 'hangman_restletters_many'] = 'Pozostało prób: <b>{$a}</b>';
$string[ 'hangman_restletters_one'] = 'Pozostała <b>TYLKO 1</b> próba';
$string[ 'hangman_wrongnum'] = 'Źle: %%d z %%d';
$string[ 'nextword'] = 'Następne słowo';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = 'Oceń główną odpowiedź';
$string[ 'hiddenpicture_nocols'] = 'Musisz określić maksymalną liczbę kolumn';
$string[ 'hiddenpicture_nomainquestion'] = 'Brak wpisów z załączonym zdjęciem w słowniku {$a->name}';
$string[ 'hiddenpicture_norows'] = 'Musisz określić maksymalną liczbę wierszy';
$string[ 'must_select_glossary'] = 'Musisz wybrać słownik';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Musisz wybrać kategorię pytań';
$string[ 'millionaire_must_select_quiz'] = 'Musisz wybrać jeden quiz';
//report/overview/report.php
$string[ 'allattempts'] = 'Pokaż wszystkie próby';
$string[ 'allstudents'] = 'Pokaż wszystkie $a';
$string[ 'attemptsonly'] = 'Pokaż tylko studentów którzy dokonali prób';
$string[ 'deleteattemptcheck'] = 'Czy na pewno chcesz usunąć te próby?';
$string[ 'displayoptions'] = 'Wyświetl opcje';
$string[ 'downloadods'] = 'Pobierz w formacie ODS';
$string[ 'feedback'] = 'Informacja zwrotna';
$string[ 'noattemptsonly'] = 'Pokaż $a bez prób';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring podjęło $a->attemptnum prób';
$string[ 'pagesize'] = 'Pytań na stronę:';
$string[ 'reportoverview'] = 'Przegląd';
$string[ 'selectall'] = 'Wybierz wszystkie';
$string[ 'selectnone'] = 'Odznacz wszytko';
$string[ 'showdetailedmarks'] = 'Pokaż szczegóły oceny';
$string[ 'startedon'] = 'Rozpoczęto';
$string[ 'timecompleted'] = 'Ukończono';
$string[ 'unfinished'] = 'otwarte';
$string[ 'withselected'] = 'Z zaznaczonymi';
//snakes/play.php
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Liczba sudoku które zostaną stworzone';
$string[ 'sudoku_create_start'] = 'Rozpocznij tworzenie sudoku';
$string[ 'sudoku_creating'] = 'Tworzenie <b>{$a}</b> sudoku';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Sudoku zakończone';
$string[ 'sudoku_guessnumber'] = 'Odgadnij prawidłową liczbę';
$string[ 'sudoku_noentriesfound'] = 'Nie znaleziono słów w słowniku';
//export.php
$string[ 'export'] = 'Eksportuj';
$string[ 'javame_createdby'] = 'Stworzony przez:';
$string[ 'javame_description'] = 'Opis:';
$string[ 'javame_filename'] = 'Nazwa pliku:';
$string[ 'javame_icon'] = 'Ikona:';
$string[ 'javame_name'] = 'Nazwa:';
$string[ 'javame_vendor'] = 'Dostawca:';
$string[ 'javame_version'] = 'Wersja:';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Koniec gry</B></BIG>';
//exporthtml_millionaire.php
$string[ 'millionaire_info_people'] = 'Odpowiedź publiczności';
$string[ 'millionaire_info_telephone'] = 'Wydaje mi się że prawidłowa odpowiedź to ';
$string[ 'millionaire_info_wrong_answer'] = 'Zła odpowiedź.<br>Prawidłowo:';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'W milionerach źródłem mogą być {$a} lub pytania a nie';
$string[ 'must_select_questioncategory'] = 'Musisz wybrać kategorię pytań';
$string[ 'must_select_quiz'] = 'Musisz wybrać quiz';
//exporthtml_snakes.php
$string[ 'score'] = 'Wynik';
//index.php
$string[ 'modulename'] = 'Gra';
$string[ 'modulenameplural'] = 'Gry';
$string[ 'pluginname'] = 'Gra';
//lib.php
$string[ 'attempt'] = 'Próba';
$string[ 'bookquiz_questions'] = 'Przypisz kategorie pytań do rozdziałów książki';
$string[ 'game_bookquiz'] = 'Książka z pytaniami';
$string[ 'game_cross'] = 'Krzyżówka';
$string[ 'game_cryptex'] = 'Cryptex';
$string[ 'game_hangman'] = 'Wisielec';
$string[ 'game_hiddenpicture'] = 'Ukryty obraz';
$string[ 'game_millionaire'] = 'Milionerzy';
$string[ 'game_snakes'] = 'Węże i Drabiny';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Informacje';
$string[ 'noattempts'] = 'Nie dokonano prób';
$string[ 'results'] = 'Wyniki';
$string[ 'showanswers'] = 'Pokaż odpowiedzi';
//locallib.php
$string[ 'attemptfirst'] = 'Pierwsza próba';
$string[ 'attemptlast'] = 'Ostatnia próba';
$string[ 'gradeaverage'] = 'Średnia ocena';
$string[ 'gradehighest'] = 'Najwyższa ocena';
//mod_form.php
$string[ 'bottomtext'] = 'Tekst na dole';
$string[ 'cross_layout'] = 'Układ';
$string[ 'cross_layout0'] = 'Wyrażenia pod krzyżówką';
$string[ 'cross_layout1'] = 'Wyrażenia na prawo od krzyżówki';
$string[ 'cross_maxcols'] = 'Maksymalna ilość kolumn krzyżówki';
$string[ 'cross_maxwords'] = 'Maksymalna ilość słów';
$string[ 'cryptex_maxcols'] = 'Maksymalna liczba kolumn/wierszy';
$string[ 'cryptex_maxwords'] = 'Maksymalna liczba wyrazów';
$string[ 'grademethod'] = 'Metoda oceniania';
$string[ 'hangman_allowspaces'] = 'Zezwól na spacje w wyrazach';
$string[ 'hangman_allowsub'] = 'Zezwól na symbol - w wyrazach';
$string[ 'hangman_imageset'] = 'Wybierz obrazek wisielca';
$string[ 'hangman_language'] = 'Język słów';
$string[ 'hangman_maxtries'] = 'Ilość słów na grę';
$string[ 'hangman_showcorrectanswer'] = 'Pokazuj na koniec prawidłową odpowiedź';
$string[ 'hangman_showfirst'] = 'Pokazuj pierwszą literę';
$string[ 'hangman_showlast'] = 'Pokazuj ostatnią literę';
$string[ 'hangman_showquestion'] = 'Pokazywać pytania ?';
$string[ 'hiddenpicture_across'] = 'Komórki poziomo';
$string[ 'hiddenpicture_down'] = 'Komórki pionowo';
$string[ 'hiddenpicture_height'] = 'Ustaw wysokość obrazka na';
$string[ 'hiddenpicture_pictureglossary'] = 'Słownik dla głównego pytania i obrazu';
$string[ 'hiddenpicture_width'] = 'Ustaw szerokość obrazka na';
$string[ 'snakes_background'] = 'Tło';
$string[ 'sourcemodule'] = 'Źródło pytań';
$string[ 'sourcemodule_book'] = 'Wybierz książkę';
$string[ 'sourcemodule_glossary'] = 'Wybierz słownik';
$string[ 'sourcemodule_glossarycategory'] = 'Wybierz kategorię słownika';
$string[ 'sourcemodule_include_subcategories'] = 'Dołącz podkategorie';
$string[ 'sourcemodule_question'] = 'Pytania';
$string[ 'sourcemodule_questioncategory'] = 'Wybierz kategorię pytań';
$string[ 'sourcemodule_quiz'] = 'Wybierz quiz';
$string[ 'sudoku_maxquestions'] = 'Maksymalna liczba pytań';
//preview.php
$string[ 'only_teachers'] = 'Tylko nauczyciel może oglądać tą stronę';
$string[ 'preview'] = 'Podgląd';
//review.php
$string[ 'attempts'] = 'Próby';
$string[ 'completedon'] = 'Ukończono';
$string[ 'outof'] = '{$a->grade} z {$a->maxgrade}';
$string[ 'review'] = 'Opis';
$string[ 'reviewofattempt'] = 'Opis próby {$a}';
$string[ 'startagain'] = 'Rozpocznij ponownie';
$string[ 'timetaken'] = 'Zużyty czas';
//showanswers.php
$string[ 'feedbacks'] = 'Wiadomości po prawidłowej odpowiedzi';
//showattempts.php
$string[ 'lastip'] = 'IP studenta';
$string[ 'showsolution'] = 'rozwiązanie';
$string[ 'timefinish'] = 'Koniec gry';
$string[ 'timelastattempt'] = 'Ostatnia próba';
$string[ 'timestart'] = 'Start';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Rozpocznij grę';
$string[ 'continueattemptgame'] = 'Kontynuuj poprzednią próbę';
$string[ 'reattemptgame'] = 'Wznów grę';
$string[ 'yourfinalgradeis'] = 'Ostateczną oceną za tą grę jest $a.';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//cross/cross_class.php $string[ 'lettersall'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
//cross/play.php $string[ 'print'] = 'Print';
//db/access.php $string[ 'game:attempt'] = 'Play game';
//db/access.php $string[ 'game:deleteattempts'] = 'Delete attempts';
//db/access.php $string[ 'game:grade'] = 'Grade games manually';
//db/access.php $string[ 'game:manage'] = 'Manage';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//db/access.php $string[ 'game:preview'] = 'Preview Games';
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts';
//db/access.php $string[ 'game:view'] = 'view';
//db/access.php $string[ 'game:viewreports'] = 'viewreports';
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions";
//hiddenpicture/play.php $string[ 'noglossaryentriesfound'] = 'No glossary entries found';
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.';
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.';
//export.php $string[ 'html_hascheckbutton'] = 'Has check button:';
//export.php $string[ 'html_hasprintbutton'] = 'Has print button:';
//export.php $string[ 'html_title'] = 'Title of html:';
//export.php $string[ 'javame_maxpictureheight'] = 'Max picture height:';
//export.php $string[ 'javame_maxpicturewidth'] = 'Max picture width:';
//export.php $string[ 'javame_type'] = 'Type:';
//exporthtml_hangman.php $string[ 'html_hangman_new'] = 'New';
//exporthtml_millionaire.php $string[ 'millionaire_helppeople'] = 'Help of people';
//exporthtml_millionaire.php $string[ 'millionaire_quit'] = 'Quit';
//exporthtml_millionaire.php $string[ 'millionaire_telephone'] = 'Help of telephone';
//exporthtml_snakes.php $string[ 'html_snakes_check'] = 'Check';
//exporthtml_snakes.php $string[ 'html_snakes_correct'] = 'Correct!';
//exporthtml_snakes.php $string[ 'html_snakes_no_selection'] = 'Have to select something!';
//exporthtml_snakes.php $string[ 'html_snakes_wrong'] = "Your answer isn't correct. Stay on the same seat.";
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'export_to_html'] = 'Export to HTML';
//lib.php $string[ 'export_to_javame'] = 'Export to Javame';
//lib.php $string[ 'percent'] = 'Percent';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//lib.php $string[ 'showattempts'] = 'Show attempts';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'cross_options'] = 'Crossword options';
//mod_form.php $string[ 'cryptex_maxtries'] = 'Max tries';
//mod_form.php $string[ 'cryptex_options'] = 'Cryptex ofptions';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'hangman_options'] = 'Hangman options';
//mod_form.php $string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options';
//mod_form.php $string[ 'millionaire_background'] = 'Background color';
//mod_form.php $string[ 'millionaire_options'] = 'Millionaire\' options';
//mod_form.php $string[ 'millionaire_shuffle'] = 'Randomize questions';
//mod_form.php $string[ 'snakes_cols'] = 'Cols';
//mod_form.php $string[ 'snakes_data'] = 'Positions of Snakes and Ladders';
//mod_form.php $string[ 'snakes_file'] = 'File for background';
//mod_form.php $string[ 'snakes_footerx'] = 'Space at bootom left';
//mod_form.php $string[ 'snakes_footery'] = 'Space at bottom right';
//mod_form.php $string[ 'snakes_headerx'] = 'Space at up left';
//mod_form.php $string[ 'snakes_headery'] = 'Space at up right';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//mod_form.php $string[ 'snakes_options'] = '\'Snakes and Ladders\' options';
//mod_form.php $string[ 'snakes_rows'] = 'Rows';
//mod_form.php $string[ 'sudoku_options'] = 'Sudoku options';
//mod_form.php $string[ 'toptext'] = 'Text at the top of page';
//mod_form.php $string[ 'userdefined'] = 'User defined';
//review.php $string[ 'showall'] = 'Show all';
//showanswers.php $string[ 'clearrepetitions'] = 'Clear statistics';
//showanswers.php $string[ 'computerepetitions'] = 'Compute statistics again';
//showanswers.php $string[ 'repetitions'] = 'Repetitions';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

305
lang/pt_br/game.php

@ -0,0 +1,305 @@
<?php // $Id: game.php,v 1.6 2012/07/26 05:39:00 bdaloukas Exp $
// game.php - created with Moodle 2.0 (Build: 20080702) (2007101514)
// translated to Portuguese - Internacional (pt_br) by Aurelio Costa
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Importar de arquivo OpenOffice (odt)';
$string[ 'bookquiz_not_select_book'] = 'Você não selecionou um libro';
$string[ 'bookquiz_subchapter'] = 'Criar subcapítulos';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'O livro está vazio';
$string[ 'sudoku_submit'] = 'Enviar respostas';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Categorías';
$string[ 'bookquiz_chapters'] = 'Capítulos';
//cross/cross_class.php
$string[ 'lettersall'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ ';
//cross/crossdb_class.php
$string[ 'and'] = 'e';
$string[ 'cross_correct'] = 'correta';
$string[ 'cross_corrects'] = 'corretas';
$string[ 'cross_error'] = 'erro';
$string[ 'cross_errors'] = 'erros';
$string[ 'cross_found_many'] = 'Encontrou';
$string[ 'cross_found_one'] = 'Encontrou';
$string[ 'grade'] = 'Nota';
//cross/play.php
$string[ 'cross_across'] = 'Horizontal';
$string[ 'cross_checkbutton'] = 'Revisar palavras-cruzadas';
$string[ 'cross_down'] = 'Embaixo';
$string[ 'cross_endofgamebutton'] = 'Fim do jogo de palavras-cruzadas';
$string[ 'cross_error_containsbadchars'] = 'A palavra contém caracteres não autorizados';
$string[ 'cross_error_wordlength1'] = 'A palavra correta contém ';
$string[ 'cross_error_wordlength2'] = ' letras.';
$string[ 'cross_pleasewait'] = 'Por favor espere enquanto o palavras-cruzadas é carregado';
$string[ 'cross_welcome'] = '<h3>Bem vindo!</h3><p>Clique em uma palavra para começar.</p>';
$string[ 'letter'] = 'letra';
$string[ 'letters'] = 'letras';
$string[ 'nextgame'] = 'Próximo jogo';
$string[ 'print'] = 'Imprimir';
//cryptex/play.php
$string[ 'finish'] = 'Fim de jogo';
//db/access.php
$string[ 'game:attempt'] = 'Começar o jogo';
$string[ 'game:deleteattempts'] = 'Apagar tentativas';
$string[ 'game:manage'] = 'Administrar';
$string[ 'game:reviewmyattempts'] = 'Rever minhas tentativas';
$string[ 'game:view'] = 'Ver';
$string[ 'game:viewreports'] = 'Ver relatórios';
//hangman/play.php
$string[ 'hangman_gradeinstance'] = 'Nível do jogo completo';
$string[ 'hangman_letters'] = 'Letras: ';
$string[ 'hangman_restletters_many'] = 'Você tem <b>{$a}</b> tentativas';
$string[ 'hangman_restletters_one'] = 'Você tem <b>SOMENTE 1</b> tentativa';
$string[ 'hangman_wrongnum'] = 'Erradas: %%d de %%d';
$string[ 'nextword'] = 'Próxima palavra';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = 'Nota da pergunta principal';
$string[ 'hiddenpicture_nocols'] = 'Especifique o número de linhas horizontais';
$string[ 'hiddenpicture_nomainquestion'] = 'Sem entradas no glossário {$a->name} com imagem anexa';
$string[ 'hiddenpicture_norows'] = 'Especifique o número de colunas verticais';
$string[ 'must_select_glossary'] = 'Um glossário deve ser selecionado';
$string[ 'noglossaryentriesfound'] = 'Não foram encontradas entradas no glossário';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Uma categoria de perguntas deve ser selecionada';
$string[ 'millionaire_must_select_quiz'] = 'Um questionário deve ser selecionado';
//report/overview/report.php
$string[ 'feedback'] = 'Retorno';
$string[ 'startedon'] = 'Començou em';
$string[ 'timecompleted'] = 'Completo';
$string[ 'unfinished'] = 'aberto';
//snakes/play.php
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Número de sudokus que serão criados';
$string[ 'sudoku_create_start'] = 'Comece a criar sudokus';
$string[ 'sudoku_creating'] = 'Criando <b>{$a}</b> sudoku';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Fim do jogo de sudoku';
$string[ 'sudoku_guessnumber'] = 'Adivinhe o número correto';
$string[ 'sudoku_noentriesfound'] = 'Não foram contradas palavras no glossário';
//export.php
$string[ 'export'] = 'Exportar';
$string[ 'html_hascheckbutton'] = 'Botão de teste:';
$string[ 'html_hasprintbutton'] = 'Botão de impressão:';
$string[ 'html_title'] = 'Título de html:';
$string[ 'javame_createdby'] = 'Criado por:';
$string[ 'javame_description'] = 'Descrição:';
$string[ 'javame_filename'] = 'Nome do arquivo:';
$string[ 'javame_icon'] = 'Ícone:';
$string[ 'javame_maxpictureheight'] = 'Altura máxima da imagem:';
$string[ 'javame_maxpicturewidth'] = 'Largura máxima da imagem:';
$string[ 'javame_name'] = 'Nome:';
$string[ 'javame_type'] = 'Tipo:';
$string[ 'javame_vendor'] = 'Vendedor:';
$string[ 'javame_version'] = 'Versão';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Fim de jogo</B></BIG>';
//exporthtml_millionaire.php
$string[ 'millionaire_helppeople'] = 'Ajuda do público';
$string[ 'millionaire_info_people'] = 'O púlico diz';
$string[ 'millionaire_info_telephone'] = 'Creio que a resposta correta seja';
$string[ 'millionaire_info_wrong_answer'] = 'Sua resposta está errada<br>A resposta correta é:';
$string[ 'millionaire_quit'] = 'Sair';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'Para milhonário a fonte deve ser {$a} ou perguntas e não';
$string[ 'millionaire_telephone'] = 'Ajuda pelo telefone';
$string[ 'must_select_questioncategory'] = 'Uma categoria de perguntas deve ser selecionada';
$string[ 'must_select_quiz'] = 'Um questionário deve ser selecionado';
//exporthtml_snakes.php
$string[ 'score'] = 'Pontuação';
//index.php
$string[ 'modulename'] = 'Jogo';
$string[ 'modulenameplural'] = 'Jogos';
$string[ 'pluginname'] = 'Jogo';
//lib.php
$string[ 'attempt'] = 'Tentativa';
$string[ 'bookquiz_questions'] = 'Relacione categorias de perguntas com capítulos do livro';
$string[ 'export_to_html'] = 'Exportar como HTML';
$string[ 'export_to_javame'] = 'Exportar como Javame';
$string[ 'game_bookquiz'] = 'Livro de perguntas';
$string[ 'game_cross'] = 'Palavras-cruzadas';
$string[ 'game_cryptex'] = 'Sopa de Letras';
$string[ 'game_hangman'] = 'Forca';
$string[ 'game_hiddenpicture'] = 'Imagem oculta';
$string[ 'game_millionaire'] = 'Milhonário';
$string[ 'game_snakes'] = 'Serpentes';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Info';
$string[ 'noattempts'] = 'Nenhuma tentativa foi feita com este questionário';
$string[ 'percent'] = 'Porcentagem';
$string[ 'results'] = 'Resultados';
$string[ 'showanswers'] = 'Mostrar respostas';
$string[ 'showattempts'] = 'Mostrar as tentativas';
//locallib.php
$string[ 'attemptfirst'] = 'Primeira tentativa';
$string[ 'attemptlast'] = 'Última tentativa';
$string[ 'gradeaverage'] = 'Nota média';
$string[ 'gradehighest'] = 'Maior nota';
//mod_form.php
$string[ 'bottomtext'] = 'Texto no rodapé da página';
$string[ 'cross_layout'] = 'Formato';
$string[ 'cross_layout0'] = 'Frases na parte inferior do palavras-cruzadas';
$string[ 'cross_layout1'] = 'Frases na parte direita do palavras-cruzadas';
$string[ 'cross_maxcols'] = 'Número máximo de colunas do palavras-cruzadas';
$string[ 'cross_maxwords'] = 'Máximo número de palavras do palavras-cruzadas';
$string[ 'cross_options'] = 'Opções do Palavras-cruzadas';
$string[ 'cryptex_maxcols'] = 'Máximo número de colunas/linhas do Criptograma';
$string[ 'cryptex_maxtries'] = 'Número máximo de tantativas';
$string[ 'cryptex_maxwords'] = 'Máximo número de palavras do Criptograma';
$string[ 'cryptex_options'] = 'Opções do Criptograma';
$string[ 'grademethod'] = 'Método de avaliação';
$string[ 'hangman_allowspaces'] = 'Permitir espaços nas palavras';
$string[ 'hangman_allowsub'] = 'Permitir símbolos nas palavras';
$string[ 'hangman_imageset'] = 'Selecione as imágens para a Forca';
$string[ 'hangman_language'] = 'Idioma das palavras';
$string[ 'hangman_maxtries'] = 'Número de palavras por jogo';
$string[ 'hangman_options'] = 'Opções da Forca';
$string[ 'hangman_showcorrectanswer'] = 'Mostrar a resposta correta ao final';
$string[ 'hangman_showfirst'] = 'Mostrar a primeira letra da Forca';
$string[ 'hangman_showlast'] = 'Mostrar a última letra da Forca';
$string[ 'hangman_showquestion'] = 'Mostrar as perguntas ?';
$string[ 'hiddenpicture_across'] = 'Células horizontais';
$string[ 'hiddenpicture_down'] = 'Células verticais';
$string[ 'hiddenpicture_height'] = 'Definir a altura da imagem em';
$string[ 'hiddenpicture_options'] = '\'Imagem Oculta\' opções';
$string[ 'hiddenpicture_pictureglossary'] = 'O glossário para a pergunta principal';
$string[ 'hiddenpicture_width'] = 'Definir a largura da imagem em';
$string[ 'millionaire_background'] = 'Cor de fundo';
$string[ 'millionaire_options'] = 'Opções o Milhonário';
$string[ 'millionaire_shuffle'] = 'Mesclar perguntas';
$string[ 'snakes_background'] = 'Fundo';
$string[ 'snakes_cols'] = 'Colunas';
$string[ 'snakes_footerx'] = 'Espaço inferior esquerdo';
$string[ 'snakes_footery'] = 'Espaço inferior direito';
$string[ 'snakes_headerx'] = 'Espaço superior esquerdo';
$string[ 'snakes_headery'] = 'Espaço superior direito';
$string[ 'snakes_options'] = '\'Serpentes\' opções';
$string[ 'snakes_rows'] = 'Linhas';
$string[ 'sourcemodule'] = 'Fonte de perguntas';
$string[ 'sourcemodule_book'] = 'Selecione un livro';
$string[ 'sourcemodule_glossary'] = 'Selecione um glossário';
$string[ 'sourcemodule_glossarycategory'] = 'Selecione una categoria de glossário.';
$string[ 'sourcemodule_include_subcategories'] = 'Inclua subcategorias';
$string[ 'sourcemodule_question'] = 'Perguntas';
$string[ 'sourcemodule_questioncategory'] = 'Selecione uma categoria de perguntas';
$string[ 'sourcemodule_quiz'] = 'Selecione un questionário';
$string[ 'sudoku_maxquestions'] = 'Máximo número de perguntas';
$string[ 'sudoku_options'] = 'Opcções do Sudoku';
$string[ 'toptext'] = 'Texto da parte superior';
$string[ 'userdefined'] = 'Definido pelo usuário';
//preview.php
$string[ 'only_teachers'] = 'Somente o professor pode ver esta página';
$string[ 'preview'] = 'Visualizar';
//review.php
$string[ 'attempts'] = 'Tentativas';
$string[ 'completedon'] = 'Completado em';
$string[ 'outof'] = '{$a->grade} de um máximo de {$a->maxgrade}';
$string[ 'review'] = 'Revisar';
$string[ 'reviewofattempt'] = 'Revisar tentativas {$a}';
$string[ 'startagain'] = 'Começar de novo';
$string[ 'timetaken'] = 'Timpo utilizado';
//showanswers.php
$string[ 'clearrepetitions'] = 'Limpar estatísticas';
$string[ 'computerepetitions'] = 'Recalcular estatísticas';
$string[ 'feedbacks'] = 'Mensagens de resposta correta';
$string[ 'repetitions'] = 'Repetições';
//showattempts.php
$string[ 'lastip'] = 'IP do estudante';
$string[ 'showsolution'] = 'solução';
$string[ 'timefinish'] = 'Fim de jogo';
$string[ 'timelastattempt'] = 'Última tentativa';
$string[ 'timestart'] = 'Começo';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Tente jogar agora';
$string[ 'continueattemptgame'] = 'Continue uma tentativa anterior do jogo';
$string[ 'reattemptgame'] = 'Tentar novamente';
$string[ 'yourfinalgradeis'] = 'Sua nota final neste jogo é {$a}.';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//cross/play.php $string[ 'no_words'] = 'There are no words';
//cross/play.php $string[ 'win'] = 'Congratulations !!!';
//db/access.php $string[ 'game:grade'] = 'Grade games manually';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//db/access.php $string[ 'game:preview'] = 'Preview Games';
//hangman/play.php $string[ 'hangman_correct_phrase'] = 'The correct phrase was: ';
//hangman/play.php $string[ 'hangman_correct_word'] = 'The correct word was: ';
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions";
//report/overview/report.php $string[ 'allattempts'] = 'Show all tries';
//report/overview/report.php $string[ 'allstudents'] = 'Show all $a';
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//report/overview/report.php $string[ 'attemptsonly'] = 'Show only students with attempts';
//report/overview/report.php $string[ 'deleteattemptcheck'] = 'Are you absolutely sure you want to completely delete these attempts?';
//report/overview/report.php $string[ 'displayoptions'] = 'Display options';
//report/overview/report.php $string[ 'downloadods'] = 'Download in ODS format';
//report/overview/report.php $string[ 'noattemptsonly'] = 'Show $a with no attempts only';
//report/overview/report.php $string[ 'numattempts'] = '$a->studentnum $a->studentstring have made $a->attemptnum attempts';
//report/overview/report.php $string[ 'pagesize'] = 'Questions per page:';
//report/overview/report.php $string[ 'reportoverview'] = 'Overview';
//report/overview/report.php $string[ 'selectall'] = 'Select all';
//report/overview/report.php $string[ 'selectnone'] = 'Deselect all';
//report/overview/report.php $string[ 'showdetailedmarks'] = 'Show mark details';
//report/overview/report.php $string[ 'withselected'] = 'With selected';
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.';
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.';
//exporthtml_hangman.php $string[ 'html_hangman_new'] = 'New';
//exporthtml_snakes.php $string[ 'html_snakes_check'] = 'Check';
//exporthtml_snakes.php $string[ 'html_snakes_correct'] = 'Correct!';
//exporthtml_snakes.php $string[ 'html_snakes_no_selection'] = 'Have to select something!';
//exporthtml_snakes.php $string[ 'html_snakes_wrong'] = "Your answer isn't correct. Stay on the same seat.";
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'snakes_data'] = 'Positions of Snakes and Ladders';
//mod_form.php $string[ 'snakes_file'] = 'File for background';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//review.php $string[ 'showall'] = 'Show all';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

305
lang/ru/game.php

@ -0,0 +1,305 @@
<?php // $Id: game.php,v 1.8 2012/07/26 05:39:00 bdaloukas Exp $
// game.php - created with Moodle 1.6.3
// translation to Русский (ru) by Ивченко Анатолий
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Импортировать из файла OpenOffice(odt)';
$string[ 'bookquiz_not_select_book'] = 'You have not select book';
$string[ 'bookquiz_subchapter'] = 'Создать подглавы';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'Книга пуста';
$string[ 'sudoku_submit'] = 'Оценить ответы';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Категории';
$string[ 'bookquiz_chapters'] = 'Главы';
//cross/cross_class.php
$string[ 'lettersall'] = 'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЫЪЭЮЯ';
//cross/crossdb_class.php
$string[ 'and'] = 'и';
$string[ 'cross_correct'] = 'правильный';
$string[ 'cross_corrects'] = 'правильные';
$string[ 'cross_error'] = 'ошибка';
$string[ 'cross_errors'] = 'ошибки';
$string[ 'cross_found_many'] = 'Найденные';
$string[ 'cross_found_one'] = 'Найденный';
$string[ 'grade'] = 'Оценка';
//cross/play.php
$string[ 'cross_across'] = 'По горизонтали';
$string[ 'cross_checkbutton'] = 'Проверить кроссворд';
$string[ 'cross_down'] = 'По вертикали';
$string[ 'cross_endofgamebutton'] = 'Окончание игры \"Кроссворд\"';
$string[ 'cross_error_containsbadchars'] = 'Слово содержит недопустимые символы';
$string[ 'cross_error_wordlength1'] = 'Правильное слово содержит ';
$string[ 'cross_error_wordlength2'] = ' буквы.';
$string[ 'cross_pleasewait'] = 'Пожалуйста, обождите, кроссворд загружается';
$string[ 'cross_welcome'] = '<h2>Добро пожаловать!</h2><p>Сначала щелкните по любой из клеток, содержащих слово, затем введите в появившемся окне ответ.</p>';
$string[ 'letter'] = 'буква';
$string[ 'letters'] = 'буквы';
$string[ 'nextgame'] = 'Новая игра';
$string[ 'no_words'] = 'Не найдены слова';
$string[ 'win'] = 'Поздравляем !!!';
//cryptex/play.php
$string[ 'finish'] = 'Конец игры';
//db/access.php
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'Правильная фраза: ';
$string[ 'hangman_correct_word'] = 'Правильное слово: ';
$string[ 'hangman_gradeinstance'] = 'Оценить всю игру';
$string[ 'hangman_letters'] = 'Буквы: ';
$string[ 'hangman_restletters_many'] = 'У Вас <b>{$a}</b> попыток';
$string[ 'hangman_restletters_one'] = 'У Вас <b>только 1</b> попытка';
$string[ 'hangman_wrongnum'] = 'Неправильно: %%d из %%d';
$string[ 'nextword'] = 'Следующее слово';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = 'Оценить главный ответ';
$string[ 'hiddenpicture_nocols'] = 'Необходимо указать количество колонок по горизонтали';
$string[ 'hiddenpicture_norows'] = 'Необходимо указать количество срок по вертикали';
$string[ 'must_select_glossary'] = 'Вы должны выбрать глоссарий';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Вы должны выбрать одну из категорий вопросов';
$string[ 'millionaire_must_select_quiz'] = 'Вы должны выбрать тест';
//report/overview/report.php
$string[ 'allattempts'] = 'Все попытки';
$string[ 'allstudents'] = 'Все студенты $a';
$string[ 'attemptsonly'] = 'Показать только студентов с попытками';
$string[ 'deleteattemptcheck'] = 'Вы уверены, что хотите полностью удалить эти попытки?';
$string[ 'displayoptions'] = 'Отобразить дополнительно';
$string[ 'downloadods'] = 'Загрузить в формате ODS';
$string[ 'feedback'] = 'Комментарий';
$string[ 'noattemptsonly'] = 'Показать $a только, у которых нет попыток';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring сделали $a->attemptnum попыток';
$string[ 'pagesize'] = 'Вопросов на страницу:';
$string[ 'reportoverview'] = 'Обзор';
$string[ 'selectall'] = 'Выбрать все';
$string[ 'selectnone'] = 'Снять выделение со всех';
$string[ 'showdetailedmarks'] = 'Показать детали оценок';
$string[ 'startedon'] = 'Начато';
$string[ 'timecompleted'] = 'Выполнено';
$string[ 'unfinished'] = 'открыто';
$string[ 'withselected'] = 'С выделенным';
//snakes/play.php
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Количество созданных \"Судоку\"';
$string[ 'sudoku_create_start'] = 'Начало создания \"Судоку\"';
$string[ 'sudoku_creating'] = 'Создание <b>{$a}</b> \"Судоку\"';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Окончание игры \"Судоку\"';
$string[ 'sudoku_guessnumber'] = 'Введите правильное число';
$string[ 'sudoku_noentriesfound'] = 'В глоссарии нет слов';
//export.php
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Игра окончена</B></BIG>';
//exporthtml_millionaire.php
$string[ 'millionaire_info_people'] = 'Люди говорят';
$string[ 'millionaire_info_telephone'] = 'Я думаю, что правильный ответ ';
$string[ 'millionaire_info_wrong_answer'] = 'Ваш ответ неверный<br>Правильный ответ:';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'Для игры Миллионер источником вопросов должен быть {$a}, а не';
$string[ 'must_select_questioncategory'] = 'Вы должны выбрать категорию вопросов';
$string[ 'must_select_quiz'] = 'Вы должны выбрать тест';
//exporthtml_snakes.php
$string[ 'score'] = 'Очки';
//index.php
$string[ 'modulename'] = 'Игра';
$string[ 'modulenameplural'] = 'Игры';
$string[ 'pluginname'] = 'Игра';
//lib.php
$string[ 'attempt'] = 'Попытка';
$string[ 'bookquiz_questions'] = 'Связать категории вопросов с главой книги';
$string[ 'game_bookquiz'] = 'Книга с вопросами';
$string[ 'game_cross'] = 'Кроссворд';
$string[ 'game_cryptex'] = 'Криптекст';
$string[ 'game_hangman'] = 'Виселица';
$string[ 'game_hiddenpicture'] = 'Спрятанная картинка';
$string[ 'game_millionaire'] = 'Миллионер';
$string[ 'game_snakes'] = 'Змеи и лестницы';
$string[ 'game_sudoku'] = 'Судоку';
$string[ 'info'] = 'Информация';
$string[ 'noattempts'] = 'В этом тесте не сделано попыток';
$string[ 'results'] = 'Результаты';
$string[ 'showanswers'] = 'Показать ответы';
//locallib.php
$string[ 'attemptfirst'] = 'Первая попытка';
$string[ 'attemptlast'] = 'Последняя попытка';
$string[ 'gradeaverage'] = 'Оценивание по среднему баллу';
$string[ 'gradehighest'] = 'Оценивание по высшему баллу';
//mod_form.php
$string[ 'bottomtext'] = 'Текст внизу экрана игры';
$string[ 'cross_layout'] = 'Слой';
$string[ 'cross_layout0'] = 'Расшифровка внизу кроссворда';
$string[ 'cross_layout1'] = 'Расшифровка справа от кроссворда';
$string[ 'cross_maxcols'] = 'Максимальное число колонок в кроссворде';
$string[ 'cross_maxwords'] = 'Максимальное число слов в кроссворде';
$string[ 'cryptex_maxcols'] = 'Макимальное число колонок/рядов в Криптексте';
$string[ 'cryptex_maxwords'] = 'Макимальное число слов в Криптексте';
$string[ 'grademethod'] = 'Метод оценивания';
$string[ 'hangman_allowspaces'] = 'Разрешить в словах пробелы';
$string[ 'hangman_allowsub'] = 'Разрешить дефис в словах';
$string[ 'hangman_imageset'] = 'Выберите изображение виселицы';
$string[ 'hangman_language'] = 'Язык слов';
$string[ 'hangman_maxtries'] = 'Число попыток в игре';
$string[ 'hangman_showcorrectanswer'] = 'Показать правильные ответы после окончания игры';
$string[ 'hangman_showfirst'] = 'Показать первую букву';
$string[ 'hangman_showlast'] = 'Показать последнюю букву';
$string[ 'hangman_showquestion'] = 'Показать вопросы?';
$string[ 'hiddenpicture_across'] = 'Клетки по горизонтали';
$string[ 'hiddenpicture_down'] = 'Клетки по вертикали';
$string[ 'hiddenpicture_pictureglossary'] = 'Глоссарий для главного вопроса';
$string[ 'snakes_background'] = 'Фон';
$string[ 'sourcemodule'] = 'Источник вопросов';
$string[ 'sourcemodule_book'] = 'Выберите книгу';
$string[ 'sourcemodule_glossary'] = 'Выберите глоссарий';
$string[ 'sourcemodule_glossarycategory'] = 'Выберите категорию глоссария';
$string[ 'sourcemodule_question'] = 'Вопросы';
$string[ 'sourcemodule_questioncategory'] = 'Выберите категорию вопросов';
$string[ 'sourcemodule_quiz'] = 'Выберите тест';
$string[ 'sudoku_maxquestions'] = 'Максимальное число вопросов';
//preview.php
$string[ 'only_teachers'] = 'Только учителя могут просматривать эту страницу';
$string[ 'preview'] = 'Предварительный просмотр';
//review.php
$string[ 'attempts'] = 'Попытки';
$string[ 'completedon'] = 'Выполнено';
$string[ 'outof'] = '{$a->grade} out of a maximum of {$a->maxgrade}';
$string[ 'review'] = 'Повторный просмотр';
$string[ 'reviewofattempt'] = 'Повторный промотр попыток {$a}';
$string[ 'startagain'] = 'Начать снова';
$string[ 'timetaken'] = 'Время выполнения';
//showanswers.php
$string[ 'feedbacks'] = 'Текст сообщения о правильном ответе';
//showattempts.php
$string[ 'lastip'] = 'IP студента';
$string[ 'showsolution'] = 'решение';
$string[ 'timefinish'] = 'Конец игры';
$string[ 'timelastattempt'] = 'Последняя попытка';
$string[ 'timestart'] = 'Начало';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Начать новую попытку игры';
$string[ 'continueattemptgame'] = 'Продолжить предыдущую попытку этой игры';
$string[ 'reattemptgame'] = 'Сделать попытку в этой игре';
$string[ 'yourfinalgradeis'] = 'Ваша последняя оценка за эту игру: $a.';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//cross/play.php $string[ 'print'] = 'Print';
//db/access.php $string[ 'game:attempt'] = 'Play game';
//db/access.php $string[ 'game:deleteattempts'] = 'Delete attempts';
//db/access.php $string[ 'game:grade'] = 'Grade games manually';
//db/access.php $string[ 'game:manage'] = 'Manage';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//db/access.php $string[ 'game:preview'] = 'Preview Games';
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts';
//db/access.php $string[ 'game:view'] = 'view';
//db/access.php $string[ 'game:viewreports'] = 'viewreports';
//hiddenpicture/play.php $string[ 'hiddenpicture_nomainquestion'] = 'There are no glossary entries on glossary {$a->name} with an attached picture';
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions";
//hiddenpicture/play.php $string[ 'noglossaryentriesfound'] = 'No glossary entries found';
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.';
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.';
//export.php $string[ 'export'] = 'Export';
//export.php $string[ 'html_hascheckbutton'] = 'Has check button:';
//export.php $string[ 'html_hasprintbutton'] = 'Has print button:';
//export.php $string[ 'html_title'] = 'Title of html:';
//export.php $string[ 'javame_createdby'] = 'Created by:';
//export.php $string[ 'javame_description'] = 'Description:';
//export.php $string[ 'javame_filename'] = 'Filename:';
//export.php $string[ 'javame_icon'] = 'Icon:';
//export.php $string[ 'javame_maxpictureheight'] = 'Max picture height:';
//export.php $string[ 'javame_maxpicturewidth'] = 'Max picture width:';
//export.php $string[ 'javame_name'] = 'Name:';
//export.php $string[ 'javame_type'] = 'Type:';
//export.php $string[ 'javame_vendor'] = 'Vendor:';
//export.php $string[ 'javame_version'] = 'Version:';
//exporthtml_hangman.php $string[ 'html_hangman_new'] = 'New';
//exporthtml_millionaire.php $string[ 'millionaire_helppeople'] = 'Help of people';
//exporthtml_millionaire.php $string[ 'millionaire_quit'] = 'Quit';
//exporthtml_millionaire.php $string[ 'millionaire_telephone'] = 'Help of telephone';
//exporthtml_snakes.php $string[ 'html_snakes_check'] = 'Check';
//exporthtml_snakes.php $string[ 'html_snakes_correct'] = 'Correct!';
//exporthtml_snakes.php $string[ 'html_snakes_no_selection'] = 'Have to select something!';
//exporthtml_snakes.php $string[ 'html_snakes_wrong'] = "Your answer isn't correct. Stay on the same seat.";
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'export_to_html'] = 'Export to HTML';
//lib.php $string[ 'export_to_javame'] = 'Export to Javame';
//lib.php $string[ 'percent'] = 'Percent';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//lib.php $string[ 'showattempts'] = 'Show attempts';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'cross_options'] = 'Crossword options';
//mod_form.php $string[ 'cryptex_maxtries'] = 'Max tries';
//mod_form.php $string[ 'cryptex_options'] = 'Cryptex ofptions';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'hangman_options'] = 'Hangman options';
//mod_form.php $string[ 'hiddenpicture_height'] = 'Set height of picture to';
//mod_form.php $string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options';
//mod_form.php $string[ 'hiddenpicture_width'] = 'Set width of picture to';
//mod_form.php $string[ 'millionaire_background'] = 'Background color';
//mod_form.php $string[ 'millionaire_options'] = 'Millionaire\' options';
//mod_form.php $string[ 'millionaire_shuffle'] = 'Randomize questions';
//mod_form.php $string[ 'snakes_cols'] = 'Cols';
//mod_form.php $string[ 'snakes_data'] = 'Positions of Snakes and Ladders';
//mod_form.php $string[ 'snakes_file'] = 'File for background';
//mod_form.php $string[ 'snakes_footerx'] = 'Space at bootom left';
//mod_form.php $string[ 'snakes_footery'] = 'Space at bottom right';
//mod_form.php $string[ 'snakes_headerx'] = 'Space at up left';
//mod_form.php $string[ 'snakes_headery'] = 'Space at up right';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//mod_form.php $string[ 'snakes_options'] = '\'Snakes and Ladders\' options';
//mod_form.php $string[ 'snakes_rows'] = 'Rows';
//mod_form.php $string[ 'sourcemodule_include_subcategories'] = 'Include subcategories';
//mod_form.php $string[ 'sudoku_options'] = 'Sudoku options';
//mod_form.php $string[ 'toptext'] = 'Text at the top of page';
//mod_form.php $string[ 'userdefined'] = 'User defined';
//review.php $string[ 'showall'] = 'Show all';
//showanswers.php $string[ 'clearrepetitions'] = 'Clear statistics';
//showanswers.php $string[ 'computerepetitions'] = 'Compute statistics again';
//showanswers.php $string[ 'repetitions'] = 'Repetitions';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

304
lang/sq/game.php

@ -0,0 +1,304 @@
<?php // $Id: game.php,v 1.8 2012/07/26 05:39:00 bdaloukas Exp $
// translation to Shqip (sq) by Gkotslari Orianta
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Shtim nga një format OpenOffice (odt)';
$string[ 'bookquiz_not_select_book'] = 'Nuk keni zgjedhur libër ';
$string[ 'bookquiz_subchapter'] = 'Krijimi i nen vellimeve';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'Libri është bosh ';
$string[ 'sudoku_submit'] = 'Vlerësim pergjigjesh';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Κategori ';
$string[ 'bookquiz_chapters'] = 'Kapitale ';
//cross/cross_class.php
//cross/crossdb_class.php
$string[ 'and'] = 'dhe';
$string[ 'cross_correct'] = 'I saktë';
$string[ 'cross_corrects'] = 'E saktë';
$string[ 'cross_error'] = 'gabim';
$string[ 'cross_errors'] = 'Gabime';
$string[ 'cross_found_many'] = 'U gjetën';
$string[ 'cross_found_one'] = 'U gjet';
$string[ 'grade'] = 'Pikë';
//cross/play.php
$string[ 'cross_across'] = 'Horizontale';
$string[ 'cross_checkbutton'] = 'Kontroll fjalëkryqi';
$string[ 'cross_down'] = 'Vertikale';
$string[ 'cross_endofgamebutton'] = 'Fundi i fjalëkryqit';
$string[ 'cross_error_containsbadchars'] = 'Fjala qe dhatë përmban karaktere te mos lejueshme.';
$string[ 'cross_error_wordlength1'] = 'Fjala e sakte përmban ';
$string[ 'cross_error_wordlength2'] = ' shkronja.';
$string[ 'cross_pleasewait'] = 'Ju lutem prisni deri sa të ngarkohet fjalëkryqi.';
$string[ 'cross_welcome'] = '<h3>Mirësevini!</h3><p>Kliko në një fjalë për të filluar.</p>';
$string[ 'letter'] = 'shkronja';
$string[ 'letters'] = 'shkronja';
$string[ 'nextgame'] = 'Lojë e re ';
$string[ 'no_words'] = 'Nuk u gjend asnjë fjalë ';
$string[ 'print'] = 'Printim';
$string[ 'win'] = 'Urime!!!';
//cryptex/play.php
$string[ 'finish'] = 'Fund loje';
//db/access.php
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'Fjalia e saktë ishte: ';
$string[ 'hangman_correct_word'] = 'Fjala e saktë ishte: ';
$string[ 'hangman_gradeinstance'] = 'Shuma e pikeve ne gjithe lojen';
$string[ 'hangman_letters'] = 'Shkronja : ';
$string[ 'hangman_restletters_many'] = 'Keni <b>$a</b> përpjekje akoma';
$string[ 'hangman_restletters_one'] = 'Keni akoma <b>VETEM 1</b> përpjekje';
$string[ 'hangman_wrongnum'] = 'Gabime: %%d out of %%d';
$string[ 'nextword'] = 'Fjalë tjetër ';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = "Ver pikë në pyetjen kryesore";
$string[ 'hiddenpicture_nocols'] = 'Duhet te përcaktoni numrin e qelizave horizontalisht';
$string[ 'hiddenpicture_nomainquestion'] = 'Nuk ka asnjë regjistrim në fjalor $a->name që të përmbajë dhë figurë';
$string[ 'hiddenpicture_norows'] = 'Duhet te përcaktoni numrin e qelizave vertikalisht';
$string[ 'must_select_glossary'] = 'Duhet te zgjidhni me patjetër një fjalor';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Duhet me patjetër te zgjidhni një kategori pyetjesh';
$string[ 'millionaire_must_select_quiz'] = 'Duhet me patjetër te zgjidhni një kuiz';
//report/overview/report.php
$string[ 'feedback'] = 'Përgjigje';
$string[ 'startedon'] = 'Filloni në';
$string[ 'timecompleted'] = 'Kompletuar';
$string[ 'unfinished'] = 'Pafund';
//snakes/play.php
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Numuri i sudoku që do krijohet';
$string[ 'sudoku_create_start'] = 'Fillimi i krijimit sudoku';
$string[ 'sudoku_creating'] = 'U krijua <b>$a</b> sudoku';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Fund loje';
$string[ 'sudoku_guessnumber'] = 'Supozo numurin ';
$string[ 'sudoku_noentriesfound'] = 'Nuk u gjendën fjalë në fjalor';
//export.php
$string[ 'export'] = 'Εksport';
$string[ 'html_hascheckbutton'] = 'Të ketë buton kontrollimi përgjigjjeve të sakta:';
$string[ 'html_hasprintbutton'] = 'Të ketë buton printimi:';
$string[ 'html_title'] = 'Titulli i faqes të internetit:';
$string[ 'javame_createdby'] = 'U krijua nga:';
$string[ 'javame_description'] = 'Përshkrim:';
$string[ 'javame_filename'] = 'emri i zarfit:';
$string[ 'javame_icon'] = 'ikona:';
$string[ 'javame_maxpictureheight'] = 'Maksimumi i gjatësisë të ikonës:';
$string[ 'javame_maxpicturewidth'] = 'Μaksimumi i gjërësisë të ikonës:';
$string[ 'javame_name'] = 'Emri:';
$string[ 'javame_type'] = 'Τip:';
$string[ 'javame_vendor'] = 'Vendor:';
$string[ 'javame_version'] = 'versioni:';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Fund loje</B></BIG>';
$string[ 'html_hangman_new'] = 'E re';
//exporthtml_millionaire.php
$string[ 'millionaire_info_people'] = 'Fjala bosh thotë';
$string[ 'millionaire_info_telephone'] = 'Mendoj se përgjigjja e saktë është ';
$string[ 'millionaire_info_wrong_answer'] = 'Përgjigjja juaj është gabim<br>Pergjigjja e saktë është :';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'Burimi i pyetjeve per milionerin duhet te ishte $a ose Pyetje dhe jo ';
$string[ 'must_select_questioncategory'] = 'Duhet te zgjedhësh me patjetër një kategori pyetjesh ';
$string[ 'must_select_quiz'] = 'Duhet te zgjidhni një kuiz';
//exporthtml_snakes.php
$string[ 'score'] = 'Piket';
//index.php
$string[ 'modulename'] = 'Lojë';
$string[ 'modulenameplural'] = 'Lojra';
$string[ 'pluginname'] = 'Lojë';
//lib.php
$string[ 'attempt'] = 'Përpjekja $a';
$string[ 'bookquiz_questions'] = 'Radhitja e katigorive te pyetjeve në vellime libri';
$string[ 'export_to_html'] = 'Εksport në HTML';
$string[ 'export_to_javame'] = 'Εksport në JavaMe për telefona celularë';
$string[ 'game_bookquiz'] = 'Libër me pyetje';
$string[ 'game_cross'] = 'Fjalëkryq';
$string[ 'game_cryptex'] = 'Fjalefshehje';
$string[ 'game_hangman'] = 'Xhelat';
$string[ 'game_hiddenpicture'] = "Figura e fshehtë";
$string[ 'game_millionaire'] = 'Milioner';
$string[ 'game_snakes'] = 'Gjarpër';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Informacione';
$string[ 'noattempts'] = 'Asnjë përpjekje nuk u bë për këtë lojë';
$string[ 'percent'] = 'Përqindje';
$string[ 'results'] = 'Përfundime';
$string[ 'showanswers'] = 'Shfaqja e përgjigjjeve';
//locallib.php
$string[ 'attemptfirst'] = 'Përpjekja e parë';
$string[ 'attemptlast'] = 'Përpjekja e fundit';
$string[ 'gradeaverage'] = 'Numuri mesatar';
$string[ 'gradehighest'] = 'Numuri më i madh';
//mod_form.php
$string[ 'bottomtext'] = 'Text në pjesën e poshtme të faqes';
$string[ 'cross_layout'] = 'Mënyrë shfaqjeje';
$string[ 'cross_layout0'] = 'Përcaktimet poshtë fjalëkryqit';
$string[ 'cross_layout1'] = 'Përcaktimet nga e djathta e fjalëkryqit';
$string[ 'cross_maxcols'] = 'Maximumi i rreshtave / shtyllave të fjalëkryqit';
$string[ 'cross_maxwords'] = 'Maximumi i fjalëve të fjalëkryqit';
$string[ 'cryptex_maxcols'] = 'Maximumi i rreshtave / shtyllave të fjalëkryqit';
$string[ 'cryptex_maxtries'] = 'Maximumi i përpjekjeve';
$string[ 'cryptex_maxwords'] = 'Maximumi i fjalëve të fjalëkryqit';
$string[ 'grademethod'] = 'Μënyrë vleresimi';
$string[ 'hangman_allowspaces'] = 'Të lejohen vendet bosh në fjalët';
$string[ 'hangman_allowsub'] = 'Të lejohet simboli - në fjalet';
$string[ 'hangman_imageset'] = 'Zgjidhni fotografi';
$string[ 'hangman_language'] = 'Gjuha në të cilën janë fjalët';
$string[ 'hangman_maxtries'] = 'Numuri i fjalëve për cdo lojë';
$string[ 'hangman_showcorrectanswer'] = 'Të shfaqet përgjigjja e saktë pas fund loje ;';
$string[ 'hangman_showfirst'] = 'Të shfaqet shkronja e parë e fjalës';
$string[ 'hangman_showlast'] = 'Të shfaqet shkronja e fundit e fjalës';
$string[ 'hangman_showquestion'] = 'Të shfaqen pyetjet;';
$string[ 'hiddenpicture_across'] = "Numri i qelizave horizontale ";
$string[ 'hiddenpicture_down'] = "Numri i qelizave vertikal ";
$string[ 'hiddenpicture_height'] = 'Përcaktimi i lartesisë të ikonës';
$string[ 'hiddenpicture_pictureglossary'] = 'Fjalori për pyetjen kryesore';
$string[ 'hiddenpicture_width'] = 'Përcaktimi i gjërësisë të ikonës';
$string[ 'millionaire_shuffle'] = 'Përzjerje pyetjesh';
$string[ 'snakes_background'] = 'Pistë';
$string[ 'sourcemodule'] = 'Burim pyetjesh';
$string[ 'sourcemodule_book'] = 'Zgjidh libër ';
$string[ 'sourcemodule_glossary'] = 'Zgjidh fjalor';
$string[ 'sourcemodule_glossarycategory'] = 'Zgjidh kategori fjalori';
$string[ 'sourcemodule_include_subcategories'] = 'Te plotësohen nënkategoritë';
$string[ 'sourcemodule_question'] = 'Pyetje';
$string[ 'sourcemodule_questioncategory'] = 'Zgjidh kategori pyetjesh';
$string[ 'sourcemodule_quiz'] = 'Zgjidh kuiz';
$string[ 'sudoku_maxquestions'] = 'Μaximumi i pyetjeve';
//preview.php
$string[ 'only_teachers'] = 'Vetëm mesuesi mundet te shikojë këtë faqe';
$string[ 'preview'] = 'Parashfaq';
//review.php
$string[ 'attempts'] = 'Përpjekje';
$string[ 'completedon'] = 'U përfundua në';
$string[ 'outof'] = '$a->grade nga maksimumi $a->maxgrade';
$string[ 'review'] = 'Rikorigjim';
$string[ 'reviewofattempt'] = 'Rikorigjim i mundimit $a';
$string[ 'startagain'] = 'Përpjekje prap';
$string[ 'timetaken'] = 'Koha e duhur';
//showanswers.php
$string[ 'feedbacks'] = 'Mesazh përgjigjjeje të saktë';
//showattempts.php
$string[ 'lastip'] = 'IP studenti';
$string[ 'showsolution'] = 'Zgjedhje';
$string[ 'timefinish'] = 'Fund loje ';
$string[ 'timelastattempt'] = 'Përpjekje e fundit';
$string[ 'timestart'] = 'Fillimi ';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Përpjekje loje tani';
$string[ 'continueattemptgame'] = 'Vazhdim i lojës';
$string[ 'reattemptgame'] = 'Përpjekje loje përsëri';
$string[ 'yourfinalgradeis'] = 'Pikët përfundimtare për këtë kuiz janë $a';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//cross/cross_class.php $string[ 'lettersall'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
//db/access.php $string[ 'game:attempt'] = 'Play game';
//db/access.php $string[ 'game:deleteattempts'] = 'Delete attempts';
//db/access.php $string[ 'game:grade'] = 'Grade games manually';
//db/access.php $string[ 'game:manage'] = 'Manage';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//db/access.php $string[ 'game:preview'] = 'Preview Games';
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts';
//db/access.php $string[ 'game:view'] = 'view';
//db/access.php $string[ 'game:viewreports'] = 'viewreports';
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions";
//hiddenpicture/play.php $string[ 'noglossaryentriesfound'] = 'No glossary entries found';
//report/overview/report.php $string[ 'allattempts'] = 'Show all tries';
//report/overview/report.php $string[ 'allstudents'] = 'Show all $a';
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//report/overview/report.php $string[ 'attemptsonly'] = 'Show only students with attempts';
//report/overview/report.php $string[ 'deleteattemptcheck'] = 'Are you absolutely sure you want to completely delete these attempts?';
//report/overview/report.php $string[ 'displayoptions'] = 'Display options';
//report/overview/report.php $string[ 'downloadods'] = 'Download in ODS format';
//report/overview/report.php $string[ 'noattemptsonly'] = 'Show $a with no attempts only';
//report/overview/report.php $string[ 'numattempts'] = '$a->studentnum $a->studentstring have made $a->attemptnum attempts';
//report/overview/report.php $string[ 'pagesize'] = 'Questions per page:';
//report/overview/report.php $string[ 'reportoverview'] = 'Overview';
//report/overview/report.php $string[ 'selectall'] = 'Select all';
//report/overview/report.php $string[ 'selectnone'] = 'Deselect all';
//report/overview/report.php $string[ 'showdetailedmarks'] = 'Show mark details';
//report/overview/report.php $string[ 'withselected'] = 'With selected';
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.';
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.';
//exporthtml_millionaire.php $string[ 'millionaire_helppeople'] = 'Help of people';
//exporthtml_millionaire.php $string[ 'millionaire_quit'] = 'Quit';
//exporthtml_millionaire.php $string[ 'millionaire_telephone'] = 'Help of telephone';
//exporthtml_snakes.php $string[ 'html_snakes_check'] = 'Check';
//exporthtml_snakes.php $string[ 'html_snakes_correct'] = 'Correct!';
//exporthtml_snakes.php $string[ 'html_snakes_no_selection'] = 'Have to select something!';
//exporthtml_snakes.php $string[ 'html_snakes_wrong'] = "Your answer isn't correct. Stay on the same seat.";
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//lib.php $string[ 'showattempts'] = 'Show attempts';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'cross_options'] = 'Crossword options';
//mod_form.php $string[ 'cryptex_options'] = 'Cryptex ofptions';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'hangman_options'] = 'Hangman options';
//mod_form.php $string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options';
//mod_form.php $string[ 'millionaire_background'] = 'Background color';
//mod_form.php $string[ 'millionaire_options'] = 'Millionaire\' options';
//mod_form.php $string[ 'snakes_cols'] = 'Cols';
//mod_form.php $string[ 'snakes_data'] = 'Positions of Snakes and Ladders';
//mod_form.php $string[ 'snakes_file'] = 'File for background';
//mod_form.php $string[ 'snakes_footerx'] = 'Space at bootom left';
//mod_form.php $string[ 'snakes_footery'] = 'Space at bottom right';
//mod_form.php $string[ 'snakes_headerx'] = 'Space at up left';
//mod_form.php $string[ 'snakes_headery'] = 'Space at up right';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//mod_form.php $string[ 'snakes_options'] = '\'Snakes and Ladders\' options';
//mod_form.php $string[ 'snakes_rows'] = 'Rows';
//mod_form.php $string[ 'sudoku_options'] = 'Sudoku options';
//mod_form.php $string[ 'toptext'] = 'Text at the top of page';
//mod_form.php $string[ 'userdefined'] = 'User defined';
//review.php $string[ 'showall'] = 'Show all';
//showanswers.php $string[ 'clearrepetitions'] = 'Clear statistics';
//showanswers.php $string[ 'computerepetitions'] = 'Compute statistics again';
//showanswers.php $string[ 'repetitions'] = 'Repetitions';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

304
lang/uk/game.php

@ -0,0 +1,304 @@
<?php // $Id: game.php,v 1.8 2012/07/26 05:39:00 bdaloukas Exp $
// translation to Українська (uk) by by Anastasiya Kolomoytseva
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = 'Shtim nga një format OpenOffice (odt)';
$string[ 'bookquiz_not_select_book'] = 'Nuk keni zgjedhur libër ';
$string[ 'bookquiz_subchapter'] = 'Krijimi i nen vellimeve';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = 'Libri është bosh ';
$string[ 'sudoku_submit'] = 'Vlerësim pergjigjesh';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = 'Κategori ';
$string[ 'bookquiz_chapters'] = 'Kapitale ';
//cross/cross_class.php
$string[ 'lettersall'] = 'АБВГҐДЕЄЖЗИІЇЙКЛМНОПРСТУФХЧШЩЬЮЯ';
//cross/crossdb_class.php
$string[ 'and'] = 'dhe';
$string[ 'cross_correct'] = 'I saktë';
$string[ 'cross_corrects'] = 'E saktë';
$string[ 'cross_error'] = 'gabim';
$string[ 'cross_errors'] = 'Gabime';
$string[ 'cross_found_many'] = 'U gjetën';
$string[ 'cross_found_one'] = 'U gjet';
$string[ 'grade'] = 'Pikë';
//cross/play.php
$string[ 'cross_across'] = 'Horizontale';
$string[ 'cross_checkbutton'] = 'Kontroll fjalëkryqi';
$string[ 'cross_down'] = 'Vertikale';
$string[ 'cross_endofgamebutton'] = 'Fundi i fjalëkryqit';
$string[ 'cross_error_containsbadchars'] = 'Fjala qe dhatë përmban karaktere te mos lejueshme.';
$string[ 'cross_error_wordlength1'] = 'Fjala e sakte përmban ';
$string[ 'cross_error_wordlength2'] = ' shkronja.';
$string[ 'cross_pleasewait'] = 'Ju lutem prisni deri sa të ngarkohet fjalëkryqi.';
$string[ 'cross_welcome'] = '<h3>Mirësevini!</h3><p>Kliko në një fjalë për të filluar.</p>';
$string[ 'letter'] = 'shkronja';
$string[ 'letters'] = 'shkronja';
$string[ 'nextgame'] = 'Lojë e re ';
$string[ 'no_words'] = 'Не знайшлось жодного слова';
$string[ 'print'] = 'Printim';
$string[ 'win'] = 'Вітання!!!';
//cryptex/play.php
$string[ 'finish'] = 'Fund loje';
//db/access.php
//hangman/play.php
$string[ 'hangman_correct_phrase'] = 'Вірна фраза була: ';
$string[ 'hangman_correct_word'] = 'Вірне слово було: ';
$string[ 'hangman_gradeinstance'] = 'Shuma e pikeve ne gjithe lojen';
$string[ 'hangman_letters'] = 'Shkronja : ';
$string[ 'hangman_restletters_many'] = 'Keni <b>$a</b> përpjekje akoma';
$string[ 'hangman_restletters_one'] = 'Keni akoma <b>VETEM 1</b> përpjekje';
$string[ 'hangman_wrongnum'] = 'Gabime: %%d out of %%d';
$string[ 'nextword'] = 'Fjalë tjetër ';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = "Ver pikë në pyetjen kryesore";
$string[ 'hiddenpicture_nocols'] = 'Duhet te përcaktoni numrin e qelizave horizontalisht';
$string[ 'hiddenpicture_nomainquestion'] = 'Nuk ka asnjë regjistrim në fjalor $a->name që të përmbajë dhë figurë';
$string[ 'hiddenpicture_norows'] = 'Duhet te përcaktoni numrin e qelizave vertikalisht';
$string[ 'must_select_glossary'] = 'Duhet te zgjidhni me patjetër një fjalor';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = 'Duhet me patjetër te zgjidhni një kategori pyetjesh';
$string[ 'millionaire_must_select_quiz'] = 'Duhet me patjetër te zgjidhni një kuiz';
//report/overview/report.php
$string[ 'allattempts'] = 'Показати всі зусилля';
$string[ 'allstudents'] = 'Показати всі $a';
$string[ 'attemptsonly'] = 'Показати тільки учнів які намагалися';
$string[ 'deleteattemptcheck'] = 'Ви абсолютно впевнені,що хочете,повністю видалити ці спроби?';
$string[ 'displayoptions'] = 'Відображити параметри';
$string[ 'downloadods'] = 'Зберегти як ODS';
$string[ 'feedback'] = 'Përgjigje';
$string[ 'noattemptsonly'] = 'Відображити $a які не мають жодної спроби';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring зробили $a->attemptnum спроб';
$string[ 'pagesize'] = 'Питання на сторінці:';
$string[ 'reportoverview'] = 'Πерегляд';
$string[ 'selectall'] = 'Виділити все';
$string[ 'selectnone'] = ' Відмінити все';
$string[ 'showdetailedmarks'] = 'Інформація питань';
$string[ 'startedon'] = 'Filloni në';
$string[ 'timecompleted'] = 'Kompletuar';
$string[ 'unfinished'] = 'Pafund';
$string[ 'withselected'] = 'З вибраним';
//snakes/play.php
//sudoku/create.php
$string[ 'sudoku_create_count'] = 'Numuri i sudoku që do krijohet';
$string[ 'sudoku_create_start'] = 'Fillimi i krijimit sudoku';
$string[ 'sudoku_creating'] = 'U krijua <b>$a</b> sudoku';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = 'Fund loje';
$string[ 'sudoku_guessnumber'] = 'Supozo numurin ';
$string[ 'sudoku_noentriesfound'] = 'Nuk u gjendën fjalë në fjalor';
//export.php
$string[ 'export'] = 'Εksport';
$string[ 'html_hascheckbutton'] = 'Të ketë buton kontrollimi përgjigjjeve të sakta:';
$string[ 'html_hasprintbutton'] = 'Të ketë buton printimi:';
$string[ 'html_title'] = 'Titulli i faqes të internetit:';
$string[ 'javame_createdby'] = 'U krijua nga:';
$string[ 'javame_description'] = 'Përshkrim:';
$string[ 'javame_filename'] = 'emri i zarfit:';
$string[ 'javame_icon'] = 'ikona:';
$string[ 'javame_maxpictureheight'] = 'Maksimumi i gjatësisë të ikonës:';
$string[ 'javame_maxpicturewidth'] = 'Μaksimumi i gjërësisë të ikonës:';
$string[ 'javame_name'] = 'Emri:';
$string[ 'javame_type'] = 'Τip:';
$string[ 'javame_vendor'] = 'Vendor:';
$string[ 'javame_version'] = 'versioni:';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '<BIG><B>Fund loje</B></BIG>';
$string[ 'html_hangman_new'] = 'E re';
//exporthtml_millionaire.php
$string[ 'millionaire_info_people'] = 'Fjala bosh thotë';
$string[ 'millionaire_info_telephone'] = 'Mendoj se përgjigjja e saktë është ';
$string[ 'millionaire_info_wrong_answer'] = 'Përgjigjja juaj është gabim<br>Pergjigjja e saktë është :';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'Burimi i pyetjeve per milionerin duhet te ishte $a ose Pyetje dhe jo ';
$string[ 'must_select_questioncategory'] = 'Duhet te zgjedhësh me patjetër një kategori pyetjesh ';
$string[ 'must_select_quiz'] = 'Duhet te zgjidhni një kuiz';
//exporthtml_snakes.php
$string[ 'score'] = 'Piket';
//index.php
$string[ 'modulename'] = 'Lojë';
$string[ 'modulenameplural'] = 'Lojra';
$string[ 'pluginname'] = 'Lojë';
//lib.php
$string[ 'attempt'] = 'Përpjekja $a';
$string[ 'bookquiz_questions'] = 'Radhitja e katigorive te pyetjeve në vellime libri';
$string[ 'export_to_html'] = 'Εksport në HTML';
$string[ 'export_to_javame'] = 'Εksport në JavaMe për telefona celularë';
$string[ 'game_bookquiz'] = 'Libër me pyetje';
$string[ 'game_cross'] = 'Fjalëkryq';
$string[ 'game_cryptex'] = 'Fjalefshehje';
$string[ 'game_hangman'] = 'Xhelat';
$string[ 'game_hiddenpicture'] = "Figura e fshehtë";
$string[ 'game_millionaire'] = 'Milioner';
$string[ 'game_snakes'] = 'Gjarpër';
$string[ 'game_sudoku'] = 'Sudoku';
$string[ 'info'] = 'Informacione';
$string[ 'noattempts'] = 'Asnjë përpjekje nuk u bë për këtë lojë';
$string[ 'percent'] = 'Përqindje';
$string[ 'results'] = 'Përfundime';
$string[ 'showanswers'] = 'Shfaqja e përgjigjjeve';
//locallib.php
$string[ 'attemptfirst'] = 'Përpjekja e parë';
$string[ 'attemptlast'] = 'Përpjekja e fundit';
$string[ 'gradeaverage'] = 'Numuri mesatar';
$string[ 'gradehighest'] = 'Numuri më i madh';
//mod_form.php
$string[ 'bottomtext'] = 'Text në pjesën e poshtme të faqes';
$string[ 'cross_layout'] = 'Mënyrë shfaqjeje';
$string[ 'cross_layout0'] = 'Përcaktimet poshtë fjalëkryqit';
$string[ 'cross_layout1'] = 'Përcaktimet nga e djathta e fjalëkryqit';
$string[ 'cross_maxcols'] = 'Maximumi i rreshtave / shtyllave të fjalëkryqit';
$string[ 'cross_maxwords'] = 'Maximumi i fjalëve të fjalëkryqit';
$string[ 'cryptex_maxcols'] = 'Maximumi i rreshtave / shtyllave të fjalëkryqit';
$string[ 'cryptex_maxtries'] = 'Maximumi i përpjekjeve';
$string[ 'cryptex_maxwords'] = 'Maximumi i fjalëve të fjalëkryqit';
$string[ 'grademethod'] = 'Μënyrë vleresimi';
$string[ 'hangman_allowspaces'] = 'Të lejohen vendet bosh në fjalët';
$string[ 'hangman_allowsub'] = 'Të lejohet simboli - në fjalet';
$string[ 'hangman_imageset'] = 'Zgjidhni fotografi';
$string[ 'hangman_language'] = 'Gjuha në të cilën janë fjalët';
$string[ 'hangman_maxtries'] = 'Numuri i fjalëve për cdo lojë';
$string[ 'hangman_showcorrectanswer'] = 'Të shfaqet përgjigjja e saktë pas fund loje ;';
$string[ 'hangman_showfirst'] = 'Të shfaqet shkronja e parë e fjalës';
$string[ 'hangman_showlast'] = 'Të shfaqet shkronja e fundit e fjalës';
$string[ 'hangman_showquestion'] = 'Të shfaqen pyetjet;';
$string[ 'hiddenpicture_across'] = "Numri i qelizave horizontale ";
$string[ 'hiddenpicture_down'] = "Numri i qelizave vertikal ";
$string[ 'hiddenpicture_height'] = 'Përcaktimi i lartesisë të ikonës';
$string[ 'hiddenpicture_pictureglossary'] = 'Fjalori për pyetjen kryesore';
$string[ 'hiddenpicture_width'] = 'Përcaktimi i gjërësisë të ikonës';
$string[ 'millionaire_shuffle'] = 'Përzjerje pyetjesh';
$string[ 'snakes_background'] = 'Pistë';
$string[ 'sourcemodule'] = 'Burim pyetjesh';
$string[ 'sourcemodule_book'] = 'Zgjidh libër ';
$string[ 'sourcemodule_glossary'] = 'Zgjidh fjalor';
$string[ 'sourcemodule_glossarycategory'] = 'Zgjidh kategori fjalori';
$string[ 'sourcemodule_include_subcategories'] = 'Te plotësohen nënkategoritë';
$string[ 'sourcemodule_question'] = 'Pyetje';
$string[ 'sourcemodule_questioncategory'] = 'Zgjidh kategori pyetjesh';
$string[ 'sourcemodule_quiz'] = 'Zgjidh kuiz';
$string[ 'sudoku_maxquestions'] = 'Μaximumi i pyetjeve';
//preview.php
$string[ 'only_teachers'] = 'Vetëm mesuesi mundet te shikojë këtë faqe';
$string[ 'preview'] = 'Parashfaq';
//review.php
$string[ 'attempts'] = 'Përpjekje';
$string[ 'completedon'] = 'U përfundua në';
$string[ 'outof'] = '$a->grade nga maksimumi $a->maxgrade';
$string[ 'review'] = 'Rikorigjim';
$string[ 'reviewofattempt'] = 'Rikorigjim i mundimit $a';
$string[ 'startagain'] = 'Përpjekje prap';
$string[ 'timetaken'] = 'Koha e duhur';
//showanswers.php
$string[ 'feedbacks'] = 'Mesazh përgjigjjeje të saktë';
//showattempts.php
$string[ 'lastip'] = 'IP studenti';
$string[ 'showsolution'] = 'Zgjedhje';
$string[ 'timefinish'] = 'Fund loje ';
$string[ 'timelastattempt'] = 'Përpjekje e fundit';
$string[ 'timestart'] = 'Fillimi ';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = 'Përpjekje loje tani';
$string[ 'continueattemptgame'] = 'Vazhdim i lojës';
$string[ 'reattemptgame'] = 'Përpjekje loje përsëri';
$string[ 'yourfinalgradeis'] = 'Pikët përfundimtare për këtë kuiz janë $a';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//db/access.php $string[ 'game:attempt'] = 'Play game';
//db/access.php $string[ 'game:deleteattempts'] = 'Delete attempts';
//db/access.php $string[ 'game:grade'] = 'Grade games manually';
//db/access.php $string[ 'game:manage'] = 'Manage';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//db/access.php $string[ 'game:preview'] = 'Preview Games';
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts';
//db/access.php $string[ 'game:view'] = 'view';
//db/access.php $string[ 'game:viewreports'] = 'viewreports';
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions";
//hiddenpicture/play.php $string[ 'noglossaryentriesfound'] = 'No glossary entries found';
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.';
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.';
//exporthtml_millionaire.php $string[ 'millionaire_helppeople'] = 'Help of people';
//exporthtml_millionaire.php $string[ 'millionaire_quit'] = 'Quit';
//exporthtml_millionaire.php $string[ 'millionaire_telephone'] = 'Help of telephone';
//exporthtml_snakes.php $string[ 'html_snakes_check'] = 'Check';
//exporthtml_snakes.php $string[ 'html_snakes_correct'] = 'Correct!';
//exporthtml_snakes.php $string[ 'html_snakes_no_selection'] = 'Have to select something!';
//exporthtml_snakes.php $string[ 'html_snakes_wrong'] = "Your answer isn't correct. Stay on the same seat.";
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//lib.php $string[ 'showattempts'] = 'Show attempts';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'cross_options'] = 'Crossword options';
//mod_form.php $string[ 'cryptex_options'] = 'Cryptex ofptions';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'hangman_options'] = 'Hangman options';
//mod_form.php $string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options';
//mod_form.php $string[ 'millionaire_background'] = 'Background color';
//mod_form.php $string[ 'millionaire_options'] = 'Millionaire\' options';
//mod_form.php $string[ 'snakes_cols'] = 'Cols';
//mod_form.php $string[ 'snakes_data'] = 'Positions of Snakes and Ladders';
//mod_form.php $string[ 'snakes_file'] = 'File for background';
//mod_form.php $string[ 'snakes_footerx'] = 'Space at bootom left';
//mod_form.php $string[ 'snakes_footery'] = 'Space at bottom right';
//mod_form.php $string[ 'snakes_headerx'] = 'Space at up left';
//mod_form.php $string[ 'snakes_headery'] = 'Space at up right';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//mod_form.php $string[ 'snakes_options'] = '\'Snakes and Ladders\' options';
//mod_form.php $string[ 'snakes_rows'] = 'Rows';
//mod_form.php $string[ 'sudoku_options'] = 'Sudoku options';
//mod_form.php $string[ 'toptext'] = 'Text at the top of page';
//mod_form.php $string[ 'userdefined'] = 'User defined';
//review.php $string[ 'showall'] = 'Show all';
//showanswers.php $string[ 'clearrepetitions'] = 'Clear statistics';
//showanswers.php $string[ 'computerepetitions'] = 'Compute statistics again';
//showanswers.php $string[ 'repetitions'] = 'Repetitions';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

304
lang/zh_cn/game.php

@ -0,0 +1,304 @@
<?php // $Id: game.php,v 1.7 2012/07/26 05:39:00 bdaloukas Exp $
//Translation to simplified Chinese by 李冬梅(Li Dong Mei)
//bookquiz/importodt.php
$string[ 'bookquiz_import_odt'] = '从OpenOffice的文件(ODT)输入';
$string[ 'bookquiz_not_select_book'] = '你还没有选择一本书';
$string[ 'bookquiz_subchapter'] = '创建几节';
//bookquiz/play.php
$string[ 'bookquiz_empty'] = '这本书是空的';
$string[ 'sudoku_submit'] = '答案得分';
//bookquiz/questions.php
$string[ 'bookquiz_categories'] = '分类';
$string[ 'bookquiz_chapters'] = '章节';
//cross/cross_class.php
$string[ 'lettersall'] = 'aāáǎà bcd eēéěè fgh iīíǐì jklm oōóǒò pqrst uūúǔù ǖǘǚǜü wxyz'; //chinese
//cross/crossdb_class.php
$string[ 'and'] = '而且';
$string[ 'cross_correct'] = '正确';
$string[ 'cross_corrects'] = '更正';
$string[ 'cross_error'] = '错误';
$string[ 'cross_errors'] = '错误';
$string[ 'cross_found_many'] = '找到';
$string[ 'cross_found_one'] = '找到';
$string[ 'grade'] = '得分';
//cross/play.php
$string[ 'cross_across'] = '横穿';
$string[ 'cross_checkbutton'] = '核对填字游戏';
$string[ 'cross_down'] = '纵向';
$string[ 'cross_endofgamebutton'] = '填字游戏结束';
$string[ 'cross_error_containsbadchars'] = '此词含有非法字符';
$string[ 'cross_error_wordlength1'] = '含有正确的词 ';
$string[ 'cross_error_wordlength2'] = ' 字母';
$string[ 'cross_pleasewait'] = '交叉正在加载,请稍候';
$string[ 'cross_welcome'] = '欢迎进入!点击开始';
$string[ 'letter'] = '字母';
$string[ 'letters'] = '字母';
$string[ 'nextgame'] = '新游戏';
$string[ 'no_words'] = '任何字没找到';
$string[ 'print'] = '打印';
$string[ 'win'] = '恭喜获胜!!!';
//cryptex/play.php
$string[ 'finish'] = '游戏结束';
//db/access.php
//hangman/play.php
$string[ 'hangman_correct_phrase'] = '正确的一个词语是: ';
$string[ 'hangman_correct_word'] = '正确的词: ';
$string[ 'hangman_gradeinstance'] = '整个游戏得分';
$string[ 'hangman_letters'] = '字母: ';
$string[ 'hangman_restletters_many'] = '你有 $a 机会';
$string[ 'hangman_restletters_one'] = '你只有一次机会';
$string[ 'hangman_wrongnum'] = '出错了: %%d out of %%d';
$string[ 'nextword'] = '下一个词';
//hiddenpicture/play.php
$string[ 'hiddenpicture_mainsubmit'] = '主要答案得分';
$string[ 'hiddenpicture_nocols'] = '必须指定水平列数';
$string[ 'hiddenpicture_nomainquestion'] = '在 $a 上没有词汇条目->名称附加照片';
$string[ 'hiddenpicture_norows'] = '必须指定垂直列数';
$string[ 'must_select_glossary'] = '你必须选定一个词汇';
$string[ 'noglossaryentriesfound'] = '词汇表没找到';
//millionaire/play.php
$string[ 'millionaire_must_select_questioncategory'] = '你必须选定一个问题类别';
$string[ 'millionaire_must_select_quiz'] = '你必须选择一个小测验';
//report/overview/report.php
$string[ 'allattempts'] = '显示所有可能的机会';
$string[ 'allstudents'] = '显示所有的 $a';
$string[ 'attemptsonly'] = '只显示进行尝试的学生';
$string[ 'deleteattemptcheck'] = '你真的确定要完全删除这些尝试?';
$string[ 'displayoptions'] = '显示选项';
$string[ 'downloadods'] = '以ODS格式下载';
$string[ 'feedback'] = '反馈';
$string[ 'noattemptsonly'] = '显示 $a ,不需任何尝试';
$string[ 'numattempts'] = '$a->studentnum $a->studentstring 已经形成 $a->attemptnum 尝试';
$string[ 'pagesize'] = '每页出现的问题:';
$string[ 'reportoverview'] = '浏览';
$string[ 'selectall'] = '全选';
$string[ 'selectnone'] = '全不选';
$string[ 'showdetailedmarks'] = '显示标记';
$string[ 'startedon'] = '开始';
$string[ 'timecompleted'] = '完成';
$string[ 'unfinished'] = '打开';
$string[ 'withselected'] = '选定';
//snakes/play.php
//sudoku/create.php
$string[ 'sudoku_create_count'] = '创建数独游戏数';
$string[ 'sudoku_create_start'] = '开始创建数独游戏';
$string[ 'sudoku_creating'] = '正在创建 $a 数独游戏';
//sudoku/play.php
$string[ 'sudoku_finishattemptbutton'] = '数独游戏结束';
$string[ 'sudoku_guessnumber'] = '猜测正确的编号';
$string[ 'sudoku_noentriesfound'] = '没找到任何字';
//export.php
$string[ 'export'] = '输出';
$string[ 'html_hascheckbutton'] = '已检查按钮:';
$string[ 'html_hasprintbutton'] = '已打印按钮:';
$string[ 'html_title'] = 'HTML的标题:';
$string[ 'javame_createdby'] = '创建于:';
$string[ 'javame_description'] = '描述:';
$string[ 'javame_filename'] = '文件名:';
$string[ 'javame_icon'] = '图标:';
$string[ 'javame_maxpictureheight'] = '图片的最大高度:';
$string[ 'javame_maxpicturewidth'] = '图片的最大宽度:';
$string[ 'javame_name'] = '名称:';
$string[ 'javame_type'] = '类型:';
$string[ 'javame_vendor'] = '销售商:';
$string[ 'javame_version'] = '版本:';
//exporthtml_hangman.php
$string[ 'hangman_loose'] = '游戏结束';
$string[ 'html_hangman_new'] = '新的';
//exporthtml_millionaire.php
$string[ 'millionaire_helppeople'] = '帮助';
$string[ 'millionaire_info_people'] = '人们说';
$string[ 'millionaire_info_telephone'] = '我认为正确答案是 ';
$string[ 'millionaire_info_wrong_answer'] = '你的回答错误,正确答案是:';
$string[ 'millionaire_quit'] = '退出';
$string[ 'millionaire_sourcemodule_must_quiz_question'] = '对于百万富翁来说资源一定是 $a 要么有问题要么没有';
$string[ 'millionaire_telephone'] = '借助电话';
$string[ 'must_select_questioncategory'] = '你必须选定一个问题类别';
$string[ 'must_select_quiz'] = '你必须选择一个小测验';
//exporthtml_snakes.php
$string[ 'score'] = '得分';
//index.php
$string[ 'modulename'] = '游戏';
$string[ 'modulenameplural'] = '游戏';
$string[ 'pluginname'] = '游戏';
//lib.php
$string[ 'attempt'] = '尝试 $a';
$string[ 'bookquiz_questions'] = '把一些问题分类同各章节联系起来';
$string[ 'export_to_html'] = '导出HTML';
$string[ 'export_to_javame'] = '导出Javame';
$string[ 'game_bookquiz'] = '带有问题的书';
$string[ 'game_cross'] = '填字游戏';
$string[ 'game_cryptex'] = '藏密筒';
$string[ 'game_hangman'] = '刽子手';
$string[ 'game_hiddenpicture'] = '图片隐藏';
$string[ 'game_millionaire'] = '百万富翁';
$string[ 'game_snakes'] = '蛇和梯子';
$string[ 'game_sudoku'] = '数独游戏';
$string[ 'info'] = '信息';
$string[ 'noattempts'] = '这个游戏没有进行任何尝试';
$string[ 'percent'] = '百分率';
$string[ 'results'] = '结果';
$string[ 'showanswers'] = '答案显示';
$string[ 'showattempts'] = '试玩显示';
//locallib.php
$string[ 'attemptfirst'] = '第一次机会';
$string[ 'attemptlast'] = '最后一次机会';
$string[ 'gradeaverage'] = '平均分';
$string[ 'gradehighest'] = '最高分';
//mod_form.php
$string[ 'bottomtext'] = '底部文本';
$string[ 'cross_layout'] = '布局';
$string[ 'cross_layout0'] = '字谜底部的词组';
$string[ 'cross_layout1'] = '字谜右侧的词组';
$string[ 'cross_maxcols'] = '填字游戏的最大数';
$string[ 'cross_maxwords'] = '游戏字的最大数';
$string[ 'cross_options'] = '填字游戏选项';
$string[ 'cryptex_maxcols'] = '藏密筒的最大行/列数';
$string[ 'cryptex_maxtries'] = '最多机会';
$string[ 'cryptex_maxwords'] = '藏密筒中最多词汇';
$string[ 'cryptex_options'] = '藏密筒选项';
$string[ 'grademethod'] = '评分方法';
$string[ 'hangman_allowspaces'] = '允许文字间有间隔';
$string[ 'hangman_allowsub'] = '允许文字里有符号';
$string[ 'hangman_imageset'] = '选择刽子手的图像';
$string[ 'hangman_language'] = '选择语言';
$string[ 'hangman_maxtries'] = '每个游戏数';
$string[ 'hangman_options'] = '刽子手选项';
$string[ 'hangman_showcorrectanswer'] = '结束后正确答案显示';
$string[ 'hangman_showfirst'] = '刽子手游戏的第一个字母显示';
$string[ 'hangman_showlast'] = '刽子手游戏的最后一个字母显示';
$string[ 'hangman_showquestion'] = '问题显示 ?';
$string[ 'hiddenpicture_across'] = '水平单元';
$string[ 'hiddenpicture_down'] = '纵向单元';
$string[ 'hiddenpicture_height'] = '图片的高度设置';
$string[ 'hiddenpicture_options'] = '\图片隐藏\' 选项';
$string[ 'hiddenpicture_pictureglossary'] = '主要问题和图片词汇';
$string[ 'hiddenpicture_width'] = '图像宽度设置';
$string[ 'millionaire_background'] = '背景颜色';
$string[ 'millionaire_options'] = '百万富翁选项';
$string[ 'millionaire_shuffle'] = '随机问题';
$string[ 'snakes_background'] = '背景';
$string[ 'snakes_options'] = '\'蛇和梯子\' 选项';
$string[ 'sourcemodule'] = '问题来源';
$string[ 'sourcemodule_book'] = '挑选一本书';
$string[ 'sourcemodule_glossary'] = '词汇选择';
$string[ 'sourcemodule_glossarycategory'] = '词汇类别选择';
$string[ 'sourcemodule_include_subcategories'] = '包括子目录';
$string[ 'sourcemodule_question'] = '问题';
$string[ 'sourcemodule_questioncategory'] = '问题类别选择';
$string[ 'sourcemodule_quiz'] = '小测验选择';
$string[ 'sudoku_maxquestions'] = '问题的最大数量';
$string[ 'sudoku_options'] = '数独游戏选项';
$string[ 'toptext'] = '顶部文本';
//preview.php
$string[ 'only_teachers'] = '只有老师可以查看此页';
$string[ 'preview'] = '预览';
//review.php
$string[ 'attempts'] = '尝试';
$string[ 'completedon'] = '完成';
$string[ 'outof'] = '$a->$a 的最高分->最高分';
$string[ 'review'] = '回顾';
$string[ 'reviewofattempt'] = '回顾 $a';
$string[ 'startagain'] = '重新开始';
$string[ 'timetaken'] = '所需时间';
//showanswers.php
$string[ 'clearrepetitions'] = '清除数据';
$string[ 'computerepetitions'] = '再次计算数据';
$string[ 'feedbacks'] = '正确答案信息';
$string[ 'repetitions'] = '重复';
//showattempts.php
$string[ 'lastip'] = 'IP学生';
$string[ 'showsolution'] = '答案';
$string[ 'timefinish'] = '游戏结束';
$string[ 'timelastattempt'] = '最后一次机会';
$string[ 'timestart'] = '开始';
//tabs.php
//view.php
$string[ 'attemptgamenow'] = '现在试玩游戏';
$string[ 'continueattemptgame'] = '继续前一个游戏';
$string[ 'reattemptgame'] = '重新试玩游戏';
$string[ 'yourfinalgradeis'] = '此轮游戏的最后得分是 $a.';
//Untranslated
//bookquiz/questions.php $string[ 'bookquiz_numquestions'] = 'Questions';
//db/access.php $string[ 'game:attempt'] = 'Play game';
//db/access.php $string[ 'game:deleteattempts'] = 'Delete attempts';
//db/access.php $string[ 'game:grade'] = 'Grade games manually';
//db/access.php $string[ 'game:manage'] = 'Manage';
//db/access.php $string[ 'game:manageoverrides'] = 'Manage game overrides';
//db/access.php $string[ 'game:preview'] = 'Preview Games';
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts';
//db/access.php $string[ 'game:view'] = 'view';
//db/access.php $string[ 'game:viewreports'] = 'viewreports';
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions";
//report/overview/report.php $string[ 'attemptduration'] = 'Attempt duration';
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.';
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.';
//exporthtml_snakes.php $string[ 'html_snakes_check'] = 'Check';
//exporthtml_snakes.php $string[ 'html_snakes_correct'] = 'Correct!';
//exporthtml_snakes.php $string[ 'html_snakes_no_selection'] = 'Have to select something!';
//exporthtml_snakes.php $string[ 'html_snakes_wrong'] = "Your answer isn't correct. Stay on the same seat.";
//index.php $string[ 'helpbookquiz'] = 'When the student answers correct can go to the next chapter.';
//index.php $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.';
//index.php $string[ 'helpcryptex'] = 'This game is like a crossword but the answers are hidden inside a random cryptex.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $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.';
//index.php $string[ 'pluginadministration'] = 'Game administration';
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games';
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses';
//mod_form.php $string[ 'bookquiz_layout'] = 'Layout';
//mod_form.php $string[ 'bookquiz_layout0'] = 'Question at the top of the book';
//mod_form.php $string[ 'bookquiz_layout1'] = 'Question at the bottom of the book';
//mod_form.php $string[ 'bookquiz_options'] = 'Bookquiz options';
//mod_form.php $string[ 'gameclose'] = 'Close the game';
//mod_form.php $string[ 'gameopen'] = 'Open the game';
//mod_form.php $string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)';
//mod_form.php $string[ 'snakes_cols'] = 'Cols';
//mod_form.php $string[ 'snakes_data'] = 'Positions of Snakes and Ladders';
//mod_form.php $string[ 'snakes_file'] = 'File for background';
//mod_form.php $string[ 'snakes_footerx'] = 'Space at bootom left';
//mod_form.php $string[ 'snakes_footery'] = 'Space at bottom right';
//mod_form.php $string[ 'snakes_headerx'] = 'Space at up left';
//mod_form.php $string[ 'snakes_headery'] = 'Space at up right';
//mod_form.php $string[ 'snakes_layout0'] = 'Question at the top of the image';
//mod_form.php $string[ 'snakes_layout1'] = 'Question at the bottom of the image';
//mod_form.php $string[ 'snakes_rows'] = 'Rows';
//mod_form.php $string[ 'userdefined'] = 'User defined';
//review.php $string[ 'showall'] = 'Show all';
//view.php $string[ 'comment'] = 'Comment';
//view.php $string[ 'gameclosed'] = 'This game closed on {$a}';
//view.php $string[ 'gamecloseson'] = 'This game will close at {$a}';
//view.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}';
//view.php $string[ 'gameopenedon'] = 'This game opened at {$a}';

1101
lib.php

File diff suppressed because it is too large

1896
locallib.php

File diff suppressed because it is too large

638
millionaire/play.php

@ -0,0 +1,638 @@
<?php // $Id: play.php,v 1.31 2012/07/25 11:16:05 bdaloukas Exp $
/**
* This file plays the game millionaire
*
* @author bdaloukas
* @version $Id: play.php,v 1.31 2012/07/25 11:16:05 bdaloukas Exp $
* @package game
**/
function game_millionaire_continue( $id, $game, $attempt, $millionaire, $context)
{
//User must select quiz or question as a source module
if( ($game->quizid == 0) and ($game->questioncategoryid == 0)){
if( $game->sourcemodule == 'quiz')
print_error( get_string( 'millionaire_must_select_quiz', 'game'));
else
print_error( get_string( 'millionaire_must_select_questioncategory', 'game'));
}
if( $attempt != false and $millionaire != false){
//continue an existing game
return game_millionaire_play( $id, $game, $attempt, $millionaire, $context);
}
if( $attempt == false){
$attempt = game_addattempt( $game);
}
$newrec = new stdClass();
$newrec->id = $attempt->id;
$newrec->queryid = 0;
$newrec->level = 0;
$newrec->state = 0;
if( !game_insert_record( 'game_millionaire', $newrec)){
print_error( 'error inserting in game_millionaire');
}
game_millionaire_play( $id, $game, $attempt, $newrec, $context);
}
function game_millionaire_play( $id, $game, $attempt, $millionaire, $context)
{
global $DB;
$buttons = optional_param('buttons', 0, PARAM_INT);
$Help5050_x = optional_param('Help5050_x', 0, PARAM_INT);
$HelpTelephone_x = optional_param('HelpTelephone_x', 0, PARAM_INT);
$HelpPeople_x = optional_param('HelpPeople_x', 0, PARAM_INT);
$Quit_x = optional_param('Quit_x', 0, PARAM_INT);
if( $millionaire->queryid){
$query = $DB->get_record( 'game_queries', array( 'id' => $millionaire->queryid));
}else
{
$query = new StdClass;
}
$found = 0;
for($i=1; $i <= $buttons; $i++){
$name = 'btAnswer'.$i;
$answer = optional_param($name, '', PARAM_RAW);
if (!empty($answer)) {
game_millionaire_OnAnswer( $id, $game, $attempt, $millionaire, $query, $i, $context);
$found = 1;
}
}
if( $found == 1)
;//nothing
else if( !empty($Help5050_x))
game_millionaire_OnHelp5050( $game, $id, $millionaire, $game, $query, $context);
else if( !empty($HelpTelephone_x))
game_millionaire_OnHelpTelephone( $game, $id, $millionaire, $query, $context);
else if( !empty($HelpPeople_x))
game_millionaire_OnHelpPeople( $game, $id, $millionaire, $query, $context);
else if( !empty($Quit_x))
game_millionaire_OnQuit( $id, $game, $attempt, $query, $context);
else
game_millionaire_ShowNextQuestion( $id, $game, $attempt, $millionaire, $context);
}
function game_millionaire_showgrid( $game, $millionaire, $id, $query, $aAnswer, $info, $context)
{
global $OUTPUT;
$question = str_replace( '\"', '"', $query->questiontext);
if( $game->param8 == '')
$color = 408080;
else
$color = substr( '000000'.base_convert($game->param8, 10, 16), -6);
$color1 = 'black';
$color2 = 'DarkOrange';
$colorback="white";
$stylequestion = "background:$colorback;color:$color1";
$stylequestionselected = "background:$colorback;color:$color2";
global $CFG;
$state = $millionaire->state;
$level = $millionaire->level;
$background = "style='background:#$color'";
echo '<form name="Form1" method="post" action="attempt.php" id="Form1">';
echo "<table cellpadding=0 cellspacing=0 border=0>\r\n";
echo "<tr $background>";
echo '<td rowspan='.(17+count( $aAnswer)).'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>';
echo "<td colspan=6>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>";
echo '<td rowspan='.(17+count( $aAnswer)).'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>';
echo "</tr>\r\n";
echo "<tr height=10%>";
echo "<td $background rowspan=3 colspan=2>";
$dirgif = 'millionaire/1/';
if( $state & 1)
{
$gif = "5050x";
$disabled = "disabled=1";
}else
{
$gif = "5050";
$disabled = "";
}
echo '<input type="image" '.$disabled.' name="Help5050" id="Help5050" Title="50 50" src="'.$OUTPUT->pix_url($dirgif.$gif, 'mod_game').'" alt="" border="0">&nbsp;';
if( $state & 2)
{
$gif = "telephonex";
$disabled = "disabled=1";
}else
{
$gif = "telephone";
$disabled = "";
}
echo '<input type="image" name="HelpTelephone" '.$disabled.' id="HelpTelephone" Title="'.get_string( 'millionaire_telephone', 'game').'" src="'.$OUTPUT->pix_url($dirgif.$gif, 'mod_game').'" alt="" border="0">&nbsp;';
if( $state & 4)
{
$gif = "peoplex";
$disabled = "disabled=1";
}else
{
$gif = "people";
$disabled = "";
}
echo '<input type="image" name="HelpPeople" '.$disabled.' id="HelpPeople" Title="'.get_string( 'millionaire_helppeople', 'game').'" src="'.$OUTPUT->pix_url($dirgif.$gif, 'mod_game').'" alt="" border="0">&nbsp;';
echo '<input type="image" name="Quit" id="Quit" Title="'.get_string( 'millionaire_quit', 'game').'" src="'.$OUTPUT->pix_url($dirgif.'x', 'mod_game').'" alt="" border="0">&nbsp;';
echo "\r\n";
echo "</td>\r\n";
$styletext = "";
if( strpos( $question, 'color:') == false and strpos( $question, 'background:') == false){
$styletext = "style='$stylequestion'";
}
$aVal = array( 100, 200, 300, 400, 500, 1000, 1500, 2000, 4000, 5000, 10000, 20000, 40000, 80000, 150000);
for( $i=15; $i >= 1; $i--)
{
$bTR = false;
switch( $i)
{
case 15:
echo "<td rowspan=".(16+count( $aAnswer))." $background>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>\r\n";
$bTR = true;
break;
case 14:
case 13:
echo "<tr>\n";
$bTR = true;
break;
case 12:
$question = game_filterquestion($question, $query->questionid, $context->id, $game->course);
echo "<tr>";
echo "<td rowspan=12 colspan=2 valign=top style=\"$styletext\">$question</td>\r\n";
$bTR = true;
break;
case 11:
case 10:
case 9:
case 8:
case 7:
case 6:
case 5:
case 4:
case 3:
case 2:
case 1:
echo "<tr>";
$bTR = true;
break;
default:
echo "<tr>";
$bTR = true;
}
if( $i == $level+1)
$style = "background:$color1;color:$color2";
else
$style = $stylequestion;
echo "<td style='$style' align=right>$i</td>";
if( $i < $level+1)
echo "<td style='$style'>&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;</td>";
else if( $i == 15 and $level <= 1)
echo "<td style='$style'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>";
else
echo "<td style='$style'></td>";
echo "<td style='$style' align=right>".sprintf( "%10d", $aVal[ $i-1])."</td>\r\n";
if( $bTR)
echo "</tr>\r\n";
}
echo "<tr $background><td colspan=10>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>\r\n";
$bFirst = true;
$letters = get_string( 'lettersall', 'game');
for( $i=1; $i <= count( $aAnswer); $i++)
{
$name = "btAnswer".$i;
$s = textlib::substr( $letters, $i-1, 1);
$disabled = ( $state == 15 ? "disabled=1" : "");
$style = $stylequestion;
if( (strpos( $aAnswer[ $i-1], 'color:') != false) or (strpos( $aAnswer[ $i-1], 'background:') != false)){
$style = '';
}
if( $state == 15 and $i+1 == $query->correct){
$style = $stylequestionselected;
}
$button = '<input style="'.$style.'" '.$disabled.'type="submit" name="'.$name.'" value="'.$s.'" id="'.$name."1\"".
" onmouseover=\"this.style.backgroundColor = '$color2';$name.style.backgroundColor = '$color2';\" ".
" onmouseout=\"this.style.backgroundColor = '$colorback';$name.style.backgroundColor = '$colorback';\" >";
$text = game_filtertext($aAnswer[ $i-1],$game->course);
$answer = "<span id=$name style=\"$style\" ".
" onmouseover=\"this.style.backgroundColor = '$color2';{$name}1.style.backgroundColor = '$color2';\" ".
" onmouseout=\"this.style.backgroundColor = '$colorback';{$name}1.style.backgroundColor = '$colorback';\" >".
$text.'</span>';
if( $aAnswer[ $i-1] != ""){
echo "<tr>\n";
echo "<td style='$stylequestion'> $button</td>\n";
echo "<td $style width=100%> &nbsp; $answer</td>";
if( $bFirst){
$bFirst = false;
$info = game_filtertext($info, $game->course);
echo "<td style=\"$style\" rowspan=".count( $aAnswer)." colspan=3>$info</td>";
}
echo "\r\n</tr>\r\n";
}
}
echo "<tr><td colspan=10 $background>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>\r\n";
echo "<input type=hidden name=state value=\"$state\">\r\n";
echo '<input type=hidden name=id value="'.$id.'">';
echo "<input type=hidden name=buttons value=\"".count( $aAnswer)."\">\r\n";
echo "</table>\r\n";
echo "</form>\r\n";
}
function game_millionaire_ShowNextQuestion( $id, $game, $attempt, $millionaire, $context)
{
game_millionaire_SelectQuestion( $aAnswer, $game, $attempt, $millionaire, $query, $context);
if( $game->toptext != ''){
echo $game->toptext.'<br><br>';
}
game_millionaire_ShowGrid( $game, $millionaire, $id, $query, $aAnswer, "", $context);
if( $game->bottomtext != ''){
echo '<br>'.$game->bottomtext;
}
}
//updates tables: games_millionaire, game_attempts, game_questions
function game_millionaire_SelectQuestion( &$aAnswer, $game, $attempt, &$millionaire, &$query, $context)
{
global $DB, $USER;
if( ($game->sourcemodule != 'quiz') and ($game->sourcemodule != 'question')){
print_error( get_string('millionaire_sourcemodule_must_quiz_question', 'game', get_string( 'modulename', 'quiz')).' '.get_string( 'modulename', $attempt->sourcemodule));
}
if( $millionaire->queryid != 0){
game_millionaire_loadquestions( $game, $millionaire, $query, $aAnswer, $context);
return;
}
if( $game->sourcemodule == 'quiz'){
if( $game->quizid == 0){
print_error( get_string( 'must_select_quiz', 'game'));
}
$select = "qtype='multichoice' AND quiz='$game->quizid' ".
" AND qqi.question=q.id";
$table = "{question} q,{quiz_question_instances} qqi";
}else
{
if( $game->questioncategoryid == 0){
print_error( get_string( 'must_select_questioncategory', 'game'));
}
//include subcategories
$select = 'category='.$game->questioncategoryid;
if( $game->subcategories){
$cats = question_categorylist( $game->questioncategoryid);
if( strpos( $cats, ',') > 0){
$select = 'category in ('.$cats.')';
}
}
$select .= " AND qtype='multichoice'";
$table = '{question} q';
}
$select .= ' AND hidden=0';
if( $game->shuffle or $game->quizid == 0)
$questionid = game_question_selectrandom( $game, $table, $select, 'q.id as id', true);
else
$questionid = game_millionaire_select_serial_question( $game, $table, $select, 'q.id as id', $millionaire->level);
if( $questionid == 0){
print_error( get_string( 'no_questions', 'game'));
}
$q = $DB->get_record( 'question', array( 'id' => $questionid), 'id,questiontext');
$recs = $DB->get_records( 'question_answers', array( 'question' => $questionid));
if( $recs === false){
print_error( get_string( 'no_questions', 'game'));
}
$correct = 0;
$ids = array();
foreach( $recs as $rec){
$aAnswer[] = game_filterquestion_answer(str_replace( '\"', '"', $rec->answer), $rec->id, $context->id, $game->course);
$ids[] = $rec->id;
if( $rec->fraction == 1){
$correct = $rec->id;
}
}
$count = count( $aAnswer);
for($i=1; $i <= $count; $i++){
$sel = mt_rand(0, $count-1);
$temp = array_splice( $aAnswer, $sel, 1);
$aAnswer[ ] = $temp[ 0];
$temp = array_splice( $ids, $sel, 1);
$ids[ ] = $temp[ 0];
}
$query = new StdClass;
$query->attemptid =$attempt->id;
$query->gamekind = $game->gamekind;
$query->gameid = $game->id;
$query->userid = $USER->id;
$query->sourcemodule = $game->sourcemodule;
$query->glossaryentryid = 0;
$query->questionid = $questionid;
$query->questiontext = addslashes( $q->questiontext);
$query->answertext = implode( ',', $ids);
$query->correct = array_search( $correct, $ids) + 1;
if( !$query->id = $DB->insert_record( 'game_queries', $query)){
print_object( $query);
print_error( 'error inserting to game_queries');
}
$updrec = new StdClass;
$updrec->id = $millionaire->id;
$updrec->queryid = $query->id;
if( !$newid = $DB->update_record( 'game_millionaire', $updrec)){
print_error( 'error updating in game_millionaire');
}
$score = $millionaire->level / 15;
game_updateattempts( $game, $attempt, $score, 0);
game_update_queries( $game, $attempt, $query, $score, '');
}
function game_millionaire_select_serial_question( $game, $table, $select, $id_fields="id", $level)
{
global $DB, $USER;
if( $game->sourcemodule == 'quiz')
{
$rec = $DB->get_record( 'quiz', array( 'id' => $game->quizid));
if( $rec === false)
return false;
$questions = $rec->questions;
$questions = explode( ',', $rec->questions);
array_pop( $questions);
}else
{
$sql = "SELECT $id_fields,$id_fields FROM ".$table." WHERE $select ORDER BY q.name";
if( ($recs = $DB->get_records_sql( $sql)) == false)
return false;
$questions = array();
foreach( $recs as $rec)
$questions[] = $rec->id;
}
$count = count( $questions);
if( $count == 0)
return false;
$from = round($level * ($count-1) / 15);
$to = round(max( $from, ($level+1) * ($count-1) / 15))-1;
if( $to < $from)
$to = $from;
$pos = mt_rand( round( $from), round( $to));
return $questions[ $pos];
}
function game_millionaire_loadquestions( $game, $millionaire, &$query, &$aAnswer, $context)
{
global $DB;
$query = $DB->get_record( 'game_queries', array( 'id' => $millionaire->queryid), 'id,questiontext,answertext,correct,questionid');
$aids = explode( ',', $query->answertext);
$aAnswer = array();
foreach( $aids as $id)
{
$rec = $DB->get_record( 'question_answers', array( 'id' => $id), 'id,answer');
$aAnswer[] = game_filterquestion_answer(str_replace( '\"', '"', $rec->answer), $id, $context->id, $game->course);
}
}
//flag 1:5050, 2:telephone 4:people
function game_millionaire_setstate( &$millionaire, $mask)
{
global $DB;
$millionaire->state |= $mask;
$updrec = new stdClass();
$updrec->id = $millionaire->id;
$updrec->state = $millionaire->state;
if( !$DB->update_record( 'game_millionaire', $updrec)){
print_error( 'error updating in game_millionaire');
}
}
function game_millionaire_onhelp5050( $game, $id, &$millionaire, $query, $context)
{
game_millionaire_loadquestions( $game, $millionaire, $query, $aAnswer, $context);
if( ($millionaire->state & 1) != 0)
{
game_millionaire_ShowGrid( $game, $millionaire, $id, $query, $aAnswer, '', $context);
return;
}
game_millionaire_setstate( $millionaire, 1);
$n = count( $aAnswer);
if( $n > 2)
{
for(;;)
{
$wrong = mt_rand( 1, $n);
if( $wrong != $query->correct){
break;
}
}
for( $i=1; $i <= $n; $i++)
{
if( $i <> $wrong and $i <> $query->correct){
$aAnswer[ $i-1] = "";
}
}
}
game_millionaire_showgrid( $game, $millionaire, $id, $query, $aAnswer, '', $context);
}
function game_millionaire_OnHelpTelephone( $game, $id, &$millionaire, $query, $context)
{
game_millionaire_loadquestions( $game, $millionaire, $query, $aAnswer, $context);
if( ($millionaire->state & 2) != 0)
{
game_millionaire_ShowGrid( $game, $millionaire, $id, $query, $aAnswer, '', $context);
return;
}
game_millionaire_setstate( $millionaire, 2);
$n = count( $aAnswer);
if( $n < 2){
$wrong = $correct;
}else
{
for(;;)
{
$wrong = mt_rand( 1, $n);
if( $wrong != $query->correct)
break;
}
}
//with 80% gives the correct answer
if( mt_rand( 1, 10) <= 8)
$response = $query->correct;
else
$response = $wrong;
$info = get_string( 'millionaire_info_telephone','game').'<br><b>'.$aAnswer[ $response-1].'</b>';
game_millionaire_ShowGrid( $game, $millionaire, $id, $query, $aAnswer, $info, $context);
}
function game_millionaire_OnHelpPeople( $game, $id, &$millionaire, $query, $context)
{
game_millionaire_loadquestions( $game, $millionaire, $query, $aAnswer, $context);
if( ($millionaire->state & 4) != 0){
game_millionaire_ShowGrid( $game, $millionaire, $id, $query, $aAnswer, '', $context);
return;
}
game_millionaire_setstate( $millionaire, 4);
$n = count( $aAnswer);
$sum = 0;
$aPercent = array();
for( $i = 0; $i+1 < $n; $i++)
{
$percent = mt_rand( 0, 100-$sum);
$aPercent[ $i] = $percent;
$sum += $percent;
}
$aPercent[ $n-1] = 100 - $sum;
if( mt_rand( 1, 100) <= 80)
{
//with percent 80% sets in the correct answer the biggest percent
$max_pos = 0;
for( $i=1; $i+1 < $n; $i++)
{
if( $aPercent[ $i] >= $aPercent[ $max_pos])
$max_pos = $i;
}
$temp = $aPercent[ $max_pos];
$aPercent[ $max_pos] = $aPercent[ $query->correct-1];
$aPercent[ $query->correct-1] = $temp;
}
$info = '<br>'.get_string( 'millionaire_info_people', 'game').':<br>';
for( $i=0; $i < $n; $i++){
$info .= "<br>". textlib::substr( get_string( 'lettersall', 'game'), $i, 1) ." : ".$aPercent[ $i]. ' %';
}
game_millionaire_ShowGrid( $game, $millionaire, $id, $query, $aAnswer, textlib::substr( $info, 4), $context);
}
function game_millionaire_OnAnswer( $id, $game, $attempt, &$millionaire, $query, $answer, $context)
{
global $DB;
game_millionaire_loadquestions( $game, $millionaire, $query, $aAnswer, $context);
if( $answer == $query->correct)
{
if( $millionaire->level < 15){
$millionaire->level++;
}
$finish = ($millionaire->level == 15 ? 1 : 0);
$scorequestion = 1;
}else
{
$finish = 1;
$scorequestion = 0;
}
$score = $millionaire->level / 15;
game_update_queries( $game, $attempt, $query, $scorequestion, $answer);
game_updateattempts( $game, $attempt, $score, $finish);
$updrec = new stdClass();
$updrec->id = $millionaire->id;
$updrec->level = $millionaire->level;
$updrec->queryid = 0;
if( !$DB->update_record( 'game_millionaire', $updrec)){
print_error( 'error updating in game_millionaire');
}
if( $answer == $query->correct)
{
//correct
if( $finish){
echo get_string( 'win', 'game');
game_millionaire_OnQuit( $id, $game, $attempt, $query);
}else
{
$millionaire->queryid = 0; //so the next function select a new question
game_millionaire_ShowNextQuestion( $id, $game, $attempt, $millionaire, $context);
}
}else
{
//wrong answer
$info = get_string( 'millionaire_info_wrong_answer', 'game').
'<br><br><b><center>'.$aAnswer[ $query->correct-1].'</b>';
$millionaire->state = 15;
game_millionaire_ShowGrid( $game, $millionaire, $id, $query, $aAnswer, $info, $context);
}
}
function game_millionaire_onquit( $id, $game, $attempt, $query)
{
global $CFG, $DB;
game_updateattempts( $game, $attempt, -1, true);
if (! $cm = $DB->get_record( 'course_modules', array( 'id' => $id))) {
print_error( "Course Module ID was incorrect id=$id");
}
echo '<br>';
echo "<a href=\"{$CFG->wwwroot}/mod/game/attempt.php?id=$id\">".get_string( 'nextgame', 'game').'</a> &nbsp; &nbsp; &nbsp; &nbsp; ';
echo "<a href=\"{$CFG->wwwroot}/course/view.php?id=$cm->course\">".get_string( 'finish', 'game').'</a> ';
}

473
mod_form.php

@ -0,0 +1,473 @@
<?php // $Id: mod_form.php,v 1.28 2012/07/26 05:38:58 bdaloukas Exp $
/**
* Form for creating and modifying a game
*
* @package game
* @author Alastair Munro <alastair@catalyst.net.nz>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once ($CFG->dirroot.'/course/moodleform_mod.php');
require( 'locallib.php');
class mod_game_mod_form extends moodleform_mod {
function definition() {
global $CFG, $DB, $COURSE;
$mform =& $this->_form;
$id = $this->_instance;
if(!empty($this->_instance)){
if($g = $DB->get_record('game', array('id' => $id))){
$gamekind = $g->gamekind;
}
else{
print_error('incorrect game');
}
}
else {
$gamekind = required_param('type', PARAM_ALPHA);
}
//Hidden elements
$mform->addElement('hidden', 'gamekind', $gamekind);
$mform->setDefault('gamekind', $gamekind);
$mform->addElement('hidden', 'type', $gamekind);
$mform->setDefault('type', $gamekind);
$mform->addElement('header', 'general', get_string('general', 'form'));
$mform->addElement('text', 'name', 'Name', array('size'=>'64'));
if (!empty($CFG->formatstringstriptags)){
$mform->setType('name', PARAM_TEXT);
}
else{
$mform->setType('name', PARAM_CLEAN);
}
if( !isset( $g))
$mform->setDefault('name', get_string( 'game_'.$gamekind, 'game'));
$mform->addRule('name', null, 'required', null, 'client');
$hasglossary = ($gamekind == 'hangman' || $gamekind == 'cross' || $gamekind == 'cryptex' || $gamekind == 'sudoku' || $gamekind == 'hiddenpicture' || $gamekind == 'snakes');
$questionsourceoptions = array();
if($hasglossary)
$questionsourceoptions['glossary'] = get_string('modulename', 'glossary');
//if( $gamekind != 'snakes' && $gamekind != 'sudoku' &&
// $gamekind != 'hiddenpicture') {
$questionsourceoptions['question'] = get_string('sourcemodule_question', 'game');
//}
if( $gamekind != 'bookquiz')
$questionsourceoptions['quiz'] = get_string('modulename', 'quiz');
$mform->addElement('select', 'sourcemodule', get_string('sourcemodule','game'), $questionsourceoptions);
if($hasglossary){
$a = array();
if($recs = $DB->get_records('glossary', array( 'course' => $COURSE->id), 'id,name')){
foreach($recs as $rec){
$a[$rec->id] = $rec->name;
}
}
$mform->addElement('select', 'glossaryid', get_string('sourcemodule_glossary', 'game'), $a);
$mform->disabledIf('glossaryid', 'sourcemodule', 'neq', 'glossary');
if( count( $a) == 0)
$select = 'glossaryid=-1';
else if( count( $a) == 1)
$select = 'glossaryid='.$rec->id;
else
{
$select = '';
foreach($recs as $rec){
$select .= ','.$rec->id;
}
$select = 'g.id IN ('.substr( $select, 1).')';
}
$select .= ' AND g.id=gc.glossaryid';
$table = "{glossary} g, {glossary_categories} gc";
$a = array();
$a[ ] = '';
$sql = "SELECT gc.id,gc.name,g.name as name2 FROM $table WHERE $select ORDER BY g.name,gc.name";
if($recs = $DB->get_records_sql( $sql)){
foreach($recs as $rec){
$a[$rec->id] = $rec->name2.' -> '.$rec->name;
}
}
$mform->addElement('select', 'glossarycategoryid', get_string('sourcemodule_glossarycategory', 'game'), $a);
$mform->disabledIf('glossarycategoryid', 'sourcemodule', 'neq', 'glossary');
}
//*********************
// Question Category - Short Answer
if( $gamekind != 'bookquiz'){
$context = get_context_instance(50, $COURSE->id);
$select = " contextid in ($context->id)";
$a = array();
if($recs = $DB->get_records_select('question_categories', $select, null, 'id,name')){
foreach($recs as $rec){
$s = $rec->name;
if(($count = $DB->count_records('question', array( 'category' => $rec->id))) != 0){
$s .= " ($count)";
}
$a[$rec->id] = $s;
}
}
$mform->addElement('select', 'questioncategoryid', get_string('sourcemodule_questioncategory', 'game'), $a);
$mform->disabledIf('questioncategoryid', 'sourcemodule', 'neq', 'question');
//subcategories
$mform->addElement('selectyesno', 'subcategories', get_string('sourcemodule_include_subcategories', 'game'));
$mform->disabledIf('subcategories', 'sourcemodule', 'neq', 'question');
}
//***********************
// Quiz Category
if( $gamekind != 'bookquiz'){
$a = array();
if( $recs = $DB->get_records('quiz', array( 'course' => $COURSE->id), 'id,name')){
foreach( $recs as $rec){
$a[$rec->id] = $rec->name;
}
}
$mform->addElement('select', 'quizid', get_string('sourcemodule_quiz', 'game'), $a);
$mform->disabledIf('quizid', 'sourcemodule', 'neq', 'quiz');
}
//***********************
// Book
if($gamekind == 'bookquiz'){
$a = array();
if($recs = $DB->get_records('book', array( 'course' => $COURSE->id), 'id,name')){
foreach($recs as $rec){
$a[$rec->id] = $rec->name;
}
}
$mform->addElement('select', 'bookid', get_string('sourcemodule_book', 'game'), $a);
}
//---------------------------------------------------------------------------
// Grade options
$mform->addElement('header', 'gradeoptions', get_string('grades', 'grades'));
$mform->addElement('text', 'grade', get_string( 'grademax', 'grades'), array('size' => 4));
$mform->setType('grade', PARAM_INT);
$gradingtypeoptions = array();
$gradingtypeoptions[0] = get_string('gradehighest','game');
$gradingtypeoptions[1] = get_string('gradeaverage','game');
$gradingtypeoptions[2] = get_string('attemptfirst','game');
$gradingtypeoptions[3] = get_string('attemptlast','game');
$mform->addElement('select', 'grademethod', get_string('grademethod','game'), $gradingtypeoptions);
// Open and close dates.
$mform->addElement('date_time_selector', 'timeopen', get_string('gameopen', 'game'),
array('optional' => true, 'step' => 1));
$mform->addHelpButton('timeopen', 'quizopenclose', 'quiz');
$mform->addElement('date_time_selector', 'timeclose', get_string('gameclose', 'game'),
array('optional' => true, 'step' => 1));
//---------------------------------------------------------------------------
// Bookquiz options
if($gamekind == 'bookquiz'){
$mform->addElement('header', 'bookquiz', get_string( 'bookquiz_options', 'game'));
$bookquizlayoutoptions = array();
$bookquizlayoutoptions[0] = get_string('bookquiz_layout0', 'game');
$bookquizlayoutoptions[1] = get_string('bookquiz_layout1', 'game');
$mform->addElement('select','param3', get_string('bookquiz_layout', 'game'), $bookquizlayoutoptions);
}
//---------------------------------------------------------------------------
// Hangman options
if($gamekind == 'hangman'){
$mform->addElement('header', 'hangman', get_string( 'hangman_options', 'game'));
$mform->addElement('text', 'param4', get_string('hangman_maxtries', 'game'), array('size' => 4));
$mform->setType('param4', PARAM_INT);
$mform->addElement('selectyesno', 'param1', get_string('hangman_showfirst', 'game'));
$mform->addElement('selectyesno', 'param2', get_string('hangman_showlast', 'game'));
$mform->addElement('selectyesno', 'param7', get_string('hangman_allowspaces','game'));
$mform->addElement('selectyesno', 'param8', get_string('hangman_allowsub', 'game'));
$mform->addElement('text', 'param10', get_string( 'hangman_maximum_number_of_errors', 'game'), array('size' => 4));
$mform->setType('param10', PARAM_INT);
$a = array( 1 => 1);
$mform->addElement('select', 'param3', get_string('hangman_imageset','game'), $a);
$mform->addElement('selectyesno', 'param5', get_string('hangman_showquestion', 'game'));
$mform->setDefault('param5', 1);
$mform->addElement('selectyesno', 'param6', get_string('hangman_showcorrectanswer', 'game'));
$a = array();
$a = get_string_manager()->get_list_of_translations();
$a[ ''] = '----------';
ksort( $a);
$mform->addElement('select', 'language', get_string('hangman_language','game'), $a);
}
//---------------------------------------------------------------------------
// Crossword options
if($gamekind == 'cross'){
$mform->addElement('header', 'cross', get_string( 'cross_options', 'game'));
$mform->addElement('text', 'param1', get_string('cross_maxcols', 'game'));
$mform->setType('param1', PARAM_INT);
$mform->addElement('text', 'param2', get_string('cross_maxwords', 'game'));
$mform->setType('param2', PARAM_INT);
$mform->addElement('selectyesno', 'param7', get_string('hangman_allowspaces','game'));
$crosslayoutoptions = array();
$crosslayoutoptions[0] = get_string('cross_layout0', 'game');
$crosslayoutoptions[1] = get_string('cross_layout1', 'game');
$mform->addElement('select','param3', get_string('cross_layout', 'game'), $crosslayoutoptions);
}
//---------------------------------------------------------------------------
// Cryptex options
if($gamekind == 'cryptex'){
$mform->addElement('header', 'cryptex', get_string( 'cryptex_options', 'game'));
$mform->addElement('text', 'param1', get_string('cryptex_maxcols', 'game'));
$mform->setType('param1', PARAM_INT);
$mform->addElement('text', 'param2', get_string('cryptex_maxwords', 'game'));
$mform->setType('param2', PARAM_INT);
$mform->addElement('selectyesno', 'param7', get_string('hangman_allowspaces','game'));
$mform->addElement('text', 'param8', get_string('cryptex_maxtries','game'));
$mform->setType('param8', PARAM_INT);
}
//---------------------------------------------------------------------------
// Millionaire options
if($gamekind == 'millionaire'){
global $OUTPUT, $PAGE;
$mform->addElement('header', 'millionaire', get_string( 'millionaire_options', 'game'));
$mform->addElement('text', 'param8', get_string('millionaire_background', 'game'));
$mform->setDefault('param8', '#408080');
//$mform->addElement('colorpicker', 'param8', get_string('millionaire_background', 'game'));
//$mform->registerRule('color','regex','/^#([a-fA-F0-9]{6})$/');
//$mform->addRule('config_bgcolor','Enter a valid RGB color - # and then 6 characters','color');
$mform->addElement('selectyesno', 'shuffle', get_string('millionaire_shuffle','game'));
}
//---------------------------------------------------------------------------
// Sudoku options
if($gamekind == 'sudoku'){
$mform->addElement('header', 'sudoku', get_string( 'sudoku_options', 'game'));
$mform->addElement('text', 'param2', get_string('sudoku_maxquestions', 'game'));
}
//---------------------------------------------------------------------------
// Snakes and Ladders options
if($gamekind == 'snakes'){
$mform->addElement('header', 'snakes', get_string( 'snakes_options', 'game'));
$snakesandladdersbackground = array();
if($recs = $DB->get_records( 'game_snakes_database', null, 'id,name')){
foreach( $recs as $rec){
$snakesandladdersbackground[$rec->id] = $rec->name;
}
}
$snakeslayoutoptions = array();
$snakeslayoutoptions[0] = get_string('snakes_layout0', 'game');
$snakeslayoutoptions[1] = get_string('snakes_layout1', 'game');
$mform->addElement('select','param8', get_string('bookquiz_layout', 'game'), $snakeslayoutoptions);
if(count($snakesandladdersbackground) == 0){
require("{$CFG->dirroot}/mod/game/db/importsnakes.php");
if($recs = $DB->get_records('game_snakes_database', null, 'id,name')){
foreach($recs as $rec){
$snakesandladdersbackground[$rec->id] = $rec->name;
}
}
}
$snakesandladdersbackground[ 0] = get_string( 'userdefined', 'game');
ksort( $snakesandladdersbackground);
$mform->addElement('select', 'param3', get_string('snakes_background', 'game'), $snakesandladdersbackground);
//param3 = background
//param4 = itemid for file_storage
//param5 (=1 means dirty file and and have to be computed again)
//param6 = width of autogenerated picture
//param7 = height of autogenerated picture
//param8 = layout
$attachmentoptions = array('subdirs'=>false, 'maxfiles'=>1);
$mform->addElement('filepicker', 'param4', get_string('snakes_file', 'game'), $attachmentoptions);
$mform->disabledIf('param4', 'param3', 'neq', '0');
$mform->addElement('textarea', 'snakes_data', get_string('snakes_data', 'game'), 'rows="2" cols="70"');
$mform->disabledIf('snakes_data', 'param3', 'neq', '0');
$mform->addElement('text', 'snakes_cols', get_string('snakes_cols', 'game'), array('size' => 4));
$mform->disabledIf('snakes_cols', 'param3', 'neq', '0');
$mform->addElement('text', 'snakes_rows', get_string('snakes_rows', 'game'), array('size' => 4));
$mform->disabledIf('snakes_rows', 'param3', 'neq', '0');
$mform->addElement('text', 'snakes_headerx', get_string('snakes_headerx', 'game'), array('size' => 4));
$mform->disabledIf('snakes_headerx', 'param3', 'neq', '0');
$mform->addElement('text', 'snakes_headery', get_string('snakes_headery', 'game'), array('size' => 4));
$mform->disabledIf('snakes_headery', 'param3', 'neq', '0');
$mform->addElement('text', 'snakes_footerx', get_string('snakes_footerx', 'game'), array('size' => 4));
$mform->disabledIf('snakes_footerx', 'param3', 'neq', '0');
$mform->addElement('text', 'snakes_footery', get_string('snakes_footery', 'game'), array('size' => 4));
$mform->disabledIf('snakes_footery', 'param3', 'neq', '0');
$mform->addElement('text', 'snakes_width', get_string('hiddenpicture_width', 'game'), array('size' => 6));
$mform->setType('snakes_width', PARAM_INT);
$mform->addELement('text', 'snakes_height', get_string('hiddenpicture_height', 'game'), array('size' => 6));
$mform->setType('snakes_height', PARAM_INT);
}
//---------------------------------------------------------------------------
// Hidden Picture options
if($gamekind == 'hiddenpicture'){
$mform->addElement('header', 'hiddenpicture', get_string( 'hiddenpicture_options', 'game'));
$mform->addElement('text', 'param1', get_string('hiddenpicture_across', 'game'));
$mform->setType('param1', PARAM_INT);
$mform->setDefault('param1', 3);
$mform->addElement('text', 'param2', get_string('hiddenpicture_down', 'game'));
$mform->setType('param2', PARAM_INT);
$mform->setDefault('param2', 3);
$a = array();
if($recs = $DB->get_records('glossary', array( 'course' => $COURSE->id), 'id,name')){
foreach($recs as $rec){
$cmg = get_coursemodule_from_instance('glossary', $rec->id, $COURSE->id);
$context = get_context_instance(CONTEXT_MODULE, $cmg->id);
if( $DB->record_exists( 'files', array( 'contextid' => $context->id))){
$a[$rec->id] = $rec->name;
}
}
}
$mform->addElement('select', 'glossaryid2', get_string('hiddenpicture_pictureglossary', 'game'), $a);
$mform->addElement('text', 'param4', get_string('hiddenpicture_width', 'game'));
$mform->setType('param4', PARAM_INT);
$mform->setDefault('param4',3);
$mform->addELement('text', 'param5', get_string('hiddenpicture_height', 'game'));
$mform->setType('param5', PARAM_INT);
$mform->setDefault('param5',3);
$mform->addElement('selectyesno', 'param7', get_string('hangman_allowspaces','game'));
}
//---------------------------------------------------------------------------
// Header/Footer options
$mform->addElement('header', 'headerfooteroptions', 'Header/Footer Options');
$mform->addElement('htmleditor', 'toptext', get_string('toptext','game'));
$mform->addElement('htmleditor', 'bottomtext', get_string('bottomtext','game'));
//---------------------------------------------------------------------------
$features = new stdClass;
$this->standard_coursemodule_elements($features);
//---------------------------------------------------------------------------
// buttons
$this->add_action_buttons();
}
function validation($data, $files){
$errors = parent::validation($data, $files);
// Check open and close times are consistent.
if ($data['timeopen'] != 0 && $data['timeclose'] != 0 &&
$data['timeclose'] < $data['timeopen']) {
$errors['timeclose'] = get_string('closebeforeopen', 'quiz');
}
return $errors;
}
function set_data($default_values) {
global $DB;
if( isset( $default_values->type))
{
//Default values for every game.
if( $default_values->type == 'hangman')
{
$default_values->param10 = 6; //maximum number of wrongs
}else if( $default_values->type == 'snakes')
{
$default_values->gamekind = $default_values->type;
$default_values->param3 = 1;
$default_values->questioncategoryid = 0;
}else if( $default_values->type == 'millionaire')
{
$default_values->shuffle = 1;
}
}
if( isset( $default_values->gamekind)){
if( $default_values->gamekind == 'hangman'){
if( $default_values->param10 == 0)
$default_values->param10 = 6;
}else if( $default_values->gamekind == 'millionaire'){
if( isset( $default_values->param8))
$default_values->param8 = '#'.substr( '000000'.strtoupper( dechex( $default_values->param8)),-6);
}
//repair questioncategoryid
$categoryid = $default_values->questioncategoryid;
$contextid = $DB->get_field( 'question_categories', 'contextid', array( 'id' => $categoryid));
$default_values->questioncategoryid = $categoryid.','.$contextid;
if( $default_values->gamekind == 'snakes'){
if( isset( $default_values->param9)){
$a = explode( '#',$default_values->param9);
foreach( $a as $s){
$pos = strpos( $s, ':');
if( $pos){
$name = substr( $s, 0, $pos);
$default_values->$name = substr( $s, $pos+1);
}
}
}
}
}
if( !isset( $default_values->gamekind))
$default_values->gamekind = $default_values->type;
if( $default_values->gamekind == 'snakes'){
if( isset( $default_values->param3)){
$board = $default_values->param3;
if( $board != 0){
$rec = $DB->get_record( 'game_snakes_database', array( 'id' => $board));
$default_values->snakes_data = $rec->data;
$default_values->snakes_cols = $rec->cols;
$default_values->snakes_rows = $rec->rows;
$default_values->snakes_headerx = $rec->headerx;
$default_values->snakes_headery = $rec->headery;
$default_values->snakes_footerx = $rec->footerx;
$default_values->snakes_footery = $rec->footery;
}
}
}
parent::set_data($default_values);
}
}

92
pagelib.php

@ -0,0 +1,92 @@
<?php // $Id: pagelib.php,v 1.5 2012/07/25 11:16:04 bdaloukas Exp $
require_once($CFG->libdir.'/pagelib.php');
require_once($CFG->dirroot.'/course/lib.php'); // needed for some blocks
define('PAGE_GAME_VIEW', 'mod-game-view');
page_map_class( PAGE_GAME_VIEW, 'page_game');
$DEFINEDPAGES = array( PAGE_GAME_VIEW);
/**
* Class that models the behavior of a game
*
* @author Jon Papaioannou
* @package pages
*/
class page_game extends page_generic_activity {
function init_quick($data) {
if(empty($data->pageid)) {
print_error('Cannot quickly initialize page: empty course id');
}
$this->activityname = 'game';
parent::init_quick($data);
}
function print_header($title, $morebreadcrumbs = NULL, $navigation ='') {
global $USER, $CFG;
$this->init_full();
$replacements = array(
'%fullname%' => format_string($this->activityrecord->name)
);
foreach($replacements as $search => $replace) {
$title = str_replace($search, $replace, $title);
}
if($this->courserecord->id == SITEID) {
$breadcrumbs = array();
}
else {
$breadcrumbs = array($this->courserecord->shortname => $CFG->wwwroot.'/course/view.php?id='.$this->courserecord->id);
}
$breadcrumbs[get_string('modulenameplural', 'game')] = $CFG->wwwroot.'/mod/game/index.php?id='.$this->courserecord->id;
$breadcrumbs[format_string($this->activityrecord->name)] = $CFG->wwwroot.'/mod/game/view.php?id='.$this->modulerecord->id;
if(!empty($morebreadcrumbs)) {
$breadcrumbs = array_merge($breadcrumbs, $morebreadcrumbs);
}
/*
$total = count($breadcrumbs);
$current = 1;
$crumbtext = '';
foreach($breadcrumbs as $text => $href) {
if($current++ == $total) {
$crumbtext .= ' '.$text;
}
else {
$crumbtext .= ' <a href="'.$href.'">'.$text.'</a> ->';
}
}
*/
if(empty($morebreadcrumbs) && $this->user_allowed_editing()) {
$buttons = '<table><tr><td>'.
update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'game')).'</td>';
if(!empty($CFG->showblocksonmodpages)) {
$buttons .= '<td><form '.$CFG->frametarget.' method="get" action="view.php">'.
'<div>'.
'<input type="hidden" name="id" value="'.$this->modulerecord->id.'" />'.
'<input type="hidden" name="edit" value="'.($this->user_is_editing()?'off':'on').'" />'.
'<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" />'.
'</div></form></td>';
}
$buttons .= '</tr></table>';
}
else {
$buttons = '&nbsp;';
}
//print_header($title, $this->courserecord->fullname, $crumbtext, '', '', true, $buttons, navmenu($this->courserecord, $this->modulerecord),false,$bodytags);
print_header($title, $this->courserecord->fullname, $navigation);
}
function get_type() {
return PAGE_GAME_VIEW;
}
}
?>

BIN
pix/bookquiz/add.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

BIN
pix/bookquiz/generateimscp.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

BIN
pix/bookquiz/nav_exit.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

BIN
pix/bookquiz/nav_next.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

BIN
pix/bookquiz/nav_prev.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

BIN
pix/bookquiz/nav_prev_dis.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

BIN
pix/bookquiz/nav_sep.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 B

BIN
pix/bookquiz/print_book.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save