Ejemplo n.º 1
0
 public function test_load_behaviour_class_missing()
 {
     // Set expectation.
     $this->setExpectedException('moodle_exception');
     // Exercise SUT
     question_engine::load_behaviour_class('nonexistantbehaviour');
 }
Ejemplo n.º 2
0
 public function make_behaviour(question_attempt $qa, $preferredbehaviour) {
     question_engine::load_behaviour_class('informationitem');
     return new qbehaviour_informationitem($qa, $preferredbehaviour);
 }
Ejemplo n.º 3
0
 /**
  * @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);
 }
Ejemplo n.º 5
0
 /**
  * @expectedException moodle_exception
  */
 public function test_load_behaviour_class_missing()
 {
     // Exercise SUT
     question_engine::load_behaviour_class('nonexistantbehaviour');
 }