CSC/ECE 517 Spring 2018- Project E1818: Role-based reviewing

From Expertiza_Wiki
Revision as of 15:32, 4 May 2018 by Bjain (talk | contribs)
Jump to navigation Jump to search

Introduction

Problem Statement

The project is created to enable role-based team-mate reviews. These roles can be better named as duties, corresponding to the duty of a team member in a particular project. Borrowing from different Agile methodologies like SCRUM, each team member has a particular role for example: architect,facilitator and implementer.A much more meaningful review can be done if the review rubric was duty-specific. Currently, there is a generic teammate review rubric for all assignments. This means that some review questions are not applicable for all team members. For instance, if there is a question “What percentage of the code was written by this member?” This may not be applicable for the team member who wrote tests or documentation.Similarly, design document specific questions may not be applicable to other members.The instructor should be able to use a different team-mate review rubrics for evaluating the contribution of students depending on their duty.

UML Diagram


In a UML Class diagram, The relationships depicted above are as follows:

  • Between the User and Duty class, there is a bidirectional association. The user table is used for both the instructor and the student.
    • Each instructor can have multiple roles that he can choose from for a particular assignment/questionnaire.
    • Each student can have 0 or 1 role for a particular project. The value of the duty for that project team is stored in TeamUsers.
  • AssignmentsDutyMapping stores the value for all duties applicable to a particular assignment, hence it is an aggregation of the duties for an assignment.
  • AssignmentDutyQuestionnaireMapping adds the questionnaire_id for a particular AssignmentDutyMapping thus has a direct dependency to AssignmentDutyMapping and has an association with the Questionnaire table.
  • StudentTeams uses the AssignmentDutyMapping to table to find available duties for a particular assignment to allow teammates to select. It then uses the Duty table to fetch the respective name of the found duty_id.

Implementation

The project introduces changes from the instructor view and the student view. The changes are as follow:

Migration changes

  • Create Duties table: This table stores all the duties created by any instructor.
              * id - The duty ID will be used by other tables like the questionnaire table and hence will be the primary key.
              * assignment_id - An assignment has particular duties. Thus, the assignment number will be the foreign key for the Duties table. 
              * instructor_id - The Duties created by one Instructor should be visible and reusable by that instructor only. Thus, the instructor id will also be a foreign key in the Duties table.
  • Create assignments_duty_mappings table: If an instructor wants to add multiple duties for an assignment, storing it in the duty table will cause the duty to be overwritten. Thus we have created a table which maps an assignment and all its duties.
              * id 
              * assignment_id 
              * duty_id
  • Create assignment_duty_questionnaire_mappings table : This table is created to store the questionnaire for team-mate review rubrics and the corresponding duty id.
              * id 
              * assignment_id 
              * duty_id
              * questionnaire_id
  • Added a column entry named "role_based_assignment" in the assignments table which would be of type boolean. This field saves the status of the role based review check box.
  • Added a column entry named "allow_multiple_duties" in the assignments table which would be of type boolean. This field saves the status of the check box for allowing multiple students with the same role.
  • Added a column entry named "Duties" to the Users table of type string. This field saves the duty that a student would select if role based reviews are enabled.

Instructor view changes

  • For a particular assignment, in the 'Review Strategy' tab of edit assignment, a check box called "Allow role based review?" is created. This allows an instructor to enable a role based team-mate review for a particular assignment.

  • When the check box is ticked, the hidden fields become visible. This includes the duties that have been already added, displayed in a drop-down. Also, a button "New duty" pops up. This takes us to the create method of Duties controller where an instructor can add new duties.

  • In order to display the hidden fields, We call the java script function dutiesAssign() using the ischecked listener. The function queries the checkbox variable for role_based_review and depending its value(true or false), the hidden attributes i.e. duties_dropdown are displayed or kept hidden.

  • The instructor can select from the dropdown of duties. We have allowed multiple duties to be selected at once.The duties created by an instructor are unique for that instructor and are not displayed for any other instructor.

  • An instructor can decide the number of duties for a particular assignment.
  • When the assignment is saved, the duty_id is saved to the assignment_duty_mappings table and thus it is associated with that assignment.
  • The instructor can create Team-mate review Questionnaires for the different duties he created or can use any from the existing list of questionnaires.

  • In order to do this, the instructor has to go to the Rubrics tab of edit assignment. There, if the assignment is role-based, a drop down menu displays the list of all the duties selected for an assignment.

