예제 #1
0
                        }
                    } else {
                        ?>
						<div class="display-notice">
							<h3>No Completed Quizzes</h3>
							There have been no quizzes completed by
							<?php 
                        switch ($target_group) {
                            case "faculty":
                                echo "<strong>faculty members</strong>";
                                break;
                            case "staff":
                                echo "<strong>staff members</strong>";
                                break;
                            case "student":
                                echo "<strong>students</strong>" . ($target_role ? " in the <strong>" . groups_get_name($target_role) . "</strong>" : "");
                                break;
                            case "all":
                            default:
                                echo "anyone";
                                break;
                        }
                        ?>
							at this point.
							<br /><br />
							Try changing the group that results are calculated for in the <strong>Result Calculation</strong> menu.
						</div>
						<?php 
                    }
                    /**
                     * Sidebar item that will provide a method for choosing which results to display.
예제 #2
0
 $results = $db->GetAll($query);
 if ($results) {
     echo "<div class=\"searchTitle\">\n";
     echo "\t<table style=\"width: 100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";
     echo "\t<tbody>\n";
     echo "\t\t<tr>\n";
     echo "\t\t\t<td style=\"font-size: 14px; font-weight: bold; color: #003366\">Search Results:</td>\n";
     echo "\t\t\t<td style=\"text-align: right; font-size: 10px; color: #666666; overflow: hidden; white-space: nowrap\">" . $TOTAL_ROWS . " Result" . ($TOTAL_ROWS != 1 ? "s" : "") . " Found. Results " . ($limit_parameter + 1) . " - " . ($RESULTS_PER_PAGE + $limit_parameter <= $TOTAL_ROWS ? $RESULTS_PER_PAGE + $limit_parameter : $TOTAL_ROWS) . " for &quot;<strong>" . html_encode($SEARCH_QUERY) . "</strong>&quot; shown below.</td>\n";
     echo "\t\t</tr>\n";
     echo "\t</tbody>\n";
     echo "\t</table>\n";
     echo "</div>";
     foreach ($results as $result) {
         $description = search_description($result["event_objectives"] . " " . $result["event_goals"]);
         echo "<div id=\"result-" . $result["event_id"] . "\" style=\"width: 100%; margin-bottom: 10px; line-height: 16px;\">\n";
         echo "\t<a href=\"" . ENTRADA_URL . "/events?id=" . $result["event_id"] . "\" style=\"font-weight: bold\">" . html_encode($result["event_title"]) . "</a> <span class=\"content-small\">Event on " . date(DEFAULT_DATE_FORMAT, $result["event_start"]) . "; " . ($result["audience_type"] == "cohort" ? html_encode(groups_get_name($result["event_cohort"])) : "Group Activity") . "</span><br />\n";
         echo ($description ? $description : "Description not available.") . "\n";
         echo "\t<div style=\"white-space: nowrap; overflow: hidden\"><a href=\"" . ENTRADA_URL . "/events?id=" . $result["event_id"] . "\" style=\"color: green; font-size: 11px\" target=\"_blank\">" . ENTRADA_URL . "/events?id=" . $result["event_id"] . "</a></div>\n";
         echo "</div>\n";
     }
 } else {
     if (strlen($SEARCH_QUERY) > 3) {
         echo "<div class=\"display-notice\" style=\"margin-top: 20px; padding: 15px\">\n";
         echo "\t<div style=\"font-side: 13px; font-weight: bold\">No Matching Teaching Events</div>\n";
         echo "\tThere are no teaching events found which contain matches to &quot;<strong>" . html_encode($SEARCH_QUERY) . "</strong>&quot;.";
         if ($SEARCH_CLASS || $SEARCH_YEAR || $SEARCH_ORGANISATION) {
             echo "<br /><br />\n";
             echo "You may wish to try modifying or removing the Graduating Class, Academic Year, or Organisation limiters.\n";
         }
         echo "</div>\n";
     } else {
예제 #3
0
 }
 $description = "Course: " . ($result["course_id"] ? "<a href=\"" . ENTRADA_URL . "/courses?id=" . $result["course_id"] . "\">" . fetch_course_title($result["course_id"]) . "</a> " . ($result["course_num"] ? "(" . $result["course_num"] . ")" : "") : "Not Filed") . "<br  />";
 $description .= "Associated Faculty:";
 $description .= "<ol>";
 if (count($primary_contact)) {
     $description .= "<li>" . html_encode($primary_contact["fullname"]) . ": <a href=\"mailto:" . $primary_contact["email"] . "\">" . $primary_contact["email"] . "</a></li>";
     if (count($other_contacts)) {
         foreach ($other_contacts as $other_contact) {
             $description .= "<li>" . html_encode($other_contact["fullname"]) . ": <a href=\"mailto:" . $other_contact["email"] . "\">" . $other_contact["email"] . "</a></li>";
         }
     }
 } else {
     $description .= "<li>To Be Announced</li>";
 }
 $description .= "</ol><br /><br />";
 $description .= "Cohort: " . html_encode(groups_get_name($result["event_cohort"])) . "<br />";
 $description .= "Phase: " . strtoupper($result["event_phase"]) . "<br />";
 $description .= "Event Date/Time: " . date(DEFAULT_DATE_FORMAT, $result["event_start"]) . "<br />";
 $description .= "Event Duration: " . ($result["event_duration"] ? $result["event_duration"] . " minutes" : "Not provided") . "<br />";
 $description .= "Event Location: " . ($result["event_location"] ? $result["event_location"] : "Not provided") . "<br />";
 $description .= "<br />Podcast Description / Details:<br />";
 $description .= html_encode($result["event_message"]);
 $item = new FeedItem();
 $item->title = $result["event_title"] . ": " . $result["file_title"];
 $item->link = ENTRADA_URL . "/events?id=" . $result["event_id"];
 $item->date = date("r", $result["event_start"]);
 $item->description = $description;
 $item->descriptionHtmlSyndicated = true;
 $item->podcast = new PodcastItem();
 $item->podcast->block = "yes";
 $item->podcast->author = $primary_contact["fullname"];
예제 #4
0
                        if (isset($student["grade_weighting"]) && $student["grade_weighting"] !== NULL) {
                            $exceptions_exist = true;
                            echo "<li id=\"proxy_" . $student["proxy_id"] . "\"><span id=\"" . $student["proxy_id"] . "_name\">" . $student["fullname"] . "</span>\n\t\t\t\t\t\t\t\t\t\t\t<a style=\"cursor: pointer;\" onclick=\"delete_exception('" . $student["proxy_id"] . "', '" . $assessment["assessment_id"] . "');\" class=\"remove\">\n\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"" . ENTRADA_URL . "/images/action-delete.gif\">\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"duration_segment_container\">\n\t\t\t\t\t\t\t\t\t\t\t\tWeighting: <input class=\"duration_segment\" id=\"student_exception_" . $student["proxy_id"] . "\" name=\"student_exception[]\" onkeyup=\"modify_exception('" . $student["proxy_id"] . "', '" . $assessment["assessment_id"] . "', this.value);\" value=\"" . $student["grade_weighting"] . "\">\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</li>";
                        }
                    }
                    if (!$exceptions_exist) {
                        echo "<div class=\"display-notice\">There are currently no students with custom grade weighting in the system for this assessment.</div>";
                    }
                    ?>
							</ol>
                        </div>
                        <?php 
                } else {
                    ?>
                        <div class="display-notice">There are no students in the system for this assessment's Cohort: <strong><?php 
                    echo groups_get_name($COHORT);
                    ?>
</strong>.</div>
                        <?php 
                }
                ?>
                </div>    
                <?php 
            } else {
                $ERROR++;
                $ERRORSTR[] = "In order to edit an assessment's grades you must provide a valid assessment identifier.";
                echo display_error();
                application_log("notice", "Failed to provide a valid assessment identifier when attempting to edit an assessment's grades.");
            }
        } else {
            $ERROR++;
예제 #5
0
                 }
                 if ($weight["total"] != 100) {
                     $cols[] = "[WARNING]: Your weighting totals do not equal 100% or this student is missing a weighted assessment. Current weighted total worth " . $weight["total"] . "% of total course mark.";
                 }
             }
             echo "\"" . implode("\",\"", $cols) . "\"", "\n";
         }
         if ($export_weighted_grades) {
             echo "\n\n\n";
             echo "\"[NOTE]: Weighted Total grades account for student specific weighting exceptions\"\n";
         }
     }
     $contents = ob_get_contents();
     ob_clear_open_buffers();
     if (isset($COHORT)) {
         $filename = date("Y-m-d") . "_" . useable_filename($course_details["course_code"] . "_" . clean_input(groups_get_name($COHORT), array("trim", "file")) . "_gradebook") . ".csv\"";
     } else {
         $filename = date("Y-m-d") . "_" . useable_filename($course_details["course_code"] . "_gradebook") . ".csv\"";
     }
     header("Pragma: public");
     header("Expires: 0");
     header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
     header("Content-Type: application/force-download");
     header("Content-Type: application/octet-stream");
     header("Content-Type: text/csv");
     header("Content-Disposition: attachment; filename=\"" . $filename);
     header("Content-Length: " . strlen($contents));
     header("Content-Transfer-Encoding: binary\n");
     echo $contents;
     exit;
 } else {
예제 #6
0
         $ERROR++;
         $ERRORSTR[] = "To browse a group, you must select a group from the group select list.";
     }
     if (($organisation = $ENTRADA_USER->getActiveOrganisation()) && isset($ORGANISATIONS_BY_ID[$organisation])) {
         $PROCESSED["organisation"] = $organisation;
         $search_query .= " in " . $ORGANISATIONS_BY_ID[$organisation]["organisation_title"];
     } else {
         $ERROR++;
         $ERRORSTR[] = "To browse a group, you must select a organisation from the organisation select list.";
     }
     if (!$ERROR) {
         if ($PROCESSED["group"] != "student") {
             $query_search = "SELECT a.*, CONCAT_WS(', ', a.`lastname`, a.`firstname`) AS `fullname`, b.`account_active`, b.`access_starts`, b.`access_expires`, b.`last_login`, b.`role`, b.`group`\n\t\t\t\t\t\t\t\t\t\t\tFROM `" . AUTH_DATABASE . "`.`user_data` AS a\n\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN `" . AUTH_DATABASE . "`.`user_access` AS b\n\t\t\t\t\t\t\t\t\t\t\tON b.`user_id` = a.`id`\n\t\t\t\t\t\t\t\t\t\t\tAND b.`app_id` IN (" . AUTH_APP_IDS_STRING . ")\n\t\t\t\t\t\t\t\t\t\t\tWHERE b.`app_id` IN (" . AUTH_APP_IDS_STRING . ")\n\t\t\t\t\t\t\t\t\t\t\tAND b.`organisation_id` = " . $db->qstr($PROCESSED["organisation"]) . "\n\t\t\t\t\t\t\t\t\t\t\tAND b.`group` " . ($PROCESSED["group"] == "staff" ? "IN ('staff', 'medtech')" : "= " . $db->qstr($PROCESSED["group"])) . "\n\t\t\t\t\t\t\t\t\t\t\t" . ($PROCESSED["role"] ? "AND b.`role` = " . $db->qstr($PROCESSED["role"]) : "") . "\n\t\t\t\t\t\t\t\t\t\t\tGROUP BY a.`id`\n\t\t\t\t\t\t\t\t\t\t\tORDER BY `fullname` ASC\n\t\t\t\t\t\t\t\t\t\t\tLIMIT %s, %s";
             $query_count = "SELECT a.*, CONCAT_WS(', ', a.`lastname`, a.`firstname`) AS `fullname`, b.`account_active`, b.`access_starts`, b.`access_expires`, b.`last_login`, b.`role`, b.`group`\n\t\t\t\t\t\t\t\t\t\t\tFROM `" . AUTH_DATABASE . "`.`user_data` AS a\n\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN `" . AUTH_DATABASE . "`.`user_access` AS b\n\t\t\t\t\t\t\t\t\t\t\tON b.`user_id` = a.`id`\n\t\t\t\t\t\t\t\t\t\t\tAND b.`app_id` IN (" . AUTH_APP_IDS_STRING . ")\n\t\t\t\t\t\t\t\t\t\t\tWHERE b.`app_id` IN (" . AUTH_APP_IDS_STRING . ")\n\t\t\t\t\t\t\t\t\t\t\tAND b.`organisation_id` = " . $db->qstr($PROCESSED["organisation"]) . "\n\t\t\t\t\t\t\t\t\t\t\tAND b.`group` " . ($PROCESSED["group"] == "staff" ? "IN ('staff', 'medtech')" : "= " . $db->qstr($PROCESSED["group"])) . "\n\t\t\t\t\t\t\t\t\t\t\t" . ($PROCESSED["role"] ? "AND b.`role` = " . $db->qstr($PROCESSED["role"]) : "") . "\n\t\t\t\t\t\t\t\t\t\t\tGROUP BY a.`id`\n\t\t\t\t\t\t\t\t\t\t\tORDER BY `fullname` ASC";
         } else {
             $search_query = groups_get_name($PROCESSED["role"]) . " in " . $ORGANISATIONS_BY_ID[$organisation]["organisation_title"];
             $query_search = "SELECT a.*, CONCAT_WS(', ', a.`lastname`, a.`firstname`) AS `fullname`, b.`account_active`, b.`access_starts`, b.`access_expires`, b.`last_login`, b.`role`, b.`group`\n\t\t\t\t\t\t\t\t\t\t\tFROM `" . AUTH_DATABASE . "`.`user_data` AS a\n\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN `" . AUTH_DATABASE . "`.`user_access` AS b\n\t\t\t\t\t\t\t\t\t\t\tON b.`user_id` = a.`id`\n\t\t\t\t\t\t\t\t\t\t\tAND b.`app_id` IN (" . AUTH_APP_IDS_STRING . ")\n\t\t\t\t\t\t\t\t\t\t\tJOIN `group_members` AS c\n\t\t\t\t\t\t\t\t\t\t\tON a.`id` = c.`proxy_id`\n\t\t\t\t\t\t\t\t\t\t\tAND c.`member_active` = 1\n\t\t\t\t\t\t\t\t\t\t\tJOIN `groups` AS d\n\t\t\t\t\t\t\t\t\t\t\tON c.`group_id` = d.`group_id`\n\t\t\t\t\t\t\t\t\t\t\tAND d.`group_active` = 1\n\t\t\t\t\t\t\t\t\t\t\tWHERE b.`app_id` IN (" . AUTH_APP_IDS_STRING . ")\n\t\t\t\t\t\t\t\t\t\t\tAND b.`organisation_id` = " . $db->qstr($PROCESSED["organisation"]) . "\n\t\t\t\t\t\t\t\t\t\t\tAND b.`group` = " . $db->qstr($PROCESSED["group"]) . "\n\t\t\t\t\t\t\t\t\t\t\tAND d.`group_id` = " . $db->qstr($PROCESSED["role"]) . "\n\t\t\t\t\t\t\t\t\t\t\tGROUP BY a.`id`\n\t\t\t\t\t\t\t\t\t\t\tORDER BY `fullname` ASC\n\t\t\t\t\t\t\t\t\t\t\tLIMIT %s, %s";
             $query_count = "SELECT a.*, CONCAT_WS(', ', a.`lastname`, a.`firstname`) AS `fullname`, b.`account_active`, b.`access_starts`, b.`access_expires`, b.`last_login`, b.`role`, b.`group`\n\t\t\t\t\t\t\t\t\t\t\tFROM `" . AUTH_DATABASE . "`.`user_data` AS a\n\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN `" . AUTH_DATABASE . "`.`user_access` AS b\n\t\t\t\t\t\t\t\t\t\t\tON b.`user_id` = a.`id`\n\t\t\t\t\t\t\t\t\t\t\tAND b.`app_id` IN (" . AUTH_APP_IDS_STRING . ")\n\t\t\t\t\t\t\t\t\t\t\tJOIN `group_members` AS c\n\t\t\t\t\t\t\t\t\t\t\tON a.`id` = c.`proxy_id`\n\t\t\t\t\t\t\t\t\t\t\tAND c.`member_active` = 1\n\t\t\t\t\t\t\t\t\t\t\tJOIN `groups` AS d\n\t\t\t\t\t\t\t\t\t\t\tON c.`group_id` = d.`group_id`\n\t\t\t\t\t\t\t\t\t\t\tAND d.`group_active` = 1\n\t\t\t\t\t\t\t\t\t\t\tWHERE b.`app_id` IN (" . AUTH_APP_IDS_STRING . ")\n\t\t\t\t\t\t\t\t\t\t\tAND b.`organisation_id` = " . $db->qstr($PROCESSED["organisation"]) . "\n\t\t\t\t\t\t\t\t\t\t\tAND b.`group` = " . $db->qstr($PROCESSED["group"]) . "\n\t\t\t\t\t\t\t\t\t\t\tAND d.`group_id` = " . $db->qstr($PROCESSED["role"]) . "\n\t\t\t\t\t\t\t\t\t\t\tGROUP BY a.`id`\n\t\t\t\t\t\t\t\t\t\t\tORDER BY `fullname` ASC";
         }
     }
     break;
 case "browse-dept":
     $browse_dept = 0;
     if (isset($_POST["d"]) && ($department = clean_input($_POST["d"], array("trim", "int")))) {
         $query = "\tSELECT a.`department_id`, a.`department_title`, a.`organisation_id`, b.`entity_title`, c.`organisation_title`\n\t\t\t\t\t\t\t\tFROM `" . AUTH_DATABASE . "`.`departments` AS a\n\t\t\t\t\t\t\t\tLEFT JOIN `" . AUTH_DATABASE . "`.`entity_type` AS b\n\t\t\t\t\t\t\t\tON a.`entity_id` = b.`entity_id`\n\t\t\t\t\t\t\t\tLEFT JOIN `" . AUTH_DATABASE . "`.`organisations` AS c\n\t\t\t\t\t\t\t\tON a.`organisation_id` = c.`organisation_id`\n\t\t\t\t\t\t\t\tWHERE a.`department_id` = " . $db->qstr($department) . "\n\t\t\t\t\t\t\t\tORDER BY c.`organisation_title` ASC, a.`department_title`";
         $result = $db->GetRow($query);
         if ($result) {
             $browse_department = $department;
             $search_query_text = html_encode($result["department_title"]);
             $search_query = $search_query_text;
         } else {
예제 #7
0
				</table>
				<?php 
                if (count($students) === 0) {
                    ?>
				<div class="display-notice">There are no students in the system for this cohort [<strong><?php 
                    echo groups_get_name($COHORT);
                    ?>
</strong>].</div>
				<?php 
                }
                ?>
			<?php 
            } else {
                echo "<table class=\"gradebook\"></table>";
                $NOTICE++;
                $NOTICESTR[] = "No assessments could be found for this gradebook for this cohort [" . groups_get_name($COHORT) . "].";
                echo display_notice();
            }
        } else {
            echo "<table class=\"gradebook\"></table>";
            $ERROR++;
            $ERRORSTR[] = "In order to edit a course you must provide a valid course identifier. The provided ID does not exist in this system.";
            echo display_error();
            application_log("notice", "Failed to provide a valid course identifer when attempting to view a gradebook");
        }
    } else {
        echo "<table class=\"gradebook\"></table>";
        $ERROR++;
        $ERRORSTR[] = "In order to edit a course you must provide the courses identifier.";
        echo display_error();
        application_log("notice", "Failed to provide course identifer when attempting to view a gradebook");