CSC/ECE 517 Fall 2017/E17A2. Lightweight badging system based on Credly

From Expertiza_Wiki
Jump to navigation Jump to search

Purpose

The implementation of a badging system provides a boosted visual motivation for the students to work towards achieving that badge. This has the ability to improve the overall class performance.

Team: Ankit Jain

Rajan Alwan

Riken Shah

Sanya Kathuria

Mentor - Zhewei Hu,(zhu6@ncsu.edu)

Problem Statement

The aim of this project is to implement a badging system for Expertiza where certain students are awarded badges when certain criteria are met which may include exceptional academic performance in assignments, project submissions etc. We will be using Credly to make Badges. We will be working on building two badges:

  1. Good Reviewer
  2. Good Teammate

Flowchart Of the System

Description of the Badges

Why develop Badge-System?

The use of badges will encourage students to have a visual motivation based on their achievements and thus perform better. For every assignment in Expertiza, we have students perform differently on a scale of 100 based on the reviews their projects receive from their peers. The topper badges will be used to honor the team(s) which scores the maximum for an assignment.

What does the badge-system do?

We have developed two badges — "Good Reviewer" and "Good Teammate" but the design has been developed in such a way that the badging system can be easily extended to include more badges in the future. The "Good Reviewer" badge will be awarded to students who receive very high review grades. The "Good Teammate" badge will be awarded to team members who receive very high teammate review scores. By default, the "threshold" for earning these badges is set to a score of 95, but this value is configurable on a per-assignment basis by the instructor. A new "Badges" tab will be added for instructors on the "Edit Assignment" page where instructors can add badges and configure the badge criteria for a given assignment. Badges a student has earned can be seen when they view their "Task List" page, and an instructor will be able to view all badges earned by students when they view the "Participants List" page.

What are the badges and Who will be awarded?

Good Reviewer

Icon

Who will be Awarded

“Good reviewer” is the badge that one student receives very high review grades assigned by teaching staff (by default 95).

Good Teammate

Icon

Who will be Awarded

In Expertiza students are required to give reviews to the work of other teams. This is evaluated on a scale of 100% by the teaching staff. “Good teammate” is the badge that each team member receives very high teammate review scores (by default 95).

How do we make badges configurable?

The criterion to assign badge should be configurable. After creating a new assignment, the threshold for the badges can be specified in assignments/edit page. The below image shows the how the page looks like.


Modified Files

Tables to be Modified

  1. We have created a table named “badges”, with the following attributes:
    1. id: primary key
    2. name: varchar
    3. description: varchar
  2. We have created a mapping table named “assignment_badges”, with the following attributes:
    1. id: primary key
    2. badge_id: foreign key
    3. assignment_id: foreign key
    4. threshold: int
  3. We have created a mapping table named “awarded_badges”, with the following attributes:
    1. id: primary key
    2. badge_id: foreign key
    3. participant_id: foreign key

Files to be Modified

  1. We have inserted the new code related to “Good Teammate” badge to teammate_review_response_map.rb.
  2. We have inserted the new code related to “Good Reviewer” badge to review_response_map.rb
  3. We have added badges to student_task/list page and a new column named Badge.
  4. We have added badges to participants/list for the instructor to view.
  5. We have added a tab to edit the badge attributes on the assignments#edit page.

How does it look like?

Rationale behind the implementation :

1. As per requirement, the badges need to be displayed in the list view for both instructors and students. And thus, the list.html.erb has been chosen as the views to be modified.

2. The controllers student_task_controller.rb and participants_controller.rb are invoking the views as shown below. Thus, this list method in both the controllers need to be refactored to figure out what badges the team or an individual student needs to be awarded.

3. All business logic regarding badge assignment criteria will be put in teammate_review_response_map.rb and review_response_map.rb created for “Good teammate” and “Good reviewer” badge respectively.

When only one Badge is assigned :

Assigning both the badges together :

Test Plan

We have developed the project using the TDD methodology. We have thoroughly tested all the functionalities we have implemented by writing automated test cases in features/specs/badge_system_spec.rb file in Expertiza.

The following are the testing scenarios and how we went along implementing them:

  1. The assignments#edit page has a tab named badges.
    1. We login using instructor6
    2. Visit the assignments#edit page
    3. Try to click the Badges tab
  1. In the badges tab, allow the instructor to change the threshold value of the badges, above which the badges will be awarded to the students.
    1. The badges tab is entered
    2. The input field for Good Reviewer Threshold is filled with 96 from 95
    3. The input field for Good Teammate Threshold is filled with 97 from 95
    4. Check whether these values reflect in the database
  1. Assign the “Good Teammate” badge to a student when the student receives a very high average teammate review grade (higher than 95 by default).
    1. We change to student display
    2. Obtain teammate review score from the AwardedBadge model's get_teammate_review_score method that we defined
    3. Obtain threshold for that assignment
    4. If the threshold is lower, we expect to see a Good Teammate badge on the page
  1. Assign the “Good Reviewer” badge to a student when the student receives a very high review grades assigned by teaching staff (higher than 95 by default).
    1. We change to student display
    2. Obtain review score from the ReviewGrade model's grade_for_reviewer attribute
    3. Obtain threshold for that assignment
    4. If the threshold is lower, we expect to see a Good Reviewer badge on the page
  1. Instructor can view all badges assigned to all participants.
    1. Login as instructor6
    2. Visit the participants#list page
    3. Expect to see the badges column in the page


Command to run the testcase file : rspec badge_system_spec.rb

Other References

See the screencast at https://youtu.be/WtPns8mG2K8.

Pull request is available from https://github.com/rikenshah/expertiza.

Future Improvements

Currently, the average score of all the reviews for each assignment is computed dynamically and not stored anywhere in the database. This incurs huge latency in loading the pages which query the score. This is the reason why "Review Score" page from instructor view takes a long time to load.

For the topper badge, we need to query the average score of all the teams for all the assignments in a particular course and decide whether the current user is the member of the team having the highest score in any of these assignments. This involves a large number of computations and increases the home page load time of student view by an unacceptably large margin. Currently, a project is underway to fix this problem by storing the scores of teams in the database. Once this task is completed, we can refactor our Top Score method to take advantage of this change. This will significantly reduce the latency of the Top Score badge for both student and Instructor view.