Example #1
0
 /**
  * Activate test
  *
  * This function is used to activate the current test.
  * The function also activates the corresponding content
  * unit, if it is not already activated
  * <br/>Example:
  * <code>
  * $test = new EfrontTest(32);          //Instantiate test object
  * $test -> activate();                 //Activate test
  * </code>
  */
 public function activate()
 {
     $this->test['active'] = 1;
     $this->persist();
     $unit = new EfrontUnit($this->test['content_ID']);
     if (!$unit['active']) {
         $unit->activate();
     }
     $this->unit = new EfrontUnit($this->test['content_ID']);
 }