Changeset 605

Show
Ignore:
Timestamp:
06/13/08 23:34:00 (5 months ago)
Author:
aarkerio
Message:

Add reports

Location:
trunk/app
Files:
5 added
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/config/sql/postgresql/participations.sql

    r563 r605  
    22   id serial NOT NULL PRIMARY KEY, 
    33   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 
    55   points smallint NOT NULL DEFAULT 1, 
    66   participation text NOT NULL, 
  • trunk/app/controllers/participations_controller.php

    r563 r605  
    88*  @package Karamelo 
    99*/ 
    10 //File: /app/controllers/answers_controller.php 
     10//File: /app/controllers/participations_controller.php 
    1111 
    1212uses('sanitize'); 
  • trunk/app/controllers/vclassrooms_controller.php

    r563 r605  
    2121 { 
    2222   parent::beforeFilter(); 
    23    $this->Auth->allow(array('show', 'jointoclass', 'aboutme', 'display', 'participation')); 
     23   $this->Auth->allow(array('show', 'jointoclass', 'aboutme', 'display', 'participation', 'upload')); 
    2424 } 
    2525 
     
    8585   $this->layout = 'ajax'; 
    8686 
    87    if ( !empty($this->data['Participation'])) 
    88    {   
     87   if ( !empty($this->data['Participation'])):   
    8988          $this->set('vclassroom_id', $this->data['Participation']['vclassroom_id']); 
    9089          $this->set('blogger_id', $this->data['Participation']['blogger_id']); 
    9190          $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; 
    93103 } 
    94104 
  • trunk/app/locale/spa/LC_MESSAGES/default.po

    r601 r605  
    1010msgid  "File" 
    1111msgstr "Archivo" 
     12 
     13msgid  "Write participating"  
     14msgstr "Escribir participación" 
     15 
     16msgid  "Course description" 
     17msgstr "Descripción del curso" 
     18 
     19msgid  "Created" 
     20msgstr "Creado" 
    1221 
    1322msgid  "Login"  
     
    140149msgstr "He leido y aceptado los terminos" 
    141150 
     151msgid  "Welcome" 
     152msgstr "Bienvenido" 
     153 
     154msgid  "Join to this class" 
     155msgstr "Unirse a esta clase" 
     156 
    142157msgid  "Subjects" 
    143158msgstr "Materias" 
     159 
     160msgid  "Subject" 
     161msgstr "Materia" 
    144162 
    145163msgid  "Messages" 
  • trunk/app/views/vclassrooms/show.ctp

    r541 r605  
    66   
    77 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']); 
    1212 
    1313     //  Forums 
     
    2222    // Tests  
    2323    if ( count($data['Test']) > 0): 
    24        echo $html->div('titentry', 'Quizz Tests'); 
     24       echo $html->div('titentry', __('Quizz Tests', true)); 
    2525 
    2626       foreach($data['Test'] as $t): 
     
    3939 
    4040    if ( count($data['Treasure']) > 0): 
    41        echo $html->div('titentry', 'Treasure Hunts'); 
     41       echo $html->div('titentry', __('Treasure Hunts', true)); 
    4242 
    4343        foreach($data['Treasure'] as $t): 
     
    4545    endforeach; 
    4646    endif; 
    47  
    48     echo $ajax->form(); 
    49       
     47    // participation 
     48    echo $ajax->form();      
    5049    echo $form->hidden('Participation.vclassroom_id', array('value'=>$data['Vclassroom']['id'])); 
    5150    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/",  
    5352                                         "update"=>"setform", 
    5453                                         "loading" => "Element.show('charging');Element.hide('setform')", 
     
    5655        )); 
    5756    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 
    5869    // empty ajax div 
    59     echo $ajax->div('setform') . $ajax->divEnd('setform');  
     70    echo $ajax->div('setform2') . $ajax->divEnd('setform2');  
    6071  endif; 
    6172 
     
    6677     echo $form->hidden('UsersVclassroom.vclassroom_id', array('value'=>$data['Vclassroom']['id'])); 
    6778     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/",  
    6980                                         "update"=>"updater", 
    7081                                         "loading" => "Element.show('charging');Element.hide('updater')", 
     
    7384 
    7485     // empty ajax div 
     86 
    7587     echo $ajax->div('updater') . $ajax->divEnd('updater');  
    7688endif;