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

Removed courses actually set the removed field to yes.

parent 360f8f52
Branches
Tags
No related merge requests found
......@@ -89,6 +89,10 @@ class Courses_NewController extends App_Controller_Action
$course->setCourseCode($in->subject, $in->courseNumber, $in->courseLetter);
}
if (in_array($request->getType(), array('RemoveCourse'))) {
$course->setRemoved();
}
$session = new Zend_Session_Namespace('Edit Request');
$session->parentCourse = $parentCourse;
$session->course = $course;
......
......@@ -2153,6 +2153,23 @@ class Courses_CourseModel extends Unl_Model
$this->_data['type'] = $type;
}
public function getRemoved()
{
if ($this->_data['removed'] == 'yes') {
return true;
}
return false;
}
public function setRemoved($removed = true)
{
if ($removed) {
$this->_data['removed'] = 'yes';
} else {
$this->_data['removed'] = 'no';
}
}
public function isValid()
{
//TODO: add criteria for this being valid
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment