CSC/ECE 517 Fall 2017/E1794. Student-generated questions added to rubric

From Expertiza_Wiki
Revision as of 15:23, 1 December 2017 by Ksharma5 (talk | contribs)
Jump to navigation Jump to search

Introduction

Instructors make up rubrics in Expertiza. They can ask about anything that is relevant to all the projects that will be submitted. But sometimes students want specific advice on aspects of their work that may be different from the work or topics that other students are working on. It would be more convinient if students can add their own questionnaire to ask feedback for some specific functionalities regarding their project.

Changes to be implemented

Note: These changes are covered in Use Case section.

  • Add a button on the page which appears when the student clicks on the 'your work' link.
  • This button should take the student to the create Review Questionnaire page.The student should then be able to create a new rubric.
  • Add a new field called supplementaryReviewQuestions to the teams table so that the rubric could be stored in an AssignmentTeam.
  • The ResponseController should display a set of rubrics,when a reviewer fills out a rubric. The set sould have a review rubric and a supplementary review rubric.
  • “View” function for a rubric should display answers submitted for the SupplementaryReviewQuestionnaire as well as the ReviewQuestionnaire.
  • Add another column to the “View Scores” page (for both instructor and students) to report the scores that students gave on these questions.

    Design Principles to be Followed

    1. MVC - The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).
    2. Dry Principle - We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.
    3. Polymorphism
    4. Inheritance

    Use Case

    Here SRQ is used for newly added field supplementaryReviewQuestions in the Teams table and it is initially set as null for all the table entries.Once a student adds a specific Questionnaire to his project this field stores the id of that Questionnaire which is stored in the Questionnaires table.

    Use Case to Add Questionnaire Functionality: In the "Your Work" section, Student will be shown a button "Manage Rubric", when clicked, if the supplementaryReviewQuestions column in Teams table is null for that team, Questionnaire will be created and SRQ in Teams table will be updated to contain the Questionnaire ID. The student will be directed to the Edit Questionnaire page with exsiting logic.
    Use Case for Show Questionnaire Functionality: When the student orders for new reviews, if the supplementaryReviewQuestions column in Teams table is not null for the assigned team, extract the questionnaire for supplementary reviews and append in a new section below normal Questionnaire.
    Use Case for Show Review( and Scores) Functionality: When the Student or the Instructor checks the reviews and scores on rubric, if the supplementaryReviewQuestions column in Teams table is not null for the team, extract the questionnaire review for supplementary questions and append in a new section below normal Questionnaire Reviews.

    To provide the view for the scores of a team we will add one more partition containing the scores for the supplementary questionnaire and implement the already build logic to get and display the scores.


    Implementation

    To add supplementary rubric: In submitted_content_controller.rb: created a new function 'manage_supplementary_rubric'


     def manage_supplementary_rubric
       @participant = AssignmentParticipant.find(params[:id])
       @team = Team.find(@participant.team.id)
       if @team.supplementary_rubric.nil? then
         @questionnaire = Questionnaire.new
         @questionnaire.private = false
         @questionnaire.name = "SR_" + @team.id.to_s
         @questionnaire.instructor_id = @team.id
         @questionnaire.min_question_score = 0
         @questionnaire.max_question_score = 5
         @questionnaire.type = "ReviewQuestionnaire"
         @questionnaire.display_type = "Review"
         @questionnaire.instruction_loc = Questionnaire::DEFAULT_QUESTIONNAIRE_URL
         begin
           @questionnaire.save
           @team.supplementary_rubric = @questionnaire.id
           @team.save
           flash[:success] = 'You have successfully created a questionnaire!'
         rescue
           flash[:error] = $ERROR_INFO
         end
       else
         @questionnaire = Questionnaire.find(@team.supplementary_rubric)
       end
       redirect_to controller: 'questionnaires', action: 'edit', id: @questionnaire.id
     end
    

    In the view, submitted_content/_mail.html.erb: Created a button 'Manage Supplementary rubric' to be shown in 'your work' tab


      <% if stage != "Finished" %>
       <%= button_to :action => "manage_supplementary_rubric", :id => participant.id do %>
           Manage Supplementary Rubric
       <% end %>
      <% end  %>
    

    After this, the same functionality of adding a rubric and questions is used as before.

    3. To display the supplementary rubric questions: In response_controller.rb: Changes in create, set_content, set_questionnaire_for_new_response, set_questionnaire

    #for Supp Questions
       unless @supp_questionnaire.nil?
         questions_supp = sort_questions(@supp_questionnaire.questions)
         questions = questions+questions_supp
       end
       ###
    

    in set content

    # For supp Questionnaire
       unless @supp_questionnaire.nil?
         @questions_supp = sort_questions(@supp_questionnaire.questions)
       end
       ###
    

    in set_questionnaire_for_new_response

    ##For supp Questionnaire
         @supp_questionnaire_id = Team.supplementary_rubric_by_team_id(@contributor.id)
         unless @supp_questionnaire_id.nil?
           @supp_questionnaire = Questionnaire.find(@supp_questionnaire_id)
         end
         ###
    

    in set_questionnaire

       answer_supp = @response.scores.last
       @supp_questionnaire = Questionnaire.find(@supp_questionnaire_id)
       @supp_questionnaire = @response.questionnaire_by_answer(answer_supp)
    


    In View, response/response.html.erb: added code to display supplementary questions.


       <% unless @questions_supp.nil?%>
           
           <%@questions_supp.each do |question| %>
               <% answer = Answer.where(question_id: question.id, response_id: @response.id).first if !@response.nil?%>
               <% if question.instance_of? Criterion%>
                   <%= question.complete(i, answer, @questionnaire.min_question_score, @questionnaire.max_question_score, @dropdown_or_scale) %>
               <% elsif question.instance_of? Scale %>
                   <%= question.complete(i, answer, @questionnaire.min_question_score, @questionnaire.max_question_score) %>
               <% elsif question.instance_of? UploadFile %>
               <% else %>
                   <%= question.complete(i, answer) %>
               <% end %>
               <% i += 1%>
           <% end %>
       <% end %>
    

    Test Plan

  • To check if manage rubric button is added or not.
  • To check if manage rubric button takes the student on the edit Questionnaire page or not.
  • To check when SRQ is not null, is the project specific questionnaire appended to the original rubric or not.
  • To check that the scores of Student-generated questions are not considered in the overall score of the review.