Пример #1
0
    h1 {font-size: 200%}
    a {font-family: 'Courier New'; font-weight: bold}
  </style>
</head>

<body>

<blockquote>
  <h1>Old Page</h1>

  <p>Please update your bookmarks accordingly:</p>

  <ul>
    <?php 
$staff_homepage = NetworkUtils::get_protocol() . $_SERVER['HTTP_HOST'] . $cfg_root_path . '/';
$summative_homepage = NetworkUtils::get_protocol() . $_SERVER['HTTP_HOST'] . $cfg_root_path . '/paper/';
?>
    <li>New staff homepage: <a href="<?php 
echo $staff_homepage;
?>
"><?php 
echo $staff_homepage;
?>
</a></li>
    <li>Summative exam homepage (for students): <a href="<?php 
echo $summative_homepage;
?>
"><?php 
echo $summative_homepage;
?>
</a></li>
Пример #2
0
<div id="content">
<div class="head_title">
  <div><img src="../artwork/toprightmenu.gif" id="toprightmenu_icon" /></div>
  <div class="breadcrumb"><a href="../index.php"><?php 
echo $string['home'];
?>
</a></div>
  <div class="page_title">Module: <span style="font-weight:normal"><?php 
echo $module_details['moduleid'];
?>
</span></div>
</div>
<?php 
// Is it a self-enrol module.
if (isset($module_details['selfenroll']) and $module_details['selfenroll'] == 1) {
    $selfenrol_url = NetworkUtils::get_protocol() . $_SERVER['HTTP_HOST'] . $configObject->get('cfg_root_path') . '/self_enrol.php?moduleid=' . $module_details['moduleid'];
    echo "<br /><div style=\"margin-left:auto; margin-right:auto; width:500px\"><img src=\"../artwork/self_enrol.png\" width=\"48\" height=\"48\" alt=\"modules\" style=\"float:left; margin-right:10px\" /> <div style=\"color:#F18103; font-weight:bold; line-height:200%\">" . $string['selfenrolmodule'] . "</div>" . $string['studenturl'] . ": <a href=\"{$selfenrol_url}\" style=\"color:#316ac5\">{$selfenrol_url}</a></div>\n";
}
// Paper type folders
echo "<div class=\"subsect_table\" style=\"clear:both\"><div class=\"subsect_title\">" . $string['papers'] . "</div><div class=\"subsect_hr\"><hr noshade=\"noshade\" /></div></div>\n";
$state = $stateutil->getState($configObject->get('cfg_root_path') . '/paper/type.php');
if (isset($state['showretired']) and $state['showretired'] == 'true') {
    $types_used = module_utils::paper_types($module, true, $mysqli);
} else {
    $types_used = module_utils::paper_types($module, false, $mysqli);
}
foreach ($types_used as $type => $no_papers) {
    $url = '../paper/type.php?module=' . $module . '&type=' . $type;
    echo "<div class=\"f2\"><div class=\"f_icon\"><a href=\"{$url}\"><img src=\"../artwork/yellow_folder.png\" alt=\"Folder\" /></a></div><div class=\"f_details\"><a href=\"{$url}\">" . Paper_utils::type_to_name($type, $string) . "</a><br /><span class=\"grey\">" . number_format($no_papers) . " " . strtolower($string['papers']) . "</span></div></div>\n";
}
echo "<br clear=\"left\">\n";
Пример #3
0
//
// Rogō is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Rogō is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Rogō.  If not, see <http://www.gnu.org/licenses/>.
/**
*
* This script saves state information to the database. Normally called via AJAX. 
*
* @author Simon Wilkinson
* @version 1.0
* @copyright Copyright (c) 2014 The University of Nottingham
* @package
*/
require '../include/staff_auth.inc';
require '../classes/stateutils.class.php';
$prefix = NetworkUtils::get_protocol() . $_SERVER['HTTP_HOST'];
$page = str_ireplace($prefix, '', $_REQUEST['page']);
$page = str_replace('#', '', $page);
$parts = explode('?', $page);
$page = $parts[0];
$userID = $userObject->get_user_ID();
$stateutil->setState($_REQUEST['state_name'], $_REQUEST['content'], $page);
Пример #4
0
 /**
  * Displays a footer for a help page.
  * @param int $id - The ID of the help page to display.
  */
 private function display_footer($id)
 {
     if ($id > 1) {
         // Do not display footer if ID is one.
         echo "<div class=\"footer_line\"></div>\n";
         echo "<div class=\"footer_left gototop\"><img src=\"../../artwork/top_icon.gif\" width=\"9\" height=\"12\" />&nbsp;" . $this->string['top'] . "</div>\n";
         if ($this->userObject->has_role('SysAdmin')) {
             echo '<div class="footer_right">' . NetworkUtils::get_protocol() . $_SERVER['HTTP_HOST'] . $this->configObject->get('cfg_root_path') . '/help/staff/index.php?id=' . $id . '</div>';
         }
     }
 }
