Пример #1
0
 /**
  * return an array with variations for this user
  **/
 function get_variation_identification($userid = 0, &$already = array())
 {
     if (!$this->instance->usevariations || isset($already[$this->instance->id])) {
         //Avoid infinite recursion
         return array();
     }
     $already[$this->instance->id] = true;
     if ($this->instance->basedon) {
         $basevpl = new mod_vpl(false, $this->instance->basedon);
         $ret = $basevpl->get_variation_identification($userid, $already);
     } else {
         $ret = array();
     }
     $variation = $this->get_variation($userid);
     if ($variation !== false) {
         $ret[] = $variation->identification;
     }
     return $ret;
 }