add_system_message(_("At least one of the parameters is empty."), 'error'); if ($parent && $parent != 0) { forward("course/resources/{$course}/folder/{$parent}/folder/add"); } else { forward("course/resources/{$course}/folder/add"); } } else if (empty($course)) { $Dippler->add_system_message(_("Course not found"), 'error'); forward('courses/my'); } else { $folder = new ResourceFolder(); $folder->title = $title; $folder->parent = $parent; $folder->course = $course; $folder_id = $folder->create(); if (!$folder_id) { $Dippler->add_system_message(_("Folder could not be created."), 'error'); if ($parent && $parent != 0) { forward("course/resources/{$course}/folder/{$parent}/folder/add"); } else { forward("course/resources/{$course}/folder/add"); } } $Dippler->add_system_message(_("Folder added.")); // Clear cache $Dippler->clearSessionInputValues(); forward($folder->getURL()); } forward('courses/my'); ?>