コード例 #1
0
     header("Location: " . ENTRADA_URL . (isset($_SERVER["REQUEST_URI"]) ? "?url=" . rawurlencode(clean_input($_SERVER["REQUEST_URI"], array("nows", "url"))) : ""));
     exit;
 } elseif (!$ENTRADA_ACL->amIAllowed('annualreport', 'update')) {
     $ONLOAD[] = "setTimeout('window.location=\\'" . ENTRADA_URL . "/" . $MODULE . "\\'', 15000)";
     $ERROR++;
     $ERRORSTR[] = "You do not have the permissions required to use this module.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance.";
     echo display_error();
     application_log("error", "Group [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] . "] and role [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["role"] . "] do not have access to this module [" . $MODULE . "]");
 } else {
     // Meta information for this page.
     $PAGE_META["title"] = "Add Graduate Teaching";
     $PAGE_META["description"] = "Graduate Teaching portion of your annual report should be entered / located here.";
     $PAGE_META["keywords"] = "";
     // This grid should be expanded upon redirecting back to the education index.
     $_SESSION["education_expand_grid"] = "graduate_grid";
     $BREADCRUMB[] = array("url" => ENTRADA_URL . "/annualreport/education?" . replace_query(array("section" => "add_graduate")), "title" => "Add Graduate Teaching");
     echo "<h1>Add Graduate Teaching</h1>";
     // Error Checking
     switch ($STEP) {
         case 2:
             $ENDERROR = false;
             /**
              * Non Required field "course_number" / Course Number
              */
             if (isset($_POST["course_number"]) && ($course_number = clean_input($_POST["course_number"], array("notags", "trim")))) {
                 $PROCESSED["course_number"] = $course_number;
             }
             /**
              * Required field "course_name" / Course Name
              */
             if (isset($_POST["course_name"]) && ($course_name = clean_input($_POST["course_name"], array("notags", "trim")))) {
コード例 #2
0
ファイル: add.inc.php プロジェクト: nadeemshafique/entrada-1x
        case 2:
            display_status_messages();
            break;
        case 1:
        default:
            $HEAD[] = "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/elementresizer.js\"></script>\n";
            $ONLOAD[] = "selectgroupOption('" . $group_type . "',0)";
            if ($ERROR) {
                echo display_error();
            }
            ?>
			<form id="frmSubmit" action="<?php 
            echo ENTRADA_URL;
            ?>
/admin/courses/groups?<?php 
            echo replace_query(array("step" => 2));
            ?>
" method="post" id="addGroupForm">
				<table style="width: 100%" cellspacing="0" cellpadding="2" border="0" summary="Adding Group">
					<colgroup>
						<col style="width: 3%" />
						<col style="width: 20%" />
						<col style="width: 77%" />
					</colgroup>
					<tr>
						<td colspan="3"><h3>Group Details</h3></td>
					</tr>
					<tr class="prefixR">
						<td></td>
						<td><label for="prefix" class="form-required">Group Prefix</label></td>
						<td><input type="text" id="prefix" name="prefix" value="<?php 
コード例 #3
0
        $total_rows = 0;
        $total_pages = 1;
    }
    /**
     * Check if pv variable is set and see if it's a valid page, other wise page 1 it is.
     */
    if (isset($_GET["pv"])) {
        $page_current = (int) trim($_GET["pv"]);
        if ($page_current < 1 || $page_current > $total_pages) {
            $page_current = 1;
        }
    } else {
        $page_current = 1;
    }
    if ($total_pages > 1) {
        $pagination = new Pagination($page_current, $_SESSION[APPLICATION_IDENTIFIER]["cid_" . $COMMUNITY_ID][$PAGE_URL]["pp"], $total_rows, COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL, replace_query());
    }
    /**
     * Provides the first parameter of MySQLs LIMIT statement by calculating which row to start results from.
     */
    $limit_parameter = (int) ($_SESSION[APPLICATION_IDENTIFIER]["cid_" . $COMMUNITY_ID][$PAGE_URL]["pp"] * $page_current - $_SESSION[APPLICATION_IDENTIFIER]["cid_" . $COMMUNITY_ID][$PAGE_URL]["pp"]);
    ?>
	<script type="text/javascript">
		function eventRelease(id) {
			Dialog.confirm('Do you really wish to release \''+ $('event-' + id + '-title').innerHTML +'\' on this page?',
				{
					id:				'requestDialog',
					width:			350,
					height:			75,
					title:			'Release Confirmation',
					className:		'medtech',
コード例 #4
0
            if ($student) {
                ?>
				<input style="margin-left: 20px;" type="button" class="btn btn-primary" value="Edit Entry" onclick="if ($('current-entry').value != '0') {window.location = '<?php 
                echo ENTRADA_URL . "/clerkship/logbook?section=edit&id=";
                ?>
'+$('current-entry').value;} else {alert('You must select an active entry before selecting the Edit Entry button.');}" />
				<?php 
            }
            ?>
			</div>
			<?php 
            $sidebar_html = "<div style=\"margin: 2px 0px 10px 3px; font-size: 10px\">\n";
            $sidebar_html .= "\t<div><img src=\"" . ENTRADA_URL . "/images/legend-active-member.gif\" width=\"14\" height=\"14\" alt=\"\" title=\"\" style=\"vertical-align: middle\" /> Active Entry</div>\n";
            $sidebar_html .= "\t<div><img src=\"" . ENTRADA_URL . "/images/legend-not-accessible.gif\" width=\"14\" height=\"14\" alt=\"\" title=\"\" style=\"vertical-align: middle\" /> Deactivated Entry</div>\n";
            $sidebar_html .= "</div>\n";
            new_sidebar_item("Logbook Encounters", $sidebar_html, "objective-legend", "open");
        } else {
            $ERROR++;
            $ERRORSTR[] = "Your account does not have the permissions required to use this feature of this module.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance.";
            echo display_error();
        }
    } else {
        $ERROR++;
        if (array_key_exists($rotation_id, $rotation_names) && $rotation_names[$rotation_id]) {
            $ERRORSTR[] = "No clerkship logbook entries for this rotation [" . $rotation_names[$rotation_id] . "] have been found for this user in the system. You may view all entries for all rotations by clicking <a href=\"" . ENTRADA_URL . "/clerkship/logbook?" . replace_query(array("rotation" => false)) . "\" />here</a>.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance.";
        } else {
            $ERRORSTR[] = "No clerkship logbook entries have been found for this user in the system.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance.";
        }
        echo display_error();
    }
}
コード例 #5
0
ファイル: add.inc.php プロジェクト: nadeemshafique/entrada-1x
                }
            }
            ?>
							</select>
						</td>
					</tr>
					<tr>
						<td colspan="3">&nbsp;</td>
					</tr>
					<tr>
						<td colspan="3">
							<br />
							<div id="additions">
								<h2 style="margin-top: 10px">Add Members</h2>
								<form action="<?php 
            echo ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("section" => "edit", "type" => "add", "step" => 2));
            ?>
" method="post">
									<table style="margin-top: 1px; width: 100%" cellspacing="0" cellpadding="2" border="0" summary="Add Member">
										<colgroup>
											<col style="width: 45%" />
											<col style="width: 10%" />
											<col style="width: 45%" />
										</colgroup>
										<tbody>
											<tr>
												<td colspan="3" style="vertical-align: top">
													If you would like to add users that already exist in the system to this group yourself, you can do so by clicking the checkbox beside their name from the list below.
													Once you have reviewed the list at the bottom and are ready, click the <strong>Proceed</strong> button at the bottom to complete the process.
												</td>
											</tr>
コード例 #6
0
            ?>
				<h3>You have not been selected to mark any assignments.</h3>
			<?php 
        }
        ?>
		</div>
		<?php 
    }
    /**
     * Sidebar item that will provide another method for sorting, ordering, etc.
     */
    $sidebar_html = "Sort columns:\n";
    $sidebar_html .= "<ul class=\"menu\">\n";
    $sidebar_html .= "\t<li class=\"" . (strtolower($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["sb"]) == "type" ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("sb" => "type")) . "\" title=\"Sort by Category\">by category</a></li>\n";
    $sidebar_html .= "\t<li class=\"" . (strtolower($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["sb"]) == "code" ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("sb" => "code")) . "\" title=\"Sort by Code\">by code</a></li>\n";
    $sidebar_html .= "\t<li class=\"" . (strtolower($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["sb"]) == "name" ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("sb" => "name")) . "\" title=\"Sort by Name\">by name</a></li>\n";
    $sidebar_html .= "</ul>\n";
    $sidebar_html .= "Order columns:\n";
    $sidebar_html .= "<ul class=\"menu\">\n";
    $sidebar_html .= "\t<li class=\"" . (strtolower($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["so"]) == "asc" ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("so" => "asc")) . "\" title=\"Ascending Order\">in ascending order</a></li>\n";
    $sidebar_html .= "\t<li class=\"" . (strtolower($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["so"]) == "desc" ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("so" => "desc")) . "\" title=\"Descending Order\">in descending order</a></li>\n";
    $sidebar_html .= "</ul>\n";
    $sidebar_html .= "Rows per page:\n";
    $sidebar_html .= "<ul class=\"menu\">\n";
    $sidebar_html .= "\t<li class=\"" . (strtolower($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["pp"]) == "5" ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("pp" => "5")) . "\" title=\"Display 5 Rows Per Page\">5 rows per page</a></li>\n";
    $sidebar_html .= "\t<li class=\"" . (strtolower($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["pp"]) == "15" ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("pp" => "15")) . "\" title=\"Display 15 Rows Per Page\">15 rows per page</a></li>\n";
    $sidebar_html .= "\t<li class=\"" . (strtolower($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["pp"]) == "25" ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("pp" => "25")) . "\" title=\"Display 25 Rows Per Page\">25 rows per page</a></li>\n";
    $sidebar_html .= "\t<li class=\"" . (strtolower($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["pp"]) == "50" ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("pp" => "50")) . "\" title=\"Display 50 Rows Per Page\">50 rows per page</a></li>\n";
    $sidebar_html .= "</ul>\n";
    new_sidebar_item("Sort Results", $sidebar_html, "sort-results", "open");
}
コード例 #7
0
ファイル: add.inc.php プロジェクト: nadeemshafique/entrada-1x
 * @author Unit: School of Medicine
 * @author Developer: Matt Simpson <*****@*****.**>
 * @copyright Copyright 2010 Queen's University. All Rights Reserved.
 * 
