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