This commit refactors the LMS architecture from a flat 2-tier structure to a granular 3-tier structure to support better course organization, while ensuring zero downtime or breaking changes for existing frontend clients.
Introduced `CourseChapter` model as the new grouping layer
2 endpoints (`/v2/.../lessons/`): Introduced new `LessonListV2APIView` and `CourseChapterSerializer` to return the new nested JSON schema (Chapters -> Lessons) for the upcoming accordion UI.
Created robust `migrate_lessons_to_chapters` management command.
Registered `CourseChapter` and added `CourseChapterInline` to `CourseAdmin` for seamless content management.
moved the Quizzes tab in Course section.
in the course details we have a quiz section ,accessing to all the quizzes of that course
an action button for quizzes to navigate to related course added
quiz model updated with course field
book creation is now only creates if a edition or folder mentioned, not blindly all the volumes !
script deletes the old books
some models updated with new values
updated the not supported lazy text fields
add inline tabs for course , livesession and quiz tabs
enhanced chat messages tab to manage messages better
updated the dropdown styles for better ux
updated missing lazy text keywords for django messages in related models
updated .po file and translate the empty values in it
add a unfold translations file to keep the unfold messages whenever we run makemasseges.
models updated with lock values , course model has two group lock and professor lock options
serializers updated with new fields
admin panel updated for this new fields
signals configured to automatically lock/unlock the chatrooms related to courses based on the boolean values of course
to chat room page navigation shortcut is updated with unfold action buttons instead of html files
- Enhanced session handling by checking for active sessions before creating a new room in PlugNMeet, reducing unnecessary API calls.
- Implemented logic to reactivate ended sessions and log relevant actions for better traceability.
- Added conditional room creation to avoid duplicate rooms, improving overall efficiency and user experience.
- Updated CourseLiveSessionRoomCreateAPIView to filter out ended sessions by adding `ended_at__isnull=True` in the session creation logic.
- Introduced a new method in CourseLiveSessionTokenAPIView to build centralized metadata for room settings, ensuring client overrides are not permitted and enhancing session configuration consistency.
- Updated CourseLiveSessionRoomCreateAPIView to filter out ended sessions by adding `ended_at__isnull=True` in the session creation logic.
- Introduced a new method in CourseLiveSessionTokenAPIView to build centralized metadata for room settings, ensuring client overrides are not permitted and defining default lock settings and room features.
- Improved room verification logic in CourseLiveSessionTokenAPIView to handle both boolean and string responses for room activity status.
- Added functionality to automatically recreate inactive rooms for professors while denying token issuance for students if the room is inactive.
- Enhanced logging for better traceability of room status and actions taken during token requests.
- Introduced a new method to handle room recreation in PlugNMeet, ensuring sessions can be reactivated when necessary.
- Added TokenAuthentication to allow users to authenticate with a token while still permitting access without authentication.
- Removed redundant debug print statements related to token validation to streamline the code and improve readability.
- Added checks in get_saved_location method to ensure user is authenticated and has location_history attribute before attempting to access it.
- Improved robustness of location retrieval logic to prevent errors for unauthenticated users.
- Updated permission classes to allow any user for GET requests, enhancing accessibility.
- Added detailed logging for both GET and POST requests to track request data and processing steps.
- Improved handling of user authentication status in log messages for better traceability.
- Added detailed logging for GET and POST requests in CourseOnlineClassTokenValidateAPIView to track user actions and course validation.
- Improved logging in OnlineClassTokenManager for token generation, storage, retrieval, and deletion processes, including error handling for Redis interactions.
- Commented out the entire class and method definitions for the PlugNMeetWebhookAPIView to facilitate debugging and future modifications.
- Retained the structure and docstrings for clarity on event handling and signature verification.
- Enhanced debug logging for signature verification to assist in identifying issues during development.