Changeset 773 for trunk/app

Show
Ignore:
Timestamp:
09/22/08 23:22:18 (2 months ago)
Author:
aarkerio
Message:

Test Unit fixed

Location:
trunk/app
Files:
1 added
9 modified

Legend:

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

    r688 r773  
    11--                     --- 
    22--   KARAMELO TABLES   --- Chipotle Software 2002-2008 
    3 --                     ---  
    4 -- Name: groups; Type: TABLE; Schema: public; Owner: www-data; Tablespace:  
    5  
    6 -- College information 
    73 
    84\i ./colleges.sql 
     
    7066\i ./results.sql       
    7167\i ./participations.sql 
     68\i ./chats.sql 
    7269 
    7370\i ./shares.sql 
    7471\i ./metadatas.sql 
     72-- ** School resource (Books, CDs, DVDs, Magazines, etc) ** 
    7573\i ./resources.sql 
    7674 
     
    8583\i ./uploads.sql 
    8684\i ./reports.sql 
    87 \i ./comments_lessons.sql 
     85-- ** Comments in Lesson model ** 
    8886\i ./annotations.sql 
  • trunk/app/config/sql/postgresql/results.sql

    r745 r773  
    66   test_id int NOT NULL REFERENCES tests(id) ON DELETE CASCADE, 
    77   vclassroom_id int NOT NULL REFERENCES vclassrooms(id) ON DELETE CASCADE, 
    8    created timestamp(0) with time zone DEFAULT now() NOT NULL 
     8   created timestamp(0) with time zone DEFAULT now() NOT NULL, 
    99   PRIMARY KEY (user_id, test_id, vclassroom_id, question_id) 
    1010); 
  • trunk/app/controllers/chats_controller.php

    r762 r773  
    4646 public function getMessages($vclassroom_id) 
    4747 { 
    48    $conditions = array('Chat.vclassroom_id'=>$vclassroom_id); 
    49    $fields = array('Chat.message', 'Chat.created', 'User.username');; 
    50    $order = 'Chat.id DESC'; 
    51    $limit = 15; 
     48   $this->layout = 'ajax'; 
     49   $conditions   = array('Chat.vclassroom_id'=>$vclassroom_id); 
     50   $fields       = array('Chat.message', 'Chat.created', 'User.username');; 
     51   $order        = 'Chat.id DESC'; 
     52   $limit        = 15; 
    5253      
    5354   $this->set('data', $this->Chat->findAll($conditions, $fields, $order, $limit)); 
  • trunk/app/controllers/messages_controller.php

    r759 r773  
    206206   foreach ($this->data['Message'] as $v): 
    207207     if ( $v != 0): 
    208                        $this->Message->del($v); 
     208               $this->Message->del($v); 
    209209         endif; 
    210210   endforeach; 
    211211             
    212    $this->msgFlash('Message deleted.','/messages/listing'); 
     212   $this->msgFlash(__('Data removed', true),'/messages/listing'); 
    213213 } 
    214214 
  • trunk/app/controllers/vclassrooms_controller.php

    r756 r773  
    5151   // student belongs to this class? 
    5252   if ( $this->Auth->user()): 
    53              $this->set('belongs', $this->Vclassroom->belongs($this->Auth->user('id'), $vclassroom_id)); 
     53       $this->set('belongs', $this->Vclassroom->belongs($this->Auth->user('id'), $vclassroom_id)); 
    5454   else: 
    55              $this->set('belongs', false); 
     55       $this->set('belongs', false); 
    5656   endif; 
    5757   $this->Vclassroom->unbindAll(); 
  • trunk/app/locale/eng/LC_MESSAGES/default.po

    r675 r773  
    77msgid  "Join us" 
    88msgstr "Join us" 
     9 
     10msgid  "from_dep" 
     11msgstr "From Dep" 
    912 
    1013msgid  "logged_in" 
  • trunk/app/views/messages/display.ctp

    r684 r773  
    33 echo $html->para(null, $html->link($html->image('admin/compose_on.gif', array('alt'=>'New message','title'=>'New message')),  
    44'/messages/compose', null, false, false)); 
    5 ?> 
    6 <div id="charging" style="display:none;"><?php echo $html->image('static/loading.gif', array("alt"=>"Loading")); ?></div> 
    7 <?php 
     5 
     6echo $html->div(null,$html->image('static/loading.gif',array('alt'=>'Loading')),array('id'=>'charging','style'=>'display:none;')); 
    87 
    98echo '<b>From</b>:'     . $data['User']['username']  . '<br />'; 
     
    1312echo '<input type="button" value="'.__('Reply', true).'" onclick="hU()" />'; 
    1413 
    15 echo $ajax->div("delbutton", array("style"=>"text-align:right")); 
    16    echo $form->create('Message', array('onsubmit'=>'return confirm(\'Are you sure to delete?\')','action'=>'delete')); 
     14echo $ajax->div('delbutton', array('style'=>'text-align:right')); 
     15   echo $form->create('Message', array('onsubmit'=>'return confirm(\''.__('Are you sure to want to delete this?', true).'\')','action'=>'delete')); 
    1716   echo $form->hidden('Message.id', array('value'=>$data['Message']['id'])); 
    1817   echo $form->end(__('Delete', true)); 
    19 echo $ajax->divEnd("delbutton"); 
     18echo $ajax->divEnd('delbutton'); 
    2019?> 
    2120 
     
    3130?> 
    3231<fieldset> 
    33 <legend>Reply</legend> 
     32<legend><?php __('Reply'); ?></legend> 
    3433  <?php  
    3534  echo $session->read('Auth.User.username') . "  writes: <br />"; 
    3635  
    37   echo $form->input('Message.title', array("size" => 35, "maxlength" => 50, "value"=> 'Re: ' . $data["Message"]["title"])) . "<br />"; 
     36  echo $form->input('Message.title', array('size'=>35,'maxlength'=>50,'value'=> 'Re: ' . $data['Message']['title'])) . "<br />"; 
    3837  echo $form->label('Message.body', 'Message:').'<br />'; 
    39   echo $form->textarea('Message.body', array("cols"=>50, "rows"=>10, "value"=>"\n\n".'>> '.$data["User"]["username"] .' wrote: ' . $data["Message"]["body"])); 
    40   echo $ajax->submit(__('Reply', true), array("url" => "/messages/add",  
     38  echo $form->textarea('Message.body', array('cols'=>50,'rows'=>10,'value'=>"\n\n".'>> '.$data['User']['username'] .' wrote: ' . $data["Message"]["body"])); 
     39  echo $ajax->submit(__('Reply', true), array('url' => '/messages/add',  
    4140                                         "update"=>"formhidden", 
    4241                                          "before" => "MyFCKObject.UpdateEditorFormValue();", 
  • trunk/app/views/vclassrooms/chat.ctp

    r761 r773  
    3030//<![CDATA[ 
    3131 
    32 setTimeout("getChatText(<?php echo $data['Vclassroom']['id']; ?>);",2000); 
     32setTimeout("getChatText(<?php echo $data['Vclassroom']['id']; ?>);",3000); 
    3333 
    3434// Get student total points  
     
    4343                             {method: 'get', parameters: params, onFailure: reportError}); 
    4444 
     45 setTimeout("getChatText("+vclassroom_id+")",4000); 
     46} 
     47 
     48function reportError(request) 
     49{ 
     50  alert('Sorry. There was an error.'); 
    4551} 
    4652 
     
    5258} 
    5359 
    54 function ping() { 
     60function ping()  
     61{ 
    5562  // Send ping, to let the server know I'm still here 
    5663  var url = base_url + 'ping.php'; 
  • trunk/app/views/vclassrooms/show.ctp

    r760 r773  
    1919   $t="javascript:window.open('/vclassrooms/chat/".$blog['User']['id']."/".$data['Vclassroom']['id']."', 'blank', 'toolbar=no, scrollbars=yes,width=700,height=400')";  
    2020      echo $html->link( 
    21          $html->image('static/feature_chatroom.jpg', array('alt'=>'Chatroom','title'=>'Chatroom','style'=>'margin-right:12px') 
     21         $html->image('static/chat-icon.jpg', array('alt'=>'Chatroom','title'=>'Chatroom','style'=>'margin-right:12px') 
    2222     ), '#', array("onclick"=>$t), null, null, false); 
    2323