|
|
Line 29: |
Line 29: |
| == Current status of Development == | | == Current status of Development == |
| In progress | | In progress |
|
| |
| == Developed Code ==
| |
| 1. Add checkbox against each assignment in student_tasks/list view to allow student to publish their work
| |
| <pre>
| |
| <% if !participant.team.nil? %>
| |
| <td align=center>
| |
| <input id="makeSubPublic" teamid="<%= participant.team.id %>" type="checkbox" onclick="publishConfirmation(this)" <% if participant.team.make_public %>checked<% end %>>
| |
| </td>
| |
| <% end %>
| |
| </pre>
| |
|
| |
| 2. Add column make_public to table teams for storing user permission (published or not) for each project.
| |
| <pre>
| |
| class AddSampleAssignmentToAssignments < ActiveRecord::Migration
| |
| def change
| |
| add_column :assignments, :sample_assignment_id, :integer, index: true
| |
| add_foreign_key :assignments, :assignments, column: :sample_assignment_id
| |
| end
| |
| end
| |
| </pre>
| |
| 3. Add controller for Sample submissions and implement corresponding methods.
| |
| <pre>
| |
| # To give permission for making a submission available to others
| |
| def make_public
| |
| @team = Team.find(params[:id])
| |
| @team.make_public = params[:status]
| |
| @team.save
| |
| respond_to do |format|
| |
| format.html { head :no_content }
| |
| end
| |
| end
| |
| </pre>
| |
| 4. Add views for sample submissions
| |
| <pre>
| |
| <!-- View to display sample submissions to the student -->
| |
| <h2>Sample Submissions for <%= @assignment.name%>:</h2>
| |
| <br>
| |
| <!-- Displaying sample submissions by students of the current course -->
| |
| <h3>Submissions made public by peers:</h3>
| |
| <% if @assignment_due_date==nil or @assignment_due_date>Time.new() %>
| |
| <br><i>Will be available once the assignment submission is completed</i>
| |
| <% elsif @assignment_teams==[] %>
| |
| <br><i>No sample submissions from current assignment made public yet</i>
| |
| <% else %>
| |
| <ul>
| |
| <% @assignment_teams.each do |assignment_team| %>
| |
| <% if assignment_team.hyperlinks != [] %>
| |
| <li>
| |
| <ul>
| |
| <h4>Team name : <%=assignment_team.name%></h4>
| |
| <% assignment_team.hyperlinks.each do |assignment_link| %>
| |
| <li><a href="<%=assignment_link%>"><%=assignment_link%></a></li>
| |
| <%end%>
| |
| </ul>
| |
| </li>
| |
| <%end%>
| |
| <% end%>
| |
| </ul>
| |
| <% end %>
| |
| <br>
| |
| <hr/>
| |
| <br>
| |
|
| |
| <!-- Displaying sample submissions from a previous assignment chosen by the instructor -->
| |
| <h3>Submissions made public by instructor:</h3>
| |
| <% if @assignment_teams_professor == [] %>
| |
| <br><i>No sample submissions from previous assignments made available yet</i>
| |
| <% else %>
| |
| <ul>
| |
| <% @assignment_teams_professor.each do |assignment_team| %>
| |
| <% if assignment_team.hyperlinks != [] %>
| |
| <ul>
| |
| <li>
| |
| <h4>Team name : <%=assignment_team.name%></h4>
| |
| <% assignment_team.hyperlinks.each do |assignment_link| %>
| |
| <li><a href="<%=assignment_link%>"><%=assignment_link%></a></li>
| |
| <%end%>
| |
| </li>
| |
| </ul>
| |
| <%end%>
| |
| <% end%>
| |
| </ul>
| |
| <% end %>
| |
| <br><br>
| |
|
| |
| <a href="javascript:window.history.back()">Back</a>
| |
| </pre>
| |
| 5. Make changes to page student_task/view which would have link to sample submissions for each project.
| |
| <pre>
| |
| <li>
| |
| <%= link_to "Sample Submissions", controller: 'sample_submissions', :action => 'index', :id => @assignment.id %>
| |
| (View sample work submitted by other participants/teams)
| |
| </li>
| |
| </pre>
| |
| 6. Add drop down in assignments/edit/_general view.
| |
| <pre>
| |
| <!-- Adding sample submissions for students to refer to -->
| |
| <tr>
| |
| <td style='padding:5px'><%= label_tag('assignment_form[assignment][sample_assignment_id]', 'Sample Assignment:') %>
| |
| <img src="/assets/info.png" title='- Select an assignment that students can refer sample submission from.'>
| |
| </td>
| |
| <td style='padding:5px'><%= select('assignment_form[assignment]', 'sample_assignment_id', sample_sub_options, :selected => @assignment_form.assignment.sample_assignment_id) %>
| |
| </td>
| |
| </tr>
| |
| </pre>
| |
| 7. Add controller code for the drop down.
| |
| <pre>
| |
| def sample_sub_options
| |
| assignments = Assignment.all
| |
| options = []
| |
| assignments.each do |assignment|
| |
| course_name = ""
| |
| if assignment.course_id and assignment.course_id != 0 and !Course.find(assignment.course_id).nil?
| |
| course_name = Course.find(assignment.course_id).name
| |
| end
| |
| options << [course_name + '- ' + assignment.name, assignment.id]
| |
| end
| |
| options.uniq.sort
| |
| options.unshift(['-----------', nil])
| |
| end
| |
| </pre>
| |
| 8. Add column sample_assignment_id to table assignment.
| |
| <pre>
| |
| class AddSampleAssignmentToAssignments < ActiveRecord::Migration
| |
| def change
| |
| add_column :assignments, :sample_assignment_id, :integer, index: true
| |
| add_foreign_key :assignments, :assignments, column: :sample_assignment_id
| |
| end
| |
| end
| |
| </pre>
| |
| 9. Add test scripts for all the functionality.
| |
| <pre>
| |
| def create_assignment_team(assignment_name, parent_id)
| |
| assignment_team = AssignmentTeam.new
| |
| assignment_team.name = assignment_name
| |
| assignment_team.parent_id = parent_id
| |
| assignment_team.save!
| |
| end
| |
|
| |
| def init_test
| |
| # create assignment and topic
| |
| assignment = build(Assignment)
| |
| course = Course.new
| |
| course.name = "SampleSubmissionTestCourse"
| |
| course.save
| |
| assignment.course_id = course.id
| |
| assignment.save
| |
|
| |
| create_assignemnt_team("ss_assignment_team_1", assignment.id)
| |
| create_assignemnt_team("ss_assignment_team_2", assignment.id)
| |
| end
| |
|
| |
| def visit_sample_submissions_page
| |
| visit '/student_task/list'
| |
| click_on "Example Assignment"
| |
| click_on "Sample Submissions"
| |
| end
| |
|
| |
| describe "sample submission test" do
| |
| before(:each) { init_test }
| |
|
| |
| it "is able to make an assignment public" do
| |
| visit '/student_task/list'
| |
| find(:css, "#makeSubPublic[teamid='6050']").trigger("click")
| |
| click_button 'OK'
| |
| expect(page).to have_http_status(200)
| |
| end
| |
|
| |
| it "should not see current assignment submissions if deadline is not met" do # Set deadline after current time.
| |
| visit_sample_submissions_page
| |
| expect(page).to have_content "No sample submissions from current assignment made public yet"
| |
| end
| |
|
| |
| it "should see current assignment submissions if deadline is met" do # Set deadline before current time.
| |
| visit_sample_submissions_page
| |
| expect(page).to_not have_content "No sample submissions from current assignment made public yet"
| |
| end
| |
|
| |
| it "should not see instructor selected submissions if instructor has not selected them" do
| |
| visit_sample_submissions_page
| |
| expect(page).to have_content "No sample submissions from previous assignment made available yet"
| |
| end
| |
|
| |
| it "should see instructor selected submissions if instructor has selected them" do # Instructor makes submission available.
| |
| visit_sample_submissions_page
| |
| expect(page).to_not have_content "No sample submissions from previous assignment made available yet"
| |
| end
| |
| end
| |
| </pre>
| |
|
| |
|
| == Sample Submissions View == | | == Sample Submissions View == |
Introduction
Expertiza is a web based open source peer reviewing tool developed and maintained by current and past students of North Carolina State University. Peer review is a great way for a student to learn how to approach a project and get ideas for their own projects. Currently, there is no way for a student to view another student's work, unless they are reviewing the other student's work.
Problem Statement
The objective of this project is to:
- Add a feature for students to make their reviews 'public', that is, allow other students to view them.
- Add a feature for TA to select a subset of 'public' reviews, and make those reviews visible as sample reviews of the particular assignment.
- Add a feature for Instructor to select a subset of 'public' reviews and make those reviews visible as sample reviews of any of his/her assignments in the course.
- Create a view where the student can see a list of sample reviews of the assignment and have a detailed view of each.
- Allow the student to toggle the visibility of a review he/she has submitted.
Proposed Flow
During each review, there will be a checkbox that says "I agree to share this review anonymously as an example to the entire class", and students can decide to check this box or not just before they submit reviews. Behind the scenes, we need to set a "status" field to “public”of the Response object.
Project Tasks
The tasks that need to be completed as part of this project can be listed as follows:
- Add checkbox against each assignment in student_tasks/list view to allow student to publish their work
- Add column make_public to table teams for storing user permission (published or not) for each project.
- Add controller for Sample submissions and implement corresponding methods.
- Add views for sample submissions
- Make changes to page student_task/view which would have link to sample submissions for each project.
- Add drop down in assignments/edit/_general view.
- Add controller code for the drop down.
- Add column sample_assignment_id to table assignment.
- Add test scripts for all the functionality.
Current status of Development
In progress
Sample Submissions View
1. The first screenshot of the application is taken when the deadline for the current assignment has not crossed and the instructor also has not given any sample assignment for this assignment.
2. The second screenshot of the application is taken when the deadline for the current assignment has not crossed but the instructor has selected a sample assignment for viewing against this assignment.
3. The third screenshot of the application is taken when both the deadline for the current assignment has crossed and the instructor has selected a sample assignment for viewing.
Test Plan
Many of our changes are reflected on views (user interface). So we build tests with rspec/capybara. Following is the list of tests that conduct:
- it "is able to make an assignment public"
- it "is able to view sample submissions page"
- it "should not see current assignment submissions if deadline is not met"
- it "should see current assignment submissions if deadline is met"
- it "should not see instructor selected submissions if instructor has not selected them"
- it "should see instructor selected submissions if instructor has selected them"
def create_assignment_team(assignment_name, parent_id)
assignment_team = AssignmentTeam.new
assignment_team.name = assignment_name
assignment_team.parent_id = parent_id
assignment_team.save!
end
def init_test
# create assignment and topic
assignment = build(Assignment)
course = Course.new
course.name = "SampleSubmissionTestCourse"
course.save
assignment.course_id = course.id
assignment.save
create_assignemnt_team("ss_assignment_team_1", assignment.id)
create_assignemnt_team("ss_assignment_team_2", assignment.id)
end
def visit_sample_submissions_page
visit '/student_task/list'
click_on "Example Assignment"
click_on "Sample Submissions"
end
describe "sample submission test" do
before(:each) { init_test }
it "is able to make an assignment public" do
visit '/student_task/list'
find(:css, "#makeSubPublic[teamid='6050']").trigger("click")
click_button 'OK'
expect(page).to have_http_status(200)
end
it "should not see current assignment submissions if deadline is not met" do # Set deadline after current time.
visit_sample_submissions_page
expect(page).to have_content "No sample submissions from current assignment made public yet"
end
it "should see current assignment submissions if deadline is met" do # Set deadline before current time.
visit_sample_submissions_page
expect(page).to_not have_content "No sample submissions from current assignment made public yet"
end
it "should not see instructor selected submissions if instructor has not selected them" do
visit_sample_submissions_page
expect(page).to have_content "No sample submissions from previous assignment made available yet"
end
it "should see instructor selected submissions if instructor has selected them" do # Instructor makes submission available.
visit_sample_submissions_page
expect(page).to_not have_content "No sample submissions from previous assignment made available yet"
end
end
Future Scope
- Publishing sample reviews made by students: This feature will require students to allow their review to be published as a sample review. This can then be made available to future students.
External Links
- link to forked repository [1]
- link to the git pull request [2]
- link to the deployed application [3]
References
- Link to expertiza website: [4]