Changeset 733 for trunk

Show
Ignore:
Timestamp:
08/21/08 20:27:42 (3 months ago)
Author:
aarkerio
Message:

Little bugs fixed

Location:
trunk/app
Files:
6 modified

Legend:

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

    r606 r733  
    129129 } 
    130130 
     131 public function admin_download($report_id) 
     132 {              
     133  $this->layout    = 'ajax'; 
     134  $conditions      = array('Report.id'=>$report_id); 
     135  $filename        =  $this->Report->field('filename', $conditions); 
     136         
     137  $this->set('filename', 'files/studentsfiles/'.trim($filename)); 
     138 } 
     139 
    131140 public function admin_show($participation_id)  
    132141 { 
  • trunk/app/controllers/shares_controller.php

    r724 r733  
    2222 public function download($secret) 
    2323 {              
    24         $this->pageTitle = 'Share'; 
     24        $this->pageTitle = __('Share file', true); 
    2525        $this->layout    = 'ajax'; 
    2626        $conditions      = array("Share.secret"=>$secret, "Share.public"=>1); 
  • trunk/app/locale/spa/LC_MESSAGES/default.po

    r732 r733  
    55msgstr "Si" 
    66 
     7msgid  "Reports" 
     8msgstr "Reportes" 
     9 
    710msgid  "No reports found" 
    811msgstr "No hay reportes" 
     
    116119msgstr "Ver detalles" 
    117120 
     121msgid  "View file" 
     122msgstr "Ver archivos" 
     123 
     124msgid  "Compose message" 
     125msgstr "Escribir mensaje" 
     126 
    118127msgid  "About me" 
    119128msgstr "Sobre mi" 
     129 
     130msgid  "Participation" 
     131msgstr "Participación" 
     132 
     133msgid  "Report" 
     134msgstr "Reporte" 
    120135 
    121136msgid  "You already have answered this Webquest" 
  • trunk/app/models/participation.php

    r535 r733  
    1111     
    1212  public $belongsTo  = array( 
    13                              "User" => array( 
    14                                             "className"    => "User", 
    15                                             "foreignKey"   => "user_id" 
     13                             'User' => array( 
     14                                            'className'    => 'User', 
     15                                            'foreignKey'   => 'user_id' 
    1616                                            ) 
    1717             ); 
    1818     
    19      public $validate = array( 
    20            'points' => VALID_NOT_EMPTY, 
    21        'user_id' => VALID_NOT_EMPTY, 
    22            'forum_id' => VALID_NOT_EMPTY, 
    23            'vlcassroom_id' => VALID_NOT_EMPTY 
    24     );  
    25 /* 
    26 public $validate = array( 
    27         'login' => array('alphanumeric' => array( 
    28                                                  'rule' => 'alphaNumeric', 
    29                                              'required' => true, 
    30                                                          'message' => 'Alphabets and numbers only' 
    31                                    ), 
    32                                 'between' => array( 
    33                                            'rule' => array('between', 5, 15), 
    34                                                                                'message' => 'Between 5 to 15 characters' 
    35                                            ) 
    36                                 ), 
    37                        'password' => array( 
    38                                    'rule' => array('minLength', '8'), 
    39                                                                'message' => 'Mimimum 8 characters long' 
    40                                    ), 
    41                        'email' => 'email', 
    42                        'born' => array( 
    43                                'rule' => 'date', 
    44                                'message' => 'Enter a valid date', 
    45                                                            'allowEmpty' => true 
    46                                ) 
    47                        ); */ 
     19 public $validate = array( 
     20  'title' => array( 
     21                    'rule'       => array('minLength', 4), 
     22                    'message'    => 'Title must be at least four characters long', 
     23            'allowEmpty' => false, 
     24                    'required'   => true  
     25            ), 
     26       
     27  'participation' => array( 
     28                    'rule'       => array('minLength', 8), 
     29                    'message'    => 'Text must be at least 8 characters long', 
     30            'allowEmpty' => false, 
     31                    'required'   => true  
     32            ) 
     33   ); 
    4834} 
    4935?> 
  • trunk/app/views/shares/download.ctp

    r557 r733  
    1616    exit; 
    1717  } 
    18  
    1918?> 
  • trunk/app/views/vclassrooms/admin_record.ctp

    r732 r733  
    99 echo $html->div('title_section', $data['User']['name']); 
    1010 echo $html->div(null, $html->link($data['User']['email'], $data['User']['email'])); 
    11  // send message and send record to student    
     11 // send message || send record to student    
    1212 echo $html->para(null,  
    1313                 $ajax->link($html->image('admin/compose_on.gif', array('alt'=>'Compose', 'title'=>'Compose Message')) , 
     
    2727 echo $ajax->div('compose').$ajax->divEnd('compose');  
    2828 
    29  $points = (int) 0; // total points 
     29 $points = (int) 0; // total points used in the end of script 
    3030 
    3131 // Tests 
     
    4141        e($html->div(null, $t['TestsVclassroom']['title'], array('style'=>'width:350px;float:right;'))); 
    4242      else: 
    43         e($html->div(null, $t['TestsVclassroom']['points'] .' points',  array('id'=>$div_id, 'style'=>'width:180px;float:left;'))); 
     43        e($html->div(null, $t['TestsVclassroom']['points'] .' '.__('points', true),  array('id'=>$div_id, 'style'=>'width:180px;float:left;'))); 
    4444        e('<div style="width:450px;float:right;">'); 
    45       echo $html->link($t['TestsVclassroom']['title'], '#', array('title'=>'View test', 'onclick'=> 
     45      echo $html->link($t['TestsVclassroom']['title'], '#'.$div_id, array('title'=>'View test', 'onclick'=> 
    4646        "window.open('/admin/tests/see/".$data['User']['id']."/".$t['TestsVclassroom']['test_id']."/".$data['Vclassroom']['id']."','mywin','left=20,top=10,width=700,height=700,scrollbars=1,toolbar=0,resizable=1')")) . '&nbsp;&nbsp;'; 
    4747/* 
     
    6565    endforeach; 
    6666 else: 
    67       echo $html->para(null, 'No tests found'); 
     67      echo $html->para(null, __('No tests found', true)); 
    6868 endif; 
    6969 
     
    7777     $div_id   = 'w'.$w['Webquest']['id']; 
    7878     e('<div style="border:1px dotted gray;padding:4px;margin:2px;height:20px;">'); 
    79      e($html->div(null, $w['ResultWebquest']['points'] .' points',  array('id'=>$div_id, 'style'=>'width:150px;float:left;'))); 
     79     e($html->div(null, $w['ResultWebquest']['points'] .' '.__('points', true),  array('id'=>$div_id, 'style'=>'width:150px;float:left;'))); 
    8080     e('<div style="width:450px;float:right;">'); 
    81      echo $html->link($w['Webquest']['title'], '#', array('title'=>'View reply', 'onclick'=> 
     81     echo $html->link($w['Webquest']['title'], '#'.$div_id, array('title'=>__('View reply', true), 'onclick'=> 
    8282        "window.open('/admin/webquests/see/".$data['User']['id']."/".$w['Webquest']['id']."','mywin','left=20,top=20,width=700,height=700,toolbar=0,resizable=1')")) . '&nbsp;&nbsp;'; 
    8383 
    84       echo $ajax->link($html->image('static/adownmod.png', array('alt'=>'Points down', 'title'=>'Points down')), 
     84      echo $ajax->link($html->image('static/adownmod.png', array('alt'=>__('Points down', true), 'title'=>__('Points down', true))), 
    8585                           '/admin/webquests/points/'.$w['Webquest']['id'].'/down', 
    8686                        array('update'  => $div_id, 
     
    8888                                  'after'   =>'tp('.$data['User']['id'].','.$data['Vclassroom']['id'].')', 
    8989                          'complete'=>"Element.hide('loadingre');Effect.Appear(".$div_id.")"),null,false); 
    90       echo $ajax->link($html->image('static/aupmod.png', array('alt'=>'Points up', 'title'=>'Points up')), 
     90      echo $ajax->link($html->image('static/aupmod.png', array('alt'=>__('Points up', true), 'title'=>__('Points up', true))), 
    9191                           '/admin/webquests/points/'.$w['Webquest']['id'].'/up', 
    9292                        array('update'  => $div_id, 
     
    112112     e($html->div(null, $tr['ResultTreasure']['points'] .' points',  array('id'=>$div_id, 'style'=>'width:150px;float:left;'))); 
    113113     e('<div style="width:450px;float:right;">'); 
    114      echo $html->link($tr['Treasure']['title'], '#', array('title'=>__('View text', true), 'onclick'=> 
     114     echo $html->link($tr['Treasure']['title'], '#'.$div_id, array('title'=>__('View text', true), 'onclick'=> 
    115115        "window.open('/admin/treasures/see/".$data['User']['id']."/".$tr['Treasure']['id']."','mywin','left=20,top=20,width=700,height=700,toolbar=0,resizable=1')")) . '&nbsp;&nbsp;'; 
    116116 
     
    142142      $div_id = 're'.$re['Reply']['id']; 
    143143      e('<div style="border:1px dotted gray;padding:4px;margin:2px;height:20px;">'); 
    144       e($html->div(null, $re['Reply']['points'].' points',  array('id'=>$div_id, 'style'=>'width:150px;float:left;'))); 
     144      e($html->div(null, $re['Reply']['points'].' '.__('points', true),  array('id'=>$div_id, 'style'=>'width:150px;float:left;'))); 
    145145      e('<div style="width:450px;float:right;">'); 
    146       echo $html->link(__('See participation', true), '#', array('title'=>__('See participation', true), 'onclick'=> 
     146      echo $html->link(__('See participation', true), '#'.$div_id, array('title'=>__('See participation', true), 'onclick'=> 
    147147        "window.open('/admin/topics/reply/".$re['Reply']['id']."','mywin','left=20,top=20,width=700,height=700,toolbar=0,resizable=1')")) . '&nbsp;&nbsp;'; 
    148148 
     
    180180   $ppoints += $p['Participation']['points']; 
    181181   
    182    echo $html->div(null, $p['Participation']['points'].' points', array('id'=>$div_id,'style'=>'width:150px;float:left;')); 
     182   echo $html->div(null, $p['Participation']['points'].' '.__('points', true), array('id'=>$div_id,'style'=>'width:150px;float:left;')); 
    183183 
    184184   echo '<div style="width:450px;float:right;">';     
    185    echo __('Participation', true).': '. $html->link($p['Participation']['title'], '#', array('title'=>'View reply', 'onclick'=>"window.open('/admin/participations/show/".$p['Participation']['id']."','mywin','left=20,top=20,width=700,height=700,toolbar=0,resizable=1')")).'  '; 
     185   echo __('Participation', true).': '. $html->link($p['Participation']['title'], '#', array('title'=>__('View text', true), 'onclick'=>"window.open('/admin/participations/show/".$p['Participation']['id']."','mywin','left=20,top=20,width=700,height=700,toolbar=0,resizable=1')")).'  '; 
    186186 
    187187       echo $ajax->link($html->image('static/adownmod.png', array('alt'=>__('Points down', true), 'title'=>__('Points down', true))) , 
     
    222222 
    223223   echo '<div style="width:450px;float:right;">';     
    224    echo __('Report', true).': '. $html->link($r['Report']['description'], '#', array('title'=>__('View reply', true), 'onclick'=>"window.open('/admin/participations/show/".$r['Report']['id']."','mywin','left=20,top=20,width=700,height=700,toolbar=0,resizable=1')")).'  '; 
     224   echo __('Report', true).': '. $html->link($r['Report']['description'], '#'.$div_id, array('title'=>__('View file', true), 'onclick'=>"window.open('/admin/reports/download/".$r['Report']['id']."','mywin','left=20,top=20,width=700,height=700,toolbar=0,resizable=1')")).'  '; 
    225225 
    226226     echo $ajax->link($html->image('static/adownmod.png', array('alt'=>__('Points down', true), 'title'=>__('Points down', true))) ,