mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
new rubric format on publish
This commit is contained in:
@@ -111,4 +111,5 @@ public class AssignmentMarkdownTests
|
||||
var parsedAssignment = LocalAssignment.ParseMarkdown(assignmentMarkdown);
|
||||
parsedAssignment.Should().BeEquivalentTo(assignment);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -142,7 +142,7 @@ short answer
|
||||
---
|
||||
this is a matching question
|
||||
^ left answer - right dropdown
|
||||
^ other thing shown - another option
|
||||
^ other thing - another option
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user