本文整理匯總了PHP中Courses::fetchAllStudentCoursesForSemester方法的典型用法代碼示例。如果您正苦於以下問題:PHP Courses::fetchAllStudentCoursesForSemester方法的具體用法?PHP Courses::fetchAllStudentCoursesForSemester怎麽用?PHP Courses::fetchAllStudentCoursesForSemester使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Courses
的用法示例。
在下文中一共展示了Courses::fetchAllStudentCoursesForSemester方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: FollowUps
$follow = new FollowUps($dbo);
$courses = new Courses($dbo);
if (isset($_GET['student_num']) && ctype_digit($_GET['student_num'])) {
$studentProfile = $profile->getProfile($_GET['student_num']);
}
//============================================================================================
// Load the content
//============================================================================================
if (!isset($_GET['page'])) {
$render = true;
if (!empty($studentProfile)) {
$thisPage = 'fund';
$followupcount = $follow->fetchFollowUpsCountStudent($_GET['student_num']);
$poccount = $profile->countUnlockedPOC($_GET['student_num']);
$semester = \Ventus\Utilities\Functions::fetchSemester();
$current_courses = $courses->fetchAllStudentCoursesForSemester($_GET['student_num'], $semester['now_short']);
$osap = $bursary->listOsapBursaries($_GET['student_num']);
$other = $bursary->listOtherBursaries($_GET['student_num']);
$bswd = $bursary->listBswdBursaries($_GET['student_num']);
$quebec = $bursary->listQuebecBursaries($_GET['student_num']);
$uo = $bursary->listUOBursaries($_GET['student_num']);
$l10n->addResource(__DIR__ . '/l10n/bursaries.json');
$viewFile = 'views/bursaries.php';
}
} elseif ($_GET['page'] === "add") {
$last_added = $bursary->addBursary($_POST);
$loggers['audit']->info("Bursary added");
echo $last_added;
} elseif ($_GET['page'] === "getosap") {
$osapdata = $bursary->getOsapBursary($_POST['id']);
header('Content-Type: application/json; charset=utf-8');
示例2: Courses
$model = new Courses($dbo);
if (isset($_GET['student_num']) && ctype_digit($_GET['student_num'])) {
$studentProfile = $profile->getProfile($_GET['student_num']);
}
//============================================================================================
// Load the content
//============================================================================================
if (!isset($_GET['page'])) {
$render = true;
if (!empty($studentProfile)) {
$thisPage = 'courses';
$followupcount = $follow->fetchFollowUpsCountStudent($_GET['student_num']);
$poccount = $profile->countUnlockedPOC($_GET['student_num']);
$current_semester = \Ventus\Utilities\Functions::fetchSemester();
$current_semester = $current_semester['now_short'];
$current_courses = $model->fetchAllStudentCoursesForSemester($_GET['student_num'], $current_semester);
//Used in the menu
$current_courses_view = $model->fetchAllStudentCoursesForSemester($_GET['student_num'], $current_semester);
$current_session = substr($current_semester, -1);
$current_year = substr($current_semester, 0, 4);
$cam_details = $model->fetchCamDetails($_GET['student_num']);
//Fetch all the courses the student was ever registered to
$all_student_courses = $model->fetchAllStudentCourses($_GET['student_num']);
$current_courses_view = array();
$past_courses = array();
$future_courses = array();
//For each course, move it in to a dedicated array based on whether it is being held now, in the past or in the future
foreach ($all_student_courses as $asc) {
$course_session = substr($asc['session'], -1);
$course_year = substr($asc['session'], 0, 4);
//If the sessions match, things are easy