Module: AssignmentSubmissionListMethods

Includes:
PageObject
Defined in:
lib/kuali-sakai-common-lib/assignments.rb

Overview

The page that appears when you click on an assignment’s “Grade” or “View Submission” link as an instructor. Shows the list of students and their assignment submission status.

Instance Method Summary collapse

Instance Method Details

#assignment_listObject

Clicks the Assignment List link and instantiates the AssignmentsList Class.

[View source]

671
672
673
674
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 671

def assignment_list
  frm.link(:text=>"Assignment List").click
  AssignmentsList.new(@browser)
end

#grade(student_name) ⇒ Object

Clicks the Grade link for the specified student, then instantiates the AssignmentSubmission page class.

[View source]

692
693
694
695
696
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 692

def grade(student_name)
  frm.table(:class=>"listHier lines nolines").row(:text=>/#{Regexp.escape(student_name)}/).link(:text=>"Grade").click
  frm.frame(:id, "grade_submission_feedback_comment___Frame").td(:id, "xEditingArea").frame(:index=>0).wait_until_present
  AssignmentSubmission.new(@browser)
end

#show_assignment_detailsObject

Clicks the Show Assignment Details button.

[View source]

681
682
683
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 681

def show_assignment_details
  frm.image(:src, "/library/image/sakai/expand.gif").click
end

#show_resubmission_settingsObject

Clicks the Show Resubmission Settings button

[View source]

676
677
678
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 676

def show_resubmission_settings
  frm.image(:src, "/library/image/sakai/expand.gif?panel=Main").click
end

#student_tableObject

Gets the Student table text and returns it in an Array object.

[View source]

686
687
688
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 686

def student_table
  table = frm.table(:class=>"listHier lines nolines").to_a
end

#submission_status_of(student_name) ⇒ Object

Gets the value of the status field for the specified Student. Note that the student’s name needs to be entered so that it’s unique for the row, but it does not have to match the entire name/id value–unless there are two students with the same name.

Useful for verification purposes.

[View source]

705
706
707
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 705

def submission_status_of(student_name)
  frm.table(:class=>"listHier lines nolines").row(:text=>/#{Regexp.escape(student_name)}/)[4].text
end