From c6da76f7c7b9cbba57b4418e1f505b828f6e7d34 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Fri, 3 Nov 2006 18:48:30 +0000 Subject: [PATCH] Altered default course generation values --- .../controllers/CourseadminController.php | 28 +++++++++---------- .../models/tables/CourseGenerations.php | 16 +++++------ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/application/controllers/CourseadminController.php b/application/controllers/CourseadminController.php index e21bd4f7..9988caed 100644 --- a/application/controllers/CourseadminController.php +++ b/application/controllers/CourseadminController.php @@ -62,22 +62,22 @@ class CourseAdminController extends Nmc_Controller_Action $out->assign('prevCourseLink', $prevCourseLink); $out->assign('nextCourseLink', $nextCourseLink); - $creditsSingleValues = array(); - foreach($course->credits as $credit) { - if($credit->type == 1) { - $creditsSingleValues[] = $credit->hours; - } else if($credit->type == 2) { - $out->creditsRangeMin = $credit->hours; - } else if($credit->type == 3) { - $out->creditsRangeMax = $credit->hours; - } else if($credit->type == 4) { - $out->creditsMaxPerSemester = $credit->hours; - } else if($credit->type == 5) { - $out->creditsMaxPerDegree = $credit->hours; - } + } + $creditsSingleValues = array(); + foreach($course->credits as $credit) { + if($credit->type == 1) { + $creditsSingleValues[] = $credit->hours; + } else if($credit->type == 2) { + $out->creditsRangeMin = $credit->hours; + } else if($credit->type == 3) { + $out->creditsRangeMax = $credit->hours; + } else if($credit->type == 4) { + $out->creditsMaxPerSemester = $credit->hours; + } else if($credit->type == 5) { + $out->creditsMaxPerDegree = $credit->hours; } - $out->creditsSingleValues = implode(' ', $creditsSingleValues); } + $out->creditsSingleValues = implode(' ', $creditsSingleValues); $out->assign('page', 'edit_course'); $out->assign('course', $course); diff --git a/application/models/tables/CourseGenerations.php b/application/models/tables/CourseGenerations.php index 76fc2555..0be83841 100644 --- a/application/models/tables/CourseGenerations.php +++ b/application/models/tables/CourseGenerations.php @@ -113,19 +113,19 @@ class CourseGenerations extends Nmc_Db_Table $newHomeCrosslist = CourseCrosslistings::getInstance()->fetchNew(); $newHomeCrosslist->type = 'home listing'; - $newCredit = CourseCredits::getInstance()->fetchNew(); - $newCredit->type = 1; - $newCredit->hours = 3; + $newFixedCredit = CourseCredits::getInstance()->fetchNew(); + $newFixedCredit->type = 1; + $newFixedCredit->hours = 3; - $newActivity = CourseActivities::getInstance()->fetchNew(); - $newActivity->type = 'lec'; - $newActivity->hours = 3; + $newMaxCredit = CourseCredits::getInstance()->fetchNew(); + $newMaxCredit->type = 5; + $newMaxCredit->hours = 3; $newRecord = parent::fetchNew(); $newRecord->termsOffered = array('Fall', 'Spring', 'Summer'); $newRecord->gradingType = 'unrestricted'; - $newRecord->activities[] = $newActivity; - $newRecord->credits[] = $newCredit; + $newRecord->credits[] = $newFixedCredit; + $newRecord->credits[] = $newMaxCredit; $newRecord->deliveryMethods = array('Classroom'); $newRecord->campuses = array('UNL'); -- GitLab