Changeset 373
- Timestamp:
- 04/09/08 12:40:29 (9 months ago)
- Location:
- trunk/app
- Files:
-
- 7 modified
-
controllers/tests_controller.php (modified) (1 diff)
-
controllers/users_controller.php (modified) (10 diffs)
-
models/test.php (modified) (1 diff)
-
views/tests/admin_listing.ctp (modified) (3 diffs)
-
views/tests/admin_vclassrooms.ctp (modified) (1 diff)
-
views/users/validate.ctp (modified) (2 diffs)
-
webroot/css/cpanel/cpanel.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/tests_controller.php
r372 r373 197 197 198 198 $this->Test->unbindModel(array('hasMany'=>array('Question', 'Result'))); 199 199 200 200 $this->set('data', $this->Test->findAll($conditions, $fields, $order)); 201 201 } -
trunk/app/controllers/users_controller.php
r352 r373 3 3 * Karamelo E-Learning Platform 4 4 * Chipotle Software 2002-2008 5 * GPL manuel<arroba>mononeurona<punto>org5 * GPLv3 manuel<arroba>mononeurona<punto>org 6 6 */ 7 7 //File: /app/controllers/users_controller.php … … 19 19 public function beforeFilter() 20 20 { 21 $this->Auth->allow(array('blog', 'entry','portfolio', 'about', 'register', 'directory', 'bloggers', 'insert' ));21 $this->Auth->allow(array('blog', 'entry','portfolio', 'about', 'register', 'directory', 'bloggers', 'insert', 'validate')); 22 22 parent::beforeFilter(); 23 23 } … … 144 144 145 145 $this->Portal->statics(); // Using Portal component 146 }147 148 public function parents()149 {146 } 147 148 public function parents() 149 { 150 150 $this->layout = 'portal'; 151 151 … … 162 162 163 163 $this->Portal->statics(); // Using Portal component 164 }165 166 public function directory($filter = null)167 {164 } 165 166 public function directory($filter = null) 167 { 168 168 $this->pageTitle = 'Students :: Karamelo E-learning on Web 2.0'; 169 169 … … 185 185 $limit = null; 186 186 $this->set('users', $this->User->findAll($conditions, $fields, $order, $limit)); 187 }188 189 public function karanet()190 {187 } 188 189 public function karanet() 190 { 191 191 $this->pageTitle = 'Directory :: Karamelo E-learning on Web 2.0'; 192 192 … … 254 254 { 255 255 $this->layout = 'portal'; 256 257 $this->pageTitle = 'Register new user'; 256 258 257 259 $conditions = array("id"=>'>1', "id"=>"<5"); … … 284 286 if (strlen($this->data['User']['pwd']) < 6) 285 287 { 286 $message['pwd_w orng'] = "The password hasless than 6 characters ";288 $message['pwd_wrong'] = "The password have less than 6 characters "; 287 289 } 288 290 289 if (strpos($this->data['User']['username'], ' ')) // no s spaces291 if (strpos($this->data['User']['username'], ' ')) // no spaces 290 292 { 291 293 $message['username_spaces'] = "Your username should not contain spaces"; 292 }293 294 /** username check **/295 if (strlen($this->data['User']['username']) < 5)296 {294 } 295 296 /** username check **/ 297 if (strlen($this->data['User']['username']) < 5) 298 { 297 299 $message['pwd_username'] = "The username has less than 5 characters "; 298 }299 300 /** name check **/301 if (strlen($this->data['User']['name']) < 5)302 {300 } 301 302 /** name check **/ 303 if (strlen($this->data['User']['name']) < 5) 304 { 303 305 $message['pwd_username'] = "The name is too short"; 304 }306 } 305 307 306 308 if (strpos($this->data['User']['pwd'], ' ')) // pwd too short … … 318 320 if ($this->Adds->validEmail($this->data['User']['email']) === false) 319 321 { 320 $message['pwd_username'] = "T heemail is invalid";322 $message['pwd_username'] = "Typed email is invalid"; 321 323 } 322 324 … … 330 332 331 333 /** Check the email **/ 332 $email = $this->User->field('email', array( "email"=> $this->data['User']['email']));334 $email = $this->User->field('email', array('email' => $this->data['User']['email'])); 333 335 334 336 if ($email != null) … … 338 340 339 341 // get the secret code for teachers registration process 340 $code = $this->User->Group->field('code', array( "id"=>$this->data['User']['group_id']));342 $code = $this->User->Group->field('code', array('id'=>$this->data['User']['group_id'])); 341 343 342 344 if ( $this->data['User']['code'] != $code ) -
trunk/app/models/test.php
r368 r373 44 44 array('className' => 'Vclassroom', 45 45 'joinTable' => 'tests_vclassrooms', 46 'foreignKey' => ' vclassroom_id',47 'associationForeignKey' => ' test_id',48 'conditions' => '',49 'order' => '',46 'foreignKey' => 'test_id', 47 'associationForeignKey' => 'vclassroom_id', 48 'conditions' => null, 49 'order' => null, 50 50 'limit' => '', 51 51 'unique' => true, -
trunk/app/views/tests/admin_listing.ctp
r372 r373 16 16 echo '<div class="grayblock">'; 17 17 echo $html->div('butonright', $gags->sendEdit($val['Test']['id'], 'tests')); 18 echo $html-> link($val['Test']['title'], '/admin/tests/vclassrooms/'.$val['Test']['id']) . '<br /><br />';18 echo $html->div('div_title', $val['Test']['title']); 19 19 echo $html->para(null, '<b>Test description:</b> '.$val['Test']['description']); 20 20 … … 22 22 echo $html->link($html->image('admin/questions_icon.gif', array('alt'=>'Questions', 'title'=>'Questions')), 23 23 '/admin/tests/questions/'.$val['Test']['id'], null, null, false) . '<br />'; 24 25 26 if ( count($val['Vclassroom']) < 0 ) 24 if ( count($val['Vclassroom']) < 1 ) 27 25 { 26 28 27 echo $html->para(null, $html->link( 29 28 $html->image('admin/vgroups-gray.gif', array( … … 45 44 46 45 foreach($val['Vclassroom'] as $class): 47 echo $html->para(null, 'This test had been assigned to class: '. $html->link($class['name'], '/admi /ecourses/vclassroom/'.$class['id']) . '</b>');46 echo $html->para(null, 'This test had been assigned to class: '. $html->link($class['name'], '/admin/vclassrooms/members/'.$class['id']) . '</b>'); 48 47 endforeach; 49 48 } -
trunk/app/views/tests/admin_vclassrooms.ctp
r372 r373 1 1 <?php 2 2 echo $html->addCrumb('Control Tools', '/admin/entries/start'); 3 echo $html->addCrumb(' Courses', '/admin/tests/listing');3 echo $html->addCrumb('Tests', '/admin/tests/listing'); 4 4 echo $html->getCrumbs(' / '); 5 5 //die( debug( $data ) ); -
trunk/app/views/users/validate.ctp
r264 r373 2 2 //die(print_r($message)); 3 3 foreach ($message as $m) 4 {5 echo $m . " <br />";6 }4 { 5 echo $m . " <br />"; 6 } 7 7 8 8 if ( isset($ok) ) … … 10 10 11 11 ?> 12 <script type="text/javascript">13 <!--14 var ok = true;15 if ( ok == true )16 {12 <script type="text/javascript"> 13 <!-- 14 var ok = true; 15 if ( ok == true ) 16 { 17 17 //alert('I am in!!'); 18 18 var myDiv = document.getElementById('form_register'); 19 19 myDiv.innerHTML = ''; 20 }21 //-->22 </script>20 } 21 //--> 22 </script> 23 23 24 24 <?php } ?> -
trunk/app/webroot/css/cpanel/cpanel.css
r359 r373 1022 1022 .grayblock{ padding:6px 3px 28px 4px;margin:10px 0 5px 0;border:1px dotted gray;} 1023 1023 1024 a.titlink:link { text-decoration: none; color: orange;font-size:13pt;} 1025 a.titlink:active { text-decoration: none} 1026 a.titlink:visited { text-decoration: none} 1027 a.titlink:hover { text-decoration: underline } 1028 1029 .div_title{font-size:13pt;font-weight:bold;color:orange;}
