new rubric format on publish

This commit is contained in:
2023-12-12 12:26:14 -07:00
parent fd582b4e19
commit 1a0f62d28f
5 changed files with 16 additions and 7 deletions

View File

@@ -111,4 +111,5 @@ public class AssignmentMarkdownTests
var parsedAssignment = LocalAssignment.ParseMarkdown(assignmentMarkdown);
parsedAssignment.Should().BeEquivalentTo(assignment);
}
}

View File

@@ -142,7 +142,7 @@ short answer
---
this is a matching question
^ left answer - right dropdown
^ other thing shown - another option
^ other thing - another option
";
}

View File

@@ -29,13 +29,12 @@ public record LocalAssignment
public int PointsPossible => Rubric.Sum(r => r.IsExtraCredit ? 0 : r.Points);
public string GetRubricHtml()
{
var output = "<h1>Rubric</h1><pre><code class=\"language-json\">[\n";
var output = "<h2>Rubric</h2>";
var lineStrings = Rubric.Select(
item => $" {{\"label\": \"{item.Label}\", \"points\": {item.Points}}}"
item => $"- {item.Points}pts: {item.Label} <br/>"
);
output += string.Join(",\n", lineStrings);
output += "\n]</code></pre>";
output += string.Join("\n", lineStrings);
return output;
}

View File

@@ -33,3 +33,12 @@ here is the description
- 4pts: do task 1
- 2pts: do task 2
"
"Name: test assignment
LockAt: 1/1/0001 12:00:00 AM
DueAt: 1/1/0001 12:00:00 AM
AssignmentGroupName: Final Project
SubmissionTypes:
---

View File

@@ -2,7 +2,7 @@
MAJOR_VERSION="1"
MINOR_VERSION="2"
MINOR_VERSION="3"
VERSION="$MAJOR_VERSION.$MINOR_VERSION"
dotnet publish Management.Web/ \