Changeset 467 for trunk/app/models
- Timestamp:
- 05/08/08 21:14:33 (7 months ago)
- Location:
- trunk/app/models
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/models/test.php
r466 r467 36 36 'dependent' => true, 37 37 'exclusive' => false, 38 'finderQuery' => null38 'finderQuery' => null 39 39 40 40 ) … … 75 75 return $vclassrooms; 76 76 } 77 77 78 /* 78 79 * check if studen already found treasure -
trunk/app/models/user.php
r434 r467 60 60 'email' => VALID_EMAIL 61 61 ); 62 63 62 } 64 63 ?> -
trunk/app/models/vclassroom.php
r460 r467 358 358 } 359 359 } 360 /* 361 * check if studen already found treasure 362 * int treasure_id 363 * int user_id 364 * int vclassroom_id 365 * return boolean 366 */ 367 public function belongs($user_id, $vclassroom_id) 368 { 369 $conditions = array("UsersVclassroom.user_id"=>$user_id, "UsersVclassroom.vclassroom_id"=>$vclassroom_id); 370 371 $data = $this->UsersVclassroom->field('UsersVclassroom.user_id',$conditions); 372 373 if ($data === false ): 374 return false; 375 else: 376 return true; 377 endif; 378 } 379 360 380 } 361 381 ?>
