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 {
public function allCoursesAction()
{
$this->_disableLayoutAndView();
$courses = Courses_CourseModel::findAllActive();
$subject = $this->_getParam('subject');
if ($subject) {
$courses = Courses_CourseModel::findWithCriteria(array('subject' => $subject));
} else {
$courses = Courses_CourseModel::findAllActive();
}
$courses->orderBy('getCourseCode');
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->formatOutput = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment