Skip to content

The πŸ‘¨πŸΏβ€πŸ’» Online Course Application has a built-in πŸ“š assessment feature πŸ“. Learners can take multiple-choice exams βœ…, submit answers πŸ“€, and get feedback πŸ“Š. The project uses Django 🐍 for the backend and Bootstrap 🎨 for the frontend styling.

License

Notifications You must be signed in to change notification settings

Willie-Conway/Online-Course-Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Add a New Assessment Feature to an Online Course Application πŸŽ“

Online Course Application

Overview 🌟

In this project, we implement an assessment feature to an Online Course Application. The feature allows learners to take an exam, submit their answers, and get results based on their performance. This process includes creating models, handling form submissions, displaying dynamic content in templates, and providing feedback to the learner.

Tasks Completed βœ…

1. Build New Models πŸ› οΈ

We created the following models:

  • Course: Represents the course details.
  • Enrollment: Links a learner to a specific course.
  • Question: Represents a question in the exam.
  • Choice: Represents possible answers for each question.
  • Submission: Stores learner responses and links to an enrollment.

These models allow for the creation of relationships between courses, students, questions, and answers.

2. Register Model Changes πŸ“‹

After creating models, we registered them in Django's admin panel for easy management. This allows us to add courses, questions, and choices directly via the admin interface.

3. Update the Course Detail Template πŸ–₯️

We updated the course_details_bootstrap.html template to display:

  • The exam questions for the course.
  • The choices for each question in a user-friendly, Bootstrap-styled interface.
  • An option to start the exam when the user is authenticated.

4. Test Data πŸ§ͺ

We added sample test data including:

  • Instructor (admin user).
  • Course: "Learning Django", with lessons and course content.
  • Test Questions with correct and incorrect choices.

5. Submission Evaluation πŸ“ˆ

We implemented the submit view that:

  • Captures answers submitted by the learner.
  • Creates a new Submission record.
  • Compares answers with the correct choices and calculates the score.
  • Redirects the user to the exam result page.

6. Complete the Exam Result Template πŸ†

We created the exam_result_bootstrap.html template to display:

  • The learner’s total score.
  • Whether the learner passed or failed the exam.
  • Feedback on each question showing:
    • Correct answers.
    • Incorrect answers with an option to retake the exam.

This was all styled using Bootstrap to create a responsive, user-friendly interface.

Technologies Used βš™οΈ

  • Django: Backend framework for creating models, handling forms, and rendering templates.
  • Bootstrap: Frontend framework for styling the templates.
  • Python: Programming language for implementing the business logic and views.
  • HTML/CSS: For structuring and styling the course exam interface.

How to Run the Project Locally πŸš€

  1. Clone the repository:

    git clone <repo-url>
    cd <repo-directory>
  2. Install dependencies:

    Ensure you have virtualenv installed and create a virtual environment.

    python -m venv venv
    source venv/bin/activate  # For MacOS/Linux
    venv\Scripts\activate     # For Windows
    pip install -r requirements.txt
  3. Run migrations to set up the database:

    python manage.py migrate
  4. Create a superuser to access the Django admin panel:

    python manage.py createsuperuser
  5. Run the development server:

    python manage.py runserver
  6. Access the application by visiting http://127.0.0.1:8000 in your browser.

  7. Login to the Django Admin panel to manage data (courses, questions, etc.) by navigating to http://127.0.0.1:8000/admin/.

How the Exam Process Works πŸ“

  1. Learner Enrollment: Users can enroll in courses by signing up and selecting courses.
  2. Exam Start: Once enrolled, they can start the exam by clicking the "Start Exam" button.
  3. Answer Submission: Learners choose their answers from a list of multiple-choice questions, and then submit their answers.
  4. Exam Results: After submission, learners are redirected to a results page showing their score, whether they passed or failed, and feedback on their answers.

Key Features ⭐

  • Multiple Choice Questions: Each question can have multiple correct choices, and the user selects the answers they think are correct.
  • Dynamic Exam Interface: The exam interface is updated dynamically based on the questions and choices for each course.
  • Results Feedback: Learners receive detailed feedback on their answers, including which choices were correct or incorrect, and their overall score.
  • Admin Panel: Instructors and admins can manage courses, questions, and choices through the Django admin panel.

Screenshot Examples πŸ“Έ

1. Course Details Page

Course Details

2. Exam Results - Pass πŸŽ‰

Exam Results - Pass

3. Exam Results - Fail 😞

Exam Results - Fail

Authors ✍️

  • Willie Conway
  • Yan Luo
  • Muhammad Yahya

Acknowledgements 🀝

This project is part of the IBM Developer Skills Network. All rights reserved by IBM Corporation.


Feel free to contribute or ask any questions regarding the project! 😊

ER Diagram Onlinecourse ER Diagram

About

The πŸ‘¨πŸΏβ€πŸ’» Online Course Application has a built-in πŸ“š assessment feature πŸ“. Learners can take multiple-choice exams βœ…, submit answers πŸ“€, and get feedback πŸ“Š. The project uses Django 🐍 for the backend and Bootstrap 🎨 for the frontend styling.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •