CSC/ECE 517 Spring 2018- Project E1822: Extend the functionality of badging

From Expertiza_Wiki
Jump to navigation Jump to search

Problem Statement

The aim of this project is to extend the functionality of badging that was implemented previously. [(Previous Implementation)].

The primary objectives for this project are as follows:

  1. Allowing Instructor to create new badges - which involves adding name and badge image and letting the instructor add them to the assignment
  2. Students must be able to suggest "Good Teammate" badges during the teammate review periods.
  3. Students must be able to suggest "Good Reviewer" badges, for reviews received.
  4. Create a pipeline to enable instructor to manually approve badges suggested by students

Background And Motivation

Previous Implementation

The use of badges will encourage students to have a visual motivation based on their achievements and thus perform better. This has the ability to improve the overall class performance.

With such an aim of improving the over all class performance, badging system for Expertiza was implemented, as an [earlier project]. In that implementation, certain students are awarded badges when certain criteria are met which may include exceptional academic performance in assignments, project submissions etc. Two such badges, Good Reviewer and Good Team mater were implemented, with students receiving them automatically based on a threshold score in those categories. This was a static system with fixed number of badges.

The team had implemented the system, by introduction of 3 new badge related tables

1. “badges” :- id , name, description

2. “assignment_badges” :- id, badge_id, assignment_id, threshold

3. “awarded_badges” :- id, badge_id,participant_id

Motivation

The primary motivation behind this project is to give more flexibility to the instructor to assign badges instead of relying solely on automatic scoring. Also, allowing students to suggest Good Teammate and Good Reviewer badges for their peers will give them an incentive to put in more effort towards carefully reviewing other's work, and encourage them to actively participate in team projects.

Team Members

Students who collaborated to work on this problem statement are :

1. Akshay Ravichandran

2. Arunkumar Krishnamoorthy

3. Harish Pullagurla

4. Krithika Sekhar

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

Design Description

The following steps briefly describe the implementation steps taken during the course of this project. Two major flows exist in this project , one being new badge creation and associating them with the assignment. Second one is modifying the flow for good teammate and reviewer badges to be present in appropriate question section.

Usecase Diagram


Creation of new badges

When an assignment is created/edited, there is a checkbox called "Has Badges?". Checking this renders the "Badges" tab. This tab currently lists the two available badges namely "Good Reviewer" and "Good Teammate" as specified in expertiza/app/views/assignments/edit/_badges.html.erb.

To add a new badge which is a new functionality, we display a button, at the end of the badges tab, which redirects the user to a page enabling him to create a New badge. The new form fields include Badge Name, Image and Description. Upon saving the user is again redirected back to the earlier assignments display display.

Adding Badges to Assignments

We change this view to allow an instructor to add a new badge, and select all badges that will be applicable to this assignment. The view is changed to display all the available badges and a check box to select each of them. It was initially present as a badge vs threshold display. Once the user clicks save, entries are modified in the data base.

Assignment of "Good Teammate" badges by student

Presently, the assignment of this badges is done automatically based on a threshold, which is set during assignment creation. The score is calculated based on answers to questions on the review page.

In this implementation, the earlier flow was changed to allow participant to be able to suggest these badges to their fellow students. To enable this process, a new question in the format of a checkbox, was added into the teammate review questionnaire. This question appears after the Additional Comments section.

Upon selection of this check box an entry is made into the assigned badges table with the participant id and approval status being 0, implying that it is pending with the instructor, for approval before displaying.

Assignment of "Good Reviewer" badges by student

Similar to Good Teammate badge, in the existing workflow, good reviewer was also assigned based on score and threshold. This is modified in our implementation, in a similar way as that of teammate badge. We add a "Good Reviewer check box" as a question in the feedback of the reviews given page. An entry is made to the awarded badges table with the approval status as 0. Once this field is changed to 1, it would display badges in the assignment row .

Approval of badges by instructor

Currently, the awarded_badges table has no column to indicate the approval status of an awarded badge. A db migrate was run to include this column.

Visibility of assigned badges to Students

Once approved by the instructor, the badges assigned would be visible in the assignment tab of the website as shown in the image. Badges corresponding to each of the assignments will be seen on the row of that particular assignment.

Implementation Details

Files modified

Models

  • expertiza/app/models/assignment_badge.rb - create badges without threshold method was added
  • expertiza/app/models/assignment_form.rb - update assigned badges method was added. this method modifies the db entries for assignment_badges table based on the checkbox entries
  • expertiza/app/models/awarded_badge.rb - suggest badge method was added, which is called when badge is suggested by student by checking the checkbox in questioner.
  • expertiza/app/models/badge.rb - functionality to get image name from name was added

Controllers

  • expertiza/app/controllers/assignments_controller.rb - Modifications were done to include the functionality of displaying all badges in the badges tab and check box based selection process
  • expertiza/app/controllers/badges_controller.rb - This was a new file added in this implementation . Code on handling new badge creation, in create method was added.
  • expertiza/app/controllers/response_controller.rb - Modification to process question responses from checkbox about badges were added to this file

Views

  • expertiza/app/views/assignments/edit/_badges.html.erb - Modification to display all available badges to badges tab as checkbox was done. Also a link to creating a new badge is provided
  • expertiza/app/views/badges/new.html.erb - New file to create a new badge was added to this file
  • expertiza/app/views/badges/_form.html.erb - New file to create a form for badge was added to this file
  • expetiza/app/views/response/response.html.erb - Modification to display checkbox questions in review questioner was added to this file

Database changes

  • Add a new column 'approval_status' in the awarded_badges table

Routes

  • Routes for badges was added

Test Plan

New rspec file was added in spec/models/badge_spec.rb. Test cases were written to validate the different conditions of creating a new badge. Here are the test cases:

1. it is valid when it has a name, description and image name

2. it is invalid when it does not have a name

3. it is invalid when it does not have a description

4. it is invalid when it does not have an image name

Future Work

  1. The approval workflow is currently missing - when a student assigns a badge to a peer, the approval status is set to 0 and it will never appear in the other student’s homepage. Workflow to change the status by the instructor must be implemented.
  2. There is currently no way for a newly created badge to be assigned to a student through the UI, even if it has been added to an assignment. This needs to be implemented.
  3. Instructors cannot directly assign “Good Reviewer” badge through the UI. A separate flow to enable instructors to do that would be useful

References

  1. Pull Request for present implementation
  2. Link to Screen-cast of our implementation
  3. Expertiza on GitHub
  4. The live Expertiza website
  5. Previous Badge implementation page