source: iPeer/app/views/evaluations/student_view_mixeval_evaluation_results.ctp @ aee5515

3.1.xdevhotfixpagodaboxticket463
Last change on this file since aee5515 was aee5515, checked in by Compass <pan.luo@…>, 6 years ago

Updated the result pages for missing indexes, also close #406

For #406, it seems all the result pages have grade shown.

  • Property mode set to 100644
File size: 6.1 KB
Line 
1<h2><?php __('Evaluation Result Detail')?></h2>
2<!-- Event Details Table -->
3
4<table class="standardtable">
5<tr>
6    <th><?php __('Event Name')?></th>
7    <th><?php __('Evaluated By')?></th>
8    <th><?php __('Due Date')?></th>
9    <th><?php __('Self-Evaluation')?></th>
10</tr>
11<tr>
12    <td><?php echo $event['Event']['title'] ?></td>
13    <td><?php echo $event['Group']['group_name'] ?></td>
14    <td><?php echo Toolkit::formatDate(date("Y-m-d H:i:s", strtotime($event['Event']['due_date']))) ?></td>
15    <td><?php echo ($event['Event']['self_eval']) ? 'Yes' : 'No' ?></td>
16</tr>
17</table>
18
19<table class="standardtable">
20<tr>
21    <th><?php __('Description')?></th>
22</tr>
23<tr>
24    <td><?php echo $event['Event']['description'] ?></td>
25</tr>
26</table>
27
28<h2><?php __('Summary')?></h2>
29<table class="standardtable">
30<tr>
31    <th><?php __('Rating')?></th>
32</tr>
33<tr>
34    <td>
35    <?php
36    isset($scoreRecords[User::get('id')]['grade_released'])? $gradeReleaseStatus = $scoreRecords[User::get('id')]['grade_released'] : $gradeReleaseStatus = array();
37    if ($gradeReleaseStatus) {
38            $finalAvg = $memberScoreSummary[User::get('id')]['received_ave_score'] - number_format($avePenalty, 2);
39            (number_format($avePenalty, 2) > 0) ? ($stringAddOn = ' - '.'('.'<font color=\'red\'>'.number_format($avePenalty, 2).'</font>'.
40                ')'.'<font color=\'red\'>*</font>'.' = '.number_format($finalAvg, 2)) : $stringAddOn = '';
41
42            echo number_format($memberScoreSummary[User::get('id')]['received_ave_score'], 2).$stringAddOn;
43            number_format($avePenalty, 2) > 0 ? $penaltyNote = '&nbsp &nbsp &nbsp &nbsp &nbsp ( )'.'<font color=\'red\'>*</font>'.' : '.$studentResult['penalty'].
44                '% late penalty.' : $penaltyNote = '';
45            echo $penaltyNote;
46        } else {
47            echo __('Not Released', true);
48        }
49    ?>
50    </td>
51</tr>
52</table>
53
54<table width="100%"  border="0" cellpadding="8" cellspacing="0" bgcolor="#FFFFFF">
55  <tr>
56    <td>
57<?php echo $html->script('ricobase')?>
58<?php echo $html->script('ricoeffects')?>
59<?php echo $html->script('ricoanimation')?>
60<?php echo $html->script('ricopanelcontainer')?>
61<?php echo $html->script('ricoaccordion')?>
62        <?php echo empty($params['data']['Evaluation']['id']) ? null : $html->hidden('Evaluation/id'); ?>
63    <!-- Render Event Info table -->
64          <?php
65          if (isset($memberScoreSummary[User::get('id')])) {
66            $receviedAvePercent = $memberScoreSummary[User::get('id')]['received_ave_score'] / $mixeval['Mixeval']['total_marks'] * 100;
67            $releaseStatus = $scoreRecords[User::get('id')]['grade_released'];
68          } else {
69          $receviedAvePercent = 0;
70          $releaseStatus = array();
71        }
72    ?>
73<div id='mixeval_result'>
74
75<?php
76$numerical_index = 1;  //use numbers instead of words; get users to refer to the legend
77$color = array("", "#FF3366","#ff66ff","#66ccff","#66ff66","#ff3333","#00ccff","#ffff33");
78$membersAry = array();  //used to format result
79$groupAve = 0;
80
81//unset($scoreRecords[$rdAuth->id]);
82
83$gradeReleased = !empty($scoreRecords[User::get('id')]['grade_released']) ?
84        $scoreRecords[User::get('id')]['grade_released'] :
85        "No Grades Released";
86$commentReleased = !empty($scoreRecords[User::get('id')]['comment_released']) ?
87        $scoreRecords[User::get('id')]['comment_released'] :
88        "No Comments Released";
89
90?>
91                         <!--br>Total: <?php /*$memberAve = number_format($membersAry[$user['id']]['received_ave_score'], 2);
92                                          echo number_format($membersAry[$user['id']]['received_ave_score'], 2);
93                                          echo '('.number_format($membersAry[$member['User']['id']]['received_ave_score_%']) .'%)';
94                                          if ($memberAve == $groupAve) {
95                                            echo "&nbsp;&nbsp;<< Same Mark as Group Average >>";
96                                          } else if ($memberAve < $groupAve) {
97                                            echo "&nbsp;&nbsp;<font color='#FF6666'><< Below Group Average >></font>";
98                                          } else if ($memberAve > $groupAve) {
99                                            echo "&nbsp;&nbsp;<font color='#000099'><< Above Group Average >></font>";
100                                          }*/
101                                          ?>
102                                <br><br-->
103
104<table width="100%" border="0" align="center" cellpadding="4" cellspacing="2">
105        <tr>
106                <td>
107<div id="accordion">
108    <!-- Panel of Evaluations Results -->
109                <div id="panelResults">
110                  <div id="panelResultsHeader" class="panelheader">
111                        <?php echo __('Evaluation Results From Your Teammates. (Randomly Ordered)       ', true);
112                        if ( !$gradeReleased && !$commentReleased) {
113          echo '<font color="red">'.__('Comments/Grades Not Released Yet.', true).'</font>';
114                        }       else if ( !$gradeReleased) {
115                          echo '<font color="red">'.__('Grades Not Released Yet.', true).'</font>';
116        }       else if ( !$commentReleased) {
117                          echo '<font color="red">'.__('Comments Not Released Yet.', true).'</font>';
118        }
119?>
120                  </div>
121                  <div style="height: 200px;" id="panelResultsContent" class="panelContent">
122          <?php
123    $params = array('controller'=>'evaluations', 'mixeval'=>$mixeval, 'mixevalQuestion'=>$mixevalQuestion, 'membersAry'=>$groupMembers, 'evalResult'=>$evalResult, 'userId'=>User::get('id'), 'scoreRecords'=>$scoreRecords);
124    echo $this->element('evaluations/student_view_mixeval_details', $params);
125    ?>
126
127                  </div>
128                </div>
129    <!-- Panel of Evaluations Reviews -->
130                <div id="panelReviews">
131                  <div id="panelReviewsHeader" class="panelheader">
132                        <?php echo __('Review Evaluations From You.', true)?>
133                  </div>
134                  <div style="height: 200px;" id="panelReviewsContent" class="panelContent">
135
136          <?php
137    $params = array('controller'=>'evaluations', 'mixeval'=>$mixeval, 'mixevalQuestion'=>$mixevalQuestion, 'membersAry'=>$groupMembers, 'evalResult'=>$reviewEvaluations, 'userId'=>User::get('id'), 'scoreRecords'=>null);
138    echo $this->element('evaluations/student_view_mixeval_details', $params);
139    ?>
140                  </div>
141                </div>
142</div>
143                </td>
144        </tr>
145
146</table>
147        <script type="text/javascript"> new Rico.Accordion( 'accordion',
148                                                                {panelHeight:500,
149                                                                 hoverClass: 'mdHover',
150                                                                 selectedClass: 'mdSelected',
151                                                                 clickedClass: 'mdClicked',
152                                                                 unselectedClass: 'panelheader'});
153
154        </script>
155</div>
156
157        </td>
158  </tr>
159</table>
Note: See TracBrowser for help on using the repository browser.