load(); if ($resource && $resource->getType() == 'resource' && $resource->canEdit()) { $course = $resource->course; if ($resource->delete()) { $Dippler->add_system_message(_("Resource deleted.")); forward("course/resources/{$course}"); } else { $Dippler->add_system_message(_("Resource could not be deleted."), "error"); forward($resource->getURL()); } } forward("courses/my"); ?>