Attendance, Itinerary, Result Functions¶
-
misbot.spider_functions.
attendance
(bot, update)¶ Core function. Fetch attendance figures from Aldel’s MIS. Runs AttendanceSpider for registered users and passes it their
Student_ID
(PID),Password
, &ChatID
(necessary forAttendancePipeline
)AttendanceSpider
creates a image file of the format:<Student_ID>_attendance.png
File is deleted after being sent to the user. If the file is unavailable, error message is sent to the user.Parameters: - bot (telegram.bot.Bot) – Telegram Bot object
- update (telegram.update.Update) – Telegram Update object
-
misbot.spider_functions.
results
(bot, update)¶ Fetch Unit Test results from the Aldel MIS. Core function. Fetch Test Reports from Aldel’s MIS. Runs
ResultsSpider
for registered users and passes it theirStudent_ID
(PID) &Password
.ResultsSpider creates a image file of the format:
<Student_ID>_tests.png
File is deleted after being sent to the user. If the file is unavailable, error message is sent to the user.Parameters: - bot (telegram.bot.Bot) – Telegram Bot object
- update (telegram.update.Update) – Telegram Update object
-
misbot.spider_functions.
itinerary
(bot, update, args)¶ Core function. Fetch detailed attendance reports from Aldel’s MIS (Parent’s Portal). Runs
ItinerarySpider
for registered users and passes it theirStudent_ID
(PID) &Password
.AttendanceSpider
creates a image file of the format:<Student_ID>_itinerary.png
Ifargs
are present, full report is sent in the form of a document. Otherwise, it is cropped to the past 7 days usingmisbot.mis_utils.crop_image()
and this function stores the resultant image as:<Student_ID>_itinerary_cropped.png
and returns True.File is deleted after sent to the user. If the file is unavailable, error message is sent to the user.
Parameters: - bot (telegram.bot.Bot) – Telegram Bot object
- update (telegram.update.Update) – Telegram Update object
- args (tuple) – User supplied arguments
-
misbot.spider_functions.
profile
(bot, update)¶ Fetch profile info from the Aldel MIS. Core function. Runs
ProfileSpider
for registered users and passes it theirStudent_ID
(PID) &Password
.ProfileSpider creates a image file of the format:
<Student_ID>_profile.png
File is deleted after being sent to the user. If the file is unavailable, error message is sent to the user.Parameters: - bot (telegram.bot.Bot) – Telegram Bot object
- update (telegram.update.Update) – Telegram Update object