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.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.page_elements(identifier) ⇒ Object



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 715

def self.page_elements(identifier)
  in_frame(identifier) do |frame|
    link(:add, :text=>"Add", :frame=>frame)
    link(:grade_report, :text=>"Grade Report", :frame=>frame)
    link(:permissions, :text=>"Permissions", :frame=>frame)
    link(:options, :text=>"Options", :frame=>frame)
    link(:student_view, :text=>"Student View", :frame=>frame)
    link(:reorder, :text=>"Reorder", :frame=>frame)
    text_field(:search_input, :id=>"search", :frame=>frame)
    button(:find, :value=>"Find", :frame=>frame)
    button(:clear, :value=>"Clear", :frame=>frame)
    link(:download_all, :text=>"Download All", :frame=>frame)
    link(:upload_all, :text=>"Upload All", :frame=>frame)
    link(:release_grades, :text=>"Release Grades", :frame=>frame)
    link(:sort_by_student, :text=>"Student", :frame=>frame)
    link(:sort_by_submitted, :text=>"Submitted", :frame=>frame)
    link(:sort_by_status, :text=>"Status", :frame=>frame)
    link(:sort_by_grade, :text=>"Grade", :frame=>frame)
    link(:sort_by_release, :text=>"Release", :frame=>frame)
    select_list(:default_grade, :id=>"defaultGrade_1", :frame=>frame)
    button(:apply, :name=>"apply", :frame=>frame)
    select_list(:num_resubmissions, :id=>"allowResubmitNumber", :frame=>frame)
    select_list(:accept_until_month, :id=>"allow_resubmit_closeMonth", :frame=>frame)
    select_list(:accept_until_day, :id=>"allow_resubmit_closeDay", :frame=>frame)
    select_list(:accept_until_year, :id=>"allow_resubmit_closeYear", :frame=>frame)
    select_list(:accept_until_hour, :id=>"allow_resubmit_closeHour", :frame=>frame)
    select_list(:accept_until_min, :id=>"allow_resubmit_closeMin", :frame=>frame)
    select_list(:accept_until_meridian, :id=>"allow_resubmit_closeAMPM", :frame=>frame)
    button(:update, :id=>"eventSubmit_doSave_resubmission_option", :frame=>frame)
    select_list(:select_page_size, :id=>"selectPageSize", :frame=>frame)
    button(:next, :name=>"eventSubmit_doList_next", :frame=>frame)
    button(:last, :name=>"eventSubmit_doList_last", :frame=>frame)
    button(:previous, :name=>"eventSubmit_doList_prev", :frame=>frame)
    button(:first, :name=>"eventSubmit_doList_first", :frame=>frame)
    button(:update, :name=>"eventSubmit_doDelete_confirm_assignment", :frame=>frame)
  end
end

Instance Method Details

#assignment_listObject

Clicks the Assignment List link and instantiates the AssignmentsList Class.



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

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.



698
699
700
701
702
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 698

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.



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

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

#show_resubmission_settingsObject

Clicks the Show Resubmission Settings button



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

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.



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

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.



711
712
713
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 711

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