module ResultsHelper

Public Instance Methods

can_show_remark_request_tab_in_marker_pane(submission) click to toggle source
# File app/helpers/results_helper.rb, line 25
def can_show_remark_request_tab_in_marker_pane(submission)
  !student_can_edit_remark_request(submission)
end
can_show_remark_request_tab_in_student_pane(assignment, current_user, submission) click to toggle source
# File app/helpers/results_helper.rb, line 8
def can_show_remark_request_tab_in_student_pane(assignment, current_user, submission)
  if assignment.allow_remarks
    if submission.get_remark_result and submission.get_remark_result.released_to_students
      return true
    else
      return (current_user.student?)
    end
  else
    false
  end
end
remark_result_unsubmitted_or_released(remark_result) click to toggle source
# File app/helpers/results_helper.rb, line 3
def remark_result_unsubmitted_or_released(remark_result)
  remark_result.marking_state == Result::MARKING_STATES[:unmarked] or
          remark_result.released_to_students
end
student_can_edit_remark_request(submission) click to toggle source
# File app/helpers/results_helper.rb, line 20
def student_can_edit_remark_request(submission)
  !submission.get_remark_result or
      submission.get_remark_result.marking_state == Result::MARKING_STATES[:unmarked]
end