added crud operations for Course

This commit is contained in:
Hosein
2026-01-01 16:24:34 +03:30
parent 4767a1af15
commit 389a763571
8 changed files with 379 additions and 20 deletions
+11 -1
View File
@@ -1,7 +1,17 @@
from . import students, teachers
from . import students, teachers, courses
from bot.handlers.start import startMarkup
def register_all_callbacks(bot):
"""Register all callback handlers"""
students.register(bot)
teachers.register(bot)
courses.register(bot)
# Cancel is common among all
@bot.callback_query_handler(func=lambda call: call.data == 'cancel')
def cancel_action(call):
bot.clear_step_handler(call.message)
bot.send_message(call.message.chat.id,
"Action cancelled.", reply_markup=startMarkup())
bot.answer_callback_query(call.id)