Changeset 607
- Timestamp:
- 06/14/08 01:50:35 (5 months ago)
- Location:
- trunk/app
- Files:
-
- 1 added
- 2 modified
-
controllers/vclassrooms_controller.php (modified) (3 diffs)
-
views/vclassrooms/description.ctp (added)
-
views/vclassrooms/show.ctp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/vclassrooms_controller.php
r605 r607 21 21 { 22 22 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')); 24 24 } 25 25 … … 37 37 $this->set('data', $this->Vclassroom->find($conditions, null, null, 2)); 38 38 39 if ( $this->Auth->user() && $this->Auth->user('group_id') == 3) 40 { 39 if ( $this->Auth->user() && $this->Auth->user('group_id') == 3): 41 40 $user_id = (int) $this->Auth->user('id'); 42 41 $this->Edublog->setSession($user_id); 43 }42 endif; 44 43 } 45 44 … … 59 58 } 60 59 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 61 66 public function show($user_id, $vclassroom_id) 62 67 { 63 $this->pageTitle = ' Classrooms';68 $this->pageTitle = 'Virtual Group'; 64 69 $this->layout = $this->Edublog->layout($user_id); 65 70 $this->Edublog->blog($user_id); -
trunk/app/views/vclassrooms/show.ctp
r605 r607 3 3 echo $javascript->link('fckeditor/fckeditor'); 4 4 5 echo '<h1>' . $data['Vclassroom']['name'] . '</h1>';5 echo '<h1>' . $data['Vclassroom']['name'] . '</h1>'; 6 6 7 7 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>'); 9 9 echo $html->para(null, '<b>'.__('Created', true). '</b>:' . $data['Vclassroom']['created']); 10 10 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'); 12 16 13 17 // Forums … … 56 60 echo '</form>'; 57 61 echo $ajax->div('setform') . $ajax->divEnd('setform'); 58 // upload file 62 // upload file 63 echo $html->para(null, '', array('style'=>'margin:15px')); 64 59 65 echo $ajax->form(); 60 66 echo $form->hidden('Upload.vclassroom_id', array('value'=>$data['Vclassroom']['id']));
