def __unicode__(self):
return ' - '.join([unicode(self.corrector), self.course.title, str(self.value)])
+ @property
+ def count(self):
+ return self.corrector.corrector_scripts.filter(Q(status=2) | Q(status=3) | Q(status=4) | Q(status=5)).count()
+
@property
def level(self):
if self.value:
if self.value != 0:
- level = 100*self.corrector.corrector_scripts.filter(Q(status=2) | Q(status=3) | Q(status=4) | Q(status=5)).count()/self.value
+ level = 100*self.count/self.value
return level
else:
return 0
<th>{% trans "date end"%}</th>
<th>{% trans "Value"%}</th>
<th>{% trans "Level"%} (%)</th>
+ <th>{% trans "Marked"%} (%)</th>
</tr>
</thead>
<tbody id="spacing" class="script-list">
<td>{{ quota.date_end }}</td>
<td>{{ quota.value }}</td>
<td>{{ quota.level|floatformat }}</td>
+ <td>{{ quota.count }}</td>
</tr>
{% endfor %}
</tbody>
</form>
<br />
<center>
- <a href="#" id="submit_button" class="component_icon button icon_ok">{% trans "Submit" %}</a>
+ <a href="#" id="submit_button" class="component_icon button icon_next">{% trans "Submit" %}</a>
<img id="loading" src="{{STATIC_URL}}teleforma/images/loading.gif" style="vertical-align:middle" alt="loading" />
</center>
<br /><br />