mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 23:42:14 +00:00
Fettling with level granting logic
Untested as all of my forms broke I guess
This commit is contained in:
@@ -198,6 +198,10 @@ def user_has_qualification(user, item, depth):
|
||||
else:
|
||||
return mark_safe("<span class='fas fa-hourglass-start text-warning'></span>")
|
||||
|
||||
@register.simple_tag
|
||||
def user_level_if_present(user, level):
|
||||
return tmodels.TrainingLevelQualification.objects.filter(trainee=user, level=level).first()
|
||||
|
||||
@register.simple_tag
|
||||
def percentage_complete(level, user):
|
||||
return level.percentage_complete(user)
|
||||
|
||||
Reference in New Issue
Block a user