Exemplo n.º 1
0
for ($i = 0; $i < count($instructors); ++$i) {
    $section_result = mysql_query("SELECT * FROM Section WHERE sessionID='" . $sessionID . "' AND instructorID='" . $instructors[$i]["instructorID"] . "'");
    $sections = mysql_fetch_all($section_result);
    echo $instructors[$i]["lastName"] . ", " . $instructors[$i]["firstName"];
    echo "<br><br>";
    start_schedule_table();
    // only print the sections which belong to the containing department?
    for ($j = 0; $j < count($sections); ++$j) {
        $roomID = slotID_to_roomID($sections[$j]["slotID"], $num_of_slots_per_room);
        $building = binary_search($buildings, "buildingID", $rooms[$roomID]["buildingID"]);
        $course = binary_search($courses, "courseID", $sections[$j]["courseID"]);
        $available = $sections[$j]["maxEnrollment"] - $sections[$j]["preliminaryEnrollment"];
        $dayOfWeek = slotID_to_dayOfWeek($sections[$j]["slotID"], $num_of_slots_per_room, count($periods));
        $period = get_period_from_slotID($sections[$j]["slotID"], $num_of_slots_per_room, $periods, count($periods));
        $startTime = convert_int_to_standard_time($period["startTime"]);
        $endTime = convert_int_to_standard_time($period["endTime"]);
        echo "<tr>";
        echo "<td>" . $building["buildingAbbr"] . "</td>";
        echo "<td>" . $rooms[$roomID]["roomNo"] . "</td>";
        echo "<td>" . $course["courseNo"] . "</td>";
        echo "<td>" . $instructors[$i]["lastName"] . " " . $instructors[$i]["firstName"][0] . "</td>";
        echo "<td>" . $course["courseName"] . "</td>";
        echo "<td>" . $course["creditHours"] . "</td>";
        echo "<td>" . $sections[$j]["maxEnrollment"] . "</td>";
        echo "<td>" . $sections[$j]["preliminaryEnrollment"] . "</td>";
        echo "<td>" . $available . "</td>";
        echo "<td>" . $dayOfWeek . "</td>";
        echo "<td>" . $startTime . "</td>";
        echo "<td>" . $endTime . "</td>";
        echo "</tr>";
    }
Exemplo n.º 2
0
						</div>
						<div class="modal-body">
							<p></p>
						</div>
						<div class="modal-footer">
						</div>
					</div>
				</div>
			</div>
			<div class="row sortable">
				<ul class="col-md-1">
					<ul class="schedule-time-column">
						<div class="column-time-header"></div>
						<?php 
foreach ($periods as $value) {
    echo '<li>' . convert_int_to_standard_time($value["startTime"]) . ' - ' . convert_int_to_standard_time($value["endTime"]) . '</li>';
}
?>
					</ul>
				</ul>
				<?php 
// initialize days and sections
for ($i = 0; $i < $num_of_days; $i++) {
    echo '<ul class="col-md-2">
									<ul class="schedule-column">
										<div class="column-header">' . $daysOfWeek[$i] . '</div>';
    for ($j = 0; $j < count($periods); $j++) {
        echo '<li id="empty" class="course"></li>';
    }
    echo '</ul>
								</ul>';