Пример #5
0
 public function getOwnerPaperList($username, $types)
 {
     global $configObject;
     $allowaccess = false;
     $userObject = UserObject::get_instance();
     $tmp_userID = $this->getUserID($username, true);
     if ($userObject->has_role('SysAdmin') or $userObject->has_role('Admin')) {
         $allowaccess = true;
     } else {
         if ($userObject->has_role('Staff') and $tmp_userID == $userObject->get_user_ID()) {
             $allowaccess = true;
         } else {
             if ($userObject->has_role('Student')) {
                 // Students can not access this function
                 $allowaccess = false;
             }
         }
     }
     if ($allowaccess == false) {
         return '';
     }
     if ($tmp_userID == '') {
         return '';
     }
     $staff_modules = UserUtils::list_staff_modules_by_userID($tmp_userID, $this->db);
     if (count($staff_modules) == 0) {
         // User is not on any teams. stop!!
         return array();
     }
     $staff_modules_ids_str = ' OR idMod IN (' . implode(',', array_keys($staff_modules)) . ') ';
     switch ($types) {
         case 'formative':
             $typeSQL = " AND paper_type='0'";
             break;
         case 'progresstest':
             $typeSQL = " AND paper_type='1'";
             break;
         case 'summative':
             $typeSQL = " AND paper_type='2'";
             break;
         case 'survey':
             $typeSQL = " AND paper_type='3'";
             break;
         case 'osce':
             $typeSQL = " AND paper_type='4'";
             break;
         case 'offline':
             $typeSQL = " AND paper_type='5'";
             break;
         case 'notsummative':
             $typeSQL = " AND paper_type!='2'";
             break;
         default:
             // return all paper types
             $typeSQL = '';
             break;
     }
     $papers = array();
     $paper_no = 0;
     $res = $this->db->prepare("SELECT \n                                  properties.property_id, paper_title, paper_type, start_date, end_date, created, MAX(screen), title, surname, crypt_name \n                               FROM properties, papers, users, properties_modules \n                               WHERE \n                                  properties.property_id = properties_modules.property_id AND\n                                  properties.paper_ownerID=users.id AND \n                                  properties.property_id=papers.paper AND \n                                  (paper_ownerID=? {$staff_modules_ids_str}) {$typeSQL} AND \n                                  deleted IS NULL \n                               GROUP BY property_id ORDER BY paper_title");
     $res->bind_param('i', $tmp_userID);
     $res->execute();
     $res->store_result();
     $res->bind_result($property_id, $paper_title, $paper_type, $start_date, $end_date, $created, $screens, $title, $surname, $crypt_name);
     if ($res->num_rows == 0) {
         return json_encode($this->db->error);
     } else {
         while ($res->fetch()) {
             $papers[$paper_no]['id'] = $crypt_name;
             $papers[$paper_no]['title'] = $paper_title;
             $papers[$paper_no]['type'] = $this->qtypes[$paper_type];
             $papers[$paper_no]['staff_url'] = NetworkUtils::get_protocol() . $_SERVER['HTTP_HOST'] . $configObject->get('cfg_root_path') . '/paper/details.php?paperID=' . $property_id;
             $papers[$paper_no]['student_url'] = NetworkUtils::get_protocol() . $_SERVER['HTTP_HOST'] . $configObject->get('cfg_root_path') . '/paper/user_index.php?id=' . $crypt_name;
             $papers[$paper_no]['start_date'] = $start_date;
             $papers[$paper_no]['end_date'] = $end_date;
             $papers[$paper_no]['created'] = $created;
             $papers[$paper_no]['screens'] = $screens;
             $papers[$paper_no]['owner'] = $title . ' ' . $surname;
             $paper_no++;
         }
     }
     $res->close();
     return $papers;
 }
Пример #6
0
<tr><td class="tabtitle" colspan="2"><img src="../artwork/reviewers_heading_icon.png" alt="Icon" align="middle" /><?php 
echo $string['reviewersheading'];
?>
</td></tr>
<tr>
<td align="center" colspan="2">
<table cellpadding="1" cellspacing="2" border="0">
<tr><td colspan="3">&nbsp;<?php 
$result = $mysqli->prepare("SELECT COUNT(q_id) AS sct_no FROM (papers, questions) WHERE papers.paper = ? AND papers.question = questions.q_id AND q_type = 'sct'");
$result->bind_param('i', $paperID);
$result->execute();
$result->bind_result($sct_no);
$result->fetch();
$result->close();
if ($sct_no > 0) {
    echo '<a href="' . $configObject->get('cfg_root_path') . '/reviews/sct_review.php?id=' . urlencode($properties->get_crypt_name()) . '" target="_blank">' . NetworkUtils::get_protocol() . $_SERVER['HTTP_HOST'] . $configObject->get('cfg_root_path') . '/reviews/sct_review.php?id=' . urlencode($properties->get_crypt_name()) . '</a>';
}
?>
</td></tr>
<tr><td class="headbar">&nbsp;<?php 
echo $string['internalreviewers'];
?>
</td><td>&nbsp;&nbsp;</td><td class="headbar">&nbsp;<?php 
echo $string['externalexaminers'];
?>
</td></tr>
<tr><td><?php 
echo $string['deadline'];
?>
&nbsp;
<?php