public function test_load_behaviour_class_missing()
 {
     // Set expectation.
     $this->setExpectedException('moodle_exception');
     // Exercise SUT
     question_engine::load_behaviour_class('nonexistantbehaviour');
 }
Beispiel #2
0
 public function make_behaviour(question_attempt $qa, $preferredbehaviour) {
     question_engine::load_behaviour_class('informationitem');
     return new qbehaviour_informationitem($qa, $preferredbehaviour);
 }
 /**
  * @param string $behaviourtype the type of behaviour we are providing a fallback for.
  */
 public function __construct($behaviour)
 {
     question_engine::load_behaviour_class($behaviour);
     $this->behaviourclass = 'qbehaviour_' . $behaviour;
 }
 public function make_behaviour(question_attempt $qa, $preferredbehaviour)
 {
     question_engine::load_behaviour_class('manualgraded');
     return new qbehaviour_manualgraded($qa, $preferredbehaviour);
 }
Beispiel #5
0
 /**
  * @expectedException moodle_exception
  */
 public function test_load_behaviour_class_missing()
 {
     // Exercise SUT
     question_engine::load_behaviour_class('nonexistantbehaviour');
 }