feat: add search and filter capabilities to student and quiz endpoints, implement YouTube video support for lessons
Add search and status filter parameters to getEnrolledStudents endpoint to filter students by name/email/username and enrollment status. Add search and isPassed filter parameters to getQuizScores endpoint to filter quiz results by student details and pass status. Remove separate searchStudents endpoint as its functionality is now integrated into getEnrolledStudents. Add setYouTubeVideo endpoint to
This commit is contained in:
parent
e8a10e5024
commit
ff841c7638
6 changed files with 246 additions and 125 deletions
|
|
@ -380,6 +380,32 @@ export interface UpdateVideoInput {
|
|||
video: UploadedFileInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Input for setting YouTube video to a lesson
|
||||
*/
|
||||
export interface SetYouTubeVideoInput {
|
||||
token: string;
|
||||
course_id: number;
|
||||
lesson_id: number;
|
||||
youtube_video_id: string;
|
||||
video_title: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Response for YouTube video operation
|
||||
*/
|
||||
export interface YouTubeVideoResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
data: {
|
||||
lesson_id: number;
|
||||
video_url: string;
|
||||
video_id: string;
|
||||
video_title: string;
|
||||
mime_type: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Input for uploading a single attachment to a lesson
|
||||
*/
|
||||
|
|
@ -625,6 +651,11 @@ export interface ReorderLessonsBody {
|
|||
sort_order: number;
|
||||
}
|
||||
|
||||
export interface SetYouTubeVideoBody {
|
||||
youtube_video_id: string;
|
||||
video_title: string;
|
||||
}
|
||||
|
||||
export interface ReorderQuestionBody {
|
||||
sort_order: number;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -209,6 +209,8 @@ export interface GetEnrolledStudentsInput {
|
|||
course_id: number;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
search?: string;
|
||||
status?: 'ENROLLED' | 'COMPLETED';
|
||||
}
|
||||
|
||||
export interface EnrolledStudentData {
|
||||
|
|
@ -242,6 +244,8 @@ export interface GetQuizScoresInput {
|
|||
lesson_id: number;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
search?: string;
|
||||
is_passed?: boolean;
|
||||
}
|
||||
|
||||
export interface StudentQuizScoreData {
|
||||
|
|
@ -386,26 +390,3 @@ export interface GetEnrolledStudentDetailResponse {
|
|||
data: EnrolledStudentDetailData;
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// Search Students in Course (Instructor)
|
||||
// ============================================
|
||||
|
||||
export interface SearchStudentsInput {
|
||||
token: string;
|
||||
course_id: number;
|
||||
query: string;
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
export interface SearchStudentData {
|
||||
user_id: number;
|
||||
first_name: string | null;
|
||||
last_name: string | null;
|
||||
email: string;
|
||||
}
|
||||
|
||||
export interface SearchStudentsResponse {
|
||||
code: number;
|
||||
message: string;
|
||||
data: SearchStudentData[];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue