Grading   A
last analyzed

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A means_failed() 0 2 1
A __str__() 0 2 1
1
from django.db import models
2
3
class Grading(models.Model):
4
    title = models.CharField(max_length=20, help_text="The title of the grade, such as 'A', 'B', 'Pass', or 'Fail'.")
5
    means_passed = models.BooleanField(default=True, help_text="Students are informed about their pass or fail in the assignment, based on this flag in their given grade.")
6
7
    class Meta:
8
        app_label = 'opensubmit'
9
10
    def __str__(self):
11
        return self.title
12
13
    def means_failed(self):
14
    	return not self.means_passed