Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow creator or teacher access to course without enrolment #839

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ankitjavalkar
Copy link
Contributor

No description provided.

yaksh/views.py Outdated
@@ -3185,7 +3185,9 @@ def view_module(request, module_id, course_id, msg=None):
def course_modules(request, course_id, msg=None):
user = request.user
course = Course.objects.get(id=course_id)
if user not in course.students.all():
user_is_not_student = user not in course.students.all()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use course.is_student() mehtod.

@codecov-commenter
Copy link

codecov-commenter commented Apr 29, 2021

Codecov Report

Merging #839 (8740ad6) into master (4756f86) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 8740ad6 differs from pull request most recent head 2402fd6. Consider uploading reports for the commit 2402fd6 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master     #839   +/-   ##
=======================================
  Coverage   76.69%   76.69%           
=======================================
  Files          53       53           
  Lines        7684     7686    +2     
  Branches     1166     1166           
=======================================
+ Hits         5893     5895    +2     
  Misses       1408     1408           
  Partials      383      383           
Impacted Files Coverage Δ
yaksh/views.py 70.62% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e53b86c...2402fd6. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants