minor layout fixes

This commit is contained in:
2023-09-05 20:30:21 -06:00
parent 5aaf474565
commit 2b154d186d
7 changed files with 60 additions and 36 deletions

View File

@@ -12,6 +12,7 @@
@inject YamlManager yamlManager @inject YamlManager yamlManager
@inject CanvasService canvas @inject CanvasService canvas
@inject CoursePlanner planner @inject CoursePlanner planner
@inject NavigationManager navigtion
@code { @code {
[Parameter] [Parameter]
@@ -30,6 +31,12 @@
loading = false; loading = false;
} }
private void selectNewCourse()
{
planner.Clear();
navigtion.NavigateTo("/");
}
} }
@if(loading) @if(loading)
@@ -42,7 +49,7 @@
<div class="mb-3 d-flex justify-content-between" style="height: 4em;"> <div class="mb-3 d-flex justify-content-between" style="height: 4em;">
<div class="my-auto"> <div class="my-auto">
<button <button
@onclick="planner.Clear" @onclick="selectNewCourse"
class="btn btn-primary" class="btn btn-primary"
> >
Select New Course Select New Course

View File

@@ -175,12 +175,19 @@
</div> </div>
<div class="container"> <div class="container">
<RubricEditor /> <RubricEditor />
</div> <hr>
<div class="mx-5 px-5">
<SubmissionTypeSelector /> <SubmissionTypeSelector />
</div>
</div>
} }
<div class="d-flex justify-content-end m-3">
<ConfirmationModal Label="Delete" Class="btn btn-danger" OnConfirmAsync="HandleDelete" /> <ConfirmationModal Label="Delete" Class="btn btn-danger" OnConfirmAsync="HandleDelete" />
<button <button
class="btn btn-primary" class="btn btn-primary mx-2"
@onclick="@(() => { @onclick="@(() => {
assignmentContext.Assignment = null; assignmentContext.Assignment = null;
Navigation.NavigateTo("/course/" + planner.LocalCourse?.Name); Navigation.NavigateTo("/course/" + planner.LocalCourse?.Name);
@@ -188,4 +195,14 @@
> >
Done Done
</button> </button>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>

View File

@@ -56,7 +56,7 @@
var isDiscussion = submissionType == SubmissionType.DISCUSSION_TOPIC; var isDiscussion = submissionType == SubmissionType.DISCUSSION_TOPIC;
var allowedToBeChecked = !discussionIsSelected || isDiscussion; var allowedToBeChecked = !discussionIsSelected || isDiscussion;
<div class="col-4"> <div class="col-3">
<div class="form-check form-switch"> <div class="form-check form-switch">
<input <input
class="form-check-input" class="form-check-input"

View File

@@ -43,7 +43,7 @@
} }
} }
<div <li
draggable="true" draggable="true"
@ondragstart="HandleDragStart" @ondragstart="HandleDragStart"
@ondragend="HandleDragEnd" @ondragend="HandleDragEnd"
@@ -51,4 +51,4 @@
role="button" role="button"
> >
@Assignment.Name @Assignment.Name
</div> </li>

View File

@@ -112,7 +112,7 @@
ondragover="event.preventDefault();" ondragover="event.preventDefault();"
> >
@(isWeekDay ? date?.Day : "") @(isWeekDay ? date?.Day : "")
<div class="m-0 ps-3"> <ul class="m-0 ps-3">
@foreach (var assignment in TodaysAssignments) @foreach (var assignment in TodaysAssignments)
{ {
@* Console.WriteLine($"assignment: {assignment.Name}"); *@ @* Console.WriteLine($"assignment: {assignment.Name}"); *@
@@ -123,5 +123,5 @@
{ {
<QuizInDay Quiz="quiz" @key="@quiz" /> <QuizInDay Quiz="quiz" @key="@quiz" />
} }
</div> </ul>
</div> </div>

View File

@@ -18,7 +18,7 @@
} }
} }
<div <li
draggable="true" draggable="true"
@ondragstart="HandleDragStart" @ondragstart="HandleDragStart"
@ondragend="HandleDragEnd" @ondragend="HandleDragEnd"
@@ -26,4 +26,4 @@
role="button" role="button"
> >
@Quiz.Name @Quiz.Name
</div> </li>

View File

@@ -14,24 +14,24 @@ public static class SubmissionType
public static readonly string ONLINE_TEXT_ENTRY = "online_text_entry"; public static readonly string ONLINE_TEXT_ENTRY = "online_text_entry";
public static readonly string ONLINE_UPLOAD = "online_upload"; public static readonly string ONLINE_UPLOAD = "online_upload";
public static readonly string ONLINE_QUIZ = "online_quiz"; public static readonly string ONLINE_QUIZ = "online_quiz";
public static readonly string ON_PAPER = "on_paper"; // public static readonly string ON_PAPER = "on_paper";
public static readonly string DISCUSSION_TOPIC = "discussion_topic"; public static readonly string DISCUSSION_TOPIC = "discussion_topic";
public static readonly string EXTERNAL_TOOL = "external_tool"; // public static readonly string EXTERNAL_TOOL = "external_tool";
public static readonly string ONLINE_URL = "online_url"; public static readonly string ONLINE_URL = "online_url";
public static readonly string MEDIA_RECORDING = "media_recording"; // public static readonly string MEDIA_RECORDING = "media_recording";
public static readonly string STUDENT_ANNOTATION = "student_annotation"; // public static readonly string STUDENT_ANNOTATION = "student_annotation";
public static readonly string NONE = "none"; public static readonly string NONE = "none";
public static readonly IEnumerable<string> AllTypes = new string[] public static readonly IEnumerable<string> AllTypes = new string[]
{ {
ONLINE_TEXT_ENTRY, ONLINE_TEXT_ENTRY,
ONLINE_UPLOAD, ONLINE_UPLOAD,
ONLINE_QUIZ, ONLINE_QUIZ,
ON_PAPER, // ON_PAPER,
DISCUSSION_TOPIC, DISCUSSION_TOPIC,
EXTERNAL_TOOL, // EXTERNAL_TOOL,
ONLINE_URL, ONLINE_URL,
MEDIA_RECORDING, // MEDIA_RECORDING,
STUDENT_ANNOTATION, // STUDENT_ANNOTATION,
NONE, NONE,
}; };
} }