Quiz It Phase 2

Ensure that Quiz It Phase 1 is completed before starting this task. In Phase 2, you will focus on additional features in settings and quiz configurations. You will be building this project as part of our Ruby on Rails.

Max Chat

General instructions

The provided design for Phase 2 should serve as a solid foundation for building the next set of features, just like Phase 1. All elements of the design must be included in the application, but you may make UI/UX adjustments if there are strong, well-reasoned justifications. If there are any gaps in the requirements or design, fill them sensibly. Additionally, make sure to account for different edge cases in the application during this phase.

Requirements

Below are the listed components required for the Phase 2:

Settings

The settings will include two additional tabs: Redirections and Categories, with the General settings page displayed by default. The selection of the sub-setting should be reflected in the path of the URL.

Max Chat

Redirections

The redirection settings enable a user to add redirections for the quiz application. The logic for handling redirections, to direct a webpage from the from path to the to path, must be written at the backend rather than at the front end. All redirections should be performed with 301 status codes. When the user clicks the Add new redirections button, a new form that accepts from path and to path should be displayed. During this time, further addition of redirections must be prevented hence the Add new redirections button should be disabled.

Internal prefixing for from path should be done by the system. The case with to path can be handled as follows:

  • If it doesn’t have a subdomain like say www. or spinkart. etc, then we can assume that it’s a path. In this case, the system can do prefixing.

  • In all other cases assume that it’s a full URL and no prefixing needs to be done

Long URLs should be truncated and a tooltip must be present to show the expanded form. Once the user clicks on the horizontal menu icon, a dropdown with two options should be presented, Edit & Delete. Proper form validation should be done both during the creation and updation of redirections. Validations must be made to achieve the following :

  • Prevent cyclic redirections

  • From path should not be the same for two redirections.

You can add more validations depending on the business logic.

Categories

This page should enable a user to add, reorder, edit, and delete categories.

Upon hovering over a category, an icon indicating that the category can be rearranged should appear on the left-hand side as shown. Reordering can be done using the drag-and-drop functionality. Ensure that this ordering is also reflected in the backend as well. You can use acts_as_list or ranked_model gem in the backend for the same. This order is the order of categories that must be reflected on the public page in the way the quizzes are arranged.

Max Chat

Managing categories

A user should be able to add categories by clicking on the Add new category button. This should open up a modal prompting the user to fill in the title of the category.

On clicking the horizontal menu icon, the dropdown should be rendered with options to Edit and Delete a category. When deleting a category, no need to delete the corresponding quizzes under it. Deleting a category should not impact any quiz's existence. But, given that all quizzes ought to belong to a category, we have to add an alert as shown below during the deletion of a category. An edge case would be there when there's only one category left and when we are deleting that category. In that case, rephrase the alert and point out that all quizzes under that category will be moved to a new category called General.

Quiz configuration

For individual quizzes, you should have configuration options within the quiz itself. You can manage Quiz Visibility to control whether the quiz is displayed on the public homepage. The Quiz Timing settings should allow you to configure time limits for the quiz. Additionally, you should be able to customize Questions & Options by setting preferences for quiz questions and their answer options. Finally, Email Notifications can be configured to manage notifications related to quiz submissions.

Max Chat

Quiz visibility

Since the public homepage is where people can find quizzes created within your organization, you should choose which quizzes to display, making them discoverable and accessible to everyone.

Only published quizzes should be configured to appear on the homepage. Published but hidden quizzes should remain accessible via a direct link but should not be displayed on the public homepage. Draft quizzes should not have the option to be made visible on the homepage.

Each configuration page should include breadcrumbs above the title to help users navigate back to the main configuration page.

Max Chat

Quiz timing

You should be able to enforce time limits for your quiz in the Quiz Timing configurations, requiring candidates to complete it within a specified timeframe. You should be able to set the time limit, and candidates can submit the quiz at any point before the timer runs out. If the timer expires, their attempt will be automatically submitted. A visible timer should be displayed while the quiz is in progress, ensuring candidates are aware of the remaining time.

Max Chat

Questions & options

This setting should enable the option to randomize questions and choices, shuffling the order of questions and options for each quiz attempt. By default, both options should be enabled.

Max Chat

Email notifications

This setting should enable the option to receive an email when a quiz is submitted. The email should be sent to the quiz creator and contain details such as the name of the quiz, the candidate's name and email, and their score. The subject of the email should include <quiz-name> submitted by <candidate's name>.

Max Chat

More projects

These are some of the projects you'll build while learning.