Changeset 397
- Timestamp:
- 04/14/08 22:15:04 (9 months ago)
- Location:
- trunk/app
- Files:
-
- 2 added
- 6 modified
-
controllers/forums_controller.php (modified) (2 diffs)
-
controllers/lessons_controller.php (modified) (1 diff)
-
views/elements/admin_menu.ctp (modified) (1 diff)
-
views/forums/index.ctp (added)
-
views/tests/view.ctp (modified) (3 diffs)
-
views/users/portfolio.ctp (modified) (1 diff)
-
views/vclassrooms/show.ctp (modified) (2 diffs)
-
webroot/img/egroups.jpg (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/forums_controller.php
r394 r397 20 20 public function beforeFilter() 21 21 { 22 $this->Auth->allow(array('display', 'discussion', 'view' ));22 $this->Auth->allow(array('display', 'discussion', 'view', 'index')); 23 23 parent::beforeFilter(); 24 24 } … … 36 36 } 37 37 38 39 public function index($user_id) 40 { 41 $conditions = array('Forum.user_id'=>$user_id, 'Forum.status'=>1); 42 43 $fields = array("Forum.title", "Forum.id", "Forum.user_id", "Forum.description", "Forum.catforum_id", "Topic.id"); 44 45 $data = $this->Forum->findAll($conditions); 46 47 $this->pageTitle = ' Forums'; 48 49 $this->set('data', $data); 50 51 $this->layout = $this->Edublog->layout($user_id); 52 53 $this->Edublog->blog($user_id); // blogger elements 54 } 55 38 56 public function display($forum_id) 39 57 { 40 $conditions = array( "Forum.id"=>$forum_id);58 $conditions = array('Forum.id'=>$forum_id, 'Forum.status'=>1); 41 59 42 60 $fields = array("Forum.title", "Forum.id", "Forum.user_id", "Forum.description", "Forum.catforum_id", "Topic.id"); -
trunk/app/controllers/lessons_controller.php
r394 r397 61 61 $this->pageTitle = $username .'\'s Lessons'; 62 62 63 $conditions = array(" status"=>1, "user_id"=>$user_id);63 $conditions = array("Lesson.status"=>1, "Lesson.user_id"=>$user_id); 64 64 65 65 $fields = array("id", "title", "created", "user_id"); 66 66 67 $order = " title";67 $order = "Lesson.title"; 68 68 69 69 $this->set('data', $this->Lesson->findAll($conditions, $fields, $order)); -
trunk/app/views/elements/admin_menu.ctp
r395 r397 4 4 $html->link('eduBlog', '/admin/entries/listing') => array( 5 5 $html->link('New entry', '/admin/entries/add'), 6 $html->link('Comments', '/admin/comments/listing') 6 $html->link('Comments', '/admin/comments/listing'), 7 $html->link('Acquaintances', '/admin/acquaintances/listing') 7 8 ), 8 9 $html->link('eCourses', '/admin/ecourses/listing') => array( -
trunk/app/views/tests/view.ctp
r264 r397 1 <div style="font-size:18pt;padding:5px;boder:1px solid #c0c0c0"> <?php echo $blog["User"]["username"]; ?>'s Exam</div> 1 <?php 2 //die(debug($data)); 2 3 3 <?php 4 //die(print_r($data)); 4 echo $html->div('title', $blog['User']['username'] .'s Exam'); 5 5 6 if ( $ othAuth->sessionValid())6 if ( $cU['User'] ) 7 7 { 8 8 echo '<h1>'. $data['Test']['title'] . '</h1>'; 9 9 echo '<p>'. $data['Test']['description'] . '</p>'; 10 10 11 echo $ html->formTag('/tests/result/'. $blog['User']['id'],'post', array("onsubmit"=>"return confirm('Are you sure?')"));12 echo $ html->hidden('Question/test_id', array("value"=>$data['Test']['id']));11 echo $form->create('Test', array('action'=>'/tests/result/', 'onsubmit'=>"return confirm('Are you sure?')")); 12 echo $form->hidden('Question.test_id', array('value'=>$data['Test']['id'])); 13 13 14 14 foreach ($data['Question'] as $val) … … 25 25 } 26 26 27 echo $ html->radio('Result/'.$val['id'], $options, '<br />');27 echo $form->radio('Result/'.$val['id'], $options, '<br />'); 28 28 29 29 echo '<br /><b>Hint</b>: <i>' . $val['hint'] . '</i><br /><br />'; … … 31 31 } 32 32 33 echo $html->submit('Send'); 34 35 echo '</form>'; 33 echo $form->end('Send'); 36 34 37 35 } 38 36 else 39 37 { 40 echo '<p>You must be logged to see this exam</p>';38 echo $html->para(null, 'You must be logged to see this exam'); 41 39 } 42 40 -
trunk/app/views/users/portfolio.ctp
r322 r397 19 19 20 20 <div class="portfolio" id="forums" onmouseover="changecolor(this.id, 'yellow');" onMouseOut="changecolor(this.id, '#ffcc00');"> 21 <?php echo $html->link($html->image('static/forums.png', array( "title"=>"Forums", "alt"=>"Forums")), '/catforums/display/'.$blog["User"]["username"] .'/'.$blog["User"]["id"], null, null, false); ?><br />21 <?php echo $html->link($html->image('static/forums.png', array('title'=>'Forums','alt'=>'Forums')), '/forums/index/'.$blog["User"]["id"], null, null, false); ?><br /> 22 22 Forums 23 23 </div> -
trunk/app/views/vclassrooms/show.ctp
r386 r397 1 1 <?php 2 exit(debug($data));2 // exit(debug($data)); 3 3 ?> 4 4 <h2>Classrooms</h2> … … 30 30 } 31 31 } 32 33 if ( count($data['Forum']) > 0) 34 { 35 echo $html->div('titentry', 'Forums'); 36 37 foreach($data['Forum'] as $f) 38 { 39 echo $html->para(null, $html->link($f['title'], '/vclassrooms/forums/'.$f['id'])); 40 } 41 } 32 42 } 33 43