*/
if (!defined("PARENT_INCLUDED") || !defined("IN_EVALUATIONS")) {
    exit;
} elseif (!isset($_SESSION["isAuthorized"]) || !$_SESSION["isAuthorized"]) {
    header("Location: " . ENTRADA_URL);
    exit;
} elseif (!$ENTRADA_ACL->amIAllowed("evaluationform", "create", false)) {
    add_error("Your account does not have the permissions required to use this feature of this module.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance.");
    echo display_error();
    application_log("error", "Group [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] . "] and role [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["role"] . "] does not have access to this module [" . $MODULE . "]");
} else {
    $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("section" => "add")), "title" => "Add Evaluation Form");
    echo "<h1>Add Evaluation Form</h1>\n";
    // Error Checking
    switch ($STEP) {
        case 2:
            /**
             * Required field "target_id" / Form Type.
             */
            if (isset($_POST["target_id"]) && ($tmp_input = clean_input($_POST["target_id"], "int")) && array_key_exists($tmp_input, $EVALUATION_TARGETS)) {
                $PROCESSED["target_id"] = $tmp_input;
            } else {
                $ERROR++;
                $ERRORSTR[] = "The <strong>Form Type</strong> field is required.";
            }
            /**
             * Required field "form_title" / Form Title.
コード例 #8
0
            if ($NOTICE) {
                echo display_notice();
            }
            if ($ERROR) {
                echo display_error();
            }
            break;
        case 1:
        default:
            $HEAD[] = "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/elementresizer.js\"></script>\n";
            if ($ERROR) {
                echo display_error();
            }
            ?>
			<form action="<?php 
            echo ENTRADA_URL . "/admin/settings/manage/medbiqresources" . "?" . replace_query(array("action" => "edit", "step" => 2)) . "&org=" . $ORGANISATION_ID;
            ?>
" method="post">
			<table style="width: 100%" cellspacing="0" cellpadding="2" border="0" summary="Editing Page">
			<colgroup>
				<col style="width: 30%" />
				<col style="width: 70%" />
			</colgroup>
			<thead>
				<tr>
					<td colspan="2"><h1>Resource Details</h1></td>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="2" style="padding-top: 15px; text-align: right">
コード例 #9
0
    $ONLOAD[] = "setTimeout('window.location=\\'" . ENTRADA_URL . "/admin/" . $MODULE . "\\'', 15000)";
    $ERROR++;
    $ERRORSTR[] = "Your account does not have the permissions required to use this feature of this module.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance.";
    echo display_error();
    application_log("error", "Group [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] . "] and role [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["role"] . "] does not have access to this module [" . $MODULE . "]");
} else {
    if ($EVENT_ID) {
        $query = "\tSELECT a.*, b.`organisation_id`\n\t\t\t\t\tFROM `events` AS a\n\t\t\t\t\tLEFT JOIN `courses` AS b\n\t\t\t\t\tON b.`course_id` = a.`course_id`\n\t\t\t\t\tWHERE a.`event_id` = " . $db->qstr($EVENT_ID);
        $event_info = $db->GetRow($query);
        if ($event_info) {
            if (!$ENTRADA_ACL->amIAllowed(new EventContentResource($event_info["event_id"], $event_info["course_id"], $event_info["organisation_id"]), "update")) {
                application_log("error", "Someone attempted to view statistics for an event [" . $EVENT_ID . "] that they were not the coordinator for.");
                header("Location: " . ENTRADA_URL . "/admin/" . $MODULE);
                exit;
            } else {
                $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/events?" . replace_query(array("section" => "Statistics", "id" => $EVENT_ID)), "title" => "Event Statistics");
                $PROCESSED["proxy_id"] = $ENTRADA_USER->getID();
                //This will create a record set that has the proxyid, firstname, lastname, last timestamp, view per user.
                $statistics = Models_Statistic::getEventViews($EVENT_ID);
                $total_views = 0;
                events_subnavigation($event_info, 'statistics');
                ?>
                <div class="content-small"><?php 
                echo fetch_course_path($event_info["course_id"]);
                ?>
</div>
                <h1 id="page-top" class="event-title"><?php 
                echo html_encode($event_info["event_title"]);
                ?>
</h1>
                <h2 title="Event Statistics Section">Event Statistics</h2>
コード例 #10
0
                ?>
/api/lti-wizard-event.api.php?action=add&id=<?php 
                echo $EVENT_ID;
                ?>
')" class="btn">Add LTI Provider</a>
                        </div>
                        <div class="clear"></div>
                        <?php 
                $query = "SELECT *\n                                       FROM `event_lti_consumers`\n                                       WHERE `event_id` = " . $db->qstr($EVENT_ID) . "\n                                       ORDER BY `lti_title` ASC";
                $results = $db->GetAll($query);
                ?>
                        <form id="lti-listing" action="<?php 
                echo ENTRADA_URL;
                ?>
/admin/events?<?php 
                echo replace_query();
                ?>
" method="post">
                            <input type="hidden" name="type" value="lti" />
                            <table class="tableList" cellspacing="0" summary="List of Attached LTI Providers">
                                <colgroup>
                                    <col class="modified wide"/>
                                    <col class="title" />
                                    <col class="title" />
                                    <col class="date" />
                                    <col class="date" />
                                </colgroup>
                                <thead>
                                    <tr>
                                        <td class="modified">&nbsp;</td>
                                        <td class="title sortedASC"><div class="noLink">LTI Provider Title</div></td>
コード例 #11
0
        ?>
		<form action="<?php 
        echo ENTRADA_URL . "/admin/settings/manage/objectives?" . replace_query(array("section" => "delete", "step" => 1, "org" => $ORGANISATION_ID));
        ?>
" method="post">
			<table class="tableList" cellspacing="0" summary="List of Objectives">
				<thead>
					<tr>
						<td class="modified">&nbsp;</td>
						<td class="title">Objective Sets</td>
					</tr>
				</thead>
			</table>
			<ul class="objectives-list">
			<?php 
        //			echo objectives_inlists_conf(0, 0, array('id'=>'pagelists'));
        foreach ($result as $objective) {
            echo "<li><div class=\"objective-container\"><span class=\"delete\" style=\"width:27px;display:inline-block;\"><input type=\"checkbox\" id=\"delete_" . $objective["objective_id"] . "\" name=\"delete[" . $objective["objective_id"] . "][objective_id]\" value=\"" . $objective["objective_id"] . "\"" . ($selected == $objective["objective_id"] ? " checked=\"checked\"" : "") . " onclick=\"\$\$('#" . $objective["objective_id"] . "-children input[type=checkbox]').each(function(e){e.checked = \$('delete_" . $objective["objective_id"] . "').checked; if (e.checked) e.disable(); else e.enable();});\"/></span>\n";
            echo "<a href=\"" . ENTRADA_URL . "/admin/settings/manage/objectives?" . replace_query(array("section" => "edit", "id" => $objective["objective_id"])) . "\">" . $objective["objective_name"] . "</a></div></li>";
        }
        ?>
			</ul>
			<input type="submit" class="btn btn-danger" value="Delete Selected" />
		</form>
		<?php 
    } else {
        $NOTICE++;
        $NOTICESTR[] = "There are currently no Objectives assigned to this Organisation";
        echo display_notice();
    }
}
コード例 #12
0
     if ($TOTAL_ROWS <= $_SESSION[APPLICATION_IDENTIFIER]["cid_" . $COMMUNITY_ID][$PAGE_URL]["pp"]) {
         $TOTAL_PAGES = 1;
     } elseif ($TOTAL_ROWS % $_SESSION[APPLICATION_IDENTIFIER]["cid_" . $COMMUNITY_ID][$PAGE_URL]["pp"] == 0) {
         $TOTAL_PAGES = (int) ($TOTAL_ROWS / $_SESSION[APPLICATION_IDENTIFIER]["cid_" . $COMMUNITY_ID][$PAGE_URL]["pp"]);
     } else {
         $TOTAL_PAGES = (int) ($TOTAL_ROWS / $_SESSION[APPLICATION_IDENTIFIER]["cid_" . $COMMUNITY_ID][$PAGE_URL]["pp"]) + 1;
     }
     if ($TOTAL_PAGES > 1) {
         $pagination = new Pagination($PAGE_CURRENT, $_SESSION[APPLICATION_IDENTIFIER]["cid_" . $COMMUNITY_ID][$PAGE_URL]["pp"], $TOTAL_ROWS, COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL, replace_query());
     }
 } else {
     $TOTAL_ROWS = 0;
     $TOTAL_PAGES = 1;
 }
 if ($TOTAL_PAGES > 1) {
     $pagination = new Pagination($PAGE_CURRENT, $_SESSION[APPLICATION_IDENTIFIER]["cid_" . $COMMUNITY_ID][$PAGE_URL]["pp"], $TOTAL_ROWS, COMMUNITY_URL . $COMMUNITY_URL . ":" . $PAGE_URL, replace_query());
 }
 /**
  * Check if pv variable is set and see if it's a valid page, other wise page 1 it is.
  */
 if (isset($_GET["pv"])) {
     $PAGE_CURRENT = (int) trim($_GET["pv"]);
     if ($PAGE_CURRENT < 1 || $PAGE_CURRENT > $TOTAL_PAGES) {
         $PAGE_CURRENT = 1;
     }
 } else {
     $PAGE_CURRENT = 1;
 }
 $PAGE_PREVIOUS = $PAGE_CURRENT > 1 ? $PAGE_CURRENT - 1 : false;
 $PAGE_NEXT = $PAGE_CURRENT < $TOTAL_PAGES ? $PAGE_CURRENT + 1 : false;
 /**
コード例 #13
0
    $DISPLAY = true;
}
if ($DISPLAY) {
    if (isset($_GET["gradyear"]) && ($_GET["gradyear"] || $_GET["gradyear"] === "0")) {
        $GRADYEAR = trim($_GET["gradyear"]);
        @app_setcookie("search[gradyear]", trim($_GET["gradyear"]));
    } elseif (isset($_POST["gradyear"]) && ($_POST["gradyear"] || $_POST["gradyear"] === "0")) {
        $GRADYEAR = trim($_POST["gradyear"]);
        @app_setcookie("search[gradyear]", trim($_POST["gradyear"]));
    } elseif (isset($_COOKIE["search"]["gradyear"])) {
        $GRADYEAR = $_COOKIE["search"]["gradyear"];
    } else {
        $GRADYEAR = 0;
    }
    $GRADYEAR = clean_input($GRADYEAR, "credentials");
    $BREADCRUMB[] = array("url" => ENTRADA_URL . "/clerkship?" . replace_query(array("section" => "search")), "title" => "Student Search");
    switch ($_POST["action"]) {
        case "results":
            ?>
			<div class="content-heading">Student Search Results</div>
			<br />
			<?php 
            if (isset($_GET["year"]) && trim($_GET["year"]) != "" || isset($_POST["year"]) && trim($_POST["year"]) != "") {
                if (isset($_POST["year"]) && trim($_POST["year"]) != "") {
                    $query_year = trim($_POST["year"]);
                } else {
                    $query_year = trim($_GET["year"]);
                }
                $query = "SELECT `" . AUTH_DATABASE . "`.`user_data`.`id` AS `proxy_id`, CONCAT_WS(', ', `" . AUTH_DATABASE . "`.`user_data`.`lastname`, `" . AUTH_DATABASE . "`.`user_data`.`firstname`) AS `fullname` \n\t\t\t\tFROM `" . AUTH_DATABASE . "`.`user_data` \n\t\t\t\tLEFT JOIN `" . AUTH_DATABASE . "`.`user_access` ON `" . AUTH_DATABASE . "`.`user_access`.`user_id`=`" . AUTH_DATABASE . "`.`user_data`.`id` \n\t\t\t\tWHERE `" . AUTH_DATABASE . "`.`user_access`.`app_id`='" . AUTH_APP_ID . "' \n\t\t\t\tAND `role`=" . $db->qstr(trim($query_year), get_magic_quotes_gpc()) . " \n\t\t\t\tAND `group`='student' \n\t\t\t\tORDER BY `" . AUTH_DATABASE . "`.`user_data`.`lastname`, `" . AUTH_DATABASE . "`.`user_data`.`firstname` ASC";
                $results = $db->GetAll($query);
                if ($results) {
コード例 #14
0
ファイル: add.inc.php プロジェクト: nadeemshafique/entrada-1x
                                    <h2>Time Release Options</h2>
                                    <table>
                                        <?php 
                            echo generate_calendars("viewable", "", true, false, isset($PROCESSED["release_date"]) ? $PROCESSED["release_date"] : 0, true, false, isset($PROCESSED["release_until"]) ? $PROCESSED["release_until"] : 0);
                            ?>
                                    </table>
                                </div>
                                <div style="padding-top: 25px">
                                    <table style="width: 100%" cellspacing="0" cellpadding="0" border="0">
                                        <tr>
                                            <td style="width: 25%; text-align: left">
                                                <input type="button" class="btn" value="Cancel" onclick="window.location='<?php 
                            echo ENTRADA_URL;
                            ?>
/admin/gradebook?<?php 
                            echo replace_query(array("step" => false, "section" => "view", "assessment_id" => false));
                            ?>
'" />
                                            </td>
                                            <td style="width: 75%; text-align: right; vertical-align: middle">
                                                <input type="submit" class="btn btn-primary" value="Save" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </form>
                            <?php 
                            break;
                    }
                } else {
                    $ERROR++;
コード例 #15
0
ファイル: add.inc.php プロジェクト: nadeemshafique/entrada-1x
            break;
        case 1:
        default:
            if ($ERROR) {
                echo display_error();
            }
            $ONLOAD[] = "selectObjective(" . (isset($PROCESSED["objective_parent"]) && $PROCESSED["objective_parent"] ? $PROCESSED["objective_parent"] : "0") . ")";
            $ONLOAD[] = "selectOrder(" . (isset($PROCESSED["objective_parent"]) && $PROCESSED["objective_parent"] ? $PROCESSED["objective_parent"] : "0") . ")";
            if (isset($_GET["org"]) && ($org_id = clean_input($_GET["org"], array("notags", "trim", "int")))) {
                $PROCESSED["org_id"] = $org_id;
            } else {
                $PROCESSED["org_id"] = 0;
            }
            ?>
			<form action="<?php 
            echo ENTRADA_URL . "/admin/settings/manage/curriculumtypes" . "?" . replace_query(array("action" => "add", "step" => 2)) . "&org=" . $ORGANISATION_ID;
            ?>
" id="curriculum_form" method="post">
			<table style="width: 100%" cellspacing="0" cellpadding="2" border="0" summary="Adding Page">
			<colgroup>
				<col style="width: 20%" />
				<col style="width: 80%" />
			</colgroup>
			<thead>
				<tr>
					<td colspan="2"><h1>Add Curriculum Type</h1></td>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="2" style="padding-top: 15px;">
コード例 #16
0
    header("Location: " . ENTRADA_URL);
    exit;
} elseif (!isset($_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"]) || $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] != "staff" && $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] != "medtech" && $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] != "faculty") {
    $ONLOAD[] = "setTimeout('window.location=\\'" . ENTRADA_URL . "/admin/" . $MODULE . "\\'', 15000)";
    $ERROR++;
    $ERRORSTR[] = "Your account does not have the permissions required to use this feature of this module.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance.";
    echo display_error();
    application_log("error", "Group [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] . "] and role [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["role"] . "] do not have access to this module [" . $MODULE . "]");
} elseif (!permissions_check(array("medtech" => "admin", "faculty" => "admin", "staff" => "admin"))) {
    $ONLOAD[] = "setTimeout('window.location=\\'" . ENTRADA_URL . "/admin/" . $MODULE . "\\'', 15000)";
    $ERROR++;
    $ERRORSTR[] = "Your account does not have the permissions required to use this feature of this module.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance.";
    echo display_error();
    application_log("error", "Group [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] . "] and role [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["role"] . "] does not have access to this module [" . $MODULE . "]");
} else {
    $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/clerkship/electives?" . replace_query(array("section" => "add")), "title" => "Discipline Breakdown");
    /**
     * Add PlotKit to the beginning of the $HEAD array.
     */
    array_unshift($HEAD, "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/MochiKit/MochiKit.js\"></script>", "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/PlotKit/excanvas.js\"></script>", "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/PlotKit/Base.js\"></script>", "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/PlotKit/Layout.js\"></script>", "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/PlotKit/Canvas.js\"></script>", "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/PlotKit/SweetCanvas.js\"></script>");
    $HEAD[] = "<script type=\"text/javascript\" src=\"" . ENTRADA_URL . "/javascript/clerkship_disciplines.js\"></script>";
    // Display Content
    switch ($STEP) {
        case 2:
            if ($SUCCESS) {
                echo display_success();
            }
            if ($NOTICE) {
                echo display_notice();
            }
            if ($ERROR) {
コード例 #17
0
ファイル: index.php プロジェクト: nadeemshafique/entrada-1x
 }
 /**
  * If everything is good to go, load the community page.
  */
 if ($COMMUNITY_LOAD) {
     if (@file_exists(ENTRADA_ABSOLUTE . "/community/templates/" . $COMMUNITY_TEMPLATE . "/includes/config.inc.php")) {
         require_once ENTRADA_ABSOLUTE . "/community/templates/" . $COMMUNITY_TEMPLATE . "/includes/config.inc.php";
     }
     /**
      * Responsible for displaying the permission masks sidebar item
      * if they have more than their own permission set available.
      */
     if (isset($_SESSION["permissions"]) && is_array($_SESSION["permissions"]) && count($_SESSION["permissions"]) > 1) {
         $sidebar_html = "<form id=\"masquerade-form\" action=\"" . ENTRADA_URL . "\" method=\"get\">\n";
         $sidebar_html .= "<label for=\"permission-mask\">Available permission masks:</label><br />";
         $sidebar_html .= "<select id=\"permission-mask\" name=\"mask\" style=\"width: 100%\" onchange=\"window.location='" . ENTRADA_URL . "/" . $MODULE . "/?" . str_replace("&#039;", "'", replace_query(array("mask" => "'+this.options[this.selectedIndex].value"))) . "\">\n";
         $display_masks = false;
         $added_users = array();
         foreach ($_SESSION["permissions"] as $access_id => $result) {
             if ($result["organisation_id"] == $ENTRADA_USER->getActiveOrganisation() && is_int($access_id) && (isset($result["mask"]) && $result["mask"] || $access_id == $ENTRADA_USER->getDefaultAccessId() || $result["id"] == $ENTRADA_USER->getID() && $ENTRADA_USER->getDefaultAccessId() != $access_id) && array_search($result["id"], $added_users) === false) {
                 if (isset($result["mask"]) && $result["mask"]) {
                     $display_masks = true;
                 }
                 $added_users[] = $result["id"];
                 $sidebar_html .= "<option value=\"" . ($access_id == $ENTRADA_USER->getDefaultAccessId() ? "close" : $result["permission_id"]) . "\"" . ($result["id"] == $ENTRADA_USER->getActiveId() ? " selected=\"selected\"" : "") . ">" . html_encode($result["fullname"]) . "</option>\n";
             }
         }
         $sidebar_html .= "</select>\n";
         $sidebar_html .= "</form>\n";
         if ($display_masks) {
             new_sidebar_item("Permission Masks", $sidebar_html, "permission-masks", "open");
コード例 #18
0
 * @author Organisation: Queen's University
 * @author Unit: School of Medicine
 * @author Developer: Matt Simpson <*****@*****.**>
 * @copyright Copyright 2008 Queen's University. All Rights Reserved.
 *
*/
if (!defined("PARENT_INCLUDED") || !defined("IN_COMMUNITIES")) {
    exit;
} elseif (!isset($_SESSION["isAuthorized"]) || !$_SESSION["isAuthorized"]) {
    header("Location: " . ENTRADA_URL);
    exit;
}
if ($MAILING_LISTS["active"]) {
    require_once "Entrada/mail-list/mail-list.class.php";
}
$BREADCRUMB[] = array("url" => ENTRADA_URL . "/communities?" . replace_query(array("section" => "modify")), "title" => "Modifying a Community");
$COMMUNITY_ID = 0;
$url = ENTRADA_URL . "/communities";
$ONLOAD[] = "setTimeout('window.location=\\'" . $url . "\\'', 5000)";
/**
 * Check for a community category to proceed (via POST) to help prevent against CSRF attacks.
 */
if (isset($_POST["community_id"]) && (int) trim($_POST["community_id"])) {
    $COMMUNITY_ID = (int) trim($_POST["community_id"]);
}
/**
 * Ensure that the selected community is editable by you.
 */
if ($COMMUNITY_ID) {
    $query = "SELECT * FROM `communities` WHERE `community_id` = " . $db->qstr($COMMUNITY_ID) . " AND `community_active` = '1'";
    $community_details = $db->GetRow($query);
コード例 #19
0
     header("Location: " . ENTRADA_URL . (isset($_SERVER["REQUEST_URI"]) ? "?url=" . rawurlencode(clean_input($_SERVER["REQUEST_URI"], array("nows", "url"))) : ""));
     exit;
 } elseif (!$ENTRADA_ACL->amIAllowed('annualreport', 'update')) {
     $ONLOAD[] = "setTimeout('window.location=\\'" . ENTRADA_URL . "/" . $MODULE . "\\'', 15000)";
     $ERROR++;
     $ERRORSTR[] = "You do not have the permissions required to use this module.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance.";
     echo display_error();
     application_log("error", "Group [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] . "] and role [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["role"] . "] do not have access to this module [" . $MODULE . "]");
 } else {
     // Meta information for this page.
     $PAGE_META["title"] = "Add Continuing Education";
     $PAGE_META["description"] = "Continuing Education portion of your annual report should be entered / located here.";
     $PAGE_META["keywords"] = "";
     // This grid should be expanded upon redirecting back to the education index.
     $_SESSION["education_expand_grid"] = "continuing_education_grid";
     $BREADCRUMB[] = array("url" => ENTRADA_URL . "/annualreport/education?" . replace_query(array("section" => "add_continuing")), "title" => "Add Continuing Education");
     echo "<h1>Add Continuing Education</h1>";
     // Error Checking
     switch ($STEP) {
         case 2:
             $ENDERROR = false;
             $STARTERROR = false;
             /**
              * Required field "unit" / Unit.
              */
             if (isset($_POST["unit"]) && ($unit = clean_input($_POST["unit"], array("notags", "trim")))) {
                 $PROCESSED["unit"] = $unit;
             } else {
                 $ERROR++;
                 $ERRORSTR[] = "The <strong>Unit</strong> field is required.";
             }
コード例 #20
0
                application_log("success", "Objectives successfully deactivated in the system.");
            }
            if ($SUCCESS) {
                echo display_success();
            }
            break;
        case 1:
        default:
            if ($ERROR) {
                echo display_error();
            } else {
                echo display_notice(array("Please review the following objective or objectives to ensure that you wish to permanently delete them."));
                $HEAD[] = "\t<script type=\"text/javascript\">\n\t\t\t\t\t\t\t\tfunction selectObjective(parent_id, objective_id, excluded_objectives) {\n\t\t\t\t\t\t\t\t\tnew Ajax.Updater('selectParent'+objective_id+'Field', '" . ENTRADA_URL . "/api/objectives-list.api.php', {parameters: {'pid': parent_id, 'id': objective_id, 'excluded': excluded_objectives}});\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction selectOrder(parent_id, objective_id) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</script>";
                ?>
				<form action="<?php 
                echo ENTRADA_URL . "/admin/settings/manage/objectives?" . replace_query(array("action" => "delete", "step" => 2));
                ?>
" method="post">
				<table class="tableList" cellspacing="0" summary="List of objectives to be removed">
				<colgroup>
					<col class="modified" />
					<col class="title" />
				</colgroup>
				<thead>
					<tr>
						<td class="modified">&nbsp;</td>
						<td class="title">Objectives</td>
					</tr>
				</thead>
				<tfoot>
					<tr>
コード例 #21
0
     if ($page_current - 1) {
         echo "<a href=\"" . ENTRADA_URL . "/clerkship?" . replace_query(array("pv" => $page_current - 1)) . "\"><img src=\"" . ENTRADA_URL . "/images/record-previous-on.gif\" border=\"0\" width=\"11\" height=\"11\" alt=\"Back to page " . ($page_current - 1) . ".\" title=\"Back to page " . ($page_current - 1) . ".\" style=\"vertical-align: middle\" /></a>\n";
     } else {
         echo "<img src=\"" . ENTRADA_URL . "/images/record-previous-off.gif\" width=\"11\" height=\"11\" alt=\"\" title=\"\" style=\"vertical-align: middle\" />";
     }
     echo "</span>";
     echo "<span style=\"vertical-align: middle\">\n";
     echo "<select name=\"pv\" onchange=\"\$('pageSelector').submit();\"" . ($total_pages <= 1 ? " disabled=\"disabled\"" : "") . ">\n";
     for ($i = 1; $i <= $total_pages; $i++) {
         echo "<option value=\"" . $i . "\"" . ($i == $page_current ? " selected=\"selected\"" : "") . ">" . ($i == $page_current ? " Viewing" : "Jump To") . " Page " . $i . "</option>\n";
     }
     echo "</select>\n";
     echo "</span>\n";
     echo "<span style=\"width: 20px; vertical-align: middle; margin-left: 3px; text-align: right\">\n";
     if ($page_current < $total_pages) {
         echo "<a href=\"" . ENTRADA_URL . "/clerkship?" . replace_query(array("pv" => $page_current + 1)) . "\"><img src=\"" . ENTRADA_URL . "/images/record-next-on.gif\" border=\"0\" width=\"11\" height=\"11\" alt=\"Forward to page " . ($page_current + 1) . ".\" title=\"Forward to page " . ($page_current + 1) . ".\" style=\"vertical-align: middle\" /></a>";
     } else {
         echo "<img src=\"" . ENTRADA_URL . "/images/record-next-off.gif\" width=\"11\" height=\"11\" alt=\"\" title=\"\" style=\"vertical-align: middle\" />";
     }
     echo "</span>\n";
     echo "</div>\n";
     echo "</form>\n";
 }
 ?>
 </td>
 </tr>
 <tr>
     <td colspan="3">&nbsp;</td>
 </tr>
 <tr>
     <td colspan="3">
コード例 #22
0
ファイル: add.inc.php プロジェクト: nadeemshafique/entrada-1x
            }
            if ($NOTICE) {
                echo display_notice();
            }
            if ($ERROR) {
                echo display_error();
            }
            break;
        case 1:
        default:
            if ($ERROR) {
                echo display_error();
            }
            ?>
			<form action="<?php 
            echo ENTRADA_URL . "/admin/settings/manage/medbiqinstructional" . "?" . replace_query(array("action" => "add", "step" => 2)) . "&org=" . $ORGANISATION_ID;
            ?>
" method="post" class="form-horizontal">
                <div class="control-group">
                    <label for="instructional_method" class="control-label form-required">Instructional Method:</label>
                    <div class="controls">
                        <input type="text" id="instructional_method" name="instructional_method" value="<?php 
            echo isset($medbiq_instructional_method) ? html_decode($medbiq_instructional_method->getInstructionalMethod()) : "";
            ?>
" />
                    </div>
                </div>
                <div class="control-group">
                    <label for="instructional_method_description" class="control-label form-nrequired">Description:</label>
                    <div class="controls">
                        <textarea id="instructional_method_description" name="instructional_method_description" style="width: 98%; height: 200px"><?php 
コード例 #23
0
 $query = "\tSELECT b.`community_url` FROM `community_courses` AS a\n\t\t\t\t\tJOIN `communities` AS b\n\t\t\t\t\tON a.`community_id` = b.`community_id`\n\t\t\t\t\tWHERE a.`course_id` = " . $db->qstr($COURSE_ID);
 $course_community = $db->GetOne($query);
 if ($course_community) {
     header("Location: " . ENTRADA_URL . "/community" . $course_community);
     exit;
 }
 $query = "\tSELECT * FROM `courses`\n\t\t\t\t\tWHERE `course_id` = " . $db->qstr($COURSE_ID) . "\n\t\t\t\t\tAND `course_active` = '1'";
 $course_details = USE_CACHE ? $db->CacheGetRow(CACHE_TIMEOUT, $query) : $db->GetRow($query);
 if (!$course_details) {
     $ERROR++;
     $ERRORSTR[] = "The course identifier that was presented to this page currently does not exist in the system.";
     echo display_error();
 } else {
     if ($ENTRADA_ACL->amIAllowed(new CourseResource($COURSE_ID, $ENTRADA_USER->getActiveOrganisation), "read")) {
         add_statistic($MODULE, "view", "course_id", $COURSE_ID);
         $BREADCRUMB[] = array("url" => ENTRADA_URL . "/" . $MODULE . "?" . replace_query(array("id" => $course_details["course_id"])), "title" => $course_details["course_name"] . ($course_details["course_code"] ? ": " . $course_details["course_code"] : ""));
         $OTHER_DIRECTORS = array();
         $sub_query = "SELECT `proxy_id` FROM `course_contacts` WHERE `course_contacts`.`course_id`=" . $db->qstr($COURSE_ID) . " AND `course_contacts`.`contact_type` = 'director' ORDER BY `contact_order` ASC";
         $sub_results = $db->GetAll($sub_query);
         if ($sub_results) {
             foreach ($sub_results as $sub_result) {
                 $OTHER_DIRECTORS[] = $sub_result["proxy_id"];
             }
         }
         // Meta information for this page.
         $PAGE_META["title"] = $course_details["course_name"] . ($course_details["course_code"] ? ": " . $course_details["course_code"] : "") . " - " . APPLICATION_NAME;
         $PAGE_META["description"] = trim(str_replace(array("\t", "\n", "\r"), " ", html_encode(strip_tags($course_details["course_description"]))));
         $PAGE_META["keywords"] = "";
         $course_details_section = true;
         $course_description_section = false;
         $course_objectives_section = false;
コード例 #24
0
                                if (Number($('current-page').value) < $('max-page').value) {
                                    $('page-' + $('current-page').value).hide();
                                    $('current-page').value = Number($('current-page').value) + 1;
                                    $('page-' + $('current-page').value).show();
                                }
                            }
                        </script>
                        <input id="current-entry" type="hidden" value="0" />
                        <div style="clear: both"></div>
                        <div class="row-fluid">
                            <label class="span3" for="view-type">
                                View Encounters By: 
                            </label>
                            <span class="span9">
                                <select name="view-type" id="view-type" onchange="window.location = '<?php 
                    echo ENTRADA_URL . "/clerkship?" . replace_query(array("sb" => false));
                    ?>
&sb='+this.options[this.selectedIndex].value;">
                                    <option value="rotation"<?php 
                    echo isset($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["sb"]) && $_SESSION[APPLICATION_IDENTIFIER][$MODULE]["sb"] == "e.`rotation_title`" ? " selected=\"selected\"" : "";
                    ?>
>Rotation</option>
                                    <option value="date"<?php 
                    echo isset($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["sb"]) && $_SESSION[APPLICATION_IDENTIFIER][$MODULE]["sb"] == "a.`encounter_date`" ? " selected=\"selected\"" : "";
                    ?>
>Encounter Date</option>
                                    <option value="location"<?php 
                    echo isset($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["sb"]) && $_SESSION[APPLICATION_IDENTIFIER][$MODULE]["sb"] == "b.`location`" ? " selected=\"selected\"" : "";
                    ?>
>Setting</option>
                                    <option value="site"<?php 
コード例 #25
0
				<?php 
            }
            echo "<form action=\"\" method=\"get\">\n";
            echo "<input type=\"hidden\" id=\"dstamp\" name=\"dstamp\" value=\"" . html_encode($_SESSION[APPLICATION_IDENTIFIER]["tmp"]["dstamp"]) . "\" />\n";
            echo "</form>\n";
            break;
        case "resident":
        case "faculty":
            $BREADCRUMB[] = array("url" => ENTRADA_RELATIVE, "title" => ucwords($_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"]) . " Dashboard");
            /**
             * Update requested timestamp to display.
             * Valid: Unix timestamp
             */
            if (isset($_GET["dlength"]) && ($dlength = (int) trim($_GET["dlength"])) && $dlength >= 1 && $dlength <= 4) {
                $_SESSION[APPLICATION_IDENTIFIER][$MODULE]["dlength"] = $dlength;
                $_SERVER["QUERY_STRING"] = replace_query(array("dlength" => false));
            } else {
                if (!isset($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["dlength"])) {
                    $_SESSION[APPLICATION_IDENTIFIER][$MODULE]["dlength"] = 2;
                    // Defaults to this term.
                }
            }
            switch ($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["dlength"]) {
                case 1:
                    // Last Term
                    if (date("n", time()) <= 6) {
                        $DISPLAY_DURATION["start"] = mktime(0, 0, 0, 7, 1, date("Y", time()) - 1);
                        $DISPLAY_DURATION["end"] = mktime(0, 0, 0, 12, 31, date("Y", time()) - 1);
                    } else {
                        $DISPLAY_DURATION["start"] = mktime(0, 0, 0, 1, 1, date("Y", time()));
                        $DISPLAY_DURATION["end"] = mktime(0, 0, 0, 6, 30, date("Y", time()));
コード例 #26
0
     if ($PAGE_PREVIOUS) {
         echo "<a href=\"" . ENTRADA_RELATIVE . "/curriculum/searchbeta?" . replace_query(array("pv" => $PAGE_PREVIOUS)) . "\"><img src=\"" . ENTRADA_URL . "/images/record-previous-on.gif\" border=\"0\" width=\"11\" height=\"11\" alt=\"Back to page " . $PAGE_PREVIOUS . ".\" title=\"Back to page " . $PAGE_PREVIOUS . ".\" style=\"vertical-align: middle\" /></a>\n";
     } else {
         echo "<img src=\"" . ENTRADA_URL . "/images/record-previous-off.gif\" width=\"11\" height=\"11\" alt=\"\" title=\"\" style=\"vertical-align: middle\" />";
     }
     echo "</span>";
     echo "<span style=\"vertical-align: middle\">\n";
     echo "<select name=\"pv\" onchange=\"window.location = '" . ENTRADA_RELATIVE . "/curriculum/searchbeta?" . replace_query(array("pv" => false)) . "&amp;pv='+this.options[this.selectedIndex].value;\"" . ($TOTAL_PAGES <= 1 ? " disabled=\"disabled\"" : "") . ">\n";
     for ($i = 1; $i <= $TOTAL_PAGES; $i++) {
         echo "<option value=\"" . $i . "\"" . ($i == $PAGE_CURRENT ? " selected=\"selected\"" : "") . ">" . ($i == $PAGE_CURRENT ? " Viewing" : "Jump To") . " Page " . $i . "</option>\n";
     }
     echo "</select>\n";
     echo "</span>\n";
     echo "<span style=\"width: 20px; vertical-align: middle; margin-left: 3px; text-align: right\">\n";
     if ($PAGE_CURRENT < $TOTAL_PAGES) {
         echo "<a href=\"" . ENTRADA_RELATIVE . "/curriculum/searchbeta?" . replace_query(array("pv" => $PAGE_NEXT)) . "\"><img src=\"" . ENTRADA_URL . "/images/record-next-on.gif\" border=\"0\" width=\"11\" height=\"11\" alt=\"Forward to page " . $PAGE_NEXT . ".\" title=\"Forward to page " . $PAGE_NEXT . ".\" style=\"vertical-align: middle\" /></a>";
     } else {
         echo "<img src=\"" . ENTRADA_URL . "/images/record-next-off.gif\" width=\"11\" height=\"11\" alt=\"\" title=\"\" style=\"vertical-align: middle\" />";
     }
     echo "</span>\n";
     echo "</div>\n";
     echo "</form>\n";
 }
 /**
  * Provides the first parameter of MySQLs LIMIT statement by calculating which row to start results from.
  */
 $limit_parameter = (int) ($RESULTS_PER_PAGE * $PAGE_CURRENT - $RESULTS_PER_PAGE);
 $query = sprintf($query_search, $limit_parameter, $RESULTS_PER_PAGE);
 $results = $db->GetAll($query);
 if ($results) {
     echo "<div class=\"searchTitle\">\n";
コード例 #27
0
	                </tfoot>
	                </table>
	                <?php 
            } else {
                echo display_notice(array("There are no evaluators who have not started this evaluation."));
            }
        }
        ?>
		</div>
		<br /><br />
		<?php 
        /**
         * Sidebar item that will provide a method for choosing which results to display.
         */
        $sidebar_html = "Display progress as a:\n";
        $sidebar_html .= "<ul class=\"menu\">\n";
        $sidebar_html .= "\t<li class=\"" . ($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["display"] == false ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("display" => "summary")) . "\" title=\"Summary\">summary</a></li>\n";
        $sidebar_html .= "\t<li class=\"" . ($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["display"] == true ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("display" => "complete_list")) . "\" title=\"Complete list\">complete list of attempts</a></li>\n";
        $sidebar_html .= "</ul>\n";
        new_sidebar_item("Progress Display", $sidebar_html, "sort-results", "open");
    } else {
        application_log("error", "User tried to manage progress of a evaluation id [" . $EVALUATION_ID . "] that does not exist or is not active in the system.");
        $ERROR++;
        $ERRORSTR[] = "The evaluation you are trying to manage either does not exist in the system or has been deactived by an administrator.<br /><br />If you feel you are receiving this message in error, please contact the MEdTech Unit (page feedback on left) and we will investigate. The MEdTech Unit has automatically been informed that this error has taken place.";
        echo display_error();
    }
} else {
    application_log("error", "User tried to manage members a evaluation without providing a evaluation_id.");
    header("Location: " . ENTRADA_URL . "/admin/evaluations");
    exit;
}
コード例 #28
0
    exit;
} elseif (!$ENTRADA_ACL->amIAllowed('clerkship', 'read')) {
    $ONLOAD[] = "setTimeout('window.location=\\'" . ENTRADA_URL . "/" . $MODULE . "\\'', 15000)";
    $ERROR++;
    $ERRORSTR[] = "You do not have the permissions required to use this module.<br /><br />If you believe you are receiving this message in error please contact <a href=\"mailto:" . html_encode($AGENT_CONTACTS["administrator"]["email"]) . "\">" . html_encode($AGENT_CONTACTS["administrator"]["name"]) . "</a> for assistance.";
    echo display_error();
    application_log("error", "Group [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] . "] and role [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["role"] . "] do not have access to this module [" . $MODULE . "]");
} else {
    if (isset($_GET["id"]) && clean_input($_GET["id"], "int")) {
        $RECORD_ID = clean_input($_GET["id"], "int");
    }
    if ($RECORD_ID) {
        $PROCESSED = $db->GetRow("SELECT * FROM `" . CLERKSHIP_DATABASE . "`.`logbook_entries` WHERE `lentry_id` = " . $db->qstr($RECORD_ID));
        if ($PROCESSED) {
            $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/clerkship/clerk?ids=" . $PROCESSED["proxy_id"], "title" => "Clerk Management");
            $BREADCRUMB[] = array("url" => ENTRADA_URL . "/clerkship/logbook?" . replace_query(array("section" => "view-entry")), "title" => "View Logbook Entry");
            echo "<h1>View Clerkship Logbook Entry</h1>\n";
            $PROCESSED_OBJECTIVES = $db->GetAll("SELECT * FROM `" . CLERKSHIP_DATABASE . "`.`logbook_entry_objectives` WHERE `lentry_id` = " . $db->qstr($RECORD_ID));
            $PROCESSED_PROCEDURES = $db->GetAll("SELECT * FROM `" . CLERKSHIP_DATABASE . "`.`logbook_entry_procedures` WHERE `lentry_id` = " . $db->qstr($RECORD_ID));
            ?>
			<table style="width: 100%" cellspacing="0" cellpadding="2" border="0" summary="Adding Patient Encounter">
			<colgroup>
				<col style="width: 3%" />
				<col style="width: 20%" />
				<col style="width: 77%" />
			</colgroup>
			<tbody>
				<tr>
					<td colspan="3"><h2>Encounter Details</h2></td>
				</tr>
				<tr>
コード例 #29
0
    application_log("error", "Group [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["group"] . "] and role [" . $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["role"] . "] does not have access to this module [" . $MODULE . "]");
} else {
    if (isset($_POST["assessment_id"]) && (int) $_POST["assessment_id"]) {
        $assessment_id = (int) $_POST["assessment_id"];
    }
    if (isset($_POST["course_id"]) && (int) $_POST["course_id"]) {
        $course_id = (int) $_POST["course_id"];
    }
    if (isset($_POST["import_type"]) && clean_input($_POST["import_type"], "alpha")) {
        $import_type = clean_input($_POST["import_type"], "alpha");
    } else {
        $import_type = "all";
    }
    $url = ENTRADA_URL . "/admin/gradebook/assessments?section=grade&id=" . $course_id . "&assessment_id=" . $assessment_id;
    $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/gradebook/assessments?" . replace_query(array("section" => "grade", "id" => $COURSE_ID, "step" => false)), "title" => "Grading Assessment");
    $BREADCRUMB[] = array("url" => ENTRADA_URL . "/admin/gradebook/assessments?" . replace_query(array("section" => "import-quiz", "id" => $COURSE_ID, "step" => false)), "title" => "Importing Quiz Results");
    echo "<h1>Import Quiz results into Gradebook Assessment</h1>";
    /*
     *  fetch the quiz attached to the assessment
     */
    $query = "SELECT * FROM `assessment_attached_quizzes`  AS a\n                JOIN `attached_quizzes` AS b\n                ON a.`aquiz_id` = b.`aquiz_id`\n\t\t\t\tWHERE a.`assessment_id` = " . $db->qstr($assessment_id);
    if ($attached_quizzes = $db->GetAll($query)) {
        if ($attached_quizzes) {
            $quiz_list = array();
            $quiz_ids_string = "";
            $questions_list = array();
            $question_ids_strings = array();
            foreach ($attached_quizzes as $aquiz) {
                $question_ids_strings[$aquiz["aquiz_id"]] = "";
                $quiz_ids_string .= ($quiz_ids_string ? ", " : "") . $db->qstr($aquiz["aquiz_id"]);
                $quiz_list[$aquiz["aquiz_id"]] = $aquiz;
コード例 #30
0
      * Sidebar item that will provide a method for choosing which results to display.
      */
     $sidebar_html = "Calculate results for:\n";
     $sidebar_html .= "<ul class=\"menu\">\n";
     if (is_array($calculation_targets)) {
         foreach ($calculation_targets as $key => $target_name) {
             $sidebar_html .= "\t<li class=\"" . (strtolower($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["target"]) == $key ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("target" => $key)) . "\" title=\"" . trim(html_decode($target_name)) . "\">" . $target_name . "</a></li>\n";
         }
     }
     $sidebar_html .= "</ul>\n";
     $sidebar_html .= "Results based on:\n";
     $sidebar_html .= "<ul class=\"menu\">\n";
     $sidebar_html .= "\t<li class=\"" . (strtolower($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["attempt"]) == "first" ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("attempt" => "first")) . "\" title=\"The First Attempt\">only the first attempt</a></li>\n";
     $sidebar_html .= "\t<li class=\"" . (strtolower($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["attempt"]) == "last" ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("attempt" => "last")) . "\" title=\"The Last Attempt\">only the last attempt</a></li>\n";
     $sidebar_html .= "\t<li class=\"" . (strtolower($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["attempt"]) == "best" ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("attempt" => "best")) . "\" title=\"The Best Attempt\">only the highest scored attempt</a></li>\n";
     $sidebar_html .= "\t<li class=\"" . (strtolower($_SESSION[APPLICATION_IDENTIFIER][$MODULE]["attempt"]) == "all" ? "on" : "off") . "\"><a href=\"" . ENTRADA_URL . "/admin/" . $MODULE . "?" . replace_query(array("attempt" => "all")) . "\" title=\"All Attempts\">all attempts</a></li>\n";
     $sidebar_html .= "</ul>\n";
     new_sidebar_item("Result Calculation", $sidebar_html, "sort-results", "open");
     /**
      * Sidebar item that will provide the links to the different sections within this page.
      */
     $sidebar_html = "<ul class=\"menu\">\n";
     $sidebar_html .= "\t<li class=\"link\"><a href=\"#question-breakdown-section\" onclick=\"\$('question-breakdown-section').scrollTo(); return false;\" title=\"Results by Question Breakdown\">Results by Question</a></li>\n";
     $sidebar_html .= "\t<li class=\"link\"><a href=\"#quiz-respondent-section\" onclick=\"\$('quiz-respondent-section').scrollTo(); return false;\" title=\"Results by Respondent\">Results by Respondent</a></li>\n";
     $sidebar_html .= "</ul>\n";
     new_sidebar_item("Page Anchors", $sidebar_html, "page-anchors", "open");
 } else {
     $NOTICE++;
     $NOTICESTR[] = "There have been no completed attempts of this quiz to date. Please check back again later.";
     echo display_notice();
 }