mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 15:48:32 -06:00
hooks
This commit is contained in:
@@ -11,7 +11,7 @@ public class CanvasAssignmentGroupService
|
||||
private readonly MyLogger<CanvasAssignmentGroupService> logger;
|
||||
|
||||
public CanvasAssignmentGroupService(
|
||||
IWebRequestor webRequestor,
|
||||
IWebRequestor webRequestor,
|
||||
CanvasServiceUtils utils,
|
||||
MyLogger<CanvasAssignmentGroupService> logger
|
||||
)
|
||||
@@ -73,4 +73,4 @@ public class CanvasAssignmentGroupService
|
||||
|
||||
await webRequestor.PutAsync<CanvasAssignmentGroup>(request);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,8 @@ public class CanvasQuizService(
|
||||
// assignment_group_id = "quiz", // TODO: support specific assignment groups
|
||||
// time_limit = localQuiz.TimeLimit,
|
||||
shuffle_answers = localQuiz.ShuffleAnswers,
|
||||
access_code = localQuiz.Password,
|
||||
show_correct_answers = localQuiz.showCorrectAnswers,
|
||||
// hide_results = localQuiz.HideResults,
|
||||
allowed_attempts = localQuiz.AllowedAttempts,
|
||||
one_question_at_a_time = false,
|
||||
@@ -91,11 +93,9 @@ public class CanvasQuizService(
|
||||
|
||||
private async Task hackFixRedundantAssignments(ulong canvasCourseId)
|
||||
{
|
||||
|
||||
using var activity = DiagnosticsConfig.Source.StartActivity("hack fixing redundant quiz assignments that are auto-created");
|
||||
activity?.SetTag("canvas syncronization", true);
|
||||
|
||||
|
||||
var canvasAssignments = await assignments.GetAll(canvasCourseId);
|
||||
var assignmentsToDelete = canvasAssignments
|
||||
.Where(
|
||||
@@ -113,7 +113,7 @@ public class CanvasQuizService(
|
||||
a.Name
|
||||
);
|
||||
}
|
||||
);
|
||||
).ToArray();
|
||||
await Task.WhenAll(tasks);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user