Compare commits
6 Commits
master
...
MOODLE_19_
Author | SHA1 | Date |
---|---|---|
ubuntu | 0d2c1cf0ea | 12 years ago |
ubuntu | cd6d6c4837 | 12 years ago |
bdaloukas | 010fed4c6a | 12 years ago |
bdaloukas | 4c55e8c018 | 12 years ago |
bdaloukas | d436dde95a | 12 years ago |
bdaloukas | 7db6b8ea39 | 12 years ago |
@ -0,0 +1,243 @@ |
|||||
|
<?php // $Id: attempt.php,v 1.10.2.6 2012/01/16 21:45:04 bdaloukas Exp $
|
||||
|
/** |
||||
|
* This page prints a particular attempt of game |
||||
|
* |
||||
|
* @author bdaloukas |
||||
|
* @version $Id: attempt.php,v 1.10.2.6 2012/01/16 21:45:04 bdaloukas Exp $ |
||||
|
* @package game |
||||
|
**/ |
||||
|
|
||||
|
require_once("../../config.php"); |
||||
|
require_once("lib.php"); |
||||
|
require_once("locallib.php"); |
||||
|
|
||||
|
// remember the current time as the time any responses were submitted |
||||
|
// (so as to make sure students don't get penalized for slow processing on this page) |
||||
|
$timestamp = time(); |
||||
|
|
||||
|
require_once( "header.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"); |
||||
|
|
||||
|
$currenttab = 'info'; |
||||
|
include('tabs.php'); |
||||
|
|
||||
|
// Now is the right time to check the open and close times. |
||||
|
if (($timestamp < $game->timeopen || ($game->timeclose && $timestamp > $game->timeclose))) { |
||||
|
if (!has_capability('mod/game:manage', $context)) { |
||||
|
if ($timestamp < $game->timeopen) { |
||||
|
$s = get_string("gamenotavailable", "game", userdate($game->timeopen)); |
||||
|
} else { |
||||
|
$s = get_string("gameclosed", "game", userdate($game->timeclose)); |
||||
|
} |
||||
|
error($s, "view.php?id={$cm->id}"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
$forcenew = optional_param('forcenew', false, PARAM_BOOL); // Teacher has requested new preview |
||||
|
|
||||
|
// Hangman params |
||||
|
$newletter = optional_param('newletter', '', PARAM_TEXT); |
||||
|
|
||||
|
// Bookquiz params |
||||
|
$chapterid = optional_param('chapterid', 0, PARAM_INT); |
||||
|
|
||||
|
// Sudoku params |
||||
|
$pos = optional_param('pos', 0, PARAM_INT); |
||||
|
$num = optional_param('num', 0, PARAM_INT); |
||||
|
|
||||
|
// Cryptex (Wordfind) params |
||||
|
$q = optional_param('q', '', PARAM_TEXT); |
||||
|
$answer = optional_param('answer', '', PARAM_TEXT); |
||||
|
|
||||
|
// Crossword params |
||||
|
$get_g = optional_param('g', '', PARAM_TEXT); |
||||
|
|
||||
|
|
||||
|
$endofgame = optional_param('endofgame', 0, PARAM_INT); |
||||
|
$finishattempt = optional_param('finishattempt', 0, PARAM_INT); |
||||
|
|
||||
|
/// Print the main part of the page |
||||
|
switch( $action) |
||||
|
{ |
||||
|
case 'crosscheck': |
||||
|
$attempt = game_getattempt($game, $detail); |
||||
|
$g = game_cross_unpackpuzzle($get_g); |
||||
|
game_cross_continue( $id, $game, $attempt, $detail, $g, $finishattempt); |
||||
|
break; |
||||
|
case 'crossprint': |
||||
|
$attempt = game_getattempt($game, $detail); |
||||
|
game_cross_play($id, $game, $attempt, $detail, '', true, false, false, true); |
||||
|
break; |
||||
|
case 'sudokucheck': //the student tries to answer a question |
||||
|
$attempt = game_getattempt($game, $detail); |
||||
|
game_sudoku_check_questions($id, $game, $attempt, $detail, $finishattempt); |
||||
|
break; |
||||
|
case 'sudokucheckg': //the student tries to guess a glossaryenry |
||||
|
$attempt = game_getattempt($game, $detail); |
||||
|
game_sudoku_check_glossaryentries($id, $game, $attempt, $detail, $endofgame); |
||||
|
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); |
||||
|
break; |
||||
|
case 'cryptexcheck': //the user tries to guess a question |
||||
|
$attempt = game_getattempt($game, $detail); |
||||
|
game_cryptex_check($id, $game, $attempt, $detail, $q, $answer); |
||||
|
break; |
||||
|
case 'bookquizcheck': //the student tries to answer a question |
||||
|
$attempt = game_getattempt($game, $detail); |
||||
|
game_bookquiz_check_questions($id, $game, $attempt, $detail); |
||||
|
break; |
||||
|
case 'snakescheck': //the student tries to answer a question |
||||
|
$attempt = game_getattempt($game, $detail); |
||||
|
game_snakes_check_questions($id, $game, $attempt, $detail); |
||||
|
break; |
||||
|
case 'snakescheckg': //the student tries to answer a question |
||||
|
$attempt = game_getattempt($game, $detail); |
||||
|
game_snakes_check_glossary($id, $game, $attempt, $detail); |
||||
|
break; |
||||
|
case 'hiddenpicturecheck': //the student tries to answer a question |
||||
|
$attempt = game_getattempt($game, $detail); |
||||
|
$finishattempt = optional_param('finishattempt', 0, PARAM_INT); |
||||
|
game_hiddenpicture_check_questions($id, $game, $attempt, $detail, $finishattempt); |
||||
|
break; |
||||
|
case 'hiddenpicturecheckg': //the student tries to guess a glossaryenry |
||||
|
$attempt = game_getattempt($game, $detail); |
||||
|
$endofgame = optional_param('endofgame', 0, PARAM_INT); |
||||
|
game_hiddenpicture_check_mainquestion($id, $game, $attempt, $detail, $endofgame); |
||||
|
break; |
||||
|
case "": |
||||
|
game_create($game, $id, $forcenew, $course); |
||||
|
break; |
||||
|
default: |
||||
|
error('Not found action='.$action); |
||||
|
} |
||||
|
/// Finish the page |
||||
|
print_footer($course); |
||||
|
|
||||
|
|
||||
|
function game_create($game, $id, $forcenew, $course){ |
||||
|
global $USER, $CFG; |
||||
|
|
||||
|
$attempt = game_getattempt($game, $detail); |
||||
|
|
||||
|
switch($game->gamekind){ |
||||
|
case 'cross': |
||||
|
game_cross_continue($id, $game, $attempt, $detail, '', $forcenew); |
||||
|
break; |
||||
|
case 'hangman': |
||||
|
$action2 = optional_param('action2', '', PARAM_TEXT); |
||||
|
$newletter = optional_param('newletter', '', PARAM_TEXT); |
||||
|
game_hangman_continue($id, $game, $attempt, $detail, $newletter, $action2); |
||||
|
break; |
||||
|
case 'millionaire': |
||||
|
game_millionaire_continue($id, $game, $attempt, $detail); |
||||
|
break; |
||||
|
case 'bookquiz': |
||||
|
$chapterid = optional_param('chapterid', 0, PARAM_INT); |
||||
|
game_bookquiz_continue($id, $game, $attempt, $detail, $chapterid); |
||||
|
break; |
||||
|
case 'sudoku': |
||||
|
game_sudoku_continue($id, $game, $attempt, $detail); |
||||
|
break; |
||||
|
case 'cryptex': |
||||
|
game_cryptex_continue($id, $game, $attempt, $detail, $forcenew); |
||||
|
break; |
||||
|
case 'snakes': |
||||
|
game_snakes_continue($id, $game, $attempt, $detail); |
||||
|
break; |
||||
|
case 'hiddenpicture': |
||||
|
game_hiddenpicture_continue($id, $game, $attempt, $detail); |
||||
|
break; |
||||
|
case 'contest': |
||||
|
require( 'contest/play.php'); |
||||
|
$entryid = optional_param('entryid', 0, PARAM_INT); |
||||
|
game_contest_continue($id, $game, $attempt, $detail, $entryid); |
||||
|
break; |
||||
|
default: |
||||
|
error("Game {$game->gamekind} not found"); |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//inserts a record to game_attempts |
||||
|
function game_addattempt($game){ |
||||
|
global $CFG, $USER; |
||||
|
|
||||
|
$newrec->gamekind = $game->gamekind; |
||||
|
$newrec->gameid = $game->id; |
||||
|
$newrec->userid = $USER->id; |
||||
|
$newrec->timestart = time(); |
||||
|
$newrec->timefinish = 0; |
||||
|
$newrec->timelastattempt = 0; |
||||
|
$newrec->preview = 0; |
||||
|
$newrec->attempt = get_field( 'game_attempts', 'max(attempt)', 'gameid', $game->id, 'userid', $USER->id) + 1; |
||||
|
$newrec->score = 0; |
||||
|
|
||||
|
if (!($newid = insert_record( 'game_attempts', $newrec))){ |
||||
|
error("Insert game_attempts: new rec not inserted"); |
||||
|
} |
||||
|
|
||||
|
if($USER->username == 'guest'){ |
||||
|
$key = 'mod/game:instanceid'.$game->id; |
||||
|
$_SESSION[ $key] = $newid; |
||||
|
} |
||||
|
|
||||
|
return get_record_select('game_attempts', 'id='.$newid); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
function game_cross_unpackpuzzle($g){ |
||||
|
$ret = ""; |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$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; |
||||
|
} |
@ -0,0 +1,281 @@ |
|||||
|
<?php //$Id: backuplib.php,v 1.6.2.2 2010/07/24 03:30:21 arborrow Exp $
|
||||
|
//This php script contains all the stuff to backup games |
||||
|
|
||||
|
//This version uses only the table game |
||||
|
//This is the "graphical" structure of the game mod: |
||||
|
//To see, put your terminal to 160cc |
||||
|
|
||||
|
// |
||||
|
// game |
||||
|
// (CL,pk->id) |
||||
|
// | |
||||
|
// Meaning: pk->primary key field of the table |
||||
|
// fk->foreign key to link with parent |
||||
|
// nt->nested field (recursive data) |
||||
|
// SL->site level info |
||||
|
// CL->course level info |
||||
|
// UL->user level info |
||||
|
// files->table may have files |
||||
|
// |
||||
|
//----------------------------------------------------------- |
||||
|
|
||||
|
// When we backup a game we also need to backup the questions and possibly |
||||
|
// the data about student interaction with the questions. The functions to do |
||||
|
// that are included with the following library |
||||
|
|
||||
|
/* |
||||
|
* Insert necessary category ids to backup_ids table. Called during backup_check.html |
||||
|
*/ |
||||
|
function game_insert_category_and_question_ids($course, $backup_unique_code, $instances = null) { |
||||
|
global $CFG; |
||||
|
|
||||
|
// Insert categories used by games |
||||
|
$sql = "SELECT DISTINCT g.questioncategoryid as id |
||||
|
FROM {$CFG->prefix}game g |
||||
|
WHERE g.course=$course"; |
||||
|
if( ($recs = get_records_sql( $sql)) == false){ |
||||
|
return true; |
||||
|
} |
||||
|
$status = true; |
||||
|
$table = 'question_categories'; |
||||
|
foreach( $recs as $rec){ |
||||
|
if( $rec->id == 0){ |
||||
|
continue; |
||||
|
} |
||||
|
|
||||
|
$select = "backup_code='$backup_unique_code' AND table_name='$table' AND old_id = '$rec->id'"; |
||||
|
if( ($found = get_record_select( 'backup_ids', $select)) != false){ |
||||
|
continue; |
||||
|
} |
||||
|
|
||||
|
unset( $newrec); |
||||
|
$newrec->backup_code = $backup_unique_code; |
||||
|
$newrec->table_name = $table; |
||||
|
$newrec->old_id = $rec->id; |
||||
|
$newrec->info = ''; |
||||
|
if (!insert_record( 'backup_ids', $newrec)){ |
||||
|
print_object( $newrec); |
||||
|
error("game_insert_category_and_question_ids: Can't insert to backup_ids"); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
return $status; |
||||
|
} |
||||
|
|
||||
|
function game_insert_glossaries_ids($course, $backup_unique_code, $instances = null) { |
||||
|
global $CFG; |
||||
|
|
||||
|
// Insert categories used by games |
||||
|
$status = execute_sql("INSERT INTO {$CFG->prefix}backup_ids |
||||
|
(backup_code, table_name, old_id, info) |
||||
|
SELECT DISTINCT $backup_unique_code, 'glossary', g.glossaryid, '' |
||||
|
FROM {$CFG->prefix}game g |
||||
|
WHERE g.course=$course", false); |
||||
|
|
||||
|
return $status; |
||||
|
} |
||||
|
|
||||
|
//STEP 2. Backup games and associated structures |
||||
|
// (course dependent) |
||||
|
|
||||
|
function game_backup_one_mod($bf,$preferences,$game) { |
||||
|
global $CFG; |
||||
|
|
||||
|
$status = true; |
||||
|
|
||||
|
if (is_numeric($game)) { |
||||
|
$game = get_record('game','id',$game); |
||||
|
} |
||||
|
|
||||
|
//Start mod |
||||
|
fwrite ($bf,start_tag("MOD",3,true)); |
||||
|
|
||||
|
//Print game data |
||||
|
$game->modtype = 'game'; |
||||
|
|
||||
|
game_backup_record( $bf, $game, 4); |
||||
|
|
||||
|
$recs = get_records_select( 'game_snakes_database'); |
||||
|
game_backup_table( $bf, $recs, 'GAME_SNAKES_DATABASE',5, 'GAME_SNAKES_DATABASE_RECORD', 6); |
||||
|
|
||||
|
$recs = get_records_select( 'game_bookquiz_questions', "gameid=$game->id"); |
||||
|
game_backup_table( $bf, $recs, 'GAME_BOOKQUIZ_QUESTIONS',5, 'GAME_BOOKQUIZ_QUESTION', 6); |
||||
|
|
||||
|
$recs = get_records_select( 'game_grades', "gameid=$game->id"); |
||||
|
game_backup_table( $bf, $recs, 'GAME_GRADES',5, 'GAME_GRADE', 6); |
||||
|
|
||||
|
$recs = get_records_select( 'game_export_html', "id=$game->id"); |
||||
|
game_backup_table( $bf, $recs, 'GAME_GRADES',5, 'GAME_GRADE', 6); |
||||
|
|
||||
|
$recs = get_records_select( 'game_export_javame', "id=$game->id"); |
||||
|
game_backup_table( $bf, $recs, 'GAME_GRADES',5, 'GAME_GRADE', 6); |
||||
|
|
||||
|
$sql = "SELECT DISTINCT g.questioncategoryid as id,qc.stamp FROM ". |
||||
|
" {$CFG->prefix}game g,{$CFG->prefix}question_categories qc ". |
||||
|
" WHERE g.questioncategoryid = qc.id"; |
||||
|
$recs = get_records_sql( $sql); |
||||
|
game_backup_table( $bf, $recs, 'QUESTION_CATEGORIES',5, 'QUESTION_CATEGORY', 6); |
||||
|
|
||||
|
game_backup_attempts( $bf,$preferences,$game->id); |
||||
|
|
||||
|
//End mod |
||||
|
$status = fwrite ($bf,end_tag("MOD",3,true)); |
||||
|
|
||||
|
return $status; |
||||
|
} |
||||
|
|
||||
|
function game_backup_table( $bf,$recs, $tags, $levels, $tag, $level) |
||||
|
{ |
||||
|
$status = true; |
||||
|
|
||||
|
//If there are records |
||||
|
if ($recs != false) { |
||||
|
//Write start tag |
||||
|
$status = fwrite ($bf,start_tag( $tags, $levels, true)); |
||||
|
//Iterate over each attempt |
||||
|
foreach ($recs as $rec) { |
||||
|
//Start game_snakes_database |
||||
|
$status = fwrite ($bf, start_tag( $tag, $level, true)); |
||||
|
game_backup_record( $bf, $rec, $level); |
||||
|
$status = fwrite ($bf, end_tag( $tag, $level, true)); |
||||
|
} |
||||
|
|
||||
|
$status = fwrite ($bf,end_tag( $tags, $levels, true)); |
||||
|
} |
||||
|
|
||||
|
return $status; |
||||
|
} |
||||
|
|
||||
|
function game_backup_record( $bf, $rec, $level){ |
||||
|
foreach( $rec as $field => $value){ |
||||
|
fwrite ($bf,full_tag( strtoupper( $field), $level, false, $rec->$field)); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function game_backup_attempts( $bf,$preferences,$gameid) |
||||
|
{ |
||||
|
$status = true; |
||||
|
|
||||
|
$attempts = get_records("game_attempts","gameid",$gameid,"id"); |
||||
|
//If there are attempts |
||||
|
if ($attempts) { |
||||
|
//Write start tag |
||||
|
$status = fwrite ($bf,start_tag("GAME_ATTEMPTS",5,true)); |
||||
|
//Iterate over each attempt |
||||
|
foreach ($attempts as $attempt) { |
||||
|
//Start game_attempt |
||||
|
$status = fwrite ($bf,start_tag("GAME_ATTEMPT",6,true)); |
||||
|
game_backup_record( $bf, $attempt, 7); |
||||
|
|
||||
|
////////////game_queries |
||||
|
$queries = get_records("game_queries","attemptid",$attempt->id,"id"); |
||||
|
if( $queries != false){ |
||||
|
//Write start tag |
||||
|
$status = fwrite ($bf,start_tag("GAME_QUERIES",8,true)); |
||||
|
foreach ($queries as $query) { |
||||
|
//Start game_query |
||||
|
$status = fwrite ($bf,start_tag("GAME_QUERY",9,true)); |
||||
|
game_backup_record( $bf, $query, 10); |
||||
|
$status = fwrite ($bf,end_tag("GAME_QUERY",9,true)); |
||||
|
} |
||||
|
$status = fwrite ($bf,end_tag("GAME_QUERIES",8,true)); |
||||
|
} |
||||
|
|
||||
|
$names = array( 'game_hangman', 'game_cross', 'game_cryptex', 'game_millionaire', 'game_sudoku', 'game_snakes', 'game_hiddenpicture'); |
||||
|
game_backup_game( $bf, $attempt->id, $names); |
||||
|
|
||||
|
//End question instance |
||||
|
$status = fwrite ($bf,end_tag("GAME_ATTEMPT",6,true)); |
||||
|
} |
||||
|
//Write end tag |
||||
|
$status = fwrite ($bf,end_tag("GAME_ATTEMPTS",5,true)); |
||||
|
} |
||||
|
return $status; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
function game_backup_game( $bf, $attemptid, $names) |
||||
|
{ |
||||
|
foreach( $names as $name){ |
||||
|
if( ($rec = get_record_select( $name, "id=$attemptid")) == false){ |
||||
|
continue; |
||||
|
} |
||||
|
|
||||
|
$uppername = strtoupper( $name); |
||||
|
$status = fwrite ($bf,start_tag( $uppername,7,true)); |
||||
|
game_backup_record( $bf, $rec, 8); |
||||
|
$status = fwrite ($bf,end_tag( $uppername,7,true)); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function game_backup_mods($bf,$preferences) { |
||||
|
|
||||
|
global $CFG; |
||||
|
|
||||
|
$status = true; |
||||
|
|
||||
|
//Iterate over game table |
||||
|
$games = get_records ("game","course",$preferences->backup_course,"id"); |
||||
|
if ($games) { |
||||
|
foreach ($games as $game) { |
||||
|
if (backup_mod_selected($preferences,'game',$game->id)) { |
||||
|
$status = game_backup_one_mod( $bf,$preferences,$game); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
return $status; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
////Return an array of info (name,value) |
||||
|
/// $instances is an array with key = instanceid, value = object (name,id,userdata) |
||||
|
function game_check_backup_mods($course,$user_data= false,$backup_unique_code,$instances=null) { |
||||
|
//this function selects all the questions / categories to be backed up. |
||||
|
game_insert_category_and_question_ids($course, $backup_unique_code, $instances); |
||||
|
game_insert_glossaries_ids($course, $backup_unique_code, $instances); |
||||
|
|
||||
|
if (!empty($instances) && is_array($instances) && count($instances)) { |
||||
|
$info = array(); |
||||
|
foreach ($instances as $id => $instance) { |
||||
|
$info += game_check_backup_mods_instances($instance,$backup_unique_code); |
||||
|
} |
||||
|
return $info; |
||||
|
} |
||||
|
|
||||
|
//First the course data |
||||
|
$info[0][0] = get_string("modulenameplural","game"); |
||||
|
if ($ids = game_ids ($course)) { |
||||
|
$info[0][1] = count($ids); |
||||
|
} else { |
||||
|
$info[0][1] = 0; |
||||
|
} |
||||
|
|
||||
|
return $info; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
function game_check_backup_mods_instances($instance,$backup_unique_code) { |
||||
|
// the keys in this array need to be unique as they get merged... |
||||
|
$info[$instance->id.'0'][0] = '<b>'.$instance->name.'</b>'; |
||||
|
$info[$instance->id.'0'][1] = ''; |
||||
|
|
||||
|
|
||||
|
return $info; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
// INTERNAL FUNCTIONS. BASED IN THE MOD STRUCTURE |
||||
|
|
||||
|
//Returns an array of quiz id |
||||
|
function game_ids ($course) { |
||||
|
|
||||
|
global $CFG; |
||||
|
|
||||
|
return get_records_sql ("SELECT a.id, a.course |
||||
|
FROM {$CFG->prefix}game a |
||||
|
WHERE a.course = '$course'"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
?> |
@ -0,0 +1,779 @@ |
|||||
|
<?php // $Id: importodt.php,v 1.2.2.3 2010/08/13 06:29:59 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.2.2.3 2010/08/13 06:29:59 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); |
||||
|
$bookid = $game->bookid; |
||||
|
if( $bookid == 0){ |
||||
|
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 |
||||
|
$subchapter = optional_param('subchapter', 0, PARAM_BOOL); |
||||
|
$overwrite = optional_param('overwrite', 0, PARAM_BOOL); |
||||
|
if( $overwrite){ |
||||
|
game_bookquiz_deletebook( $course->id, $bookid); |
||||
|
} |
||||
|
$pageobjects = extract_data( $course->id, 'game', $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 |
||||
|
error("could not save"); |
||||
|
} |
||||
|
}else |
||||
|
error('could not get data'); |
||||
|
|
||||
|
print_continue("$CFG->wwwroot/mod/game/view.php?id=$cm->id"); |
||||
|
print_footer($course); |
||||
|
exit; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/// Print upload form |
||||
|
|
||||
|
print_heading_with_help( get_string( "bookquiz_import_odt", "game"), "importodt", "game"); |
||||
|
|
||||
|
print_simple_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> </td><td> |
||||
|
<input type="submit" name="save" value="<?php echo get_string("uploadthisfile"); ?>" /> |
||||
|
</td></tr> |
||||
|
|
||||
|
</table> |
||||
|
</form> |
||||
|
<?php |
||||
|
print_simple_box_end(); |
||||
|
|
||||
|
print_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);print_r($positions); |
||||
|
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; |
||||
|
}print_r($r_texts); |
||||
|
} |
||||
|
|
||||
|
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); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
Creates objects an chapter object that is to be inserted into the database |
||||
|
*/ |
||||
|
|
||||
|
function game_bookquiz_create_objects( $pageobjects, $bookid) |
||||
|
{ |
||||
|
$chapters = array(); |
||||
|
|
||||
|
$lastpagenum = get_field('book_chapters', 'MAX(pagenum) as num', '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(' ', '', $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) |
||||
|
{ |
||||
|
// nothing fancy, just save them all in order |
||||
|
foreach ($chapters as $chapter) |
||||
|
{ |
||||
|
if (!$newid=insert_record('book_chapters', $chapter)) { |
||||
|
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_deletebook( $courseid, $bookid) |
||||
|
{ |
||||
|
global $CFG; |
||||
|
|
||||
|
if( !delete_records( 'book_chapters', 'bookid', $bookid)){ |
||||
|
error( "Can't delete records from mdl_book_chapters bookid=$bookid"); |
||||
|
} |
||||
|
|
||||
|
remove_dir( "$CFG->dataroot/$courseid/moddata/game/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; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,469 @@ |
|||||
|
<?php // $Id: importppt.php,v 1.1.2.2 2010/07/24 02:46:16 arborrow 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.1.2.2 2010/07/24 02:46:16 arborrow 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)) { |
||||
|
error("Course Module ID was incorrect"); |
||||
|
} |
||||
|
|
||||
|
if (! $course = get_record("course", "id", $cm->course)) { |
||||
|
error("Course is misconfigured"); |
||||
|
} |
||||
|
|
||||
|
// allows for adaption for multiple modules |
||||
|
if(! $modname = get_field('modules', 'name', 'id', $cm->module)) { |
||||
|
error("Could not find module name"); |
||||
|
} |
||||
|
|
||||
|
if (! $mod = get_record($modname, "id", $cm->instance)) { |
||||
|
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"); |
||||
|
|
||||
|
print_header_simple("$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 |
||||
|
error("could not save"); |
||||
|
} |
||||
|
} else { |
||||
|
error('could not get data'); |
||||
|
} |
||||
|
|
||||
|
echo "<hr>"; |
||||
|
print_continue("$CFG->wwwroot/mod/$modname/view.php?id=$cm->id"); |
||||
|
print_footer($course); |
||||
|
exit; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/// Print upload form |
||||
|
|
||||
|
print_heading_with_help($strimportppt, "importppt", "lesson"); |
||||
|
|
||||
|
print_simple_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> </td><td>"; |
||||
|
echo "<input type=\"submit\" name=\"save\" value=\"".get_string("uploadthisfile")."\" />"; |
||||
|
echo "</td></tr>"; |
||||
|
|
||||
|
echo "</table>"; |
||||
|
echo "</form>"; |
||||
|
print_simple_box_end(); |
||||
|
|
||||
|
print_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] != ' ') { // 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)) { |
||||
|
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, '<') and strpos($string, '<') == 0) { // look for the < 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 != ' ') { |
||||
|
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 = count_records('book_chapters', '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(' ', '', $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') { |
||||
|
// nothing fancy, just save them all in order |
||||
|
foreach ($chapters as $chapter) { |
||||
|
if (!$chapter->id = insert_record('book_chapters', $chapter)) { |
||||
|
error('Could not update your book'); |
||||
|
} |
||||
|
} |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
?> |
After Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 803 B |
After Width: | Height: | Size: 248 B |
After Width: | Height: | Size: 246 B |
After Width: | Height: | Size: 247 B |
After Width: | Height: | Size: 209 B |
After Width: | Height: | Size: 41 B |
After Width: | Height: | Size: 204 B |
After Width: | Height: | Size: 158 B |
@ -0,0 +1,398 @@ |
|||||
|
<?php // $Id: play.php,v 1.4.2.4 2010/08/13 06:29:59 bdaloukas Exp $
|
||||
|
|
||||
|
// This files plays the game "Book with Questions" |
||||
|
|
||||
|
function game_bookquiz_continue( $id, $game, $attempt, $bookquiz, $chapterid=0) |
||||
|
{ |
||||
|
if( $attempt != false and $bookquiz != false){ |
||||
|
return game_bookquiz_play( $id, $game, $attempt, $bookquiz, $chapterid); |
||||
|
} |
||||
|
|
||||
|
if( $attempt == false){ |
||||
|
$attempt = game_addattempt( $game); |
||||
|
} |
||||
|
|
||||
|
unset($bookquiz); |
||||
|
$bookquiz->lastchapterid = 0; |
||||
|
$bookquiz->id = $attempt->id; |
||||
|
$bookquiz->bookid = $game->bookid; |
||||
|
|
||||
|
if( !game_insert_record('game_bookquiz', $bookquiz)){ |
||||
|
error( 'game_bookquiz_continue: error inserting in game_bookquiz'); |
||||
|
} |
||||
|
|
||||
|
return game_bookquiz_play( $id, $game, $attempt, $bookquiz, 0); |
||||
|
} |
||||
|
|
||||
|
function game_bookquiz_play( $id, $game, $attempt, $bookquiz, $chapterid) |
||||
|
{ |
||||
|
if( $bookquiz->lastchapterid == 0){ |
||||
|
game_bookquiz_play_computelastchapter( $game, $bookquiz); |
||||
|
|
||||
|
if( $bookquiz->lastchapterid == 0){ |
||||
|
error( get_string( 'bookquiz_empty', 'game')); |
||||
|
} |
||||
|
} |
||||
|
if( $chapterid == 0){ |
||||
|
$chapterid = $bookquiz->lastchapterid; |
||||
|
}else |
||||
|
{ |
||||
|
if( (set_field( 'game_bookquiz', 'lastchapterid', $chapterid, 'id', $bookquiz->id)) == false){ |
||||
|
error( "Can't update table game_bookquiz with lastchapterid to $chapterid"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$book = get_record_select( 'book', 'id='.$game->bookid); |
||||
|
if( !$chapter = get_record_select( 'book_chapters', 'id='.$chapterid)){ |
||||
|
error('Error reading book chapters.'); |
||||
|
} |
||||
|
$select = "bookid = $game->bookid AND hidden = 0"; |
||||
|
$chapters = get_records_select('book_chapters', $select, 'pagenum', 'id, pagenum, subchapter, title, hidden'); |
||||
|
|
||||
|
$okchapters = array(); |
||||
|
if( ($recs = get_records_select( 'game_bookquiz_chapters', "attemptid=$attempt->id")) != false){ |
||||
|
foreach( $recs as $rec){ |
||||
|
//1 means correct answer |
||||
|
$okchapters[ $rec->chapterid] = 1; |
||||
|
} |
||||
|
} |
||||
|
//2 means current |
||||
|
//$okchapters[ $chapterid] = 2; |
||||
|
$showquestions = false; |
||||
|
$select = "gameid=$game->id AND chapterid=$chapterid"; |
||||
|
if( ($questions = get_records_select( 'game_bookquiz_questions', $select)) === false){ |
||||
|
if( !array_key_exists( $chapterid, $okchapters)){ |
||||
|
$okchapters[ $chapterid] = 1; |
||||
|
unset( $newrec); |
||||
|
$newrec->attemptid = $attempt->id; |
||||
|
$newrec->chapterid = $chapterid; |
||||
|
|
||||
|
if( !insert_record( 'game_bookquiz_chapters', $newrec)){ |
||||
|
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="bookquiz/pix/nav_prev.gif" class="bigicon" alt="'.get_string('navprev', 'book').'"/></a>'; |
||||
|
} else { |
||||
|
$chnavigation .= '<img src="pix/nav_prev_dis.gif" class="bigicon" alt="" />'; |
||||
|
} |
||||
|
|
||||
|
$nextbutton = ''; |
||||
|
if ($nextid) { |
||||
|
if( !$showquestions){ |
||||
|
$chnavigation .= '<a title="'.get_string('navnext', 'book').'" href="attempt.php?id='.$id.'&chapterid='.$nextid.'"><img src="bookquiz/pix/nav_next.gif" 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 (! $cm = get_record("course_modules", "id", $id)) { |
||||
|
error("Course Module ID was incorrect id=$id"); |
||||
|
} |
||||
|
if ($section = get_record('course_sections', 'id', $cm->section)) { |
||||
|
$sec = $section->section; |
||||
|
} |
||||
|
|
||||
|
$chnavigation .= '<a title="'.get_string('navexit', 'book').'" href="../../course/attempt.php?id='.$game->course.'"><img src="bookquiz/pix/nav_exit.gif" class="bigicon" alt="'.get_string('navexit', 'book').'" /></a>'; |
||||
|
} |
||||
|
|
||||
|
require( 'toc.php'); |
||||
|
$tocwidth = '10%'; |
||||
|
|
||||
|
?> |
||||
|
<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 |
||||
|
print_box_start('generalbox'); |
||||
|
echo $toc; |
||||
|
print_box_end(); |
||||
|
?> |
||||
|
</td> |
||||
|
<td valign="top" align="left"> |
||||
|
<?php |
||||
|
print_box_start('generalbox'); |
||||
|
$content = ''; |
||||
|
if (!$book->customtitles) { |
||||
|
if ($currsubtitle == ' ') { |
||||
|
$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>'; |
||||
|
print_box_end(); |
||||
|
/// lower navigation |
||||
|
echo '<p align="right">'.$chnavigation.'</p>'; |
||||
|
?> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
|
||||
|
<?php |
||||
|
if( $showquestions){ |
||||
|
game_bookquiz_showquestions( $id, $questionid, $chapter->id, $nextid, $scoreattempt, $game); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function game_bookquiz_play_computelastchapter( $game, &$bookquiz) |
||||
|
{ |
||||
|
$pagenum = get_field( 'book_chapters', 'min(pagenum) as p', 'bookid', $game->bookid); |
||||
|
if( $pagenum){ |
||||
|
$bookquiz->lastchapterid = get_field( 'book_chapters', 'id', 'bookid', $game->bookid, 'pagenum', $pagenum); |
||||
|
|
||||
|
if( $bookquiz->lastchapterid){ |
||||
|
//update the data in table game_bookquiz |
||||
|
if( (set_field( 'game_bookquiz', 'lastchapterid', $bookquiz->lastchapterid, 'id', $bookquiz->id)) == false){ |
||||
|
error( "Can't update table game_bookquiz with lastchapterid to $bookquiz->lastchapterid"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function game_bookquiz_showquestions( $id, $questionid, $chapterid, $nextchapterid, $scoreattempt, $game) |
||||
|
{ |
||||
|
$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) { |
||||
|
|
||||
|
global $QTYPES; |
||||
|
|
||||
|
unset( $cmoptions); |
||||
|
$cmoptions->course = $game->course; |
||||
|
$cmoptions->optionflags->optionflags = 0; |
||||
|
$cmoptions->id = 0; |
||||
|
$cmoptions->shuffleanswers = 1; |
||||
|
|
||||
|
$attempt = 0; |
||||
|
if (!$QTYPES[$question->qtype]->create_session_and_responses( $question, $state, $cmoptions, $attempt)) { |
||||
|
error( 'game_bookquiz_showquestions: problem'); |
||||
|
} |
||||
|
|
||||
|
$state->last_graded = new StdClass; |
||||
|
$state->last_graded->event = QUESTION_EVENTOPEN; |
||||
|
$state->event = QUESTION_EVENTOPEN; |
||||
|
$options->scores->score = 0; |
||||
|
$question->maxgrade = 100; |
||||
|
$state->manualcomment = ''; |
||||
|
$cmoptions->optionflags = 0; |
||||
|
$options->correct_responses = 0; |
||||
|
$options->feedback = 0; |
||||
|
$options->readonly = 0; |
||||
|
|
||||
|
if( $showsolution){ |
||||
|
$state->responses = $QTYPES[$question->qtype]->get_correct_responses($question, $state); |
||||
|
} |
||||
|
|
||||
|
$number++; |
||||
|
print_question($question, $state, $number, $cmoptions, $options); |
||||
|
} |
||||
|
|
||||
|
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) |
||||
|
{ |
||||
|
$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 = get_records_select( 'question', $select, '', '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) |
||||
|
{ |
||||
|
global $QTYPES, $CFG, $USER; |
||||
|
|
||||
|
$responses = data_submitted(); |
||||
|
|
||||
|
$questionlist = $responses->questionids; |
||||
|
|
||||
|
$questions = game_sudoku_getquestions( $questionlist); |
||||
|
|
||||
|
$actions = question_extract_responses($questions, $responses, QUESTION_EVENTSUBMIT); |
||||
|
|
||||
|
$scorequestion = 0; |
||||
|
$scoreattempt = 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); |
||||
|
if( $state->raw_grade < 50){ |
||||
|
continue; |
||||
|
} |
||||
|
|
||||
|
//found one correct answer |
||||
|
$chapterid = $responses->chapterid; |
||||
|
if( !get_field( 'game_bookquiz_chapters', 'id', 'attemptid', $attempt->id, 'chapterid', $chapterid)) |
||||
|
{ |
||||
|
unset( $newrec); |
||||
|
$newrec->attemptid = $attempt->id; |
||||
|
$newrec->chapterid = $chapterid; |
||||
|
if( !insert_record( 'game_bookquiz_chapters', $newrec, false)){ |
||||
|
print_object( $newrec); |
||||
|
error( "Can't insert to table game_bookquiz_chapters"); |
||||
|
} |
||||
|
} |
||||
|
//Have to go to next page. |
||||
|
$bookquiz->lastchapterid = $responses->nextchapterid; |
||||
|
if( !set_field( 'game_bookquiz', 'lastchapterid', $bookquiz->lastchapterid, 'id', $bookquiz->id)){ |
||||
|
error( "Can't compute next chapter"); |
||||
|
} |
||||
|
$scorequestion = 1; |
||||
|
$scoreattempt = required_param('scoreattempt', PARAM_INT); |
||||
|
|
||||
|
break; |
||||
|
} |
||||
|
|
||||
|
$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); |
||||
|
} |
||||
|
|
||||
|
?> |
@ -0,0 +1,193 @@ |
|||||
|
<?php // $Id: questions.php,v 1.2.2.6 2011/07/27 18:55:47 bdaloukas Exp $
|
||||
|
/** |
||||
|
* The script plays the game "Book with questions |
||||
|
* |
||||
|
* @version $Id: questions.php,v 1.2.2.6 2011/07/27 18:55:47 bdaloukas Exp $ |
||||
|
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License |
||||
|
* @package game |
||||
|
**/ |
||||
|
|
||||
|
require_once("../../../config.php"); |
||||
|
require_once ($CFG->dirroot.'/course/moodleform_mod.php'); |
||||
|
require( '../locallib.php'); |
||||
|
require_once( "../header.php"); |
||||
|
|
||||
|
$currenttab = 'bookquiz'; |
||||
|
include('../tabs.php'); |
||||
|
|
||||
|
|
||||
|
$attempt = game_getattempt( $game, $detail); |
||||
|
if( $game->bookid == 0){ |
||||
|
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 |
||||
|
|
||||
|
print_heading_with_help( get_string( 'bookquiz_questions', 'game'), 'questions', 'game'); |
||||
|
|
||||
|
print_simple_box_start( 'center'); |
||||
|
|
||||
|
$select = "gameid={$game->id}"; |
||||
|
$categories = array(); |
||||
|
if( ($recs = get_records_select( 'game_bookquiz_questions', $select, '', 'chapterid,questioncategoryid')) != false){ |
||||
|
foreach( $recs as $rec){ |
||||
|
$categories[ $rec->chapterid] = $rec->questioncategoryid; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$select = ''; |
||||
|
$top = 0; |
||||
|
$recs = get_records_select( 'question_categories', '', '', '*', 0, 1); |
||||
|
foreach( $recs as $rec){ |
||||
|
if( array_key_exists( 'course', $rec)){ |
||||
|
$select = "course=$cm->course"; |
||||
|
$categoriesarray = question_category_options($game->course, $top, $currentcat, false, $nochildrenof); |
||||
|
}else{ |
||||
|
$context = get_context_instance(50, $cm->course); |
||||
|
$select = " contextid in ($context->id)"; |
||||
|
require_once($CFG->dirroot.'/lib/questionlib.php'); |
||||
|
$categoriesarray = question_category_options(game_get_contexts(), $top); |
||||
|
} |
||||
|
break; |
||||
|
} |
||||
|
/* |
||||
|
$sql = "SELECT chapterid, COUNT(*) as c ". |
||||
|
"FROM {$CFG->prefix}game_bookquiz_questions gbq,{$CFG->prefix}question q ". |
||||
|
"WHERE gbq.questioncategoryid=q.category ". |
||||
|
"AND gameid=$game->id AND hidden=0 ". |
||||
|
"GROUP BY chapterid"; |
||||
|
$numbers = array(); |
||||
|
if( ($recs = 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 "</tr>\r\n"; |
||||
|
$ids = ''; |
||||
|
$nothing = '------'; |
||||
|
if( ($recs = get_records_select( 'book_chapters', '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]; |
||||
|
$contextid = get_field( 'question_categories', 'contextid', 'id', $categoryid); |
||||
|
$selected = $categoryid.','.$contextid; |
||||
|
}else |
||||
|
$selected = 0; |
||||
|
choose_from_menu_nested($categoriesarray, 'categoryid'.$rec->id, $selected, $nothing); |
||||
|
echo '</td>'; |
||||
|
/* |
||||
|
echo '<td>'; |
||||
|
if( array_key_exists( $rec->id, $numbers)){ |
||||
|
echo '<center>'.$numbers[ $rec->id].'</center>'; |
||||
|
}else |
||||
|
{ |
||||
|
echo ' '; |
||||
|
} |
||||
|
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 echo $q; ?>" /> |
||||
|
<input type="hidden" name=ids value="<?php p( substr( $ids, 1)) ?>" /> |
||||
|
<center> |
||||
|
<input type="submit" value="<?php print_string("savechanges") ?>" /> |
||||
|
</center> |
||||
|
|
||||
|
</form> |
||||
|
|
||||
|
<a href="<?php echo $CFG->wwwroot;?>/mod/game/bookquiz/importodt.php?q=<?php echo $q; ?>"> <?php echo get_string('bookquiz_import_odt', 'game'); ?></a><br> |
||||
|
|
||||
|
<?php |
||||
|
|
||||
|
print_footer($course); |
||||
|
|
||||
|
function game_bookquiz_save( $gameid, $bookid, $ids, $form) |
||||
|
{ |
||||
|
$select = "gameid=$gameid"; |
||||
|
$questions = array(); |
||||
|
$recids = array(); |
||||
|
if( ($recs = get_records_select( 'game_bookquiz_questions', $select, '', '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; |
||||
|
$pos = strpos($form->$name,','); |
||||
|
$categoryid = ($pos ? substr( $form->$name, 0, $pos) : $form->$name); |
||||
|
|
||||
|
if( !array_key_exists( $chapterid, $questions)){ |
||||
|
if( $categoryid == 0){ |
||||
|
continue; |
||||
|
} |
||||
|
|
||||
|
unset( $rec); |
||||
|
$rec->gameid = $gameid; |
||||
|
$rec->chapterid = $chapterid; |
||||
|
$rec->questioncategoryid = $categoryid; |
||||
|
|
||||
|
if (($newid=insert_record('game_bookquiz_questions', $rec)) == false) { |
||||
|
print_object( $rec); |
||||
|
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])){ |
||||
|
error( "Can't delete game_bookquiz_questions"); |
||||
|
} |
||||
|
}else |
||||
|
{ |
||||
|
unset( $updrec); |
||||
|
$updrec->id = $recids[ $chapterid]; |
||||
|
$updrec->questioncategoryid = $categoryid; |
||||
|
if ((update_record( 'game_bookquiz_questions', $updrec)) == false) { |
||||
|
print_object( $rec); |
||||
|
error( "Can't update game_bookquiz_questions"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$recids[ $chapterid] = 0; |
||||
|
} |
||||
|
|
||||
|
foreach( $recids as $chapterid => $id){ |
||||
|
if( $id == 0){ |
||||
|
continue; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,135 @@ |
|||||
|
<?PHP // $Id: toc.php,v 1.1.2.2 2010/07/24 02:46:15 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 = ' '; |
||||
|
$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 = ' '; |
||||
|
} |
||||
|
} 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 |
||||
|
|
||||
|
?> |
@ -0,0 +1,202 @@ |
|||||
|
<?PHP // $Id: view.php,v 1.3.2.2 2010/07/24 02:46:16 arborrow 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)) { |
||||
|
error('Course Module ID was incorrect'); |
||||
|
} |
||||
|
|
||||
|
if (!$course = get_record('course', 'id', $cm->course)) { |
||||
|
error('Course is misconfigured'); |
||||
|
} |
||||
|
|
||||
|
if (!$book = get_record('book', 'id', $cm->instance)) { |
||||
|
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 = get_records_select('book_chapters', $select, '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 = get_record('book_chapters', 'id', $chapterid)) { |
||||
|
error('Error reading book chapters.'); |
||||
|
} |
||||
|
|
||||
|
//check all variables |
||||
|
unset($id); |
||||
|
unset($chapterid); |
||||
|
|
||||
|
/// chapter is hidden for students |
||||
|
if (!$allowedit && $chapter->hidden) { |
||||
|
error('Error reading book chapters.'); |
||||
|
} |
||||
|
|
||||
|
/// chapter not part of this book! |
||||
|
if ($chapter->bookid != $book->id) { |
||||
|
error('Chapter not part of this book!'); |
||||
|
} |
||||
|
// ========================================================================= |
||||
|
// security checks END |
||||
|
// ========================================================================= |
||||
|
|
||||
|
add_to_log($course->id, 'book', 'view', 'view.php?id='.$cm->id.'&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> </td><td>'.book_edit_button($cm->id, $course->id, $chapter->id).'</td></tr></table>' |
||||
|
: ' '; |
||||
|
|
||||
|
|
||||
|
/// 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.'&chapterid='.$previd.'"><img src="pix/nav_prev.gif" class="bigicon" alt="'.get_string('navprev', 'book').'"/></a>'; |
||||
|
} else { |
||||
|
$chnavigation .= '<img src="pix/nav_prev_dis.gif" class="bigicon" alt="" />'; |
||||
|
} |
||||
|
|
||||
|
if ($nextid) { |
||||
|
$chnavigation .= '<a title="'.get_string('navnext', 'book').'" href="view.php?id='.$cm->id.'&chapterid='.$nextid.'"><img src="pix/nav_next.gif" class="bigicon" alt="'.get_string('navnext', 'book').'" /></a>'; |
||||
|
} else { |
||||
|
$sec = ''; |
||||
|
if ($section = get_record('course_sections', 'id', $cm->section)) { |
||||
|
$sec = $section->section; |
||||
|
} |
||||
|
$chnavigation .= '<a title="'.get_string('navexit', 'book').'" href="../../course/view.php?id='.$course->id.'#section-'.$sec.'"><img src="pix/nav_exit.gif" 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="pix/print_book.gif" class="bigicon" alt="'.get_string('printbook', 'book').'"/></a>'; |
||||
|
$printchapter = '<a title="'.get_string('printchapter', 'book').'" href="print.php?id='.$cm->id.'&chapterid='.$chapter->id.'" onclick="this.target=\'_blank\'"><img src="pix/print_chapter.gif" 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 |
||||
|
print_box_start('generalbox'); |
||||
|
echo $toc; |
||||
|
print_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 |
||||
|
print_box_start('generalbox'); |
||||
|
$content = ''; |
||||
|
if (!$book->customtitles) { |
||||
|
if ($currsubtitle == ' ') { |
||||
|
$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>'; |
||||
|
print_box_end(); |
||||
|
/// lower navigation |
||||
|
echo '<p>'.$chnavigation.'</p>'; |
||||
|
?> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
|
||||
|
<?php |
||||
|
print_footer($course); |
||||
|
|
||||
|
?> |
@ -0,0 +1,248 @@ |
|||||
|
<?php // $Id: play.php,v 1.1.2.3 2012/01/16 23:01:10 bdaloukas Exp $
|
||||
|
|
||||
|
// This files plays the game contest |
||||
|
|
||||
|
function game_contest_view( $game){ |
||||
|
global $CFG, $USER; |
||||
|
|
||||
|
$sql = "SELECT SUM(score) as s FROM {$CFG->prefix}game_queries WHERE gameid=$game->id AND userid=$USER->id"; |
||||
|
$rec = get_record_sql( $sql); |
||||
|
|
||||
|
echo get_string( 'marks', 'game').': '.$rec->s.'<br><br>'; |
||||
|
echo $game->toptext.'<br>'; |
||||
|
echo '<br><center><b>'.get_string( 'contest_not_solved', 'game').'</b></center><br>'; |
||||
|
game_contest_view_wherescore( $game, false); |
||||
|
echo '<br><center><b>'.get_string( 'contest_solved', 'game').'</b></center><br>'; |
||||
|
game_contest_view_wherescore( $game, true); |
||||
|
echo '<br><center><b>'.get_string( 'contest_top', 'game').'</b></center><br>'; |
||||
|
game_contest_top( $game); |
||||
|
} |
||||
|
|
||||
|
function game_contest_view_wherescore( $game, $answered){ |
||||
|
global $CFG; |
||||
|
|
||||
|
$where = ( $answered ? ' AND ' : ' AND NOT ')." EXISTS (SELECT * FROM {$CFG->prefix}game_queries ". |
||||
|
" WHERE gameid={$game->id} AND glossaryentryid=ge.id AND questionid=0 AND score>0)"; |
||||
|
//sql1: within a category sql2: without a category |
||||
|
$sql1 = "SELECT gec.id, gec.categoryid, ge.id as glossaryentryid, ge.concept ". |
||||
|
" FROM {$CFG->prefix}glossary_entries ge, {$CFG->prefix}glossary_entries_categories gec". |
||||
|
" WHERE glossaryid=$game->glossaryid AND gec.entryid=ge.id ".$where. |
||||
|
" ORDER BY gec.categoryid,ge.concept"; |
||||
|
$sql2 = "SELECT ge.id, -1 as categoryid, ge.id as glossaryentryid, ge.concept ". |
||||
|
" FROM {$CFG->prefix}glossary_entries ge". |
||||
|
" WHERE glossaryid=$game->glossaryid".$where. |
||||
|
" AND NOT EXISTS (SELECT * FROM {$CFG->prefix}glossary_entries_categories gec WHERE gec.entryid=ge.id)". |
||||
|
" ORDER BY ge.concept"; |
||||
|
|
||||
|
$lines = array(); |
||||
|
$categoryid = 0; |
||||
|
$categoryname = ''; |
||||
|
$line = ''; |
||||
|
$cm = get_coursemodule_from_instance('game', $game->id, $game->course); |
||||
|
for( $pass = 1; $pass <= 2; $pass++) |
||||
|
{ |
||||
|
$recs = get_records_sql( $pass == 1 ? $sql1 : $sql2); |
||||
|
if( $recs) |
||||
|
foreach( $recs as $rec) |
||||
|
{ |
||||
|
if( $answered) |
||||
|
{ |
||||
|
$select = "gameid={$game->id} AND glossaryentryid={$rec->glossaryentryid} AND questionid=0 AND score>0"; |
||||
|
$query = get_record_select( 'game_queries', $select); |
||||
|
$dir = $CFG->dataroot.'/'.$game->course.'/moddata/game/'.$game->id.'/queries/'.$query->id; |
||||
|
if( file_exists( $dir)) |
||||
|
{ |
||||
|
$dir = dir( $dir); |
||||
|
//List files in images directory |
||||
|
$file = ''; |
||||
|
while (($f = $dir->read()) !== false) |
||||
|
{ |
||||
|
if( ($f != '.') && ($f != '..')) |
||||
|
$file=$f; |
||||
|
} |
||||
|
$name = '<a href="'.$CFG->wwwroot.'/file.php/'.$game->course.'/moddata/game/'. $game->id. |
||||
|
'/queries/'.$query->id.'/'.$file.'">'.$rec->concept.'</a>'; |
||||
|
}else |
||||
|
$name = $rec->concept; |
||||
|
}else |
||||
|
{ |
||||
|
$name = '<a href="'.$CFG->wwwroot.'/mod/game/attempt.php?id='.$cm->id. |
||||
|
'&entryid='.$rec->glossaryentryid.'">'.$rec->concept.'</a>'; |
||||
|
} |
||||
|
if( $rec->categoryid == $categoryid) |
||||
|
$line .= ' '.$name; |
||||
|
else |
||||
|
{ |
||||
|
if( $categoryid != 0){ |
||||
|
$lines[ $categoryname] = $line; |
||||
|
} |
||||
|
$line = $name; |
||||
|
$categoryid = $rec->categoryid; |
||||
|
$reccat = get_record( 'glossary_categories', 'id', $categoryid); |
||||
|
$categoryname = $reccat->name; |
||||
|
} |
||||
|
} |
||||
|
if( $categoryid != 0) |
||||
|
$lines[ $categoryname] = $line; |
||||
|
} |
||||
|
ksort( $lines); |
||||
|
echo '<table border=1>'; |
||||
|
foreach( $lines as $name => $line){ |
||||
|
if( $name == '') |
||||
|
$name = ' '; |
||||
|
echo '<tr><td>'.$name.'</td><td>'.$line.'</td></tr>'; |
||||
|
} |
||||
|
echo '</table>'; |
||||
|
} |
||||
|
|
||||
|
require_once ($CFG->libdir.'/formslib.php'); |
||||
|
|
||||
|
class game_contest_submit_form extends moodleform { |
||||
|
|
||||
|
function set_data($default_values) { |
||||
|
parent::set_data($default_values); |
||||
|
} |
||||
|
|
||||
|
function definition() { |
||||
|
global $CFG, $COURSE; |
||||
|
|
||||
|
$mform =& $this->_form; |
||||
|
$data = &$this->_customdata; |
||||
|
$game = $data[ 'game']; |
||||
|
$rec = get_record('glossary_entries', 'id', $data[ 'entryid']); |
||||
|
if( $rec != false) |
||||
|
$name = $rec->concept; |
||||
|
else |
||||
|
$name = ''; |
||||
|
$mform->addElement('header', 'gradeoptions', $name); |
||||
|
|
||||
|
$mform->addElement('hidden', 'id', $data[ 'id']); |
||||
|
$mform->addElement('hidden', 'entryid', $data[ 'entryid']); |
||||
|
|
||||
|
$this->set_upload_manager(new upload_manager('attachment', true, false, $course, false, $game->param2, true, true)); |
||||
|
$attachmentoptions = array('subdirs'=>false, 'maxfiles'=>1, 'maxbytes' => $game->param2); |
||||
|
$mform->addElement('file', 'attachment', get_string('attachment', 'forum'), $attachmentoptions); |
||||
|
|
||||
|
if( $game->param1){ |
||||
|
//Has notes |
||||
|
$mform->addElement('htmleditor', 'studentanswer', get_string( 'remark', 'game'), array('size' => 4)); |
||||
|
} |
||||
|
//--------------------------------------------------------------------------- |
||||
|
// buttons |
||||
|
$this->add_action_buttons(); |
||||
|
} |
||||
|
|
||||
|
function data_preprocessing(&$default_values){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
function validation($data, $files){ |
||||
|
$errors = parent::validation($data, $files); |
||||
|
|
||||
|
|
||||
|
return $errors; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function game_contest_continue($id, $game, $attempt, $detail, $entryid) |
||||
|
{ |
||||
|
global $USER; |
||||
|
|
||||
|
if( $attempt == false){ |
||||
|
$attempt = game_addattempt( $game); |
||||
|
} |
||||
|
|
||||
|
$mform =& new game_contest_submit_form(null, compact('game', 'entryid', 'id')); |
||||
|
if ($mform->is_cancelled()){ |
||||
|
$cm = get_coursemodule_from_instance('game', $game->id, $game->course); |
||||
|
redirect("view.php?id=$cm->id"); |
||||
|
} elseif ($fromform = $mform->get_data()) { |
||||
|
$cm = get_coursemodule_from_instance('game', $game->id, $game->course); |
||||
|
|
||||
|
$todb = new object(); |
||||
|
$todb->attemptid = $attempt->id; |
||||
|
$todb->gameid = $game->id; |
||||
|
$todb->userid = $USER->id; |
||||
|
$todb->sourcemodule = $game->sourcemodule; |
||||
|
$todb->glossaryentryid = $entryid; |
||||
|
$todb->questionid = 0; |
||||
|
$todb->score = 0; |
||||
|
$todb->correct = 0; //means check if it is the winner or not |
||||
|
if( isset( $fromform->studentanswer)){ |
||||
|
$todb->studentanswer = $fromform->studentanswer; |
||||
|
} |
||||
|
if ($todb->id=insert_record('game_queries', $todb)) { |
||||
|
add_to_log($game->course, 'game', 'submit', '', $todb->id, $cm->id); |
||||
|
$dir = game_file_area_query_name( $game, $todb); |
||||
|
if ($mform->save_files( $dir)){ |
||||
|
$file = $mform->_upload_manager->files[ 'attachment']; |
||||
|
$newfilename = $file[ 'originalname']; |
||||
|
set_field("game_queries", "attachment", $newfilename, 'id', $todb->id); |
||||
|
} |
||||
|
} else { |
||||
|
error("Could not submit to contest"); |
||||
|
} |
||||
|
redirect("view.php?q=$game->id"); |
||||
|
}else |
||||
|
{ |
||||
|
$mform->display(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function game_contest_top( $game) |
||||
|
{ |
||||
|
global $CFG; |
||||
|
|
||||
|
$sql = "SELECT userid as id, SUM(score) as s FROM {$CFG->prefix}game_queries WHERE gameid=$game->id GROUP BY userid ORDER BY SUM(score) DESC LIMIT 0,10"; |
||||
|
$recs = get_records_sql( $sql); |
||||
|
echo '<table border=1>'; |
||||
|
$line=0; |
||||
|
foreach( $recs as $rec) |
||||
|
{ |
||||
|
$user = get_record( 'user', 'id', $rec->id); |
||||
|
echo '<tr>'; |
||||
|
echo '<td>'.(++$line).'</td><td>'; |
||||
|
echo '<img src="'.$CFG->wwwroot.'/user/pix.php/'.$rec->id.'/f2.jpg"></td>'; |
||||
|
echo '<td>'.$user->firstname.' '.$user->lastname.'</td>'; |
||||
|
echo '<td>'.$rec->s.'</td>'; |
||||
|
for($step=1;$step<=2;$step++) |
||||
|
{ |
||||
|
$score = ($step == 1 ? ' AND score>0' : ' AND score=0'); |
||||
|
$sql = "SELECT ge.id as id,ge.concept,gq.id as queryid FROM {$CFG->prefix}game_queries gq, {$CFG->prefix}glossary_entries ge ". |
||||
|
" WHERE gameid={$game->id} AND gq.userid={$rec->id} AND ge.id=gq.glossaryentryid $score ORDER BY ge.concept"; |
||||
|
$recs2 = get_records_sql( $sql); |
||||
|
$s = ''; |
||||
|
if( $recs2) |
||||
|
{ |
||||
|
foreach( $recs2 as $rec2) |
||||
|
{ |
||||
|
if( $s != '') |
||||
|
$s .= ' '; |
||||
|
|
||||
|
$dir = $CFG->dataroot.'/'.$game->course.'/moddata/game/'.$game->id.'/queries/'.$rec2->queryid; |
||||
|
if( file_exists( $dir)) |
||||
|
{ |
||||
|
$dir = dir( $dir); |
||||
|
//List files in images directory |
||||
|
$file = ''; |
||||
|
while (($f = $dir->read()) !== false) |
||||
|
{ |
||||
|
if( ($f != '.') && ($f != '..')) |
||||
|
$file=$f; |
||||
|
} |
||||
|
$name = '<a href="'.$CFG->wwwroot.'/file.php/'.$game->course.'/moddata/game/'. $game->id. |
||||
|
'/queries/'.$rec2->queryid.'/'.$file.'">'.$rec2->concept.'</a>'; |
||||
|
}else |
||||
|
$name = $rec2->concept; |
||||
|
|
||||
|
$s .= $name; |
||||
|
} |
||||
|
} |
||||
|
if( $s == '') |
||||
|
$s = ' '; |
||||
|
echo '<td>'.$s.'</td>'; |
||||
|
} |
||||
|
echo '</tr>'; |
||||
|
} |
||||
|
echo "</table>\r\n"; |
||||
|
} |
@ -0,0 +1,749 @@ |
|||||
|
<?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); |
||||
|
|
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$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( 3*$N20); |
||||
|
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, $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 = max( 6, 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, $N20-3); |
||||
|
$col = mt_rand(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) |
||||
|
{ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$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) |
||||
|
{ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$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->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); |
||||
|
|
||||
|
unset( $rec); |
||||
|
|
||||
|
$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 display($puzzle, $N20) { |
||||
|
|
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$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) |
||||
|
{ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$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) |
||||
|
{ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$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) |
||||
|
{ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$ret = ""; |
||||
|
|
||||
|
if( $pos > 0) |
||||
|
$ret .= $textlib->substr( $s, 0, $pos); |
||||
|
|
||||
|
$s = $ret . $char . $textlib->substr( $s, $pos+1); |
||||
|
} |
||||
|
|
||||
|
function showhtml_base( $crossm, $crossd, $showsolution, $showhtmlsolutions, $showstudentguess=true) |
||||
|
{ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$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(); |
||||
|
foreach ($crossd as $rec) |
||||
|
{ |
||||
|
if( $rec->horizontal == false and $LastHorizontalWord == -1){ |
||||
|
$LastHorizontalWord = $i; |
||||
|
} |
||||
|
|
||||
|
$i++; |
||||
|
|
||||
|
$sWordLength .= ",".$textlib->strlen( $rec->answertext); |
||||
|
$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'); |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$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) { |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
return $textlib->strlen($b) - $textlib->strlen($a); |
||||
|
} |
||||
|
|
||||
|
function cmp_magic($a, $b) { |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
return ($textlib->strlen($a) + mt_rand(0, 3)) - ($textlib->strlen($b) - mt_rand(0, 1)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,226 @@ |
|||||
|
<?php // $Id: crossdb_class.php,v 1.8.2.7 2011/07/24 12:36:53 bdaloukas Exp $
|
||||
|
/** |
||||
|
* This class is a cross that can load and save to a table |
||||
|
* |
||||
|
* @author bdaloukas |
||||
|
* @version $Id: crossdb_class.php,v 1.8.2.7 2011/07/24 12:36:53 bdaloukas Exp $ |
||||
|
* @package game |
||||
|
**/ |
||||
|
|
||||
|
class CrossDB extends Cross |
||||
|
{ |
||||
|
function save( $game, &$crossm, $crossd, $id) |
||||
|
{ |
||||
|
global $USER; |
||||
|
|
||||
|
$crossm->id = $id; |
||||
|
$crossm->sourcemodule = $game->sourcemodule; |
||||
|
|
||||
|
if (!(game_insert_record( 'game_cross', $crossm))){ |
||||
|
error('Insert page: new page game_cross not inserted'); |
||||
|
} |
||||
|
foreach( $crossd as $rec) |
||||
|
{ |
||||
|
$rec->attemptid = $id; |
||||
|
$rec->questiontext = addslashes( $rec->questiontext); |
||||
|
|
||||
|
$rec->gameid = $game->id; |
||||
|
$rec->userid = $USER->id; |
||||
|
$rec->sourcemodule = $game->sourcemodule; |
||||
|
|
||||
|
if (!insert_record( 'game_queries', $rec)){ |
||||
|
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) |
||||
|
{ |
||||
|
if( !delete_records( 'game_queries', 'attemptid', $id)){ |
||||
|
error( "Can't delete from game_queries attemptid=$id"); |
||||
|
} |
||||
|
if( !delete_records( 'game_cross', 'id', $id)){ |
||||
|
error( "Can't delete from game_cross id=$id"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
function load( $g, &$done, &$html, $game, $attempt, $crossrec, $onlyshow, $showsolution, &$finishattempt, $showhtmlsolutions, &$language, $showstudentguess=true) |
||||
|
{ |
||||
|
$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 = get_records_select('game_queries', "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; |
||||
|
} |
||||
|
} |
||||
|
$info = $this->game_cross_computecheck( $correctletters, $wrongletters, $restletters, $pos, $game, $attempt, $done, $onlyshow, $showsolution, $finishattempt); |
||||
|
$html = $this->showhtml_base( $crossrec, $b, $showsolution, $showhtmlsolutions, $showstudentguess); |
||||
|
if( $language == '') |
||||
|
$language = game_detectlanguage( $rec->answertext); |
||||
|
} |
||||
|
|
||||
|
if( $load == false) |
||||
|
{ |
||||
|
$finishattempt = true; |
||||
|
} |
||||
|
|
||||
|
return $info; |
||||
|
} |
||||
|
|
||||
|
function game_cross_computecheck( $correctletters, $wrongletters, $restletters, $allletters, $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 / $allletters; |
||||
|
$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) |
||||
|
{ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
global $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 |
||||
|
{ |
||||
|
$correctletters++; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if( $is_empty){ |
||||
|
return; |
||||
|
} |
||||
|
if( ($rec->studentanswer == $guess )){ |
||||
|
return; |
||||
|
} |
||||
|
$rec->studentanswer = $guess; |
||||
|
|
||||
|
$updrec->studentanswer = $guess; |
||||
|
$updrec->id = $rec->id; |
||||
|
if (!update_record('game_queries', $updrec, $rec->id)){ |
||||
|
error('Update game_queries: not updated'); |
||||
|
} |
||||
|
|
||||
|
$score = $correctletters / $len; |
||||
|
game_update_queries( $game, $attempt, $rec, $score, $guess); |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,237 @@ |
|||||
|
<?php // $Id: cryptexdb_class.php,v 1.3.2.4 2010/08/02 14:39:59 bdaloukas Exp $
|
||||
|
|
||||
|
class CryptexDB extends CrossDB |
||||
|
{ |
||||
|
function save( $game, &$crossm, $crossd, $id, $letters) |
||||
|
{ |
||||
|
global $USER; |
||||
|
|
||||
|
CrossDB::delete_records( $id); |
||||
|
|
||||
|
if( (CrossDB::save( $game, $crossm, $crossd, $id)) == false){ |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
$crossm->id = $id; |
||||
|
|
||||
|
$newrec->id = $id; |
||||
|
$newrec->letters = $letters; |
||||
|
|
||||
|
if (!($cryptexid = game_insert_record( 'game_cryptex', $newrec))){ |
||||
|
error("Insert page: new page game_cryptex not inserted"); |
||||
|
} |
||||
|
|
||||
|
return $newrec; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
function computeletters( $crossm, $crossd) |
||||
|
{ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$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 display( $cols, $rows, $letters, $mask, $showsolution=false, $textdir) |
||||
|
{ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
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) |
||||
|
{ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$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) |
||||
|
{ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$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) |
||||
|
{ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$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 load( $crossm, &$mask, &$corrects, &$language) |
||||
|
{ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$questions = array(); |
||||
|
$corrects = array(); |
||||
|
|
||||
|
$mask = str_repeat( '0', $crossm->cols * $crossm->rows); |
||||
|
|
||||
|
if ($recs = get_records_select('game_queries', "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, $maxwords)){ |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
$letters = $this->computeletters( $crossm, $crossd); |
||||
|
|
||||
|
return true; |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,322 @@ |
|||||
|
<?php // $Id: play.php,v 1.7.2.6 2011/07/23 08:45:06 bdaloukas Exp $
|
||||
|
/** |
||||
|
* This page plays the cryptex game |
||||
|
* |
||||
|
* @author bdaloukas |
||||
|
* @version $Id: play.php,v 1.7.2.6 2011/07/23 08:45:06 bdaloukas Exp $ |
||||
|
* @package game |
||||
|
**/ |
||||
|
|
||||
|
require_once( "cryptexdb_class.php"); |
||||
|
|
||||
|
function game_cryptex_continue( $id, $game, $attempt, $cryptexrec, $endofgame) |
||||
|
{ |
||||
|
global $USER; |
||||
|
|
||||
|
if( $endofgame){ |
||||
|
game_updateattempts( $game, $attempt, -1, true); |
||||
|
$endofgame = false; |
||||
|
} |
||||
|
|
||||
|
if( $attempt != false and $cryptexrec != false){ |
||||
|
$crossm = get_record_select( 'game_cross', "id=$attempt->id"); |
||||
|
return game_cryptex_play( $id, $game, $attempt, $cryptexrec, $crossm); |
||||
|
} |
||||
|
|
||||
|
if( $attempt === false){ |
||||
|
$attempt = game_addattempt( $game); |
||||
|
} |
||||
|
|
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$cryptex = new CryptexDB(); |
||||
|
|
||||
|
$questions = array(); |
||||
|
$infos = array(); |
||||
|
|
||||
|
$answers = array(); |
||||
|
$recs = game_questions_shortanswer( $game); |
||||
|
if( $recs == false){ |
||||
|
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); |
||||
|
|
||||
|
$select = "gameid=$game->id AND userid='$USER->id' AND questionid='$rec->questionid' AND glossaryentryid='$rec->glossaryentryid'"; |
||||
|
if(($rec2 = get_record_select('game_repetitions', $select, '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->save( $game, $crossm, $new_crossd, $attempt->id, $letters); |
||||
|
} |
||||
|
|
||||
|
game_updateattempts( $game, $attempt, 0, 0); |
||||
|
|
||||
|
return game_cryptex_play( $id, $game, $attempt, $cryptexrec, $crossm); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
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) |
||||
|
{ |
||||
|
if( $attempt === false){ |
||||
|
game_cryptex_continue( $id, $game, $attempt, $cryptexrec); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
$crossm = get_record_select( 'game_cross', "id=$attempt->id"); |
||||
|
$query = get_record_select( 'game_queries', "id=$q"); |
||||
|
|
||||
|
$answer1 = trim( game_upper( $query->answertext)); |
||||
|
$answer2 = trim( game_upper( $answer)); |
||||
|
|
||||
|
$textlib = textlib_get_instance(); |
||||
|
$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); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
game_update_queries( $game, $attempt, $query, 1, $answer2); |
||||
|
|
||||
|
game_cryptex_play( $id, $game, $attempt, $cryptexrec, $crossm, true); |
||||
|
} |
||||
|
|
||||
|
function game_cryptex_play( $id, $game, $attempt, $cryptexrec, $crossm, $updateattempt=false, $onlyshow=false, $showsolution=false) |
||||
|
{ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
global $CFG; |
||||
|
|
||||
|
if( $game->toptext != ''){ |
||||
|
echo $game->toptext.'<br>'; |
||||
|
} |
||||
|
|
||||
|
echo '<br>'; |
||||
|
|
||||
|
$cryptex = new CryptexDB(); |
||||
|
$language = $attempt->language; |
||||
|
$questions = $cryptex->load( $crossm, $mask, $corrects, $attempt->language); |
||||
|
if( $language != $attempt->language){ |
||||
|
if( !set_field( 'game_attempts', 'language', $attempt->language, 'id', $attempt->id)){ |
||||
|
error( "game_cross_play: Can't set language"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
game_compute_reserve_print( $attempt, $wordrtl, $reverseprint); |
||||
|
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->display( $crossm->cols, $crossm->rows, $cryptexrec->letters, $mask, $showsolution, $textdir); |
||||
|
?> |
||||
|
</td> |
||||
|
|
||||
|
<td width=10%> </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> |
||||
|
<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; |
||||
|
foreach( $questions as $key => $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 = game_filtertext( $q->questiontext, 0); |
||||
|
echo "$i. ".$question; |
||||
|
$question = strip_tags($question); //ADDED BY DP (AUG 2009) - fixes " breaking the Answer button for this question |
||||
|
$question = str_replace("'","\'",$question); |
||||
|
if( $showsolution){ |
||||
|
echo " $q->answertext<B></b>"; |
||||
|
}else if( $onlyshow == false){ |
||||
|
if( ($game->param8 == 0) || ($game->param8 > $q->tries)) |
||||
|
echo '<input type="submit" value="'.get_string( 'answer').'" onclick="OnCheck( '.$q->id.',\''.$question.'\');" />'; |
||||
|
} |
||||
|
echo "<br>\r\n"; |
||||
|
} |
||||
|
|
||||
|
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; |
||||
|
|
||||
|
if (! $cm = get_record("course_modules", "id", $id)) { |
||||
|
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> '; |
||||
|
echo "<a href=\"$CFG->wwwroot/course/view.php?id=$cm->course\">".get_string( 'finish', 'game').'</a> '; |
||||
|
echo "<br><br>\r\n"; |
||||
|
} |
@ -0,0 +1,105 @@ |
|||||
|
<?php // $Id: access.php,v 1.1.2.4 2011/07/23 08:45:06 bdaloukas Exp $
|
||||
|
/** |
||||
|
* Capability definitions for the game module. |
||||
|
* |
||||
|
* For naming conventions, see lib/db/access.php. |
||||
|
*/ |
||||
|
$mod_game_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, |
||||
|
'legacy' => array( |
||||
|
'guest' => CAP_ALLOW, |
||||
|
'student' => CAP_ALLOW, |
||||
|
'teacher' => CAP_ALLOW, |
||||
|
'editingteacher' => CAP_ALLOW, |
||||
|
'admin' => CAP_ALLOW |
||||
|
) |
||||
|
), |
||||
|
|
||||
|
// Ability to do the game. |
||||
|
'mod/game:attempt' => array( |
||||
|
'captype' => 'write', |
||||
|
'contextlevel' => CONTEXT_MODULE, |
||||
|
'riskbitmask' => RISK_SPAM, |
||||
|
'legacy' => array( |
||||
|
'guest' => CAP_ALLOW, |
||||
|
'student' => CAP_ALLOW, |
||||
|
'teacher' => CAP_ALLOW, |
||||
|
'editingteacher' => CAP_ALLOW, |
||||
|
'admin' => 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, |
||||
|
'legacy' => 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, |
||||
|
'legacy' => array( |
||||
|
'editingteacher' => CAP_ALLOW, |
||||
|
'admin' => CAP_ALLOW |
||||
|
) |
||||
|
), |
||||
|
|
||||
|
// Preview the game. |
||||
|
'mod/game:preview' => array( |
||||
|
'captype' => 'write', // Only just a write. |
||||
|
'contextlevel' => CONTEXT_MODULE, |
||||
|
'legacy' => array( |
||||
|
'teacher' => CAP_ALLOW, |
||||
|
'editingteacher' => CAP_ALLOW, |
||||
|
'admin' => CAP_ALLOW |
||||
|
) |
||||
|
), |
||||
|
|
||||
|
// Manually grade and comment on student attempts at a question, and regrade games. |
||||
|
'mod/game:grade' => array( |
||||
|
'riskbitmask' => RISK_SPAM, |
||||
|
'captype' => 'write', |
||||
|
'contextlevel' => CONTEXT_MODULE, |
||||
|
'legacy' => array( |
||||
|
'teacher' => CAP_ALLOW, |
||||
|
'editingteacher' => CAP_ALLOW, |
||||
|
'admin' => CAP_ALLOW |
||||
|
) |
||||
|
), |
||||
|
|
||||
|
// View the game reports. |
||||
|
'mod/game:viewreports' => array( |
||||
|
'riskbitmask' => RISK_PERSONAL, |
||||
|
'captype' => 'read', |
||||
|
'contextlevel' => CONTEXT_MODULE, |
||||
|
'legacy' => array( |
||||
|
'teacher' => CAP_ALLOW, |
||||
|
'editingteacher' => CAP_ALLOW, |
||||
|
'admin' => CAP_ALLOW |
||||
|
) |
||||
|
), |
||||
|
|
||||
|
// Delete attempts using the overview report. |
||||
|
'mod/game:deleteattempts' => array( |
||||
|
'riskbitmask' => RISK_DATALOSS, |
||||
|
'captype' => 'write', |
||||
|
'contextlevel' => CONTEXT_MODULE, |
||||
|
'legacy' => array( |
||||
|
'editingteacher' => CAP_ALLOW, |
||||
|
'admin' => CAP_ALLOW |
||||
|
) |
||||
|
) |
||||
|
); |
||||
|
?> |
@ -0,0 +1,8 @@ |
|||||
|
<?php |
||||
|
|
||||
|
require( "../../../config.php"); |
||||
|
|
||||
|
|
||||
|
execute_sql( "truncate TABLE {$CFG->prefix}game_snakes_database"); |
||||
|
|
||||
|
require( "importsnakes.php"); |
@ -0,0 +1,51 @@ |
|||||
|
<?php // $Id: importsnakes.php,v 1.3.2.2 2010/07/24 02:58:30 arborrow Exp $
|
||||
|
|
||||
|
game_importsnakes(); |
||||
|
|
||||
|
function game_importsnakes() |
||||
|
{ |
||||
|
if( count_records( 'game_snakes_database') != 0){ |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
unset( $newrec); |
||||
|
$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); |
||||
|
|
||||
|
unset( $newrec); |
||||
|
$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) |
||||
|
{ |
||||
|
if( !insert_record( 'game_snakes_database', $newrec)){ |
||||
|
print_object( $newrec); |
||||
|
error( "Can't insert to table game_snakes_database"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
echo 'Finished importing snakes and ladders'; |
@ -0,0 +1,350 @@ |
|||||
|
<?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" ENUM="false" NEXT="name"/> |
||||
|
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="course"/> |
||||
|
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="sourcemodule"/> |
||||
|
<FIELD NAME="sourcemodule" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="course" NEXT="timeopen"/> |
||||
|
<FIELD NAME="timeopen" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="sourcemodule" NEXT="timeclose"/> |
||||
|
<FIELD NAME="timeclose" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="timeopen" NEXT="quizid"/> |
||||
|
<FIELD NAME="quizid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="timeclose" NEXT="glossaryid"/> |
||||
|
<FIELD NAME="glossaryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="quizid" NEXT="glossarycategoryid"/> |
||||
|
<FIELD NAME="glossarycategoryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="glossaryid" NEXT="questioncategoryid"/> |
||||
|
<FIELD NAME="questioncategoryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="glossarycategoryid" NEXT="bookid"/> |
||||
|
<FIELD NAME="bookid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="questioncategoryid" NEXT="gamekind"/> |
||||
|
<FIELD NAME="gamekind" TYPE="char" LENGTH="20" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="bookid" NEXT="param1"/> |
||||
|
<FIELD NAME="param1" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="gamekind" NEXT="param2"/> |
||||
|
<FIELD NAME="param2" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="param1" NEXT="param3"/> |
||||
|
<FIELD NAME="param3" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="param2" NEXT="param4"/> |
||||
|
<FIELD NAME="param4" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="param3" NEXT="param5"/> |
||||
|
<FIELD NAME="param5" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="param4" NEXT="param6"/> |
||||
|
<FIELD NAME="param6" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="param5" NEXT="param7"/> |
||||
|
<FIELD NAME="param7" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="param6" NEXT="param8"/> |
||||
|
<FIELD NAME="param8" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="param7" NEXT="param9"/> |
||||
|
<FIELD NAME="param9" TYPE="text" LENGTH="medium" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="param8" NEXT="param10"/> |
||||
|
<FIELD NAME="param10" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="param9" NEXT="shuffle"/> |
||||
|
<FIELD NAME="shuffle" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" DEFAULT="1" SEQUENCE="false" ENUM="false" PREVIOUS="param10" NEXT="timemodified"/> |
||||
|
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="shuffle" NEXT="gameinputid"/> |
||||
|
<FIELD NAME="gameinputid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="timemodified" NEXT="toptext"/> |
||||
|
<FIELD NAME="toptext" TYPE="text" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="gameinputid" NEXT="bottomtext"/> |
||||
|
<FIELD NAME="bottomtext" TYPE="text" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="toptext" NEXT="grademethod"/> |
||||
|
<FIELD NAME="grademethod" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="bottomtext" NEXT="grade"/> |
||||
|
<FIELD NAME="grade" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="grademethod" NEXT="decimalpoints"/> |
||||
|
<FIELD NAME="decimalpoints" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="grade" NEXT="review"/> |
||||
|
<FIELD NAME="review" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="decimalpoints" NEXT="attempts"/> |
||||
|
<FIELD NAME="attempts" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="review" NEXT="glossaryid2"/> |
||||
|
<FIELD NAME="glossaryid2" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="attempts" NEXT="glossarycategoryid2"/> |
||||
|
<FIELD NAME="glossarycategoryid2" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="glossaryid2" NEXT="language"/> |
||||
|
<FIELD NAME="language" TYPE="char" LENGTH="10" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="glossarycategoryid2" NEXT="subcategories"/> |
||||
|
<FIELD NAME="subcategories" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="gameid"/> |
||||
|
<FIELD NAME="gameid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="userid"/> |
||||
|
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="gameid" NEXT="timestart"/> |
||||
|
<FIELD NAME="timestart" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="timefinish"/> |
||||
|
<FIELD NAME="timefinish" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="timestart" NEXT="timelastattempt"/> |
||||
|
<FIELD NAME="timelastattempt" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="timefinish" NEXT="lastip"/> |
||||
|
<FIELD NAME="lastip" TYPE="char" LENGTH="30" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="timelastattempt" NEXT="lastremotehost"/> |
||||
|
<FIELD NAME="lastremotehost" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="lastip" NEXT="preview"/> |
||||
|
<FIELD NAME="preview" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="lastremotehost" NEXT="attempt"/> |
||||
|
<FIELD NAME="attempt" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="preview" NEXT="score"/> |
||||
|
<FIELD NAME="score" TYPE="float" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="attempt" NEXT="attempts"/> |
||||
|
<FIELD NAME="attempts" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="score" NEXT="language"/> |
||||
|
<FIELD NAME="language" TYPE="char" LENGTH="10" NOTNULL="false" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="gameid"/> |
||||
|
<FIELD NAME="gameid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="userid"/> |
||||
|
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="gameid" NEXT="score"/> |
||||
|
<FIELD NAME="score" TYPE="float" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="timemodified"/> |
||||
|
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="attemptid"/> |
||||
|
<FIELD NAME="attemptid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="gameid"/> |
||||
|
<FIELD NAME="gameid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="attemptid" NEXT="userid"/> |
||||
|
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="gameid" NEXT="sourcemodule"/> |
||||
|
<FIELD NAME="sourcemodule" TYPE="char" LENGTH="20" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="questionid"/> |
||||
|
<FIELD NAME="questionid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="sourcemodule" NEXT="glossaryentryid"/> |
||||
|
<FIELD NAME="glossaryentryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="questionid" NEXT="questiontext"/> |
||||
|
<FIELD NAME="questiontext" TYPE="text" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="glossaryentryid" NEXT="score"/> |
||||
|
<FIELD NAME="score" TYPE="float" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="questiontext" NEXT="timelastattempt"/> |
||||
|
<FIELD NAME="timelastattempt" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="score" NEXT="studentanswer"/> |
||||
|
<FIELD NAME="studentanswer" TYPE="text" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="timelastattempt" NEXT="col"/> |
||||
|
<FIELD NAME="col" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="studentanswer" NEXT="row"/> |
||||
|
<FIELD NAME="row" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="col" NEXT="horizontal"/> |
||||
|
<FIELD NAME="horizontal" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="row" NEXT="answertext"/> |
||||
|
<FIELD NAME="answertext" TYPE="text" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="horizontal" NEXT="correct"/> |
||||
|
<FIELD NAME="correct" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="answertext" NEXT="attachment"/> |
||||
|
<FIELD NAME="attachment" TYPE="char" LENGTH="200" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="correct" NEXT="answerid"/> |
||||
|
<FIELD NAME="answerid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="attachment" NEXT="tries"/> |
||||
|
<FIELD NAME="tries" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="queryid"/> |
||||
|
<FIELD NAME="queryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="letters"/> |
||||
|
<FIELD NAME="letters" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="queryid" NEXT="allletters"/> |
||||
|
<FIELD NAME="allletters" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="letters" NEXT="try"/> |
||||
|
<FIELD NAME="try" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="allletters" NEXT="maxtries"/> |
||||
|
<FIELD NAME="maxtries" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="try" NEXT="finishedword"/> |
||||
|
<FIELD NAME="finishedword" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="maxtries" NEXT="corrects"/> |
||||
|
<FIELD NAME="corrects" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="finishedword" NEXT="iscorrect"/> |
||||
|
<FIELD NAME="iscorrect" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="cols"/> |
||||
|
<FIELD NAME="cols" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="rows"/> |
||||
|
<FIELD NAME="rows" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="cols" NEXT="words"/> |
||||
|
<FIELD NAME="words" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="rows" NEXT="wordsall"/> |
||||
|
<FIELD NAME="wordsall" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="words" NEXT="createscore"/> |
||||
|
<FIELD NAME="createscore" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="wordsall" NEXT="createtries"/> |
||||
|
<FIELD NAME="createtries" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="createscore" NEXT="createtimelimit"/> |
||||
|
<FIELD NAME="createtimelimit" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="createtries" NEXT="createconnectors"/> |
||||
|
<FIELD NAME="createconnectors" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="createtimelimit" NEXT="createfilleds"/> |
||||
|
<FIELD NAME="createfilleds" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="createconnectors" NEXT="createspaces"/> |
||||
|
<FIELD NAME="createspaces" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="createfilleds" NEXT="triesplay"/> |
||||
|
<FIELD NAME="triesplay" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="letters"/> |
||||
|
<FIELD NAME="letters" TYPE="text" NOTNULL="false" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="queryid"/> |
||||
|
<FIELD NAME="queryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="state"/> |
||||
|
<FIELD NAME="state" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="queryid" NEXT="level"/> |
||||
|
<FIELD NAME="level" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="level"/> |
||||
|
<FIELD NAME="level" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="data"/> |
||||
|
<FIELD NAME="data" TYPE="char" LENGTH="81" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="level" NEXT="opened"/> |
||||
|
<FIELD NAME="opened" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="data" NEXT="guess"/> |
||||
|
<FIELD NAME="guess" TYPE="char" LENGTH="81" NOTNULL="false" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="level"/> |
||||
|
<FIELD NAME="level" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="opened"/> |
||||
|
<FIELD NAME="opened" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="level" NEXT="data"/> |
||||
|
<FIELD NAME="data" TYPE="char" LENGTH="81" NOTNULL="false" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="bookid"/> |
||||
|
<FIELD NAME="bookid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="lastchapterid"/> |
||||
|
<FIELD NAME="lastchapterid" TYPE="char" LENGTH="81" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="bookid"/> |
||||
|
</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" ENUM="false" NEXT="attemptid"/> |
||||
|
<FIELD NAME="attemptid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="chapterid"/> |
||||
|
<FIELD NAME="chapterid" TYPE="char" LENGTH="81" NOTNULL="true" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="gameid"/> |
||||
|
<FIELD NAME="gameid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="chapterid"/> |
||||
|
<FIELD NAME="chapterid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="gameid" NEXT="questioncategoryid"/> |
||||
|
<FIELD NAME="questioncategoryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="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="false" ENUM="false" NEXT="filename"/> |
||||
|
<FIELD NAME="filename" TYPE="char" LENGTH="20" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="icon"/> |
||||
|
<FIELD NAME="icon" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="filename" NEXT="createdby"/> |
||||
|
<FIELD NAME="createdby" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="icon" NEXT="vendor"/> |
||||
|
<FIELD NAME="vendor" TYPE="char" LENGTH="50" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="createdby" NEXT="name"/> |
||||
|
<FIELD NAME="name" TYPE="char" LENGTH="20" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="vendor" NEXT="description"/> |
||||
|
<FIELD NAME="description" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="version"/> |
||||
|
<FIELD NAME="version" TYPE="char" LENGTH="10" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="description" NEXT="maxpicturewidth"/> |
||||
|
<FIELD NAME="maxpicturewidth" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="version" NEXT="maxpictureheight"/> |
||||
|
<FIELD NAME="maxpictureheight" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="maxpicturewidth"/> |
||||
|
</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="false" ENUM="false" NEXT="filename"/> |
||||
|
<FIELD NAME="filename" TYPE="char" LENGTH="30" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="title"/> |
||||
|
<FIELD NAME="title" TYPE="char" LENGTH="200" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="filename" NEXT="checkbutton"/> |
||||
|
<FIELD NAME="checkbutton" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="title" NEXT="printbutton"/> |
||||
|
<FIELD NAME="printbutton" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="checkbutton" NEXT="inputsize"/> |
||||
|
<FIELD NAME="inputsize" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="printbutton" NEXT="maxpicturewidth"/> |
||||
|
<FIELD NAME="maxpicturewidth" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="inputsize" NEXT="maxpictureheight"/> |
||||
|
<FIELD NAME="maxpictureheight" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="maxpicturewidth"/> |
||||
|
</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" ENUM="false" NEXT="snakesdatabaseid"/> |
||||
|
<FIELD NAME="snakesdatabaseid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="position"/> |
||||
|
<FIELD NAME="position" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="snakesdatabaseid" NEXT="queryid"/> |
||||
|
<FIELD NAME="queryid" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="position" NEXT="dice"/> |
||||
|
<FIELD NAME="dice" TYPE="int" LENGTH="1" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="name"/> |
||||
|
<FIELD NAME="name" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="cols"/> |
||||
|
<FIELD NAME="cols" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="rows"/> |
||||
|
<FIELD NAME="rows" TYPE="int" LENGTH="3" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="cols" NEXT="data"/> |
||||
|
<FIELD NAME="data" TYPE="text" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="rows" NEXT="fileboard"/> |
||||
|
<FIELD NAME="fileboard" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="data" NEXT="direction"/> |
||||
|
<FIELD NAME="direction" TYPE="int" LENGTH="2" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="fileboard" NEXT="headerx"/> |
||||
|
<FIELD NAME="headerx" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="direction" NEXT="headery"/> |
||||
|
<FIELD NAME="headery" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="headerx" NEXT="footerx"/> |
||||
|
<FIELD NAME="footerx" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="headery" NEXT="footery"/> |
||||
|
<FIELD NAME="footery" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="footerx" NEXT="width"/> |
||||
|
<FIELD NAME="width" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="footery" NEXT="height"/> |
||||
|
<FIELD NAME="height" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="messagewin"/> |
||||
|
<FIELD NAME="messagewin" TYPE="text" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="messageloose"/> |
||||
|
<FIELD NAME="messageloose" TYPE="text" NOTNULL="false" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="name"/> |
||||
|
<FIELD NAME="name" TYPE="char" LENGTH="100" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="course"/> |
||||
|
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="sourcemodule"/> |
||||
|
<FIELD NAME="sourcemodule" TYPE="char" LENGTH="20" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="course" NEXT="ids"/> |
||||
|
<FIELD NAME="ids" TYPE="text" NOTNULL="false" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="correct"/> |
||||
|
<FIELD NAME="correct" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="wrong"/> |
||||
|
<FIELD NAME="wrong" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="correct" NEXT="found"/> |
||||
|
<FIELD NAME="found" TYPE="int" LENGTH="4" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="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" ENUM="false" NEXT="gameid"/> |
||||
|
<FIELD NAME="gameid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="userid"/> |
||||
|
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="gameid" NEXT="questionid"/> |
||||
|
<FIELD NAME="questionid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="userid" NEXT="glossaryentryid"/> |
||||
|
<FIELD NAME="glossaryentryid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="questionid" NEXT="repetitions"/> |
||||
|
<FIELD NAME="repetitions" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="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> |
@ -0,0 +1,256 @@ |
|||||
|
<?php // $Id: export.php,v 1.16.2.4 2011/07/23 08:45:05 bdaloukas Exp $
|
||||
|
/** |
||||
|
* This page exports a game to a html or jar file |
||||
|
* |
||||
|
* @author bdaloukas |
||||
|
* @version $Id: export.php,v 1.16.2.4 2011/07/23 08:45:05 bdaloukas Exp $ |
||||
|
* @package game |
||||
|
**/ |
||||
|
|
||||
|
require( '../../config.php'); |
||||
|
require_once ($CFG->dirroot.'/lib/formslib.php'); |
||||
|
require( 'locallib.php'); |
||||
|
ob_start(); |
||||
|
require( 'header.php'); |
||||
|
|
||||
|
if( !isteacher( $game->course, $USER->id)){ |
||||
|
error( get_string( 'only_teachers', 'game')); |
||||
|
} |
||||
|
|
||||
|
$target = optional_param('target', "", PARAM_ALPHANUM); // action |
||||
|
|
||||
|
$currenttab = 'export'.$target; |
||||
|
|
||||
|
include('tabs.php'); |
||||
|
|
||||
|
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); |
||||
|
$mform->setDefault('type',$html->type); |
||||
|
} |
||||
|
|
||||
|
//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; |
||||
|
$errors = parent::validation($data, $files); |
||||
|
|
||||
|
|
||||
|
return $errors; |
||||
|
} |
||||
|
|
||||
|
function export() { |
||||
|
global $game; |
||||
|
|
||||
|
$mform = $this->_form; |
||||
|
|
||||
|
$html = $this->_customdata['html']; |
||||
|
|
||||
|
$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')) |
||||
|
$html->checkbutton = $mform->getElementValue('checkbutton'); |
||||
|
if( $mform->elementExists( 'printbutton')) |
||||
|
$html->printbutton = $mform->getElementValue('printbutton'); |
||||
|
|
||||
|
if (!(update_record( 'game_export_html', $html))){ |
||||
|
print_error("game_export_html: not updated id=$html->id"); |
||||
|
} |
||||
|
|
||||
|
require_once("exporthtml.php"); |
||||
|
game_OnExportHTML( $game, $html); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
class mod_game_exportjavame_form extends moodleform { |
||||
|
|
||||
|
function definition() { |
||||
|
global $CFG, $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; |
||||
|
$errors = parent::validation($data, $files); |
||||
|
|
||||
|
|
||||
|
return $errors; |
||||
|
} |
||||
|
|
||||
|
function export() { |
||||
|
global $game; |
||||
|
|
||||
|
$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 (!(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 = get_record_select( 'game_export_html', 'id='.$game->id); |
||||
|
if( $html == false){ |
||||
|
unset( $html); |
||||
|
$html->id = $game->id; |
||||
|
$html->checkbutton = 1; |
||||
|
$html->printbutton = 1; |
||||
|
game_insert_record( 'game_export_html', $html); |
||||
|
$html = get_record_select( 'game_export_html', 'id='.$game->id); |
||||
|
} |
||||
|
$mform = new mod_game_exporthtml_form(null, array('id'=>$id, 'html' => $html)); |
||||
|
}else |
||||
|
{ |
||||
|
$javame = get_record_select( 'game_export_javame', 'id='.$game->id); |
||||
|
if( $javame == false){ |
||||
|
unset( $javame); |
||||
|
$javame->id = $game->id; |
||||
|
game_insert_record( 'game_export_javame', $javame); |
||||
|
$javame = get_record_select( 'game_export_javame', '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&mode=entry&hook=$id"); |
||||
|
} else { |
||||
|
redirect("view.php?id=$cm->id"); |
||||
|
} |
||||
|
|
||||
|
} else if ($entry = $mform->get_data()) { |
||||
|
$mform->export(); |
||||
|
}else{ |
||||
|
ob_end_flush(); |
||||
|
$mform->display(); |
||||
|
} |
||||
|
|
||||
|
print_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 |
||||
|
die("file does not exists"); |
||||
|
} |
@ -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; |
||||
|
} |
||||
|
|
@ -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; |
||||
|
} |
||||
|
|
||||
|
|
@ -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; |
||||
|
} |
@ -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; |
||||
|
} |
@ -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; |
||||
|
} |
@ -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; |
||||
|
} |
||||
|
} |
@ -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--; |
||||
|
} |
@ -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"; |
||||
|
} |
||||
|
} |
After Width: | Height: | Size: 137 B |
@ -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> |
@ -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
|
||||
|
} |
@ -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
|
||||
|
} |
@ -0,0 +1,3 @@ |
|||||
|
encoding=el_utf8 |
||||
|
exit=Έξοδος |
||||
|
keyboardletters=2:ΑΒΓ#3:ΔΕΖ#4:ΗΘΙ#5:ΚΛΜ#6:ΝΞΟ#7:ΠΡΣ#8:ΤΥΦ#9:ΧΨΩ# |
@ -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# |
||||
|
|
@ -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# |
||||
|
|
@ -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) { |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
@ -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
|
||||
|
} |
@ -0,0 +1,3 @@ |
|||||
|
encoding=el_utf8 |
||||
|
exit=Έξοδος |
||||
|
keyboardletters=2:ΑΒΓ#3:ΔΕΖ#4:ΗΘΙ#5:ΚΛΜ#6:ΝΞΟ#7:ΠΡΣ#8:ΤΥΦ#9:ΧΨΩ# |
@ -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# |
||||
|
|
@ -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# |
||||
|
|
@ -0,0 +1,256 @@ |
|||||
|
<?php // $Id: exporthtml.php,v 1.12.2.8 2011/07/29 21:07:02 bdaloukas Exp $
|
||||
|
/** |
||||
|
* This page export the game to html for games: cross, hangman |
||||
|
* |
||||
|
* @author bdaloukas |
||||
|
* @version $Id: exporthtml.php,v 1.12.2.8 2011/07/29 21:07:02 bdaloukas Exp $ |
||||
|
* @package game |
||||
|
**/ |
||||
|
|
||||
|
require_once( "exportjavame.php"); |
||||
|
require_once( "exporthtml_millionaire.php"); |
||||
|
|
||||
|
function game_OnExportHTML( $game, $html){ |
||||
|
global $CFG; |
||||
|
|
||||
|
if( $game->gamekind == 'cross'){ |
||||
|
$destdir = "{$CFG->dataroot}/{$game->course}/export"; |
||||
|
if( !file_exists( $destdir)){ |
||||
|
mkdir( $destdir); |
||||
|
} |
||||
|
game_OnExportHTML_cross( $game, $html, $destdir); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
$destdir = game_export_createtempdir(); |
||||
|
|
||||
|
switch( $game->gamekind){ |
||||
|
case 'hangman': |
||||
|
game_OnExportHTML_hangman( $game, $html, $destdir); |
||||
|
break; |
||||
|
case 'millionaire': |
||||
|
game_OnExportHTML_millionaire( $game, $html, $destdir); |
||||
|
break; |
||||
|
case 'snakes': |
||||
|
game_OnExportHTML_snakes( $game, $html, $destdir); |
||||
|
break; |
||||
|
} |
||||
|
|
||||
|
remove_dir( $destdir); |
||||
|
} |
||||
|
|
||||
|
function game_OnExportHTML_cross( $game, $html, $destdir){ |
||||
|
|
||||
|
global $CFG; |
||||
|
|
||||
|
if( $html->filename == ''){ |
||||
|
$html->filename = 'cross'; |
||||
|
} |
||||
|
|
||||
|
$filename = $html->filename . '.htm'; |
||||
|
|
||||
|
require( "cross/play.php"); |
||||
|
$attempt = game_getattempt( $game, $crossrec); |
||||
|
if( $crossrec == false){ |
||||
|
game_cross_new( $game, $game->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); |
||||
|
|
||||
|
$output_string = ob_get_contents(); |
||||
|
ob_end_clean(); |
||||
|
|
||||
|
$course = get_record_select( 'course', "id={$game->course}"); |
||||
|
|
||||
|
$filename = $html->filename . '.htm'; |
||||
|
|
||||
|
file_put_contents( $destdir.'/'.$filename, $ret . "\r\n" . $output_string); |
||||
|
game_send_stored_file($destdir.'/'.$filename); |
||||
|
} |
||||
|
|
||||
|
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, $html, $destdir){ |
||||
|
|
||||
|
global $CFG; |
||||
|
|
||||
|
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, $export_attachment); |
||||
|
if( $map == false){ |
||||
|
error( 'No Questions'); |
||||
|
} |
||||
|
|
||||
|
ob_start(); |
||||
|
|
||||
|
//Here is the code of hangman |
||||
|
require( "exporthtml_hangman.php"); |
||||
|
|
||||
|
$output_string = ob_get_contents(); |
||||
|
ob_end_clean(); |
||||
|
|
||||
|
$courseid = $game->course; |
||||
|
$course = get_record_select( 'course', "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/hangman/1'; |
||||
|
game_copyfiles( $src, $destdir); |
||||
|
} |
||||
|
|
||||
|
$filezip = game_create_zip( $destdir, $courseid, $html->filename.'.zip'); |
||||
|
game_send_stored_file($filezip); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
function game_OnExportHTML_millionaire( $game, $html, $destdir){ |
||||
|
|
||||
|
global $CFG; |
||||
|
|
||||
|
if( $html->filename == ''){ |
||||
|
$html->filename = 'millionaire'; |
||||
|
} |
||||
|
|
||||
|
$filename = $html->filename . '.htm'; |
||||
|
|
||||
|
$ret = game_export_printheader( $html->title, false); |
||||
|
$ret .= "\r<body onload=\"Reset();\">\r"; |
||||
|
|
||||
|
$questions = game_millionaire_html_getquestions( $game, $maxquestions, $countofquestions); |
||||
|
ob_start(); |
||||
|
|
||||
|
game_millionaire_html_print( $game, $questions, $maxquestions); |
||||
|
|
||||
|
//End of millionaire code |
||||
|
$output_string = ob_get_contents(); |
||||
|
ob_end_clean(); |
||||
|
|
||||
|
$courseid = $game->course; |
||||
|
$course = get_record_select( 'course', "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'; |
||||
|
game_copyfiles( $src, $destdir); |
||||
|
|
||||
|
$filezip = game_create_zip( $destdir, $courseid, $html->filename.'.zip'); |
||||
|
game_send_stored_file($filezip); |
||||
|
} |
||||
|
|
||||
|
function game_OnExportHTML_snakes( $game, $html, $destdir){ |
||||
|
|
||||
|
global $CFG; |
||||
|
|
||||
|
if( $html->filename == ''){ |
||||
|
$html->filename = 'snakes'; |
||||
|
} |
||||
|
|
||||
|
$filename = $html->filename . '.htm'; |
||||
|
|
||||
|
$ret = ''; |
||||
|
|
||||
|
$board = get_record_select( 'game_snakes_database', 'id='.$game->param3); |
||||
|
|
||||
|
if( ($game->sourcemodule == 'quiz') or ($game->sourcemodule == 'question')) |
||||
|
$questionsM = game_millionaire_html_getquestions( $game, $maxquestions, $countofquestionsM, $retfeedback); |
||||
|
else |
||||
|
{ |
||||
|
$questionsM = array(); |
||||
|
$countofquestionsM = 0; |
||||
|
$retfeedback = ''; |
||||
|
} |
||||
|
$questionsS = game_exmportjavame_getanswers( $game, false); |
||||
|
|
||||
|
ob_start(); |
||||
|
|
||||
|
//Here is the code of hangman |
||||
|
require( "exporthtml_snakes.php"); |
||||
|
|
||||
|
$output_string = ob_get_contents(); |
||||
|
ob_end_clean(); |
||||
|
|
||||
|
$courseid = $game->course; |
||||
|
$course = get_record_select( 'course', "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'); |
||||
|
$src = $CFG->dirroot.'/mod/game/snakes/1'; |
||||
|
game_copyfiles( $src, $destdir.'/images'); |
||||
|
copy( $CFG->dirroot.'/mod/game/snakes/boards/'.$board->fileboard, $destdir.'/images/'.$board->fileboard); |
||||
|
|
||||
|
$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); |
||||
|
} |
||||
|
|
@ -0,0 +1,361 @@ |
|||||
|
<?php // $Id: exporthtml_hangman.php,v 1.5.2.5 2011/07/29 21:07:02 bdaloukas Exp $
|
||||
|
/** |
||||
|
* This page export the game hangman to html |
||||
|
* |
||||
|
* @author bdaloukas |
||||
|
* @version $Id: exporthtml_hangman.php,v 1.5.2.5 2011/07/29 21:07:02 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, $export_attachment); |
||||
|
if( $map == false){ |
||||
|
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 = $CFG->dataroot.'/'.$game->course.'/moddata/'.$line->attachment; |
||||
|
$pos = strrpos( $file, '.'); |
||||
|
if( $pos == false) |
||||
|
continue; |
||||
|
} |
||||
|
|
||||
|
if( $questions != '') |
||||
|
$questions .= ', '; |
||||
|
if( $words != '') |
||||
|
$words .= ', '; |
||||
|
$questions .= '"'.$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 |
||||
|
$textlib = textlib_get_instance(); |
||||
|
$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(/<[^>]*>/g, ""); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
function reset() |
||||
|
{ |
||||
|
selectWord(); |
||||
|
|
||||
|
document.getElementById('usedLetters').innerHTML = " "; |
||||
|
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 = 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');?>" alt="<?php print_string('hangman', 'game') ?>" 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> |
||||
|
|
@ -0,0 +1,521 @@ |
|||||
|
<?php // $Id: exporthtml_millionaire.php,v 1.7.2.6 2011/07/24 15:44:55 bdaloukas Exp $
|
||||
|
/** |
||||
|
* This page export the game millionaire to html |
||||
|
* |
||||
|
* @author bdaloukas |
||||
|
* @version $Id: exporthtml_millionaire.php,v 1.7.2.6 2011/07/24 15:44:55 bdaloukas Exp $ |
||||
|
* @package game |
||||
|
**/ |
||||
|
function game_millionaire_html_getquestions( $game, &$max, &$countofquestions, &$retfeedback) |
||||
|
{ |
||||
|
global $CFG, $USER; |
||||
|
|
||||
|
$max = 0; |
||||
|
$countofquestions = 0; |
||||
|
|
||||
|
if( ($game->sourcemodule != 'quiz') and ($game->sourcemodule != 'question')){ |
||||
|
error( get_string('millionaire_sourcemodule_must_quiz_question', 'game')); |
||||
|
} |
||||
|
|
||||
|
if( $game->sourcemodule == 'quiz'){ |
||||
|
if( $game->quizid == 0){ |
||||
|
error( get_string( 'must_select_quiz', 'game')); |
||||
|
} |
||||
|
$select = "qtype='multichoice' AND quiz='$game->quizid' ". |
||||
|
" AND qqi.question=q.id"; |
||||
|
$table = "question q,{$CFG->prefix}quiz_question_instances qqi"; |
||||
|
}else |
||||
|
{ |
||||
|
if( $game->questioncategoryid == 0){ |
||||
|
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"; |
||||
|
|
||||
|
$recs = get_records_select( $table, $select, '', "q.id as id, q.questiontext"); |
||||
|
$ret = ''; |
||||
|
$retfeedback = ''; |
||||
|
foreach( $recs as $rec){ |
||||
|
$recs2 = get_records_select( 'question_answers', "question=$rec->id", 'fraction DESC', 'id,answer,feedback'); |
||||
|
$line = $rec->questiontext; |
||||
|
$linefeedback = ''; |
||||
|
foreach( $recs2 as $rec2) |
||||
|
{ |
||||
|
$line .= '#'.str_replace( array( '"', '#'), array( "'", ' '), $rec2->answer); |
||||
|
$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) > $max) |
||||
|
$max = 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);bgColor = "Black"; |
||||
|
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;?>> </td> |
||||
|
<td colspan=6> </td> |
||||
|
<td rowspan=<?php echo 17+$maxquestions;?>> </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();> |
||||
|
<input type="image" name="HelpTelephone" id="HelpTelephone" Title="<?php echo get_string( 'millionaire_telephone', 'game');?>" src="telephone.gif" alt="" border="0" onmousedown="OnHelpTelephone();"> |
||||
|
<input type="image" name="HelpPeople" id="HelpPeople" Title="<?php echo get_string( 'millionaire_helppeople', 'game');?>" src="people.gif" alt="" border="0" onmousedown="OnHelpPeople();"> |
||||
|
<input type="image" name="Quit" id="Quit" Title="<?php echo get_string( 'millionaire_quit', 'game');?>" src="x.gif" alt="" border="0" onmousedown=OnQuit();> |
||||
|
</td> |
||||
|
<td rowspan=<?php echo 16+$maxquestions;?> style='background:#408080'> </td> |
||||
|
<td id="levela15" align=right>15</td> |
||||
|
<td id="levelb15"> </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> </td> |
||||
|
</tr> |
||||
|
|
||||
|
<?php |
||||
|
$letters = get_string( 'lettersall', 'game'); |
||||
|
$textlib = textlib_get_instance(); |
||||
|
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%> <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'> </td></tr> |
||||
|
|
||||
|
</table> |
||||
|
|
||||
|
|
||||
|
</body> |
||||
|
</html> |
||||
|
<?php |
||||
|
} |
@ -0,0 +1,502 @@ |
|||||
|
<?php // $Id: exporthtml_snakes.php,v 1.1.2.4 2011/07/23 08:45:05 bdaloukas Exp $
|
||||
|
/** |
||||
|
* This page export the game snakes to html |
||||
|
* |
||||
|
* @author bdaloukas |
||||
|
* @version $Id: exporthtml_snakes.php,v 1.1.2.4 2011/07/23 08:45:05 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 $board->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"> </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> |
@ -0,0 +1,325 @@ |
|||||
|
<?php // $Id: exportjavame.php,v 1.13.2.4 2011/07/24 16:25:15 bdaloukas Exp $
|
||||
|
/** |
||||
|
* This page export the game to javame for mobile phones |
||||
|
* |
||||
|
* @author bdaloukas |
||||
|
* @version $Id: exportjavame.php,v 1.13.2.4 2011/07/24 16:25:15 bdaloukas Exp $ |
||||
|
* @package game |
||||
|
**/ |
||||
|
|
||||
|
function game_OnExportJavaME( $game, $javame){ |
||||
|
global $CFG; |
||||
|
|
||||
|
$courseid = $game->course; |
||||
|
$course = get_record_select( 'course', "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); |
||||
|
$fullfile = "{$CFG->dataroot}/$courseid/export/$file"; |
||||
|
game_send_stored_file( $fullfile); |
||||
|
} |
||||
|
|
||||
|
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); |
||||
|
if( $map == false){ |
||||
|
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, $export_attachment){ |
||||
|
$map = array(); |
||||
|
|
||||
|
switch( $game->sourcemodule){ |
||||
|
case 'question': |
||||
|
return game_exmportjavame_getanswers_question( $game); |
||||
|
case 'glossary': |
||||
|
return game_exmportjavame_getanswers_glossary( $game, $export_attachment); |
||||
|
case 'quiz': |
||||
|
return game_exmportjavame_getanswers_quiz( $game); |
||||
|
} |
||||
|
|
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
function game_exmportjavame_getanswers_question( $game){ |
||||
|
$select = 'hidden = 0 AND category='.$game->questioncategoryid; |
||||
|
|
||||
|
$select .= game_showanswers_appendselect( $game); |
||||
|
|
||||
|
return game_exmportjavame_getanswers_question_select( $game, 'question', $select, '*', 'questiontext', false, $game->course); |
||||
|
} |
||||
|
|
||||
|
function game_exmportjavame_getanswers_quiz( $game) |
||||
|
{ |
||||
|
global $CFG; |
||||
|
|
||||
|
$select = "quiz='$game->quizid' ". |
||||
|
" AND {$CFG->prefix}quiz_question_instances.question={$CFG->prefix}question.id". |
||||
|
" AND {$CFG->prefix}question.hidden=0". |
||||
|
game_showanswers_appendselect( $game); |
||||
|
$table = "question,{$CFG->prefix}quiz_question_instances"; |
||||
|
|
||||
|
return game_exmportjavame_getanswers_question_select( $game, $table, $select, "{$CFG->prefix}question.*", 'category,questiontext', true, $game->course); |
||||
|
} |
||||
|
|
||||
|
function game_exmportjavame_getanswers_question_select( $game, $table, $select, $fields='*', $courseid=0) |
||||
|
{ |
||||
|
global $CFG; |
||||
|
|
||||
|
if( ($questions = get_records_select( $table, $select, '', $fields)) === false){ |
||||
|
return; |
||||
|
} |
||||
|
$src = $CFG->dirroot.'/mod/game/export/javame/hangman/simple'; |
||||
|
|
||||
|
$line = 0; |
||||
|
$map = array(); |
||||
|
|
||||
|
foreach( $questions as $question){ |
||||
|
unset( $ret); |
||||
|
$ret->qtype = $question->qtype; |
||||
|
$ret->question = $question->questiontext; |
||||
|
|
||||
|
switch( $question->qtype){ |
||||
|
case 'shortanswer': |
||||
|
$recs = get_records_select( 'question_answers', "question=$question->id", 'fraction DESC', 'id,answer,feedback'); |
||||
|
foreach( $recs as $rec) |
||||
|
{ |
||||
|
$ret->answer = $rec->answer; |
||||
|
$ret->feedback = $rec->feedback; |
||||
|
$map[] = $ret; |
||||
|
break; |
||||
|
} |
||||
|
break; |
||||
|
default: |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return $map; |
||||
|
} |
||||
|
|
||||
|
function game_exmportjavame_getanswers_glossary( $game, $export_attachment) |
||||
|
{ |
||||
|
global $CFG; |
||||
|
|
||||
|
$table = 'glossary_entries ge'; |
||||
|
$select = "glossaryid={$game->glossaryid}"; |
||||
|
if( $game->glossarycategoryid){ |
||||
|
$select .= " AND gec.entryid = ge.id ". |
||||
|
" AND gec.categoryid = {$game->glossarycategoryid}"; |
||||
|
$table .= ",{$CFG->prefix}glossary_entries_categories gec"; |
||||
|
} |
||||
|
|
||||
|
if( $export_attachment){ |
||||
|
$select .= " AND attachment <> ''"; |
||||
|
} |
||||
|
|
||||
|
$fields = 'ge.id,definition,concept'; |
||||
|
if( $export_attachment){ |
||||
|
$fields .= ',attachment'; |
||||
|
} |
||||
|
if( ($questions = get_records_select( $table, $select, 'definition', $fields)) === false){ |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
$map = array(); |
||||
|
foreach( $questions as $question){ |
||||
|
unset( $ret); |
||||
|
$ret->id = $question->id; |
||||
|
$ret->qtype = 'shortanswer'; |
||||
|
$ret->question = strip_tags( $question->definition); |
||||
|
$ret->answer = $question->concept; |
||||
|
$ret->feedback = ''; |
||||
|
|
||||
|
if( $export_attachment){ |
||||
|
if( $question->attachment != ''){ |
||||
|
$ret->attachment = "glossary/{$game->glossaryid}/$question->id/$question->attachment"; |
||||
|
}else{ |
||||
|
$ret->attachment = ''; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$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 ''; |
||||
|
} |
||||
|
|
||||
|
?> |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.5 KiB |
@ -0,0 +1,449 @@ |
|||||
|
<?php // $Id: play.php,v 1.16.2.9 2011/07/29 21:07:03 bdaloukas Exp $
|
||||
|
|
||||
|
// This files plays the game hangman |
||||
|
|
||||
|
function game_hangman_continue($id, $game, $attempt, $hangman, $newletter, $action){ |
||||
|
global $USER; |
||||
|
if($attempt != false and $hangman != false){ |
||||
|
if(($action == 'nextword') and ($hangman->finishedword != 0)){ |
||||
|
//finish with one word and continue to another |
||||
|
if( !set_field( 'game_hangman', 'finishedword', 0, 'id', $hangman->id)){ |
||||
|
error( "game_hangman_continue: Can't update game_hangman"); |
||||
|
} |
||||
|
} |
||||
|
else{ |
||||
|
return game_hangman_play( $id, $game, $attempt, $hangman); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$updatehangman = (($attempt != false) and ($hangman != false)); |
||||
|
|
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
//new game |
||||
|
|
||||
|
//I try 10 times to find a new question |
||||
|
$found = false; |
||||
|
$min_num = 0; |
||||
|
$unchanged = 0; |
||||
|
for($i=1; $i <= 10; $i++){ |
||||
|
//Check the repetitions later |
||||
|
$rec = game_question_shortanswer($game, $game->param7, false); |
||||
|
if($rec === false){ |
||||
|
continue; |
||||
|
} |
||||
|
|
||||
|
$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); |
||||
|
} |
||||
|
if( $game->language == ''){ |
||||
|
$game->language = game_detectlanguage($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=$game->id AND userid='$USER->id' AND questionid='$rec->questionid' AND glossaryentryid='$rec->glossaryentryid'"; |
||||
|
if(($rec2 = get_record_select('game_repetitions', $select2, '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->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; |
||||
|
|
||||
|
if($min_num == 0) |
||||
|
break; //We found an unused word |
||||
|
}else |
||||
|
$unchanged++; |
||||
|
|
||||
|
if( $unchanged > 2){ |
||||
|
if( $found) |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if( $found == false){ |
||||
|
error( get_string( 'no_words', 'game')); |
||||
|
} |
||||
|
|
||||
|
//Found one word for hangman |
||||
|
if( $attempt == false){ |
||||
|
$attempt = game_addattempt( $game); |
||||
|
} |
||||
|
|
||||
|
if( !set_field( 'game_attempts', 'language', $min->language, 'id', $attempt->id)){ |
||||
|
error( "game_cross_play: Can't set language"); |
||||
|
} |
||||
|
|
||||
|
$_GET['newletter'] = ''; |
||||
|
|
||||
|
$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 = insert_record('game_queries', $query))){ |
||||
|
print_object($query); |
||||
|
error("game_hangman_continue: Can't insert to table game_queries"); |
||||
|
} |
||||
|
|
||||
|
$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 = $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)){ |
||||
|
error( 'game_hangman_continue: error inserting in game_hangman'); |
||||
|
} |
||||
|
} |
||||
|
else{ |
||||
|
if(!update_record( 'game_hangman', $newrec)){ |
||||
|
error( 'game_hangman_continue: error updating in game_hangman'); |
||||
|
} |
||||
|
$newrec = get_record_select( 'game_hangman', "id=$newrec->id"); |
||||
|
} |
||||
|
|
||||
|
game_update_repetitions($game->id, $USER->id, $query->questionid, $query->glossaryentryid); |
||||
|
|
||||
|
game_hangman_play($id, $game, $attempt, $newrec); |
||||
|
} |
||||
|
|
||||
|
function game_hangman_onfinishgame($game, $attempt, $hangman){ |
||||
|
$score = $hangman->corrects / $hangman->maxtries; |
||||
|
|
||||
|
game_updateattempts($game, $attempt, $score, true); |
||||
|
|
||||
|
if(!set_field('game_hangman', 'finishedword', 0, 'id', $hangman->id)){ |
||||
|
error("game_hangman_onfinishgame: Can't update game_hangman"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function game_hangman_play($id, $game, $attempt, $hangman, $onlyshow=false, $showsolution=false) |
||||
|
{ |
||||
|
global $CFG; |
||||
|
|
||||
|
$query = get_record( 'game_queries', 'id', $hangman->queryid); |
||||
|
|
||||
|
game_compute_reserve_print( $attempt, $wordrtl, $reverseprint); |
||||
|
|
||||
|
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); |
||||
|
|
||||
|
if(!$done){ |
||||
|
if ($wrong > $max){ |
||||
|
$wrong = $max; |
||||
|
} |
||||
|
if( $game->param3 == 0){ |
||||
|
$game->param3 = 1; |
||||
|
} |
||||
|
echo "\r\n<BR/><img src=\"".$CFG->wwwroot.'/mod/game/hangman/'.$game->param3.'/hangman_'.$wrong.'.jpg"'; |
||||
|
$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_oninncorrect( $id, $word_line, $query->answertext, $game, $attempt, $hangman); |
||||
|
$query->percent = 0; |
||||
|
} |
||||
|
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); |
||||
|
$query->percent = 1; |
||||
|
} |
||||
|
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){ |
||||
|
global $USER, $CFG; |
||||
|
|
||||
|
$word = $query->answertext; |
||||
|
|
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
$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($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 = ''; |
||||
|
for ($x=0; $x < $len; $x++){ |
||||
|
$char = $textlib->substr($word, $x, 1); |
||||
|
|
||||
|
if( $showsolution){ |
||||
|
$word_line2 .= ($char == " " ? ' ' : $char); |
||||
|
$done = 0; |
||||
|
} |
||||
|
|
||||
|
if ( $textlib->strpos($letters, $char) === false){ |
||||
|
$word_line.="_<font size=\"1\"> </font>\r\n"; |
||||
|
$done = 0; |
||||
|
$answer .= '_'; |
||||
|
}else{ |
||||
|
$word_line .= ($char == " " ? ' ' : $char); |
||||
|
$answer .= $char; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$correct = 0; |
||||
|
|
||||
|
$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 didn't select this character |
||||
|
$param_id = optional_param('id', 0, PARAM_INT); |
||||
|
$params = 'id='.$param_id.'&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> "; |
||||
|
$correct++; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$finishedword = ($done or $wrong >= $max); |
||||
|
$finished = false; |
||||
|
|
||||
|
$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(!update_record( 'game_hangman', $updrec)){ |
||||
|
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 word I have to finish else continue with next word |
||||
|
function hangman_oncorrect($id, $word_line, $game, $attempt, $hangman, $query){ |
||||
|
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 = get_field('question_answers', 'feedback', 'id', $query->answerid); |
||||
|
if($feedback != ''){ |
||||
|
echo "$feedback<br>"; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
game_hangman_show_nextword($id, $game, $attempt, $hangman); |
||||
|
} |
||||
|
|
||||
|
function hangman_oninncorrect($id, $word_line, $word, $game, $attempt, $hangman){ |
||||
|
$textlib = textlib_get_instance(); |
||||
|
|
||||
|
echo "\r\n<br/><br/><font size=\"5\">\n$word_line</font>\r\n"; |
||||
|
|
||||
|
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; |
||||
|
|
||||
|
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> '; |
||||
|
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> '; |
||||
|
} |
||||
|
|
||||
|
if (!$cm = get_record("course_modules", "id", $id)){ |
||||
|
error("Course Module ID was incorrect id=$id"); |
||||
|
} |
||||
|
|
||||
|
echo "<a href=\"$CFG->wwwroot/course/view.php?id=$cm->course\">".get_string('finish', 'game').'</a> '; |
||||
|
} |
||||
|
|
||||
|
?> |
@ -0,0 +1,57 @@ |
|||||
|
<?php |
||||
|
|
||||
|
$id = optional_param('id', 0, PARAM_INT); // Course Module ID |
||||
|
$q = optional_param('q', 0, PARAM_INT); // game ID |
||||
|
$action = optional_param('action', "", PARAM_ALPHANUM); // action |
||||
|
|
||||
|
if ($id) { |
||||
|
if (! $cm = get_record("course_modules", "id", $id)) { |
||||
|
print_error("Course Module ID was incorrect id=$id"); |
||||
|
} |
||||
|
if (! $course = get_record("course", "id", $cm->course)) { |
||||
|
print_error("Course is misconfigured id=$cm->course"); |
||||
|
} |
||||
|
|
||||
|
if (! $game = get_record("game", "id", $cm->instance)) { |
||||
|
print_error("Game id is incorrect (id=$cm->instance)"); |
||||
|
} |
||||
|
} else { |
||||
|
if (! $game = get_record("game", "id", $q)) { |
||||
|
print_error("Game module is incorrect (id=$q)"); |
||||
|
} |
||||
|
if (! $course = get_record("course", "id", $game->course)) { |
||||
|
print_error("Course is misconfigured (id=$game->course)"); |
||||
|
} |
||||
|
if (! $cm = get_coursemodule_from_instance("game", $game->id, $course->id)) { |
||||
|
print_error("Course Module ID was incorrect"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
require_login($course->id); |
||||
|
|
||||
|
add_to_log($course->id, "game", "view", "view.php?id=$cm->id", $game->name); |
||||
|
|
||||
|
/// Print the page header |
||||
|
|
||||
|
$strgames = get_string("modulenameplural", "game"); |
||||
|
$strgame = get_string("modulename", "game"); |
||||
|
|
||||
|
$cm->modname = 'game'; |
||||
|
$cm->name = $game->name; |
||||
|
|
||||
|
if( function_exists( 'build_navigation')){ |
||||
|
$navigation = build_navigation('', $cm); |
||||
|
print_header("$course->shortname: $game->name", "$course->shortname: $game->name", $navigation, |
||||
|
"", "", true, update_module_button($cm->id, $course->id, $strgame), |
||||
|
navmenu($course, $cm)); |
||||
|
}else{ |
||||
|
if ($course->category) { |
||||
|
$navigation = "<a href=\"{$CFG->wwwroot}/course/view.php?id=$course->id\">$course->shortname</a> ->"; |
||||
|
} else { |
||||
|
$navigation = ''; |
||||
|
} |
||||
|
print_header("$course->shortname: $game->name", "$course->fullname", |
||||
|
"$navigation <a href=index.php?id=$course->id>$strgames</a> -> $game->name", |
||||
|
"", "", true, update_module_button($cm->id, $course->id, $strgame), |
||||
|
navmenu($course, $cm)); |
||||
|
} |
After Width: | Height: | Size: 6.4 KiB |
@ -0,0 +1,127 @@ |
|||||
|
<?php // $Id: picture.php,v 1.2.2.2 2010/07/24 02:57:32 arborrow Exp $
|
||||
|
|
||||
|
require( '../../../config.php'); |
||||
|
|
||||
|
$id = optional_param('id', 0, PARAM_INT); // Course Module ID |
||||
|
$attemptid = optional_param('id2', 0, PARAM_INT); // Course Module ID |
||||
|
|
||||
|
$foundcells = optional_param('f', PARAM_SEQUENCE); //CSV |
||||
|
$cells = optional_param('cells', PARAM_SEQUENCE); //CSV |
||||
|
$filename = optional_param('p', PARAM_PATH); |
||||
|
$cols = optional_param('cols', PARAM_INT); |
||||
|
$rows = optional_param('rows', PARAM_INT); |
||||
|
$filenamenumbers = optional_param('n', PARAM_PATH); //Path to numbers picture |
||||
|
|
||||
|
create_image( $id, $attemptid, $foundcells, $cells, $filename, $cols, $rows, $filenamenumbers); |
||||
|
|
||||
|
function create_image( $id, $attemptid, $foundcells, $cells, $filename, $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; |
||||
|
} |
||||
|
|
||||
|
$size = getimagesize ($filename); |
||||
|
if( $size == false){ |
||||
|
die("Aknown filename $filename"); |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
$mime = $size[ 'mime']; |
||||
|
switch( $mime){ |
||||
|
case 'image/png': |
||||
|
$img_handle = imageCreateFromPNG( $filename); |
||||
|
break; |
||||
|
case 'image/jpeg': |
||||
|
$img_handle = imageCreateFromJPEG( $filename); |
||||
|
break; |
||||
|
case 'image/gif': |
||||
|
$img_handle = imageCreateFromGIF( $filename); |
||||
|
break; |
||||
|
default: |
||||
|
die('Aknown mime type $mime'); |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
$img_numbers = imageCreateFromPNG( $filenamenumbers); |
||||
|
$size_numbers = getimagesize ($filenamenumbers); |
||||
|
|
||||
|
Header ("Content-type: $mime"); |
||||
|
|
||||
|
$color = ImageColorAllocate ($img_handle, 100, 100, 100); |
||||
|
$s = $CFG->wwwroot; |
||||
|
ImageString ($img_handle, 3, 10, 9, $id.' '.$attemptid, $color); |
||||
|
|
||||
|
$colortext = imagecolorallocate( $img_handle, 100, 100, 100); //Text |
||||
|
|
||||
|
$width = $size[ 0]; |
||||
|
$height = $size[ 1]; |
||||
|
$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); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
?> |
@ -0,0 +1,447 @@ |
|||||
|
<?php // $Id: play.php,v 1.10.2.5 2011/07/23 08:45:06 bdaloukas Exp $
|
||||
|
|
||||
|
function game_hiddenpicture_continue( $id, $game, $attempt, $hiddenpicture) |
||||
|
{ |
||||
|
global $CFG, $USER; |
||||
|
|
||||
|
if( $attempt != false and $hiddenpicture != false){ |
||||
|
//Continue a previous attempt |
||||
|
return game_hiddenpicture_play( $id, $game, $attempt, $hiddenpicture); |
||||
|
} |
||||
|
|
||||
|
if( $attempt == false){ |
||||
|
//Start a new attempt |
||||
|
$attempt = game_addattempt( $game); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
$cols = $game->param1; |
||||
|
$rows = $game->param2; |
||||
|
if( $cols == 0){ |
||||
|
error( get_string( 'hiddenpicture_nocols', 'game')); |
||||
|
} |
||||
|
if( $rows == 0){ |
||||
|
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){ |
||||
|
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( !array_key_exists( $rec->$field, $selected_recs)) |
||||
|
continue; |
||||
|
|
||||
|
unset( $query); |
||||
|
$query->attemptid = $newrec->id; |
||||
|
$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 = insert_record( "game_queries", $query)) == 0){ |
||||
|
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); |
||||
|
} |
||||
|
|
||||
|
//Create the game_hiddenpicture record |
||||
|
function game_hiddenpicture_selectglossaryentry( $game, $attempt){ |
||||
|
global $CFG, $USER; |
||||
|
|
||||
|
srand( (double)microtime()*1000000); |
||||
|
|
||||
|
if( $game->glossaryid2 == 0){ |
||||
|
error( get_string( 'must_select_glossary', 'game')); |
||||
|
} |
||||
|
$select = "ge.glossaryid={$game->glossaryid2}"; |
||||
|
$table = 'glossary_entries ge'; |
||||
|
if( $game->glossarycategoryid2){ |
||||
|
$table .= ",{$CFG->prefix}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 '% %'"; |
||||
|
} |
||||
|
|
||||
|
$select .= " AND attachment LIKE '%.%'"; |
||||
|
if( ($recs=get_records_select( $table, $select, '', 'ge.id,attachment')) == false){ |
||||
|
$a->name = "'".get_field_select('glossary', 'name', "id=$game->glossaryid2")."'"; |
||||
|
error( get_string( 'hiddenpicture_nomainquestion', 'game', $a)); |
||||
|
return false; |
||||
|
} |
||||
|
$ids = array(); |
||||
|
foreach( $recs as $rec){ |
||||
|
$s = strtoupper( $rec->attachment); |
||||
|
$s = substr( $s, -4); |
||||
|
if( $s == '.GIF' or $s == '.JPG' or $s == '.PNG'){ |
||||
|
$ids[] = $rec->id; |
||||
|
} |
||||
|
} |
||||
|
if( count( $ids) == 0){ |
||||
|
$a->name = "'".get_field_select('glossary', 'name', "id=$game->glossaryid2")."'"; |
||||
|
error( get_string( 'hiddenpicture_nomainquestion', 'game', $a)); |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
//Have to select randomly one glossaryentry |
||||
|
shuffle( $ids); |
||||
|
$min_num = 0; |
||||
|
for($i=0;$i<count($ids);$i++){ |
||||
|
$tempid = $ids[ $i]; |
||||
|
$select2 = "gameid=$game->id AND userid='$USER->id' AND questionid=0 AND glossaryentryid='$tempid'"; |
||||
|
if(($rec2 = get_record_select('game_repetitions', $select2, 'id,repetitions r')) != false){ |
||||
|
if( ($rec2->r < $min_num) or ($min_num == 0)){ |
||||
|
$min_num = $rec2->r; |
||||
|
$glossaryentryid = $tempid; |
||||
|
} |
||||
|
} |
||||
|
else{ |
||||
|
$glossaryentryid = $tempid; |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$sql = 'SELECT id, concept as answertext, definition as questiontext, id as glossaryentryid, 0 as questionid, glossaryid, attachment'. |
||||
|
" FROM {$CFG->prefix}glossary_entries WHERE id = $glossaryentryid"; |
||||
|
if( ($rec = get_record_sql( $sql)) == false) |
||||
|
return false; |
||||
|
|
||||
|
$query->attemptid = $attempt->id; |
||||
|
$query->gameid = $game->id; |
||||
|
$query->userid = $USER->id; |
||||
|
|
||||
|
$query->col = 0; |
||||
|
$query->sourcemodule = 'glossary'; |
||||
|
$query->questionid = 0; |
||||
|
$query->glossaryentryid = $rec->glossaryentryid; |
||||
|
$query->attachment = str_replace( "\\", '/', $CFG->dataroot)."/{$game->course}/moddata/glossary/{$game->glossaryid2}/{$query->glossaryentryid}/{$rec->attachment}"; |
||||
|
$query->questiontext = $rec->questiontext; |
||||
|
$query->answertext = $rec->answertext; |
||||
|
$query->score = 0; |
||||
|
if( ($query->id = insert_record( "game_queries", $query)) == 0){ |
||||
|
error( 'error inserting in game_queries'); |
||||
|
} |
||||
|
$newrec->id = $attempt->id; |
||||
|
if( !game_insert_record( 'game_hiddenpicture', $newrec)){ |
||||
|
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=false) |
||||
|
{ |
||||
|
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); |
||||
|
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 $CFG; |
||||
|
|
||||
|
$foundcells=''; |
||||
|
foreach( $correctquestions as $key => $val){ |
||||
|
$foundcells .= ','.$key; |
||||
|
} |
||||
|
$cells=''; |
||||
|
foreach( $offsetquestions as $key => $val){ |
||||
|
if( $key != 0){ |
||||
|
$cells .= ','.$key; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
$query = get_record_select( 'game_queries', "attemptid=$hiddenpicture->id AND col=0", '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; |
||||
|
|
||||
|
$entry = get_record( 'glossary_entries', '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, $CFG; |
||||
|
|
||||
|
$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 = get_field_select( 'game_queries', 'id', $select)) == 0){ |
||||
|
die("problem game_hiddenpicture_check_questions (select=$select)"); |
||||
|
continue; |
||||
|
} |
||||
|
|
||||
|
$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( !update_record( 'game_hiddenpicture', $hiddenpicture)){ |
||||
|
error( 'game_hiddenpicture_check_questions: error updating in game_hiddenpicture'); |
||||
|
} |
||||
|
|
||||
|
$attempt->score = game_hidden_picture_computescore( $game, $hiddenpicture); |
||||
|
if( !update_record( 'game_attempts', $attempt)){ |
||||
|
error( 'game_hiddenpicture_check_questions: error updating in game_attempt'); |
||||
|
} |
||||
|
|
||||
|
game_sudoku_check_last( $id, $game, $attempt, $hiddenpicture, $finishattempt); |
||||
|
} |
||||
|
|
||||
|
function game_hiddenpicture_check_mainquestion( $id, $game, &$attempt, &$hiddenpicture, $finishattempt) |
||||
|
{ |
||||
|
global $QTYPES, $CFG; |
||||
|
|
||||
|
$responses = data_submitted(); |
||||
|
|
||||
|
$glossaryentryid = $responses->glossaryentryid; |
||||
|
$queryid = $responses->queryid; |
||||
|
|
||||
|
// Load the glossary entry |
||||
|
if (!($entry = get_record_select( 'glossary_entries', "id=$glossaryentryid"))) { |
||||
|
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 = get_record_select( 'game_queries', "id=$queryid"))) { |
||||
|
error("The query $queryid not found"); |
||||
|
} |
||||
|
|
||||
|
game_update_queries( $game, $attempt, $query, $correct, $answer); |
||||
|
|
||||
|
if( $correct){ |
||||
|
$hiddenpicture->found = 1; |
||||
|
}else{ |
||||
|
$hiddenpicture->wrong++; |
||||
|
} |
||||
|
if( !update_record( 'game_hiddenpicture', $hiddenpicture)){ |
||||
|
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); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
//Finish the game |
||||
|
$query = get_record_select( 'game_queries', "attemptid=$hiddenpicture->id AND col=0", '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> '; |
||||
|
|
||||
|
if (! $cm = get_record("course_modules", "id", $id)) { |
||||
|
error("Course Module ID was incorrect id=$id"); |
||||
|
} |
||||
|
|
||||
|
echo "<a href=\"$CFG->wwwroot/course/view.php?id=$cm->course\">".get_string( 'finish', 'game').'</a> '; |
||||
|
} |
||||
|
|
||||
|
function game_showpicture( $id, $game, $attempt, $query, $cells, $foundcells, $usemap) |
||||
|
{ |
||||
|
global $CFG; |
||||
|
|
||||
|
$filename = $query->attachment; |
||||
|
$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=$filename&n=$filenamenumbers"; |
||||
|
$imagesrc = "hiddenpicture/picture.php?$params"; |
||||
|
|
||||
|
$size = getimagesize ($filename); |
||||
|
if( $game->param4 > 10){ |
||||
|
$width = $game->param4; |
||||
|
$height = $size[ 1] * $width / $size[ 0]; |
||||
|
}else if( $game->param5 > 10){ |
||||
|
$height = $game->param5; |
||||
|
$width = $size[ 0] * $height / $size[ 1]; |
||||
|
}else |
||||
|
{ |
||||
|
$width = $size[ 0]; |
||||
|
$height = $size[ 1]; |
||||
|
} |
||||
|
|
||||
|
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>"; |
||||
|
} |
||||
|
} |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 449 B |
@ -0,0 +1,164 @@ |
|||||
|
<?php // $Id: index.php,v 1.5.2.2 2010/07/24 03:30:22 arborrow Exp $
|
||||
|
/** |
||||
|
* This page lists all the instances of game module in a particular course |
||||
|
* |
||||
|
* @author |
||||
|
* @version $Id: index.php,v 1.5.2.2 2010/07/24 03:30:22 arborrow Exp $ |
||||
|
* @package game |
||||
|
**/ |
||||
|
|
||||
|
require_once("../../config.php"); |
||||
|
require_once("lib.php"); |
||||
|
require_once("locallib.php"); |
||||
|
|
||||
|
$id = required_param('id', PARAM_INT); // course |
||||
|
|
||||
|
if (! $course = get_record('course', 'id', $id)) { |
||||
|
error('Course ID is incorrect'); |
||||
|
} |
||||
|
|
||||
|
$coursecontext = get_context_instance(CONTEXT_COURSE, $id); |
||||
|
|
||||
|
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 |
||||
|
|
||||
|
if ($course->category) { |
||||
|
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->"; |
||||
|
} else { |
||||
|
$navigation = ''; |
||||
|
} |
||||
|
|
||||
|
$navlinks = array(); |
||||
|
$navlinks[] = array('name' => $strgames, 'link' => "index.php?id=$course->id", 'type' => 'activity'); |
||||
|
|
||||
|
if( function_exists( 'build_navigation')){ |
||||
|
$navigation = build_navigation( $navlinks); |
||||
|
|
||||
|
print_header( $course->shortname, $course->shortname, $navigation); |
||||
|
}else{ |
||||
|
if ($course->category) { |
||||
|
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->"; |
||||
|
} else { |
||||
|
$navigation = ''; |
||||
|
} |
||||
|
print_header("$course->shortname: $strgames", "$course->fullname", "$navigation $strgames", "", "", true, "", navmenu($course)); |
||||
|
} |
||||
|
|
||||
|
/// 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") { |
||||
|
$headings = array ($strweek, $strname); |
||||
|
$align = array ("center", "left"); |
||||
|
} else if ($course->format == "topics") { |
||||
|
$headings = array ($strtopic, $strname); |
||||
|
$align = array ("center", "left", "left", "left"); |
||||
|
} else { |
||||
|
$headings = array ($strname); |
||||
|
$align = array ("left", "left", "left"); |
||||
|
} |
||||
|
|
||||
|
$showing = ''; // default |
||||
|
|
||||
|
if (has_capability('mod/game:viewreports', $coursecontext)) { |
||||
|
array_push($headings, get_string('attempts', 'game')); |
||||
|
array_push($align, 'left'); |
||||
|
$showing = 'stats'; |
||||
|
} else if (has_any_capability(array('mod/game:reviewmyattempts', 'mod/game:attempt'), $coursecontext)) { |
||||
|
array_push($headings, get_string('bestgrade', 'quiz')); |
||||
|
array_push($align, 'left'); |
||||
|
$showing = 'scores'; // default |
||||
|
} |
||||
|
|
||||
|
$table->head = $headings; |
||||
|
$table->align = $align; |
||||
|
|
||||
|
/// Populate the table with the list of instances. |
||||
|
$currentsection = ''; |
||||
|
foreach ($games as $game) { |
||||
|
$cm = get_coursemodule_from_instance('game', $game->id); |
||||
|
$context = get_context_instance(CONTEXT_MODULE, $cm->id); |
||||
|
$data = array(); |
||||
|
|
||||
|
// Section number if necessary. |
||||
|
$strsection = ''; |
||||
|
if ($game->section != $currentsection) { |
||||
|
if ($game->section) { |
||||
|
$strsection = $game->section; |
||||
|
} |
||||
|
|
||||
|
$currentsection = $game->section; |
||||
|
} |
||||
|
$data[] = $strsection; |
||||
|
|
||||
|
// Link to the instance. |
||||
|
$class = ''; |
||||
|
if (!$game->visible) { |
||||
|
$class = ' class="dimmed"'; |
||||
|
} |
||||
|
$link = "<a$class href=\"view.php?id=$game->coursemodule\">" . format_string($game->name, true) . '</a>'; |
||||
|
|
||||
|
$data[] = $link; |
||||
|
|
||||
|
if ($showing == 'stats') { |
||||
|
// The $game objects returned by get_all_instances_in_course have the necessary $cm |
||||
|
// fields set to make the following call work. |
||||
|
$attemptcount = game_num_attempt_summary($game, $game); |
||||
|
if ($attemptcount) { |
||||
|
$data[] = "<a$class href=\"report.php?id=$game->coursemodule\">$attemptcount</a>"; |
||||
|
} else { |
||||
|
$data[] = ''; |
||||
|
} |
||||
|
} else if ($showing == 'scores') { |
||||
|
|
||||
|
// Grade and feedback. |
||||
|
$bestscore = game_get_best_score($game, $USER->id); |
||||
|
$attempts = game_get_user_attempts($game->id, $USER->id, 'all'); |
||||
|
list($someoptions, $alloptions) = game_get_combined_reviewoptions($game, $attempts, $context); |
||||
|
|
||||
|
$grade = ''; |
||||
|
$feedback = ''; |
||||
|
if ($game->grade && !is_null($bestscore)) { |
||||
|
if ($alloptions->scores) { |
||||
|
$bestgrade = round( $bestscore * $game->grade / 100, $game->decimalpoints); |
||||
|
$grade = "$bestgrade / $game->grade"; |
||||
|
} |
||||
|
}else if( $bestscore != 0){ |
||||
|
$grade = round( 100 * $bestscore, $game->decimalpoints).' %'; |
||||
|
} |
||||
|
$data[] = $grade; |
||||
|
} |
||||
|
|
||||
|
$table->data[] = $data; |
||||
|
} |
||||
|
|
||||
|
echo "<br />"; |
||||
|
|
||||
|
print_table($table); |
||||
|
|
||||
|
/// Finish the page |
||||
|
|
||||
|
print_footer($course); |
||||
|
|
||||
|
?> |
@ -0,0 +1,295 @@ |
|||||
|
<?php // $Id: game.php,v 1.1.2.9 2011/08/27 19:40:28 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'; |
||||
|
$string[ 'bookquiz_questions'] = 'Associa categories de preguntes amb capítuls del llibre'; |
||||
|
|
||||
|
//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[ 'finish'] = 'Fi del joc'; |
||||
|
$string[ 'letter'] = 'lletra'; |
||||
|
$string[ 'letters'] = 'lletres'; |
||||
|
$string[ 'nextgame'] = 'Següent joc'; |
||||
|
$string[ 'no_words'] = 'Cap paraula trobada'; |
||||
|
$string[ 'print'] = 'Imprimir'; |
||||
|
|
||||
|
//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[ 'overview'] = 'Llistat'; |
||||
|
$string[ 'pagesize'] = 'Preguntes per pàgina:'; |
||||
|
$string[ 'selectall'] = 'Seleccionar tots'; |
||||
|
$string[ 'selectnone'] = 'Desmarcar tots'; |
||||
|
$string[ 'showdetailedmarks'] = 'Mostrar detalls de marca'; |
||||
|
$string[ 'startedon'] = 'Començà en'; |
||||
|
$string[ 'timecompleted'] = 'Completat'; |
||||
|
$string[ 'timetaken'] = 'Temps utilitzat'; |
||||
|
$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'; |
||||
|
|
||||
|
//attempt.php |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'Jocs'; |
||||
|
|
||||
|
//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ó'; |
||||
|
$string[ 'only_teachers'] = 'Només el professor pot veure aquesta pàgina'; |
||||
|
|
||||
|
//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'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'Joc'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'Intents'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = 'Intent $a'; |
||||
|
$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[ 'noattempts'] = 'No s\'ha fet cap intent en aquest qüestionari'; |
||||
|
$string[ 'percent'] = 'Percentatge'; |
||||
|
|
||||
|
//locallib.php |
||||
|
$string[ 'attemptfirst'] = 'Primer intent'; |
||||
|
$string[ 'attemptlast'] = 'Darrer intent'; |
||||
|
$string[ 'gradeaverage'] = 'Nota promig'; |
||||
|
$string[ 'gradehighest'] = 'Nota més alta'; |
||||
|
|
||||
|
//mod.html |
||||
|
$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[ '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[ '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_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_pictureglossary'] = 'El glossari per la qüestió principal'; |
||||
|
$string[ 'hiddenpicture_pictureglossarycategories'] = 'La categoría de glossari per la qüestió principal'; |
||||
|
$string[ 'hiddenpicture_width'] = 'Establir l\'amplada de la imatge en'; |
||||
|
$string[ 'millionaire_background'] = 'Color de fons'; |
||||
|
$string[ 'millionaire_shuffle'] = 'Barrejar preguntes'; |
||||
|
$string[ 'selectgame'] = 'Seleccionar joc'; |
||||
|
$string[ 'snakes_background'] = 'Fons'; |
||||
|
$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[ 'toptext'] = 'Text de la part superior'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
$string[ 'cross_options'] = 'Opcions dels Mots encreuats'; |
||||
|
$string[ 'cryptex_options'] = 'Opcions del Criptograma'; |
||||
|
$string[ 'hangman_options'] = 'Opcions del Penjat'; |
||||
|
$string[ 'headerfooter_options'] = 'caOpcions de Capçalera/Peu de pàgina'; |
||||
|
$string[ 'hiddenpicture_options'] = '\'Imatge Amagada\' opcions'; |
||||
|
$string[ 'millionaire_options'] = 'Opcions del Millionari'; |
||||
|
$string[ 'snakes_board'] = 'Tauler'; |
||||
|
$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[ 'sudoku_options'] = 'Opcions del Sudoku'; |
||||
|
$string[ 'userdefined'] = 'Definit per l\'usuari'; |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'formatdatetime'] = '%%d %%b %%Y, %%I:%%M %%p'; |
||||
|
$string[ 'lastip'] = 'IP de l\'estudiant'; |
||||
|
$string[ 'preview'] = 'Visualitzar'; |
||||
|
$string[ 'showsolution'] = 'solució'; |
||||
|
$string[ 'timefinish'] = 'Fi del joc'; |
||||
|
$string[ 'timelastattempt'] = 'Darrer intent'; |
||||
|
$string[ 'timestart'] = 'Començament'; |
||||
|
|
||||
|
//review.php |
||||
|
$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'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'clearrepetitions'] = 'Esborrar estadístiques'; |
||||
|
$string[ 'computerepetitions'] = 'Recalcular estadístiques'; |
||||
|
$string[ 'feedbacks'] = 'Missatges de resposta correcta'; |
||||
|
$string[ 'repetitions'] = 'Repeticions'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'export_to_html'] = 'Exportar a HTML'; |
||||
|
$string[ 'export_to_javame'] = 'Exportar a Javame'; |
||||
|
$string[ 'info'] = 'Info'; |
||||
|
$string[ 'results'] = 'Resultats'; |
||||
|
$string[ 'showanswers'] = 'Mostrar respostes'; |
||||
|
$string[ 'showattempts'] = 'Mostrar els intents'; |
||||
|
|
||||
|
//view.php |
||||
|
$string[ 'attemptgamenow'] = 'Intentar jugar ara'; |
||||
|
$string[ 'continueattemptgame'] = 'Continueu un intent previ de joc'; |
||||
|
$string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade.'; |
||||
|
$string[ 'marks'] = 'Marques'; |
||||
|
$string[ 'nomoreattempts'] = 'No es permeten més intents'; |
||||
|
$string[ 'reattemptgame'] = 'Joc de reintent'; |
||||
|
$string[ 'yourfinalgradeis'] = 'La seva nota fina en aquest joc és $a.'; |
||||
|
|
||||
|
//Untranslated |
||||
|
//cross/play.php $string[ 'win'] = 'Congratulations !!!!'; |
||||
|
//db/access.php $string[ 'game:grade'] = 'Grade games manually'; |
||||
|
//db/access.php $string[ 'game:preview'] = 'Preview Games'; |
||||
|
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions"; |
||||
|
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.'; |
||||
|
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.'; |
||||
|
//attempt.php $string[ 'gameclosed'] = 'This game closed on {$a}'; |
||||
|
//attempt.php $string[ 'gamenotavailable'] = 'The game will not be available until {$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."; |
||||
|
//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[ '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_file'] = 'File for background'; |
||||
|
//view.php $string[ 'gamecloses'] = 'Game closes'; |
||||
|
//view.php $string[ 'gameopens'] = 'Game opens'; |
@ -0,0 +1,294 @@ |
|||||
|
<?php // $Id: game.php,v 1.5.2.13 2011/08/27 19:40:28 bdaloukas Exp $
|
||||
|
// translated to Deutsch (de) by Dimitris Mpelos, Joachim Vogelgesang and 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!</h3><p>Klicken Sie auf ein Wort um zu beginnen.</p>'; |
||||
|
$string[ 'finish'] = 'Spiel beenden'; |
||||
|
$string[ 'letter'] = 'Buchstabe'; |
||||
|
$string[ 'letters'] = 'Buchstaben'; |
||||
|
$string[ 'nextgame'] = 'Neues Spiel'; |
||||
|
$string[ 'no_words'] = 'Keine Wörter gefunden!'; |
||||
|
$string[ 'print'] = 'Drucken'; |
||||
|
$string[ 'win'] = 'Glückwunsch !!!'; |
||||
|
|
||||
|
//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: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'] = 'Alle Versuche anzeigen'; |
||||
|
$string[ 'allstudents'] = 'Zeige alle $a'; |
||||
|
$string[ 'attemptsonly'] = 'Nur Teilnehmer mit Versuchen anzeigen'; |
||||
|
$string[ 'deleteattemptcheck'] = 'Sind Sie sicher, dass Sie diese(n) Versuch(e) löschen wollen?'; |
||||
|
$string[ 'displayoptions'] = 'Anzeige-Optionen'; |
||||
|
$string[ 'downloadods'] = 'Herunterladen 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[ 'overview'] = 'Übersicht'; |
||||
|
$string[ 'pagesize'] = 'Fragen je Seite:'; |
||||
|
$string[ 'selectall'] = 'Alle auswählen'; |
||||
|
$string[ 'selectnone'] = 'Alle abwählen'; |
||||
|
$string[ 'showdetailedmarks'] = 'Bewertungsdetails anzeigen'; |
||||
|
$string[ 'startedon'] = 'Gestartet am'; |
||||
|
$string[ 'timecompleted'] = 'Abgeschlossen'; |
||||
|
$string[ 'timetaken'] = 'Zeitaufwand'; |
||||
|
$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!'; |
||||
|
|
||||
|
//attempt.php |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'Spiele'; |
||||
|
|
||||
|
//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:'; |
||||
|
$string[ 'only_teachers'] = 'Nur Lehrende können diese Seite sehen'; |
||||
|
|
||||
|
//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'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'Spiel'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'Versuche'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = 'Versuch $a'; |
||||
|
$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[ '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'; |
||||
|
|
||||
|
//locallib.php |
||||
|
$string[ 'attemptfirst'] = 'Erster Versuch'; |
||||
|
$string[ 'attemptlast'] = 'Letzter Versuch'; |
||||
|
$string[ 'gradeaverage'] = 'Durchschnittsbewertung'; |
||||
|
$string[ 'gradehighest'] = 'Höchste Bewertung'; |
||||
|
|
||||
|
//mod.html |
||||
|
$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[ 'cryptex_maxcols'] = 'Höchstzahl an Zeilen des Rätsels'; |
||||
|
$string[ 'cryptex_maxtries'] = 'Maximale Versuche'; |
||||
|
$string[ 'cryptex_maxwords'] = 'Höchstzahl von Wörtern des Rätsels'; |
||||
|
$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_maxtries'] = 'Wörterzahl pro Spiel'; |
||||
|
$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_pictureglossary'] = 'Wörterbuch für Hauptfrage und Bild'; |
||||
|
$string[ 'hiddenpicture_pictureglossarycategories'] = 'Die Kategorie des Glossars für die Haupt-Frage'; |
||||
|
$string[ 'hiddenpicture_width'] = 'Breite des Bildes'; |
||||
|
$string[ 'millionaire_background'] = 'Hintergrundfarbe'; |
||||
|
$string[ 'millionaire_shuffle'] = 'Zufallsfragen'; |
||||
|
$string[ 'selectgame'] = 'Wähle ein Spiel'; |
||||
|
$string[ 'snakes_background'] = 'Hintergrund'; |
||||
|
$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[ 'toptext'] = 'Text oben'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
$string[ 'cross_options'] = 'Kreuzworträtsel-Optionen'; |
||||
|
$string[ 'cryptex_options'] = 'Rätsel-Optionen'; |
||||
|
$string[ 'hangman_maximum_number_of_errors'] = 'Maximale Anzahl von Versuchen (Bilder mit Namensschema hangman_0.jpg, hangman_1.jpg, ...)'; |
||||
|
$string[ 'hangman_options'] = 'Galgenmännchen-Optionen'; |
||||
|
$string[ 'headerfooter_options'] = 'Kopfzeile/Fußzeile Optionen'; |
||||
|
$string[ 'hiddenpicture_options'] = '\'Verstecktes Bild\' Optionen'; |
||||
|
$string[ 'millionaire_options'] = 'Millionär-Optionen'; |
||||
|
$string[ 'snakes_board'] = 'Spielbrett'; |
||||
|
$string[ 'snakes_cols'] = 'Spalten'; |
||||
|
$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_options'] = '\'Schlangen und Leitern\' Optionen'; |
||||
|
$string[ 'snakes_rows'] = 'Reihen'; |
||||
|
$string[ 'sudoku_options'] = 'Sudoku-Optionen'; |
||||
|
$string[ 'userdefined'] = 'benutzerdefiniert'; |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'formatdatetime'] = '%%d %%b %%Y, %%I:%%M %%p'; |
||||
|
$string[ 'lastip'] = 'Benutzer IP'; |
||||
|
$string[ 'preview'] = 'Vorschau'; |
||||
|
$string[ 'showsolution'] = 'Lösung'; |
||||
|
$string[ 'timefinish'] = 'Spiel beendet'; |
||||
|
$string[ 'timelastattempt'] = 'Letzter Versuch'; |
||||
|
$string[ 'timestart'] = 'Start'; |
||||
|
|
||||
|
//review.php |
||||
|
$string[ 'completedon'] = 'Beendet am'; |
||||
|
$string[ 'outof'] = '$a->grade von maximal $a->maxgrade'; |
||||
|
$string[ 'review'] = 'Überprüfung'; |
||||
|
$string[ 'reviewofattempt'] = 'Überprüfung eines Versuchs $a'; |
||||
|
$string[ 'startagain'] = 'Neu starten'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'clearrepetitions'] = 'Statistiken löschen'; |
||||
|
$string[ 'computerepetitions'] = 'Statistiken neu berechnen'; |
||||
|
$string[ 'feedbacks'] = 'Meldungen bei korrekter Antwort'; |
||||
|
$string[ 'repetitions'] = 'Wiederholungen'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'export_to_html'] = 'Export nach HTML'; |
||||
|
$string[ 'export_to_javame'] = 'Export nach Javame'; |
||||
|
$string[ 'info'] = 'Info'; |
||||
|
$string[ 'results'] = 'Ergebnisse'; |
||||
|
$string[ 'showanswers'] = 'Antworten zeigen'; |
||||
|
$string[ 'showattempts'] = 'Versuche anzeigen'; |
||||
|
|
||||
|
//view.php |
||||
|
$string[ 'attemptgamenow'] = 'Jetzt Spiel starten'; |
||||
|
$string[ 'continueattemptgame'] = 'Einen früheren Versuch des Spiels fortführen'; |
||||
|
$string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade.'; |
||||
|
$string[ 'marks'] = 'Markierungen'; |
||||
|
$string[ 'nomoreattempts'] = 'Es sind keine weiteren Versuche mehr erlaubt'; |
||||
|
$string[ 'reattemptgame'] = 'Spiel nochmals probieren'; |
||||
|
$string[ 'yourfinalgradeis'] = 'Ihre Endbewertung für dieses Spiel ist $a.'; |
||||
|
|
||||
|
//Untranslated |
||||
|
//attempt.php $string[ 'gameclosed'] = 'This game closed on {$a}'; |
||||
|
//attempt.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}'; |
||||
|
//mod_form.php $string[ 'gameclose'] = 'Close the game'; |
||||
|
//mod_form.php $string[ 'gameopen'] = 'Open the game'; |
||||
|
//view.php $string[ 'gamecloses'] = 'Game closes'; |
||||
|
//view.php $string[ 'gameopens'] = 'Game opens'; |
@ -0,0 +1,300 @@ |
|||||
|
<?php // $Id: game.php,v 1.17.2.14 2012/01/16 21:45:05 bdaloukas Exp $
|
||||
|
// translated 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_questions'] = 'Αντιστοίχιση κατηγοριών ερωτήσεων με κεφάλαια του βιβλίου'; |
||||
|
|
||||
|
//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[ 'finish'] = 'Τέλος παιχνιδιού'; |
||||
|
$string[ 'letter'] = 'γράμμα'; |
||||
|
$string[ 'letters'] = 'γράμματα'; |
||||
|
$string[ 'nextgame'] = 'Νέο παιχνίδι'; |
||||
|
$string[ 'no_words'] = 'Δεν βρέθηκε καμία λέξη'; |
||||
|
$string[ 'print'] = 'Εκτύπωση'; |
||||
|
$string[ 'win'] = 'Συγχαρητήρια !!!'; |
||||
|
|
||||
|
//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[ 'attemptsonly'] = 'Δείξε μόνο τους μαθητές που έχουν προσπαθήσει'; |
||||
|
$string[ 'deleteattemptcheck'] = 'Are you absolutely sure you want to completely delete these attempts?'; |
||||
|
$string[ 'displayoptions'] = 'Εμφάνιση παραμέτρων'; |
||||
|
$string[ 'downloadods'] = 'Αποθήκευση σε μορφή ODS'; |
||||
|
$string[ 'feedback'] = 'Απάντηση'; |
||||
|
$string[ 'noattemptsonly'] = 'Εμφάνιση $a που δεν έχουν καθόλου προσπάθειες'; |
||||
|
$string[ 'numattempts'] = '$a->studentnum $a->studentstring έκαναν $a->attemptnum προσπάθειες'; |
||||
|
$string[ 'overview'] = 'Σύνοψη'; |
||||
|
$string[ 'pagesize'] = 'Ερωτήσεις ανά σελίδα:'; |
||||
|
$string[ 'selectall'] = 'Επιλογή όλων'; |
||||
|
$string[ 'selectnone'] = 'Αποεπιλογή όλων'; |
||||
|
$string[ 'showdetailedmarks'] = 'Λεπτομέρειες ερωτήσεων'; |
||||
|
$string[ 'startedon'] = 'Ξεκίνησε στις'; |
||||
|
$string[ 'timecompleted'] = 'Συμπληρωμένο'; |
||||
|
$string[ 'timetaken'] = 'Χρόνος που χρειάστηκε'; |
||||
|
$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'] = 'Δεν βρέθηκαν λέξεις στο λεξικό'; |
||||
|
|
||||
|
//attempt.php |
||||
|
$string[ 'gameclosed'] = 'Το παιχνίδι έκλεισε στις {$a}'; |
||||
|
$string[ 'gamenotavailable'] = 'Το παιχνίδι δε θα είναι διαθέσιμο μέχρι: {$a}'; |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'Παιχνίδια'; |
||||
|
|
||||
|
//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'] = 'Έκδοση:'; |
||||
|
$string[ 'only_teachers'] = 'Μόνο teacher μπορούν να δουν αυτή τη σελίδα'; |
||||
|
|
||||
|
//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'] = 'Βαθμολογία'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'Παιχνίδι'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'Προσπάθειες'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = 'Προσπάθεια $a'; |
||||
|
$string[ 'game_bookquiz'] = 'Βιβλίο με ερωτήσεις'; |
||||
|
$string[ 'game_contest'] = 'Διαγωνισμός'; |
||||
|
$string[ 'game_cross'] = 'Σταυρόλεξο'; |
||||
|
$string[ 'game_cryptex'] = 'Κρυπτόλεξο'; |
||||
|
$string[ 'game_hangman'] = 'Κρεμάλα'; |
||||
|
$string[ 'game_hiddenpicture'] = "Η κρυμμένη εικόνα"; |
||||
|
$string[ 'game_millionaire'] = 'Εκατομμυριούχος'; |
||||
|
$string[ 'game_snakes'] = 'Φιδάκι'; |
||||
|
$string[ 'game_sudoku'] = 'Sudoku'; |
||||
|
$string[ 'noattempts'] = 'Καμιά προσπάθεια δεν έγινε σε αυτό το παιχνίδι'; |
||||
|
$string[ 'percent'] = 'Ποσοστό'; |
||||
|
$string[ 'reset_game_all'] = 'Διαγραφή προσπαθειών από όλα τα παιχνίδια'; |
||||
|
$string[ 'reset_game_deleted_course'] = 'Διαγραφή προσπαθειών από όλα τα διαγραμμένα μαθήματα'; |
||||
|
|
||||
|
//locallib.php |
||||
|
$string[ 'attemptfirst'] = 'Πρώτη προσπάθεια'; |
||||
|
$string[ 'attemptlast'] = 'Τελευταία προσπάθεια'; |
||||
|
$string[ 'convertfrom'] = 'ΆΈΉΊΌΎΏ'; |
||||
|
$string[ 'convertto'] = 'ΑΕΗΙΟΥΩ'; |
||||
|
$string[ 'gradeaverage'] = 'Μέσος βαθμός'; |
||||
|
$string[ 'gradehighest'] = 'Ο υψηλότερος βαθμός'; |
||||
|
|
||||
|
//mod.html |
||||
|
$string[ 'bottomtext'] = 'Κείμενο στο κάτω μέρος της σελίδας'; |
||||
|
$string[ 'cross_layout'] = 'Τρόπος εμφάνισης'; |
||||
|
$string[ 'cross_layout0'] = 'Οι ορισμοί κάτω από το σταυρόλεξο'; |
||||
|
$string[ 'cross_layout1'] = 'Οι ορισμοί στα δεξιά του σταυρολέξου'; |
||||
|
$string[ 'cross_maxcols'] = 'Μέγιστος αριθμός γραμμών/στηλών στο σταυρόλεξο'; |
||||
|
$string[ 'cross_maxwords'] = 'Μέγιστος αριθμός λέξεων στο σταυρόλεξο'; |
||||
|
$string[ 'cryptex_maxcols'] = 'Μέγιστος αριθμός γραμμών/στηλών στο κρυπτόλεξο'; |
||||
|
$string[ 'cryptex_maxtries'] = 'Μέγιστος αριθμός προσπαθειών'; |
||||
|
$string[ 'cryptex_maxwords'] = 'Μέγιστος αριθμός λέξεων στο κρυπτόλεξο'; |
||||
|
$string[ 'grademethod'] = 'Μέθοδος βαθμολόγησης'; |
||||
|
$string[ 'hangman_allowspaces'] = 'Να επιτρέπονται τα κενά στις λέξεις'; |
||||
|
$string[ 'hangman_allowsub'] = 'Nα επιτρέπεται το σύμβολο - στις λέξεις'; |
||||
|
$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_height'] = 'Ορισμός ύψους εικόνας'; |
||||
|
$string[ 'hiddenpicture_pictureglossary'] = 'Το λεξικό για την κυρίως ερώτηση'; |
||||
|
$string[ 'hiddenpicture_pictureglossarycategories'] = 'Η κατηγορία λεξικού για την κυρίως ερώτηση'; |
||||
|
$string[ 'hiddenpicture_width'] = 'Ορισμός πλάτους εικόνας'; |
||||
|
$string[ 'millionaire_background'] = 'Χρώμα φόντου'; |
||||
|
$string[ 'millionaire_shuffle'] = 'Ανακάτεμα ερωτήσεων'; |
||||
|
$string[ 'selectgame'] = 'Διαλέξτε παιχνίδι'; |
||||
|
$string[ 'snakes_background'] = 'Πίστα'; |
||||
|
$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[ 'toptext'] = 'Κείμενο στο πάνω μέρος της σελίδας'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
$string[ 'contest_has_notes'] = 'Επιτρέπονται σημειώσεις'; |
||||
|
$string[ 'contest_options'] = 'Παράμετροι διαγωνισμού'; |
||||
|
$string[ 'cross_options'] = 'Παράμετροι Σταυρολέξου'; |
||||
|
$string[ 'cryptex_options'] = 'Παράμετροι κρυπτόλεξου'; |
||||
|
$string[ 'gameclose'] = 'Κλείσιμο του παιχνιδιού'; |
||||
|
$string[ 'gameopen'] = 'Άνοιγμα του παιχνιδιού'; |
||||
|
$string[ 'hangman_maximum_number_of_errors'] = 'Μέγιστος αριθμός λάθος γραμμάτων (πρέπει να υπάρχουν τα αντίστοιχα αρχεία με όνομα hangman_0.jpg, hangman_1.jpg, ...)'; |
||||
|
$string[ 'hangman_options'] = 'Παράμετροι Κρεμάλας'; |
||||
|
$string[ 'headerfooter_options'] = 'Παράμετροι κεφαλίδας/υποσελίδου'; |
||||
|
$string[ 'hiddenpicture_options'] = 'Παράμετροι Κρυμμένης Εικόνας'; |
||||
|
$string[ 'millionaire_options'] = 'Παράμετροι Εκατομμυριούχου'; |
||||
|
$string[ 'snakes_board'] = 'Πίστα'; |
||||
|
$string[ 'snakes_cols'] = 'Cols'; |
||||
|
$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_options'] = 'Παράμετροι για το Φιδάκι'; |
||||
|
$string[ 'snakes_rows'] = 'Rows'; |
||||
|
$string[ 'sudoku_options'] = 'Παράμετροι Sudoku'; |
||||
|
$string[ 'userdefined'] = "Πίστα ορισμένη από το χρήστη"; |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'formatdatetime'] = '%%d %%b %%Y, %%H:%%M'; |
||||
|
$string[ 'lastip'] = 'IP σπουδαστή'; |
||||
|
$string[ 'preview'] = 'Προεπισκόπηση'; |
||||
|
$string[ 'showsolution'] = 'Λύση'; |
||||
|
$string[ 'timefinish'] = 'Τέλος παιχνιδιού'; |
||||
|
$string[ 'timelastattempt'] = 'Τελευταία προσπάθεια'; |
||||
|
$string[ 'timestart'] = 'Έναρξη'; |
||||
|
|
||||
|
//review.php |
||||
|
$string[ 'completedon'] = 'Ολοκληρώθηκε στις'; |
||||
|
$string[ 'outof'] = '$a->grade από μέγιστο $a->maxgrade'; |
||||
|
$string[ 'review'] = 'Επανεξέταση'; |
||||
|
$string[ 'reviewofattempt'] = 'Επανεξέταση της προσπάθειας $a'; |
||||
|
$string[ 'startagain'] = 'Προσπάθεια ξανά'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'clearrepetitions'] = 'Μηδενισμός στατιστικών'; |
||||
|
$string[ 'computerepetitions'] = 'Επαναϋπολογισμός στατιστικών'; |
||||
|
$string[ 'feedbacks'] = 'Μήνυμα σωστής απάντησης'; |
||||
|
$string[ 'repetitions'] = 'Επαναλήψεις'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'export_to_html'] = 'Εξαγωγή σε HTML'; |
||||
|
$string[ 'export_to_javame'] = 'Εξαγωγή σε JavaMe για κινητά τηλέφωνα'; |
||||
|
$string[ 'info'] = 'Πληροφορίες'; |
||||
|
$string[ 'results'] = 'Αποτελέσματα'; |
||||
|
$string[ 'showanswers'] = 'Εμφάνιση απαντήσεων'; |
||||
|
$string[ 'showattempts'] = 'Εμφάνιση προσπαθειών'; |
||||
|
|
||||
|
//view.php |
||||
|
$string[ 'attemptgamenow'] = 'Προσπάθεια παιχνιδιού τώρα'; |
||||
|
$string[ 'contest_not_solved'] = 'Δεν λύθηκαν ακόμη'; |
||||
|
$string[ 'contest_solved'] = 'Λύθηκαν'; |
||||
|
$string[ 'contest_top'] = 'Ψηλότερη βαθμολογία'; |
||||
|
$string[ 'continueattemptgame'] = 'Συνέχιση του παιχνιδιού'; |
||||
|
$string[ 'gamecloses'] = 'Το παιχνίδι θα ανοίξει'; |
||||
|
$string[ 'gameopens'] = 'Το παιχνίδι θα κλείσει'; |
||||
|
$string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade.'; |
||||
|
$string[ 'marks'] = 'Βαθμοί'; |
||||
|
$string[ 'nomoreattempts'] = 'Δεν επιτρέπονται άλλες προσπάθειες'; |
||||
|
$string[ 'reattemptgame'] = 'Προσπάθεια παιχνιδιού ξανά'; |
||||
|
$string[ 'yourfinalgradeis'] = 'Ο τελικός σου βαθμός γι\' αυτό το παιχνίδι είναι $a'; |
@ -0,0 +1,300 @@ |
|||||
|
<?php // $Id: game.php,v 1.24.2.20 2012/01/16 21:45:05 bdaloukas Exp $
|
||||
|
// translated by Vasilis Daloukas, Jim Gary |
||||
|
|
||||
|
//bookquiz/importodt.php |
||||
|
$string[ 'bookquiz_import_odt'] = 'Import from an OpenOffice file (odt)'; |
||||
|
$string[ 'bookquiz_not_select_book'] = 'You have not selected a 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_questions'] = 'Associate question categories with book chapter'; |
||||
|
|
||||
|
//cross/cross_class.php |
||||
|
$string[ 'lettersall'] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ "; |
||||
|
|
||||
|
//cross/crossdb_class.php |
||||
|
$string[ 'and'] = 'and'; |
||||
|
$string[ 'cross_correct'] = 'Correct'; |
||||
|
$string[ 'cross_corrects'] = 'Correct'; |
||||
|
$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 Game'; |
||||
|
$string[ 'cross_error_containsbadchars'] = 'The word contains illegal characters'; |
||||
|
$string[ 'cross_error_wordlength1'] = 'The correct word contains '; |
||||
|
$string[ 'cross_error_wordlength2'] = ' letters.'; |
||||
|
$string[ 'cross_pleasewait'] = 'Please wait while puzzle is loading'; |
||||
|
$string[ 'cross_welcome'] = '<h3>Welcome!</h3><p>Click on a word to begin.</p>'; |
||||
|
$string[ 'finish'] = 'End of game'; |
||||
|
$string[ 'letter'] = 'letter'; |
||||
|
$string[ 'letters'] = 'letters'; |
||||
|
$string[ 'nextgame'] = 'New game'; |
||||
|
$string[ 'no_words'] = 'There are no words'; |
||||
|
$string[ 'print'] = 'Print'; |
||||
|
$string[ 'win'] = 'Congratulations !!!!'; |
||||
|
|
||||
|
//db/access.php |
||||
|
$string[ 'game:attempt'] = 'Play games'; |
||||
|
$string[ 'game:deleteattempts'] = 'Delete attempts'; |
||||
|
$string[ 'game:grade'] = 'Grade games manually'; |
||||
|
$string[ 'game:manage'] = 'Manage'; |
||||
|
$string[ 'game:preview'] = 'Preview Games'; |
||||
|
$string[ 'game:reviewmyattempts'] = 'reviewmyattempts'; |
||||
|
$string[ 'game:view'] = 'View game information'; |
||||
|
$string[ 'game:viewreports'] = 'View game reports'; |
||||
|
|
||||
|
//hangman/play.php |
||||
|
$string[ 'hangman_correct_phrase'] = 'The correct phrase was: '; |
||||
|
$string[ 'hangman_correct_word'] = 'The correct word was: '; |
||||
|
$string[ 'hangman_gradeinstance'] = 'Overall Grade'; |
||||
|
$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'] = 'Please specify the number of horizontal columns'; |
||||
|
$string[ 'hiddenpicture_nomainquestion'] = 'There are no glossary entries in glossary $a->name with an attached picture'; |
||||
|
$string[ 'hiddenpicture_norows'] = 'Please specify the number of vertical columns'; |
||||
|
$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[ '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[ 'overview'] = 'Overview'; |
||||
|
$string[ 'pagesize'] = 'Questions per page:'; |
||||
|
$string[ 'selectall'] = 'Select all'; |
||||
|
$string[ 'selectnone'] = 'Deselect all'; |
||||
|
$string[ 'showdetailedmarks'] = 'Show mark details'; |
||||
|
$string[ 'startedon'] = 'Started on'; |
||||
|
$string[ 'timecompleted'] = 'Completed'; |
||||
|
$string[ 'timetaken'] = 'Time taken'; |
||||
|
$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 sudoku game'; |
||||
|
$string[ 'sudoku_guessnumber'] = 'Guess the correct number'; |
||||
|
$string[ 'sudoku_noentriesfound'] = 'No words found in glossary'; |
||||
|
|
||||
|
//attempt.php |
||||
|
$string[ 'gameclosed'] = 'This game closed on {$a}'; |
||||
|
$string[ 'gamenotavailable'] = 'The game will not be available until {$a}'; |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'Games'; |
||||
|
|
||||
|
//export.php |
||||
|
$string[ 'export'] = 'Export'; |
||||
|
$string[ 'html_hascheckbutton'] = 'Include check button:'; |
||||
|
$string[ 'html_hasprintbutton'] = 'Include 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:'; |
||||
|
$string[ 'only_teachers'] = 'Only teacher can see this page'; |
||||
|
|
||||
|
//exporthtml_hangman.php |
||||
|
$string[ 'hangman_loose'] = '<BIG><B>Game over</B></BIG>'; |
||||
|
$string[ 'html_hangman_new'] = 'New'; |
||||
|
|
||||
|
//exporthtml_millionaire.php |
||||
|
$string[ 'millionaire_helppeople'] = 'Ask the audience'; |
||||
|
$string[ 'millionaire_info_people'] = 'Audience says'; |
||||
|
$string[ 'millionaire_info_telephone'] = 'I think 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'] = 'Call a friend'; |
||||
|
$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'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'Game'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'Attempts'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = 'Attempt $a'; |
||||
|
$string[ 'game_bookquiz'] = 'Book with questions'; |
||||
|
$string[ 'game_contest'] = 'Contest'; |
||||
|
$string[ 'game_cross'] = 'Crossword'; |
||||
|
$string[ 'game_cryptex'] = 'Cryptex'; |
||||
|
$string[ 'game_hangman'] = 'Hang man'; |
||||
|
$string[ 'game_hiddenpicture'] = 'Hidden Picture'; |
||||
|
$string[ 'game_millionaire'] = 'Millionaire'; |
||||
|
$string[ 'game_snakes'] = 'Snakes and Ladders'; |
||||
|
$string[ 'game_sudoku'] = 'Sudoku'; |
||||
|
$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'; |
||||
|
|
||||
|
//locallib.php |
||||
|
$string[ 'attemptfirst'] = 'First attempt'; |
||||
|
$string[ 'attemptlast'] = 'Last attempt'; |
||||
|
$string[ 'convertfrom'] = ''; //Special convertation to capital letters. It is needed for some languages |
||||
|
$string[ 'convertto'] = ''; //Special convertation to capital letters. It is needed for some languages |
||||
|
$string[ 'gradeaverage'] = 'Average grade'; |
||||
|
$string[ 'gradehighest'] = 'Highest grade'; |
||||
|
|
||||
|
//mod.html |
||||
|
$string[ 'bottomtext'] = 'Text at the bottom'; |
||||
|
$string[ 'cross_layout'] = 'Layout'; |
||||
|
$string[ 'cross_layout0'] = 'Phrases on the bottom of puzzle'; |
||||
|
$string[ 'cross_layout1'] = 'Phrases on the right of puzzle'; |
||||
|
$string[ 'cross_maxcols'] = 'Maximum number of columns'; |
||||
|
$string[ 'cross_maxwords'] = 'Maximum number of words'; |
||||
|
$string[ 'cryptex_maxcols'] = 'Maximum number of columns/rows in cryptex'; |
||||
|
$string[ 'cryptex_maxtries'] = 'Maximum tries'; |
||||
|
$string[ 'cryptex_maxwords'] = 'Maximum number of words in cryptex'; |
||||
|
$string[ 'grademethod'] = 'Grading method'; |
||||
|
$string[ 'hangman_allowspaces'] = 'Allow spaces in words'; |
||||
|
$string[ 'hangman_allowsub'] = 'Allow the symbol - in words'; |
||||
|
$string[ 'hangman_imageset'] = 'Select hangman image'; |
||||
|
$string[ 'hangman_language'] = 'Language'; |
||||
|
$string[ 'hangman_maxtries'] = 'Number of words per game'; |
||||
|
$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_pictureglossary'] = 'Source glossary for main question and picture'; |
||||
|
$string[ 'hiddenpicture_pictureglossarycategories'] = 'Glossary category for main question'; |
||||
|
$string[ 'hiddenpicture_width'] = 'Set width of picture to'; |
||||
|
$string[ 'millionaire_background'] = 'Background color'; |
||||
|
$string[ 'millionaire_shuffle'] = 'Randomize questions'; |
||||
|
$string[ 'selectgame'] = 'Select game'; |
||||
|
$string[ 'snakes_background'] = 'Background'; |
||||
|
$string[ 'sourcemodule'] = 'Question Source'; |
||||
|
$string[ 'sourcemodule_book'] = 'Select a book'; |
||||
|
$string[ 'sourcemodule_glossary'] = 'Select glossary'; |
||||
|
$string[ 'sourcemodule_glossarycategory'] = 'Select glossary category'; |
||||
|
$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[ 'toptext'] = 'Text at the top'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
$string[ 'contest_has_notes'] = 'Has notes'; |
||||
|
$string[ 'contest_options'] = 'Contest options'; |
||||
|
$string[ 'cross_options'] = 'Crossword options'; |
||||
|
$string[ 'cryptex_options'] = 'Cryptex options'; |
||||
|
$string[ 'gameclose'] = 'Close the game'; |
||||
|
$string[ 'gameopen'] = 'Open the game'; |
||||
|
$string[ 'hangman_maximum_number_of_errors'] = 'Maximum number or errors (have to be images named hangman_0.jpg, hangman_1.jpg, ...)'; |
||||
|
$string[ 'hangman_options'] = 'Hangman options'; |
||||
|
$string[ 'headerfooter_options'] = 'Header/Footer options'; |
||||
|
$string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options'; |
||||
|
$string[ 'millionaire_options'] = 'Millionaire options'; |
||||
|
$string[ 'snakes_board'] = 'Board'; |
||||
|
$string[ 'snakes_cols'] = 'Cols'; |
||||
|
$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_options'] = '\'Snakes and Ladders\' options'; |
||||
|
$string[ 'snakes_rows'] = 'Rows'; |
||||
|
$string[ 'sudoku_options'] = 'Sudoku options'; |
||||
|
$string[ 'userdefined'] = "User defined "; |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'formatdatetime'] = '%%d %%b %%Y, %%I:%%M %%p'; |
||||
|
$string[ 'lastip'] = 'IP student'; |
||||
|
$string[ 'preview'] = 'Preview'; |
||||
|
$string[ 'showsolution'] = 'Solution'; |
||||
|
$string[ 'timefinish'] = 'End of game'; |
||||
|
$string[ 'timelastattempt'] = 'Last attempt'; |
||||
|
$string[ 'timestart'] = 'Start'; |
||||
|
|
||||
|
//review.php |
||||
|
$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'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'clearrepetitions'] = 'Clear statistics'; |
||||
|
$string[ 'computerepetitions'] = 'Compute statistics again'; |
||||
|
$string[ 'feedbacks'] = 'Messages correct answer'; |
||||
|
$string[ 'repetitions'] = 'Repetitions'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'export_to_html'] = 'Export to HTML'; |
||||
|
$string[ 'export_to_javame'] = 'Export to Javame'; |
||||
|
$string[ 'info'] = 'Info'; |
||||
|
$string[ 'results'] = 'Results'; |
||||
|
$string[ 'showanswers'] = 'Show answers'; |
||||
|
$string[ 'showattempts'] = 'Show attempts'; |
||||
|
|
||||
|
//view.php |
||||
|
$string[ 'attemptgamenow'] = 'Attempt game now'; |
||||
|
$string[ 'contest_not_solved'] = 'Not solved yet'; |
||||
|
$string[ 'contest_solved'] = 'Solved'; |
||||
|
$string[ 'contest_top'] = 'Top grades'; |
||||
|
$string[ 'continueattemptgame'] = 'Continue a previous attempt'; |
||||
|
$string[ 'gamecloses'] = 'Game closes'; |
||||
|
$string[ 'gameopens'] = 'Game opens'; |
||||
|
$string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade.'; |
||||
|
$string[ 'marks'] = 'Marks'; |
||||
|
$string[ 'nomoreattempts'] = 'No more attempts are allowed'; |
||||
|
$string[ 'reattemptgame'] = 'Re-attempt game'; |
||||
|
$string[ 'yourfinalgradeis'] = 'Your final grade for this game is $a.'; |
@ -0,0 +1,5 @@ |
|||||
|
<h1>Opening and closing the game</h1> |
||||
|
|
||||
|
<p>You can specify times when the game is accessible for people to make attempts.</p> |
||||
|
|
||||
|
<p>Before the opening time, and after the closing time, the game will be unavailable.</p> |
@ -0,0 +1,295 @@ |
|||||
|
<?php // $Id: game.php,v 1.7.2.11 2011/08/27 19:40:29 bdaloukas Exp $
|
||||
|
// game.php - created with Moodle 1.9.1+ (Build: 20080702) (2007101514) |
||||
|
// translation to es. Thanks to Wilmack Sanchez, Antonio Vicent, Juan Ezeiza, 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'; |
||||
|
$string[ 'bookquiz_questions'] = 'Asocie categorías de preguntas con capítulos del libro'; |
||||
|
|
||||
|
//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[ 'finish'] = 'Fin del juego'; |
||||
|
$string[ 'letter'] = 'letra'; |
||||
|
$string[ 'letters'] = 'letras'; |
||||
|
$string[ 'nextgame'] = 'Siguiente juego'; |
||||
|
$string[ 'no_words'] = 'Ninguna palabra encontrada'; |
||||
|
$string[ 'print'] = 'Imprimir'; |
||||
|
$string[ 'win'] = '¡¡¡ Felicitaciones !!!'; |
||||
|
|
||||
|
//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[ 'overview'] = 'Listado'; |
||||
|
$string[ 'pagesize'] = 'Preguntas por página:'; |
||||
|
$string[ 'selectall'] = 'Seleccione todos'; |
||||
|
$string[ 'selectnone'] = 'Des-marcar todos'; |
||||
|
$string[ 'showdetailedmarks'] = 'Mostrar detalles de marca'; |
||||
|
$string[ 'startedon'] = 'Comenzó en'; |
||||
|
$string[ 'timecompleted'] = 'Completado'; |
||||
|
$string[ 'timetaken'] = 'Tiempo utilizado'; |
||||
|
$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'; |
||||
|
|
||||
|
//attempt.php |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'Juegos'; |
||||
|
|
||||
|
//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'; |
||||
|
$string[ 'only_teachers'] = 'Sólo el profesor puede ver esta página'; |
||||
|
|
||||
|
//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'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'Juego'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'Intentos'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = 'Intento $a'; |
||||
|
$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[ 'noattempts'] = 'Ningún intento ha sido hecho en este cuestionario'; |
||||
|
$string[ 'percent'] = 'Porcentaje'; |
||||
|
|
||||
|
//locallib.php |
||||
|
$string[ 'attemptfirst'] = 'Primer intento'; |
||||
|
$string[ 'attemptlast'] = 'Último intento'; |
||||
|
$string[ 'gradeaverage'] = 'Nota promedio'; |
||||
|
$string[ 'gradehighest'] = 'Nota más alta'; |
||||
|
|
||||
|
//mod.html |
||||
|
$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[ '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[ '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_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_pictureglossary'] = 'El glosario para la cuestión principal'; |
||||
|
$string[ 'hiddenpicture_pictureglossarycategories'] = 'La categoría de glosario para la cuestión principal'; |
||||
|
$string[ 'hiddenpicture_width'] = 'Establecer el ancho de la imagen en'; |
||||
|
$string[ 'millionaire_background'] = 'Color de fondo'; |
||||
|
$string[ 'millionaire_shuffle'] = 'Mezclar preguntas'; |
||||
|
$string[ 'selectgame'] = 'Seleccionar juego'; |
||||
|
$string[ 'snakes_background'] = 'Fondo'; |
||||
|
$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[ 'toptext'] = 'Texto de la parte superior'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
$string[ 'cross_options'] = 'Opciones del Crucigrama'; |
||||
|
$string[ 'cryptex_options'] = 'Opciones del Criptograma'; |
||||
|
$string[ 'hangman_options'] = 'Opciones del Ahorcado'; |
||||
|
$string[ 'headerfooter_options'] = 'Opciones de Encabezado/Pie de página'; |
||||
|
$string[ 'hiddenpicture_options'] = '\'Imagen Oculta\' opciones'; |
||||
|
$string[ 'millionaire_options'] = 'Opciones del Millonario'; |
||||
|
$string[ 'snakes_board'] = 'Tablero'; |
||||
|
$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[ 'sudoku_options'] = 'Opciones del Sudoku'; |
||||
|
$string[ 'userdefined'] = 'Definido por el usuario'; |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'formatdatetime'] = '%%d %%b %%Y, %%I:%%M %%p'; |
||||
|
$string[ 'lastip'] = 'IP del estudiante'; |
||||
|
$string[ 'preview'] = 'Visualizar'; |
||||
|
$string[ 'showsolution'] = 'solución'; |
||||
|
$string[ 'timefinish'] = 'Fin del juego'; |
||||
|
$string[ 'timelastattempt'] = 'Último intento'; |
||||
|
$string[ 'timestart'] = 'Comienzo'; |
||||
|
|
||||
|
//review.php |
||||
|
$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'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'clearrepetitions'] = 'Borrar estadísticas'; |
||||
|
$string[ 'computerepetitions'] = 'Recalcular estadísticas'; |
||||
|
$string[ 'feedbacks'] = 'Mensajes de respuesta correcta'; |
||||
|
$string[ 'repetitions'] = 'Repeticiones'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'export_to_html'] = 'Exportar a HTML'; |
||||
|
$string[ 'export_to_javame'] = 'Exportar a Javame'; |
||||
|
$string[ 'info'] = 'Info'; |
||||
|
$string[ 'results'] = 'Resultados'; |
||||
|
$string[ 'showanswers'] = 'Mostrar respuestas'; |
||||
|
$string[ 'showattempts'] = 'Mostrar los intentos'; |
||||
|
|
||||
|
//view.php |
||||
|
$string[ 'attemptgamenow'] = 'Intente jugar ahora'; |
||||
|
$string[ 'continueattemptgame'] = 'Continue un intento previo de juego'; |
||||
|
$string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade.'; |
||||
|
$string[ 'marks'] = 'Marcas'; |
||||
|
$string[ 'nomoreattempts'] = 'No se permiten más intentos'; |
||||
|
$string[ 'reattemptgame'] = 'Juego de reintento'; |
||||
|
$string[ 'yourfinalgradeis'] = 'Su nota final en este juego es $a.'; |
||||
|
|
||||
|
//Untranslated |
||||
|
//db/access.php $string[ 'game:grade'] = 'Grade games manually'; |
||||
|
//db/access.php $string[ 'game:preview'] = 'Preview Games'; |
||||
|
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions"; |
||||
|
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.'; |
||||
|
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.'; |
||||
|
//attempt.php $string[ 'gameclosed'] = 'This game closed on {$a}'; |
||||
|
//attempt.php $string[ 'gamenotavailable'] = 'The game will not be available until {$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."; |
||||
|
//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[ '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_file'] = 'File for background'; |
||||
|
//view.php $string[ 'gamecloses'] = 'Game closes'; |
||||
|
//view.php $string[ 'gameopens'] = 'Game opens'; |
@ -0,0 +1,294 @@ |
|||||
|
<?php // $Id: game.php,v 1.4.2.11 2011/10/25 04:35:59 bdaloukas Exp $
|
||||
|
// translation to eu. Thanks to 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'; |
||||
|
$string[ 'bookquiz_questions'] = 'Galdera-kategoriak liburuaren azpikapituluekin lotu'; |
||||
|
|
||||
|
//cross/cross_class.php |
||||
|
$string[ 'lettersall'] = 'ABCDEFGHIJKLMNÑOPQRSTUVWXYZ'; |
||||
|
|
||||
|
//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[ 'finish'] = 'Jolasa bukatu da'; |
||||
|
$string[ 'letter'] = 'letra'; |
||||
|
$string[ 'letters'] = 'letrak'; |
||||
|
$string[ 'nextgame'] = 'Hurrengo jolasa'; |
||||
|
$string[ 'no_words'] = 'Ez da hitzik aurkitu'; |
||||
|
$string[ 'print'] = 'Imprimatu'; |
||||
|
$string[ 'win'] = 'Zorionak!!!'; |
||||
|
|
||||
|
//db/access.php |
||||
|
$string[ 'game:grade'] = 'Jolasak eskuz baloratu'; |
||||
|
$string[ 'game:preview'] = 'Jolasak aurreikusi'; |
||||
|
|
||||
|
//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[ 'overview'] = 'zerrenda'; |
||||
|
$string[ 'pagesize'] = 'Galderak orriko:'; |
||||
|
$string[ 'selectall'] = 'Denak aukeratu'; |
||||
|
$string[ 'selectnone'] = 'Ezein ez aukeratu'; |
||||
|
$string[ 'showdetailedmarks'] = 'Marka-zehaztapenak erakutsi'; |
||||
|
$string[ 'startedon'] = 'Noiz hasia'; |
||||
|
$string[ 'timecompleted'] = 'Osaturik'; |
||||
|
$string[ 'timetaken'] = 'Erabilitako denbora'; |
||||
|
$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'; |
||||
|
|
||||
|
//attempt.php |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'Jolasak'; |
||||
|
|
||||
|
//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:'; |
||||
|
$string[ 'only_teachers'] = 'Horri hau irakasleak bakarrik ikus dezake'; |
||||
|
|
||||
|
//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'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'Jolasa'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'Saiakerak'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = '$a saiakera'; |
||||
|
$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[ 'noattempts'] = 'Galdetegi honetan ez da saiakerarik egin'; |
||||
|
$string[ 'percent'] = 'Portzentaia'; |
||||
|
|
||||
|
//locallib.php |
||||
|
$string[ 'attemptfirst'] = 'Lehen saiakera'; |
||||
|
$string[ 'attemptlast'] = 'Azken saiakera'; |
||||
|
$string[ 'gradeaverage'] = 'Batezbesteko emaitza'; |
||||
|
$string[ 'gradehighest'] = 'Emaitza altuena'; |
||||
|
|
||||
|
//mod.html |
||||
|
$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[ 'cryptex_maxcols'] = 'Zutabe/lerroen gehienezko kopurua Hitz Zopan'; |
||||
|
$string[ 'cryptex_maxtries'] = 'Saiakeren gehinezko kopurua'; |
||||
|
$string[ 'cryptex_maxwords'] = 'Gehienezko hitz-kopurua Hitz Zopan'; |
||||
|
$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_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_pictureglossary'] = 'Galdera nagusiaren glosategia'; |
||||
|
$string[ 'hiddenpicture_pictureglossarycategories'] = 'Galdera nagusiaren glosategiko kategoria'; |
||||
|
$string[ 'hiddenpicture_width'] = 'Irudiaren zabalera neurri honetara egokitu: '; |
||||
|
$string[ 'millionaire_background'] = 'Hondoko kolorea'; |
||||
|
$string[ 'millionaire_shuffle'] = 'Galderak nahastu'; |
||||
|
$string[ 'selectgame'] = 'Jolasa aukeratu'; |
||||
|
$string[ 'snakes_background'] = 'Hondoa'; |
||||
|
$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[ 'toptext'] = 'Goialdeko testua'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
$string[ 'cross_options'] = 'Gurutzegramaren aukerak'; |
||||
|
$string[ 'cryptex_options'] = 'Hitz Zoparen aukerak'; |
||||
|
$string[ 'hangman_options'] = 'Urkatuaren aukerak'; |
||||
|
$string[ 'headerfooter_options'] = 'Goialde/Behealdeko aukerak'; |
||||
|
$string[ 'hiddenpicture_options'] = '\'Irudi Izkutuaren\' aukerak'; |
||||
|
$string[ 'millionaire_options'] = 'Aberatsaren aukerak'; |
||||
|
$string[ 'snakes_board'] = 'Taula'; |
||||
|
$string[ 'snakes_file'] = 'Hondorako fitxategia'; |
||||
|
$string[ 'snakes_options'] = '\'Sugeak eta Eskailerak\' aukerak'; |
||||
|
$string[ 'sudoku_options'] = 'Sudokuren aukerak'; |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'formatdatetime'] = '%%d %%b %%Y, %%I:%%M %%p'; |
||||
|
$string[ 'lastip'] = 'Ikaslearen IPa'; |
||||
|
$string[ 'preview'] = 'Aurreikusi'; |
||||
|
$string[ 'showsolution'] = 'soluzioa'; |
||||
|
$string[ 'timefinish'] = 'Jolasa bukatu da'; |
||||
|
$string[ 'timelastattempt'] = 'Azken saiakera'; |
||||
|
$string[ 'timestart'] = 'Hasiera'; |
||||
|
|
||||
|
//review.php |
||||
|
$string[ 'completedon'] = 'Osatua'; |
||||
|
$string[ 'outof'] = '$a->grade emaitza $a->maxgrade gehienezko puntuaziotik'; |
||||
|
$string[ 'review'] = 'Berriro aztertu'; |
||||
|
$string[ 'reviewofattempt'] = '$a saiakerak berrikusi'; |
||||
|
$string[ 'startagain'] = 'Berriz hasi'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'feedbacks'] = 'Erantzun zuzeneko mezuak'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'export_to_html'] = 'HTMLera esportatu'; |
||||
|
$string[ 'export_to_javame'] = 'Javame-ra esportatu'; |
||||
|
$string[ 'info'] = 'Info'; |
||||
|
$string[ 'results'] = 'Emaitza'; |
||||
|
$string[ 'showanswers'] = 'Erantzunak erakutsi'; |
||||
|
$string[ 'showattempts'] = 'Saiakerak erakutsi'; |
||||
|
|
||||
|
//view.php |
||||
|
$string[ 'attemptgamenow'] = 'Orain jolasten saiatu'; |
||||
|
$string[ 'continueattemptgame'] = 'Aurreko jolas-saiakerarekin jarraitu'; |
||||
|
$string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade.'; |
||||
|
$string[ 'marks'] = 'Markak'; |
||||
|
$string[ 'nomoreattempts'] = 'Ez duzu saiakera gehiago egiteko baimenik'; |
||||
|
$string[ 'reattemptgame'] = 'Saiakera berriko jolasa'; |
||||
|
$string[ 'yourfinalgradeis'] = 'Jolas honetarako zure azken nota hauxe da: $a.'; |
||||
|
|
||||
|
//Untranslated |
||||
|
//db/access.php $string[ 'game:attempt'] = 'Play games'; |
||||
|
//db/access.php $string[ 'game:deleteattempts'] = 'Delete attempts'; |
||||
|
//db/access.php $string[ 'game:manage'] = 'Manage'; |
||||
|
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts'; |
||||
|
//db/access.php $string[ 'game:view'] = 'View game information'; |
||||
|
//db/access.php $string[ 'game:viewreports'] = 'View game reports'; |
||||
|
//attempt.php $string[ 'gameclosed'] = 'This game closed on {$a}'; |
||||
|
//attempt.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}'; |
||||
|
//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[ '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_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_rows'] = 'Rows'; |
||||
|
//mod_form.php $string[ 'userdefined'] = "User defined "; |
||||
|
//showanswers.php $string[ 'clearrepetitions'] = 'Clear statistics'; |
||||
|
//showanswers.php $string[ 'computerepetitions'] = 'Compute statistics again'; |
||||
|
//showanswers.php $string[ 'repetitions'] = 'Repetitions'; |
||||
|
//view.php $string[ 'gamecloses'] = 'Game closes'; |
||||
|
//view.php $string[ 'gameopens'] = 'Game opens'; |
@ -0,0 +1,293 @@ |
|||||
|
<?php // $Id: game.php,v 1.3.2.10 2011/08/27 19:40:29 bdaloukas Exp $
|
||||
|
|
||||
|
//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'; |
||||
|
$string[ 'bookquiz_questions'] = 'Associez une catégorie de questions à un sous-chapitre'; |
||||
|
|
||||
|
//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[ 'finish'] = 'Fin du jeu'; |
||||
|
$string[ 'letter'] = 'lettre'; |
||||
|
$string[ 'letters'] = 'lettres'; |
||||
|
$string[ 'nextgame'] = 'Nouveau jeu'; |
||||
|
$string[ 'no_words'] = 'Pas de mots'; |
||||
|
$string[ 'win'] = 'Bravo !!!'; |
||||
|
|
||||
|
//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[ 'overview'] = 'Vue d\'ensemble'; |
||||
|
$string[ 'pagesize'] = 'Questions par page :'; |
||||
|
$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[ 'timetaken'] = 'Temps consomé'; |
||||
|
$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'; |
||||
|
|
||||
|
//attempt.php |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'Jeux'; |
||||
|
|
||||
|
//export.php |
||||
|
$string[ 'only_teachers'] = 'Seuls les enseignants peuvent voir cette page'; |
||||
|
|
||||
|
//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'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'Jeu'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'Tentatives'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = 'Tentative $a'; |
||||
|
$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[ 'noattempts'] = 'Aucune tentative sur ce test'; |
||||
|
|
||||
|
//locallib.php |
||||
|
$string[ 'attemptfirst'] = 'Première tentative'; |
||||
|
$string[ 'attemptlast'] = 'Dernière tentative'; |
||||
|
$string[ 'gradeaverage'] = 'Note moyenne'; |
||||
|
$string[ 'gradehighest'] = 'Note maximale'; |
||||
|
|
||||
|
//mod.html |
||||
|
$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[ 'selectgame'] = 'Sélectionner le jeu'; |
||||
|
$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'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'formatdatetime'] = '%%d %%b %%Y, %%I:%%M %%p'; |
||||
|
$string[ 'lastip'] = 'IP de l\'étudiant'; |
||||
|
$string[ 'preview'] = 'Prévisualisation'; |
||||
|
$string[ 'showsolution'] = 'solution'; |
||||
|
$string[ 'timefinish'] = 'Fin du jeu'; |
||||
|
$string[ 'timelastattempt'] = 'Dernière tentative'; |
||||
|
$string[ 'timestart'] = 'Démarrer'; |
||||
|
|
||||
|
//review.php |
||||
|
$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'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'feedbacks'] = 'Messages pour réponses correctes'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'info'] = 'Info'; |
||||
|
$string[ 'results'] = 'Resultats'; |
||||
|
$string[ 'showanswers'] = 'Montrer les réponses'; |
||||
|
|
||||
|
//view.php |
||||
|
$string[ 'attemptgamenow'] = 'Jouer maintenant'; |
||||
|
$string[ 'continueattemptgame'] = 'Continuer une tentative précédente du jeu'; |
||||
|
$string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade.'; |
||||
|
$string[ 'marks'] = 'Marques'; |
||||
|
$string[ 'nomoreattempts'] = 'Vous avez épuisé vos tentatives'; |
||||
|
$string[ 'reattemptgame'] = 'Tenter à nouveau'; |
||||
|
$string[ 'yourfinalgradeis'] = 'Votre note finale pour ce jeu est $a.'; |
||||
|
|
||||
|
//Untranslated |
||||
|
//cross/play.php $string[ 'print'] = 'Print'; |
||||
|
//db/access.php $string[ 'game:attempt'] = 'Play games'; |
||||
|
//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:preview'] = 'Preview Games'; |
||||
|
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts'; |
||||
|
//db/access.php $string[ 'game:view'] = 'View game information'; |
||||
|
//db/access.php $string[ 'game:viewreports'] = 'View game reports'; |
||||
|
//hiddenpicture/play.php $string[ 'hiddenpicture_mainsubmit'] = 'Grade main answer'; |
||||
|
//hiddenpicture/play.php $string[ 'hiddenpicture_nocols'] = 'Please specify the number of horizontal columns'; |
||||
|
//hiddenpicture/play.php $string[ 'hiddenpicture_nomainquestion'] = 'There are no glossary entries in glossary $a->name with an attached picture'; |
||||
|
//hiddenpicture/play.php $string[ 'hiddenpicture_norows'] = 'Please specify the number of vertical columns'; |
||||
|
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions"; |
||||
|
//hiddenpicture/play.php $string[ 'noglossaryentriesfound'] = 'No glossary entries found'; |
||||
|
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.'; |
||||
|
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.'; |
||||
|
//attempt.php $string[ 'gameclosed'] = 'This game closed on {$a}'; |
||||
|
//attempt.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}'; |
||||
|
//export.php $string[ 'export'] = 'Export'; |
||||
|
//export.php $string[ 'html_hascheckbutton'] = 'Include check button:'; |
||||
|
//export.php $string[ 'html_hasprintbutton'] = 'Include 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'] = 'Ask the audience'; |
||||
|
//exporthtml_millionaire.php $string[ 'millionaire_quit'] = 'Quit'; |
||||
|
//exporthtml_millionaire.php $string[ 'millionaire_telephone'] = 'Call a friend'; |
||||
|
//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."; |
||||
|
//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'; |
||||
|
//mod.html $string[ 'cross_layout'] = 'Layout'; |
||||
|
//mod.html $string[ 'cross_layout0'] = 'Phrases on the bottom of puzzle'; |
||||
|
//mod.html $string[ 'cross_layout1'] = 'Phrases on the right of puzzle'; |
||||
|
//mod.html $string[ 'cryptex_maxtries'] = 'Maximum tries'; |
||||
|
//mod.html $string[ 'hangman_allowspaces'] = 'Allow spaces in words'; |
||||
|
//mod.html $string[ 'hangman_allowsub'] = 'Allow the symbol - in words'; |
||||
|
//mod.html $string[ 'hangman_language'] = 'Language'; |
||||
|
//mod.html $string[ 'hiddenpicture_across'] = 'Cells horizontal'; |
||||
|
//mod.html $string[ 'hiddenpicture_down'] = 'Cells down'; |
||||
|
//mod.html $string[ 'hiddenpicture_height'] = 'Set height of picture to'; |
||||
|
//mod.html $string[ 'hiddenpicture_pictureglossary'] = 'Source glossary for main question and picture'; |
||||
|
//mod.html $string[ 'hiddenpicture_pictureglossarycategories'] = 'Glossary category for main question'; |
||||
|
//mod.html $string[ 'hiddenpicture_width'] = 'Set width of picture to'; |
||||
|
//mod.html $string[ 'millionaire_background'] = 'Background color'; |
||||
|
//mod.html $string[ 'millionaire_shuffle'] = 'Randomize questions'; |
||||
|
//mod.html $string[ 'sourcemodule_include_subcategories'] = 'Include subcategories'; |
||||
|
//mod.html $string[ 'toptext'] = 'Text at the top'; |
||||
|
//mod_form.php $string[ 'cross_options'] = 'Crossword options'; |
||||
|
//mod_form.php $string[ 'cryptex_options'] = 'Cryptex 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[ 'hangman_options'] = 'Hangman options'; |
||||
|
//mod_form.php $string[ 'headerfooter_options'] = 'Header/Footer options'; |
||||
|
//mod_form.php $string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options'; |
||||
|
//mod_form.php $string[ 'millionaire_options'] = 'Millionaire options'; |
||||
|
//mod_form.php $string[ 'snakes_board'] = 'Board'; |
||||
|
//mod_form.php $string[ 'snakes_cols'] = 'Cols'; |
||||
|
//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_options'] = '\'Snakes and Ladders\' options'; |
||||
|
//mod_form.php $string[ 'snakes_rows'] = 'Rows'; |
||||
|
//mod_form.php $string[ 'sudoku_options'] = 'Sudoku options'; |
||||
|
//mod_form.php $string[ 'userdefined'] = "User defined "; |
||||
|
//showanswers.php $string[ 'clearrepetitions'] = 'Clear statistics'; |
||||
|
//showanswers.php $string[ 'computerepetitions'] = 'Compute statistics again'; |
||||
|
//showanswers.php $string[ 'repetitions'] = 'Repetitions'; |
||||
|
//tabs.php $string[ 'export_to_html'] = 'Export to HTML'; |
||||
|
//tabs.php $string[ 'export_to_javame'] = 'Export to Javame'; |
||||
|
//tabs.php $string[ 'showattempts'] = 'Show attempts'; |
||||
|
//view.php $string[ 'gamecloses'] = 'Game closes'; |
||||
|
//view.php $string[ 'gameopens'] = 'Game opens'; |
@ -0,0 +1,294 @@ |
|||||
|
<?php // $Id: game.php,v 1.3.2.10 2011/08/27 19:40:29 bdaloukas Exp $
|
||||
|
//Hebrew translation 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'] = 'הספר ריק'; |
||||
|
|
||||
|
//bookquiz/questions.php |
||||
|
$string[ 'bookquiz_categories'] = 'סיווגים'; |
||||
|
$string[ 'bookquiz_chapters'] = 'פרקים'; |
||||
|
$string[ 'bookquiz_questions'] = 'קישור סיווג שאלות לפרק בספר'; |
||||
|
|
||||
|
//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[ 'finish'] = 'המשחק הסתיים'; |
||||
|
$string[ 'letter'] = 'אות'; |
||||
|
$string[ 'letters'] = 'אותיות'; |
||||
|
$string[ 'nextgame'] = 'משחק חדש'; |
||||
|
$string[ 'no_words'] = 'לא נמצאו מילים'; |
||||
|
$string[ 'print'] = 'הדפסה'; |
||||
|
$string[ 'win'] = 'כל הכבוד !!!'; |
||||
|
|
||||
|
//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'] = 'בדיקת התשובה לשאלה הראשית'; |
||||
|
$string[ 'hiddenpicture_nomainquestion'] = 'לא נמצאו מונחים באגרון $a->name אשר צורפו אליהם תמונה. <br/> אנא בחרו ארגון אחר, בו לכל מונח מצורפת תמונה'; |
||||
|
$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[ 'overview'] = 'תצוגה כללית'; |
||||
|
$string[ 'pagesize'] = 'מספר השאלות בדף:'; |
||||
|
$string[ 'selectall'] = 'בחירה כוללת'; |
||||
|
$string[ 'selectnone'] = 'ביטול סימון כולל'; |
||||
|
$string[ 'showdetailedmarks'] = 'הציגו פירוט עבור המסומנים'; |
||||
|
$string[ 'startedon'] = 'זמן תחילה'; |
||||
|
$string[ 'timecompleted'] = 'הושלם'; |
||||
|
$string[ 'timetaken'] = 'זמן המשחק'; |
||||
|
$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'] = 'לא נמצאו מילים באגרון'; |
||||
|
|
||||
|
//attempt.php |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'משחקים'; |
||||
|
|
||||
|
//export.php |
||||
|
$string[ 'export'] = 'Export'; |
||||
|
$string[ 'html_hascheckbutton'] = 'קיים כפתור אישור:'; |
||||
|
$string[ 'html_hasprintbutton'] = 'קיים כפתור הדפסה:'; |
||||
|
$string[ 'html_title'] = 'כותרת מעוצבת:'; |
||||
|
$string[ 'only_teachers'] = 'רק מורה יכול לראות דף זה'; |
||||
|
|
||||
|
//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'] = 'ניקוד'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'משחק'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'נסיונות'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = 'ניסיון $a'; |
||||
|
$string[ 'game_bookquiz'] = 'ספר עם שאלות'; |
||||
|
$string[ 'game_cross'] = 'תשבץ'; |
||||
|
$string[ 'game_hangman'] = 'הצילו את האיש התלוי'; |
||||
|
$string[ 'game_hiddenpicture'] = 'תמונה נסתרת'; |
||||
|
$string[ 'game_millionaire'] = 'מי רוצה להיות מיליונר'; |
||||
|
$string[ 'game_snakes'] = 'סולמות ונחשים'; |
||||
|
$string[ 'game_sudoku'] = 'סודוקו'; |
||||
|
$string[ 'noattempts'] = 'לא נעשו נסיונות לפתור תשבץ זה'; |
||||
|
$string[ 'percent'] = 'אחוז'; |
||||
|
|
||||
|
//locallib.php |
||||
|
$string[ 'attemptfirst'] = 'ניסיון ראשון'; |
||||
|
$string[ 'attemptlast'] = 'ניסיון אחרון'; |
||||
|
$string[ 'gradeaverage'] = 'ציון ממוצע'; |
||||
|
$string[ 'gradehighest'] = 'הציון הגובה ביותר'; |
||||
|
|
||||
|
//mod.html |
||||
|
$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'] = 'תאים אופקיים'; |
||||
|
$string[ 'hiddenpicture_down'] = 'תאים אנחיים'; |
||||
|
$string[ 'hiddenpicture_height'] = 'קבעו גובה תמונה ל'; |
||||
|
$string[ 'hiddenpicture_pictureglossary'] = 'האגרון לשאלה הראשית ולתמונות'; |
||||
|
$string[ 'hiddenpicture_pictureglossarycategories'] = 'הסיווג באגרון של השאלה הראשית'; |
||||
|
$string[ 'hiddenpicture_width'] = 'קבעו רוחב תמונה ל'; |
||||
|
$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'] = 'מספר שאלות מירבי'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'formatdatetime'] = '%%d %%b %%Y, %%I:%%M %%p'; |
||||
|
$string[ 'lastip'] = 'כתובת ה IP של התלמיד'; |
||||
|
$string[ 'preview'] = 'תצוגה מקדימה'; |
||||
|
$string[ 'showsolution'] = 'פתרון'; |
||||
|
$string[ 'timefinish'] = 'המשחק הסתיים'; |
||||
|
$string[ 'timelastattempt'] = 'ניסיון אחרון'; |
||||
|
$string[ 'timestart'] = 'התחלה'; |
||||
|
|
||||
|
//review.php |
||||
|
$string[ 'completedon'] = 'הסתיים בתאריך'; |
||||
|
$string[ 'outof'] = '$a->grade מתוך הציון המירבי : $a->maxgrade'; |
||||
|
$string[ 'review'] = 'בדיקה'; |
||||
|
$string[ 'reviewofattempt'] = 'בדיקת ניסיון $a'; |
||||
|
$string[ 'startagain'] = 'התחילו משחק זה מההתחלה'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'feedbacks'] = 'ההודעה במצב של תשובה נכונה'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'info'] = 'מידע'; |
||||
|
$string[ 'results'] = 'תוצאות'; |
||||
|
$string[ 'showanswers'] = 'הצגת תשובות'; |
||||
|
|
||||
|
//view.php |
||||
|
$string[ 'attemptgamenow'] = 'שחקו עכשיו'; |
||||
|
$string[ 'continueattemptgame'] = 'המשיכו ניסיון משחק קודם שלכם'; |
||||
|
$string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade.'; |
||||
|
$string[ 'marks'] = 'ציונים'; |
||||
|
$string[ 'nomoreattempts'] = 'אין אפשרות לנסיונות נוספים'; |
||||
|
$string[ 'reattemptgame'] = 'שחקו שוב'; |
||||
|
$string[ 'yourfinalgradeis'] = 'הציון הסופי שלכם למשחק זה הוא $a.'; |
||||
|
|
||||
|
//Untranslated |
||||
|
//bookquiz/play.php $string[ 'sudoku_submit'] = 'Grade answers'; |
||||
|
//db/access.php $string[ 'game:attempt'] = 'Play games'; |
||||
|
//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:preview'] = 'Preview Games'; |
||||
|
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts'; |
||||
|
//db/access.php $string[ 'game:view'] = 'View game information'; |
||||
|
//db/access.php $string[ 'game:viewreports'] = 'View game reports'; |
||||
|
//hiddenpicture/play.php $string[ 'hiddenpicture_nocols'] = 'Please specify the number of horizontal columns'; |
||||
|
//hiddenpicture/play.php $string[ 'hiddenpicture_norows'] = 'Please specify the number of vertical columns'; |
||||
|
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions"; |
||||
|
//hiddenpicture/play.php $string[ 'noglossaryentriesfound'] = 'No glossary entries found'; |
||||
|
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.'; |
||||
|
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.'; |
||||
|
//attempt.php $string[ 'gameclosed'] = 'This game closed on {$a}'; |
||||
|
//attempt.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}'; |
||||
|
//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'] = 'Ask the audience'; |
||||
|
//exporthtml_millionaire.php $string[ 'millionaire_quit'] = 'Quit'; |
||||
|
//exporthtml_millionaire.php $string[ 'millionaire_telephone'] = 'Call a friend'; |
||||
|
//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."; |
||||
|
//lib.php $string[ 'game_cryptex'] = 'Cryptex'; |
||||
|
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games'; |
||||
|
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses'; |
||||
|
//mod.html $string[ 'cryptex_maxtries'] = 'Maximum tries'; |
||||
|
//mod.html $string[ 'millionaire_background'] = 'Background color'; |
||||
|
//mod.html $string[ 'millionaire_shuffle'] = 'Randomize questions'; |
||||
|
//mod.html $string[ 'selectgame'] = 'Select game'; |
||||
|
//mod.html $string[ 'sourcemodule_include_subcategories'] = 'Include subcategories'; |
||||
|
//mod.html $string[ 'toptext'] = 'Text at the top'; |
||||
|
//mod_form.php $string[ 'cross_options'] = 'Crossword options'; |
||||
|
//mod_form.php $string[ 'cryptex_options'] = 'Cryptex 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[ 'hangman_options'] = 'Hangman options'; |
||||
|
//mod_form.php $string[ 'headerfooter_options'] = 'Header/Footer options'; |
||||
|
//mod_form.php $string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options'; |
||||
|
//mod_form.php $string[ 'millionaire_options'] = 'Millionaire options'; |
||||
|
//mod_form.php $string[ 'snakes_board'] = 'Board'; |
||||
|
//mod_form.php $string[ 'snakes_cols'] = 'Cols'; |
||||
|
//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_options'] = '\'Snakes and Ladders\' options'; |
||||
|
//mod_form.php $string[ 'snakes_rows'] = 'Rows'; |
||||
|
//mod_form.php $string[ 'sudoku_options'] = 'Sudoku options'; |
||||
|
//mod_form.php $string[ 'userdefined'] = "User defined "; |
||||
|
//showanswers.php $string[ 'clearrepetitions'] = 'Clear statistics'; |
||||
|
//showanswers.php $string[ 'computerepetitions'] = 'Compute statistics again'; |
||||
|
//showanswers.php $string[ 'repetitions'] = 'Repetitions'; |
||||
|
//tabs.php $string[ 'export_to_html'] = 'Export to HTML'; |
||||
|
//tabs.php $string[ 'export_to_javame'] = 'Export to Javame'; |
||||
|
//tabs.php $string[ 'showattempts'] = 'Show attempts'; |
||||
|
//view.php $string[ 'gamecloses'] = 'Game closes'; |
||||
|
//view.php $string[ 'gameopens'] = 'Game opens'; |
@ -0,0 +1,296 @@ |
|||||
|
<?php // $Id: game.php,v 1.3.2.10 2011/08/27 19:40:30 bdaloukas Exp $
|
||||
|
// translated to Hrvatski by Valentin Vidić |
||||
|
|
||||
|
//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'; |
||||
|
$string[ 'bookquiz_questions'] = 'Pridruži kategorije pitanja poglavlju knjige'; |
||||
|
|
||||
|
//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[ 'finish'] = 'Kraj igre'; |
||||
|
$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 !!!'; |
||||
|
|
||||
|
//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[ 'overview'] = 'Pregled'; |
||||
|
$string[ 'pagesize'] = 'Pitanja po stranici:'; |
||||
|
$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[ 'timetaken'] = 'Proteklo vrijeme'; |
||||
|
$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č'; |
||||
|
|
||||
|
//attempt.php |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'Igre'; |
||||
|
|
||||
|
//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:'; |
||||
|
$string[ 'only_teachers'] = 'Samo učitelj može vidjeti ovu stranicu'; |
||||
|
|
||||
|
//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'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'Igre'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'Pokušaji'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = 'Pokušaj $a'; |
||||
|
$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[ 'noattempts'] = 'Ovu igru nitko još nije pokušao igrati'; |
||||
|
$string[ 'percent'] = 'Postotak'; |
||||
|
|
||||
|
//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.html |
||||
|
$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[ 'cryptex_maxcols'] = 'Maksimalan broj stupaca/redova cryptexa'; |
||||
|
$string[ 'cryptex_maxtries'] = 'Maksimalan broj pokušaja'; |
||||
|
$string[ 'cryptex_maxwords'] = 'Maksimalan broj riječi cryptexa'; |
||||
|
$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_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_pictureglossary'] = 'Rječnik za glavno pitanje i sliku'; |
||||
|
$string[ 'hiddenpicture_pictureglossarycategories'] = 'Kategorija rječnika za glavno pitanje'; |
||||
|
$string[ 'hiddenpicture_width'] = 'Postavi širinu slike na'; |
||||
|
$string[ 'millionaire_background'] = 'Boja pozadine'; |
||||
|
$string[ 'millionaire_shuffle'] = 'Izmješaj pitanja'; |
||||
|
$string[ 'snakes_background'] = 'Pozadina'; |
||||
|
$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[ 'toptext'] = 'Tekst na vrhu'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
$string[ 'cross_options'] = 'Postavke križaljke'; |
||||
|
$string[ 'cryptex_options'] = 'Cryptex postavke'; |
||||
|
$string[ 'hangman_options'] = 'Postavke vješala'; |
||||
|
$string[ 'headerfooter_options'] = 'Postavke zaglavlja/podnožja'; |
||||
|
$string[ 'hiddenpicture_options'] = 'Postavke skrivene slike'; |
||||
|
$string[ 'millionaire_options'] = 'Postavke Milijunaša'; |
||||
|
$string[ 'snakes_options'] = 'Postavke \'Zmije i ljestve\''; |
||||
|
$string[ 'sudoku_options'] = 'Sudoku postavke'; |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'formatdatetime'] = '%%d.%%m.%%Y %%I:%%M'; |
||||
|
$string[ 'lastip'] = 'Adresa računala'; |
||||
|
$string[ 'preview'] = 'Pregled'; |
||||
|
$string[ 'showsolution'] = 'Rješenje'; |
||||
|
$string[ 'timefinish'] = 'Kraj igre'; |
||||
|
$string[ 'timelastattempt'] = 'Posljednji pokušaj'; |
||||
|
$string[ 'timestart'] = 'Početak'; |
||||
|
|
||||
|
//review.php |
||||
|
$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'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'clearrepetitions'] = 'Obriši statistiku'; |
||||
|
$string[ 'computerepetitions'] = 'Ponovo izračunaj statistiku'; |
||||
|
$string[ 'feedbacks'] = 'Poruke ispravnih odgovora'; |
||||
|
$string[ 'repetitions'] = 'Ponavljanja'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'export_to_html'] = 'Izvoz u HTML'; |
||||
|
$string[ 'export_to_javame'] = 'Izvoz u Javame'; |
||||
|
$string[ 'info'] = 'Informacije'; |
||||
|
$string[ 'results'] = 'Rezultati'; |
||||
|
$string[ 'showanswers'] = 'Prikaži odgovore'; |
||||
|
$string[ 'showattempts'] = 'Prikaži pokušaje'; |
||||
|
|
||||
|
//view.php |
||||
|
$string[ 'attemptgamenow'] = 'Pokušaj ponovo'; |
||||
|
$string[ 'continueattemptgame'] = 'Nastavi sa prethodnim pokušajem ove igre'; |
||||
|
$string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade.'; |
||||
|
$string[ 'marks'] = 'Oznake'; |
||||
|
$string[ 'nomoreattempts'] = 'Novi pokušaji nisu dozvoljeni'; |
||||
|
$string[ 'reattemptgame'] = 'Ponovni pokušaj igre'; |
||||
|
$string[ 'yourfinalgradeis'] = 'Vaša konačna ocjena za ovu igru je $a.'; |
||||
|
|
||||
|
//Untranslated |
||||
|
//db/access.php $string[ 'game:attempt'] = 'Play games'; |
||||
|
//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:preview'] = 'Preview Games'; |
||||
|
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts'; |
||||
|
//db/access.php $string[ 'game:view'] = 'View game information'; |
||||
|
//db/access.php $string[ 'game:viewreports'] = 'View game reports'; |
||||
|
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions"; |
||||
|
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.'; |
||||
|
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.'; |
||||
|
//attempt.php $string[ 'gameclosed'] = 'This game closed on {$a}'; |
||||
|
//attempt.php $string[ 'gamenotavailable'] = 'The game will not be available until {$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."; |
||||
|
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games'; |
||||
|
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses'; |
||||
|
//mod.html $string[ 'selectgame'] = 'Select game'; |
||||
|
//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_board'] = 'Board'; |
||||
|
//mod_form.php $string[ 'snakes_cols'] = 'Cols'; |
||||
|
//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_rows'] = 'Rows'; |
||||
|
//mod_form.php $string[ 'userdefined'] = "User defined "; |
||||
|
//view.php $string[ 'gamecloses'] = 'Game closes'; |
||||
|
//view.php $string[ 'gameopens'] = 'Game opens'; |
@ -0,0 +1,295 @@ |
|||||
|
<?php // $Id: game.php,v 1.4.2.10 2011/08/27 19:40:30 bdaloukas Exp $
|
||||
|
// game.php - created with Moodle 1.9.5 |
||||
|
// translated by Aristogeiton Ferentinos, Myrto Papakonstantinoy and Luciano Biondo |
||||
|
|
||||
|
//bookquiz/importodt.php |
||||
|
$string[ 'bookquiz_import_odt'] = 'importa da un archivio OpenOffice(odt)'; |
||||
|
$string[ 'bookquiz_not_select_book'] = 'Non avete selezionato un libro'; |
||||
|
$string[ 'bookquiz_subchapter'] = 'creazione di capitoli'; |
||||
|
|
||||
|
//bookquiz/play.php |
||||
|
$string[ 'bookquiz_empty'] = 'Il libro e vuoto'; |
||||
|
$string[ 'sudoku_submit'] = 'assegna un voto alle risposte'; |
||||
|
|
||||
|
//bookquiz/questions.php |
||||
|
$string[ 'bookquiz_categories'] = ' categorie'; |
||||
|
$string[ 'bookquiz_chapters'] = 'capitoli'; |
||||
|
$string[ 'bookquiz_questions'] = 'Categoria di domande relativa al capitolo del libro'; |
||||
|
|
||||
|
//cross/cross_class.php |
||||
|
$string[ 'lettersall'] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
||||
|
|
||||
|
//cross/crossdb_class.php |
||||
|
$string[ 'and'] = 'e'; |
||||
|
$string[ 'cross_correct'] = 'esatto'; |
||||
|
$string[ 'cross_corrects'] = 'correttamente'; |
||||
|
$string[ 'cross_error'] = 'errore'; |
||||
|
$string[ 'cross_errors'] = 'errori'; |
||||
|
$string[ 'cross_found_many'] = 'sono stati trovati'; |
||||
|
$string[ 'cross_found_one'] = 'è stato trovato'; |
||||
|
$string[ 'grade'] = 'voto'; |
||||
|
|
||||
|
//cross/play.php |
||||
|
$string[ 'cross_across'] = 'orizzontale'; |
||||
|
$string[ 'cross_checkbutton'] = 'controllo del cruciverba'; |
||||
|
$string[ 'cross_down'] = 'verticale'; |
||||
|
$string[ 'cross_endofgamebutton'] = 'Fine del cruciverba'; |
||||
|
$string[ 'cross_error_containsbadchars'] = 'la parola che avete scritto contiene caratteri non accettabili'; |
||||
|
$string[ 'cross_error_wordlength1'] = 'la parola giusta contiene '; |
||||
|
$string[ 'cross_error_wordlength2'] = ' lettere.'; |
||||
|
$string[ 'cross_pleasewait'] = 'per favore, attendi, stiamo caricando il cruciverba'; |
||||
|
$string[ 'cross_welcome'] = '<h3>benvenuti!</h3><p>clicca una parola per cominciare .</p>'; |
||||
|
$string[ 'finish'] = 'fine del gioco'; |
||||
|
$string[ 'letter'] = 'lettera'; |
||||
|
$string[ 'letters'] = 'lettere'; |
||||
|
$string[ 'nextgame'] = 'nuovo gioco'; |
||||
|
$string[ 'no_words'] = 'una o più parole non sono state trovate'; |
||||
|
$string[ 'print'] = 'stampa'; |
||||
|
$string[ 'win'] = 'congratulazioni!!!'; |
||||
|
|
||||
|
//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'] = 'punti a tutto il gioco '; |
||||
|
$string[ 'hangman_letters'] = ' lettere : '; |
||||
|
$string[ 'hangman_restletters_many'] = 'avete ancora <b>$a</b> delle opportunità'; |
||||
|
$string[ 'hangman_restletters_one'] = 'avete<b>solo una</b> opportunità'; |
||||
|
$string[ 'hangman_wrongnum'] = 'Sbagliato: %%d out of %%d'; |
||||
|
$string[ 'nextword'] = 'parola prossima'; |
||||
|
|
||||
|
//hiddenpicture/play.php |
||||
|
$string[ 'hiddenpicture_mainsubmit'] = 'Valuta la risposta relativa alla figura nascosta'; |
||||
|
$string[ 'hiddenpicture_nocols'] = 'dovete definire il numero di righe orizzontali'; |
||||
|
$string[ 'hiddenpicture_nomainquestion'] = 'non c’è voce di glossario che $a->name contenga una figura'; |
||||
|
$string[ 'hiddenpicture_norows'] = 'dovete definire il numero di colonne verticali'; |
||||
|
$string[ 'must_select_glossary'] = 'dovete scegliere un glossario'; |
||||
|
$string[ 'noglossaryentriesfound'] = 'Non sono state trovate voci di glossario'; |
||||
|
|
||||
|
//millionaire/play.php |
||||
|
$string[ 'millionaire_must_select_questioncategory'] = 'Dovrete scegliere una categoria di domande'; |
||||
|
$string[ 'millionaire_must_select_quiz'] = 'dovrete scegliere un quiz'; |
||||
|
|
||||
|
//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[ 'overview'] = 'sommario'; |
||||
|
$string[ 'pagesize'] = 'domande per pagina:'; |
||||
|
$string[ 'selectall'] = 'seleziona tutti'; |
||||
|
$string[ 'selectnone'] = 'deseleziona tutti'; |
||||
|
$string[ 'showdetailedmarks'] = 'mostra i dettagli delle valutazioni'; |
||||
|
$string[ 'startedon'] = 'inziato alle'; |
||||
|
$string[ 'timecompleted'] = ' completo'; |
||||
|
$string[ 'timetaken'] = 'tempo impiegato'; |
||||
|
$string[ 'unfinished'] = 'non concluso'; |
||||
|
$string[ 'withselected'] = 'con i file selezionati'; |
||||
|
|
||||
|
//snakes/play.php |
||||
|
|
||||
|
//sudoku/create.php |
||||
|
$string[ 'sudoku_create_count'] = 'numero di Sudoku che saranno creati'; |
||||
|
$string[ 'sudoku_create_start'] = 'inizia a creare i sudoku'; |
||||
|
$string[ 'sudoku_creating'] = 'creazione del <b>$a</b> sudoku'; |
||||
|
|
||||
|
//sudoku/play.php |
||||
|
$string[ 'sudoku_finishattemptbutton'] = 'fine del gioco'; |
||||
|
$string[ 'sudoku_guessnumber'] = 'indovina il numero corretto'; |
||||
|
$string[ 'sudoku_noentriesfound'] = 'non si sono trovate parole nel glossario'; |
||||
|
|
||||
|
//attempt.php |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'giochi'; |
||||
|
|
||||
|
//export.php |
||||
|
$string[ 'export'] = 'esporta'; |
||||
|
$string[ 'html_hascheckbutton'] = 'Includi il comando per controllare la risposta:'; |
||||
|
$string[ 'html_hasprintbutton'] = 'ilcludi il comando di stampa:'; |
||||
|
$string[ 'html_title'] = 'titolo della pagina:'; |
||||
|
$string[ 'javame_createdby'] = 'creato da:'; |
||||
|
$string[ 'javame_description'] = ' descrizione:'; |
||||
|
$string[ 'javame_filename'] = 'nome del file:'; |
||||
|
$string[ 'javame_icon'] = 'icona:'; |
||||
|
$string[ 'javame_maxpictureheight'] = 'massima altezza della figura:'; |
||||
|
$string[ 'javame_maxpicturewidth'] = 'massima larghezza della figura:'; |
||||
|
$string[ 'javame_name'] = 'nome:'; |
||||
|
$string[ 'javame_type'] = 'Tipo:'; |
||||
|
$string[ 'javame_vendor'] = 'Vendor:'; |
||||
|
$string[ 'javame_version'] = 'versione:'; |
||||
|
$string[ 'only_teachers'] = 'solo gli insegnanti possono vedere questa pagina'; |
||||
|
|
||||
|
//exporthtml_hangman.php |
||||
|
$string[ 'hangman_loose'] = '<BIG><B>fine del gioco</B></BIG>'; |
||||
|
$string[ 'html_hangman_new'] = 'nuovo'; |
||||
|
|
||||
|
//exporthtml_millionaire.php |
||||
|
$string[ 'millionaire_helppeople'] = 'chiedi al pubblico'; |
||||
|
$string[ 'millionaire_info_people'] = 'il pubblico dice che'; |
||||
|
$string[ 'millionaire_info_telephone'] = 'ritengo che la giusta risposta sia la…'; |
||||
|
$string[ 'millionaire_info_wrong_answer'] = 'la tua risposta è sbagliata<br> La risposta corretta è :'; |
||||
|
$string[ 'millionaire_quit'] = 'esci'; |
||||
|
$string[ 'millionaire_sourcemodule_must_quiz_question'] = 'peri il gioco del milionario, la fonte dovrebbe essere $a o Domande e non …'; |
||||
|
$string[ 'millionaire_telephone'] = 'chiedi aiuto a casa'; |
||||
|
$string[ 'must_select_questioncategory'] = ' dovete scegliere una categoria di domande'; |
||||
|
$string[ 'must_select_quiz'] = 'dovete scegliere un quiz'; |
||||
|
|
||||
|
//exporthtml_snakes.php |
||||
|
$string[ 'score'] = 'punti'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'gioco'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'prove'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = ' tentativo $a'; |
||||
|
$string[ 'game_bookquiz'] = 'libro con le domande'; |
||||
|
$string[ 'game_cross'] = 'cruciverba'; |
||||
|
$string[ 'game_cryptex'] = 'criptoverba'; |
||||
|
$string[ 'game_hangman'] = 'gioco dell\'impiccato'; |
||||
|
$string[ 'game_hiddenpicture'] = 'la pittura nascosta '; |
||||
|
$string[ 'game_millionaire'] = 'gioco del milionario'; |
||||
|
$string[ 'game_snakes'] = 'serpentino'; |
||||
|
$string[ 'game_sudoku'] = 'sudoku'; |
||||
|
$string[ 'noattempts'] = 'nessun tentativo è stato fatto in questo gioco'; |
||||
|
$string[ 'percent'] = 'percentuale'; |
||||
|
|
||||
|
//locallib.php |
||||
|
$string[ 'attemptfirst'] = 'primo tentativo'; |
||||
|
$string[ 'attemptlast'] = 'ultimo tentativo'; |
||||
|
$string[ 'gradeaverage'] = 'media dei voti'; |
||||
|
$string[ 'gradehighest'] = 'il voto più alto'; |
||||
|
|
||||
|
//mod.html |
||||
|
$string[ 'bottomtext'] = 'testo sul fondo della pagina'; |
||||
|
$string[ 'cross_layout'] = 'schema del cruciverba'; |
||||
|
$string[ 'cross_layout0'] = 'definizioni sotto il cruciverba'; |
||||
|
$string[ 'cross_layout1'] = 'definizioni a destra del cruciverba'; |
||||
|
$string[ 'cross_maxcols'] = 'Massimo numero di linee / colonne nel cruciverba'; |
||||
|
$string[ 'cross_maxwords'] = 'Massimo numero di parole nel cruciverba'; |
||||
|
$string[ 'cryptex_maxcols'] = 'Massimo numero di line / colone nel criptoverba'; |
||||
|
$string[ 'cryptex_maxtries'] = 'massimo numero di tentativi'; |
||||
|
$string[ 'cryptex_maxwords'] = 'Massimo numero di parole nel criptoverba'; |
||||
|
$string[ 'grademethod'] = 'metodo di valutazione'; |
||||
|
$string[ 'hangman_allowspaces'] = 'consenti spazi vuoti fra le parole'; |
||||
|
$string[ 'hangman_allowsub'] = 'consenti il simbolo – nelle parole'; |
||||
|
$string[ 'hangman_imageset'] = 'scegliete compilazione di fotografie'; |
||||
|
$string[ 'hangman_language'] = 'lingua delle parole'; |
||||
|
$string[ 'hangman_maxtries'] = 'numero di parole per gioco'; |
||||
|
$string[ 'hangman_showcorrectanswer'] = 'mostra la risposta esatta dopo la fine del gioco'; |
||||
|
$string[ 'hangman_showfirst'] = 'mostra la prima lettera della parola'; |
||||
|
$string[ 'hangman_showlast'] = 'mostra l\'ultima lettera della parola'; |
||||
|
$string[ 'hangman_showquestion'] = 'mostra le domande ;'; |
||||
|
$string[ 'hiddenpicture_across'] = 'numero di caselle orizzontali'; |
||||
|
$string[ 'hiddenpicture_down'] = 'numero di caselle vertcali'; |
||||
|
$string[ 'hiddenpicture_height'] = 'dimensione della altezza della figura'; |
||||
|
$string[ 'hiddenpicture_pictureglossary'] = 'glossario di riferimento per la figura nascosta e relativa domanda'; |
||||
|
$string[ 'hiddenpicture_pictureglossarycategories'] = 'glossario di riferimento per le varie domande'; |
||||
|
$string[ 'hiddenpicture_width'] = 'dimensioni della larghezza della figura'; |
||||
|
$string[ 'millionaire_background'] = 'colore di sfondo'; |
||||
|
$string[ 'millionaire_shuffle'] = 'sorteggia l\'ordine delle domande'; |
||||
|
$string[ 'selectgame'] = 'seleziona il gioco ι'; |
||||
|
$string[ 'snakes_background'] = 'livello'; |
||||
|
$string[ 'sourcemodule'] = 'sorgente delle domande'; |
||||
|
$string[ 'sourcemodule_book'] = 'scegli un libro '; |
||||
|
$string[ 'sourcemodule_glossary'] = 'scegli un glossario'; |
||||
|
$string[ 'sourcemodule_glossarycategory'] = 'scegli una categoria di glossari'; |
||||
|
$string[ 'sourcemodule_include_subcategories'] = 'includere le sotto-categorie'; |
||||
|
$string[ 'sourcemodule_question'] = 'domande'; |
||||
|
$string[ 'sourcemodule_questioncategory'] = 'seleziona una categoria di domande'; |
||||
|
$string[ 'sourcemodule_quiz'] = 'seleziona un quiz'; |
||||
|
$string[ 'sudoku_maxquestions'] = 'Massimo numero di domande'; |
||||
|
$string[ 'toptext'] = 'testo in cima'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
$string[ 'cross_options'] = 'opzioni di incrocio'; |
||||
|
$string[ 'cryptex_options'] = 'opzioni nel criptoverba'; |
||||
|
$string[ 'hangman_options'] = 'opzioni del gioco dell\'impiccato'; |
||||
|
$string[ 'headerfooter_options'] = 'opzioni nell\'header e footer'; |
||||
|
$string[ 'hiddenpicture_options'] = 'opzioni della figura nascosta'; |
||||
|
$string[ 'millionaire_options'] = 'opzioni del gioco del milionario'; |
||||
|
$string[ 'snakes_options'] = 'opzioni del gioco delle serpentine'; |
||||
|
$string[ 'sudoku_options'] = 'opzioni del gioco del Sudoku'; |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'formatdatetime'] = '%%d %%b %%Y, %%H:%%M'; |
||||
|
$string[ 'lastip'] = 'IP dello studente'; |
||||
|
$string[ 'preview'] = 'anteprima'; |
||||
|
$string[ 'showsolution'] = 'soluzione'; |
||||
|
$string[ 'timefinish'] = 'fine del gioco'; |
||||
|
$string[ 'timelastattempt'] = 'ultima prova'; |
||||
|
$string[ 'timestart'] = 'inizio'; |
||||
|
|
||||
|
//review.php |
||||
|
$string[ 'completedon'] = 'Completato alle'; |
||||
|
$string[ 'outof'] = '$a->voto su un massimo di $a->maxgrade'; |
||||
|
$string[ 'review'] = 'mostra'; |
||||
|
$string[ 'reviewofattempt'] = ';mostra il tentativo $a'; |
||||
|
$string[ 'startagain'] = 'ricomincia'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'clearrepetitions'] = 'Clear statistics'; |
||||
|
$string[ 'computerepetitions'] = 'ricalcola le statistiche'; |
||||
|
$string[ 'feedbacks'] = 'messaggio della risposta corretta'; |
||||
|
$string[ 'repetitions'] = 'ripetizioni'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'export_to_html'] = 'esporta come HTML'; |
||||
|
$string[ 'export_to_javame'] = 'esporta come JAVAME per celle'; |
||||
|
$string[ 'info'] = ' informazioni'; |
||||
|
$string[ 'results'] = 'risultati'; |
||||
|
$string[ 'showanswers'] = 'mostra le risposte'; |
||||
|
$string[ 'showattempts'] = 'mostra i tentativi'; |
||||
|
|
||||
|
//view.php |
||||
|
$string[ 'attemptgamenow'] = 'vuoi fare l\'esercizio ora?'; |
||||
|
$string[ 'continueattemptgame'] = 'continua un precedente tentativo'; |
||||
|
$string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade.'; |
||||
|
$string[ 'marks'] = 'voti'; |
||||
|
$string[ 'nomoreattempts'] = 'non sono permessi altri tentativi'; |
||||
|
$string[ 'reattemptgame'] = 'nuovo tentativo nel gioco'; |
||||
|
$string[ 'yourfinalgradeis'] = 'La tua valutazione finale per questo gioco è $a'; |
||||
|
|
||||
|
//Untranslated |
||||
|
//db/access.php $string[ 'game:attempt'] = 'Play games'; |
||||
|
//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:preview'] = 'Preview Games'; |
||||
|
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts'; |
||||
|
//db/access.php $string[ 'game:view'] = 'View game information'; |
||||
|
//db/access.php $string[ 'game:viewreports'] = 'View game reports'; |
||||
|
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions"; |
||||
|
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.'; |
||||
|
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.'; |
||||
|
//attempt.php $string[ 'gameclosed'] = 'This game closed on {$a}'; |
||||
|
//attempt.php $string[ 'gamenotavailable'] = 'The game will not be available until {$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."; |
||||
|
//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[ '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_board'] = 'Board'; |
||||
|
//mod_form.php $string[ 'snakes_cols'] = 'Cols'; |
||||
|
//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_rows'] = 'Rows'; |
||||
|
//mod_form.php $string[ 'userdefined'] = "User defined "; |
||||
|
//view.php $string[ 'gamecloses'] = 'Game closes'; |
||||
|
//view.php $string[ 'gameopens'] = 'Game opens'; |
@ -0,0 +1,304 @@ |
|||||
|
<?php // $Id: game.php,v 1.1.2.1 2012/01/16 23:12:48 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'; |
||||
|
$string[ 'bookquiz_questions'] = 'Susieti klausimų grupes su knygos skyriumi'; // 'Associate question categories to chapter of book'; |
||||
|
|
||||
|
//contest/play.php |
||||
|
|
||||
|
//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[ 'finish'] = 'Žaidimo pabaiga'; // 'End of game'; |
||||
|
$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 !!!'; |
||||
|
|
||||
|
//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: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[ '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[ 'timetaken'] = 'Užėmė laiko'; // 'Time taken'; |
||||
|
$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'; |
||||
|
|
||||
|
//attempt.php |
||||
|
$string[ 'gameclosed'] = 'Žaidimas užbaigtas {$a}'; // 'This game closed on {$a}'; |
||||
|
$string[ 'gamenotavailable'] = 'Žaidimas nebus pradedamas iki {$a}'; // 'The game will not be available until {$a}'; |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'Žaidimai'; // 'Games'; |
||||
|
|
||||
|
//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:'; |
||||
|
$string[ 'only_teachers'] = 'Tik mokytojai gali matyti šį puslapį'; // 'Only teacher can see this page'; |
||||
|
|
||||
|
//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'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'Žaidimas'; // 'Game'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'Bandymai'; // 'Attempts'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = 'Bandyti'; // 'Attempt'; |
||||
|
$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[ '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'; |
||||
|
|
||||
|
//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.html |
||||
|
$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[ '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[ '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_maxtries'] = 'Žodžių skaičius viename žaidime'; // 'Number of words per game'; |
||||
|
$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_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_shuffle'] = 'Klausimų parinkimas atsitiktine tvarka'; // 'Randomize questions'; |
||||
|
$string[ 'snakes_background'] = 'Fonas'; // 'Background'; |
||||
|
$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[ 'toptext'] = 'Tekstas puslapio viršuje'; // 'Text at the top of page'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
$string[ 'cross_options'] = 'Kryžiažodžio parametrai'; // 'Crossword options'; |
||||
|
$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[ '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_options'] = 'Kartuvių žaidimo parametrai'; // 'Hangman options'; |
||||
|
$string[ 'hiddenpicture_options'] = '\'Paslėpta nuotrauka\' žaidimo parametrai'; // '\'Hidden Picture\' options'; |
||||
|
$string[ 'millionaire_options'] = 'Milijonieriaus žaidimo parametrai'; // 'Millionaire\' options'; |
||||
|
$string[ 'snakes_cols'] = 'Stulpeliai'; // 'Cols'; |
||||
|
$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[ 'sudoku_options'] = 'Sudoku parametrai'; // 'Sudoku options'; |
||||
|
$string[ 'userdefined'] = 'Naudotojo apibrėžtas'; // 'User defined'; |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'lastip'] = 'Studento IP'; // 'IP student'; |
||||
|
$string[ 'preview'] = 'Peržiūrėti'; // 'Preview'; |
||||
|
$string[ 'showsolution'] = 'Sprendimas'; // 'solution'; |
||||
|
$string[ 'timefinish'] = 'Žaidimas pabaigtas'; // 'End of game'; |
||||
|
$string[ 'timelastattempt'] = 'Paskutinins bandymas'; // 'Last attempt'; |
||||
|
$string[ 'timestart'] = 'Pradėta'; // 'Start'; |
||||
|
|
||||
|
//review.php |
||||
|
$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[ 'startagain'] = 'Pradėti iš naujo'; // 'Start again'; |
||||
|
|
||||
|
//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'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'export_to_html'] = 'Eksportuoti į HTML'; // 'Export to HTML'; |
||||
|
$string[ 'export_to_javame'] = 'Eksportuoti į Java'; // 'Export to Javame'; |
||||
|
$string[ 'info'] = 'Informacija'; // 'Info'; |
||||
|
$string[ 'results'] = 'Rezultatas'; // 'Results'; |
||||
|
$string[ 'showanswers'] = 'Rodyti atsakymus'; // 'Show answers'; |
||||
|
$string[ 'showattempts'] = 'Rodyti bandymus'; // 'Show attempts'; |
||||
|
|
||||
|
//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[ '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 |
||||
|
//contest/play.php $string[ 'contest_not_solved'] = 'Not solved yet'; |
||||
|
//contest/play.php $string[ 'contest_solved'] = 'Solved'; |
||||
|
//contest/play.php $string[ 'contest_top'] = 'Top grades'; |
||||
|
//contest/play.php $string[ 'marks'] = 'Marks'; |
||||
|
//report/overview/report.php $string[ 'overview'] = 'Overview'; |
||||
|
//lib.php $string[ 'game_contest'] = 'Contest'; |
||||
|
//mod.html $string[ 'hiddenpicture_pictureglossarycategories'] = 'Glossary category for main question'; |
||||
|
//mod.html $string[ 'selectgame'] = 'Select game'; |
||||
|
//mod_form.php $string[ 'contest_has_notes'] = 'Has notes'; |
||||
|
//mod_form.php $string[ 'contest_options'] = 'Contest options'; |
||||
|
//mod_form.php $string[ 'headerfooter_options'] = 'Header/Footer options'; |
||||
|
//mod_form.php $string[ 'snakes_board'] = 'Board'; |
||||
|
//preview.php $string[ 'formatdatetime'] = '%%d %%b %%Y, %%I:%%M %%p'; |
||||
|
//view.php $string[ 'gamecloses'] = 'Game closes'; |
||||
|
//view.php $string[ 'gameopens'] = 'Game opens'; |
||||
|
//view.php $string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade.'; |
||||
|
//view.php $string[ 'nomoreattempts'] = 'No more attempts are allowed'; |
@ -0,0 +1,303 @@ |
|||||
|
<?php // $Id: game.php,v 1.3.2.10 2012/02/12 14:26:22 bdaloukas Exp $
|
||||
|
// game.php - created with Moodle 1.9 (2007101509) |
||||
|
// local modifications from http://www.indegroep.nl |
||||
|
|
||||
|
//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'; |
||||
|
$string[ 'bookquiz_questions'] = 'Associeer vraagcategorieën aan het hoofdstuk van dit boek.'; |
||||
|
|
||||
|
//contest/play.php |
||||
|
$string[ 'marks'] = 'Markeringen'; |
||||
|
|
||||
|
//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[ 'finish'] = 'Einde van het spel'; |
||||
|
$string[ 'letter'] = 'letter'; |
||||
|
$string[ 'letters'] = 'letters'; |
||||
|
$string[ 'nextgame'] = 'Nieuw spel'; |
||||
|
$string[ 'no_words'] = 'Geen woorden gevonden'; |
||||
|
$string[ 'print'] = 'Print'; |
||||
|
$string[ 'win'] = 'Gefeliciteerd!!'; |
||||
|
|
||||
|
//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[ 'overview'] = 'Overzicht'; |
||||
|
$string[ 'pagesize'] = 'Aantal vragen per pagina'; |
||||
|
$string[ 'selectall'] = 'Selecteer allemaal'; |
||||
|
$string[ 'selectnone'] = 'Deselecteer allemaal'; |
||||
|
$string[ 'showdetailedmarks'] = 'Laat markeringsdetails zien'; |
||||
|
$string[ 'startedon'] = 'Gestart op'; |
||||
|
$string[ 'timecompleted'] = 'Voltooid'; |
||||
|
$string[ 'timetaken'] = 'Gebruikte tijd'; |
||||
|
$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'; |
||||
|
|
||||
|
//attempt.php |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'Spellen'; |
||||
|
|
||||
|
//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:'; |
||||
|
$string[ 'only_teachers'] = 'Alleen de leraar kan deze pagina zien'; |
||||
|
|
||||
|
//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'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'Spel'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'Pogingen'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = 'Poging $a'; |
||||
|
$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[ 'noattempts'] = 'Er zijn in deze quiz/test geen pogingen gedaan'; |
||||
|
$string[ 'percent'] = 'Percentage'; |
||||
|
|
||||
|
//locallib.php |
||||
|
$string[ 'attemptfirst'] = 'Eerste poging'; |
||||
|
$string[ 'attemptlast'] = 'Laatste poging'; |
||||
|
$string[ 'gradeaverage'] = 'Gemiddeld cijfer'; |
||||
|
$string[ 'gradehighest'] = 'Hoogste cijfer'; |
||||
|
|
||||
|
//mod.html |
||||
|
$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[ 'cryptex_maxcols'] = 'Maximum aantal kolommen/rijen in de cryptex'; |
||||
|
$string[ 'cryptex_maxtries'] = 'Max pogingen'; |
||||
|
$string[ 'cryptex_maxwords'] = 'Maximum aantal woorden in de cryptex'; |
||||
|
$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_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_pictureglossary'] = 'De woordenlijst voor de hoofdvraag'; |
||||
|
$string[ 'hiddenpicture_pictureglossarycategories'] = 'De categorie uit de woordenlijst voor de hoofdvraag'; |
||||
|
$string[ 'hiddenpicture_width'] = 'Stel de breedte van de afbeelding in op'; |
||||
|
$string[ 'millionaire_background'] = 'Achtergrondkleur'; |
||||
|
$string[ 'millionaire_shuffle'] = 'Haal de vragen door elkaar'; |
||||
|
$string[ 'selectgame'] = 'Selecteer spel'; |
||||
|
$string[ 'snakes_background'] = 'Achtergrond'; |
||||
|
$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[ 'toptext'] = 'Teskt bovenaan de pagina'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
$string[ 'cross_options'] = 'Kruiswoordraadsel opties'; |
||||
|
$string[ 'cryptex_options'] = 'Woordzoeker opties'; |
||||
|
$string[ 'hangman_options'] = 'Galgje opties'; |
||||
|
$string[ 'headerfooter_options'] = 'Opties header en footer'; |
||||
|
$string[ 'hiddenpicture_options'] = '\'Verborgen afbeelding\' opties'; |
||||
|
$string[ 'millionaire_options'] = 'Miljonair\' opties'; |
||||
|
$string[ 'snakes_board'] = 'Spelbord'; |
||||
|
$string[ 'snakes_cols'] = 'Kolommen'; |
||||
|
$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[ 'sudoku_options'] = 'Sudoku opties'; |
||||
|
$string[ 'userdefined'] = 'Bepaald door de gebruiker'; |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'formatdatetime'] = '%%d %%b %%Y, %%I:%%M %%p'; |
||||
|
$string[ 'lastip'] = 'IP leerling'; |
||||
|
$string[ 'preview'] = 'Voorbeeld'; |
||||
|
$string[ 'showsolution'] = 'oplossing'; |
||||
|
$string[ 'timefinish'] = 'Einde van het spel'; |
||||
|
$string[ 'timelastattempt'] = 'Laatste poging'; |
||||
|
$string[ 'timestart'] = 'Start'; |
||||
|
|
||||
|
//review.php |
||||
|
$string[ 'completedon'] = 'Voltooid op'; |
||||
|
$string[ 'outof'] = '$a->grade uit een maximum van $a->maxgrade'; |
||||
|
$string[ 'review'] = 'Bekijk'; |
||||
|
$string[ 'reviewofattempt'] = 'Overzicht van Poging $a'; |
||||
|
$string[ 'startagain'] = 'Start opnieuw'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'clearrepetitions'] = 'Ruim statistieken op'; |
||||
|
$string[ 'computerepetitions'] = 'Bereken statistieken opnieuw'; |
||||
|
$string[ 'feedbacks'] = 'Berichten bij juist antwoord'; |
||||
|
$string[ 'repetitions'] = 'Herhalingen'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'export_to_html'] = 'Exporteer naar HTML'; |
||||
|
$string[ 'export_to_javame'] = 'Exporteer naar Javame'; |
||||
|
$string[ 'info'] = 'Info'; |
||||
|
$string[ 'results'] = 'Resultaten'; |
||||
|
$string[ 'showanswers'] = 'Laat antwoorden zien'; |
||||
|
$string[ 'showattempts'] = 'Toon pogingen'; |
||||
|
|
||||
|
//view.php |
||||
|
$string[ 'attemptgamenow'] = 'Probeer het spel nu'; |
||||
|
$string[ 'continueattemptgame'] = 'Ga verder met een vorige poging'; |
||||
|
$string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade'; |
||||
|
$string[ 'nomoreattempts'] = 'Er zijn geen pogingen meer toegestaan'; |
||||
|
$string[ 'reattemptgame'] = 'Probeer het spel opnieuw'; |
||||
|
$string[ 'yourfinalgradeis'] = 'Je uiteindelijke cijfer voor dit spel is $a.'; |
||||
|
|
||||
|
//Untranslated |
||||
|
//contest/play.php $string[ 'contest_not_solved'] = 'Not solved yet'; |
||||
|
//contest/play.php $string[ 'contest_solved'] = 'Solved'; |
||||
|
//contest/play.php $string[ 'contest_top'] = 'Top grades'; |
||||
|
//attempt.php $string[ 'gameclosed'] = 'This game closed on {$a}'; |
||||
|
//attempt.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}'; |
||||
|
//lib.php $string[ 'game_contest'] = 'Contest'; |
||||
|
//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[ 'contest_has_notes'] = 'Has notes'; |
||||
|
//mod_form.php $string[ 'contest_options'] = 'Contest 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, ...)'; |
||||
|
//view.php $string[ 'gamecloses'] = 'Game closes'; |
||||
|
//view.php $string[ 'gameopens'] = 'Game opens'; |
@ -0,0 +1,295 @@ |
|||||
|
<?php // $Id: game.php,v 1.3.2.9 2011/08/27 19:40:30 bdaloukas Exp $
|
||||
|
// game.php - created with Moodle 1.9 (2007101509) |
||||
|
// local modifications from http://localhost |
||||
|
|
||||
|
//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'; |
||||
|
$string[ 'bookquiz_questions'] = 'Koble spørsmålskategorier til kapitler i bok'; |
||||
|
|
||||
|
//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[ 'finish'] = 'Spill slutt'; |
||||
|
$string[ 'letter'] = 'bokstav'; |
||||
|
$string[ 'letters'] = 'bokstaver'; |
||||
|
$string[ 'nextgame'] = 'Nytt spill'; |
||||
|
$string[ 'no_words'] = 'Ingen ord funnet'; |
||||
|
$string[ 'win'] = 'Gratulerer!!!'; |
||||
|
|
||||
|
//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[ 'overview'] = 'Oversikt'; |
||||
|
$string[ 'pagesize'] = 'Spørsmål per side'; |
||||
|
$string[ 'selectall'] = 'Velg alle'; |
||||
|
$string[ 'selectnone'] = 'Ikke velg noen'; |
||||
|
$string[ 'showdetailedmarks'] = 'Vis markeringsdetaljer'; |
||||
|
$string[ 'startedon'] = 'Startet'; |
||||
|
$string[ 'timecompleted'] = 'Ferdig'; |
||||
|
$string[ 'timetaken'] = 'Tid brukt'; |
||||
|
$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'; |
||||
|
|
||||
|
//attempt.php |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'Spill'; |
||||
|
|
||||
|
//export.php |
||||
|
$string[ 'only_teachers'] = 'Bare lærer kan se denne siden'; |
||||
|
|
||||
|
//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'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'Spill'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'Forsøk'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = 'Forsøk $a'; |
||||
|
$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[ 'noattempts'] = 'Ingen forsøk er gjort på denne prøven'; |
||||
|
|
||||
|
//locallib.php |
||||
|
$string[ 'attemptfirst'] = 'Første forsøk'; |
||||
|
$string[ 'attemptlast'] = 'Siste forsøk'; |
||||
|
$string[ 'gradeaverage'] = 'Gjennomsnittelig karakter'; |
||||
|
$string[ 'gradehighest'] = 'Høyeste karakter'; |
||||
|
|
||||
|
//mod.html |
||||
|
$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[ 'hiddenpicture_pictureglossarycategories'] = 'Katgori av ordbok for hovedspørsmål'; |
||||
|
$string[ 'selectgame'] = 'Velg spill'; |
||||
|
$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'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'formatdatetime'] = '%%d %%b %%Y, %%l: %%M %%p'; |
||||
|
$string[ 'lastip'] = 'IP student'; |
||||
|
$string[ 'preview'] = 'Forhåndsvisning'; |
||||
|
$string[ 'showsolution'] = 'løsning'; |
||||
|
$string[ 'timefinish'] = 'Spill slutt'; |
||||
|
$string[ 'timelastattempt'] = 'Siste forsøk'; |
||||
|
$string[ 'timestart'] = 'Start'; |
||||
|
|
||||
|
//review.php |
||||
|
$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'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'feedbacks'] = 'Tilbakemelding ved riktig svar'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'info'] = 'Info'; |
||||
|
$string[ 'results'] = 'Resulat'; |
||||
|
$string[ 'showanswers'] = 'Vis svar'; |
||||
|
|
||||
|
//view.php |
||||
|
$string[ 'attemptgamenow'] = 'Prøv å spille nå'; |
||||
|
$string[ 'continueattemptgame'] = 'Fortsette et tidligere forsøk av spillet'; |
||||
|
$string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade'; |
||||
|
$string[ 'marks'] = 'Markeringer'; |
||||
|
$string[ 'nomoreattempts'] = 'Ingen flere forsøk er tillatt'; |
||||
|
$string[ 'reattemptgame'] = 'Prøv spillet igjen'; |
||||
|
$string[ 'yourfinalgradeis'] = 'Din endelige karakter for spillet er $a.'; |
||||
|
|
||||
|
//Untranslated |
||||
|
//cross/play.php $string[ 'print'] = 'Print'; |
||||
|
//db/access.php $string[ 'game:attempt'] = 'Play games'; |
||||
|
//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:preview'] = 'Preview Games'; |
||||
|
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts'; |
||||
|
//db/access.php $string[ 'game:view'] = 'View game information'; |
||||
|
//db/access.php $string[ 'game:viewreports'] = 'View game reports'; |
||||
|
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions"; |
||||
|
//hiddenpicture/play.php $string[ 'noglossaryentriesfound'] = 'No glossary entries found'; |
||||
|
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.'; |
||||
|
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.'; |
||||
|
//attempt.php $string[ 'gameclosed'] = 'This game closed on {$a}'; |
||||
|
//attempt.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}'; |
||||
|
//export.php $string[ 'export'] = 'Export'; |
||||
|
//export.php $string[ 'html_hascheckbutton'] = 'Include check button:'; |
||||
|
//export.php $string[ 'html_hasprintbutton'] = 'Include 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'] = 'Ask the audience'; |
||||
|
//exporthtml_millionaire.php $string[ 'millionaire_quit'] = 'Quit'; |
||||
|
//exporthtml_millionaire.php $string[ 'millionaire_telephone'] = 'Call a friend'; |
||||
|
//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."; |
||||
|
//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'; |
||||
|
//mod.html $string[ 'cryptex_maxtries'] = 'Maximum tries'; |
||||
|
//mod.html $string[ 'hiddenpicture_height'] = 'Set height of picture to'; |
||||
|
//mod.html $string[ 'hiddenpicture_width'] = 'Set width of picture to'; |
||||
|
//mod.html $string[ 'millionaire_background'] = 'Background color'; |
||||
|
//mod.html $string[ 'millionaire_shuffle'] = 'Randomize questions'; |
||||
|
//mod.html $string[ 'sourcemodule_include_subcategories'] = 'Include subcategories'; |
||||
|
//mod.html $string[ 'toptext'] = 'Text at the top'; |
||||
|
//mod_form.php $string[ 'cross_options'] = 'Crossword options'; |
||||
|
//mod_form.php $string[ 'cryptex_options'] = 'Cryptex 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[ 'hangman_options'] = 'Hangman options'; |
||||
|
//mod_form.php $string[ 'headerfooter_options'] = 'Header/Footer options'; |
||||
|
//mod_form.php $string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options'; |
||||
|
//mod_form.php $string[ 'millionaire_options'] = 'Millionaire options'; |
||||
|
//mod_form.php $string[ 'snakes_board'] = 'Board'; |
||||
|
//mod_form.php $string[ 'snakes_cols'] = 'Cols'; |
||||
|
//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_options'] = '\'Snakes and Ladders\' options'; |
||||
|
//mod_form.php $string[ 'snakes_rows'] = 'Rows'; |
||||
|
//mod_form.php $string[ 'sudoku_options'] = 'Sudoku options'; |
||||
|
//mod_form.php $string[ 'userdefined'] = "User defined "; |
||||
|
//showanswers.php $string[ 'clearrepetitions'] = 'Clear statistics'; |
||||
|
//showanswers.php $string[ 'computerepetitions'] = 'Compute statistics again'; |
||||
|
//showanswers.php $string[ 'repetitions'] = 'Repetitions'; |
||||
|
//tabs.php $string[ 'export_to_html'] = 'Export to HTML'; |
||||
|
//tabs.php $string[ 'export_to_javame'] = 'Export to Javame'; |
||||
|
//tabs.php $string[ 'showattempts'] = 'Show attempts'; |
||||
|
//view.php $string[ 'gamecloses'] = 'Game closes'; |
||||
|
//view.php $string[ 'gameopens'] = 'Game opens'; |
@ -0,0 +1,294 @@ |
|||||
|
<?php // $Id: game.php,v 1.5.2.9 2011/08/27 19:40:30 bdaloukas Exp $
|
||||
|
//Translated 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'; |
||||
|
$string[ 'bookquiz_questions'] = 'Przypisz kategorie pytań do rozdziałów książki'; |
||||
|
|
||||
|
//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[ 'finish'] = 'Koniec gry'; |
||||
|
$string[ 'letter'] = 'litera'; |
||||
|
$string[ 'letters'] = 'litery'; |
||||
|
$string[ 'nextgame'] = 'Nowa gra'; |
||||
|
$string[ 'no_words'] = 'Nie znaleziono wyrazów'; |
||||
|
$string[ 'win'] = 'Gratulacje !!!'; |
||||
|
|
||||
|
//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[ 'overview'] = 'Przegląd'; |
||||
|
$string[ 'pagesize'] = 'Pytań na stronę:'; |
||||
|
$string[ 'selectall'] = 'Wybierz wszystkie'; |
||||
|
$string[ 'selectnone'] = 'Odznacz wszytko'; |
||||
|
$string[ 'showdetailedmarks'] = 'Pokaż szczegóły oceny'; |
||||
|
$string[ 'startedon'] = 'Rozpoczęto'; |
||||
|
$string[ 'timecompleted'] = 'Ukończono'; |
||||
|
$string[ 'timetaken'] = 'Zużyty czas'; |
||||
|
$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'; |
||||
|
|
||||
|
//attempt.php |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'Gry'; |
||||
|
|
||||
|
//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:'; |
||||
|
$string[ 'only_teachers'] = 'Tylko nauczyciel może oglądać tą stronę'; |
||||
|
|
||||
|
//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'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'Gra'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'Próby'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = 'Próba $a'; |
||||
|
$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[ 'noattempts'] = 'Nie dokonano prób'; |
||||
|
|
||||
|
//locallib.php |
||||
|
$string[ 'attemptfirst'] = 'Pierwsza próba'; |
||||
|
$string[ 'attemptlast'] = 'Ostatnia próba'; |
||||
|
$string[ 'gradeaverage'] = 'Średnia ocena'; |
||||
|
$string[ 'gradehighest'] = 'Najwyższa ocena'; |
||||
|
|
||||
|
//mod.html |
||||
|
$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_pictureglossarycategories'] = 'Kategoria słownika dla głównego pytania'; |
||||
|
$string[ 'hiddenpicture_width'] = 'Ustaw szerokość obrazka na'; |
||||
|
$string[ 'selectgame'] = 'Wybierz grę'; |
||||
|
$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ń'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'formatdatetime'] = '%%d %%b %%Y, %%I:%%M %%p'; |
||||
|
$string[ 'lastip'] = 'IP studenta'; |
||||
|
$string[ 'preview'] = 'Podgląd'; |
||||
|
$string[ 'showsolution'] = 'rozwiązanie'; |
||||
|
$string[ 'timefinish'] = 'Koniec gry'; |
||||
|
$string[ 'timelastattempt'] = 'Ostatnia próba'; |
||||
|
$string[ 'timestart'] = 'Start'; |
||||
|
|
||||
|
//review.php |
||||
|
$string[ 'completedon'] = 'Ukończono'; |
||||
|
$string[ 'outof'] = '$a->grade z $a->maxgrade'; |
||||
|
$string[ 'review'] = 'Opis'; |
||||
|
$string[ 'reviewofattempt'] = 'Opis próby $a'; |
||||
|
$string[ 'startagain'] = 'Rozpocznij ponownie'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'feedbacks'] = 'Wiadomości po prawidłowej odpowiedzi'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'info'] = 'Informacje'; |
||||
|
$string[ 'results'] = 'Wyniki'; |
||||
|
$string[ 'showanswers'] = 'Pokaż odpowiedzi'; |
||||
|
|
||||
|
//view.php |
||||
|
$string[ 'attemptgamenow'] = 'Rozpocznij grę'; |
||||
|
$string[ 'continueattemptgame'] = 'Kontynuuj poprzednią próbę'; |
||||
|
$string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade.'; |
||||
|
$string[ 'marks'] = 'Oceny'; |
||||
|
$string[ 'nomoreattempts'] = 'Nie możesz dokonać kolejnych prób'; |
||||
|
$string[ 'reattemptgame'] = 'Wznów grę'; |
||||
|
$string[ 'yourfinalgradeis'] = 'Ostateczną oceną za tą grę jest $a.'; |
||||
|
|
||||
|
//Untranslated |
||||
|
//cross/cross_class.php $string[ 'lettersall'] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ "; |
||||
|
//cross/play.php $string[ 'print'] = 'Print'; |
||||
|
//db/access.php $string[ 'game:attempt'] = 'Play games'; |
||||
|
//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:preview'] = 'Preview Games'; |
||||
|
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts'; |
||||
|
//db/access.php $string[ 'game:view'] = 'View game information'; |
||||
|
//db/access.php $string[ 'game:viewreports'] = 'View game reports'; |
||||
|
//hiddenpicture/play.php $string[ 'no_questions'] = "There are no questions"; |
||||
|
//hiddenpicture/play.php $string[ 'noglossaryentriesfound'] = 'No glossary entries found'; |
||||
|
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.'; |
||||
|
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.'; |
||||
|
//attempt.php $string[ 'gameclosed'] = 'This game closed on {$a}'; |
||||
|
//attempt.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}'; |
||||
|
//export.php $string[ 'html_hascheckbutton'] = 'Include check button:'; |
||||
|
//export.php $string[ 'html_hasprintbutton'] = 'Include 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'] = 'Ask the audience'; |
||||
|
//exporthtml_millionaire.php $string[ 'millionaire_quit'] = 'Quit'; |
||||
|
//exporthtml_millionaire.php $string[ 'millionaire_telephone'] = 'Call a friend'; |
||||
|
//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."; |
||||
|
//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'; |
||||
|
//mod.html $string[ 'cryptex_maxtries'] = 'Maximum tries'; |
||||
|
//mod.html $string[ 'millionaire_background'] = 'Background color'; |
||||
|
//mod.html $string[ 'millionaire_shuffle'] = 'Randomize questions'; |
||||
|
//mod.html $string[ 'toptext'] = 'Text at the top'; |
||||
|
//mod_form.php $string[ 'cross_options'] = 'Crossword options'; |
||||
|
//mod_form.php $string[ 'cryptex_options'] = 'Cryptex 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[ 'hangman_options'] = 'Hangman options'; |
||||
|
//mod_form.php $string[ 'headerfooter_options'] = 'Header/Footer options'; |
||||
|
//mod_form.php $string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options'; |
||||
|
//mod_form.php $string[ 'millionaire_options'] = 'Millionaire options'; |
||||
|
//mod_form.php $string[ 'snakes_board'] = 'Board'; |
||||
|
//mod_form.php $string[ 'snakes_cols'] = 'Cols'; |
||||
|
//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_options'] = '\'Snakes and Ladders\' options'; |
||||
|
//mod_form.php $string[ 'snakes_rows'] = 'Rows'; |
||||
|
//mod_form.php $string[ 'sudoku_options'] = 'Sudoku options'; |
||||
|
//mod_form.php $string[ 'userdefined'] = "User defined "; |
||||
|
//showanswers.php $string[ 'clearrepetitions'] = 'Clear statistics'; |
||||
|
//showanswers.php $string[ 'computerepetitions'] = 'Compute statistics again'; |
||||
|
//showanswers.php $string[ 'repetitions'] = 'Repetitions'; |
||||
|
//tabs.php $string[ 'export_to_html'] = 'Export to HTML'; |
||||
|
//tabs.php $string[ 'export_to_javame'] = 'Export to Javame'; |
||||
|
//tabs.php $string[ 'showattempts'] = 'Show attempts'; |
||||
|
//view.php $string[ 'gamecloses'] = 'Game closes'; |
||||
|
//view.php $string[ 'gameopens'] = 'Game opens'; |
@ -0,0 +1,295 @@ |
|||||
|
<?php // $Id: game.php,v 1.1.2.6 2011/08/27 19:40:30 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'; |
||||
|
$string[ 'bookquiz_questions'] = 'Relacione categorias de perguntas com capítulos do livro'; |
||||
|
|
||||
|
//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[ 'finish'] = 'Fim de jogo'; |
||||
|
$string[ 'letter'] = 'letra'; |
||||
|
$string[ 'letters'] = 'letras'; |
||||
|
$string[ 'nextgame'] = 'Próximo jogo'; |
||||
|
$string[ 'print'] = 'Imprimir'; |
||||
|
|
||||
|
//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[ 'timetaken'] = 'Timpo utilizado'; |
||||
|
$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'; |
||||
|
|
||||
|
//attempt.php |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'Jogos'; |
||||
|
|
||||
|
//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'; |
||||
|
$string[ 'only_teachers'] = 'Somente o professor pode ver esta página'; |
||||
|
|
||||
|
//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'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'Jogo'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'Tentativas'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = 'Tentativa'; |
||||
|
$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[ 'noattempts'] = 'Nenhuma tentativa foi feita com este questionário'; |
||||
|
$string[ 'percent'] = 'Porcentagem'; |
||||
|
|
||||
|
//locallib.php |
||||
|
$string[ 'attemptfirst'] = 'Primeira tentativa'; |
||||
|
$string[ 'attemptlast'] = 'Última tentativa'; |
||||
|
$string[ 'gradeaverage'] = 'Nota média'; |
||||
|
$string[ 'gradehighest'] = 'Maior nota'; |
||||
|
|
||||
|
//mod.html |
||||
|
$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[ '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[ '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_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_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_shuffle'] = 'Mesclar perguntas'; |
||||
|
$string[ 'snakes_background'] = 'Fundo'; |
||||
|
$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[ 'toptext'] = 'Texto da parte superior'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
$string[ 'cross_options'] = 'Opções do Palavras-cruzadas'; |
||||
|
$string[ 'cryptex_options'] = 'Opções do Criptograma'; |
||||
|
$string[ 'hangman_options'] = 'Opções da Forca'; |
||||
|
$string[ 'hiddenpicture_options'] = '\'Imagem Oculta\' opções'; |
||||
|
$string[ 'millionaire_options'] = 'Opções o Milhonário'; |
||||
|
$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[ 'sudoku_options'] = 'Opcções do Sudoku'; |
||||
|
$string[ 'userdefined'] = 'Definido pelo usuário'; |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'lastip'] = 'IP do estudante'; |
||||
|
$string[ 'preview'] = 'Visualizar'; |
||||
|
$string[ 'showsolution'] = 'solução'; |
||||
|
$string[ 'timefinish'] = 'Fim de jogo'; |
||||
|
$string[ 'timelastattempt'] = 'Última tentativa'; |
||||
|
$string[ 'timestart'] = 'Começo'; |
||||
|
|
||||
|
//review.php |
||||
|
$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'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'clearrepetitions'] = 'Limpar estatísticas'; |
||||
|
$string[ 'computerepetitions'] = 'Recalcular estatísticas'; |
||||
|
$string[ 'feedbacks'] = 'Mensagens de resposta correta'; |
||||
|
$string[ 'repetitions'] = 'Repetições'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'export_to_html'] = 'Exportar como HTML'; |
||||
|
$string[ 'export_to_javame'] = 'Exportar como Javame'; |
||||
|
$string[ 'info'] = 'Info'; |
||||
|
$string[ 'results'] = 'Resultados'; |
||||
|
$string[ 'showanswers'] = 'Mostrar respostas'; |
||||
|
$string[ 'showattempts'] = 'Mostrar as tentativas'; |
||||
|
|
||||
|
//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 |
||||
|
//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: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[ '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[ 'overview'] = 'Overview'; |
||||
|
//report/overview/report.php $string[ 'pagesize'] = 'Questions per page:'; |
||||
|
//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.'; |
||||
|
//attempt.php $string[ 'gameclosed'] = 'This game closed on {$a}'; |
||||
|
//attempt.php $string[ 'gamenotavailable'] = 'The game will not be available until {$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."; |
||||
|
//lib.php $string[ 'reset_game_all'] = 'Delete tries from all games'; |
||||
|
//lib.php $string[ 'reset_game_deleted_course'] = 'Delete tries from deleted courses'; |
||||
|
//mod.html $string[ 'hiddenpicture_pictureglossarycategories'] = 'Glossary category for main question'; |
||||
|
//mod.html $string[ 'selectgame'] = 'Select game'; |
||||
|
//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[ 'headerfooter_options'] = 'Header/Footer options'; |
||||
|
//mod_form.php $string[ 'snakes_board'] = 'Board'; |
||||
|
//mod_form.php $string[ 'snakes_file'] = 'File for background'; |
||||
|
//preview.php $string[ 'formatdatetime'] = '%%d %%b %%Y, %%I:%%M %%p'; |
||||
|
//view.php $string[ 'gamecloses'] = 'Game closes'; |
||||
|
//view.php $string[ 'gameopens'] = 'Game opens'; |
||||
|
//view.php $string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade.'; |
||||
|
//view.php $string[ 'marks'] = 'Marks'; |
||||
|
//view.php $string[ 'nomoreattempts'] = 'No more attempts are allowed'; |
@ -0,0 +1,295 @@ |
|||||
|
<?php // $Id: game.php,v 1.5.2.10 2011/08/27 19:40:30 bdaloukas Exp $
|
||||
|
// game.php - created with Moodle 1.6.3 |
||||
|
// translated 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'] = 'Главы'; |
||||
|
$string[ 'bookquiz_questions'] = 'Связать категории вопросов с главой книги'; |
||||
|
|
||||
|
//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[ 'finish'] = 'Конец игры'; |
||||
|
$string[ 'letter'] = 'буква'; |
||||
|
$string[ 'letters'] = 'буквы'; |
||||
|
$string[ 'nextgame'] = 'Новая игра'; |
||||
|
$string[ 'no_words'] = 'Не найдены слова'; |
||||
|
$string[ 'win'] = 'Поздравляем !!!'; |
||||
|
|
||||
|
//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[ 'overview'] = 'Обзор'; |
||||
|
$string[ 'pagesize'] = 'Вопросов на страницу:'; |
||||
|
$string[ 'selectall'] = 'Выбрать все'; |
||||
|
$string[ 'selectnone'] = 'Снять выделение со всех'; |
||||
|
$string[ 'showdetailedmarks'] = 'Показать детали оценок'; |
||||
|
$string[ 'startedon'] = 'Начато'; |
||||
|
$string[ 'timecompleted'] = 'Выполнено'; |
||||
|
$string[ 'timetaken'] = 'Время выполнения'; |
||||
|
$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'] = 'В глоссарии нет слов'; |
||||
|
|
||||
|
//attempt.php |
||||
|
|
||||
|
//backuplib.php |
||||
|
$string[ 'modulenameplural'] = 'Игры'; |
||||
|
|
||||
|
//export.php |
||||
|
$string[ 'only_teachers'] = 'Только учителя могут просматривать эту страницу'; |
||||
|
|
||||
|
//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'] = 'Очки'; |
||||
|
|
||||
|
//header.php |
||||
|
$string[ 'modulename'] = 'Игра'; |
||||
|
|
||||
|
//index.php |
||||
|
$string[ 'attempts'] = 'Попытки'; |
||||
|
|
||||
|
//lib.php |
||||
|
$string[ 'attempt'] = 'Попытка $a'; |
||||
|
$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[ 'noattempts'] = 'В этом тесте не сделано попыток'; |
||||
|
|
||||
|
//locallib.php |
||||
|
$string[ 'attemptfirst'] = 'Первая попытка'; |
||||
|
$string[ 'attemptlast'] = 'Последняя попытка'; |
||||
|
$string[ 'gradeaverage'] = 'Оценивание по среднему баллу'; |
||||
|
$string[ 'gradehighest'] = 'Оценивание по высшему баллу'; |
||||
|
|
||||
|
//mod.html |
||||
|
$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[ 'hiddenpicture_pictureglossarycategories'] = 'Категория для главного вопроса'; |
||||
|
$string[ 'selectgame'] = 'Выберите игру'; |
||||
|
$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'] = 'Максимальное число вопросов'; |
||||
|
|
||||
|
//mod_form.php |
||||
|
|
||||
|
//preview.php |
||||
|
$string[ 'formatdatetime'] = '%%d %%b %%Y, %%I:%%M %%p'; |
||||
|
$string[ 'lastip'] = 'IP студента'; |
||||
|
$string[ 'preview'] = 'Предварительный просмотр'; |
||||
|
$string[ 'showsolution'] = 'решение'; |
||||
|
$string[ 'timefinish'] = 'Конец игры'; |
||||
|
$string[ 'timelastattempt'] = 'Последняя попытка'; |
||||
|
$string[ 'timestart'] = 'Начало'; |
||||
|
|
||||
|
//review.php |
||||
|
$string[ 'completedon'] = 'Выполнено'; |
||||
|
$string[ 'outof'] = '$a->grade out of a maximum of $a->maxgrade'; |
||||
|
$string[ 'review'] = 'Повторный просмотр'; |
||||
|
$string[ 'reviewofattempt'] = 'Повторный промотр попыток $a'; |
||||
|
$string[ 'startagain'] = 'Начать снова'; |
||||
|
|
||||
|
//showanswers.php |
||||
|
$string[ 'feedbacks'] = 'Текст сообщения о правильном ответе'; |
||||
|
|
||||
|
//tabs.php |
||||
|
$string[ 'info'] = 'Информация'; |
||||
|
$string[ 'results'] = 'Результаты'; |
||||
|
$string[ 'showanswers'] = 'Показать ответы'; |
||||
|
|
||||
|
//view.php |
||||
|
$string[ 'attemptgamenow'] = 'Начать новую попытку игры'; |
||||
|
$string[ 'continueattemptgame'] = 'Продолжить предыдущую попытку этой игры'; |
||||
|
$string[ 'gradesofar'] = '$a->method: $a->mygrade / $a->gamegrade.'; |
||||
|
$string[ 'marks'] = 'Оценки'; |
||||
|
$string[ 'nomoreattempts'] = 'Больше попытки не разрешены'; |
||||
|
$string[ 'reattemptgame'] = 'Сделать попытку в этой игре'; |
||||
|
$string[ 'yourfinalgradeis'] = 'Ваша последняя оценка за эту игру: $a.'; |
||||
|
|
||||
|
//Untranslated |
||||
|
//cross/play.php $string[ 'print'] = 'Print'; |
||||
|
//db/access.php $string[ 'game:attempt'] = 'Play games'; |
||||
|
//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:preview'] = 'Preview Games'; |
||||
|
//db/access.php $string[ 'game:reviewmyattempts'] = 'reviewmyattempts'; |
||||
|
//db/access.php $string[ 'game:view'] = 'View game information'; |
||||
|
//db/access.php $string[ 'game:viewreports'] = 'View game reports'; |
||||
|
//hiddenpicture/play.php $string[ 'hiddenpicture_nomainquestion'] = 'There are no glossary entries in 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'; |
||||
|
//snakes/play.php $string[ 'snakes_dice'] = 'Dice, $a spots.'; |
||||
|
//snakes/play.php $string[ 'snakes_player'] = 'Player, position: $a.'; |
||||
|
//attempt.php $string[ 'gameclosed'] = 'This game closed on {$a}'; |
||||
|
//attempt.php $string[ 'gamenotavailable'] = 'The game will not be available until {$a}'; |
||||
|
//export.php $string[ 'export'] = 'Export'; |
||||
|
//export.php $string[ 'html_hascheckbutton'] = 'Include check button:'; |
||||
|
//export.php $string[ 'html_hasprintbutton'] = 'Include 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'] = 'Ask the audience'; |
||||
|
//exporthtml_millionaire.php $string[ 'millionaire_quit'] = 'Quit'; |
||||
|
//exporthtml_millionaire.php $string[ 'millionaire_telephone'] = 'Call a friend'; |
||||
|
//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."; |
||||
|
//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'; |
||||
|
//mod.html $string[ 'cryptex_maxtries'] = 'Maximum tries'; |
||||
|
//mod.html $string[ 'hiddenpicture_height'] = 'Set height of picture to'; |
||||
|
//mod.html $string[ 'hiddenpicture_width'] = 'Set width of picture to'; |
||||
|
//mod.html $string[ 'millionaire_background'] = 'Background color'; |
||||
|
//mod.html $string[ 'millionaire_shuffle'] = 'Randomize questions'; |
||||
|
//mod.html $string[ 'sourcemodule_include_subcategories'] = 'Include subcategories'; |
||||
|
//mod.html $string[ 'toptext'] = 'Text at the top'; |
||||
|
//mod_form.php $string[ 'cross_options'] = 'Crossword options'; |
||||
|
//mod_form.php $string[ 'cryptex_options'] = 'Cryptex 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[ 'hangman_options'] = 'Hangman options'; |
||||
|
//mod_form.php $string[ 'headerfooter_options'] = 'Header/Footer options'; |
||||
|
//mod_form.php $string[ 'hiddenpicture_options'] = '\'Hidden Picture\' options'; |
||||
|
//mod_form.php $string[ 'millionaire_options'] = 'Millionaire options'; |
||||
|
//mod_form.php $string[ 'snakes_board'] = 'Board'; |
||||
|
//mod_form.php $string[ 'snakes_cols'] = 'Cols'; |
||||
|
//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_options'] = '\'Snakes and Ladders\' options'; |
||||
|
//mod_form.php $string[ 'snakes_rows'] = 'Rows'; |
||||
|
//mod_form.php $string[ 'sudoku_options'] = 'Sudoku options'; |
||||
|
//mod_form.php $string[ 'userdefined'] = "User defined "; |
||||
|
//showanswers.php $string[ 'clearrepetitions'] = 'Clear statistics'; |
||||
|
//showanswers.php $string[ 'computerepetitions'] = 'Compute statistics again'; |
||||
|
//showanswers.php $string[ 'repetitions'] = 'Repetitions'; |
||||
|
//tabs.php $string[ 'export_to_html'] = 'Export to HTML'; |
||||
|
//tabs.php $string[ 'export_to_javame'] = 'Export to Javame'; |
||||
|
//tabs.php $string[ 'showattempts'] = 'Show attempts'; |
||||
|
//view.php $string[ 'gamecloses'] = 'Game closes'; |
||||
|
//view.php $string[ 'gameopens'] = 'Game opens'; |