source: iPeer/app/views/evaluations/view_rubric_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: 4.5 KB
Line 
1<h3><?php __('Evaluation Event Detail')?></h3>
2<!-- Event Details Table -->
3<table class="standardtable">
4<tr>
5    <th><?php __('Event Name')?></th>
6    <th><?php __('Group')?></th>
7    <th><?php __('Due Date')?></th>
8    <th><?php __('Self-Evaluation')?></th>
9</tr>
10<tr>
11    <td><?php echo $event['Event']['title'] ?></td>
12    <td><?php echo $event['Group']['group_name'] ?></td>
13    <td><?php echo Toolkit::formatDate(date("Y-m-d H:i:s", strtotime($event['Event']['due_date']))) ?></td>
14    <td><?php echo ($event['Event']['self_eval']) ? 'Yes' : 'No'?></td>
15</tr>
16</table>
17
18<table class="standardtable">
19<tr>
20    <th><?php __('Description')?></th>
21</tr>
22
23<tr>
24    <td><?php echo $event['Event']['description'] ?></td>
25</tr>
26</table>
27
28<h3><?php __('Summary')?>
29 :(<?php echo $this->Html->link(__('Basic', true), "/evaluations/viewEvaluationResults/".$event['Event']['id']."/".$event['Group']['id']."/Basic")?> |
30    <?php echo $html->link(__('Detail', true), "/evaluations/viewEvaluationResults/".$event['Event']['id']."/".$event['Group']['id']."/Detail")?> )</h3>
31
32<!-- Users who haven't done the evaluation yet table -->
33<table class="standardtable">
34<?php
35if (!$allMembersCompleted) {
36    echo $html -> tableHeaders(array(__('These people have not yet submitted their evaluations', true)), null, array('class' => 'red'));
37    $incompletedMembersArr = array();
38    $users = array();
39    foreach ($inCompletedMembers as $row) {
40        $user = $row['User'];
41        array_push($incompletedMembersArr, $user['first_name'] . " " . $user['last_name']);
42        $users[] = array($user['first_name'] . " " . $user['last_name'] . ($row['Role']['role_id'] == 4 ? ' (TA)' : ' (student)'));
43    }
44    echo $html -> tableCells($users);
45}
46?>
47</table>
48
49<!-- Show Evaluation Reuslts - Basic -->
50 <h3><?php __('Evaluation Results')?></h3>
51
52<table class='standardtable'>
53   <th><?php __('Student Name')?></th>
54   <th><?php __('Total') ?>
55       : (/<?php echo number_format($rubric['Rubric']['total_marks'], 2); ?>)</th>
56
57<?php
58$aveScoreSum = 0;
59//This section will display the evaluatees' name
60//as display the average scores their peers gave them
61//for various criteria
62if ($groupMembersNoTutors) {
63    foreach ($groupMembersNoTutors as $member) {
64        //Name Section
65        echo '<tr><td width="70%">' . $member['User']['first_name'] . " " . $member['User']['last_name'] . '</td>';
66
67        //Scores Section
68        if (isset($memberScoreSummary[$member['User']['id']]['received_ave_score'])) {
69            $avgScore = $memberScoreSummary[$member['User']['id']]['received_ave_score'];
70            $penalty = number_format(($penalties[$member['User']['id']] / 100) * $avgScore, 2);
71            $finalAvgScore = $avgScore - $penalty;
72            $penalty > 0 ? $stringAddOn = ' - ' . "<font color=\"red\">" . $penalty . "</font> = " . number_format($finalAvgScore, 2) : $stringAddOn = '';
73            $aveScoreSum += $finalAvgScore;
74            echo '<td width="30%">' . number_format($memberScoreSummary[$member['User']['id']]['received_ave_score'], 2) . $stringAddOn . '</td></tr>';
75        } else {
76            echo '<td width="30%">-</td></tr>';
77        }
78    }
79}
80?>
81
82    <!-- Display Average Scores -->
83    <tr class="tablesummary">
84    <td><b>
85    <?php echo __("Group Average: ", true) ?>
86    </b></td>
87    <td><b>
88    <?php echo number_format($aveScoreSum / count($groupMembersNoTutors), 2); ?>
89    </b></td>
90
91
92    <?php if ($allMembersCompleted) :?>
93    <tr class="tablecell2" align="center">
94      <form name="evalForm" id="evalForm" method="POST" action="<?php echo $html->url('markEventReviewed') ?>">
95              <input type="hidden" name="event_id" value="<?php echo $event['Event']['id']?>" />
96              <input type="hidden" name="group_id" value="<?php echo $event['Group']['id']?>" />
97              <input type="hidden" name="course_id" value="<?php echo $event['Event']['course_id']; ?>" />
98              <input type="hidden" name="group_event_id" value="<?php echo $event['GroupEvent']['id']?>" />
99              <input type="hidden" name="display_format" value="<?php __('Basic')?>" />
100
101              <td colspan="<?php echo count($groupMembers) + 1; ?>">
102           <?php  if ($event['group_event_marked'] == "reviewed"): ?>
103                 <input class="reviewed" type="submit" name="mark_not_reviewed" value="<?php __('Mark Peer Evaluations as Not Reviewed')?>" />
104            <?php else: ?>
105                  <input class="reviewed" type="submit" name="mark_reviewed" value="<?php __('Mark Peer Evaluations as Reviewed')?>" />
106            </td>
107            </form>
108  </tr>
109  <?php endif; endif; ?>
110</table>
111
112
113
Note: See TracBrowser for help on using the repository browser.