mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
got assignment template variables and replacement working
This commit is contained in:
@@ -134,7 +134,23 @@
|
||||
<div class="card-text">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
@Assignment.description
|
||||
@if(Assignment.use_template)
|
||||
{
|
||||
var template = planner.LocalCourse?.AssignmentTemplates.First((t) => t.Id == Assignment.template_id);
|
||||
if(template == null)
|
||||
{
|
||||
System.Console.WriteLine($"Could not find template fof assignment, {Assignment.template_id}");
|
||||
}
|
||||
else
|
||||
{
|
||||
var html = AssignmentTemplate.GetHtml(template, Assignment);
|
||||
@((MarkupString) html)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@Assignment.description
|
||||
}
|
||||
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
|
||||
Reference in New Issue
Block a user