Ejemplo n.º 1
0
 public function removeUsers()
 {
     $esus = new Dase_DBO_ExerciseSetUser($this->db);
     $esus->set_id = $this->id;
     foreach ($esus->findAll(1) as $esu) {
         $esu->delete();
     }
 }
Ejemplo n.º 2
0
 public function getSets()
 {
     $this->sets = array();
     $sets = new Dase_DBO_ExerciseSet($this->db);
     $sets->creator_eid = $this->eid;
     $sets->orderBy('title');
     foreach ($sets->findAll(1) as $s) {
         $this->admin_sets[] = $s;
     }
     $esus = new Dase_DBO_ExerciseSetUser($this->db);
     $esus->user_id = $this->id;
     foreach ($esus->findAll(1) as $esu) {
         $set = new Dase_DBO_ExerciseSet($this->db);
         $set->load($esu->set_id);
         $this->sets[] = $set;
     }
     usort($this->sets, array('Util', 'sortObjectsByTitle'));
     //return $this->sets;
 }