Changeset 607

Show
Ignore:
Timestamp:
06/14/08 01:50:35 (5 months ago)
Author:
aarkerio
Message:

vgroup fixed

Location:
trunk/app
Files:
1 added
2 modified

Legend:

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

    r605 r607  
    2121 { 
    2222   parent::beforeFilter(); 
    23    $this->Auth->allow(array('show', 'jointoclass', 'aboutme', 'display', 'participation', 'upload')); 
     23   $this->Auth->allow(array('show', 'jointoclass', 'aboutme', 'display', 'participation', 'upload', 'description')); 
    2424 } 
    2525 
     
    3737      $this->set('data', $this->Vclassroom->find($conditions, null, null, 2)); 
    3838       
    39       if ( $this->Auth->user() && $this->Auth->user('group_id') == 3) 
    40       { 
     39      if ( $this->Auth->user() && $this->Auth->user('group_id') == 3): 
    4140       $user_id = (int) $this->Auth->user('id'); 
    4241           $this->Edublog->setSession($user_id); 
    43       } 
     42      endif; 
    4443 } 
    4544 
     
    5958 } 
    6059 
     60 public function description($ecourse_id)  
     61 { 
     62   $this->set('description', $this->Vclassroom->Ecourse->field('description', array('Ecourse.id'=>$ecourse_id))); 
     63   $this->render('description', 'ajax'); 
     64 } 
     65 
    6166 public function show($user_id, $vclassroom_id)  
    6267 { 
    63    $this->pageTitle = 'Classrooms'; 
     68   $this->pageTitle = 'Virtual Group'; 
    6469   $this->layout    = $this->Edublog->layout($user_id); 
    6570   $this->Edublog->blog($user_id); 
  • trunk/app/views/vclassrooms/show.ctp

    r605 r607  
    33 echo $javascript->link('fckeditor/fckeditor');  
    44 
    5  echo  '<h1>' . $data['Vclassroom']['name']      . '</h1>'; 
     5 echo  '<h1>' . $data['Vclassroom']['name'] . '</h1>'; 
    66   
    77 if ( $belongs === true ): 
    8      echo  $html->para(null, __('Welcome', true) . '!<b>'. $session->read('Auth.User.username') .'</b>'); 
     8     echo  $html->para(null, __('Welcome', true) . '!<b> '. $session->read('Auth.User.username') .'</b>'); 
    99     echo  $html->para(null, '<b>'.__('Created', true). '</b>:' . $data['Vclassroom']['created']); 
    1010     echo  $html->para(null, '<b>'.__('Subject', true).'</b>: ' . $data['Ecourse']['title']); 
    11      echo  $html->para(null, '<b>'.__('Course description', true).'</b>:'. $data['Ecourse']['description']); 
     11     echo  $html->para(null, '<b>'.__('Course description', true).'</b>'. $ajax->link($html->image('static/arrow_down.png',array('alt'=>__('Course description',true), 'title'=>__('Course description',true))),'/vclassrooms/description/'.$data['Vclassroom']['ecourse_id'], array('update' => 'qn','loading'=>"Element.show('loading3');",'complete'=>"Element.hide('loading3');Effect.Appear('qn')"), null,false)); 
     12 
     13   echo $html->div(null,$html->image('static/loading.gif',array('alt'=>'Loading...')),array('id'=>'loading3','style'=>'display: none')); 
     14     
     15   echo $ajax->div('qn', array("style"=>"padding:3px")).$ajax->divEnd('qn'); 
    1216 
    1317     //  Forums 
     
    5660    echo '</form>';  
    5761    echo $ajax->div('setform') . $ajax->divEnd('setform');  
    58   // upload file 
     62    // upload file 
     63    echo $html->para(null, '', array('style'=>'margin:15px')); 
     64 
    5965  echo $ajax->form();      
    6066    echo $form->hidden('Upload.vclassroom_id', array('value'=>$data['Vclassroom']['id']));