|
@@ -23,12 +23,8 @@
|
23
|
23
|
</div>
|
24
|
24
|
<div class="modal-body">
|
25
|
25
|
<table class="table table-bordered">
|
26
|
|
- <thead>
|
27
|
|
- <th>Beginning (1-2)</th>
|
28
|
|
- <th>In Progress (3-4)</th>
|
29
|
|
- <th>Good (5-6)</th>
|
30
|
|
- <th>Excellent (7-8)</th>
|
31
|
|
- <th>Notes</th>
|
|
26
|
+ <thead id = "criteria-header">;
|
|
27
|
+
|
32
|
28
|
</thead>
|
33
|
29
|
<tbody>
|
34
|
30
|
<tr></tr>
|
|
@@ -60,7 +56,7 @@
|
60
|
56
|
<li>If a student did not complete any work for this activity, select "0" for all columns in that student's row.</li>
|
61
|
57
|
<li>If a student dropped the class, select "N/A" (Not Applicable) for all columns in that student's row.</li>
|
62
|
58
|
<li>Cells with "N/A" <strong>will not</strong> be used to determine whether a criterion is achieved. Only scores from 0 to 8 will be considered for this purpose.</li>
|
63
|
|
- <li><strong>At least one score must be from 1-8.</strong> Otherwise, the 'Publish Assessment' and 'Save as Draft' buttons will be <strong>disabled</strong>. If you want to delete previously saved scores, go back to the activity and click the "Delete Assessment" button.</li>
|
|
59
|
+ <li>For this activity, <strong>at least one score must be from 1-{{$rubric->max_score}}.</strong> Otherwise, the 'Publish Assessment' and 'Save as Draft' buttons will be <strong>disabled</strong>. If you want to delete previously saved scores, go back to the activity and click the "Delete Assessment" button.</li>
|
64
|
60
|
|
65
|
61
|
</ul>
|
66
|
62
|
</div>
|
|
@@ -81,14 +77,15 @@
|
81
|
77
|
<li>Si un estudiante no completó el trabajo para esta actividad, seleccione "0" en todas las columnas de la fila de ese estudiante.</li>
|
82
|
78
|
<li>Si un estudiante se dio de baja, seleccione "N/A" (No Aplica) en todas las columnas de la fila de ese estudiante.</li>
|
83
|
79
|
<li>Las celdas con "N/A" <strong>no</strong> serán utilizadas para determinar si un criterio se alcanzó o no. Solamente las puntuaciones del 0 al 8 serán consideradas.</li>
|
84
|
|
- <li><strong>Al menos una puntuación deber ser del 1 al 8.</strong> De otra manera, el botón para guardar <strong>se desactivará</strong>. Si quiere borrar los resultados del avalúo, vuelva a la actividad y oprima el botón que dice "Delete Assessment".</li>
|
|
80
|
+ <li>Para esta actividad, <strong>al menos una puntuación deber ser del 1 al {{$rubric->max_score}}.</strong> De otra manera, el botón para guardar <strong>se desactivará</strong>. Si quiere borrar los resultados del avalúo, vuelva a la actividad y oprima el botón que dice "Delete Assessment".</li>
|
85
|
81
|
|
86
|
82
|
|
87
|
83
|
</ul>
|
88
|
84
|
</div>
|
89
|
85
|
|
90
|
86
|
</div>
|
91
|
|
-
|
|
87
|
+ <input type='hidden' id='max' name= 'max' value='{{$rubric->max_score}}'>
|
|
88
|
+ <input type ='hidden' id='num_of_scales' name ='num_of_scales' value ='{{$rubric->num_scales}}'>
|
92
|
89
|
<p id="course">Course: {{{ $course->code }}} {{{ $course->number }}}</p>
|
93
|
90
|
<p id="section">Section: {{{ $course->section }}}</p>
|
94
|
91
|
{{ HTML::linkAction('ActivitiesController@show', 'Back to Activity', array($activity->id), array('class'=>'btn btn-default btn-sm pull-right')) }}
|
|
@@ -103,8 +100,8 @@
|
103
|
100
|
Student
|
104
|
101
|
</div>
|
105
|
102
|
</th>
|
106
|
|
- @foreach ($rubric_contents as $criterion)
|
107
|
|
- <th class="criterion-field" data-criterion-id="{{{ $criterion->id }}}"><div class="th-box">{{ $criterion->name}}</div></th>
|
|
103
|
+ @foreach ($criterion_rubric as $criterion)
|
|
104
|
+ <th class="criterion-field" data-criterion-id="{{{ $criterion->id }}}" ><div class="th-box">{{ $criterion->name}}</div></th>
|
108
|
105
|
@endforeach
|
109
|
106
|
<th>Student Percentage</th>
|
110
|
107
|
<th>Comments</th>
|
|
@@ -123,13 +120,13 @@
|
123
|
120
|
</td>
|
124
|
121
|
|
125
|
122
|
<!-- For each criterion in the rubric, there's a score field -->
|
126
|
|
- @for ($i = 0; $i<sizeof($rubric_contents); $i++)
|
|
123
|
+ @for ($i = 0; $i<sizeof($criterion_rubric); $i++)
|
127
|
124
|
<td class="score-field">
|
128
|
125
|
<select name="" id="" class="form-control" data-toggle="tooltip" data-placement="right" title="{{{ $assessment->name }}}">
|
129
|
126
|
<!-- Option from 0-8 -->
|
130
|
127
|
@for ($j=0; $j<=8; $j++)
|
131
|
128
|
<!-- If the decoded scores with index as the assessment id and second index as criterion id equals the loop index, mark it as selected -->
|
132
|
|
- @if( $j == $scores_array[$assessment->id][$rubric_contents[$i]->id])
|
|
129
|
+ @if( $j == $scores_array[$assessment->id][$criterion_rubric[$i]->criterion_id])
|
133
|
130
|
<option value="{{$j}}" selected="selected">{{ $j }}</option>
|
134
|
131
|
@else
|
135
|
132
|
<option value="{{$j}}">{{ $j }}</option>
|
|
@@ -137,7 +134,7 @@
|
137
|
134
|
@endfor
|
138
|
135
|
|
139
|
136
|
<!-- N/A option -->
|
140
|
|
- @if( $scores_array[$assessment->id][$rubric_contents[$i]->id]=="N/A")
|
|
137
|
+ @if( $scores_array[$assessment->id][$criterion_rubric[$i]->criterion_id]=="N/A")
|
141
|
138
|
<option value="N/A" selected="selected">N/A</option>
|
142
|
139
|
@else
|
143
|
140
|
<option value="N/A">N/A</option>
|
|
@@ -155,18 +152,12 @@
|
155
|
152
|
@foreach ($students as $student)
|
156
|
153
|
<tr class="student-row">
|
157
|
154
|
<td class="student-field" data-student-id={{ $student->id }}>{{{ $student->name }}}</td>
|
158
|
|
- @for ($i = 0; $i<sizeof($rubric_contents); $i++)
|
|
155
|
+ @for ($i = 0; $i<sizeof($criterion_rubric); $i++)
|
159
|
156
|
<td class="score-field">
|
160
|
157
|
<select name="" id="" class="form-control" data-toggle="tooltip" data-placement="right" title="{{{ $student->name }}}">
|
161
|
|
- <option value="0">0</option>
|
162
|
|
- <option value="1">1</option>
|
163
|
|
- <option value="2">2</option>
|
164
|
|
- <option value="3">3</option>
|
165
|
|
- <option value="4">4</option>
|
166
|
|
- <option value="5">5</option>
|
167
|
|
- <option value="6">6</option>
|
168
|
|
- <option value="7">7</option>
|
169
|
|
- <option value="8">8</option>
|
|
158
|
+ @for($i=0; $i<$rubric->max_score; $i++)
|
|
159
|
+ <option value ='{{$i}}'>{{$i}}</option>
|
|
160
|
+ @endfor
|
170
|
161
|
<option selected="selected" value="N/A">N/A</option>
|
171
|
162
|
</select>
|
172
|
163
|
</td>
|
|
@@ -182,7 +173,7 @@
|
182
|
173
|
<td>
|
183
|
174
|
<strong>Passed Criteria Percentage </strong>
|
184
|
175
|
</td>
|
185
|
|
- @for ($i = 0; $i<sizeof($rubric_contents); $i++)
|
|
176
|
+ @for ($i = 0; $i<sizeof($criterion_rubric); $i++)
|
186
|
177
|
<td class="total"><strong><span class="total-value"></span><span class="percent-sign">%</span></strong>
|
187
|
178
|
</td>
|
188
|
179
|
@endfor
|
|
@@ -198,7 +189,43 @@
|
198
|
189
|
</div>
|
199
|
190
|
</div>
|
200
|
191
|
</div>
|
|
192
|
+<script>
|
|
193
|
+ function changeTable(){
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+ amount_of_scales = parseInt($('#num_of_scales').val());
|
|
197
|
+ counter2 = 0;
|
|
198
|
+ maximum = parseInt($('#max').val());
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+ newScaleHeaders = '';
|
|
202
|
+ counter = 0;
|
|
203
|
+ division = maximum/amount_of_scales;
|
|
204
|
+ if(amount_of_scales==1){
|
|
205
|
+ newScaleHeaders+= "<th>Score (1 - "+maximum+")</th>";
|
|
206
|
+ }
|
|
207
|
+ else if(maximum!= amount_of_scales){
|
|
208
|
+ while(counter <amount_of_scales){
|
|
209
|
+
|
|
210
|
+ minimumScore = 1+(counter*division);
|
|
211
|
+ maximumScore = (1+counter)*division;
|
|
212
|
+ newScaleHeaders+= "<th>Scale "+ (counter +1) + " ("+minimumScore+" - "+maximumScore+")</th>";
|
|
213
|
+ counter++;
|
|
214
|
+ }
|
|
215
|
+ }else{
|
|
216
|
+ while(counter <amount_of_scales){
|
|
217
|
+
|
201
|
218
|
|
|
219
|
+ newScaleHeaders+= "<th>Scale "+ (counter +1) + " </th>";
|
|
220
|
+ counter++;
|
|
221
|
+ }
|
|
222
|
+ }
|
|
223
|
+ newScaleHeaders += '<th>Notes</th>';
|
|
224
|
+
|
|
225
|
+ $("#criterion-header").html(newScaleHeaders);
|
|
226
|
+
|
|
227
|
+}
|
|
228
|
+ </script>
|
202
|
229
|
@stop
|
203
|
230
|
|
204
|
231
|
@section('included-js')
|
|
@@ -215,7 +242,7 @@
|
215
|
242
|
// Page load
|
216
|
243
|
// --------------------------------------------------------------------------
|
217
|
244
|
|
218
|
|
-
|
|
245
|
+changeTable();
|
219
|
246
|
// Enable fixed headers
|
220
|
247
|
$('#assessment-table').stickyTableHeaders();
|
221
|
248
|
|
|
@@ -306,6 +333,7 @@ function percentagePerStudent(row)
|
306
|
333
|
var sum = 0 ;
|
307
|
334
|
var total = 0;
|
308
|
335
|
var percentage = 0;
|
|
336
|
+ var max_score = parseInt($('#max').val());
|
309
|
337
|
|
310
|
338
|
row.find('td.score-field').each(function(index)
|
311
|
339
|
{
|
|
@@ -317,7 +345,7 @@ function percentagePerStudent(row)
|
317
|
345
|
}
|
318
|
346
|
});
|
319
|
347
|
|
320
|
|
- percentage =((sum/(total*8))*100).toFixed(2);
|
|
348
|
+ percentage =((sum/(total*max_score))*100).toFixed(2);
|
321
|
349
|
|
322
|
350
|
//If percentage is not a number, set it to 0.
|
323
|
351
|
if(isNaN(percentage))
|