File:Instructor 6 1818.png

  • When the assignment is saved, the questionnaire_id is stored in the assignment_duty_questionnaire_mappings table. This is later used while displaying team-mate review questionnaire to students.

Student view changes

  • When a student goes to “Your team”, they can see the team members, their selected duties and the option to review if these are enabled. Students will either see "Review" link to start the teammate review or a message that says that "Teammate has not selected a duty."

  • The student can select their duty from a particular set of duties created by the instructor for that particular assignment. Upon clicking "Select" option in the Duty column, they are redirected to a new page where all the duties appear as radio-buttons and the student can select one of these. This occurs only if role based reviewing is permitted for that particular assignment. If not, the existing view will be displayed which does not give any such option.

  • The logic for this is implemented in the 'student_teams' controller and view. This is enclosed in a conditional which only appears if role based reviewing is permitted.

  • A student can only select one duty.
  • A team member cannot change their role after the assignment submission deadline.
  • When a student selects a particular duty , it is stored in the database table of that user. Thus when a team-mate reviews that student , they will see a questionnaire corresponding to the duty of that student. This would enable reviews of the teammates to be accurate and specific to their role in a project.
  • After the teammate review questionnaire is opened once, 'View' and 'Edit' links are shown which redirect the user to view/edit the appropriate last saved response.

Files changes

New files

Some of the new migration files we have created are

  • db/migrate/add_duties_table.rb
In this file, a duties table is created with a name field

  • db/migrate/add_reference_of_instructor_and_assignment_to_duties.rb
 In this file, we have adding foreign key reference of assignment id into duties table.
  • db/migrate/add_duties_to_users.rb
 In this file, a column named duties is added to the Users table
  • db/migrate/add_multiple_duties_to_assignments.rb
 In this file, we have added a column allow_multiple_duties to assignments table
  • db/migrate/create_assignment_duty_questionnaire_mapping.rb
 In this file, we have created assignment_duty_questionnaire_mappings table and added columns for questionnaire_id, assignment_id and duty_id

Files that have to be modified

  • app/views/assignments/edit/review_strategy.html.erb
In this file, a checkbox is added to permit role based review.
A hidden checkbox is added to allow multiple students to have the same role and hidden fields for adding duties along with a dropdown box for selecting from existing duties.

A java script function is added which removes the hidden attributes from for the above stated entries once the checkbox is selected.

  • app/views/assignments/edit/rubrics.html.erb
In this file , a conditional statement is added, which displays the dropdown for selecting duties for teammate review from the duties for an assignment 
if role based reviewing is permitted or else the standard view is displayed.

  • app/controllers/student_teams/student_teams_controller.rb
In this file, a variable is set that extracts from Assignments table if the role based reviewing is enabled or not. 
This variable is then used as a condition to display the various duties available for selection and also to display the particular duty chosen by the student.
  • app/views/student_teams/view.html.erb
 In this file, a conditional statement is added which redirects to a new page and displays the radio buttons of all the available duties if role based reviewing is allowed.
If not, the standard view is displayed.

  • app/controllers/response_controller.rb
In this file, the new_feedback function will be edited to map the team-mate review questionnaires according to the duties created.
  • app/questionnaire/new.html.erb
A new questionnaire will be created for each new duty created or the same questionnaire can be used.
  • app/questionnaire/edit.html.erb
A newly created questionnaire for a particular duty can be edited.
  • app/views/duties/_form.html.erb
In this file we are creating a new duty and saving the assignment id and instructor id to the Duty table 
   

Test Plan

  • Instructor tests
    • While creating an assignment, in the Review Strategy tab, check the box for role based reviewing and expect the 'role_based_review' column of Assignments table to be true.
    • Ability to add new duties from the Review Strategy tab. Click on 'Add Duty' and get redirected to a new page where there is the option of adding a name for duty in the text-box and click 'Create Duty'. This new added duty will now be displayed in the Review Strategy tab if the role-based-review option is selected.
    • Select from already existing and newly added duties for a particular assignment. After saving, the changes should be reflected in the database 'AssignmentsDutyMapping' table.
  • Student(team member) tests
    • When a student visits 'Your Team' link, if the option of role based review is selected while creating the assignment, a link 'Select' should appear which enables the student to select the duty.
    • In the 'Your Team' tab, after clicking the 'Select' link, the student should be able to select one duty (radio button). This selected duty should now be visible on the 'Your Team' page.

References