Exemple #1
0
<body onselectstart="return false">
<?php 
require '../include/question_list_options.inc';
require '../include/toprightmenu.inc';
echo draw_toprightmenu();
?>

<div id="content">
<?php 
$question_no = 0;
$display_no = 0;
$bank_type = '';
$module_sql = '';
if ($keyword != '%' and $keyword != '') {
    $bank_type = ": '" . keyword_utils::name_from_ID($keyword, $mysqli) . "'";
} elseif (isset($_GET['bloom'])) {
    $bank_type = ': ' . $_GET['type'];
} elseif ($_GET['type'] == 'performance') {
    $types = array('veryeasy' => 'Very Easy', 'easy' => 'Easy', 'moderate' => 'Moderate', 'hard' => 'Hard', 'veryhard' => 'Very Hard', 'highest' => 'Highest', 'high' => 'High', 'intermediate' => 'Intermediate', 'low' => 'Low');
    $bank_type = ': ' . $types[$_GET['subtype']];
} elseif ($module != '') {
    $bank_type = ": {$module_code}";
} elseif ($_GET['type'] != '%') {
    $bank_type = ': ' . $string[$_GET['type']];
}
echo "<div class=\"head_title\">\n";
echo "<div><img src=\"../artwork/toprightmenu.gif\" id=\"toprightmenu_icon\" /></div>\n";
echo "<div class=\"breadcrumb\"><a href=\"../index.php\">" . $string['home'] . "</a>";
if (isset($_GET['module'])) {
    echo '<img src="../artwork/breadcrumb_arrow.png" class="breadcrumb_arrow" alt="-" /><a href="../module/index.php?module=' . $_GET['module'] . '">' . $module_code . '</a>';
Exemple #2
0
 /**
  * Determins if there is an interactive question (e.g. image hotspot, labelling,
  * area) on a particular screen of a paper. Speeds system up if not loading
  * unnecessary HTML5/Flash include files.
  * @param  array      $screen_data Array of screen/question information
  * @param  array      $screen      The screen number to check
  * @return bool       True = HTML5 or Flash neeed, False=no interactive questions found.
  */
 function need_interactiveQ($screen_data, $screen, $db)
 {
     $interactive = false;
     $checktypes = array('hotspot', 'labelling', 'area');
     if (isset($screen_data[$screen])) {
         foreach ($screen_data[$screen] as $question_part) {
             if (in_array($question_part[0], $checktypes)) {
                 $interactive = true;
             } else {
                 if ($question_part[0] == 'random') {
                     $options = QuestionUtils::get_options_text($question_part[1], $db);
                     $types = array();
                     foreach ($options as $opt) {
                         $qtype = QuestionUtils::get_question_type($opt, $db);
                         $types[] = $qtype;
                     }
                     foreach ($types as $t) {
                         if (in_array($t, $checktypes)) {
                             $interactive = true;
                             break;
                         }
                     }
                 } else {
                     if ($question_part[0] == 'keyword_based') {
                         $options = QuestionUtils::get_options_text($question_part[1], $db);
                         foreach ($options as $opt) {
                             $keywords = keyword_utils::get_keyword_questions($opt, $db);
                             $types = array();
                             foreach ($keywords as $key) {
                                 $qtype = QuestionUtils::get_question_type($key, $db);
                                 $types[] = $qtype;
                             }
                         }
                         foreach ($types as $t) {
                             if (in_array($t, $checktypes)) {
                                 $interactive = true;
                                 break;
                             }
                         }
                     }
                 }
             }
         }
     }
     return $interactive;
 }