add_system_message(_("At least one of the parameters is empty."), 'error'); forward("course/resources/{$course}/folder/{$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(_("Folder not found"), 'error'); forward("course/resources/{$course}"); } else { $folder = new ResourceFolder($id); $folder->load(); $folder->title = $title; $folder->parent = $parent; if (!$folder->save()) { $Dippler->add_system_message(_("Folder could not be saved."), 'error'); forward("course/resources/{$course}/folder/{$id}/edit"); } $Dippler->add_system_message(_("Folder saved.")); // Clear cache $Dippler->clearSessionInputValues(); forward($folder->getURL()); } forward('courses/my'); ?>