mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
hooks
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
public static class ConfigurationSetup
|
||||
{
|
||||
public static void Canvas(WebApplicationBuilder builder)
|
||||
public static void Canvas(WebApplicationBuilder builder)
|
||||
{
|
||||
var canvas_token = builder.Configuration["CANVAS_TOKEN"] ?? throw new Exception("CANVAS_TOKEN is null");
|
||||
|
||||
var canvas_url = builder.Configuration["CANVAS_URL"];
|
||||
if (canvas_url == null)
|
||||
{
|
||||
var canvas_token = builder.Configuration["CANVAS_TOKEN"] ?? throw new Exception("CANVAS_TOKEN is null");
|
||||
|
||||
var canvas_url = builder.Configuration["CANVAS_URL"];
|
||||
if (canvas_url == null)
|
||||
{
|
||||
Console.WriteLine("CANVAS_URL is null, defaulting to https://snow.instructure.com");
|
||||
builder.Configuration["CANVAS_URL"] = "https://snow.instructure.com";
|
||||
}
|
||||
Console.WriteLine("CANVAS_URL is null, defaulting to https://snow.instructure.com");
|
||||
builder.Configuration["CANVAS_URL"] = "https://snow.instructure.com";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,4 +17,4 @@ public class CustomConsoleExporter : BaseExporter<Activity>
|
||||
}
|
||||
return ExportResult.Success;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,10 +42,11 @@ public class DroppableQuiz : ComponentBase
|
||||
);
|
||||
|
||||
var NewQuizList = currentModule.Quizzes
|
||||
.Select(q =>
|
||||
q.Name + q.Description != Quiz.Name + Quiz.Description
|
||||
? q :
|
||||
q with {
|
||||
.Select(q =>
|
||||
q.Name + q.Description != Quiz.Name + Quiz.Description
|
||||
? q :
|
||||
q with
|
||||
{
|
||||
DueAt = defaultDueTimeDate,
|
||||
LockAt = q.LockAt > defaultDueTimeDate ? q.LockAt : defaultDueTimeDate
|
||||
}
|
||||
|
||||
@@ -7,20 +7,20 @@ namespace Management.Web.Pages;
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
[IgnoreAntiforgeryToken]
|
||||
public class ErrorModel : PageModel
|
||||
{
|
||||
public string? RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
|
||||
private readonly ILogger<ErrorModel> _logger;
|
||||
|
||||
public ErrorModel(ILogger<ErrorModel> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
|
||||
}
|
||||
{
|
||||
public string? RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
|
||||
private readonly ILogger<ErrorModel> _logger;
|
||||
|
||||
public ErrorModel(ILogger<ErrorModel> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
global using System.Text.Json.Serialization;
|
||||
global using System.Text.Json;
|
||||
global using System.ComponentModel.DataAnnotations;
|
||||
global using Management.Services.Canvas;
|
||||
global using Management.Services;
|
||||
global using CanvasModel.EnrollmentTerms;
|
||||
global using CanvasModel.Courses;
|
||||
global using System.Text.Json;
|
||||
global using System.Text.Json.Serialization;
|
||||
global using CanvasModel;
|
||||
global using CanvasModel.Courses;
|
||||
global using CanvasModel.EnrollmentTerms;
|
||||
global using LocalModels;
|
||||
global using Management.Planner;
|
||||
global using Management.Web.Shared.Components;
|
||||
global using Management.Services;
|
||||
global using Management.Services.Canvas;
|
||||
global using Management.Web.Shared;
|
||||
|
||||
global using Management.Web.Shared.Components;
|
||||
using dotenv.net;
|
||||
using Microsoft.AspNetCore.Hosting.Server;
|
||||
using Microsoft.AspNetCore.Hosting.Server.Features;
|
||||
using OpenTelemetry;
|
||||
using OpenTelemetry.Logs;
|
||||
using OpenTelemetry.Metrics;
|
||||
using OpenTelemetry.Resources;
|
||||
using OpenTelemetry.Trace;
|
||||
using OpenTelemetry;
|
||||
|
||||
DotEnv.Load();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user