Module: QuestionHelpers

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

Overview

This is a module containing methods that are common to all the question pages inside the Assessment section of a Site.

Instance Method Summary collapse

Instance Method Details

#saveObject

Saves the question by clicking the Save button, then makes the determination whether to instantiate the EditAssessment class, or the EditQuestionPool class.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/kuali-sakai-common-lib/assessments.rb', line 12

def save

  quiz = frm.div(:class=>"portletBody").div(:index=>0).text
  pool = frm.div(:class=>"portletBody").div(:index=>1).text

  frm.button(:value=>"Save").click

  if quiz =~ /^Assessments/
    EditAssessment.new(@browser)
  elsif pool =~ /^Question Pools/
    EditQuestionPool.new(@browser)
  else
    puts "Unexpected text: "
    p pool
    p quiz
  end

end