|
309 | 309 | * @apiSuccess {Date} accreditation.dateofAccreditation Date on which accreditation was issued. |
310 | 310 | * @apiSuccess {Date} accreditation.dateofExpiry Date till which accreditation is valid. |
311 | 311 | */ |
| 312 | + |
| 313 | +// ------------------------------------------------------------------------------------------ |
| 314 | +// Coursework. |
| 315 | +// ------------------------------------------------------------------------------------------ |
| 316 | + |
| 317 | +/** |
| 318 | + * @api {post} /coursework/add Add Coursework |
| 319 | + * @apiName AddCoursework |
| 320 | + * @apiGroup Coursework |
| 321 | + * @apiDescription Add a new coursework entry. |
| 322 | + * |
| 323 | + * @apiBody {ObjectId} student ID of the student (ObjectId). |
| 324 | + * @apiBody {String} Coursework type that is either onCampus or offCampus. |
| 325 | + * @apiBody {ObjectId} course ID of the Course in Coursework (ObjectId). |
| 326 | + * @apiBody {ObjectId} task ID of the task in Coursework (ObjectId). |
| 327 | + * @apiBody {String} objectID either its practicals or tutorial or assignment . |
| 328 | + * @apiBody {ObjectId} activity Id of the activity in Coursework. |
| 329 | + * @apiBody {Number} Marks in the Coursework. |
| 330 | + * |
| 331 | + * @apiSuccess {String} res Response message. |
| 332 | + * @apiError (Error 500) DatabaseError Err message if there is an error inserting into the database. |
| 333 | + * |
| 334 | + * @apiSuccessExample Success-Response: |
| 335 | + * HTTP/1.1 200 OK |
| 336 | + * { |
| 337 | + * "res": "Added coursework" |
| 338 | + * } |
| 339 | + * |
| 340 | + * @apiErrorExample Error-Response: |
| 341 | + * HTTP/1.1 500 Internal Server Error |
| 342 | + * { |
| 343 | + * "err": "Error while inserting in DB" |
| 344 | + * } |
| 345 | + */ |
| 346 | + |
| 347 | +/** |
| 348 | + * @api {delete} /coursework/delete/:courseworkId Delete Coursework |
| 349 | + * @apiName DeleteCoursework |
| 350 | + * @apiGroup Coursework |
| 351 | + * |
| 352 | + * @apiParam {String} courseworkId The ID of the Coursework document to delete. |
| 353 | + * |
| 354 | + * @apiSuccess {String} res Success message indicating the deletion. |
| 355 | + * |
| 356 | + * @apiError (Error 500) DatabaseError Error message if there was an error during the deletion. |
| 357 | + */ |
| 358 | + |
| 359 | +/** |
| 360 | + * @api {post} /coursework/update Update Coursework |
| 361 | + * @apiName UpdateCoursework |
| 362 | + * @apiGroup Coursework |
| 363 | + * @apiDescription Update existing coursework data. |
| 364 | + * |
| 365 | + * @apiBody {String} id ID of the Coursework to be updated. |
| 366 | + * @apiBody {ObjectId} student ID of the student (ObjectId). |
| 367 | + * @apiBody {String} Coursework type that is either onCampus or offCampus. |
| 368 | + * @apiBody {ObjectId} course ID of the Course in Coursework (ObjectId). |
| 369 | + * @apiBody {ObjectId} task ID of the task in Coursework (ObjectId). |
| 370 | + * @apiBody {String} objectID either its practicals or tutorial or assignment . |
| 371 | + * @apiBody {ObjectId} activity Id of the activity in Coursework. |
| 372 | + * @apiBody {Number} Marks in the Coursework. |
| 373 | + * |
| 374 | + * @apiSuccess {String} res Coursework updated. |
| 375 | + * @apiError (Error 500) DatabaseError Error in updating the database. |
| 376 | + */ |
| 377 | + |
| 378 | +/** |
| 379 | + * @api {get} /coursework/list Get Coursework List |
| 380 | + * @apiName GetCourseworkList |
| 381 | + * @apiGroup Coursework |
| 382 | + * |
| 383 | + * @apiQuery {ObjectId} student ID of the student (ObjectId). |
| 384 | + * @apiQuery {String} Coursework type that is either onCampus or offCampus. |
| 385 | + * @apiQuery {ObjectId} course ID of the Course in Coursework (ObjectId). |
| 386 | + * @apiQuery {ObjectId} task ID of the task in Coursework (ObjectId). |
| 387 | + * @apiQuery {String} objectID either its practicals or tutorial or assignment . |
| 388 | + * @apiQuery {ObjectId} activity Id of the activity in Coursework. |
| 389 | + * @apiQuery {Number} Marks in the Coursework. |
| 390 | + * |
| 391 | + * @apiSuccess {Coursework[]} res Array of filtered coursework documents. |
| 392 | + * @apiSuccess {String} coursework._id ID of the coursework document given by the database. |
| 393 | + * @apiSuccess {ObjectId} coursework.student ID of the student (ObjectId). |
| 394 | + * @apiSuccess {String} coursework.type Coursework type that is either onCampus or offCampus. |
| 395 | + * @apiSuccess {ObjectId} coursework.course ID of the Course in Coursework (ObjectId). |
| 396 | + * @apiSuccess {ObjectId} coursework.task ID of the task in Coursework (ObjectId). |
| 397 | + * @apiSuccess {String} coursework.objectID objectID either Practicals or Tutorial or Assignment . |
| 398 | + * @apiSuccess {ObjectId} coursework.activity Id of the activity in Coursework. |
| 399 | + * @apiSuccess {Number} coursework.marks Marks in the Coursework. |
| 400 | + */ |
| 401 | +======= |
| 402 | +// Module. |
| 403 | +// ------------------------------------------------------------------------------------------ |
| 404 | + |
| 405 | +/** |
| 406 | + * @api {get} module/list Get Module List |
| 407 | + * @apiName GetModule |
| 408 | + * @apiGroup Module |
| 409 | + * |
| 410 | + * @apiQuery {Number} [no] Module number. |
| 411 | + * @apiQuery {String} [name] Name of the module. |
| 412 | + * @apiQuery {String} [outcome] Module outcome. |
| 413 | + * @apiQuery {String[]} [contents] Array of contents of the module. |
| 414 | + * @apiQuery {Number} [hrsPerModule] Number of hours required per module. |
| 415 | + * @apiQuery {String[]} [cognitiveLevels] Array of cognitive levels of attainment as per Bloom's Taxanomy (L1-L6). |
| 416 | + * |
| 417 | + * @apiSuccess {module[]} res Array of Filtered module Doc. |
| 418 | + * @apiSuccess {String} module._id ID of document given by database. |
| 419 | + * @apiSuccess {String} module.no Module number. |
| 420 | + * @apiSuccess {String} module.name Name of the module. |
| 421 | + * @apiSuccess {String} module.outcome Module outcome. |
| 422 | + * @apiSuccess {String[]} module.contents Array of contents of the module. |
| 423 | + * @apiSuccess {Number} module.hrsPerModule Number of hours required per module. |
| 424 | + * @apiSuccess {String[]} module.cognitiveLevels Array of cognitive levels of attainment as per Bloom's Taxanomy (L1-L6). |
| 425 | + */ |
0 commit comments