File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
DigitalLearningSolutions.Web/Controllers/TrackingSystem/Delegates Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -275,10 +275,8 @@ public IActionResult ConfirmRemoveFromCourse(
275275 )
276276 {
277277 var progress = progressService . GetDetailedCourseProgress ( progressId ) ;
278- if ( progress == null )
279- {
280- return StatusCode ( ( int ) HttpStatusCode . Gone ) ;
281- }
278+ if ( ! courseService . DelegateHasCurrentProgress ( progressId ) || progress == null )
279+ return RedirectToAction ( "StatusCode" , "LearningSolutions" , new { code = 410 } ) ;
282280
283281 var model = new RemoveFromCourseViewModel (
284282 progress ,
@@ -305,9 +303,7 @@ RemoveFromCourseViewModel model
305303
306304 var progress = progressService . GetDetailedCourseProgress ( progressId ) ;
307305 if ( ! courseService . DelegateHasCurrentProgress ( progressId ) || progress == null )
308- {
309- return new NotFoundResult ( ) ;
310- }
306+ return RedirectToAction ( "StatusCode" , "LearningSolutions" , new { code = 410 } ) ;
311307
312308 courseService . RemoveDelegateFromCourse (
313309 progress . DelegateId ,
You can’t perform that action at this time.
0 commit comments