diff --git a/ProgramInformationV2.Data/DataHelpers/CourseImportHelper.cs b/ProgramInformationV2.Data/DataHelpers/CourseImportHelper.cs
index cdeee9b..a775090 100644
--- a/ProgramInformationV2.Data/DataHelpers/CourseImportHelper.cs
+++ b/ProgramInformationV2.Data/DataHelpers/CourseImportHelper.cs
@@ -16,7 +16,7 @@ public class CourseImportHelper(ProgramRepository programRepository) {
public async Task> GetLog(string sourceCode) {
var sourceId = _programRepository.Read(c => c.Sources.FirstOrDefault(s => s.Code == sourceCode))?.Id ?? 0;
- return await _programRepository.ReadAsync(pr => pr.CourseImportEntries.Where(c => c.SourceId == sourceId).OrderByDescending(c => c.LastUpdated));
+ return await _programRepository.ReadAsync(pr => pr.CourseImportEntries.Where(c => c.SourceId == sourceId).OrderBy(c => c.Rubric).ThenBy(c => c.CourseNumber));
}
public async Task LoadComplete(string rubric, string courseNumber, string urlPattern, bool importTitleAndDescriptionOnly, bool includeSections, string sourceCode, string log) {
diff --git a/ProgramInformationV2.Function/GetTags.cs b/ProgramInformationV2.Function/GetTags.cs
index 6986780..676d721 100644
--- a/ProgramInformationV2.Function/GetTags.cs
+++ b/ProgramInformationV2.Function/GetTags.cs
@@ -1,4 +1,3 @@
-using System.Net;
using Microsoft.AspNetCore.Http;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
@@ -8,22 +7,13 @@
using ProgramInformationV2.Data.DataHelpers;
using ProgramInformationV2.Function.Helper;
using ProgramInformationV2.Search.JsonThinModels;
+using System.Net;
namespace ProgramInformationV2.Function {
- public class GetTags(FilterHelper filterHelper, ILogger logger) {
+ public class GetTags(FilterHelper filterHelper, ILogger logger) {
private readonly FilterHelper _filterHelper = filterHelper;
- private readonly ILogger _logger = logger;
-
- [Function("Check")]
- [OpenApiOperation(operationId: "Check", tags: "Check Information", Description = "Get check information.")]
- [OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, contentType: "text/plain", bodyType: typeof(List), Description = "Standard response")]
- public async Task Check([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequestData req) {
- _logger.LogInformation("Called Check.");
- var response = req.CreateResponse(HttpStatusCode.OK);
- await response.WriteAsJsonAsync("Check");
- return response;
- }
+ private readonly ILogger _logger = logger;
[Function("Tags")]
[OpenApiOperation(operationId: "Tags", tags: "Get Tag Information", Description = "Get tag information.")]
diff --git a/ProgramInformationV2.Function/LoadCourseFromSchedule.cs b/ProgramInformationV2.Function/LoadCourseFromSchedule.cs
index 1a94529..aa061ec 100644
--- a/ProgramInformationV2.Function/LoadCourseFromSchedule.cs
+++ b/ProgramInformationV2.Function/LoadCourseFromSchedule.cs
@@ -1,10 +1,11 @@
-using System.Net;
using Microsoft.AspNetCore.Http;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
+using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes;
using Microsoft.Extensions.Logging;
using ProgramInformationV2.Data.CourseImport;
using ProgramInformationV2.Data.DataHelpers;
+using System.Net;
namespace ProgramInformationV2.Function;
@@ -20,7 +21,10 @@ public LoadCourseFromSchedule(CourseImportManager courseImportManager, CourseImp
}
[Function("LoadCourseFromSchedule")]
+ [OpenApiOperation(operationId: "LoadCourseFromSchedule", tags: "Load Course From Schedule", Description = "Load Course that was scheduled using the UI. This will only do one at a time because of the load it causes on the courses.illinois.edu/cisapp process. Recommend only running this once every 10 seconds.")]
+ [OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, contentType: "text/plain", bodyType: typeof(string), Description = "Response describing what was done")]
public async Task ScheduledLoad([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequestData req) {
+ _logger.LogInformation("Called LoadCourseFromSchedule.");
var item = await _courseImportHelper.GetLatestPending();
var response = req.CreateResponse(HttpStatusCode.OK);
if (item == null) {
diff --git a/ProgramInformationV2.Function/StatusFunction.cs b/ProgramInformationV2.Function/StatusFunction.cs
new file mode 100644
index 0000000..475a848
--- /dev/null
+++ b/ProgramInformationV2.Function/StatusFunction.cs
@@ -0,0 +1,22 @@
+using Microsoft.AspNetCore.Http;
+using Microsoft.Azure.Functions.Worker;
+using Microsoft.Azure.Functions.Worker.Http;
+using Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Attributes;
+using Microsoft.Extensions.Logging;
+using System.Net;
+
+namespace ProgramInformationV2.Function;
+
+public class StatusFunction(ILogger logger) {
+ private readonly ILogger _logger = logger;
+
+ [Function("Check")]
+ [OpenApiOperation(operationId: "Check", tags: "Health Check", Description = "Get health check information.")]
+ [OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, contentType: "text/plain", bodyType: typeof(string), Description = "Standard response")]
+ public async Task Check([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequestData req) {
+ _logger.LogInformation("Called Check.");
+ var response = req.CreateResponse(HttpStatusCode.OK);
+ await response.WriteAsJsonAsync("Check");
+ return response;
+ }
+}
\ No newline at end of file
diff --git a/ProgramInformationV2/Components/Pages/Course/Import.razor b/ProgramInformationV2/Components/Pages/Course/Import.razor
index cb35980..1810279 100644
--- a/ProgramInformationV2/Components/Pages/Course/Import.razor
+++ b/ProgramInformationV2/Components/Pages/Course/Import.razor
@@ -11,7 +11,7 @@
This will run / schedule a course import from the Electronic Data Warehouse. You can do one of two options:
- - By Rubric: this will load all of a specific rubric into your source. This will always overwrite your existing course information. This is asynchronous and make take a while to run; you can view the logs to see the progress of the import.
+ - By Rubric: this will load all of a specific rubric into your source. This will always overwrite your existing course information. This is asynchronous and make take a while to run; you can view the logs to see the progress of the import. If you have many rubrics, you can include them in a comma-delimited list and it will load all of them.
- By Rubric and Course Number: this will load a specific course into your source. This will run immediately, and you have the option to overwrite the source information or just load new sections.
We look back five years in the past to get data from the current year, and forward one year (so if it is any date in 2026, then we go back to Spring Semester 2021, and forward to Fall Semester 2027).