Module: AssignmentSubmissionMethods

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

Overview

The page that shows a student’s submitted assignment to an instructor user.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.page_elements(identifier) ⇒ Object



787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 787

def self.page_elements(identifier)
  in_frame(identifier) do |frame|
    select_list(:select_default_grade, :name=>"grade_submission_grade", :frame=>frame)
    checkbox(:allow_resubmission, :id=>"allowResToggle", :frame=>frame)
    select_list(:num_resubmissions, :id=>"allowResubmitNumberSelect", :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(:save_and_release, :value=>"Save and Release to Student", :frame=>frame)
    button(:save_and_dont_release, :value=>"Save and Don't Release to Student", :frame=>frame)
  end
end

Instance Method Details

#add_attachmentsObject

Clicks the Add Attachments button, then instantiates the AssignmentAttachments Class.



775
776
777
778
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 775

def add_attachments
  frm.button(:name=>"attach").click
  AssignmentAttachments.new(@browser)
end

#assignment_text=(text) ⇒ Object

Enters the specified text string in the FCKEditor box for the assignment text.



759
760
761
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 759

def assignment_text=(text)
  frm.frame(:id, "grade_submission_feedback_text___Frame").td(:id, "xEditingArea").frame(:index=>0).send_keys(text)
end

#instructor_comments=(text) ⇒ Object

Enters the specified string into the Instructor Comments FCKEditor box.



770
771
772
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 770

def instructor_comments=(text)
  frm.frame(:id, "grade_submission_feedback_comment___Frame").td(:id, "xEditingArea").frame(:index=>0).send_keys(text)
end

#remove_assignment_textObject

Removes all the contents of the FCKEditor Assignment Text box.



764
765
766
767
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 764

def remove_assignment_text
  frm.frame(:id, "grade_submission_feedback_text___Frame").div(:title=>"Select All").fire_event("onclick")
  frm.frame(:id, "grade_submission_feedback_text___Frame").td(:id, "xEditingArea").frame(:index=>0).send_keys :backspace
end

#return_to_listObject

Clicks the Return to List button, then instantiates the AssignmentSubmissionList Class.



782
783
784
785
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 782

def return_to_list
  frm.button(:value=>"Return to List").click
  AssignmentSubmissionList.new(@browser)
end