Skip to content

Conversation

@Anindra123
Copy link
Collaborator

@Anindra123 Anindra123 commented Dec 22, 2025

Overview

This pr introduces a UI design overhaul for Quiz Attempts page for Instructor on frontend dashboard. The page has been made dynamic with PHP components that was created.

Changes

  • A new method format_quiz_attempts() was added in QuizModel class, this takes the query result of all the quiz attempts and formats it in an array for rendering the quiz attempt list properly.
    • This is done because the current query result returns list of attempts
    • Instead i need the quiz attempts in following format
     array(
     	'quiz_id' => '',
     	'course_title' => '',
     	'quiz_title' => '',
     	'attempts' => array()
     );
    
    • This ensures the nesting of attempts work, since multiple attempts are under a single quiz.
  • Another method get_quiz_attempts_nav_data() was added in Quiz_Attempt_List which provides the nav links to be used by the Nav php dynamic UI component .
  • Pagination is done from the array instead of the query by using array_slice().
  • Replaced the kebab menu for each quiz item in list with Popover php dynamic UI component.
  • Also replaced the badges with its relative php UI component.
  • Utilized Modal php component for confirmation modal
  • Added SearchFilter , Sorting components for searching and sorting list
Dashboard-Page-–-tutor-dev

@Anindra123 Anindra123 added the 4.0.0 Tutor v4.w0w label Dec 22, 2025
@Anindra123 Anindra123 marked this pull request as ready for review December 23, 2025 09:28
@include tutor-breakpoint-down(sm) {
padding-bottom: $tutor-spacing-16;
}
padding-bottom: $tutor-spacing-7;
Copy link
Collaborator

Choose a reason for hiding this comment

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

already has padding-bottom at line number: 27

tutor_load_template_from_custom_path( $pagination_template_frontend, $pagination_data );
}
?>
$confirm_delete = Button::make()->label( __( "Yes, I'm sure", 'tutor' ) )
Copy link
Collaborator

Choose a reason for hiding this comment

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

I have made a delete confirmation modal component. Please use there here after my PR is merged.

@@ -0,0 +1,23 @@
<?php
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need this if delete confirmation modal component is used

&-header {
display: grid;
grid-template-columns: 340px 180px 1.5fr 1fr;
grid-template-columns: 300px 180px 1.5fr 1fr;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Double check with the design.

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.

3 participants