Class: AssignmentSubmissionList

Inherits:
AssignmentsBase show all
Defined in:
lib/sakai-cle-test-api/page_objects/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

Methods inherited from AssignmentsBase

listview_elements, menu_elements

Methods inherited from BasePage

basic_page_elements, frame_element

Methods inherited from PageMaker

element, expected_element, expected_title, #initialize, #method_missing, page_url

Constructor Details

This class inherits a constructor from PageMaker

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PageMaker

Instance Method Details

#assignment_listObject

Clicks the Assignment List link and instantiates the AssignmentsList Class.



635
636
637
638
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 635

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.



656
657
658
659
660
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 656

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.



645
646
647
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 645

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

#show_resubmission_settingsObject

Clicks the Show Resubmission Settings button



640
641
642
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 640

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.



650
651
652
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 650

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.



669
670
671
# File 'lib/sakai-cle-test-api/page_objects/assignments.rb', line 669

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