diff --git a/application/modules/courses/models/CourseModel.php b/application/modules/courses/models/CourseModel.php index e21f28ba501f1f243d36c7675279d8ec0921f47e..fba2a31c75f1eab233e4c25fe82dddc1f4feaca9 100644 --- a/application/modules/courses/models/CourseModel.php +++ b/application/modules/courses/models/CourseModel.php @@ -265,6 +265,7 @@ class Courses_CourseModel extends Unl_Model $select = new Zend_Db_Select($db); $select->from(array('g' => 'creqCourseGenerations'), array('request')); $select->join(array('p' => 'creqCourseGenerations'), 'g.parent = p.courseGenerationId', array('courseGenerationId')); + $select->where('p.request != g.request OR p.request IS NULL'); $select->where('p.type = ?', 'official'); if (Unl_Util::isArray($request)) { $select->where('g.request IN(?)', $requestId);