Module: AssignmentStudentPreviewMethods

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

Overview

Page that appears when a Student User clicks to Preview an assignment that is in progress.

Instance Method Summary collapse

Instance Method Details

#attachmentsObject

Returns an array of strings. Each element in the array is the name of attached files.



634
635
636
637
638
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 634

def attachments
  names = []
  frm.ul(:class=>"attachList indnt1").links.each { |link| names << link.text }
  return names
end

#save_draftObject

Clicks the Save Draft button, then instantiates the SubmissionConfirmation page class.



622
623
624
625
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 622

def save_draft
  frm.button(:value=>"Save Draft").click
  SubmissionConfirmation.new(@browser)
end

#submission_textObject

Returns the contents of the submission box.



628
629
630
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 628

def submission_text
  frm.div(:class=>"portletBody").div(:class=>/textPanel/).text
end

#submitObject

Clicks the Submit button, then instantiates the SubmissionConfirmation page class.



614
615
616
617
# File 'lib/kuali-sakai-common-lib/assignments.rb', line 614

def submit
  frm.button(:value=>"Submit").click
  SubmissionConfirmation.new(@browser)
end