重构项目结构,移除Assignment相关功能,优化Submission模块
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 12s
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 12s
This commit is contained in:
41
Entities/DTO/Submission/StudentSubmissionDetailDto.cs
Normal file
41
Entities/DTO/Submission/StudentSubmissionDetailDto.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using Entities.Contracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
public class StudentSubmissionDetailDto
|
||||
{
|
||||
// 基本信息
|
||||
public Guid Id { get; set; }
|
||||
public Guid AssignmentId { get; set; }
|
||||
public Guid StudentId { get; set; }
|
||||
public DateTime SubmissionTime { get; set; }
|
||||
public float OverallGrade { get; set; }
|
||||
public string OverallFeedback { get; set; } = string.Empty;
|
||||
public SubmissionStatus Status { get; set; }
|
||||
|
||||
// Assignment信息
|
||||
public ExamDto Assignment { get; set; } = new ExamDto();
|
||||
|
||||
// 错误分析
|
||||
public Dictionary<string, int> ErrorTypeDistribution { get; set; } = new Dictionary<string, int>();
|
||||
public Dictionary<string, float> ErrorTypeScoreDistribution { get; set; } = new Dictionary<string, float>();
|
||||
|
||||
// 成绩统计
|
||||
public int TotalRank { get; set; }
|
||||
public List<float> AllScores { get; set; } = new List<float>();
|
||||
public float AverageScore { get; set; }
|
||||
public float ClassAverageScore { get; set; }
|
||||
|
||||
// 课文分布
|
||||
public Dictionary<string, int> LessonErrorDistribution { get; set; } = new Dictionary<string, int>();
|
||||
public Dictionary<string, int> KeyPointErrorDistribution { get; set; } = new Dictionary<string, int>();
|
||||
|
||||
// 基础统计
|
||||
public int TotalQuestions { get; set; }
|
||||
public int CorrectCount { get; set; }
|
||||
public int ErrorCount { get; set; }
|
||||
public float AccuracyRate { get; set; }
|
||||
}
|
||||
}
|
||||
22
Entities/DTO/Submission/StudentSubmissionSummaryDto.cs
Normal file
22
Entities/DTO/Submission/StudentSubmissionSummaryDto.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
public class StudentSubmissionSummaryDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string AssignmentName { get; set; }
|
||||
public int ErrorCount { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public float Score { get; set; }
|
||||
public int TotalQuestions { get; set; }
|
||||
public string StudentName { get; set; }
|
||||
public string Status { get; set; }
|
||||
}
|
||||
|
||||
public class StudentSubmissionSummaryResponseDto
|
||||
{
|
||||
public List<StudentSubmissionSummaryDto> Submissions { get; set; }
|
||||
public int TotalCount { get; set; }
|
||||
}
|
||||
}
|
||||
21
Entities/DTO/Submission/SubmissionDetailDto.cs
Normal file
21
Entities/DTO/Submission/SubmissionDetailDto.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Entities.Contracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
public class SubmissionDetailDto
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.Empty;
|
||||
public Guid SubmissionId { get; set; }
|
||||
public Guid StudentId { get; set; }
|
||||
public Guid ExamQuestionId { get; set; }
|
||||
public string? StudentAnswer { get; set; }
|
||||
public bool? IsCorrect { get; set; }
|
||||
public float? PointsAwarded { get; set; }
|
||||
public string? TeacherFeedback { get; set; }
|
||||
}
|
||||
}
|
||||
23
Entities/DTO/Submission/SubmissionDto.cs
Normal file
23
Entities/DTO/Submission/SubmissionDto.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Entities.Contracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
public class SubmissionDto
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.Empty;
|
||||
public Guid ExamId { get; set; }
|
||||
public Guid StudentId { get; set; }
|
||||
public DateTime SubmissionTime { get; set; }
|
||||
public float OverallGrade { get; set; } = 0;
|
||||
public string OverallFeedback { get; set; } = string.Empty;
|
||||
public Guid? GraderId { get; set; }
|
||||
public DateTime? GradedAt { get; set; }
|
||||
public SubmissionStatus Status { get; set; }
|
||||
public List<SubmissionDetailDto> SubmissionDetails { get; set; } = new List<SubmissionDetailDto>();
|
||||
}
|
||||
}
|
||||
22
Entities/DTO/Submission/SubmissionListDto.cs
Normal file
22
Entities/DTO/Submission/SubmissionListDto.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
public record SubmissionListDto
|
||||
{
|
||||
public Guid Id { get; init; }
|
||||
|
||||
|
||||
public float OverallGrade { get; init; }
|
||||
public int ErrorCount { get; init; }
|
||||
public Dictionary<string, int>? ErrorQuestionTypeDistribution { get; init; }
|
||||
public Dictionary<string, int>? ErrorQuestionLessonDistribution { get; init; }
|
||||
|
||||
|
||||
public byte AttemptNumber { get; init; }
|
||||
}
|
||||
}
|
||||
12
Entities/DTO/Submission/SubmissionUpdateDto.cs
Normal file
12
Entities/DTO/Submission/SubmissionUpdateDto.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Entities.Contracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
public record SubmissionDetailTeacherUpdateDto(Guid Id, bool IsCorrect, float? PointsAwarded);
|
||||
public record SubmissionTeacherUpdateDto(Guid Id, float OverallGrade, string? OverallFeedback, SubmissionStatus Status, ICollection<SubmissionDetailTeacherUpdateDto> SubmissionUpdateDetails);
|
||||
}
|
||||
Reference in New Issue
Block a user