예제 #1
0
 /**
  * Creates a new Exclude
  *
  * @param {integer} $id 
  *
  * @return Redirect
  * @author Dan Cox
  */
 public function addExcludes($id)
 {
     $schedule = DB::find('Schedule', $id);
     $exclude = new Exclusion();
     $exclude->setLabel(Input::get('label'))->setDay(Input::get('day'))->setTimes(Input::get('times'));
     $errors = Validator::make($exclude);
     if (count($errors) > 0) {
         return Redirect::route('page.addExcludes', ['id' => $schedule->id])->withInput()->withErrors($errors)->send();
     }
     $exclude->setSchedule($schedule);
     DB::save($exclude);
     return Redirect::route('page.excludes', ['id' => $schedule->id])->with('success', 'Successfully created new exclude')->send();
 }
예제 #2
0
     $log_array[$rowID]['title'] = $title;
     $log_array[$rowID]['surname'] = demo_replace($surname, $demo);
     $log_array[$rowID]['first_names'] = demo_replace($first_names, $demo);
     $log_array[$rowID]['name'] = str_replace("'", "", $surname) . ',' . $first_names;
     $log_array[$rowID]['gender'] = $gender;
     $log_array[$rowID]['$questionID'] = json_decode($settings, true);
     $user_no++;
     $old_username = $username;
     $old_started = $started;
 }
 $result->close();
 $sortby = 'name';
 $ordering = 'asc';
 $log_array = array_csort($log_array, $sortby, $ordering);
 //********************************
 $exclusions = new Exclusion($paperID, $mysqli);
 $exclusions->load();
 // Get any questions to exclude.
 $row_written = 0;
 foreach ($user_results as $individual) {
     $tmp_user_ID = $individual['username'];
     // Write out the headings.
     if ($row_written == 0) {
         // Only output personal data if assessment, do not show if survey.
         if ($paper_type < 3) {
             $csv .= '"' . $string['gender'] . '","' . $string['title'] . '","' . $string['surname'] . '","' . $string['firstnames'] . '","' . $string['studentid'] . '","' . $string['course'] . '","' . $string['year'] . '","' . $string['submitted'] . '"';
         } else {
             $csv .= '"' . $string['gender'] . '","' . $string['course'] . '","' . $string['year'] . '","' . $string['submitted'] . '"';
         }
         $q_no = 1;
         foreach ($paper_buffer as $q_id => $question) {
예제 #3
0
 private function load_unmarked_enhancedcalc()
 {
     $this->unmarked_enhancedcalc = false;
     if (!isset($this->questions)) {
         $this->load_questions();
     }
     $enhancedcalc_ids = array();
     $paperID = $this->get_property_id();
     $excluded = new Exclusion($paperID, $this->db);
     $excluded->load();
     if (is_array($this->questions) and count($this->questions) > 0) {
         // Calculation questions may be hidden in random blocks of keyword baed questions so we have to check all possibilities.
         foreach ($this->questions as $question) {
             // Skip excluded questions.
             if (!$excluded->is_question_excluded($question['q_id'])) {
                 switch ($question['type']) {
                     case 'random':
                         foreach (QuestionUtils::get_random_calc_question($question['q_id'], $this->db) as $possible) {
                             $enhancedcalc_ids[] = $possible;
                         }
                         break;
                     case 'keyword_based':
                         foreach (QuestionUtils::get_keyword_calc_question($question['q_id'], $this->db) as $possible) {
                             $enhancedcalc_ids[] = $possible;
                         }
                         break;
                     case 'enhancedcalc':
                         $enhancedcalc_ids[] = $question['q_id'];
                         break;
                     default:
                         break;
                 }
             }
         }
     }
     // Find unmarked questions.
     if (count($enhancedcalc_ids) > 0) {
         $result = $this->db->prepare("SELECT log2.id FROM log2, log_metadata WHERE log2.metadataID = log_metadata.id " . "AND q_id IN (" . implode(',', $enhancedcalc_ids) . ") AND paperID = ? AND mark IS NULL LIMIT 1");
         $result->bind_param('i', $paperID);
         $result->execute();
         $result->store_result();
         $result->bind_result($id);
         if ($result->num_rows > 0) {
             $this->unmarked_enhancedcalc = true;
         }
         $result->close();
     }
 }
예제 #4
0
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta http-equiv="content-type" content="text/html;charset=<?php 
echo $configObject->get('cfg_page_charset');
?>
" />

  <title>Rog&#333;: Standards Setting<?php 
echo ' ' . $configObject->get('cfg_install_type');
?>
</title>
  <?php 
// Get any questions to exclude.
$exclusions = new Exclusion($paperID, $mysqli);
$exclusions->load();
$current_screen = 1;
?>
  <link rel="stylesheet" type="text/css" href="../css/body.css" />
  <link rel="stylesheet" type="text/css" href="../css/header.css" />
  <link rel="stylesheet" type="text/css" href="../css/start.css" />
  <link rel="stylesheet" type="text/css" href="../css/finish.css" />
  <link rel="stylesheet" type="text/css" href="../css/key.css" />
  <link rel="stylesheet" type="text/css" href="../css/std_setting.css" />
  <style>
		table {table-layout:auto}
		#maincontent {height:auto}
    .var {font-weight: bold}
    .value {display:none}
  </style>
예제 #5
0
    $ordering = 'screen';
    $direction = 'asc';
}
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['folder']) and $_GET['folder'] != '') {
    echo '<img src="../artwork/breadcrumb_arrow.png" class="breadcrumb_arrow" alt="-" /><a href="../folder/index.php?folder=' . $_GET['folder'] . '">' . folder_utils::get_folder_name($_GET['folder'], $mysqli) . '</a>';
} elseif (isset($_GET['module']) and $_GET['module'] != '') {
    $modules = explode(',', $_GET['module']);
    echo '<img src="../artwork/breadcrumb_arrow.png" class="breadcrumb_arrow" alt="-" /><a href="../module/index.php?module=' . $modules[0] . '">' . module_utils::get_moduleid_from_id($modules[0], $mysqli) . '</a>';
}
echo '<img src="../artwork/breadcrumb_arrow.png" class="breadcrumb_arrow" alt="-" /><a href="../paper/details.php?paperID=' . $paperID . '">' . $paper_title . '</a></div>';
echo "<div class=\"page_title\">" . $string['mappedobjectives'] . "</div>\n</div>\n";
// Get any questions to exclude.
$exclusions = new Exclusion($paperID, $mysqli);
$exclusions->load();
$old_p_id = 0;
$row_no = 0;
$info_count = 0;
$temp_array = array();
$questionID_list = '';
$result = $mysqli->prepare("SELECT random_mark, total_mark, p_id, q_id, q_type, screen, leadin, q_media, q_media_width, q_media_height, DATE_FORMAT(last_edited,'%d/%m/%y') AS display_last_edited, display_pos FROM (properties, papers, questions) WHERE property_id=? AND paper=? AND papers.question=questions.q_id ORDER BY screen, display_pos");
$result->bind_param('ii', $paperID, $paperID);
$result->execute();
$result->bind_result($random_mark, $total_mark, $p_id, $q_id, $q_type, $screen, $leadin, $q_media, $q_media_width, $q_media_height, $display_last_edited, $display_pos);
while ($result->fetch()) {
    $row_no++;
    $temp_array[$q_id]['screen'] = $screen;
    $temp_array[$q_id]['q_type'] = $q_type;
    $temp_array[$q_id]['leadin'] = trim(str_replace('&nbsp;', ' ', strip_tags($leadin)));
예제 #6
0
$demo = is_demo($userObject);
$paperID = check_var('paperID', 'GET', true, false, true);
$startdate = check_var('startdate', 'GET', true, false, true);
$enddate = check_var('enddate', 'GET', true, false, true);
$percent = isset($_GET['percent']) ? $_GET['percent'] : 100;
$ordering = isset($_GET['ordering']) ? $_GET['ordering'] : 'asc';
$absent = isset($_GET['absent']) ? $_GET['absent'] : 0;
$sortby = isset($_GET['sortby']) ? $_GET['sortby'] : 'name';
$studentsonly = isset($_GET['studentsonly']) ? $_GET['studentsonly'] : 1;
$repcourse = isset($_GET['repcourse']) ? $_GET['repcourse'] : '%';
$repmodule = isset($_GET['repmodule']) ? $_GET['repmodule'] : '';
// Get some paper properties
$propertyObj = PaperProperties::get_paper_properties_by_id($paperID, $mysqli, $string);
$paper = $propertyObj->get_paper_title();
$crypt_name = $propertyObj->get_crypt_name();
$exclusions = new Exclusion($paperID, $mysqli);
$exclusions->load();
// Get any questions to exclude.
$report = new ClassTotals($studentsonly, $percent, $ordering, $absent, $sortby, $userObject, $propertyObj, $startdate, $enddate, $repcourse, $repmodule, $mysqli, $string);
$report->load_answers();
$paper_buffer = $report->get_paper_buffer();
$question_no = $report->get_question_no();
$user_results = load_osce_results($propertyObj, $demo, $configObject, $question_no, $mysqli);
$report->set_user_results($user_results);
$report->generate_stats();
$user_no = $report->get_user_no();
$q_medians = load_osce_medians($mysqli);
if ($propertyObj->get_pass_mark() == 101) {
    $borderline_method = true;
} else {
    $borderline_method = false;
예제 #7
0
    $ordering = 'screen';
    $direction = 'asc';
}
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['folder']) and $_GET['folder'] != '') {
    echo '<img src="../artwork/breadcrumb_arrow.png" class="breadcrumb_arrow" alt="-" /><a href="../folder/index.php?folder=' . $_GET['folder'] . '">' . folder_utils::get_folder_name($_GET['folder'], $mysqli) . '</a>';
} elseif (isset($_GET['module']) and $_GET['module'] != '') {
    $modules = explode(',', $_GET['module']);
    echo '<img src="../artwork/breadcrumb_arrow.png" class="breadcrumb_arrow" alt="-" /><a href="../module/index.php?module=' . $modules[0] . '">' . module_utils::get_moduleid_from_id($modules[0], $mysqli) . '</a>';
}
echo '<img src="../artwork/breadcrumb_arrow.png" class="breadcrumb_arrow" alt="-" /><a href="../paper/details.php?paperID=' . $paperID . '">' . $paper_title . '</a></div>';
echo "<div class=\"page_title\">" . $string['mappedobjectives'] . "</div>\n</div>\n";
// Get any questions to exclude.
$exclusions = new Exclusion($paperID, $mysqli);
$exclusions->load();
?>
  <table class="header">
  <tr><th style="padding-top:1px">
  <table cellpadding="0" cellspacing="0" border="0" style="font-size:90%; width:378px">
  <td class="taboff" onclick="window.location.href='paper_by_session.php?paperID=<?php 
