Changeset 605
- Timestamp:
- 06/13/08 23:34:00 (5 months ago)
- Location:
- trunk/app
- Files:
-
- 5 added
- 5 modified
-
config/sql/postgresql/participations.sql (modified) (1 diff)
-
config/sql/postgresql/reports.sql (added)
-
controllers/participations_controller.php (modified) (1 diff)
-
controllers/reports_controller.php (added)
-
controllers/vclassrooms_controller.php (modified) (2 diffs)
-
locale/spa/LC_MESSAGES/default.po (modified) (2 diffs)
-
models/report.php (added)
-
views/vclassrooms/show.ctp (modified) (7 diffs)
-
views/vclassrooms/upload.ctp (added)
-
webroot/files/studentsfiles (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/config/sql/postgresql/participations.sql
r563 r605 2 2 id serial NOT NULL PRIMARY KEY, 3 3 title varchar(80) NOT NULL, 4 user_id int NOT NULL REFERENCES users(id) ON DELETE CASCADE, 4 user_id int NOT NULL REFERENCES users(id) ON DELETE CASCADE, -- student id 5 5 points smallint NOT NULL DEFAULT 1, 6 6 participation text NOT NULL, -
trunk/app/controllers/participations_controller.php
r563 r605 8 8 * @package Karamelo 9 9 */ 10 //File: /app/controllers/ answers_controller.php10 //File: /app/controllers/participations_controller.php 11 11 12 12 uses('sanitize'); -
trunk/app/controllers/vclassrooms_controller.php
r563 r605 21 21 { 22 22 parent::beforeFilter(); 23 $this->Auth->allow(array('show', 'jointoclass', 'aboutme', 'display', 'participation' ));23 $this->Auth->allow(array('show', 'jointoclass', 'aboutme', 'display', 'participation', 'upload')); 24 24 } 25 25 … … 85 85 $this->layout = 'ajax'; 86 86 87 if ( !empty($this->data['Participation'])) 88 { 87 if ( !empty($this->data['Participation'])): 89 88 $this->set('vclassroom_id', $this->data['Participation']['vclassroom_id']); 90 89 $this->set('blogger_id', $this->data['Participation']['blogger_id']); 91 90 $this->render('participation', 'ajax'); 92 } 91 endif; 92 } 93 94 public function upload() 95 { 96 $this->layout = 'ajax'; 97 98 if ( !empty($this->data['Upload'])): 99 $this->set('vclassroom_id', $this->data['Upload']['vclassroom_id']); 100 $this->set('blogger_id', $this->data['Upload']['blogger_id']); 101 $this->render('upload', 'ajax'); 102 endif; 93 103 } 94 104 -
trunk/app/locale/spa/LC_MESSAGES/default.po
r601 r605 10 10 msgid "File" 11 11 msgstr "Archivo" 12 13 msgid "Write participating" 14 msgstr "Escribir participación" 15 16 msgid "Course description" 17 msgstr "Descripción del curso" 18 19 msgid "Created" 20 msgstr "Creado" 12 21 13 22 msgid "Login" … … 140 149 msgstr "He leido y aceptado los terminos" 141 150 151 msgid "Welcome" 152 msgstr "Bienvenido" 153 154 msgid "Join to this class" 155 msgstr "Unirse a esta clase" 156 142 157 msgid "Subjects" 143 158 msgstr "Materias" 159 160 msgid "Subject" 161 msgstr "Materia" 144 162 145 163 msgid "Messages" -
trunk/app/views/vclassrooms/show.ctp
r541 r605 6 6 7 7 if ( $belongs === true ): 8 echo $html->para(null, 'Welcome!<b>'. $session->read('Auth.User.username') .'</b>');9 echo $html->para(null, '<b> Created:</b>' . $data['Vclassroom']['created']);10 echo $html->para(null, '<b> Subject</b>: ' . $data['Ecourse']['title']);11 echo $html->para(null, '<b> Course description</b>:'. $data['Ecourse']['description']);8 echo $html->para(null, __('Welcome', true) . '!<b>'. $session->read('Auth.User.username') .'</b>'); 9 echo $html->para(null, '<b>'.__('Created', true). '</b>:' . $data['Vclassroom']['created']); 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']); 12 12 13 13 // Forums … … 22 22 // Tests 23 23 if ( count($data['Test']) > 0): 24 echo $html->div('titentry', 'Quizz Tests');24 echo $html->div('titentry', __('Quizz Tests', true)); 25 25 26 26 foreach($data['Test'] as $t): … … 39 39 40 40 if ( count($data['Treasure']) > 0): 41 echo $html->div('titentry', 'Treasure Hunts');41 echo $html->div('titentry', __('Treasure Hunts', true)); 42 42 43 43 foreach($data['Treasure'] as $t): … … 45 45 endforeach; 46 46 endif; 47 48 echo $ajax->form(); 49 47 // participation 48 echo $ajax->form(); 50 49 echo $form->hidden('Participation.vclassroom_id', array('value'=>$data['Vclassroom']['id'])); 51 50 echo $form->hidden('Participation.blogger_id', array('value'=>$blog['User']['id'])); // this to return 52 echo $ajax->submit( 'Start participating', array("url" => "/vclassrooms/participation/",51 echo $ajax->submit(__('Write participating',true), array("url" => "/vclassrooms/participation/", 53 52 "update"=>"setform", 54 53 "loading" => "Element.show('charging');Element.hide('setform')", … … 56 55 )); 57 56 echo '</form>'; 57 echo $ajax->div('setform') . $ajax->divEnd('setform'); 58 // upload file 59 echo $ajax->form(); 60 echo $form->hidden('Upload.vclassroom_id', array('value'=>$data['Vclassroom']['id'])); 61 echo $form->hidden('Upload.blogger_id', array('value'=>$blog['User']['id'])); // this to return 62 echo $ajax->submit(__('Upload file', true), array("url" => "/vclassrooms/upload/", 63 "update"=>"setform2", 64 "loading" => "Element.show('charging');Element.hide('setform2')", 65 "complete" => "Element.hide('charging');Effect.Appear('setform2')" 66 )); 67 echo '</form>'; 68 58 69 // empty ajax div 59 echo $ajax->div('setform ') . $ajax->divEnd('setform');70 echo $ajax->div('setform2') . $ajax->divEnd('setform2'); 60 71 endif; 61 72 … … 66 77 echo $form->hidden('UsersVclassroom.vclassroom_id', array('value'=>$data['Vclassroom']['id'])); 67 78 echo $form->input('UsersVclassroom.code', array('size' => 6, 'maxlength'=>6, 'title'=>'Secret code', 'between'=>': ')); 68 echo $ajax->submit( 'Join to this class '.$session->read('Auth.User.username'), array("url" => "/vclassrooms/jointoclass/",79 echo $ajax->submit(__('Join to this class', true).$session->read('Auth.User.username'), array("url" => "/vclassrooms/jointoclass/", 69 80 "update"=>"updater", 70 81 "loading" => "Element.show('charging');Element.hide('updater')", … … 73 84 74 85 // empty ajax div 86 75 87 echo $ajax->div('updater') . $ajax->divEnd('updater'); 76 88 endif;
