Commit df0b983e by Mushtaq Ali

Improve is_self_paced method

parent f9c37595
......@@ -463,10 +463,4 @@ def is_self_paced(course):
"""
Returns True if course is self-paced, False otherwise.
"""
if course:
try:
return course.self_paced and SelfPacedConfiguration.current().enabled
except AttributeError:
# if course object has no self_paced attribute
pass
return False
return course.self_paced and SelfPacedConfiguration.current().enabled if course else False
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment