mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
extracted a lot of canvas interfaces
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
// namespace Management.Test;
|
||||
|
||||
// public class CanvasServiceTests
|
||||
// public class ICanvasServiceTests
|
||||
// {
|
||||
// [Test]
|
||||
// public async Task CanReadCanvasSemesters()
|
||||
@@ -22,7 +22,7 @@
|
||||
// };
|
||||
// Mock<IWebRequestor> mockRequestor = getTermsMock(expectedTerms);
|
||||
|
||||
// var service = new CanvasService(mockRequestor.Object);
|
||||
// var service = new ICanvasService(mockRequestor.Object);
|
||||
// var canvasTerms = await service.GetTerms();
|
||||
|
||||
// canvasTerms.Should().BeEquivalentTo(expectedTerms);
|
||||
@@ -58,7 +58,7 @@
|
||||
// ),
|
||||
// };
|
||||
// Mock<IWebRequestor> mockRequestor = getTermsMock(expectedTerms);
|
||||
// var service = new CanvasService(mockRequestor.Object);
|
||||
// var service = new ICanvasService(mockRequestor.Object);
|
||||
|
||||
// var queryDate = new DateTime(2022, 6, 1);
|
||||
// var canvasTerms = await service.GetCurrentTermsFor(queryDate);
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
<PackageReference Include="dotenv.net" Version="3.1.2" />
|
||||
<PackageReference Include="Markdig" Version="0.31.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.3" />
|
||||
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.7.0" />
|
||||
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0" />
|
||||
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0" />
|
||||
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.7.0" />
|
||||
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.8.1" />
|
||||
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.8.1" />
|
||||
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.8.1" />
|
||||
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.8.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@using CanvasModel.Assignments
|
||||
|
||||
@inject CoursePlanner planner
|
||||
@inject CanvasService canvas
|
||||
@inject ICanvasService canvas
|
||||
@inject NavigationManager Navigation
|
||||
@inject AssignmentEditorContext assignmentContext
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
@using Management.Web.Shared.Components
|
||||
|
||||
@inject FileStorageManager fileStorageManager
|
||||
@inject CanvasService canvas
|
||||
@inject ICanvasService canvas
|
||||
@inject CoursePlanner planner
|
||||
@inject AssignmentEditorContext assignmentContext
|
||||
@inject ILogger<AssignmentFormPage> logger
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@page "/test"
|
||||
@rendermode InteractiveServer
|
||||
|
||||
@inject CanvasService canvas
|
||||
@inject ICanvasService canvas
|
||||
@inject CoursePlanner planner
|
||||
@inject FileStorageManager fileStorageManager
|
||||
@inject NavigationManager Navigation
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@using Management.Web.Shared.Components
|
||||
@inject CanvasService canvas
|
||||
@inject ICanvasService canvas
|
||||
@inject CoursePlanner planner
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
@inject FileStorageManager fileStorageManager
|
||||
@inject CanvasService canvas
|
||||
@inject ICanvasService canvas
|
||||
@inject CoursePlanner planner
|
||||
@inject NavigationManager navigtion
|
||||
@inject IConfiguration config
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@using Management.Web.Pages.Course.Module
|
||||
@using Management.Web.Pages.Course.CourseCalendar
|
||||
|
||||
@inject CanvasService canvas
|
||||
@inject ICanvasService canvas
|
||||
@inject CoursePlanner planner
|
||||
|
||||
@code
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@using Management.Web.Shared.Components
|
||||
@inject CanvasService canvas
|
||||
@inject ICanvasService canvas
|
||||
@inject CoursePlanner planner
|
||||
|
||||
@code
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@inject CoursePlanner planner
|
||||
@inject CanvasService canvas
|
||||
@inject ICanvasService canvas
|
||||
|
||||
@code {
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@using CanvasModel.Pages
|
||||
|
||||
@inject CoursePlanner planner
|
||||
@inject CanvasService canvas
|
||||
@inject ICanvasService canvas
|
||||
@inject NavigationManager Navigation
|
||||
@inject PageEditorContext pageContext
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
@using Management.Web.Shared.Components
|
||||
|
||||
@inject FileStorageManager fileStorageManager
|
||||
@inject CanvasService canvas
|
||||
@inject ICanvasService canvas
|
||||
@inject CoursePlanner planner
|
||||
@inject PageEditorContext pageContext
|
||||
@inject ILogger<CoursePageFormPage> logger
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
@using Management.Web.Pages.Course.Module.ModuleItems
|
||||
@using Management.Web.Shared.Components
|
||||
|
||||
@inject CanvasService canvas
|
||||
@inject ICanvasService canvas
|
||||
@inject CoursePlanner planner
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
@using Management.Web.Pages.Course.Module.ModuleItems
|
||||
|
||||
@inject FileStorageManager fileStorageManager
|
||||
@inject CanvasService canvas
|
||||
@inject ICanvasService canvas
|
||||
@inject CoursePlanner planner
|
||||
@inject QuizEditorContext quizContext
|
||||
@inject MyLogger<QuizFormPage> logger
|
||||
|
||||
@@ -73,12 +73,12 @@ builder.Services.AddScoped(typeof(MyLogger<>));
|
||||
|
||||
builder.Services.AddScoped<IWebRequestor, WebRequestor>();
|
||||
builder.Services.AddScoped<CanvasServiceUtils>();
|
||||
builder.Services.AddScoped<CanvasAssignmentService>();
|
||||
builder.Services.AddScoped<CanvasCoursePageService>();
|
||||
builder.Services.AddScoped<CanvasAssignmentGroupService>();
|
||||
builder.Services.AddScoped<CanvasQuizService>();
|
||||
builder.Services.AddScoped<CanvasModuleService>();
|
||||
builder.Services.AddScoped<CanvasService, CanvasService>();
|
||||
builder.Services.AddScoped<ICanvasAssignmentService, CanvasAssignmentService>();
|
||||
builder.Services.AddScoped<ICanvasCoursePageService, CanvasCoursePageService>();
|
||||
builder.Services.AddScoped<ICanvasAssignmentGroupService, CanvasAssignmentGroupService>();
|
||||
builder.Services.AddScoped<ICanvasQuizService, CanvasQuizService>();
|
||||
builder.Services.AddScoped<ICanvasModuleService, CanvasModuleService>();
|
||||
builder.Services.AddScoped<ICanvasService, CanvasService>();
|
||||
|
||||
builder.Services.AddScoped<MarkdownCourseSaver>();
|
||||
builder.Services.AddScoped<CourseMarkdownLoader>();
|
||||
@@ -122,7 +122,6 @@ app.UseRouting();
|
||||
app.UseResponseCompression();
|
||||
|
||||
app.MapBlazorHub();
|
||||
app.MapHub<SignalRHub>("/SignalRHub");
|
||||
app.MapFallbackToPage("/_Host");
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
@using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage
|
||||
@using LocalModels
|
||||
|
||||
@inject CanvasService canvas
|
||||
@inject ICanvasService canvas
|
||||
@inject FileStorageManager fileStorageManager
|
||||
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ public class AssignmentEditorContext
|
||||
{
|
||||
public event Action? StateHasChanged;
|
||||
|
||||
public CanvasService canvas { get; }
|
||||
public ICanvasService canvas { get; }
|
||||
private CoursePlanner planner { get; }
|
||||
|
||||
public AssignmentEditorContext(
|
||||
MyLogger<AssignmentEditorContext> logger,
|
||||
CanvasService canvas,
|
||||
ICanvasService canvas,
|
||||
CoursePlanner planner
|
||||
)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ public class CoursePlanner
|
||||
{
|
||||
private readonly MyLogger<CoursePlanner> logger;
|
||||
private readonly FileStorageManager fileStorageManager;
|
||||
private readonly CanvasService canvas;
|
||||
private readonly ICanvasService canvas;
|
||||
private readonly ILogger<CoursePlanner> _otherLogger;
|
||||
|
||||
public bool LoadingCanvasData { get; internal set; } = false;
|
||||
@@ -24,7 +24,7 @@ public class CoursePlanner
|
||||
public CoursePlanner(
|
||||
MyLogger<CoursePlanner> logger,
|
||||
FileStorageManager fileStorageManager,
|
||||
CanvasService canvas,
|
||||
ICanvasService canvas,
|
||||
ILogger<CoursePlanner> otherLogger
|
||||
)
|
||||
{
|
||||
|
||||
@@ -6,12 +6,12 @@ using Management.Services.Canvas;
|
||||
|
||||
public class PageEditorContext(
|
||||
CoursePlanner planner,
|
||||
CanvasService canvas,
|
||||
ICanvasService canvas,
|
||||
MyLogger<PageEditorContext> logger)
|
||||
{
|
||||
public event Action? StateHasChanged;
|
||||
private CoursePlanner planner { get; } = planner;
|
||||
private CanvasService canvas { get; } = canvas;
|
||||
private ICanvasService canvas { get; } = canvas;
|
||||
private readonly MyLogger<PageEditorContext> logger = logger;
|
||||
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ using Management.Services.Canvas;
|
||||
|
||||
public class QuizEditorContext(
|
||||
CoursePlanner planner,
|
||||
CanvasService canvas,
|
||||
ICanvasService canvas,
|
||||
MyLogger<QuizEditorContext> logger)
|
||||
{
|
||||
public event Action? StateHasChanged;
|
||||
private CoursePlanner planner { get; } = planner;
|
||||
private CanvasService canvas { get; } = canvas;
|
||||
private ICanvasService canvas { get; } = canvas;
|
||||
private readonly MyLogger<QuizEditorContext> logger = logger;
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ public static partial class AssignmentGroupSyncronizationExtensions
|
||||
this LocalCourse localCourse,
|
||||
ulong courseCanvasId,
|
||||
IEnumerable<CanvasAssignmentGroup> canvasAssignmentGroups,
|
||||
CanvasService canvas
|
||||
ICanvasService canvas
|
||||
)
|
||||
{
|
||||
var canvasAssignmentGroupIds = canvasAssignmentGroups.Select(g => g.Id).ToArray();
|
||||
|
||||
@@ -16,7 +16,7 @@ public static partial class AssignmentSyncronizationExtensions
|
||||
ulong canvasCourseId,
|
||||
LocalAssignment localAssignment,
|
||||
IEnumerable<CanvasAssignment> canvasAssignments,
|
||||
CanvasService canvas
|
||||
ICanvasService canvas
|
||||
)
|
||||
{
|
||||
var canvasAssignment = canvasAssignments.FirstOrDefault(
|
||||
@@ -42,7 +42,7 @@ public static partial class AssignmentSyncronizationExtensions
|
||||
ulong canvasCourseId,
|
||||
LocalAssignment localAssignment,
|
||||
CanvasAssignment canvasAssignment,
|
||||
CanvasService canvas,
|
||||
ICanvasService canvas,
|
||||
ulong? canvasAssignmentGroupId
|
||||
)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ public static partial class ModuleSyncronizationExtensions
|
||||
// this LocalCourse localCourse,
|
||||
// ulong canvasId,
|
||||
// IEnumerable<CanvasModule> canvasModules,
|
||||
// CanvasService canvas
|
||||
// ICanvasService canvas
|
||||
// )
|
||||
// {
|
||||
// var currentCanvasPositions = canvasModules.ToDictionary(m => m.Id, m => m.Position);
|
||||
@@ -34,7 +34,7 @@ public static partial class ModuleSyncronizationExtensions
|
||||
this LocalModule localModule,
|
||||
ulong canvasId,
|
||||
ulong moduleCanvasId,
|
||||
CanvasService canvas
|
||||
ICanvasService canvas
|
||||
)
|
||||
{
|
||||
var canvasModuleItems = await canvas.Modules.GetModuleItems(canvasId, moduleCanvasId);
|
||||
@@ -79,7 +79,7 @@ public static partial class ModuleSyncronizationExtensions
|
||||
ulong canvasId,
|
||||
CanvasModule canvasModule,
|
||||
Dictionary<CanvasModule, IEnumerable<CanvasModuleItem>> canvasModulesItems,
|
||||
CanvasService canvas,
|
||||
ICanvasService canvas,
|
||||
IEnumerable<CanvasAssignment> canvasAssignments
|
||||
)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ public static class PageSynchronizationExtension
|
||||
public static async Task<CanvasPage?> AddPageToCanvas(
|
||||
this LocalCourse localCourse,
|
||||
LocalCoursePage localPage,
|
||||
CanvasService canvas
|
||||
ICanvasService canvas
|
||||
)
|
||||
{
|
||||
if (localCourse.Settings.CanvasId == null)
|
||||
|
||||
@@ -17,7 +17,7 @@ public static partial class QuizSyncronizationExtensions
|
||||
public static async Task<ulong?> AddQuizToCanvas(
|
||||
this LocalCourse localCourse,
|
||||
LocalQuiz localQuiz,
|
||||
CanvasService canvas
|
||||
ICanvasService canvas
|
||||
)
|
||||
{
|
||||
if (localCourse.Settings.CanvasId == null)
|
||||
|
||||
@@ -4,7 +4,15 @@ using RestSharp;
|
||||
|
||||
namespace Management.Services.Canvas;
|
||||
|
||||
public class CanvasAssignmentGroupService
|
||||
|
||||
public interface ICanvasAssignmentGroupService
|
||||
{
|
||||
Task<IEnumerable<CanvasAssignmentGroup>> GetAll(ulong courseId);
|
||||
Task<LocalAssignmentGroup> Create(ulong canvasCourseId, LocalAssignmentGroup localAssignmentGroup);
|
||||
Task Update(ulong canvasCourseId, LocalAssignmentGroup localAssignmentGroup);
|
||||
|
||||
}
|
||||
public class CanvasAssignmentGroupService: ICanvasAssignmentGroupService
|
||||
{
|
||||
private readonly IWebRequestor webRequestor;
|
||||
private readonly CanvasServiceUtils utils;
|
||||
|
||||
@@ -3,12 +3,28 @@ using LocalModels;
|
||||
using RestSharp;
|
||||
|
||||
namespace Management.Services.Canvas;
|
||||
|
||||
public interface ICanvasAssignmentService
|
||||
{
|
||||
Task<IEnumerable<CanvasAssignment>> GetAll(ulong courseId);
|
||||
Task<ulong> Create(
|
||||
ulong canvasCourseId,
|
||||
LocalAssignment localAssignment,
|
||||
ulong? canvasAssignmentGroupId
|
||||
);
|
||||
Task Update(
|
||||
ulong courseId,
|
||||
ulong canvasAssignmentId,
|
||||
LocalAssignment localAssignment,
|
||||
ulong? canvasAssignmentGroupId
|
||||
);
|
||||
Task Delete(ulong courseId, ulong assignmentCanvasId, string assignmentName);
|
||||
Task CreateRubric(ulong courseId, ulong assignmentCanvasId, LocalAssignment localAssignment);
|
||||
}
|
||||
public class CanvasAssignmentService(
|
||||
IWebRequestor webRequestor,
|
||||
CanvasServiceUtils utils,
|
||||
MyLogger<CanvasAssignmentService> logger
|
||||
)
|
||||
): ICanvasAssignmentService
|
||||
{
|
||||
private readonly IWebRequestor webRequestor = webRequestor;
|
||||
private readonly CanvasServiceUtils utils = utils;
|
||||
|
||||
@@ -6,11 +6,18 @@ using LocalModels;
|
||||
using RestSharp;
|
||||
|
||||
namespace Management.Services.Canvas;
|
||||
public interface ICanvasCoursePageService
|
||||
{
|
||||
Task<IEnumerable<CanvasPage>> GetAll(ulong courseId);
|
||||
Task<CanvasPage> Create(ulong canvasCourseId, LocalCoursePage localCourse);
|
||||
Task Update(ulong courseId, ulong canvasPageId, LocalCoursePage localCoursePage);
|
||||
Task Delete(ulong courseId, ulong canvasPageId);
|
||||
}
|
||||
public class CanvasCoursePageService(
|
||||
IWebRequestor webRequestor,
|
||||
CanvasServiceUtils utils,
|
||||
MyLogger<CanvasCoursePageService> logger
|
||||
)
|
||||
) : ICanvasCoursePageService
|
||||
{
|
||||
private readonly IWebRequestor webRequestor = webRequestor;
|
||||
private readonly CanvasServiceUtils utils = utils;
|
||||
|
||||
@@ -5,7 +5,18 @@ using RestSharp;
|
||||
|
||||
namespace Management.Services.Canvas;
|
||||
|
||||
public class CanvasModuleService
|
||||
|
||||
public interface ICanvasModuleService
|
||||
{
|
||||
Task<IEnumerable<CanvasModule>> GetModules(ulong courseId);
|
||||
Task<CanvasModule> CreateModule(ulong courseId, string name);
|
||||
Task UpdateModule(ulong courseId, ulong moduleId, string name, uint position);
|
||||
Task<IEnumerable<CanvasModuleItem>> GetModuleItems(ulong courseId, ulong moduleId);
|
||||
Task<Dictionary<CanvasModule, IEnumerable<CanvasModuleItem>>> GetAllModulesItems(ulong courseId, IEnumerable<CanvasModule> modules);
|
||||
|
||||
}
|
||||
|
||||
public class CanvasModuleService: ICanvasModuleService
|
||||
{
|
||||
|
||||
private readonly IWebRequestor webRequestor;
|
||||
|
||||
@@ -4,16 +4,23 @@ using RestSharp;
|
||||
|
||||
namespace Management.Services.Canvas;
|
||||
|
||||
public interface ICanvasQuizService
|
||||
{
|
||||
Task<IEnumerable<CanvasQuiz>> GetAll(ulong courseId);
|
||||
Task<ulong> Create(ulong canvasCourseId, LocalQuiz localQuiz, ulong? canvasAssignmentGroupId);
|
||||
Task CreateQuizQuestions(ulong canvasCourseId, ulong canvasQuizId, LocalQuiz localQuiz);
|
||||
|
||||
}
|
||||
public class CanvasQuizService(
|
||||
IWebRequestor webRequestor,
|
||||
CanvasServiceUtils utils,
|
||||
CanvasAssignmentService assignments,
|
||||
ICanvasAssignmentService assignments,
|
||||
ILogger<CanvasQuizService> logger
|
||||
)
|
||||
): ICanvasQuizService
|
||||
{
|
||||
private readonly IWebRequestor webRequestor = webRequestor;
|
||||
private readonly CanvasServiceUtils utils = utils;
|
||||
private readonly CanvasAssignmentService assignments = assignments;
|
||||
private readonly ICanvasAssignmentService assignments = assignments;
|
||||
private readonly ILogger<CanvasQuizService> logger = logger;
|
||||
|
||||
public async Task<IEnumerable<CanvasQuiz>> GetAll(ulong courseId)
|
||||
|
||||
@@ -9,26 +9,43 @@ using RestSharp;
|
||||
|
||||
namespace Management.Services.Canvas;
|
||||
|
||||
public interface ICanvasService
|
||||
{
|
||||
ICanvasAssignmentService Assignments { get; }
|
||||
ICanvasAssignmentGroupService AssignmentGroups { get; }
|
||||
ICanvasModuleService Modules { get; }
|
||||
ICanvasQuizService Quizzes { get; }
|
||||
ICanvasCoursePageService Pages { get; }
|
||||
Task<IEnumerable<EnrollmentTermModel>> GetTerms();
|
||||
Task<IEnumerable<CourseModel>> GetCourses(ulong termId);
|
||||
Task<CourseModel> GetCourse(ulong courseId);
|
||||
Task<IEnumerable<EnrollmentTermModel>> GetCurrentTermsFor(DateTime? queryDate = null);
|
||||
Task UpdateModuleItem(ulong canvasCourseId, ulong canvasModuleId, CanvasModuleItem item);
|
||||
Task CreateModuleItem(ulong canvasCourseId, ulong canvasModuleId, string title, string type, ulong contentId);
|
||||
Task CreateModuleItem(ulong canvasCourseId, ulong canvasModuleId, string title, string type, string contentId);
|
||||
Task CreatePageModuleItem(ulong canvasCourseId, ulong canvasModuleId, string title, CanvasPage canvasPage);
|
||||
}
|
||||
|
||||
public class CanvasService(
|
||||
IWebRequestor webRequestor,
|
||||
CanvasServiceUtils utils,
|
||||
CanvasAssignmentService Assignments,
|
||||
CanvasAssignmentGroupService AssignmentGroups,
|
||||
CanvasModuleService Modules,
|
||||
CanvasQuizService Quizzes,
|
||||
CanvasCoursePageService Pages,
|
||||
MyLogger<CanvasService> logger
|
||||
)
|
||||
ICanvasAssignmentService Assignments,
|
||||
ICanvasAssignmentGroupService AssignmentGroups,
|
||||
ICanvasModuleService Modules,
|
||||
ICanvasQuizService Quizzes,
|
||||
ICanvasCoursePageService Pages,
|
||||
MyLogger<ICanvasService> logger
|
||||
):ICanvasService
|
||||
{
|
||||
private readonly IWebRequestor webRequestor = webRequestor;
|
||||
private readonly CanvasServiceUtils utils = utils;
|
||||
private readonly MyLogger<CanvasService> logger = logger;
|
||||
private readonly MyLogger<ICanvasService> logger = logger;
|
||||
|
||||
public CanvasAssignmentService Assignments { get; } = Assignments;
|
||||
public CanvasAssignmentGroupService AssignmentGroups { get; } = AssignmentGroups;
|
||||
public CanvasModuleService Modules { get; } = Modules;
|
||||
public CanvasQuizService Quizzes { get; } = Quizzes;
|
||||
public CanvasCoursePageService Pages { get; } = Pages;
|
||||
public ICanvasAssignmentService Assignments { get; } = Assignments;
|
||||
public ICanvasAssignmentGroupService AssignmentGroups { get; } = AssignmentGroups;
|
||||
public ICanvasModuleService Modules { get; } = Modules;
|
||||
public ICanvasQuizService Quizzes { get; } = Quizzes;
|
||||
public ICanvasCoursePageService Pages { get; } = Pages;
|
||||
|
||||
public async Task<IEnumerable<EnrollmentTermModel>> GetTerms()
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@ using RestSharp;
|
||||
|
||||
namespace Management.Services.Canvas;
|
||||
|
||||
|
||||
public class CanvasServiceUtils
|
||||
{
|
||||
private const string BaseUrl = "https://snow.instructure.com/api/v1/";
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
|
||||
public class SignalRHub : Hub
|
||||
{
|
||||
public async Task SendMessage(string user, string message)
|
||||
{
|
||||
await Clients.All.SendAsync("ReceiveMessage", user, message);
|
||||
}
|
||||
public override Task OnConnectedAsync()
|
||||
{
|
||||
var connectionId = Context.ConnectionId;
|
||||
// Store the connection ID for later use, e.g., in a database or in-memory store
|
||||
return base.OnConnectedAsync();
|
||||
}
|
||||
}
|
||||
@@ -46,3 +46,5 @@ make the ux easier to change course pages
|
||||
schedule planning view? just outline concepts? (maybe some non-canvas scheduled thing that only shows up in planner? like a note, could be de-emphasized in webpage)
|
||||
|
||||
holiday schedule
|
||||
|
||||
multi-seciton support for due dates/times
|
||||
|
||||
Reference in New Issue
Block a user