public static function getEvent($event_id = null) { return Models_Event::get($event_id); }
* Check to see if they are trying to view an event using an event_id. */ if (isset($_GET["rid"]) && ($tmp_input = clean_input($_GET["rid"], array("nows", "int")))) { $EVENT_ID = $tmp_input; $transverse = true; if (isset($_GET["community"]) && (int) $_GET["community"]) { $community_id = (int) $_GET["community"]; } } elseif (isset($_GET["drid"]) && ($tmp_input = clean_input($_GET["drid"], array("nows", "int")))) { $EVENT_ID = $tmp_input; $transverse = true; } elseif (isset($_GET["id"]) && ($tmp_input = clean_input($_GET["id"], array("nows", "int")))) { $EVENT_ID = $tmp_input; $transverse = false; } $event = Models_Event::get($EVENT_ID); /** * Check for groups which have access to the administrative side of this module * and add the appropriate toggle sidebar item. */ if ($ENTRADA_ACL->amIAllowed("eventcontent", "update", false)) { switch ($_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["role"]) { case "admin": $admin_wording = "Administrator View"; $admin_url = ENTRADA_RELATIVE . "/admin/events" . ($EVENT_ID ? "?" . replace_query(array("section" => "edit", "id" => $EVENT_ID)) : ""); break; case "pcoordinator": $admin_wording = "Coordinator View"; $admin_url = ENTRADA_RELATIVE . "/admin/events" . ($EVENT_ID ? "?" . replace_query(array("section" => "edit", "id" => $EVENT_ID)) : ""); break; case "director":
} break; default: $PROCESSED["show_learner"] = 0; break; } } //narrative check if (isset($_POST["narrative_assessment"]) && ($narrative = clean_input($_POST["narrative_assessment"], array("trim", "int")))) { $PROCESSED["narrative"] = $narrative; } else { $PROCESSED["narrative"] = 0; } if (isset($_POST["event_id"]) && ($tmp_input = clean_input($_POST["event_id"], array("trim", "int")))) { $PROCESSED["event_id"] = $tmp_input; $event = Models_Event::get($PROCESSED["event_id"]); } else { $event = false; } //optional/required check if (isset($_POST["assessment_required"])) { switch (clean_input($_POST["assessment_required"], array("trim", "int"))) { case 0: $PROCESSED["required"] = 0; break; case 1: $PROCESSED["required"] = 1; break; default: break; }