Skip to content
Snippets Groups Projects
Commit d6eb36ec authored by Tim Steiner's avatar Tim Steiner
Browse files

Course searching at /courses/public-view/search

parent 9bdd1f31
Branches
Tags
No related merge requests found
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
/** /**
* PublicViewController * PublicViewController
* *
* @author * @author
* @version * @version
*/ */
...@@ -21,12 +21,12 @@ class Courses_PublicViewController extends App_Controller_Action { ...@@ -21,12 +21,12 @@ class Courses_PublicViewController extends App_Controller_Action {
$dom->formatOutput = true; $dom->formatOutput = true;
$root = $dom->createElement('courses'); $root = $dom->createElement('courses');
$dom->appendChild($root); $dom->appendChild($root);
foreach ($courses as $course) { foreach ($courses as $course) {
$courseNode = $dom->createElement('course'); $courseNode = $dom->createElement('course');
$courseNode->appendChild($dom->createElement('title', htmlspecialchars($course->getTitle()))); $courseNode->appendChild($dom->createElement('title', htmlspecialchars($course->getTitle())));
$crosslistings = $course->getCrosslistings(); $crosslistings = $course->getCrosslistings();
if (count($crosslistings) > 0) { if (count($crosslistings) > 0) {
$courseCodesNode = $dom->createElement('courseCodes'); $courseCodesNode = $dom->createElement('courseCodes');
...@@ -44,11 +44,11 @@ class Courses_PublicViewController extends App_Controller_Action { ...@@ -44,11 +44,11 @@ class Courses_PublicViewController extends App_Controller_Action {
} else { } else {
continue; continue;
} }
$courseNode->appendChild($dom->createElement('gradingType', htmlspecialchars($course->getGradingType(), null, 'UTF-8'))); $courseNode->appendChild($dom->createElement('gradingType', htmlspecialchars($course->getGradingType(), null, 'UTF-8')));
$courseNode->appendChild($dom->createElement('dfRemoval', htmlspecialchars($course->getDfRemoval(), null, 'UTF-8'))); $courseNode->appendChild($dom->createElement('dfRemoval', htmlspecialchars($course->getDfRemoval(), null, 'UTF-8')));
$courseNode->appendChild($dom->createElement('effectiveSemester', htmlspecialchars($course->getEffectiveSemester(), null, 'UTF-8'))); $courseNode->appendChild($dom->createElement('effectiveSemester', htmlspecialchars($course->getEffectiveSemester(), null, 'UTF-8')));
if ($node = $this->_getNodeFromHtmlFragment($dom, 'prerequisite', $course->getPrerequisite())) { if ($node = $this->_getNodeFromHtmlFragment($dom, 'prerequisite', $course->getPrerequisite())) {
$courseNode->appendChild($node); $courseNode->appendChild($node);
} }
...@@ -58,7 +58,7 @@ class Courses_PublicViewController extends App_Controller_Action { ...@@ -58,7 +58,7 @@ class Courses_PublicViewController extends App_Controller_Action {
if ($node = $this->_getNodeFromHtmlFragment($dom, 'description', $course->getDescription())) { if ($node = $this->_getNodeFromHtmlFragment($dom, 'description', $course->getDescription())) {
$courseNode->appendChild($node); $courseNode->appendChild($node);
} }
if (count($course->getCampuses()) > 0) { if (count($course->getCampuses()) > 0) {
$campusesNode = $dom->createElement('campuses'); $campusesNode = $dom->createElement('campuses');
$courseNode->appendChild($campusesNode); $courseNode->appendChild($campusesNode);
...@@ -66,7 +66,7 @@ class Courses_PublicViewController extends App_Controller_Action { ...@@ -66,7 +66,7 @@ class Courses_PublicViewController extends App_Controller_Action {
$campusesNode->appendChild($dom->createElement('campus', $campus)); $campusesNode->appendChild($dom->createElement('campus', $campus));
} }
} }
if (count($course->getDeliveryMethods()) > 0) { if (count($course->getDeliveryMethods()) > 0) {
$deliveryMethodsNode = $dom->createElement('deliveryMethods'); $deliveryMethodsNode = $dom->createElement('deliveryMethods');
$courseNode->appendChild($deliveryMethodsNode); $courseNode->appendChild($deliveryMethodsNode);
...@@ -74,7 +74,7 @@ class Courses_PublicViewController extends App_Controller_Action { ...@@ -74,7 +74,7 @@ class Courses_PublicViewController extends App_Controller_Action {
$deliveryMethodsNode->appendChild($dom->createElement('deliveryMethod', $deliveryMethod)); $deliveryMethodsNode->appendChild($dom->createElement('deliveryMethod', $deliveryMethod));
} }
} }
if (count($course->getTermsOffered()) > 0) { if (count($course->getTermsOffered()) > 0) {
$termsOfferedNode = $dom->createElement('termsOffered'); $termsOfferedNode = $dom->createElement('termsOffered');
$courseNode->appendChild($termsOfferedNode); $courseNode->appendChild($termsOfferedNode);
...@@ -82,7 +82,7 @@ class Courses_PublicViewController extends App_Controller_Action { ...@@ -82,7 +82,7 @@ class Courses_PublicViewController extends App_Controller_Action {
$termsOfferedNode->appendChild($dom->createElement('term', $term)); $termsOfferedNode->appendChild($dom->createElement('term', $term));
} }
} }
$activities = $course->getActivities(); $activities = $course->getActivities();
if (count($crosslistings) > 0) { if (count($crosslistings) > 0) {
$activitiesNode = $dom->createElement('activities'); $activitiesNode = $dom->createElement('activities');
...@@ -96,7 +96,7 @@ class Courses_PublicViewController extends App_Controller_Action { ...@@ -96,7 +96,7 @@ class Courses_PublicViewController extends App_Controller_Action {
} }
} }
} }
$credits = $course->getCredits(); $credits = $course->getCredits();
if (count($credits) > 0) { if (count($credits) > 0) {
$creditsNode = $dom->createElement('credits'); $creditsNode = $dom->createElement('credits');
...@@ -107,7 +107,7 @@ class Courses_PublicViewController extends App_Controller_Action { ...@@ -107,7 +107,7 @@ class Courses_PublicViewController extends App_Controller_Action {
$creditNode->setAttribute('type', $credit['description']); $creditNode->setAttribute('type', $credit['description']);
} }
} }
$gradTieIn = $course->getGradTieIn(); $gradTieIn = $course->getGradTieIn();
if ($gradTieIn['credits']) { if ($gradTieIn['credits']) {
$courseNode->appendChild($dom->createElement('gradCredits', htmlspecialchars($gradTieIn['credits'], null, 'UTF-8'))); $courseNode->appendChild($dom->createElement('gradCredits', htmlspecialchars($gradTieIn['credits'], null, 'UTF-8')));
...@@ -118,45 +118,45 @@ class Courses_PublicViewController extends App_Controller_Action { ...@@ -118,45 +118,45 @@ class Courses_PublicViewController extends App_Controller_Action {
if ($node = $this->_getNodeFromHtmlFragment($dom, 'gradPrerequisites', $gradTieIn['prerequisites'])) { if ($node = $this->_getNodeFromHtmlFragment($dom, 'gradPrerequisites', $gradTieIn['prerequisites'])) {
$courseNode->appendChild($node); $courseNode->appendChild($node);
} }
$root->appendChild($courseNode); $root->appendChild($courseNode);
} }
header('Content-type: text/xml'); header('Content-type: text/xml');
$dom->normalize(); $dom->normalize();
echo $dom->saveXML(); echo $dom->saveXML();
} }
protected function _getNodeFromHtmlFragment($dom, $nodeName, $fragment) protected function _getNodeFromHtmlFragment($dom, $nodeName, $fragment)
{ {
$fragment = trim($fragment); $fragment = trim($fragment);
if (!$fragment) { if (!$fragment) {
return null; return null;
} }
$node = new DOMDocument('1.0', 'UTF-8'); $node = new DOMDocument('1.0', 'UTF-8');
$fragment = '<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>' . $fragment . '</body>'; $fragment = '<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>' . $fragment . '</body>';
$node = DOMDocument::loadHTML(strtr($fragment, array('&' => '&amp;'))); $node = DOMDocument::loadHTML(strtr($fragment, array('&' => '&amp;')));
if (!$node->documentElement) { if (!$node->documentElement) {
return null; return null;
} }
$node = $dom->importNode($node->documentElement, true); $node = $dom->importNode($node->documentElement, true);
if (count($node->childNodes->item(1)->childNodes) == 1 && $node->childNodes->item(1)->childNodes->item(0)->nodeName == 'p') { if (count($node->childNodes->item(1)->childNodes) == 1 && $node->childNodes->item(1)->childNodes->item(0)->nodeName == 'p') {
$realNode = $node->childNodes->item(1)->childNodes->item(0); $realNode = $node->childNodes->item(1)->childNodes->item(0);
} else { } else {
$realNode = $node->childNodes->item(1); $realNode = $node->childNodes->item(1);
} }
$newNode = $dom->createElement($nodeName); $newNode = $dom->createElement($nodeName);
while ($realNode->hasChildNodes()) { while ($realNode->hasChildNodes()) {
$newNode->appendChild($realNode->childNodes->item(0)); $newNode->appendChild($realNode->childNodes->item(0));
} }
return $newNode; return $newNode;
} }
/** /**
* This action syncronizes the qreqCourses.currentGeneration field with data from creqCourseGenerations * This action syncronizes the qreqCourses.currentGeneration field with data from creqCourseGenerations
* *
...@@ -166,19 +166,19 @@ class Courses_PublicViewController extends App_Controller_Action { ...@@ -166,19 +166,19 @@ class Courses_PublicViewController extends App_Controller_Action {
$this->_disableLayoutAndView(); $this->_disableLayoutAndView();
//header('Content-type: text/plain'); //header('Content-type: text/plain');
$db = Zend_Registry::get('db'); $db = Zend_Registry::get('db');
$sql = 'SELECT * FROM creqCourseGenerations'; $sql = 'SELECT * FROM creqCourseGenerations';
$data = $db->query($sql)->fetchAll(); $data = $db->query($sql)->fetchAll();
$courses = array(); $courses = array();
foreach ($data as $row) { foreach ($data as $row) {
$courseId = $row['course']; $courseId = $row['course'];
$generationId = $row['courseGenerationId']; $generationId = $row['courseGenerationId'];
$courses[$courseId][$generationId] = $row; $courses[$courseId][$generationId] = $row;
} }
$multipleLatestCount = 0; $multipleLatestCount = 0;
$courseLatest = array(); $courseLatest = array();
foreach ($courses as $courseId => $course) { foreach ($courses as $courseId => $course) {
...@@ -216,13 +216,75 @@ class Courses_PublicViewController extends App_Controller_Action { ...@@ -216,13 +216,75 @@ class Courses_PublicViewController extends App_Controller_Action {
$courseLatest[$courseId] = $latestId; $courseLatest[$courseId] = $latestId;
} }
echo 'Multiple Latest Count: ' . $multipleLatestCount . PHP_EOL; echo 'Multiple Latest Count: ' . $multipleLatestCount . PHP_EOL;
foreach ($courseLatest as $courseId => $latestId) { foreach ($courseLatest as $courseId => $latestId) {
$data = array('currentGeneration' => $latestId); $data = array('currentGeneration' => $latestId);
$where = 'courseId = ' . $courseId; $where = 'courseId = ' . $courseId;
$db->update('creqCourses', $data, $where); $db->update('creqCourses', $data, $where);
} }
}
public function searchAction()
{
$this->view->colleges = Courses_CourseModel::getCollegeNames();
$this->view->departments = Courses_CourseModel::getDepartments();
$this->view->subjects = Courses_CourseModel::getSubjectsFull();
}
public function resultsAction()
{
$criteria = $this->_getAllParams();
$in = $criteria;
$criteria['title'] = $criteria['courseTitle'];
$courses = Courses_CourseModel::findWithCriteria($criteria);
$data = new Unl_Model_Collection('Unl_Model_Array');
foreach ($courses as $requestId => $course) {
$aceOutcomes = $course->getAceOutcomes();
if (!$aceOutcomes) {
$aceOutcomes = array('-');
}
foreach ($aceOutcomes as $aceOutcome) {
$data[] = new Unl_Model_Array(array(
'slo' => substr($aceOutcome['slo'], 3),
'courseCode' => $course->getCourseCode(),
'college' => $course->getCollege(),
'title' => $course->getTitle(),
'courseId' => $course->getCourseId(),
));
}
}
$session = new Zend_Session_Namespace(__CLASS__);
$sortBy = $session->sortBy;
if (!Unl_Util::isArray($sortBy)) {
$sortBy = array();
}
if ($in['sort']) {
if (($key = array_search($in['sort'], $sortBy)) !== FALSE) {
unset($sortBy[$key]);
}
$sortBy[] = $in['sort'];
}
$session->sortBy = $sortBy;
foreach ($sortBy as $sortKey) {
$data->orderBy('get' . $sortKey);
}
$this->view->data = $data;
$this->view->criteria = $criteria;
}
public function viewAction()
{
$in = $this->_getAllParams();
$id = $in['id'];
if ($id) {
$course = Courses_CourseModel::findByCourseId($id);
}
$this->view->course = $course;
} }
} }
...@@ -4,8 +4,11 @@ require_once ('Unl/Model.php'); ...@@ -4,8 +4,11 @@ require_once ('Unl/Model.php');
class Courses_CourseModel extends Unl_Model class Courses_CourseModel extends Unl_Model
{ {
static protected $_colleges = array(); static protected $_colleges = array();
static protected $_collegeNames = array();
static protected $_departments = array();
static protected $_hierarchy = array();
static protected $_outcomeShortNames = array( static protected $_outcomeShortNames = array(
'SLO1' => 'writing', 'SLO1' => 'writing',
'SLO2' => 'communication', 'SLO2' => 'communication',
...@@ -47,7 +50,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -47,7 +50,7 @@ class Courses_CourseModel extends Unl_Model
'globalAwareness' => 'Global Awareness', 'globalAwareness' => 'Global Awareness',
'humanDiversity' => 'Human Diversity' 'humanDiversity' => 'Human Diversity'
); );
static protected $_activityMap; static protected $_activityMap;
const CREDIT_TYPE_SINGLE = 1; const CREDIT_TYPE_SINGLE = 1;
...@@ -228,7 +231,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -228,7 +231,7 @@ class Courses_CourseModel extends Unl_Model
'crosslistings' => array(), 'crosslistings' => array(),
'esDesignations' => array(), 'esDesignations' => array(),
'gradTieIn' => null, 'gradTieIn' => null,
'aceReinforcements' => array(), 'aceReinforcements' => array(),
'aceOutcomes' => array() 'aceOutcomes' => array()
); );
...@@ -368,7 +371,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -368,7 +371,7 @@ class Courses_CourseModel extends Unl_Model
if (!$courseLetter) { if (!$courseLetter) {
$courseLetter = ''; $courseLetter = '';
} }
$db = Zend_Registry::get('db'); $db = Zend_Registry::get('db');
$select = new Zend_Db_Select($db); $select = new Zend_Db_Select($db);
...@@ -380,7 +383,28 @@ class Courses_CourseModel extends Unl_Model ...@@ -380,7 +383,28 @@ class Courses_CourseModel extends Unl_Model
$select->where('c.subject = ?', $subject); $select->where('c.subject = ?', $subject);
$select->where('c.courseNumber = ?', $courseNumber); $select->where('c.courseNumber = ?', $courseNumber);
$select->where('c.courseLetter = ?', $courseLetter); $select->where('c.courseLetter = ?', $courseLetter);
$records = $select->query()->fetchAll();
if (count($records) == 0) {
return null;
}
$generationId = $records[0]['courseGenerationId'];
return self::find($generationId);
}
static public function findByCourseId($courseId)
{
if (!$courseLetter) {
$courseLetter = '';
}
$db = Zend_Registry::get('db');
$select = new Zend_Db_Select($db);
$select->from(array('g' => 'creqCourseGenerations'), array('courseGenerationId'));
$select->join(array('c' => 'creqCourses'), 'g.courseGenerationId = c.currentGeneration', array());
$select->where('c.courseId = ?', $courseId);
$records = $select->query()->fetchAll(); $records = $select->query()->fetchAll();
if (count($records) == 0) { if (count($records) == 0) {
return null; return null;
...@@ -409,7 +433,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -409,7 +433,7 @@ class Courses_CourseModel extends Unl_Model
} }
$select->where('r.complete = "no"'); $select->where('r.complete = "no"');
*/ */
$select = new Zend_Db_Select($db); $select = new Zend_Db_Select($db);
$select->distinct(); $select->distinct();
$select->from(array('c' => 'creqCourseCodes'), array()); $select->from(array('c' => 'creqCourseCodes'), array());
...@@ -432,7 +456,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -432,7 +456,7 @@ class Courses_CourseModel extends Unl_Model
$requests = Requests_RequestModel::find($requestIds); $requests = Requests_RequestModel::find($requestIds);
return $requests; return $requests;
} }
static public function findAllActive() static public function findAllActive()
{ {
$db = Zend_Registry::get('db'); $db = Zend_Registry::get('db');
...@@ -441,7 +465,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -441,7 +465,7 @@ class Courses_CourseModel extends Unl_Model
$select->from(array('g' => 'creqCourseGenerations'), array('courseGenerationId')); $select->from(array('g' => 'creqCourseGenerations'), array('courseGenerationId'));
$select->join(array('p' => 'creqCourses'), 'g.courseGenerationId = p.currentGeneration', array()); $select->join(array('p' => 'creqCourses'), 'g.courseGenerationId = p.currentGeneration', array());
$select->where('g.removed = "no"'); $select->where('g.removed = "no"');
$records = $select->query()->fetchAll(); $records = $select->query()->fetchAll();
$generationIds = array(); $generationIds = array();
foreach ($records as $row) { foreach ($records as $row) {
...@@ -450,6 +474,75 @@ class Courses_CourseModel extends Unl_Model ...@@ -450,6 +474,75 @@ class Courses_CourseModel extends Unl_Model
return self::find($generationIds); return self::find($generationIds);
} }
static public function findWithCriteria($criteria = array())
{
$validKeys = array('college', 'department', 'subject', 'courseNumber', 'courseLetter', 'title', 'campus', 'ace', 'essentialStudies', 'integratedStudies');
$criteria = array_intersect_key($criteria, array_flip($validKeys));
$emptySearch = true;
foreach ($criteria as $value) {
if ($value) {
$emptySearch = false;
}
}
if ($emptySearch) {
return new Unl_Model_Collection(__CLASS__);
}
$db = Zend_Registry::get('db');
$select = new Zend_Db_Select($db);
$select->from(array('l' => 'creqColleges'), array());
$select->join(array('d' => 'creqDepartments'), 'l.collegeId = d.college', array());
$select->join(array('s' => 'creqSubjects'), 'd.departmentId = s.department', array());
$select->join(array('c' => 'creqCourseCodes'), 's.name = c.subject', array());
$select->join(array('x' => 'creqCourseCrosslistings'), 'c.courseCodeId = x.courseCode', array());
$select->join(array('g' => 'creqCourseGenerations'), 'x.generation = g.courseGenerationId', array('courseGenerationId'));
$select->join(array('p' => 'creqCourses'), 'g.courseGenerationId = p.currentGeneration', array());
$select->join(array('e' => 'creqCourseDetails'), 'g.courseGenerationId = e.generation', array());
$select->where('g.removed = "no"');
$select->where('g.type = "official"');
if ($criteria['college']) {
$select->where('l.collegeId = ?', $criteria['college']);
}
if ($criteria['department']) {
$select->where('d.departmentId = ?', $criteria['department']);
}
if ($criteria['subject']) {
$select->where('c.subject = ?', $criteria['subject']);
}
if ($criteria['courseNumber']) {
$select->where('c.courseNumber LIKE ?', $criteria['courseNumber'] . '%');
}
if ($criteria['courseLetter']) {
$select->where('c.courseLetter = ?', $criteria['courseLetter']);
}
if ($criteria['title']) {
$select->where('e.title LIKE ?', '%' . $criteria['title'] . '%');
}
if ($criteria['campus']) {
$select->where('e.campuses LIKE ?', '%' . $criteria['title'] . '%');
}
if ($criteria['ace']) {
$select->join(array('a' => 'creqCourseAceOutcomes'), 'g.courseGenerationId = a.generation', array());
}
if ($criteria['essentialStudies']) {
$select->join(array('es' => 'creqCourseEsDesignations'), 'c.courseCodeId = es.courseCode', array());
}
if ($criteria['integratedStudies']) {
$select->where('c.integratedStudies = ?', 'yes');
}
$records = $select->query()->fetchAll();
if (count($records) == 0) {
return null;
}
$generationIds = array();
foreach ($records as $record) {
$generationIds[] = $record['courseGenerationId'];
}
return self::find($generationIds);
}
static public function save($models) static public function save($models)
{ {
...@@ -1459,6 +1552,48 @@ class Courses_CourseModel extends Unl_Model ...@@ -1459,6 +1552,48 @@ class Courses_CourseModel extends Unl_Model
return $homeSubject; return $homeSubject;
} }
static public function getSubjects()
{
self::_loadSubjectList();
return self::$_subjectList;
}
static public function getSubjectNames()
{
self::_loadSubjectList();
return self::$_subjectNames;
}
static public function getSubjectsFull()
{
self::_loadSubjectList();
$subjects = array();
foreach (self::$_subjectList as $id => $code) {
$subjects[$code] = $code . ' - ' . self::$_subjectNames[$id];
}
return $subjects;
}
static public function getSubjectDepartmentCollegeHierarchy()
{
if (count(self::$_hierarchy) == 0) {
$db = Zend_Registry::get('db');
$select = new Zend_Db_Select($db);
$select->from(array('c' => 'creqColleges'), array('college' => 'description'));
$select->join(array('d' => 'creqDepartments'), 'c.collegeId = d.college', array('department' => 'name'));
$select->join(array('s' => 'creqSubjects'), 'd.departmentId = s.department', array('code' => 'name', 'subject' => 'description'));
$select->order(array('college', 'department', 'subject'));
$records = $select->query()->fetchAll();
$hierarchy = array();
foreach ($records as $record) {
$hierarchy[$record['college']][$record['department']][$record['code']] = $record['subject'];
}
self::$_hierarchy = $hierarchy;
}
return self::$_hierarchy;
}
public function getCourseNumber() public function getCourseNumber()
{ {
$homeNumber = ''; $homeNumber = '';
...@@ -1557,7 +1692,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -1557,7 +1692,7 @@ class Courses_CourseModel extends Unl_Model
if (!self::isSubjectValid($subject)) { if (!self::isSubjectValid($subject)) {
throw new Zend_Exception('The subject code ' . $subject . ' is invalid.'); throw new Zend_Exception('The subject code ' . $subject . ' is invalid.');
} }
$homeIndex = null; $homeIndex = null;
foreach ($this->_data['crosslistings'] as $index => $crosslisting) { foreach ($this->_data['crosslistings'] as $index => $crosslisting) {
if ($crosslisting['type'] == 'home listing') { if ($crosslisting['type'] == 'home listing') {
...@@ -1590,6 +1725,24 @@ class Courses_CourseModel extends Unl_Model ...@@ -1590,6 +1725,24 @@ class Courses_CourseModel extends Unl_Model
return $homeDepartment; return $homeDepartment;
} }
static public function getDepartments()
{
if (count(self::$_departments) == 0) {
$db = Zend_Registry::get('db');
$select = new Zend_Db_Select($db);
$select->from(array('d' => 'creqDepartments'));
$select->order('name');
$records = $select->query()->fetchAll();
$departments = array();
foreach ($records as $record) {
$departments[$record['departmentId']] = $record['name'];
}
self::$_departments = $departments;
}
return self::$_departments;
}
public function getCollege() public function getCollege()
{ {
$homeCollege = ''; $homeCollege = '';
...@@ -1601,13 +1754,14 @@ class Courses_CourseModel extends Unl_Model ...@@ -1601,13 +1754,14 @@ class Courses_CourseModel extends Unl_Model
} }
return $homeCollege; return $homeCollege;
} }
static public function getColleges() static public function getColleges()
{ {
if (count(self::$_colleges) == 0) { if (count(self::$_colleges) == 0) {
$db = Zend_Registry::get('db'); $db = Zend_Registry::get('db');
$select = new Zend_Db_Select($db); $select = new Zend_Db_Select($db);
$select->from(array('c' => 'creqColleges')); $select->from(array('c' => 'creqColleges'));
$select->order('name');
$records = $select->query()->fetchAll(); $records = $select->query()->fetchAll();
$colleges = array(); $colleges = array();
foreach ($records as $record) { foreach ($records as $record) {
...@@ -1618,6 +1772,23 @@ class Courses_CourseModel extends Unl_Model ...@@ -1618,6 +1772,23 @@ class Courses_CourseModel extends Unl_Model
return self::$_colleges; return self::$_colleges;
} }
static public function getCollegeNames()
{
if (count(self::$_collegeNames) == 0) {
$db = Zend_Registry::get('db');
$select = new Zend_Db_Select($db);
$select->from(array('c' => 'creqColleges'));
$select->order('description');
$records = $select->query()->fetchAll();
$colleges = array();
foreach ($records as $record) {
$colleges[$record['collegeId']] = $record['description'];
}
self::$_collegeNames = $colleges;
}
return self::$_collegeNames;
}
public function isIntegratedStudies() public function isIntegratedStudies()
{ {
$integratedStudies = false; $integratedStudies = false;
...@@ -1681,7 +1852,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -1681,7 +1852,7 @@ class Courses_CourseModel extends Unl_Model
if (!self::isSubjectValid($subject)) { if (!self::isSubjectValid($subject)) {
throw new Zend_Exception('The subject code ' . $subject . ' is invalid.'); throw new Zend_Exception('The subject code ' . $subject . ' is invalid.');
} }
$lowestId = min(array_keys($this->_data['crosslistings'])); $lowestId = min(array_keys($this->_data['crosslistings']));
if (!($lowestId < 0)) { if (!($lowestId < 0)) {
$lowestId = 0; $lowestId = 0;
...@@ -1702,7 +1873,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -1702,7 +1873,7 @@ class Courses_CourseModel extends Unl_Model
if (!self::isSubjectValid($subject)) { if (!self::isSubjectValid($subject)) {
throw new Zend_Exception('The subject code ' . $subject . ' is invalid.'); throw new Zend_Exception('The subject code ' . $subject . ' is invalid.');
} }
if (!$this->_data['crosslistings'][$id]) { if (!$this->_data['crosslistings'][$id]) {
throw new Exception('Attempt to edit a non-existant crosslisting'); throw new Exception('Attempt to edit a non-existant crosslisting');
} }
...@@ -1824,7 +1995,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -1824,7 +1995,7 @@ class Courses_CourseModel extends Unl_Model
); );
$this->_data['credits'][$lowestId] = $newCredit; $this->_data['credits'][$lowestId] = $newCredit;
} }
public function getCreditsText() public function getCreditsText()
...@@ -1928,7 +2099,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -1928,7 +2099,7 @@ class Courses_CourseModel extends Unl_Model
{ {
$activityMap = self::_getActivityMap(); $activityMap = self::_getActivityMap();
$activityMap = array_flip($activityMap); $activityMap = array_flip($activityMap);
$activityListing = array(); $activityListing = array();
foreach($this->_data['activities'] as $activity) { foreach($this->_data['activities'] as $activity) {
$newActivityListing = $activity['type']; $newActivityListing = $activity['type'];
...@@ -1945,7 +2116,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -1945,7 +2116,7 @@ class Courses_CourseModel extends Unl_Model
return $activities; return $activities;
} }
static protected function _getActivityMap() static protected function _getActivityMap()
{ {
if (!self::$_activityMap) { if (!self::$_activityMap) {
...@@ -1953,14 +2124,14 @@ class Courses_CourseModel extends Unl_Model ...@@ -1953,14 +2124,14 @@ class Courses_CourseModel extends Unl_Model
} }
return self::$_activityMap; return self::$_activityMap;
} }
static protected function _loadActivityMap() static protected function _loadActivityMap()
{ {
$db = Zend_Registry::get('db'); $db = Zend_Registry::get('db');
$select = new Zend_Db_Select($db); $select = new Zend_Db_Select($db);
$select->from('creqActivityTypes'); $select->from('creqActivityTypes');
$data = $select->query()->fetchAll(); $data = $select->query()->fetchAll();
foreach ($data as $row) { foreach ($data as $row) {
self::$_activityMap[$row['activityTypeId']] = $row['shortName']; self::$_activityMap[$row['activityTypeId']] = $row['shortName'];
} }
...@@ -1969,9 +2140,9 @@ class Courses_CourseModel extends Unl_Model ...@@ -1969,9 +2140,9 @@ class Courses_CourseModel extends Unl_Model
public function setActivity($type, $hours = null) public function setActivity($type, $hours = null)
{ {
if ($hours == '') { if ($hours == '') {
$hours = null; $hours = null;
} }
$found = false; $found = false;
foreach ($this->_data['activities'] as $id => $activity) { foreach ($this->_data['activities'] as $id => $activity) {
if ($activity['type'] == $type) { if ($activity['type'] == $type) {
...@@ -2034,7 +2205,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -2034,7 +2205,7 @@ class Courses_CourseModel extends Unl_Model
{ {
$this->_data['description'] = $description; $this->_data['description'] = $description;
} }
public function getAceOutcomes() public function getAceOutcomes()
{ {
if (!is_array($this->_data['aceOutcomes'])) { if (!is_array($this->_data['aceOutcomes'])) {
...@@ -2215,7 +2386,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -2215,7 +2386,7 @@ class Courses_CourseModel extends Unl_Model
{ {
$this->_data['request'] = $request->getId(); $this->_data['request'] = $request->getId();
} }
public function clearRequest() public function clearRequest()
{ {
$this->_data['request'] = null; $this->_data['request'] = null;
...@@ -2230,7 +2401,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -2230,7 +2401,7 @@ class Courses_CourseModel extends Unl_Model
{ {
$this->_data['type'] = $type; $this->_data['type'] = $type;
} }
public function getRemoved() public function getRemoved()
{ {
if ($this->_data['removed'] == 'yes') { if ($this->_data['removed'] == 'yes') {
...@@ -2238,7 +2409,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -2238,7 +2409,7 @@ class Courses_CourseModel extends Unl_Model
} }
return false; return false;
} }
public function setRemoved($removed = true) public function setRemoved($removed = true)
{ {
if ($removed) { if ($removed) {
...@@ -2248,6 +2419,11 @@ class Courses_CourseModel extends Unl_Model ...@@ -2248,6 +2419,11 @@ class Courses_CourseModel extends Unl_Model
} }
} }
public function getCourseId()
{
return $this->_data['course'];
}
public function isValid() public function isValid()
{ {
//TODO: add criteria for this being valid //TODO: add criteria for this being valid
...@@ -2256,35 +2432,38 @@ class Courses_CourseModel extends Unl_Model ...@@ -2256,35 +2432,38 @@ class Courses_CourseModel extends Unl_Model
} }
return true; return true;
} }
static $_subjectList; static $_subjectList;
static $_subjectNames;
static protected function _loadSubjectList() static protected function _loadSubjectList()
{ {
if (self::$_subjectList) { if (self::$_subjectList) {
return self::$_subjectList; return self::$_subjectList;
} }
$db = Zend_Registry::get('db'); $db = Zend_Registry::get('db');
$select = new Zend_Db_Select($db); $select = new Zend_Db_Select($db);
$select->from('creqSubjects', array('name')); $select->from('creqSubjects', array('subjectId', 'name', 'description'));
$select->order('name');
$records = $select->query()->fetchAll(); $records = $select->query()->fetchAll();
self::$_subjectList = array(); self::$_subjectList = array();
foreach ($records as $record) { foreach ($records as $record) {
self::$_subjectList[] = $record['name']; self::$_subjectList[$record['subjectId']] = $record['name'];
self::$_subjectNames[$record['subjectId']] = $record['description'];
} }
return self::$_subjectList; return self::$_subjectList;
} }
static public function isSubjectValid($subject) static public function isSubjectValid($subject)
{ {
self::_loadSubjectList(); self::_loadSubjectList();
return in_array($subject, self::$_subjectList); return in_array($subject, self::$_subjectList);
} }
static public function makeCurrent($courseModels) static public function makeCurrent($courseModels)
{ {
if (!Unl_Util::isArray($courseModels)) { if (!Unl_Util::isArray($courseModels)) {
...@@ -2295,19 +2474,19 @@ class Courses_CourseModel extends Unl_Model ...@@ -2295,19 +2474,19 @@ class Courses_CourseModel extends Unl_Model
$collection[] = $courseModels; $collection[] = $courseModels;
$courseModels = $collection; $courseModels = $collection;
} }
if (count($courseModels) == 0) { if (count($courseModels) == 0) {
return; return;
} }
$courseOfficialGenerations = array(); $courseOfficialGenerations = array();
foreach ($courseModels as $courseModel) { foreach ($courseModels as $courseModel) {
$courseId = $courseModel->_data['course']; $courseId = $courseModel->_data['course'];
$generationId = $courseModel->getId(); $generationId = $courseModel->getId();
$courseOfficialGenerations[$courseId] = $generationId; $courseOfficialGenerations[$courseId] = $generationId;
} }
$db = Zend_Registry::get('db'); $db = Zend_Registry::get('db');
...@@ -2330,7 +2509,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -2330,7 +2509,7 @@ class Courses_CourseModel extends Unl_Model
. 'WHERE a.courseId = b.courseId '; . 'WHERE a.courseId = b.courseId ';
$db->query($sql); $db->query($sql);
$db->query('DROP TABLE creqCoursesUpdate'); $db->query('DROP TABLE creqCoursesUpdate');
} }
...@@ -2355,13 +2534,13 @@ class Courses_CourseModel extends Unl_Model ...@@ -2355,13 +2534,13 @@ class Courses_CourseModel extends Unl_Model
return $areas; return $areas;
} }
/** /**
* This function will create new generations of any courses with references to $oldCode and replace * This function will create new generations of any courses with references to $oldCode and replace
* them with $newCode. All current official generations will have a new official generation created * them with $newCode. All current official generations will have a new official generation created
* the change, and all in-progress requests will have new generations created with the change. * the change, and all in-progress requests will have new generations created with the change.
* This method should only be called !!ONCE!! for such a change. * This method should only be called !!ONCE!! for such a change.
* I recommend against having this method publicly available, except when needed. * I recommend against having this method publicly available, except when needed.
* *
* @param string $oldCode * @param string $oldCode
* @param string $newCode * @param string $newCode
...@@ -2370,7 +2549,7 @@ class Courses_CourseModel extends Unl_Model ...@@ -2370,7 +2549,7 @@ class Courses_CourseModel extends Unl_Model
{ {
$db = Zend_Registry::get('db'); $db = Zend_Registry::get('db');
$generationIds = array(); $generationIds = array();
// Get current official generation with crosslistings // Get current official generation with crosslistings
$select = new Zend_Db_Select($db); $select = new Zend_Db_Select($db);
$select->from(array('c' => 'creqCourseCodes'), array()); $select->from(array('c' => 'creqCourseCodes'), array());
...@@ -2379,14 +2558,14 @@ class Courses_CourseModel extends Unl_Model ...@@ -2379,14 +2558,14 @@ class Courses_CourseModel extends Unl_Model
$select->join(array('s' => 'creqCourses'), 'g.course = s.courseId', array('currentGeneration')); $select->join(array('s' => 'creqCourses'), 'g.course = s.courseId', array('currentGeneration'));
$select->where('c.subject = ?', $oldCode); $select->where('c.subject = ?', $oldCode);
$select->where('g.courseGenerationId = s.currentGeneration'); $select->where('g.courseGenerationId = s.currentGeneration');
$data = $select->query()->fetchAll(); $data = $select->query()->fetchAll();
foreach ($data as $row) { foreach ($data as $row) {
$generationIds[] = $row['currentGeneration']; $generationIds[] = $row['currentGeneration'];
} }
// Get current official generation with prereq, notes, description, title // Get current official generation with prereq, notes, description, title
$select = new Zend_Db_Select($db); $select = new Zend_Db_Select($db);
$select->from(array('d' => 'creqCourseDetails'), array('prerequisite')); $select->from(array('d' => 'creqCourseDetails'), array('prerequisite'));
...@@ -2398,14 +2577,14 @@ class Courses_CourseModel extends Unl_Model ...@@ -2398,14 +2577,14 @@ class Courses_CourseModel extends Unl_Model
$db->quoteInto('d.description LIKE ? OR ', '%' . $oldCode . '%') . $db->quoteInto('d.description LIKE ? OR ', '%' . $oldCode . '%') .
$db->quoteInto('d.title LIKE ?', '%' . $oldCode . '%') $db->quoteInto('d.title LIKE ?', '%' . $oldCode . '%')
); );
$data = $select->query()->fetchAll(); $data = $select->query()->fetchAll();
foreach ($data as $row) { foreach ($data as $row) {
$generationIds[] = $row['currentGeneration']; $generationIds[] = $row['currentGeneration'];
} }
// Get current official generation with ace outcomes // Get current official generation with ace outcomes
$select = new Zend_Db_Select($db); $select = new Zend_Db_Select($db);
$select->from(array('d' => 'creqCourseAceOutcomes')); $select->from(array('d' => 'creqCourseAceOutcomes'));
...@@ -2416,8 +2595,8 @@ class Courses_CourseModel extends Unl_Model ...@@ -2416,8 +2595,8 @@ class Courses_CourseModel extends Unl_Model
$db->quoteInto('d.studentWork LIKE ? OR ', '%' . $oldCode . '%') . $db->quoteInto('d.studentWork LIKE ? OR ', '%' . $oldCode . '%') .
$db->quoteInto('d.assesmentPlan LIKE ?', '%' . $oldCode . '%') $db->quoteInto('d.assesmentPlan LIKE ?', '%' . $oldCode . '%')
); );
// Get current official generation with ace reinforcements // Get current official generation with ace reinforcements
$select = new Zend_Db_Select($db); $select = new Zend_Db_Select($db);
$select->from(array('d' => 'creqCourseAceReinforcements')); $select->from(array('d' => 'creqCourseAceReinforcements'));
...@@ -2426,29 +2605,29 @@ class Courses_CourseModel extends Unl_Model ...@@ -2426,29 +2605,29 @@ class Courses_CourseModel extends Unl_Model
$select->where( $select->where(
$db->quoteInto('d.description LIKE ?', '%' . $oldCode . '%') $db->quoteInto('d.description LIKE ?', '%' . $oldCode . '%')
); );
$data = $select->query()->fetchAll(); $data = $select->query()->fetchAll();
foreach ($data as $row) { foreach ($data as $row) {
$generationIds[] = $row['currentGeneration']; $generationIds[] = $row['currentGeneration'];
} }
// Get in-progress requests with crosslistings // Get in-progress requests with crosslistings
$select = new Zend_Db_Select($db); $select = new Zend_Db_Select($db);
$select->from(array('c' => 'creqCourseCodes'), array()); $select->from(array('c' => 'creqCourseCodes'), array());
$select->join(array('x' => 'creqCourseCrosslistings'), 'c.courseCodeId = x.courseCode', array('generation')); $select->join(array('x' => 'creqCourseCrosslistings'), 'c.courseCodeId = x.courseCode', array('generation'));
$select->join(array('g' => 'creqCourseGenerations'), 'x.generation = g.courseGenerationId', array('course', 'type')); $select->join(array('g' => 'creqCourseGenerations'), 'x.generation = g.courseGenerationId', array('course', 'type'));
$select->where('c.subject = ?', $oldCode); $select->where('c.subject = ?', $oldCode);
$select->where('g.courseGenerationId NOT IN (SELECT parent FROM creqCourseGenerations WHERE parent IS NOT NULL)'); $select->where('g.courseGenerationId NOT IN (SELECT parent FROM creqCourseGenerations WHERE parent IS NOT NULL)');
$data = $select->query()->fetchAll(); $data = $select->query()->fetchAll();
foreach ($data as $row) { foreach ($data as $row) {
$generationIds[] = $row['generation']; $generationIds[] = $row['generation'];
} }
// Get in-progress requests with prereq, notes, description, title // Get in-progress requests with prereq, notes, description, title
$select = new Zend_Db_Select($db); $select = new Zend_Db_Select($db);
$select->from(array('d' => 'creqCourseDetails'), array('prerequisite')); $select->from(array('d' => 'creqCourseDetails'), array('prerequisite'));
...@@ -2460,14 +2639,14 @@ class Courses_CourseModel extends Unl_Model ...@@ -2460,14 +2639,14 @@ class Courses_CourseModel extends Unl_Model
$db->quoteInto('d.title LIKE ?', '%' . $oldCode . '%') $db->quoteInto('d.title LIKE ?', '%' . $oldCode . '%')
); );
$select->where('g.courseGenerationId NOT IN (SELECT parent FROM creqCourseGenerations WHERE parent IS NOT NULL)'); $select->where('g.courseGenerationId NOT IN (SELECT parent FROM creqCourseGenerations WHERE parent IS NOT NULL)');
$data = $select->query()->fetchAll(); $data = $select->query()->fetchAll();
foreach ($data as $row) { foreach ($data as $row) {
$generationIds[] = $row['generation']; $generationIds[] = $row['generation'];
} }
// Get in-progress requests with ace outcomes // Get in-progress requests with ace outcomes
$select = new Zend_Db_Select($db); $select = new Zend_Db_Select($db);
$select->from(array('d' => 'creqCourseAceOutcomes')); $select->from(array('d' => 'creqCourseAceOutcomes'));
...@@ -2478,8 +2657,8 @@ class Courses_CourseModel extends Unl_Model ...@@ -2478,8 +2657,8 @@ class Courses_CourseModel extends Unl_Model
$db->quoteInto('d.assesmentPlan LIKE ?', '%' . $oldCode . '%') $db->quoteInto('d.assesmentPlan LIKE ?', '%' . $oldCode . '%')
); );
$select->where('g.courseGenerationId NOT IN (SELECT parent FROM creqCourseGenerations WHERE parent IS NOT NULL)'); $select->where('g.courseGenerationId NOT IN (SELECT parent FROM creqCourseGenerations WHERE parent IS NOT NULL)');
// Get in-progress requests with ace reinforcements // Get in-progress requests with ace reinforcements
$select = new Zend_Db_Select($db); $select = new Zend_Db_Select($db);
$select->from(array('d' => 'creqCourseAceReinforcements')); $select->from(array('d' => 'creqCourseAceReinforcements'));
...@@ -2488,19 +2667,19 @@ class Courses_CourseModel extends Unl_Model ...@@ -2488,19 +2667,19 @@ class Courses_CourseModel extends Unl_Model
$db->quoteInto('d.description LIKE ?', '%' . $oldCode . '%') $db->quoteInto('d.description LIKE ?', '%' . $oldCode . '%')
); );
$select->where('g.courseGenerationId NOT IN (SELECT parent FROM creqCourseGenerations WHERE parent IS NOT NULL)'); $select->where('g.courseGenerationId NOT IN (SELECT parent FROM creqCourseGenerations WHERE parent IS NOT NULL)');
$data = $select->query()->fetchAll(); $data = $select->query()->fetchAll();
foreach ($data as $row) { foreach ($data as $row) {
$generationIds[] = $row['currentGeneration']; $generationIds[] = $row['currentGeneration'];
} }
sort($generationIds); sort($generationIds);
$generationIds = array_unique($generationIds); $generationIds = array_unique($generationIds);
$officialGenerations = Courses_CourseModel::find($generationIds); $officialGenerations = Courses_CourseModel::find($generationIds);
$parentMap = array(); $parentMap = array();
foreach ($officialGenerations as $course) { foreach ($officialGenerations as $course) {
$newCourse = clone $course; $newCourse = clone $course;
...@@ -2531,16 +2710,16 @@ class Courses_CourseModel extends Unl_Model ...@@ -2531,16 +2710,16 @@ class Courses_CourseModel extends Unl_Model
strtr($aceReinforcement['description'], array($oldCode => $newCode)) strtr($aceReinforcement['description'], array($oldCode => $newCode))
); );
} }
$newCourse->setEffectiveSemester('20092'); $newCourse->setEffectiveSemester('20092');
if ($newCourse->getType() == 'official') { if ($newCourse->getType() == 'official') {
$newCourse->clearRequest(); $newCourse->clearRequest();
} }
Courses_CourseModel::save($newCourse); Courses_CourseModel::save($newCourse);
$parentMap[$course->getId()] = $newCourse->getId(); $parentMap[$course->getId()] = $newCourse->getId();
} }
foreach ($parentMap as $oldId => $newId) { foreach ($parentMap as $oldId => $newId) {
$sql = "UPDATE creqCourseGenerations SET parent = $newId WHERE parent = $oldId AND courseGenerationId != $newId"; $sql = "UPDATE creqCourseGenerations SET parent = $newId WHERE parent = $oldId AND courseGenerationId != $newId";
$db->query($sql); $db->query($sql);
......
<?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/iace/reports/weekly.css', 'all'); ?>
<?php $this->layout()->tagline = ''; ?>
<?php $this->layout()->hideMenu = true; ?>
<h2>
ACE Certified Courses<br />
Interim ACE Committee<br />
</h2>
<table>
<tr>
<th><a href="<?php echo $this->url(array_merge($this->criteria, array('sort' => 'slo'))); ?>">SLO</a></th>
<th><a href="<?php echo $this->url(array_merge($this->criteria, array('sort' => 'college'))); ?>">College</a></th>
<th><a href="<?php echo $this->url(array_merge($this->criteria, array('sort' => 'courseCode'))); ?>">Course</a></th>
<th><a href="<?php echo $this->url(array_merge($this->criteria, array('sort' => 'title'))); ?>">Title</a></th>
</tr>
<?php foreach ($this->data as $record) { ?>
<tr <?php if ($rowCount++ % 2) { ?>class="even"<?php } ?>>
<td>
<a href="<?php echo $this->baseUrl(); ?>/courses/public-view/view/id/<?php echo $record->getCourseId(); ?>">
<?php echo $record->getSlo(); ?>
</a>
</td>
<td>
<a href="<?php echo $this->baseUrl(); ?>/courses/public-view/view/id/<?php echo $record->getCourseId(); ?>">
<?php echo $record->getCollege(); ?>
</a>
</td>
<td>
<a href="<?php echo $this->baseUrl(); ?>/courses/public-view/view/id/<?php echo $record->getCourseId(); ?>">
<?php echo $record->getCourseCode(); ?>
</a>
</td>
<td>
<a href="<?php echo $this->baseUrl(); ?>/courses/public-view/view/id/<?php echo $record->getCourseId(); ?>">
<?php echo $record->getTitle(); ?>
</a>
</td>
</tr>
<? } ?>
</table>
\ No newline at end of file
<?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/courses/public-view/search.css', 'all'); ?>
<form method="get" action="<?php echo $this->baseUrl(); ?>/courses/public-view/results">
<label class="row">
<span class="label">College</span>
<?php echo $this->formSelect('college', null, null, array(0 => '--Select a College--') + $this->colleges); ?>
</label>
<label class="row">
<span class="label">Department</span>
<?php echo $this->formSelect('department', null, null, array(0 => '--Select a Department--') + $this->departments); ?>
</label>
<label class="row">
<span class="label">Subject Area</span>
<?php echo $this->formSelect('subject', null, null, array('' => '--Select a Subject--') + $this->subjects); ?>
</label>
<label class="row">
<span class="label">Course #</span>
<?php echo $this->formText('courseNumber'); ?>
</label>
<label class="row">
<span class="label">&nbsp;</span>
Specific number (i.e. 101) or Partial number (i.e. 1 for 100 level courses)
</label>
<label class="row">
<span class="label">Course Letter</span>
<?php echo $this->formText('courseLetter'); ?>
</label>
<label class="row">
<span class="label">Course Title Keyword</span>
<?php echo $this->formText('courseTitle'); ?>
</label>
<label class="row">
<span class="label">Activity Type</span>
<?php echo $this->formSelect('activity', null, null, array(-1 => '--Select Activity--',
1 => 'Lec - Lecture',
2 => 'Lab - Lab',
3 => 'Quz - Quiz',
4 => 'Rct - Recitation',
5 => 'Stu - Studio',
6 => 'Fld - Field',
7 => 'Ind - Independent Study',
8 => 'Psi - Personalized System of Instruction')); ?>
</label>
<div class="row">
<span class="label">Display Only</span>
<label><?php echo $this->formCheckbox('ace'); ?>ACE</label>
<label><?php echo $this->formCheckbox('essentialStudies'); ?>ES</label>
<label><?php echo $this->formCheckbox('integratedStudies'); ?>IS</label>
<label><?php echo $this->formCheckbox('specialFee', null, array('disabled' => 'disabled')); ?>Special Fee</label>
</div>
<label class="row">
<span class="label">Campus</span>
<?php echo $this->formSelect('campus', null, null, array('' => '--Select a Campus--', 'UNL' => 'UNL', 'UNO' => 'UNO', 'UNK' => 'UNK')); ?>
</label>
<?php echo $this->formSubmit('submit', 'Search'); ?>
</form>
\ No newline at end of file
<?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/courses/view.css', 'all'); ?>
<?php $this->layout()->hideMenu = true; ?>
<div class="bulletinEntry">
<?php echo $this->bulletinEntry($this->course); ?>
</div>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment