Skip to content

Commit 73fc868

Browse files
authored
Update ScheduleController.cs
1 parent 0f27a89 commit 73fc868

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Gordon360/Controllers/ScheduleController.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Gordon360.Authorization;
1+
using Gordon360.Authorization;
22
using Gordon360.Enums;
33
using Gordon360.Extensions.System;
44
using Gordon360.Models.ViewModels;
@@ -40,9 +40,9 @@ public async Task<ActionResult<CoursesBySessionViewModel>> GetAllCourses(string
4040
}
4141

4242
/// <summary>
43-
/// Gets all term objects for a useronly includes published schedules
43+
/// Gets all term-based course schedules for a user, filtered to only include officially published terms.
4444
/// </summary>
45-
/// <returns>A IEnumerable of term objects with their schedules</returns>
45+
/// <returns>A list of published term schedule objects</returns>
4646
[HttpGet]
4747
[Route("{username}/allcourses-by-term")]
4848
[StateYourBusiness(operation = Operation.READ_ONE, resource = Resource.STUDENT_SCHEDULE)]
@@ -61,9 +61,8 @@ public async Task<ActionResult<IEnumerable<CoursesByTermViewModel>>> GetAllCours
6161
result = await scheduleService.GetAllInstructorCoursesByTermAsync(username);
6262
}
6363

64-
// Filter only published terms
6564
var publishedResult = result
66-
.Where(r => r.ShowOnWeb?.Equals("Y", StringComparison.OrdinalIgnoreCase) == true)
65+
.Where(r => string.Equals(r.ShowOnWeb, "B", StringComparison.OrdinalIgnoreCase))
6766
.ToList();
6867
return Ok(publishedResult);
6968
}

0 commit comments

Comments
 (0)