This project involves enhancing an existing Online Course application by implementing a new course assessment feature. You will utilize your Django full-stack development skills to design and integrate models, templates, and views to support the new functionality. Additionally, you will test the application to ensure it meets the required specifications.
The provided boilerplate code serves as the starting point for this project. Your task is to extend the functionality according to the requirements outlined below.
By completing this project, you will:
- Understand the feature requirements: Comprehend the purpose and functionality of the new course assessment feature.
- Design and implement models: Create models for
Question
,Choice
, andSubmission
to support exam-related features. - Admin site setup: Create a new course object and configure the admin site to manage exam-related models.
- Enhance templates: Update the course details template to display questions and choices.
- Build new views:
- Create a new view to handle exam result submission.
- Create a new view to display and evaluate the exam result.
- Test the application: Verify that all features function as expected.
- Create models for:
- Question: Represents a question in the course exam.
- Choice: Represents answer choices for a question.
- Submission: Stores a user’s exam responses.
- Register the
Question
,Choice
, andSubmission
models in the Django admin site. - Configure the admin interface to allow easy management of exam-related data.
- Update the course details template to display:
- A list of questions.
- The available choices for each question.
- Design a new template to display the result of a submitted exam, including:
- The user’s responses.
- The correct answers.
- The overall score.
- Implement function-based views to handle:
- Exam Submission: Process and store a user’s exam responses.
- Exam Evaluation: Calculate and display the exam results based on user submissions.
- Create URL patterns to:
- Access the course details page with exam questions.
- Submit the exam.
- View the exam results.
- Models (3 Marks): Correctly implement the
Question
,Choice
, andSubmission
models. - Model Registration (3 Marks): Successfully register the models in the admin site.
- Admin Site Setup (1 Mark): Ensure the admin site works as expected for managing exam data.
- Course Details Template (2 Marks): Properly display questions and choices in the course details section.
- Views (2 Marks): Write function-based views for handling exam submission and result display.
- URLs (2 Marks): Implement URL patterns for accessing the new views.
- Exam Result Display (2 Marks): Show the final result accurately in the exam result template.
- Updated Models:
Question
,Choice
, andSubmission
models. - Admin Site Configuration: Models registered and functional.
- Templates:
- Updated course details template.
- New exam result template.
- Views:
- Function-based views for exam submission and result evaluation.
- URLs: Patterns for the new views.
- Test Results: Ensure all functionality works as expected.
This project is designed and authored by Muhammad Yahya as part of the Django Full-Stack Development course on CognitiveClass.ai.
ER Diagram For your reference, we have prepared the ER diagram design for the new assesement feature.