|
gamekind != '')
echo get_string('game_'.$form->gamekind,'game');
?>
|
: |
|
mode == 'add'){
?>
: |
gamekind, $events);
?>
|
mode != 'add'){
for( $i=1; $i <= 6; $i++){
$name = 'param'.$i;
echo ''."\r\n";
}
echo ''."\r\n";
?>
: |
gamekind == 'bookquiz'){
if( $existsbook){
echo get_string('sourcemodule_question','game').' | ';
$form->sourcemodule = 'question';
echo '';
}
}else
{
$a = array();
if( $form->gamekind != 'millionaire'){
$a[ 'glossary'] = get_string('modulename','glossary');
}
$a[ 'question'] = get_string('sourcemodule_question','game');
$a[ 'quiz'] = get_string('modulename','quiz');
$events = 'ONCHANGE="onselectsourcemodule(document.form.sourcemodule.value)"';
echo game_showselectcontrol( 'sourcemodule', $a, $form->sourcemodule, $events);
echo '';
}
echo "
\r\n";
?>
: |
id'", 'id,name')){
foreach( $recs as $rec){
$a[ $rec->id] = $rec->name;
}
}
echo game_showselectcontrol( 'quizid', $a, $form->quizid);
?>
|
: |
id'", 'id,name')){
foreach( $recs as $rec){
$a[ $rec->id] = $rec->name;
}
}
echo game_showselectcontrol( 'bookid', $a, $form->bookid);
?>
|
: |
id'", 'id,name')){
foreach( $recs as $rec){
$a[ $rec->id] = $rec->name;
}
}
$events = 'ONCHANGE="onselectglossary(document.form.glossaryid.value)"';
echo game_showselectcontrol( 'glossaryid', $a, $form->glossaryid, $events);
?>
|
: |
id'", 'id,name')){
foreach($recs as $rec){
$a[$rec->id] = $rec->name;
}
}
if( count( $a) == 0)
$select = 'glossaryid=-1';
else if( count( $a) == 1)
$select = 'glossaryid='.$rec->id;
else
{
$select = '';
foreach($recs as $rec){
$select .= ','.$rec->id;
}
$select = 'g.id IN ('.substr( $select, 1).')';
}
$select .= ' AND g.id=gc.glossaryid';
$table = "glossary g, {$CFG->prefix}glossary_categories gc";
$a = array();
$a[ ] = '';
if($recs = get_records_select( $table, $select, 'g.name,gc.name', 'gc.id,gc.name,g.name as name2')){
foreach($recs as $rec){
$a[$rec->id] = $rec->name2.' -> '.$rec->name;
}
}
echo game_showselectcontrol( 'glossarycategoryid', $a, $form->glossarycategoryid);
?>
|
: |
id";
}else{
$context = get_context_instance(50, $course->id);
$select = " contextid in ($context->id)";
}
break;
}
$a = array();
if( $recs = get_records_select( 'question_categories', $select, 'id,name')){
foreach( $recs as $rec){
$s = $rec->name;
if( ($count = count_records_select( 'question', "category={$rec->id}")) != 0){
$s .= " ($count)";
}
$a[ $rec->id] = $s;
}
}
echo game_showselectcontrol( 'questioncategoryid', $a, $form->questioncategoryid);
?>
|
: |
subcategories);
?>
|
gamekind == 'millionaire' && $form->sourcemodule == 'quiz' ){
?>
: |
shuffle);
?>
|
}
if( $form->gamekind == 'millionaire' ){
if( $form->param8 == 0)
$form->param8 = 0x408080;
?>
: |
|
: |
|
gamekind == 'hangman')
{
?>
: |
|
: |
param1); ?>
|
: |
param2); ?>
|
: |
param7); ?>
|
: |
param8); ?>
|
: |
param3 < 1){
$form->param3 = 1;
}
$a = array();
$a[ 1] = 1;
echo game_showselectcontrol( 'param3', $a, $form->param3);
?>
|
: |
param5); ?>
|
: |
param6); ?>
|
: |
language);
?>
|
gamekind == 'cross'){
?>
: |
|
: |
|
: |
param7); ?>
|
: |
param3 != 2){
$form->param3 = 1;
}
$a = array();
$a[ 1] = get_string('cross_layout0', 'game');
$a[ 2] = get_string('cross_layout1', 'game');
echo game_showselectcontrol( 'param3', $a, $form->param3);
?>
|
gamekind == 'sudoku'){
if( !record_exists_select( 'game_sudoku_database')){
require( "{$CFG->dirroot}/mod/game/db/importsudoku.php");
}
?>
: |
|
gamekind == 'cryptex'){
?>
: |
|
: |
|
: |
param7); ?>
|
: |
|
gamekind == 'bookquiz' and $existsbook){
?>
|
|
gamekind == 'millionaire'){
?>
: |
shuffle);
?>
|
gamekind == 'snakes'){
?>
: |
id] = $rec->name;
}
}
if( count( $a) == 0){
require( "{$CFG->dirroot}/mod/game/db/importsnakes.php");
if( $recs = get_records_select( 'game_snakes_database', "", 'id,name')){
foreach( $recs as $rec){
$a[ $rec->id] = $rec->name;
}
}
}
echo game_showselectcontrol( 'param3', $a, $form->param3);
?>
|
gamekind == 'hiddenpicture'){
?>
: |
|
: |
|
: |
id'", 'id,name')){
foreach( $recs as $rec){
$a[ $rec->id] = $rec->name;
}
}
echo game_showselectcontrol( 'glossaryid2', $a, $form->glossaryid2);
?>
|
: |
glossaryid ? 'glossaryid='.$form->glossaryid2 : '');
if( $recs = get_records_select( 'glossary_categories', $select, 'id,name')){
foreach( $recs as $rec){
if( count( $a) == 0){
$a[] = '';
}
$a[ $rec->id] = $rec->name;
}
}
echo game_showselectcontrol( 'glossarycategoryid2', $a, $form->glossarycategoryid2);
?>
|
: |
param7); ?>
|
: |
|
: |
|
gamekind <> 'bookquiz'){
echo ''.get_string('toptext', 'game').' | ';
print_textarea( $usehtmleditor, 15, 60, 630, 200, 'toptext', $game->toptext, $game->course);
echo ' |
';
echo ''.get_string('bottomtext', 'game').' | ';
print_textarea( $usehtmleditor, 15, 60, 630, 200, 'bottomtext', $game->bottomtext, $game->course);
echo ' |
';
}
//grademethod
?>
: |
grademethod); ?>
|
mode != 'add'
$answers = 0;
if (array_key_exists( 'answers', $_GET)) {
$answers = ( $_GET[ 'answers'] != 0 ? 1 : 0);
}
$nanswers = ($answers ? '0' : '1');
?>