temp
This commit is contained in:
@@ -24,7 +24,7 @@ else if (_questionsForTable.Any() && _students.Any())
|
||||
@student.DisplayName
|
||||
<MudTooltip Text="点击以切换此学生所有题目的对错">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Info" Size="Size.Small" Class="ml-1"
|
||||
@onclick="() => ToggleStudentAllAnswers(student.Id)" />
|
||||
@onclick="() => ToggleStudentAllAnswers(student.Id)" />
|
||||
</MudTooltip>
|
||||
</MudTh>
|
||||
}
|
||||
@@ -200,7 +200,7 @@ else
|
||||
newSubmission.StudentId = student.Id;
|
||||
newSubmission.AssignmentId = Assignment.Id;
|
||||
newSubmission.SubmissionTime = DateTime.Now;
|
||||
newSubmission.Status = Entities.Contracts.SubmissionStatus.Submitted;
|
||||
newSubmission.Status = Entities.Contracts.SubmissionStatus.Graded;
|
||||
|
||||
|
||||
foreach (var row in _questionsForTable)
|
||||
@@ -225,11 +225,15 @@ else
|
||||
submissionDto.ForEach(async s =>
|
||||
{
|
||||
Snackbar?.Add($"正在提交: {_students.FirstOrDefault(std => std.Id == s.StudentId)?.DisplayName} 的试卷", Severity.Info);
|
||||
await ExamService.SubmissionAssignment(s);
|
||||
var submidResult = await ExamService.SubmissionAssignment(s);
|
||||
if (submidResult.Status)
|
||||
Snackbar?.Add($"批改结果已提交 {_students.FirstOrDefault(st => st.Id == s.StudentId)?.DisplayName}", Severity.Success);
|
||||
else
|
||||
Snackbar?.Add("批改结果提交失败", Severity.Error);
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
Snackbar?.Add("批改结果已提交(模拟)", Severity.Success);
|
||||
}
|
||||
}
|
@@ -50,9 +50,16 @@ else
|
||||
isloding = true;
|
||||
Snackbar.Add("正在加载", Severity.Info);
|
||||
var result = await ExamService.GetAllExam();
|
||||
examDtos = result.Result as List<AssignmentDto> ?? new List<AssignmentDto>();
|
||||
if (result.Status)
|
||||
{
|
||||
examDtos = result.Result as List<AssignmentDto> ?? new List<AssignmentDto>();
|
||||
Snackbar.Add("加载成功", Severity.Info);
|
||||
}
|
||||
else
|
||||
{
|
||||
Snackbar.Add($"加载失败 {result.Message}", Severity.Error);
|
||||
}
|
||||
isloding = false;
|
||||
Snackbar.Add("加载成功", Severity.Info);
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user