File
|
activeEnrollments
|
Type : number
|
Decorators :
@Expose() @ApiProperty({description: 'Total number of active enrollments'})
|
|
|
|
hasActiveWork
|
Type : boolean
|
Decorators :
@Expose() @ApiProperty({description: 'Whether participant has any active work'})
|
|
|
import { ApiProperty } from "@nestjs/swagger";
import { Exclude, Expose, Type } from "class-transformer";
@Exclude()
export class CLParticipantIncompleteCourseItemDto {
@Expose()
@ApiProperty({ description: "Course display name" })
courseName!: string;
@Expose()
@ApiProperty({ description: "Course ID" })
courseId!: number;
@Expose()
@ApiProperty({ description: "Completion progress percentage" })
progress!: number;
@Expose()
@ApiProperty({ description: "Enrollment / learning progress status" })
status!: string;
@Expose()
@ApiProperty({ description: "Learning group participant (enrollment) ID" })
enrollmentId!: number;
}
@Exclude()
export class CLParticipantPendingAssessmentItemDto {
@Expose()
@ApiProperty({ description: "Assessment type label" })
assessmentType!: string;
@Expose()
@ApiProperty({ description: "Course display name" })
courseName!: string;
@Expose()
@ApiProperty({ description: "Course ID" })
courseId!: number;
@Expose()
@ApiProperty({ description: "Learning group ID for the enrollment" })
enrollmentId!: number;
}
@Exclude()
export class ParticipantActiveWorkDto {
@Expose()
@ApiProperty({ description: "Whether participant has any active work" })
hasActiveWork!: boolean;
@Expose()
@Type(() => CLParticipantIncompleteCourseItemDto)
@ApiProperty({
description: "List of incomplete courses",
type: [CLParticipantIncompleteCourseItemDto],
})
incompleteCourses!: CLParticipantIncompleteCourseItemDto[];
@Expose()
@Type(() => CLParticipantPendingAssessmentItemDto)
@ApiProperty({
description: "List of pending assessments",
type: [CLParticipantPendingAssessmentItemDto],
})
pendingAssessments!: CLParticipantPendingAssessmentItemDto[];
@Expose()
@ApiProperty({ description: "Total number of active enrollments" })
activeEnrollments!: number;
}