$headerStr .= "DEV: {$CFG->sysname} " . ($CFG->istrainingsite ? ' (TRAINING)' : '') . " </span><br/>"; } else { $headerStr .= "PROD: {$CFG->sysname} " . ($CFG->istrainingsite ? ' (TRAINING)' : '') . "</span><br/>"; } $headerStr .= " <span id='user_feedback' style='width: 80%'>"; $headerStr .= $loggedinuserdata->name . "</span></div>"; // list criteria types here $criteriaTypesXML = simplexml_load_string($enumlib->getCriteriaTypesLookup()); $listTableStr = "<table><tr><th>{$stringlib->get_string('criteria_description_lbl')}</th><th>{$stringlib->get_string('criteria_notes_lbl')}</th><th style='width:50px'>Delete</th></tr>"; foreach ($criteriaTypesXML->item as $item) { $listTableStr .= "<tr><td><a href='{$CFG->wwwroot}{$CFG->basedir}admin/criteriatypes/edit/index.php?id={$item->id}'>{$item->description}</a></td>"; $listTableStr .= "<td>{$item->notes}</td>"; $listTableStr .= "<td><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}/icons/gtk-cancel.png' BORDER='0' style='vertical-align: text-bottom;' onclick='delete_item({$item->id}); return false;'/></td></tr>"; } $listTableStr .= "</table>"; if ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_view_system_users) || $authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_edit_system_users) || $authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_edit_strings)) { $menuStr .= "<li class='showing'><label class='tree-toggle nav-header'>{$stringlib->get_string('system_administration_label')}</label>"; $menuStr .= "<ul class='nav nav-list tree'>" . "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('system_users_setup_help')}\"); return false;'/></div>" . "<div style='float:left; display:table-cell; vertical-align:middle'><a href='{$CFG->wwwroot}{$CFG->basedir}admin/users'>{$stringlib->get_string('system_users_setup')}</a></div>" . "</div></li>"; if ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_view_students)) { $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('participants_setup_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'><a href='{$CFG->wwwroot}{$CFG->basedir}students'>{$stringlib->get_string('participants_setup')}</a></div>" . "</div></li>"; } $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('system_criteria_setup_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'><a href='{$CFG->wwwroot}{$CFG->basedir}admin/criteriatypes'>{$stringlib->get_string('string_criteria_types_label')}</a></div>" . "</div></li>"; $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('system_labels_help')}\"); return false;'/></div>" . "<div class='currentmenulocation' style='float:left;display:table-cell; vertical-align:middle'>{$stringlib->get_string('string_management_form_label')}</div>" . "</div></li>"; $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('system_lookups_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'><a href='{$CFG->wwwroot}{$CFG->basedir}admin/lookups'>{$stringlib->get_string('system_lookups_form_label')}</a></div>" . "</div></li>"; $menuStr .= "</ul></li>"; } // breadcrumbs $breadcrumbStr = "<a href='{$CFG->wwwroot}{$CFG->basedir}'>Home</a>>"; $currentpath = str_replace("/{$CFG->basedir}", '', $_SERVER['PHP_SELF']); //print($currentpath); $patharr = explode('/', $currentpath);
//print($currentpath); $patharr = explode('/', $currentpath); $linkStr = ''; $displayStr = ''; for ($i = 0; $i < count($patharr) - 1; $i++) { $breadcrumbStr .= $i < count($patharr) - 2 ? "<a href='" : ""; $linkStr .= "{$patharr[$i]}/"; $breadcrumbStr .= $i < count($patharr) - 2 ? "{$CFG->wwwroot}{$CFG->basedir}{$linkStr}'>" : ""; $breadcrumbStr .= (file_get_contents("{$CFG->wwwroot}{$CFG->basedir}{$linkStr}" . "label.txt") ? $stringlib->get_string(file_get_contents("{$CFG->wwwroot}{$CFG->basedir}{$linkStr}" . "label.txt")) : $patharr[$i]) . ($i < count($patharr) - 2 ? "</a>" : "") . ($i < count($patharr) - 2 ? ">" : ''); } //print('path array is:' . $patharr[$i - 1]); // the navigation menu $menuStr = ""; //$displayAdminStr = false; $adminStr = ""; 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)) { $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('participants_setup_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'>"; $menuStr .= $patharr[$i - 1] == 'sessions' ? "<span class='currentmenulocation'>{$stringlib->get_string('eosce_setup')}</span>" : "<a href='javascript:window.location.assign(\"{$CFG->wwwroot}{$CFG->basedir}sessions/\")'>{$stringlib->get_string('eosce_setup')}</a>"; $menuStr .= "</div></div></li>"; } if ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_view_reports)) { $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('reports_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'>"; $menuStr .= $patharr[$i - 1] == 'reports' ? "<span class='currentmenulocation'>{$stringlib->get_string('reports_index_label')}</span>" : "<a href='javascript:window.location.assign(\"{$CFG->wwwroot}{$CFG->basedir}reports/\")'>{$stringlib->get_string('reports_index_label')}</a>"; } if ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_view_assessments)) { $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('osce_archive_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'>"; $menuStr .= $patharr[$i - 1] == 'archive' ? "<span class='currentmenulocation'>{$stringlib->get_string('eosce_archive')}</span>" : "<a href='javascript:window.location.assign(\"{$CFG->wwwroot}{$CFG->basedir}archive/\")'>{$stringlib->get_string('eosce_archive')}</a>"; $menuStr .= "</div></div></li>"; }
//print($currentpath); $patharr = explode('/', $currentpath); $linkStr = ''; $displayStr = ''; for ($i = 0; $i < count($patharr) - 1; $i++) { $breadcrumbStr .= $i < count($patharr) - 2 ? "<a href='" : ""; $linkStr .= "{$patharr[$i]}/"; $breadcrumbStr .= $i < count($patharr) - 2 ? "{$CFG->wwwroot}{$CFG->basedir}{$linkStr}'>" : ""; $breadcrumbStr .= (file_get_contents("{$CFG->wwwroot}{$CFG->basedir}{$linkStr}" . "label.txt") ? $stringlib->get_string(file_get_contents("{$CFG->wwwroot}{$CFG->basedir}{$linkStr}" . "label.txt")) : $patharr[$i]) . ($i < count($patharr) - 2 ? "</a>" : "") . ($i < count($patharr) - 2 ? ">" : ''); } //print('path array is:' . $patharr[$i - 1]); // the navigation menu $menuStr = ""; //$displayAdminStr = false; $adminStr = ""; 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)) { $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('participants_setup_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'>"; $menuStr .= $patharr[$i - 1] == 'sessions' ? "<span class='currentmenulocation'>{$stringlib->get_string('eosce_setup')}</span>" : "<a href='javascript:window.location.assign(\"{$CFG->wwwroot}{$CFG->basedir}sessions/\")'>{$stringlib->get_string('eosce_setup')}</a>"; $menuStr .= "</div></div></li>"; } if ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_view_reports)) { $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('reports_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'>"; $menuStr .= $patharr[$i - 1] == 'reports' ? "<span class='currentmenulocation'>{$stringlib->get_string('reports_help')}</span>" : "<a href='javascript:window.location.assign(\"{$CFG->wwwroot}{$CFG->basedir}reports/\")'>{$stringlib->get_string('reports_index_label')}</a>"; } if ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_view_assessments)) { $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('osce_archive_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'>"; $menuStr .= $patharr[$i - 1] == 'archive' ? "<span class='currentmenulocation'>{$stringlib->get_string('eosce_archive')}</span>" : "<a href='javascript:window.location.assign(\"{$CFG->wwwroot}{$CFG->basedir}archive/\")'>{$stringlib->get_string('eosce_archive')}</a>"; $menuStr .= "</div></div></li>"; }
$headerStr .= "PROD: {$CFG->sysname} " . ($CFG->istrainingsite ? ' (TRAINING)' : '') . "</span><br/>"; } $headerStr .= " <span id='user_feedback' style='width: 80%'>"; $headerStr .= $loggedinuserdata->name . "</span></div>"; $rolesXML = simplexml_load_string($enumlib->getRolesLookup()); $rolesStr = ''; $rolesHelpStr = "<strong>Roles</strong><br/>"; foreach ($rolesXML->option as $value) { $rolesStr .= "<option value='{$value->ID}'>{$value->description}</option>"; $rolesHelpStr .= "{$value->notes}<br/>"; } // list users here $userdata = simplexml_load_string($enumlib->getUsers(isset($_REQUEST['searchstr']) ? $_REQUEST['searchstr'] : '')); $listTableStr = "<table id='userlist'><tr><th>{$stringlib->get_string('user_login')}</th><th>{$stringlib->get_string('user_name')}</th><th>{$stringlib->get_string('user_role')}</th><th>Type</th><th style='width:50px'>Delete</th></tr>"; foreach ($userdata->user as $user) { $listTableStr .= "<tr><td>" . ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_edit_system_users) ? "<a href='#' onclick='open_edit_user_dialog({$user->id});'>{$user->username}</a>" : "{$user->username}") . "</td><td>{$user->name}</td><td>{$user->role}</td><td>{$user->type}</td>"; $listTableStr .= "<td>" . ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_edit_system_users) ? "<input type='image' src='{$CFG->wwwroot}{$CFG->basedir}/icons/gtk-cancel.png' BORDER='0' style='vertical-align: text-bottom;' onclick='delete_user({$user->id}); return false;'/>" : "") . "</td></tr>"; } $listTableStr .= "</table>"; // $menuStr = '<div style="display:table; width:100%"><div style="display:table-row; width:100%">'; $menuStr = ""; //$displayAdminStr = false; $adminStr = ""; if ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_view_system_users) || $authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_edit_system_users) || $authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_edit_strings)) { $menuStr .= "<li class='showing'><label class='tree-toggle nav-header'>{$stringlib->get_string('system_administration_label')}</label>"; $menuStr .= "<ul class='nav nav-list tree'>" . "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('system_users_setup_help')}\"); return false;'/></div>" . "<div class='currentmenulocation' style='float:left; display:table-cell; vertical-align:middle'>{$stringlib->get_string('system_users_setup')}</div>" . "</div></li>"; if ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_view_students)) { $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('participants_setup_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'><a href='{$CFG->wwwroot}{$CFG->basedir}students'>{$stringlib->get_string('participants_setup')}</a></div>" . "</div></li>"; } $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('system_criteria_setup_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'><a href='{$CFG->wwwroot}{$CFG->basedir}admin/criteriatypes'>{$stringlib->get_string('string_criteria_types_label')}</a></div>" . "</div></li>"; $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('system_labels_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'><a href='{$CFG->wwwroot}{$CFG->basedir}admin/strings'>{$stringlib->get_string('string_management_form_label')}</a></div>" . "</div></li>";
//print($currentpath); $patharr = explode('/', $currentpath); $linkStr = ''; $displayStr = ''; for ($i = 0; $i < count($patharr) - 1; $i++) { $breadcrumbStr .= $i < count($patharr) - 2 ? "<a href='" : ""; $linkStr .= "{$patharr[$i]}/"; $breadcrumbStr .= $i < count($patharr) - 2 ? "{$CFG->wwwroot}{$CFG->basedir}{$linkStr}'>" : ""; $breadcrumbStr .= (file_get_contents("{$CFG->wwwroot}{$CFG->basedir}{$linkStr}" . "label.txt") ? $stringlib->get_string(file_get_contents("{$CFG->wwwroot}{$CFG->basedir}{$linkStr}" . "label.txt")) : $patharr[$i]) . ($i < count($patharr) - 2 ? "</a>" : "") . ($i < count($patharr) - 2 ? ">" : ''); } print $patharr[$i - 1]; // the navigation menu $menuStr = ""; //$displayAdminStr = false; $adminStr = ""; 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)) { $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('participants_setup_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'>"; $menuStr .= $patharr[$i - 1] == 'sessions' ? "<span class='currentmenulocation'>{$stringlib->get_string('eosce_setup')}</span>" : "<a href='javascript:window.location.assign(\"{$CFG->wwwroot}{$CFG->basedir}sessions/\")'>{$stringlib->get_string('eosce_setup')}</a>"; $menuStr .= "</div></div></li>"; } if ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_view_reports)) { $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('reports_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'>"; $menuStr .= $patharr[$i - 1] == 'reports' ? "<span class='currentmenulocation'>{$stringlib->get_string('reports_help')}</span>" : "<a href='javascript:window.location.assign(\"{$CFG->wwwroot}{$CFG->basedir}reports/\")'>{$stringlib->get_string('reports_index_label')}</a>"; } if ($authlib->user_has_capability($loggedinuserdata->userID, $authlib::roles_view_assessments)) { $menuStr .= "<li><div style='vertical-align: middle; display:table;'>" . "<div style='display:table-cell; vertical-align:middle'><input type='image' src='{$CFG->wwwroot}{$CFG->basedir}icons/dialog-question.png' BORDER='0' onclick='showHelp(\"{$stringlib->get_string('osce_archive_help')}\"); return false;'/></div>" . "<div style='float:left;display:table-cell; vertical-align:middle'>"; $menuStr .= $patharr[$i - 1] == 'archive' ? "<span class='currentmenulocation'>{$stringlib->get_string('eosce_archive')}</span>" : "<a href='javascript:window.location.assign(\"{$CFG->wwwroot}{$CFG->basedir}archive/\")'>{$stringlib->get_string('eosce_archive')}</a>"; $menuStr .= "</div></div></li>"; }