CSC/ECE 517 Fall 2020 - E2058. Two issues related to assignment management: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 58: Line 58:
====Before====
====Before====
<pre>
<pre>
let app_variables = {
let app_variables = {
   currentUserId: null
   currentUserId: null
};
};
Line 71: Line 71:
};
};
</pre>
</pre>
====After====
====After====
<pre>
<pre>

Revision as of 15:00, 13 October 2020

Project Introduction

Expertiza has Assignment objects, which represent an assignment that is done by some number of users. This project enabled instructors or TAs to customize viewing preference and fixed two bugs in their assigment management process.

Team

Hao Zhang (hzhang62)

Zhuolin Li (zli82)

Lige Han (lhan6)

Project Goal

The goals of this project were to solve tow issues related to assignment management.

  • Issue 1384: On the homepage, under the “Actions” column in the assignment list when a user (instructor orTA or admin) logs in and navigates to Manage -> Assignments(as shown below).

It looks crowded and is easy to be misclicked by some users. The goal of this issue is to add a preference option in user's profile where they can choose wether to show or hide detailed actions on the assignment management homepage.
  • Issue 1430:
What is wrong:
1. A TA or an instructor can assign an assignment to any course even when they don't have access to the course.
2. TAs can unassign an assignment from the course, and if they do so, they lose access to the assignment.
What needs to be done:
1. Only those courses should be shown in the dropdown list of courses, the assignment is part of and the instructor or TA has access to.
2. Instructors, but not TAs, would then be allowed to change an assignment to be part of no course.

Files Involved

tree_display.jsx

profile_controller.rb

users_controller.rb

user.rb

edit.html.erb

list.html.erb

assignment_helper.rb

_general.html.erb

Running Tests

  To Be Specified

Modifications made w.r.t issue 1384

app/controllers/users_controller.rb

Before

let app_variables = {
  currentUserId: null
};
 jQuery(document).ready(function() {
  // This preloadedImages function is refered from http://jsfiddle.net/slashingweapon/8jAeu/
  // Actually I am not using the values in preloadedImages, but image loading speed is indeed getting faster
  var preloadedImages = []
  function preloadImages() {
    for (var idx = 0; idx < arguments.length; idx++) {
};

After

 let app_variables = {
  currentUserId: null,
  homeActionShowFlag: null
};
 jQuery(document).ready(function() {
  // This preloadedImages function is refered from http://jsfiddle.net/slashingweapon/8jAeu/
  // Actually I am not using the values in preloadedImages, but image loading speed is indeed getting faster
  var preloadedImages = []
  function preloadImages() {
    for (var idx = 0; idx < arguments.length; idx++) {
};

Modifications made w.r.t issue 1430

Results

34 out of 34 tests in the review_mapping_helper_spec.rb test file.

Our code changes can be viewed here.

URL link of video of review_mapping_helper_spec.rb tests running and passing:- https://drive.google.com/file/d/1OS4yNI0fDGo4TlkOSxuWNgfMZ4D-XU2f/view

Relevant Links

Main Expertiza Repository can be found here.

Our forked Repository can be found here.

Extra Tasks

In addition to adding new test cases to ReviewMappingHelper, we implemented two other changes to the Expertiza code.

Refactoring Methods

  • We refactored get_review_metrics to get_review_volume, as per request from the professor

  • We refactored get_team_colour & obtain_team_colour to read get_team_color & obtain_team_color, as per request from the professor

  • We refactored calcutate_average_author_feedback_score to calculate_average_author_feedback_score, as per request from the professor

Fixing Code

  • The use of the "dig" method in Expertiza was causing failures in the Travis build because the "dig" method is supported after ruby version 2.3 and expertiza uses ruby version 2.2.7. We fixed this by replacing "dig" with an equivalent dictionary accessing code in the methods get_awarded_review_score and get_review_volume.