source: iPeer/app/views/evaluations/view_mixeval_evaluation_results.ctp @ 9df04ef0

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

fixed the view evaluation result ctp files

  • Property mode set to 100644
File size: 3.8 KB
Line 
1<?php
2$result = array();
3
4$aveScoreSum = 0;
5//This section will display the evaluatees' name
6//as display the average scores their peers gave them
7//for various criteria
8foreach ($groupMembersNoTutors as $member) {
9    $score = 0;
10    if (isset($memberScoreSummary[$member['User']['id']]['received_total_score'])) {
11        $totalScore = $memberScoreSummary[$member['User']['id']]['received_total_score'];
12        $penalty = number_format(($penalties[$member['User']['id']] / 100) * $totalScore, 2);
13        $finalTotalScore = $totalScore - $penalty;
14        $penalty > 0 ? $stringAddOn = ' - '."<font color=\"red\">".$penalty."</font> = ".number_format($finalTotalScore, 2) :
15            $stringAddOn = '';
16        $aveScoreSum += $finalTotalScore;
17        $score = number_format($totalScore, 2).$stringAddOn;
18    } else {
19        $score = '-';
20    }
21    $result[$member['User']['first_name']." ".$member['User']['last_name']] = $score;
22}
23?>
24
25<div class="content-container">
26
27<!-- Render Event Info table -->
28<?php echo $this->element('evaluations/view_event_info', array('controller'=>'evaluations', 'event'=>$event));?>
29
30<div class="event-summary">
31    <span class="instruction-icon"><?php __('Summary:')?> ( <?php echo $this->Html->link(__('Basic', true), "/evaluations/viewEvaluationResults/".$event['Event']['id']."/".$event['Group']['id']."/Basic")?> |
32    <?php echo $html->link(__('Detail', true), "/evaluations/viewEvaluationResults/".$event['Event']['id']."/".$event['Group']['id']."/Detail")?> )</span>
33    <font size = "1" face = "arial" color = "red" >*Numerics in red denotes late submission penalty.</font>
34        <?php if (!$allMembersCompleted): ?>
35        <div class="incompleted">
36              <?php __('These people have not yet submit their evaluations:')?>
37            <ul>
38                    <?php foreach($inCompletedMembers as $row): $user = $row['User']; ?>
39                        <li><?php echo $user['first_name']." ".$user['last_name'] . ($row['Role']['role_id']==4 ? ' (TA)' : ' (student)');?></li>
40                <?php endforeach; ?>
41            </ul>
42        </div>
43    <?php endif; ?>
44</div>
45
46<table class="eval-result full-size">
47    <tr class="tableheader">
48        <td valign="middle"><?php __('Student Name:')?></td>
49        <td> <?php __('Total:')?>( /<?php echo number_format($mixeval['Mixeval']['total_marks'], 2)?>)</td>
50    </tr>
51
52    <?php foreach($result as $name => $score):?>
53    <tr><td><?php echo $name?></td><td><?php echo $score?></td></tr>
54    <?php endforeach; ?>
55
56    <tr class="tablesummary">
57        <td><?php __("Group Average:");?></td>
58        <td><?php echo ($allMembersCompleted ? number_format($aveScoreSum / count($groupMembers), 2) : '-')?></td>
59    </tr>
60    <?php if ($allMembersCompleted): ?>
61    <tr class="tablecell2" align="center">
62      <form name="evalForm" id="evalForm" method="POST" action="<?php echo $html->url('markEventReviewed') ?>">
63              <input type="hidden" name="event_id" value="<?php echo $event['Event']['id']?>" />
64              <input type="hidden" name="group_id" value="<?php echo $event['Group']['id']?>" />
65              <input type="hidden" name="course_id" value="<?php echo $event['Event']['course_id']?>" />
66              <input type="hidden" name="group_event_id" value="<?php echo $event['GroupEvent']['id']?>" />
67              <input type="hidden" name="display_format" value="Basic" />
68
69        <td colspan="<?php echo count($groupMembersNoTutors) +1; ?>">
70    <?php if ($event['group_event_marked'] == "reviewed"): ?>
71        <input class="reviewed" type="submit" name="mark_not_reviewed" value="<?php __('Mark Peer Evaluations as Not Reviewed')?>" />
72    <?php else: ?>
73        <input class="reviewed" type="submit" name="mark_reviewed" value="<?php __('Mark Peer Evaluations as Reviewed')?>" />
74    <?php endif; ?>
75        </td>
76      </form>
77    </tr>
78    <?php endif; ?>
79</table>
80</div>
81
82</div>
Note: See TracBrowser for help on using the repository browser.