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

Add subject code search to course xml dump.

parent ba80229a
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,14 @@ class Courses_PublicViewController extends App_Controller_Action { ...@@ -15,7 +15,14 @@ class Courses_PublicViewController extends App_Controller_Action {
public function allCoursesAction() public function allCoursesAction()
{ {
$this->_disableLayoutAndView(); $this->_disableLayoutAndView();
$subject = $this->_getParam('subject');
if ($subject) {
$courses = Courses_CourseModel::findWithCriteria(array('subject' => $subject));
} else {
$courses = Courses_CourseModel::findAllActive(); $courses = Courses_CourseModel::findAllActive();
}
$courses->orderBy('getCourseCode'); $courses->orderBy('getCourseCode');
$dom = new DOMDocument('1.0', 'UTF-8'); $dom = new DOMDocument('1.0', 'UTF-8');
$dom->formatOutput = true; $dom->formatOutput = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment