Show
Ignore:
Timestamp:
05/08/08 18:45:50 (8 months ago)
Author:
aarkerio
Message:

Forums and topics improveds

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/models/webquest.php

    r464 r465  
    4343      'points' => VALID_NOT_EMPTY 
    4444   ); 
    45     
     45 
     46/* 
     47 *  check if studen already found treasure 
     48 *  int treasure_id  
     49 *  int user_id       
     50 *  return boolean 
     51 */ 
    4652  public function chk($webquest_id, $user_id) 
    4753  { 
    48     $data = $this->ResultWebquest->field('ResultWebquest.id', array("ResultWebquest.user_id"=>$user_id, "ResultWebquest.webquest_id"=>$webquest_id)); 
     54    $conditions =  array("ResultWebquest.user_id"=>$user_id, "ResultWebquest.webquest_id"=>$webquest_id); 
     55    $data       =  $this->ResultWebquest->field('ResultWebquest.id', $conditions); 
    4956    
    5057    if ($data != null ):