add_system_message(_("At least one of the parameters is empty."), 'error'); forward("course/outcomes/{$course}/outcome/add"); } else if (empty($course)) { $Dippler->add_system_message(_("Course not found"), 'error'); forward("course/outcomes/{$course}/outcome/add"); } else { $lo = new LearningOutcome(); $lo->title = $title; $lo->course = $course; if (is_array($categories) && sizeof($categories)>0) { foreach ($categories as $cat_id) { $lo->categories[$cat_id] = new Category($cat_id); } } $lo_id = $lo->create(); if (!$lo_id) { $Dippler->add_system_message(_("Learning Outcome could not be created."), 'error'); forward("course/outcomes/{$course}/outcome/add"); } $Dippler->add_system_message(_("Learning Outcome added.")); // Clear cache $Dippler->clearSessionInputValues(); forward("course/outcomes/{$course}"); } forward('courses/my'); ?>