Skip to content

Conversation

@sazedul-haque
Copy link
Collaborator

No description provided.

@sazedul-haque sazedul-haque added the 4.0.0 Tutor v4.w0w label Jan 26, 2026
Base automatically changed from v4-learning-area-lesson to 4.0.0-dev January 27, 2026 06:46

$comment_id = 0;
$comment = Input::post( 'comment', '', Input::TYPE_KSES_POST );
$lesson_id = Input::post( 'comment_post_ID', 0, Input::TYPE_INT );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A validation check should be added for comment & the lesson_id.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function also used for load more in legacy mode. Cannot early return if comment and lesson_id not found.

Centralized comment and reply DOM ID prefixes and class names into constants to reduce duplication and improve maintainability. Updated all relevant DOM queries and element ID constructions to use these constants.
Adds logic to ensure the toast container is appended to the fullscreen element when the document enters fullscreen mode. This ensures toast notifications remain visible and correctly positioned during fullscreen transitions.
Introduce on_change and bind_active_value support to DropdownFilter. Adds protected properties ($on_change, $active_value) and fluent setters (on_change(), bind_active_value()). Integrates Alpine.js state into x-data to expose labels and counts, binds button label and count to Alpine variables when active_value is set, and conditionally renders option items as buttons that invoke the provided JS callback (or falls back to anchor links). Preserves existing search and count behavior while enabling reactive UI updates via Alpine and a JS change callback.
Replace buffered PHP template with string construction using sprintf. Subtitle is now conditionally built into $subtitle_html, attributes are injected via get_attributes_string(), and the resulting markup is stored in $this->component_string and returned. This simplifies rendering and removes reliance on output buffering while preserving escaping for title and subtitle.
Add editingId and replyingId to the lesson comments state and reset them after successful edit/reply. Rename typo'd handelEditComment to handleEditComment. Update comment template to replace showEditForm/showReplyForm with editingId/replyingId checks, adjust x-show/x-cloak and cancel handlers to clear IDs, and dispatch focus events when opening forms. These changes centralize which comment is being edited or replied to and fix form visibility/behavior and focus handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.0.0 Tutor v4.w0w

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants