summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 6881b4f..efd4fd7 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -46,6 +46,7 @@ languages = (
("cpp", "C++ Language"),
("java", "Java Language"),
("scilab", "Scilab"),
+ ("r", "R"),
)
question_types = (
@@ -879,6 +880,7 @@ class Course(models.Model):
copy_module_name = "Copy of {0}".format(module.name)
new_module = module._create_module_copy(user, copy_module_name)
new_course.learning_module.add(new_module)
+ return new_course
def request(self, *users):
self.requests.add(*users)
@@ -1160,6 +1162,11 @@ class CourseStatus(models.Model):
self.current_unit = unit
self.save()
+ def __str__(self):
+ return "{0} status for {1}".format(
+ self.course.name, self.user.username
+ )
+
###############################################################################
class ConcurrentUser(models.Model):