mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
peace nirvana and no yellow warning lines in my console
This commit is contained in:
@@ -38,7 +38,6 @@ public class CanvasAssignmentService
|
||||
public async Task<ulong> Create(
|
||||
ulong canvasCourseId,
|
||||
LocalAssignment localAssignment,
|
||||
string htmlDescription,
|
||||
ulong? canvasAssignmentGroupId
|
||||
)
|
||||
{
|
||||
@@ -49,7 +48,7 @@ public class CanvasAssignmentService
|
||||
{
|
||||
name = localAssignment.Name,
|
||||
submission_types = localAssignment.SubmissionTypes.Select(t => t.ToString()),
|
||||
description = htmlDescription,
|
||||
description = localAssignment.GetDescriptionHtml(),
|
||||
due_at = localAssignment.DueAt,
|
||||
lock_at = localAssignment.LockAt,
|
||||
points_possible = localAssignment.PointsPossible,
|
||||
@@ -71,8 +70,7 @@ public class CanvasAssignmentService
|
||||
ulong courseId,
|
||||
ulong canvasAssignmentId,
|
||||
LocalAssignment localAssignment,
|
||||
string htmlDescription,
|
||||
ulong canvasAssignmentGroupId
|
||||
ulong? canvasAssignmentGroupId
|
||||
)
|
||||
{
|
||||
log.Log($"updating assignment: {localAssignment.Name}");
|
||||
|
||||
@@ -64,8 +64,8 @@ public class CanvasService
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
logger.Error(response.Content);
|
||||
logger.Error(response.ResponseUri?.ToString());
|
||||
logger.Error(response?.Content ?? "");
|
||||
logger.Error(response?.ResponseUri?.ToString() ?? "");
|
||||
throw new Exception("error getting course from canvas");
|
||||
}
|
||||
return data;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class FileStorageManager
|
||||
this.logger.Log("Using storage directory: " + _basePath);
|
||||
|
||||
}
|
||||
public async Task SaveCourseAsync(LocalCourse course, LocalCourse previouslyStoredCourse)
|
||||
public async Task SaveCourseAsync(LocalCourse course, LocalCourse? previouslyStoredCourse)
|
||||
{
|
||||
await _saveMarkdownCourse.Save(course, previouslyStoredCourse);
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public class FileStorageManager
|
||||
return await _courseMarkdownLoader.LoadSavedMarkdownCourses();
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<string>> GetEmptyDirectories()
|
||||
public IEnumerable<string> GetEmptyDirectories()
|
||||
{
|
||||
if(!Directory.Exists(_basePath))
|
||||
throw new DirectoryNotFoundException($"Cannot get empty directories, {_basePath} does not exist");
|
||||
|
||||
@@ -13,7 +13,7 @@ public class MarkdownCourseSaver
|
||||
_basePath = FileConfiguration.GetBasePath();
|
||||
}
|
||||
|
||||
public async Task Save(LocalCourse course, LocalCourse previouslyStoredCourse)
|
||||
public async Task Save(LocalCourse course, LocalCourse? previouslyStoredCourse)
|
||||
{
|
||||
var courseDirectory = $"{_basePath}/{course.Settings.Name}";
|
||||
if (!Directory.Exists(courseDirectory))
|
||||
|
||||
Reference in New Issue
Block a user