source: iPeer/app/views/elements/evaluations/student_view_mixeval_details.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: 5.8 KB
Line 
1<?php
2$gradeReleased = isset($scoreRecords[User::get('id')]['grade_released']) ?
3$scoreRecords[User::get('id')]['grade_released'] : 1;
4$commentReleased = isset($scoreRecords[User::get('id')]['comment_released']) ?
5    $scoreRecords[User::get('id')]['comment_released'] : 1;
6$color = array("", "#FF3366","#ff66ff","#66ccff","#66ff66","#ff3333","#00ccff","#ffff33");
7
8$pos = 1;
9?>
10<table class="standardtable" style="margin-top: 2em;">
11    <tr><td width="100" colspan="<?php echo ($mixeval['Mixeval']["lickert_question_max"]+1)?>"><?php __('Section One')?>:</td></tr>
12    <tr>
13        <th width="100"><?php __('Person Being Evaluated')?></th>
14        <?php for ($i=1; $i<=$mixeval['Mixeval']["lickert_question_max"]; $i++):?>
15            <?php if (isset($mixevalQuestion[$i])): ?>
16                <th><?php echo $i.' '.$mixevalQuestion[$i]['title'] ?></th>
17                <?php $pos++; ?>
18            <?php endif; ?>
19        <?php endfor; ?>
20    </tr>
21    <?php if (!$gradeReleased && !$commentReleased) {
22    $cols = $mixeval['Mixeval']["lickert_question_max"]+1; ?>
23    <tr><td colspan="<?php echo $cols ?>">
24    <font color="red"><?php __('Comments/Grades Not Released Yet.') ?></font></td></tr>
25    <?php } else if ($gradeReleased || $commentReleased) {
26    //Retrieve the individual mixeval detail
27    if (isset($evalResult[$userId])) {
28        $memberResult = $evalResult[$userId];
29        if (isset($scoreRecords)) {
30            shuffle($memberResult);
31        }
32        foreach ($memberResult AS $row): $memberMixeval = $row['EvaluationMixeval'];
33
34        if ($scoreRecords == null) { // renders self evaluation
35            $member = $membersAry[$memberMixeval['evaluatee']];
36        } else { // renders evaluations from peers
37            $member = $membersAry[$memberMixeval['evaluator']];
38        } ?>
39        <tr>
40        <?php if (isset($scoreRecords)) { ?>
41        <td width='15%'><?php echo User::get('full_name') ?></td>
42    <?php } else { ?>
43        <td width='15%'><?php echo $member['User']['first_name'].' '.$member['User']['last_name']?></td>
44    <?php }
45
46    $resultDetails = $memberMixeval['details'];
47
48    for ($i=1; $i<=$mixeval['Mixeval']["lickert_question_max"]; $i++) {
49        $mixevalDet = $memberMixeval['details'][$i-1]['EvaluationMixevalDetail']; ?>
50        <td valign="middle">
51        <!-- Point Description Detail -->
52        <?php if ($gradeReleased && isset($mixevalDet)) {
53            if (isset($mixevalQuestion[$i-1]['Description'][$mixevalDet['selected_lom']-1]['descriptor'])) {
54                echo $mixevalQuestion[$i-1]['Description'][$mixevalDet['selected_lom']-1]['descriptor'];
55            } ?>
56        <br />
57        <?php } ?>
58
59        <!-- Points Detail -->
60        <strong>Points: </strong>
61        <?php if ($gradeReleased && isset($mixevalDet)) {
62            $lom = $mixevalDet['grade'];
63            $empty = $mixeval["Question"][$i-1]["multiplier"];
64            for ($v = 0; $v < $lom; $v++) {
65                echo $html->image('evaluations/circle.gif', array('align'=>'middle', 'vspace'=>'1', 'hspace'=>'1','alt'=>'circle'));
66                $empty--;
67            }
68            for ($t=0; $t < $empty; $t++) {
69                echo $html->image('evaluations/circle_empty.gif', array('align'=>'middle', 'vspace'=>'1', 'hspace'=>'1','alt'=>'circle_empty'));
70            } ?>
71            <br />
72        <?php } else { ?>
73            n/a<br />
74        <?php } ?>
75
76        <!-- Grades Detail -->
77        <strong>Grades: </strong>
78        <?php if ($gradeReleased && isset($mixevalDet)) {
79            echo number_format($lom, 2)." / ".number_format($mixeval["Question"][$i-1]["multiplier"], 2)."<br>";
80        } else { ?>
81                n/a<br />
82        <?php } ?>
83
84        </td>
85     <?php } ?>
86     </tr>
87
88     <?php endforeach;
89  }
90}
91 ?>
92</table>
93
94<table class="standardtable" style="margin-top: 2em;">
95    <tr><td width="100" colspan="<?php echo ($mixeval['Mixeval']["prefill_question_max"]+1)?>"><?php __('Section Two')?>:</td></tr>
96    <tr>
97    <th width="100"><?php __('Person Being Evaluated')?></th>
98    <?php for ($i=$pos; $i<=$mixeval['Mixeval']["total_question"]; $i++): ?>
99        <?php if (isset($mixevalQuestion[$i-1])): ?>
100            <th><?php echo $i.' '.$mixevalQuestion[$i-1]['title'] ?></th>
101        <?php endif; ?>
102    <?php endfor; ?>
103    </tr>
104<?php
105if (!$gradeReleased && !$commentReleased) {
106  $cols = $mixeval['Mixeval']["prefill_question_max"]+1; ?>
107  <tr><td colspan="<?php echo $cols ?>"><font color="red"><?php __('Comments/Grades Not Released Yet.') ?></font></td></tr>
108<?php }else if ($gradeReleased || $commentReleased) {
109    if (isset($evalResult[$userId])) {
110   //Retrieve the individual mixeval detail
111   $memberResult = $evalResult[$userId];
112   if (isset($scoreRecords)) {
113     shuffle($memberResult);
114   }
115   foreach ($memberResult AS $row): $memberMixeval = $row['EvaluationMixeval'];
116
117     if ($scoreRecords == null)  {
118        $member = $membersAry[$memberMixeval['evaluatee']];
119     } else {
120        $member = $membersAry[$memberMixeval['evaluator']];
121     } ?>
122
123     <tr>
124     <?php if (isset($scoreRecords)) { ?>
125       <td width='15%'><?php echo User::get('full_name') ?></td>
126     <?php } else { ?>
127       <td width='15%'><?php echo $member['User']['first_name'].' '.$member['User']['last_name']?></td>
128     <?php }
129
130     $resultDetails = $memberMixeval['details'];
131     //foreach ($resultDetails AS $detail) : $mixevalDet = $detail['EvaluationMixevalDetail'];
132     for ($i=$pos; $i<=$mixeval['Mixeval']["total_question"]; $i++) {
133        if (isset($memberMixeval['details'][$i-1])) {
134          $mixevalDet = $memberMixeval['details'][$i-1]['EvaluationMixevalDetail']; ?>
135          <!-- Comments -->
136          <td>
137            <strong><?php echo __('Comment', true)?>: </strong>
138            <?php echo ($commentReleased && isset($mixevalDet) ? $mixevalDet["question_comment"] : 'n/a');?>
139          </td>
140      <?php }
141    } ?>
142     </tr>
143
144     <?php endforeach;
145  }
146}
147
148 ?>
149</table>
Note: See TracBrowser for help on using the repository browser.