mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 15:18:32 -06:00
be more lenient about assignments or quizzes folders not existing in module on load. Git will not save empty folders
This commit is contained in:
@@ -93,10 +93,10 @@ public class CourseMarkdownLoader
|
||||
var assignmentsPath = $"{modulePath}/assignments";
|
||||
if (!Directory.Exists(assignmentsPath))
|
||||
{
|
||||
var errorMessage = $"error loading course by name, assignments folder does not exist in {modulePath}";
|
||||
logger.Log(errorMessage);
|
||||
throw new LoadCourseFromFileException(errorMessage);
|
||||
logger.Log($"error loading course by name, assignments folder does not exist in {modulePath}");
|
||||
Directory.CreateDirectory(assignmentsPath);
|
||||
}
|
||||
|
||||
var assignmentFiles = Directory.GetFiles(assignmentsPath);
|
||||
var assignmentPromises = assignmentFiles
|
||||
.Select(async filePath =>
|
||||
@@ -113,9 +113,8 @@ public class CourseMarkdownLoader
|
||||
var quizzesPath = $"{modulePath}/quizzes";
|
||||
if (!Directory.Exists(quizzesPath))
|
||||
{
|
||||
var errorMessage = $"error loading course by name, quizzes folder does not exist in {modulePath}";
|
||||
logger.Log(errorMessage);
|
||||
throw new LoadCourseFromFileException(errorMessage);
|
||||
logger.Log($"quizzes folder does not exist in {modulePath}, creating now");
|
||||
Directory.CreateDirectory(quizzesPath);
|
||||
}
|
||||
|
||||
var quizFiles = Directory.GetFiles(quizzesPath);
|
||||
|
||||
@@ -12,7 +12,8 @@ services:
|
||||
volumes:
|
||||
# - ./storage:/app/storage
|
||||
# - ~/projects/faculty/1410/2023-fall-alex/modules:/app/storage/1410
|
||||
- ~/projects/faculty/1810/2024-spring-alex/modules:/app/storage/web_intro
|
||||
- ~/projects/faculty/1810/2024-spring-alex/modules:/app/storage/web
|
||||
- ~/projects/faculty/1810/2024-spring-alex/modules_online:/app/storage/web_online
|
||||
- ~/projects/faculty/1400/2024_spring_alex/modules:/app/storage/1400
|
||||
- ~/projects/faculty/1405/2024_spring_alex/modules:/app/storage/1405
|
||||
- ~/projects/faculty/4620_Distributed/2024Spring/modules:/app/storage/distributed
|
||||
@@ -33,7 +34,6 @@ services:
|
||||
|
||||
zipkin:
|
||||
image: ghcr.io/openzipkin/zipkin-slim
|
||||
container_name: zipkin
|
||||
# Environment settings are defined here https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md#environment-variables
|
||||
environment:
|
||||
- STORAGE_TYPE=mem
|
||||
|
||||
Reference in New Issue
Block a user