summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yaksh/models.py1
-rw-r--r--yaksh/templates/yaksh/course_modules.html20
2 files changed, 11 insertions, 10 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index cce90e7..5036524 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -758,6 +758,7 @@ class Course(models.Model):
teachers = models.ManyToManyField(User, related_name='teachers')
is_trial = models.BooleanField(default=False)
instructions = models.TextField(default=None, null=True, blank=True)
+ view_grade = models.BooleanField(default=False)
learning_module = models.ManyToManyField(LearningModule,
related_name='learning_module')
diff --git a/yaksh/templates/yaksh/course_modules.html b/yaksh/templates/yaksh/course_modules.html
index 917f78c..244c2d9 100644
--- a/yaksh/templates/yaksh/course_modules.html
+++ b/yaksh/templates/yaksh/course_modules.html
@@ -2,7 +2,6 @@
{% load custom_filters %}
{% block title %} Course Modules {% endblock %}
{% block script %}
-<script src="{{ URL_ROOT }}/static/yaksh/js/donutpiechart.js"></script>
<script>
function view_unit(unit){
$("#"+unit+"_down").toggle();
@@ -36,16 +35,17 @@
</div>
<center>
-<div class=" col-md-8">
-<b>Grade: {% if grade %} {{ grade }} {% else %} Will be available once the course is complete {% endif %}</b>
-</div>
-
+ {% if course.view_grade %}
+ <div class=" col-md-8">
+ <b>Grade: {% if grade %} {{ grade }} {% else %} Will be available once the course is complete {% endif %}</b>
+ </div>
+ {% endif %}
-{% if msg %}
- <div class="col-md-8 alert alert-warning animated flash" role="alert">
- {{ msg }}
- </div>
-{% endif %}
+ {% if msg %}
+ <div class="col-md-8 alert alert-warning animated flash" role="alert">
+ {{ msg }}
+ </div>
+ {% endif %}
</center>
<div class="row justify-content-md-center ">