mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -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";
|
var assignmentsPath = $"{modulePath}/assignments";
|
||||||
if (!Directory.Exists(assignmentsPath))
|
if (!Directory.Exists(assignmentsPath))
|
||||||
{
|
{
|
||||||
var errorMessage = $"error loading course by name, assignments folder does not exist in {modulePath}";
|
logger.Log($"error loading course by name, assignments folder does not exist in {modulePath}");
|
||||||
logger.Log(errorMessage);
|
Directory.CreateDirectory(assignmentsPath);
|
||||||
throw new LoadCourseFromFileException(errorMessage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var assignmentFiles = Directory.GetFiles(assignmentsPath);
|
var assignmentFiles = Directory.GetFiles(assignmentsPath);
|
||||||
var assignmentPromises = assignmentFiles
|
var assignmentPromises = assignmentFiles
|
||||||
.Select(async filePath =>
|
.Select(async filePath =>
|
||||||
@@ -113,9 +113,8 @@ public class CourseMarkdownLoader
|
|||||||
var quizzesPath = $"{modulePath}/quizzes";
|
var quizzesPath = $"{modulePath}/quizzes";
|
||||||
if (!Directory.Exists(quizzesPath))
|
if (!Directory.Exists(quizzesPath))
|
||||||
{
|
{
|
||||||
var errorMessage = $"error loading course by name, quizzes folder does not exist in {modulePath}";
|
logger.Log($"quizzes folder does not exist in {modulePath}, creating now");
|
||||||
logger.Log(errorMessage);
|
Directory.CreateDirectory(quizzesPath);
|
||||||
throw new LoadCourseFromFileException(errorMessage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var quizFiles = Directory.GetFiles(quizzesPath);
|
var quizFiles = Directory.GetFiles(quizzesPath);
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
# - ./storage:/app/storage
|
# - ./storage:/app/storage
|
||||||
# - ~/projects/faculty/1410/2023-fall-alex/modules:/app/storage/1410
|
# - ~/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/1400/2024_spring_alex/modules:/app/storage/1400
|
||||||
- ~/projects/faculty/1405/2024_spring_alex/modules:/app/storage/1405
|
- ~/projects/faculty/1405/2024_spring_alex/modules:/app/storage/1405
|
||||||
- ~/projects/faculty/4620_Distributed/2024Spring/modules:/app/storage/distributed
|
- ~/projects/faculty/4620_Distributed/2024Spring/modules:/app/storage/distributed
|
||||||
@@ -33,7 +34,6 @@ services:
|
|||||||
|
|
||||||
zipkin:
|
zipkin:
|
||||||
image: ghcr.io/openzipkin/zipkin-slim
|
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 settings are defined here https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md#environment-variables
|
||||||
environment:
|
environment:
|
||||||
- STORAGE_TYPE=mem
|
- STORAGE_TYPE=mem
|
||||||
|
|||||||
Reference in New Issue
Block a user