add_system_message(_("At least one of the parameters is empty."), 'error'); forward("course/outcomes/{$course}/outcome/{$id}/edit"); } else if (empty($course)) { $Dippler->add_system_message(_("Course not found"), 'error'); forward('courses/my'); } else if (empty($id)) { $Dippler->add_system_message(_("Learning Outcome not found"), 'error'); forward("course/outcomes/{$course}"); } else { $lo = new LearningOutcome($id); $lo->load(); $lo->title = $title; $lo->course = $course; $new_cats = array(); $data_categories = $Dippler->listCourseCategoriesFull($course); foreach ($categories as $cat_id) { $new_cats[$cat_id] = $data_categories[$cat_id]; //$new_cats[$cat_id] = new Category($cat_id); } $lo->categories = $new_cats; $lo_id = $lo->save(); if (!$lo_id) { $Dippler->add_system_message(_("Learning Outcome could not be saved."), 'error'); forward("course/outcomes/{$course}/outcome/{$id}/edit"); } $Dippler->add_system_message(_("Learning Outcome saved.")); // Clear cache $Dippler->clearSessionInputValues(); forward("course/outcomes/{$course}"); } forward('courses/my'); ?>