File

apps/recallassess/recallassess-api/src/api/client/participant/dto/participant-active-work.dto.ts

Index

Properties

Properties

courseId
Type : number
Decorators :
@Expose()
@ApiProperty({description: 'Course ID'})
courseName
Type : string
Decorators :
@Expose()
@ApiProperty({description: 'Course display name'})
enrollmentId
Type : number
Decorators :
@Expose()
@ApiProperty({description: 'Learning group participant (enrollment) ID'})
progress
Type : number
Decorators :
@Expose()
@ApiProperty({description: 'Completion progress percentage'})
status
Type : string
Decorators :
@Expose()
@ApiProperty({description: 'Enrollment / learning progress status'})
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;
}

results matching ""

    No results matching ""