$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>
                <?php 
                $HEAD[] = "<script type=\"text/javascript\" src=\"" . ENTRADA_RELATIVE . "/javascript/jquery/jquery.dataTables.min.js?release=" . html_encode(APPLICATION_VERSION) . "\"></script>";
                ?>
                <script type="text/javascript">
                    jQuery(function($) {
                        var event_views_table = $("#event-views").DataTable({
                            "bPaginate": false,
                            "bInfo": false,
Esempio n. 2
0
             textarea.innerHTML = default_text;
         }
         textarea.className = "expandable objective";
         $('objective_'+id+"_append").insert({after: textarea});
         setTimeout('new ExpandableTextarea($("objective_text_'+id+'"));', 100);
     } else {
         if ($('objective_text_'+id)) {
             text[id] = $('objective_text_'+id).value;
             $('objective_text_'+id).remove();
         }
     }
 }
 </script>
 <?php 
 events_subnavigation($event_info, 'content');
 echo "<div class=\"content-small\">" . fetch_course_path($event_info["course_id"]) . "</div>\n";
 echo "<h1 id=\"page-top\" class=\"event-title\">" . html_encode($event_info["event_title"]) . "</h1>\n";
 if ($SUCCESS) {
     fade_element("out", "display-success-box");
     echo display_success();
 }
 if ($NOTICE) {
     echo display_notice();
 }
 if ($ERROR) {
     echo display_error();
 }
 ?>
 <form id="content_form" action="<?php 
 echo ENTRADA_URL;
 ?>
Esempio n. 3
0
                                        updateAudienceOptions();
                                        generateEventAutocomplete();
                                    });
                                    </script>
                                    <?php 
                        } else {
                            echo display_error("You do not have any courses availabe in the system at this time, please add a course prior to adding learning events.");
                        }
                        ?>
							</div>
						</div>
						<div class="control-group">
							<label for="event_title" class="control-label form-required">Event Title:</label>
							<div class="controls">
								<div id="course_id_path" class="content-small"><?php 
                        echo fetch_course_path($PROCESSED["course_id"]);
                        ?>
</div>
								<input type="text" id="event_title" name="event_title" value="<?php 
                        echo html_encode($PROCESSED["event_title"]);
                        ?>
" maxlength="255" style="width: 95%; font-size: 150%; padding: 3px" />
							</div>
						</div>
						<div class="control-group">
							<table>
								<?php 
                        echo generate_calendars("event", "Event Date & Time", true, true, isset($PROCESSED["event_start"]) ? $PROCESSED["event_start"] : 0);
                        ?>
							</table>
						</div>
 *
 * This API file returns a reponse code of 0 or 1 depeneding whether or
 * not the apartment(s) are available during the selected date.
 *
 * @author Organisation: Queen's University
 * @author Unit: School of Medicine
 * @author Developer: Matt Simpson <*****@*****.**>
 * @copyright Copyright 2010 Queen's University. All Rights Reserved.
 *
 */
if (!defined("IN_EVENTS")) {
    exit;
} elseif (!isset($_SESSION["isAuthorized"]) || !$_SESSION["isAuthorized"]) {
    header("Location: " . ENTRADA_URL);
    exit;
} elseif (!$ENTRADA_ACL->amIAllowed("event", "update", false)) {
    add_error("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 [" . $GROUP . "] and role [" . $ROLE . "] do not have access to this module [" . $MODULE . "].");
} else {
    /**
     * Clears all open buffers so we can return a plain response for the Javascript.
     */
    ob_clear_open_buffers();
    $course_id = 0;
    if (isset($_GET["id"]) && ($tmp_input = clean_input($_GET["id"], array("int")))) {
        $course_id = $tmp_input;
    }
    echo fetch_course_path($course_id);
    exit;
}
Esempio n. 5
0
                                        updateAudienceOptions();
                                    });
                                    </script>
                                    <?php 
            } else {
                echo display_error("You do not have any courses availabe in the system at this time, please add a course prior to adding learning events.");
            }
            ?>
                    </div>
                </div>
                <div class="control-group">
                    <label for="event_title" class="control-label form-required">Event Title:</label>
                    <div class="controls">
                        <div id="course_id_path" class="content-small"><?php 
            echo isset($PROCESSED["course_id"]) && $PROCESSED["course_id"] ? fetch_course_path($PROCESSED["course_id"]) : "";
            ?>
</div>
                        <input type="text" id="event_title" name="event_title" value="<?php 
            echo isset($PROCESSED["event_title"]) && $PROCESSED["event_title"] ? html_encode($PROCESSED["event_title"]) : "";
            ?>
" maxlength="255" style="width: 95%; font-size: 150%; padding: 3px" />
                    </div>
                </div>
                <div class="control-group">
                    <table>
                        <?php 
            echo generate_calendars("event", "Event Date", true, true, isset($PROCESSED["event_start"]) ? $PROCESSED["event_start"] : 0);
            ?>
                    </table>
                </div>