Exemple #1
0
     break;
 case 'getsessionhistory':
     include 'lib/EnumLib.php';
     $enumLib = new EnumLib();
     $returnStr = $enumLib->getOverviewHistory($_REQUEST['id']);
     break;
     /////////////////////////////////////////////////////////////////////////////////////////
     //Reports
     /////////////////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////////////////
 //Reports
 /////////////////////////////////////////////////////////////////////////////////////////
 case 'getactiveexamdata':
     include 'lib/EnumLib.php';
     $enumLib = new EnumLib();
     $returnStr = $enumLib->getActiveExamInstances($_REQUEST['site']);
     break;
 case 'showsignatureimage':
     include 'lib/ReportsLib.php';
     $reportslib = new ReportsLib();
     $thumb = $reportslib->displaySignature($_REQUEST['session_ID']);
     header('Content-type: image/jpeg');
     imagejpeg($thumb);
     imagedestroy($thumb);
     break;
 case 'getreportforsession':
     include 'lib/ReportsLib.php';
     include 'lib/EnumLib.php';
     $reportslib = new ReportsLib();
     $returnStr = $reportslib->getReportForStudentSession($_REQUEST['session_ID']);
     break;
Exemple #2
0
        $examActionStr .= "Don't have the app?<br/><a href='https://geo.itunes.apple.com/au/app/une-eosce/id930335514?mt=8&uo=6' target='itunes_store' style='display:inline-block;overflow:hidden;background:url(http://linkmaker.itunes.apple.com/images/badges/en-us/badge_appstore-lrg.png) no-repeat;width:165px;height:40px;@media only screen{background-image:url(http://linkmaker.itunes.apple.com/images/badges/en-us/badge_appstore-lrg.svg);}'></a>";
    } else {
        $enumlib = new EnumLib();
        $availableExams = simplexml_load_string($enumlib->getExamsForAssessor($loggedinuserdata->userID));
        if ($availableExams->instance->count() > 0) {
            $examActionStr .= "<h3>{$stringlib->get_string('assessor_available_examinations')}</h3>";
            foreach ($availableExams->instance as $instance) {
                $examActionStr .= "<button onclick='window.location=\"app/?id={$instance->id}\"' class='actionbut'>{$instance->name}</button><p/>";
            }
        }
    }
}
// show an overview of running assessments if permitted
if ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_view_assessments)) {
    $enumlib = new EnumLib();
    $availableExams = simplexml_load_string($enumlib->getActiveExamInstances());
    if ($availableExams->instance->count() > 0) {
        $examActionStr .= "<h3>{$stringlib->get_string('running_examinations')}</h3>";
        foreach ($availableExams->instance as $instance) {
            $examActionStr .= "<table id='active_sessions_table'></table>";
        }
    } else {
        $examActionStr .= "<p/>No examinations running";
    }
}
$menuStr = "";
$adminStr = "";
// build a menu
if ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_view_assessments) || $authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_view_reports)) {
    $menuStr .= "<li class='showing'><label class='tree-toggle nav-header'>Examination Management</label><ul class='nav nav-list tree'>";
    if ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_view_assessments)) {