Пример #1
0
$result->close();
if ($paper_type == '4') {
    // Get the maximum marks for OSCE station questions.
    $result = $mysqli->prepare("SELECT q_id, q_type, display_method, score_method FROM questions, papers WHERE papers.question = questions.q_id AND paper = ?");
    $result->bind_param('i', $paperID);
    $result->execute();
    $result->bind_result($q_id, $q_type, $display_method, $score_method);
    $total_student_mark = 0;
    while ($result->fetch()) {
        $question_marks = 1;
        $question_data[$q_id]['totalpos'] = qMarks($q_type, '', $question_marks, '', '', $display_method, $score_method);
    }
}
$objectives = array();
$qid_list = substr($qid_list, 0, -1);
$objByModule = getObjectivesByMapping($moduleID, $session, $paperID, $qid_list, $mysqli);
unset($objByModule['none_of_the_above']);
if (count($objByModule) > 0) {
    foreach ($objByModule as $module => $mappings) {
        foreach ($mappings as $id => $mappingData) {
            if ($mappingData['session']['class_code'] != '') {
                $sessiontitle = $mappingData['session']['class_code'];
            } else {
                $sessiontitle = $mappingData['session']['title'];
            }
            $objectives[$id] = $mappingData;
            foreach ($mappingData['mapped'] as $q_id) {
                if (isset($objectives[$id]['questions'])) {
                    $objectives[$id]['questions']++;
                } else {
                    $objectives[$id]['questions'] = 1;
Пример #2
0
$question_number = 0;
for ($x = 1; $x <= $row_no; $x++) {
    if ($old_screen != $temp_array[$x]['screen']) {
        if ($old_screen < $temp_array[$x]['screen'] - 1) {
            for ($missing = 1; $missing < $temp_array[$x]['screen'] - $old_screen; $missing++) {
                echo '<tr><td colspan="3" style="height:10px"></td></tr>';
                echo '<tr><td></td><td colspan="3" class="divider">Screen ' . ($old_screen + $missing) . '</td></tr>';
                echo '<tr><td colspan="3" style="height:5px"><img src="../artwork/divider_bar.gif" width="290" height="1" /></td></tr>';
                echo '<tr><td colspan="3" style="background-color:#FFC0C0; padding:5px"><strong>' . $string['warning'] . ':</strong> ' . $string['noquestiononscreen'] . '</td></tr>';
            }
        }
        echo "<tr><td colspan=\"4\" style=\"padding-left:4px\"><table border=\"0\" style=\"padding-top:6px; padding-bottom:2px; width:100%; color:#1E3287\"><tr><td><nobr>" . $string['screen'] . " " . $temp_array[$x]['screen'] . "</nobr></td><td style=\"width:98%\"><hr noshade=\"noshade\" style=\"border:0px; height:1px; color:#E5E5E5; background-color:#E5E5E5; width:100%\" /></td></tr></table>\n</td></tr>\n";
    }
    $old_screen = $temp_array[$x]['screen'];
    $moduleIDs = Paper_utils::get_modules($paperID, $mysqli);
    $objByModule = getObjectivesByMapping($moduleIDs, $session, $paperID, $temp_array[$x]['q_id'], $mysqli);
    if ($exclusions->get_exclusions_by_qid($temp_array[$x]['q_id']) != '0000000000000000000000000000000000000000') {
        $class = 'mapping_exclueded';
    } else {
        $class = '';
    }
    echo "<tr>";
    if (count($objByModule) > 0 or $temp_array[$x]['q_type'] == 'info') {
        echo '<td style="width:16px">&nbsp;</td>';
    } else {
        echo '<td style="width:16px"><img src="../artwork/small_yellow_warning_icon.gif" width="12" height="11" alt="No Mappings" /></td>';
    }
    if ($temp_array[$x]['q_type'] == 'info') {
        echo '<td class="q_no"><img src="../artwork/black_white_info_icon.png" width="6" height="12" alt="Info" />&nbsp;&nbsp;</td>';
    } else {
        $question_number++;