Class: EditAssessment
- Inherits:
-
AssessmentsBase
- Object
- PageFactory
- BasePage
- AssessmentsBase
- EditAssessment
- Defined in:
- lib/sambal-cle/page_objects/assessments.rb
Overview
The page that appears when you’re creating a new quiz or editing an existing one
Instance Method Summary collapse
-
#copy_part_to_pool(part_num) ⇒ Object
Allows copying an Assessment part to a Pool.
-
#edit_question(part_num, question_num) ⇒ Object
Allows editing of a question by specifying its part number and question number.
-
#insert_question_after(part_num, question_num, qtype) ⇒ Object
Allows insertion of a question at a specified point in the Assessment.
-
#remove_question(part_num, question_num) ⇒ Object
Allows removal of question by part number and question number.
Methods inherited from AssessmentsBase
menu_bar_elements, pool_page_elements, question_page_elements
Methods inherited from BasePage
basic_page_elements, frame_element
Instance Method Details
#copy_part_to_pool(part_num) ⇒ Object
Allows copying an Assessment part to a Pool.
387 388 389 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 387 def copy_part_to_pool(part_num) frm.link(:id=>"assesssmentForm:parts:#{part_num.to_i-1}:copyToPool").click end |
#edit_question(part_num, question_num) ⇒ Object
Allows editing of a question by specifying its part number and question number.
381 382 383 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 381 def edit_question(part_num, question_num) frm.link(:id=>"assesssmentForm:parts:#{part_num.to_i-1}:parts:#{question_num.to_i-1}:modify").click end |
#insert_question_after(part_num, question_num, qtype) ⇒ Object
Allows insertion of a question at a specified point in the Assessment. Must include the part number, the question number, and the type of question. Question Type must match the Type value in the drop down.
362 363 364 365 366 367 368 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 362 def insert_question_after(part_num, question_num, qtype) if question_num.to_i == 0 frm.select(:id=>"assesssmentForm:parts:#{part_num.to_i - 1}:changeQType").select(qtype) else frm.select(:id=>"assesssmentForm:parts:#{part_num.to_i - 1}:parts:#{question_num.to_i - 1}:changeQType").select(qtype) end end |
#remove_question(part_num, question_num) ⇒ Object
Allows removal of question by part number and question number.
373 374 375 |
# File 'lib/sambal-cle/page_objects/assessments.rb', line 373 def remove_question(part_num, question_num) frm.link(:id=>"assesssmentForm:parts:#{part_num.to_i-1}:parts:#{question_num.to_i-1}:deleteitem").click end |