echo $paperID;
?>
&folder=<?php 
echo $_GET['folder'];
?>
&module=<?php 
echo $_GET['module'];
?>
'"><?php 
                $log_array[$qID][1][$answer] = 1;
            }
            break;
    }
}
$d_no = 0;
$d_total = 0;
if (isset($_POST['submit'])) {
    $old_exclusions = new Exclusion($paperID, $mysqli);
    $old_exclusions->load();
    // Clear the database of any past exclusions from the current paper.
    $old_exclusions->clear_all_exclusions();
    $old_q_id = 0;
    $old_status = '';
    $excluded = false;
    $new_exclusions = new Exclusion($paperID, $mysqli);
    for ($i = 1; $i <= $_POST['question_no']; $i++) {
        $current_id = $_POST['id_' . $i];
        if ($current_id != $old_q_id) {
            if (strpos($old_status, '1') !== false) {
                $new_exclusions->add_exclusion($old_q_id, $old_status);
            }
            $old_status = '';
        }
        $old_status .= $_POST['status_' . $i];
        $old_q_id = $_POST['id_' . $i];
    }
    if (strpos($old_status, '1') !== false) {
        $new_exclusions->add_exclusion($old_q_id, $old_status);
    }
    $new_exclusions->load();
예제 #9
0
파일: details.php 프로젝트: vinod-co/centa
        if ($userObject->is_staff_user_on_module($paper_moduleID)) {
            $on_staff_module = true;
        }
    }
}
if ($on_staff_module == false and !in_array('SYSTEM', array_values($paper_modules))) {
    $msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email'));
    $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['accessdenied'], '/artwork/page_not_found.png', '#C00000', true, true);
}
if ($properties->get_paper_type() == '4') {
    // OSCE
    require_once '../classes/killer_question.class.php';
    $killer_questions = new Killer_question($paperID, $mysqli);
    $killer_questions->load();
}
$exclusions = new Exclusion($paperID, $mysqli);
$exclusions->load();
/**
 * Displays a warning if any questions are duplicated on the paper (not Surveys).
 * @param array $q_screens	- Array of question IDs. If there are more than one element for the same ID you have a duplicate.
 * @param array $string			- Language translations
 */
function check_duplicates($q_screens, $string)
{
    foreach ($q_screens as $q_screen => $qs) {
        if (count($qs) > 1) {
            echo "<tr><td colspan=\"2\" class=\"warnicon\"><img src=\"../artwork/small_yellow_warning_icon.gif\" width=\"12\" height=\"11\" alt=\"" . $string['warning'] . "\" /></td><td colspan=\"4\" class=\"warn\">&nbsp;<strong>" . $string['Duplicate questions'] . ":</strong> Q" . implode(', Q', $qs) . "</td></tr>\n";
        }
    }
}
/**