Class: AssessmentTotalScores
- Defined in:
- lib/sambal-cle/page_objects/assessments.rb
Overview
Instructor’s view of Students’ assessment scores
Instance Method Summary collapse
-
#assessments ⇒ Object
Clicks the Assessments link on the page then instantiates the AssessmentsList class.
-
#comment_in_first_box=(comment) ⇒ Object
Enters the specified string into the topmost box listed on the page.
-
#sort_by_submit_date ⇒ Object
Clicks the Submit Date link in the table header to sort/reverse sort the list.
-
#student_ids ⇒ Object
Gets the user ids listed in the scores table, returns them as an Array object.
-
#update ⇒ Object
Clicks the Update button, then instantiates the AssessmentTotalScores class.
Methods inherited from BasePage
basic_page_elements, frame_element
Instance Method Details
#assessments ⇒ Object
Clicks the Assessments link on the page then instantiates the AssessmentsList class. action(:
344 345 346 347 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 344 def assessments frm.link(:text=>"Assessments").click AssessmentsList.new(@browser) end |
#comment_in_first_box=(comment) ⇒ Object
Enters the specified string into the topmost box listed on the page.
This method is especially useful when the student identities are obscured, since in that situation you can’t target a specific student’s comment box, obviously.
331 332 333 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 331 def comment_in_first_box=(comment) frm.text_field(:name=>"editTotalResults:totalScoreTable:0:_id345").value=comment end |
#sort_by_submit_date ⇒ Object
Clicks the Submit Date link in the table header to sort/reverse sort the list.
322 323 324 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 322 def sort_by_submit_date frm.link(:text=>"Submit Date").click end |
#student_ids ⇒ Object
Gets the user ids listed in the scores table, returns them as an Array object.
Note that this method is only appropriate when student identities are not being obscured on this page. If student submissions are set to be anonymous then this method will fail to return any ids.
301 302 303 304 305 306 307 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 301 def student_ids ids = [] scores_table = frm.table(:id=>"editTotalResults:totalScoreTable").to_a scores_table.delete_at(0) scores_table.each { |row| ids << row[1] } ids end |
#update ⇒ Object
Clicks the Update button, then instantiates the AssessmentTotalScores class.
337 338 339 340 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 337 def update frm.(:value=>"Update").click AssessmentTotalScores.new(@browser) end |