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);
|
var parsedAssignment = LocalAssignment.ParseMarkdown(assignmentMarkdown);
|
||||||
parsedAssignment.Should().BeEquivalentTo(assignment);
|
parsedAssignment.Should().BeEquivalentTo(assignment);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -142,7 +142,7 @@ short answer
|
|||||||
---
|
---
|
||||||
this is a matching question
|
this is a matching question
|
||||||
^ left answer - right dropdown
|
^ 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 int PointsPossible => Rubric.Sum(r => r.IsExtraCredit ? 0 : r.Points);
|
||||||
public string GetRubricHtml()
|
public string GetRubricHtml()
|
||||||
{
|
{
|
||||||
var output = "<h1>Rubric</h1><pre><code class=\"language-json\">[\n";
|
var output = "<h2>Rubric</h2>";
|
||||||
|
|
||||||
var lineStrings = Rubric.Select(
|
var lineStrings = Rubric.Select(
|
||||||
item => $" {{\"label\": \"{item.Label}\", \"points\": {item.Points}}}"
|
item => $"- {item.Points}pts: {item.Label} <br/>"
|
||||||
);
|
);
|
||||||
output += string.Join(",\n", lineStrings);
|
output += string.Join("\n", lineStrings);
|
||||||
output += "\n]</code></pre>";
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
11
README.md
11
README.md
@@ -32,4 +32,13 @@ here is the description
|
|||||||
## Rubric
|
## Rubric
|
||||||
- 4pts: do task 1
|
- 4pts: do task 1
|
||||||
- 2pts: do task 2
|
- 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