Changeset 746 for trunk/app/views
- Timestamp:
- 09/01/08 20:58:25 (3 months ago)
- Files:
-
- 1 modified
-
trunk/app/views/vclassrooms/admin_record.ctp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/views/vclassrooms/admin_record.ctp
r745 r746 30 30 31 31 // Tests 32 $test_points = (int) 0; 32 33 if ( count($data['tests']) > 0 ): 33 34 echo '<h1>'. __('Tests', true).'</h1>'; … … 38 39 if ($t['TestsVclassroom']['points'] === null): // not answered yet 39 40 e($html->div(null, __('Not answered this test yet', true), array('id'=>$div_id,'style'=>'width:220px;float:left;font-size:7pt;'))); 40 e($html->div(null, $t['Test sVclassroom']['title'], array('style'=>'width:350px;float:right;')));41 e($html->div(null, $t['Test']['title'], array('style'=>'width:350px;float:right;'))); 41 42 else: 42 43 e($html->div(null, $t['TestsVclassroom']['points'].' '.__('points',true),array('id'=>$div_id,'style'=>'width:180px;float:left;'))); 43 44 e('<div style="width:450px;float:right;">'); 44 echo $html->link($t['Test sVclassroom']['title'], '#'.$div_id, array('title'=>'View test', 'onclick'=>45 echo $html->link($t['Test']['title'], '#'.$div_id, array('title'=>'View test', 'onclick'=> 45 46 "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')")) . ' '; 46 47 e('</div>'); 47 48 endif; 48 49 e('</div>'); 50 $test_points += (int) $t['TestsVclassroom']['points']; 49 51 endforeach; 50 52 else: … … 53 55 54 56 // Webquests --> ResultWebquest 55 $w points = (int) 0; // webquest points57 $webquest_points = (int) 0; // webquest points 56 58 if ( count($data['webquests']) > 0 ): 57 59 echo '<h1>Webquests</h1>'; 58 60 foreach ($data['webquests'] as $w): 59 $w points += $w['ResultWebquest']['points'];61 $webquest_points += $w['ResultWebquest']['points']; 60 62 $div_id = 'w'.$w['Webquest']['id']; 61 63 e('<div style="border:1px dotted gray;padding:4px;margin:2px;height:20px;">'); … … 87 89 88 90 // Treasures. Model: Treasure 89 $t points = (int) 0; // tresure points91 $treasure_points = (int) 0; // tresure points 90 92 echo '<h1>'. __('Scavengers hunts', true).'</h1>'; 91 93 if ( count($data['treasures']) > 0 ): 92 94 foreach ($data['treasures'] as $tr): 95 $treasure_points += (int) $tr['ResultTreasure']['points']; 93 96 $div_id = 'tr'.$tr['Treasure']['id']; 94 97 e('<div style="border:1px dotted gray;padding:4px;margin:2px;height:20px;">'); … … 120 123 // Replies on forums. Model: Topic 121 124 echo '<h1>'.__('Participations in forums', true).'</h1>'; 122 $r points = (int) 0;125 $reply_points = (int) 0; 123 126 if ( count($data['replies']) > 0 ): 124 127 foreach ($data['replies'] as $re): … … 145 148 e('</div>'); 146 149 e('</div>'); 147 $r points += (int) $re['Reply']['points'];150 $reply_points += (int) $re['Reply']['points']; 148 151 endforeach; 149 152 e($html->div(null, $html->image('static/loading.gif', array('alt'=>'Loading')), array('style'=>'display:none', 'id'=>'lorep'))); … … 153 156 154 157 // Participations, model: Participation 155 $p points = (int) 0; // participation points158 $participation_points = (int) 0; // participation points 156 159 echo '<h1>'.__('Participations', true).'</h1>'; 157 160 if ( count($data['participations']) > 0 ): … … 159 162 e('<div style="border:1px dotted gray;padding:4px;margin:2px;height:20px;">'); 160 163 $div_id = 'pa'.$p['Participation']['id']; 161 $p points +=$p['Participation']['points'];164 $participation_points += (int) $p['Participation']['points']; 162 165 163 166 echo $html->div(null, $p['Participation']['points'].' '.__('points', true), array('id'=>$div_id,'style'=>'width:150px;float:left;')); … … 189 192 190 193 // Reports, model: Report 191 $repo ints = (int) 0; // report points194 $report_points = (int) 0; // report points 192 195 echo '<h1>'.__('Reports', true).'</h1>'; 193 196 if ( count($data['reports']) > 0 ): … … 195 198 e('<div style="border:1px dotted gray;padding:4px;margin:2px;height:20px;">'); 196 199 $div_id = 're'.$r['Report']['id']; 197 $repo ints += (int) $r['Report']['points'];200 $report_points += (int) $r['Report']['points']; 198 201 echo $html->div(null, $r['Report']['points'].' '.__('points',true), array('id'=>$div_id,'style'=>'width:150px;float:left;')); 199 202 … … 224 227 endif; 225 228 226 echo $html->div(null, __('Scavengers hunts', true) .' ' .__('points', true) .': '. $tpoints); 227 echo $html->div(null, 'Webquests ' .__('points', true) .': '. $wpoints); 228 echo $html->div(null, __('Replies', true). ' ' .__('points', true) .': '. $rpoints); 229 echo $html->div(null, __('Participations', true) .' '. __('points', true) .': '. $ppoints, array('id'=>'parpoints')); 230 echo $html->div(null, __('Reports', true) .' '. __('points', true) .': '. $repoints, array('id'=>'reppoints')); 231 232 $points = ($tpoints + $wpoints + $rpoints + $ppoints + $repoints); 229 echo $html->div(null, __('Test', true) .' ' .__('points', true) .': '. $test_points); 230 echo $html->div(null, __('Scavengers hunts', true) .' ' .__('points', true) .': '. $treasure_points); 231 echo $html->div(null, 'Webquests ' .__('points', true) .': '. $webquest_points); 232 echo $html->div(null, __('Replies', true). ' ' .__('points', true) .': '. $reply_points); 233 echo $html->div(null, __('Participations', true) .' '. __('points', true) .': '. $participation_points, array('id'=>'parpoints')); 234 echo $html->div(null, __('Reports', true) .' '. __('points', true) .': '. $report_points, array('id'=>'reppoints')); 235 236 $points = ($test_points + $treasure_points + $webquest_points + $reply_points + $participation_points + $report_points); 233 237 234 238 echo $ajax->div('totalpoints') .'<b>'.__('Total points', true).': ' . $points .'</b>'. $ajax->divEnd('totalpoints');
