| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * Karamelo E-Learning Platform |
|---|
| 4 | * Manuel Montoya 2002-2008 |
|---|
| 5 | * Chipotle Software |
|---|
| 6 | * GPLv3 manuel<arroba>mononeurona<punto>org |
|---|
| 7 | * @version 0.3 |
|---|
| 8 | */ |
|---|
| 9 | class Report extends AppModel { |
|---|
| 10 | |
|---|
| 11 | public $name = 'Report'; |
|---|
| 12 | |
|---|
| 13 | public $belongsTo = array( |
|---|
| 14 | 'User' => array( |
|---|
| 15 | 'className' => 'User', |
|---|
| 16 | 'foreignKey' => 'student_id' |
|---|
| 17 | ), |
|---|
| 18 | 'Vclassroom' => array( |
|---|
| 19 | 'className' => 'Vclassroom', |
|---|
| 20 | 'foreignKey' => 'vclassroom_id' |
|---|
| 21 | ) |
|---|
| 22 | ); |
|---|
| 23 | |
|---|
| 24 | public $validate = array( |
|---|
| 25 | 'points' => VALID_NOT_EMPTY, |
|---|
| 26 | 'student_id' => VALID_NOT_EMPTY, |
|---|
| 27 | 'filename' => VALID_NOT_EMPTY, |
|---|
| 28 | 'vclassroom_id' => VALID_NOT_EMPTY |
|---|
| 29 | ); |
|---|
| 30 | /* |
|---|
| 31 | public $validate = array( |
|---|
| 32 | 'login' => array('alphanumeric' => array( |
|---|
| 33 | 'rule' => 'alphaNumeric', |
|---|
| 34 | 'required' => true, |
|---|
| 35 | 'message' => 'Alphabets and numbers only' |
|---|
| 36 | ), |
|---|
| 37 | 'between' => array( |
|---|
| 38 | 'rule' => array('between', 5, 15), |
|---|
| 39 | 'message' => 'Between 5 to 15 characters' |
|---|
| 40 | ) |
|---|
| 41 | ), |
|---|
| 42 | 'password' => array( |
|---|
| 43 | 'rule' => array('minLength', '8'), |
|---|
| 44 | 'message' => 'Mimimum 8 characters long' |
|---|
| 45 | ), |
|---|
| 46 | 'email' => 'email', |
|---|
| 47 | 'born' => array( |
|---|
| 48 | 'rule' => 'date', |
|---|
| 49 | 'message' => 'Enter a valid date', |
|---|
| 50 | 'allowEmpty' => true |
|---|
| 51 | ) |
|---|
| 52 | ); */ |
|---|
| 53 | } |
|---|
| 54 | ?> |
|---|