CSC/ECE 517 Fall 2018/E1876 Completion/Progress view

From Expertiza_Wiki
Revision as of 22:17, 13 November 2018 by Kaacken2 (talk | contribs) (→‎References)
Jump to navigation Jump to search

Problem Statement

A key component of Expertiza is peer reviews, which provide feedback to authors so that they can improve their work. Expertiza also supports grading of these reviews to ensure students write quality reviews, helping them learn more about the assignment by looking at their peers' work. In addition, Expertiza allows for metareviews, which are reviews the authors of the original work write for the reviews of their original work. This author feedback is useful for grading the reviews because it indicates how helpful this review was to the authors of the original work. The objective of this project is to add metareview or author feedback information to the review report page, which shows a summary of all the reviews written by the students for an assignment.

Goal

The aim of this project is to build this into the system. We need an additional column in the 'Review Report' page for reviews which shows the calculation of the author feedback. This will help instructor's to know how the reviews proved useful to the authors/team. The aim of this project is to integrate the author feedback column in the summary page

Design

User Interface Enhancements

In the page "Review report for Design exercise" (Log in as an instructor then go to Manage -> Assignments -> View review report.), we are planning to add one more column to show the average ratings for the author feedback for a student's review of a particular assignment. The logic for calculating the average score for the metareviews would be similar to already implemented logic for the "Score Awarded/Average Score" column. Below is the page we are planning to edit.

Controller-level Logic

The following method shows the code logic we are planning to write for calculating the average scores for the feedback given by authors for the reviews of their work.

 def calculate_avg_score_by_criterion(question_answers, q_max_score)
      # get score and summary of answers for each question
      # only include divide the valid_answer_sum with the number of valid answers

      valid_answer_counter = 0
      question_score = 0.0
      question_answers.each do |ans|
        # calculate score per question
        unless ans.answer.nil?
          question_score += ans.answer
          valid_answer_counter += 1
        end
      end

      if valid_answer_counter > 0 and q_max_score > 0
        # convert the score in percentage
        question_score /= (valid_answer_counter * q_max_score)
        question_score = question_score.round(2) * 100
      end

      question_score
    end

Relevant Database Tables

The following are the table structures we will need for this feature. First, the questions table has all the questions based on the questionnaire. We will be only concerned with the questions in the feedback questionnaire. The answers for each question in the feedback questionnaire are saved in the Answers table below based on the Question ID. Now, in order to know if the answer is a feedback by team members or a review by reviewer, the mapping for the Answers table is done by the response_id which is a foreign key to the Response table. This Response table gives us the map_id which maps to a response map table. Now, the response map table gives us information on the reviewer_id, reviewee_id, reviewed_object_id (which is the ID for the assignment being reviewed) and the type (whether it's a teammate review, author feedback, a regular review, etc.). We will have to fetch the answers from the Answer table based on response_id because in our case, the response is from a previous reviewee and not a reviewer. So, we will fetch those answers whose response type is FeedbackResponseMap and calculate scores for those questions for the corresponding ReviewScores table. Below are excerpts from the Expertiza database documentation which describe the database tables relevant to our design.

Questions Table Structure

Field Name Type Description
id int(11) unique identifier for the record
txt text the question string
weight int(11) specifies the weighting of the question
questionnaire_id int(11) the id of the questionnaire that this question belongs to
seq DECIMAL
type VARCHAR(255) Type of question
size VARCHAR(255) Size of the question
alternatives VARCHAR(255) Other question which means the same
break_before BIT
max_label VARCHAR(255)
min_label VARCHAR(255)

Answer Table Structure

Field Name Type Description
id int(11) Unique ID for each Answers record.
question_id int(11) ID of Question.
answer int(11) Value of each of the answer.
comments text Comment given to the answer.
reponse_id int(11) ID of the response associated with this Answer.

Response Table Structure

Field Name Type Description
id int(11) The unique record id
map_id int(11) The ID of the response map defining the relationship that this response applies to
additional_comment text An additional comment provided by the reviewer to support his/her response
updated_at datetime The timestamp indicating when this response was last modified
created_at datetime The timestamp indicating when this response was created
version_num int(11) The version of the review.
round int(11) The round the review is connected to.
is_submitted tinyint(1) Boolean Field to indicate whether the review is submitted.

Response Map Table

Field Name Type Description
id int(11) The unique record id
reviewed_object_id int(11) The object being reviewed in the response. Possible objects include other ResponseMaps or assignments
reviewer_id int(11) The participant (actually AssignmentParticipant) providing the response
reviewee_id int(11) The team (AssignmentTeam) receiving the response
type varchar(255) Used for subclassing the response map. Available subclasses are ReviewResponseMap, MetareviewResponseMap, FeedbackResponseMap, TeammateReviewResponseMap
created_at DATETIME Date and Time for when the record was created
updated_at DATETIME Date and Time when the last update was made
calibrate_to BIT

Test Plan

  • Plan to test the response report page (/review_mapping/response_report?id={:assignmentID}) to make sure the new field (avg author feedback) exists
    • Using rspec we will add a test case to ReviewMappingControllerSpec.rb

    context 'when type is FeedbackResponseMap' do
      context 'when assignment has author feedback feature' do
        it 'renders response_report page with average author feedback data' do
          allow(assignment).to receive(:varying_rubrics_by_round?).and_return(true)
          allow(FeedbackResponseMap).to receive(:feedback_response_report).with('1', 'FeedbackResponseMap')
                                                                          .and_return([participant, participant1], [1, 2], [3, 4], [])
          params = {
            id: 1,
            report: {type: 'FeedbackResponseMap'},
          }
          get :response_report, params
          expect(response).to render_template(:response_report)
          expect(response).to have(:avg_author_feedback)
        end
      end
   end
  • Also, we plan to manually test the response report page to make sure the new field is aligning well in the UI in the expected place. We will attach the screenshot of the UI as the test result.

References

1. http://wiki.expertiza.ncsu.edu/index.php/Documentation_on_Database_Tables

2. https://github.com/jainmohit1/expertiza