665665 * @apiSuccess {String[]} module.cognitiveLevels Array of cognitive levels of
666666 * attainment as per Bloom's Taxanomy (L1-L6).
667667 */
668+ // ------------------------------------------------------------------------------------------
669+ // Attendance.
670+ // ------------------------------------------------------------------------------------------
671+
672+ /**
673+ * @api {post } /attendance/add Add Attendance
674+ * @apiName AddAttendance
675+ * @apiGroup Attendance
676+ * @apiDescription Add a new attendance.
677+ *
678+ * @apiBody {String} student Student name.
679+ * @apiBody {String} course Course name.
680+ * @apiBody {Number} monthlyAttended Monthly attendance of student.
681+ * @apiBody {Number} monthlyOccured Monthly occured.
682+ * @apiBody {Number} cumulativeAttended sum of attendance of student.
683+ * @apiBody {Number} cumulativeOccured sum of occured.
684+ *
685+ * @apiSuccess {String} res Response message.
686+ * @apiError (Error 500) UserNotFound The of the User was not found
687+ *
688+ * @apiSuccessExample Success-Response:
689+ * HTTP/1.1 200 OK
690+ * {
691+ * "res": "added attendance Example Attendance"
692+ * }
693+ *
694+ * @apiErrorExample Error-Response:
695+ * HTTP/1.1 500 Internal Server Error
696+ * {
697+ * "err": "Error while inserting in DB"
698+ * }
699+ */
700+
701+ /**
702+ * @api {delete } /attendance/delete/:attendanceId To delete Attendance
703+ * @apiName DeleteAttendance
704+ * @apiGroup Attendance
705+ *
706+ * @apiParam {String} attendanceId The ID of the attendance document to delete.
707+ *
708+ * @apiSuccess {String} res Success message indicating the deletion.
709+ *
710+ * @apiError (Error 500) err Error message if there was an error during the deletion.
711+ *
712+ * */
713+
714+ /**
715+ * @api {post } /attendance/update update attendance details
716+ * @apiName UpdateAttendance
717+ * @apiGroup Attendance
718+ * @apiDescription update Existing attendance
719+ *
720+ * @apiBody {String} [student] Student name.
721+ * @apiBody {String} [course] Course name.
722+ * @apiBody {Number} [monthlyAttended] Monthly attendance of student.
723+ * @apiBody {Number} [monthlyOccured] Monthly occured.
724+ * @apiBody {Number} [cumulativeAttended] sum of attendance of student.
725+ * @apiBody {Number} [cumulativeOccured] sum of occured.
726+ *
727+ * @apiSuccess {String} res Attendance updated.
728+ * @apiError (Error 500) err Error in updating database
729+ *
730+ */
731+
732+ /**
733+ * @api {get } attendance/list Get Attendance List
734+ * @apiName GetAttendance
735+ * @apiGroup Attendance
736+ *
737+ * @apiBody {String} [student] Student name.
738+ * @apiBody {String} [course] Course name.
739+ * @apiBody {Number} [monthlyAttended] Monthly attendance of student.
740+ * @apiBody {Number} [monthlyOccured] Monthly occured.
741+ * @apiBody {Number} [cumulativeAttended] sum of attendance of student.
742+ * @apiBody {Number} [cumulativeOccured] sum of occured.
743+ *
744+ * @apiSuccess {attendance[]} res Array of Filtered attendance Doc.
745+ * @apiSuccess {String} attendance._id ID of document given by database.
746+ * @apiSuccess {String} attendance.student Name of student.
747+ * @apiSuccess {String} attendance.course Name of course.
748+ * @apiSuccess {Number} attendance.monthlyAttended Monthly attendance of student.
749+ * @apiSuccess {Number} attendance.cumulativeAttended sum of attendance of student.
750+ * @apiSuccess {Number} attendance.cumulativeOccured sum of occured.
751+ */
0 commit comments