source: iPeer/app/views/evaluations/view_mixeval_evaluation_results.ctp @ 6602514

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

Change the styles for evaluation result pages

  • Property mode set to 100644
File size: 2.9 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<?php echo $this->element('evaluations/summary_info', array('controller'=>'evaluations', 'event'=>$event));?>
30
31<h3><?php __('Evaluation Results')?></h3>
32<table class="standardtable">
33    <tr>
34        <th valign="middle"><?php __('Student Name:')?></th>
35        <th> <?php __('Total:')?>( /<?php echo number_format($mixeval['Mixeval']['total_marks'], 2)?>)</th>
36    </tr>
37
38    <?php foreach($result as $name => $score):?>
39    <tr><td><?php echo $name?></td><td><?php echo $score?></td></tr>
40    <?php endforeach; ?>
41
42    <tr class="tablesummary">
43        <td><?php __("Group Average:");?></td>
44        <td><?php echo ($allMembersCompleted ? number_format($aveScoreSum / count($groupMembers), 2) : '-')?></td>
45    </tr>
46    <?php if ($allMembersCompleted): ?>
47    <tr align="center">
48      <form name="evalForm" id="evalForm" method="POST" action="<?php echo $html->url('markEventReviewed') ?>">
49              <input type="hidden" name="event_id" value="<?php echo $event['Event']['id']?>" />
50              <input type="hidden" name="group_id" value="<?php echo $event['Group']['id']?>" />
51              <input type="hidden" name="course_id" value="<?php echo $event['Event']['course_id']?>" />
52              <input type="hidden" name="group_event_id" value="<?php echo $event['GroupEvent']['id']?>" />
53              <input type="hidden" name="display_format" value="Basic" />
54
55        <td colspan="<?php echo count($groupMembersNoTutors) +1; ?>">
56    <?php if ($event['group_event_marked'] == "reviewed"): ?>
57        <input class="reviewed" type="submit" name="mark_not_reviewed" value="<?php __('Mark Peer Evaluations as Not Reviewed')?>" />
58    <?php else: ?>
59        <input class="reviewed" type="submit" name="mark_reviewed" value="<?php __('Mark Peer Evaluations as Reviewed')?>" />
60    <?php endif; ?>
61        </td>
62      </form>
63    </tr>
64    <?php endif; ?>
65</table>
66</div>
67
68</div>
Note: See TracBrowser for help on using the repository browser.