Changeset 397

Show
Ignore:
Timestamp:
04/14/08 22:15:04 (9 months ago)
Author:
aarkerio
Message:

Add some images

Location:
trunk/app
Files:
2 added
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/forums_controller.php

    r394 r397  
    2020 public function beforeFilter()  
    2121 { 
    22     $this->Auth->allow(array('display', 'discussion', 'view')); 
     22    $this->Auth->allow(array('display', 'discussion', 'view', 'index')); 
    2323    parent::beforeFilter(); 
    2424 } 
     
    3636 } 
    3737  
     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  
    3856 public function display($forum_id)  
    3957 {       
    40         $conditions = array("Forum.id"=>$forum_id); 
     58        $conditions = array('Forum.id'=>$forum_id, 'Forum.status'=>1); 
    4159         
    4260        $fields     = array("Forum.title", "Forum.id", "Forum.user_id", "Forum.description", "Forum.catforum_id", "Topic.id");  
  • trunk/app/controllers/lessons_controller.php

    r394 r397  
    6161        $this->pageTitle = $username .'\'s Lessons'; 
    6262         
    63         $conditions      = array("status"=>1, "user_id"=>$user_id); 
     63        $conditions      = array("Lesson.status"=>1, "Lesson.user_id"=>$user_id); 
    6464         
    6565        $fields          = array("id", "title", "created", "user_id"); 
    6666        
    67         $order           = "title"; 
     67        $order           = "Lesson.title"; 
    6868         
    6969        $this->set('data', $this->Lesson->findAll($conditions, $fields, $order));  
  • trunk/app/views/elements/admin_menu.ctp

    r395 r397  
    44             $html->link('eduBlog', '/admin/entries/listing') => array( 
    55                                    $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') 
    78                                                               ), 
    89         $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)); 
    23 
    3 <?php 
    4 //die(print_r($data)); 
     4echo $html->div('title', $blog['User']['username'] .'s Exam'); 
    55 
    6 if ( $othAuth->sessionValid() ) 
     6if ( $cU['User'] ) 
    77{ 
    88 echo '<h1>'. $data['Test']['title'] . '</h1>'; 
    99 echo '<p>'.  $data['Test']['description'] . '</p>'; 
    1010 
    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'])); 
    1313 
    1414 foreach ($data['Question'] as $val) 
     
    2525   } 
    2626 
    27    echo $html->radio('Result/'.$val['id'], $options, '<br />'); 
     27   echo $form->radio('Result/'.$val['id'], $options, '<br />'); 
    2828 
    2929    echo '<br /><b>Hint</b>: <i>' .  $val['hint']  . '</i><br /><br />'; 
     
    3131 } 
    3232 
    33  echo $html->submit('Send'); 
    34  
    35  echo '</form>'; 
     33 echo $form->end('Send'); 
    3634 
    3735} 
    3836else 
    3937{ 
    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'); 
    4139} 
    4240 
  • trunk/app/views/users/portfolio.ctp

    r322 r397  
    1919 
    2020<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 /> 
    2222        Forums 
    2323</div> 
  • trunk/app/views/vclassrooms/show.ctp

    r386 r397  
    11<?php 
    2 exit(debug($data)); 
     2// exit(debug($data)); 
    33?> 
    44<h2>Classrooms</h2> 
     
    3030       } 
    3131     } 
     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     } 
    3242  } 
    3343