mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
removing lock date same as due date option
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
catch(QuizMarkdownParseException e)
|
||||
{
|
||||
error = e.Message;
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
{
|
||||
if (quizContext.Quiz != null)
|
||||
{
|
||||
if (!lockAtDueDate)
|
||||
lockAtDueDate = quizContext.Quiz.LockAtDueDate;
|
||||
if (lockAt == null)
|
||||
lockAt = quizContext.Quiz.LockAt;
|
||||
if (!shuffleAnswers)
|
||||
@@ -32,32 +30,11 @@
|
||||
quizContext.StateHasChanged -= reload;
|
||||
}
|
||||
|
||||
private bool lockAtDueDate { get; set; }
|
||||
private DateTime? lockAt { get; set; }
|
||||
private bool shuffleAnswers { get; set; }
|
||||
private bool oneQuestionAtATime { get; set; }
|
||||
private int allowedAttempts { get; set; }
|
||||
|
||||
private void handleLockAtDueDateChange()
|
||||
{
|
||||
if(quizContext.Quiz == null)
|
||||
return;
|
||||
|
||||
var newValue = !quizContext.Quiz.LockAtDueDate;
|
||||
|
||||
var newQuiz = newValue
|
||||
? quizContext.Quiz with
|
||||
{
|
||||
LockAtDueDate = newValue,
|
||||
LockAt = quizContext.Quiz.DueAt
|
||||
}
|
||||
: quizContext.Quiz with
|
||||
{
|
||||
LockAtDueDate = newValue
|
||||
};
|
||||
quizContext.SaveQuiz(newQuiz);
|
||||
}
|
||||
|
||||
private void setAssignmentGroup(LocalAssignmentGroup? group)
|
||||
{
|
||||
if(quizContext.Quiz == null)
|
||||
@@ -81,19 +58,6 @@
|
||||
@if(planner.LocalCourse != null )
|
||||
{
|
||||
<div>
|
||||
<div class="form-check form-switch">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
role="switch"
|
||||
id="lockAtDueDate"
|
||||
checked="@lockAtDueDate"
|
||||
@onchange="handleLockAtDueDateChange">
|
||||
<label
|
||||
class="form-check-label" for="lockAtDueDate">
|
||||
Lock at Due Date
|
||||
</label>
|
||||
</div>
|
||||
<ButtonSelect
|
||||
Label="Assignment Group"
|
||||
Options="planner.LocalCourse.Settings.AssignmentGroups"
|
||||
|
||||
Reference in New Issue
Block a user