Skip to content

Commit

Permalink
Nominate release candidate
Browse files Browse the repository at this point in the history
* origin/master:
  Add missing keywords to validator lost from Ficus merge
  Remove HTML template version of the GradeMe Button
  Consolidate enrollment_api code
  • Loading branch information
stanford-online-robot committed Oct 24, 2018
2 parents b3bc433 + 0218a63 commit dce4bf9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 49 deletions.
34 changes: 0 additions & 34 deletions common/lib/xmodule/xmodule/templates/html/grade_me.yaml

This file was deleted.

1 change: 1 addition & 0 deletions lms/static/js/instructor_dashboard/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
keywordValidator.keyword_regex = /%%+[^%]+%%/g;

keywordValidator.keywords = [
'%%USERNAME%%', '%%COURSE_ID%%', '%%COURSE_START_DATE%%',
'%%USER_ID%%', '%%USER_FULLNAME%%', '%%COURSE_DISPLAY_NAME%%', '%%COURSE_END_DATE%%'
];

Expand Down
23 changes: 8 additions & 15 deletions openedx/stanford/common/djangoapps/enrollment/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,6 @@
from openedx.stanford.common.djangoapps.enrollment.data import get_roster


def _enroll(course_key, email, auto_enroll, email_students, email_params, language):
enroll_email(
course_key, email, auto_enroll, email_students, email_params, language=language
)
return Response(status=status.HTTP_204_NO_CONTENT)

def _unenroll(course_key, email, email_students, email_params, language):
unenroll_email(
course_key, email, email_students, email_params, language=language
)
return Response(status=status.HTTP_204_NO_CONTENT)


class EnrollmentRosterView(APIView, ApiKeyPermissionMixIn):
"""
Read roster for a particular course. (contains PII)
Expand Down Expand Up @@ -127,7 +114,10 @@ def put(self, request, course_id):
if User.objects.filter(email=email).exists():
user = User.objects.get(email=email)
language = get_user_email_language(user)
return _enroll(course_key, email, auto_enroll, email_students, email_params, language)
enroll_email(
course_key, email, auto_enroll, email_students, email_params, language=language
)
return Response(status=status.HTTP_204_NO_CONTENT)

def delete(self, request, course_id):
"""
Expand Down Expand Up @@ -179,4 +169,7 @@ def delete(self, request, course_id):
if User.objects.filter(email=email).exists():
user = User.objects.get(email=email)
language = get_user_email_language(user)
return _unenroll(course_key, email, email_students, email_params, language)
unenroll_email(
course_key, email, email_students, email_params, language=language
)
return Response(status=status.HTTP_204_NO_CONTENT)

0 comments on commit dce4bf9

Please sign in to comment.