Skip to content

Commit

Permalink
Merge pull request #18 from steamforvietnam/fix-bug-xqueue-not-working
Browse files Browse the repository at this point in the history
Fix bug xqueue not working [edx-platform]
  • Loading branch information
vthily authored Jul 16, 2021
2 parents 2671a6b + 56bc4c1 commit 5ecc268
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 39 deletions.
28 changes: 15 additions & 13 deletions cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
'ALLOW_COURSE_RERUNS': True,

# Certificates Web/HTML Views
'CERTIFICATES_HTML_VIEW': False,
'CERTIFICATES_HTML_VIEW': True,

# Teams feature
'ENABLE_TEAMS': True,
Expand All @@ -280,7 +280,7 @@
# Special Exams, aka Timed and Proctored Exams
'ENABLE_SPECIAL_EXAMS': False,

'ORGANIZATIONS_APP': False,
'ORGANIZATIONS_APP': True,

# Show the language selector in the header
'SHOW_HEADER_LANGUAGE_SELECTOR': False,
Expand Down Expand Up @@ -342,7 +342,7 @@
# .. toggle_tickets: 'https://github.com/edx/edx-platform/pull/21616'
# .. toggle_status: supported
# .. toggle_warnings: None
'ENABLE_CHANGE_USER_PASSWORD_ADMIN': False,
'ENABLE_CHANGE_USER_PASSWORD_ADMIN': True,

### ORA Feature Flags ###

Expand All @@ -357,7 +357,7 @@
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_status: supported
# .. toggle_warnings: None
'ENABLE_ORA_TEAM_SUBMISSIONS': False,
'ENABLE_ORA_TEAM_SUBMISSIONS': True,

# .. toggle_name: ENABLE_ORA_ALL_FILE_URLS
# .. toggle_implementation: DjangoSetting
Expand All @@ -372,7 +372,7 @@
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_status: supported
# .. toggle_warnings: None
'ENABLE_ORA_ALL_FILE_URLS': False,
'ENABLE_ORA_ALL_FILE_URLS': True,

# .. toggle_name: ENABLE_ORA_USER_STATE_UPLOAD_DATA
# .. toggle_implementation: DjangoSetting
Expand All @@ -386,7 +386,7 @@
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_status: supported
# .. toggle_warnings: None
'ENABLE_ORA_USER_STATE_UPLOAD_DATA': False,
'ENABLE_ORA_USER_STATE_UPLOAD_DATA': True,

# .. toggle_name: DEPRECATE_OLD_COURSE_KEYS_IN_STUDIO
# .. toggle_implementation: DjangoSetting
Expand All @@ -404,6 +404,8 @@
# .. toggle_tickets: https://openedx.atlassian.net/browse/DEPR-58
# .. toggle_status: supported
'DEPRECATE_OLD_COURSE_KEYS_IN_STUDIO': True,

'CUSTOM_CERTIFICATE_TEMPLATES_ENABLED': True,
}

ENABLE_JASMINE = False
Expand Down Expand Up @@ -632,12 +634,12 @@

#################### CAPA External Code Evaluation #############################
XQUEUE_INTERFACE = {
'url': 'http://localhost:18040',
'basic_auth': ['edx', 'edx'],
'django_auth': {
'username': 'lms',
'password': 'password'
}
"django_auth": {
"username": "lms",
"password": "uKDGo3wV"
},
"url": "http://xqueue.courses.steamforvietnam.org",
"callback_url": "http://courses.steamforvietnam.org"
}

################################# Middleware ###################################
Expand Down Expand Up @@ -2066,7 +2068,7 @@
'ROOT_PATH': 'sandbox',
}

CORS_ORIGIN_WHITELIST = ['live.steamforvietnam.org', 'www.live.steamforvietnam.org']
CORS_ORIGIN_WHITELIST = ['live.steamforvietnam.org', 'www.live.steamforvietnam.org', 'live.steamforvietnam.net', 'www.live.steamforvietnam.net']
CORS_ORIGIN_ALLOW_ALL = False

LOGIN_REDIRECT_WHITELIST = []
Expand Down
Binary file modified conf/locale/vi/LC_MESSAGES/django.mo
Binary file not shown.
3 changes: 3 additions & 0 deletions conf/locale/vi/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -10411,6 +10411,9 @@ msgstr ""
msgid "The email address you used to register with {platform_name}"
msgstr "Địa chỉ email bạn đã được sử dụng để đăng ký với {platform_name}"

msgid "Need help logging in?"
msgstr "Bạn cần trợ giúp đăng nhập?"

#. Translators: These instructions appear on the registration form,
#. immediately
#. below a field meant to hold the user's email address.
Expand Down
Binary file modified conf/locale/vi/LC_MESSAGES/djangojs.mo
Binary file not shown.
16 changes: 8 additions & 8 deletions conf/locale/vi/LC_MESSAGES/djangojs.po
Original file line number Diff line number Diff line change
Expand Up @@ -4820,7 +4820,7 @@ msgstr ""

#: lms/static/js/student_account/views/account_settings_factory.js
msgid "Email Address (Sign In)"
msgstr "Địa chỉ Email (Sign In)"
msgstr "Địa chỉ Email (Đăng nhập)"

#: lms/static/js/student_account/views/account_settings_factory.js
msgid ""
Expand Down Expand Up @@ -8496,7 +8496,7 @@ msgstr "Có lỗi xảy ra. Hãy tải lại trang."

#: lms/templates/student_account/form_field.underscore
msgid "Need help logging in?"
msgstr ""
msgstr "Bạn có cần trợ giúp đăng nhập không?"

#: lms/templates/student_account/hinted_login.underscore
#: lms/templates/student_account/login.underscore
Expand Down Expand Up @@ -8537,23 +8537,23 @@ msgstr "Đăng ký với thông tin của tổ chức / trường"
#: lms/templates/student_account/institution_register.underscore
#: lms/templates/student_account/register.underscore
msgid "Create an Account"
msgstr ""
msgstr "Tạo một tài khoản"

#: lms/templates/student_account/login.underscore
msgid "First time here?"
msgstr ""
msgstr "Bạn chưa có tài khoản?"

#: lms/templates/student_account/login.underscore
msgid "Create an Account."
msgstr ""
msgstr "Tạo một tài khoản tại đây."

#: lms/templates/student_account/login.underscore
msgid "Sign in to continue learning as {email}"
msgstr ""
msgstr "Đăng nhập để tiếp tục học với email {email}"

#: lms/templates/student_account/login.underscore
msgid "Sign in to continue learning"
msgstr ""
msgstr "Đăng nhập để tiếp tục học"

#: lms/templates/student_account/login.underscore
msgid ""
Expand All @@ -8578,7 +8578,7 @@ msgstr ""

#: lms/templates/student_account/login.underscore
msgid "Sign In"
msgstr ""
msgstr "Đăng nhập"

#: lms/templates/student_account/login.underscore
msgid ""
Expand Down
2 changes: 1 addition & 1 deletion lms/djangoapps/bulk_email/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def _get_source_address(course_id, course_title, course_language, truncate=True)
from_addr_format = u'{name} {email}'.format(
# Translators: Bulk email from address e.g. ("Physics 101" Course Staff)
name=_(u'"{course_title}" Course Staff'),
email=u'<{course_name}-{from_email}>', # xss-lint: disable=python-wrap-html
email=u'<{from_email}>', # xss-lint: disable=python-wrap-html
)

def format_address(course_title_no_quotes):
Expand Down
30 changes: 16 additions & 14 deletions lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
'MILESTONES_APP': True,

# Organizations application flag
'ORGANIZATIONS_APP': False,
'ORGANIZATIONS_APP': True,

# Prerequisite courses feature flag
'ENABLE_PREREQUISITE_COURSES': True,
Expand Down Expand Up @@ -314,7 +314,7 @@
'LICENSING': False,

# Certificates Web/HTML Views
'CERTIFICATES_HTML_VIEW': False,
'CERTIFICATES_HTML_VIEW': True,

# Course discovery feature
'ENABLE_COURSE_DISCOVERY': False,
Expand Down Expand Up @@ -423,7 +423,7 @@
# .. toggle_tickets: 'https://github.com/edx/edx-platform/pull/21616'
# .. toggle_status: supported
# .. toggle_warnings: None
'ENABLE_CHANGE_USER_PASSWORD_ADMIN': False,
'ENABLE_CHANGE_USER_PASSWORD_ADMIN': True,

# .. toggle_name: ENABLE_COURSEWARE_MICROFRONTEND
# .. toggle_implementation: DjangoSetting
Expand Down Expand Up @@ -451,7 +451,7 @@
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_status: supported
# .. toggle_warnings: None
'ENABLE_ORA_TEAM_SUBMISSIONS': False,
'ENABLE_ORA_TEAM_SUBMISSIONS': True,

# .. toggle_name: ENABLE_ORA_ALL_FILE_URLS
# .. toggle_implementation: DjangoSetting
Expand All @@ -466,7 +466,7 @@
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_status: supported
# .. toggle_warnings: None
'ENABLE_ORA_ALL_FILE_URLS': False,
'ENABLE_ORA_ALL_FILE_URLS': True,

# .. toggle_name: ENABLE_ORA_USER_STATE_UPLOAD_DATA
# .. toggle_implementation: DjangoSetting
Expand All @@ -480,7 +480,9 @@
# .. toggle_tickets: https://openedx.atlassian.net/browse/EDUCATOR-4951
# .. toggle_status: supported
# .. toggle_warnings: None
'ENABLE_ORA_USER_STATE_UPLOAD_DATA': False,
'ENABLE_ORA_USER_STATE_UPLOAD_DATA': True,

'CUSTOM_CERTIFICATE_TEMPLATES_ENABLED': True,
}

# Settings for the course reviews tool template and identification key, set either to None to disable course reviews
Expand All @@ -503,12 +505,12 @@
# Used with XQueue
XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds
XQUEUE_INTERFACE = {
'url': 'http://localhost:18040',
'basic_auth': ['edx', 'edx'],
'django_auth': {
'username': 'lms',
'password': 'password'
}
"django_auth": {
"username": "lms",
"password": "uKDGo3wV"
},
"url": "http://xqueue.courses.steamforvietnam.org",
"callback_url": "http://courses.steamforvietnam.org"
}

# Used with Email sending
Expand Down Expand Up @@ -1226,7 +1228,7 @@ def _make_mako_template_dirs(settings):
# Locale/Internationalization
CELERY_TIMEZONE = 'UTC'
TIME_ZONE = 'UTC'
LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'vi' # http://www.i18nguy.com/unicode/language-identifiers.html
# these languages display right to left
LANGUAGES_BIDI = ("he", "ar", "fa", "ur", "fa-ir", "rtl")

Expand Down Expand Up @@ -2777,7 +2779,7 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring
'use-jwt-cookie',
)

CORS_ORIGIN_WHITELIST = ['live.steamforvietnam.org', 'www.live.steamforvietnam.org']
CORS_ORIGIN_WHITELIST = ['live.steamforvietnam.org', 'www.live.steamforvietnam.org', 'live.steamforvietnam.net', 'www.live.steamforvietnam.net']
CORS_ORIGIN_ALLOW_ALL = False
# Default cache expiration for the cross-domain proxy HTML page.
# This is a static page that can be iframed into an external page
Expand Down
2 changes: 1 addition & 1 deletion openedx/core/djangoapps/user_authn/views/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ def get(self, request):
return HttpResponse(get_login_session_form(request).to_json(), content_type="application/json")

@method_decorator(require_post_params(["email", "password"]))
@method_decorator(csrf_protect)
@method_decorator(csrf_exempt)
def post(self, request):
"""Log in a user.
Expand Down
2 changes: 1 addition & 1 deletion openedx/features/learner_profile/views/learner_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def learner_profile_context(request, profile_username, user_is_staff):
'show_dashboard_tabs': True,
'disable_courseware_js': True,
'nav_hidden': True,
'records_url': get_credentials_records_url(),
'records_url': "", # get_credentials_records_url(),
}

if own_profile or user_is_staff:
Expand Down
3 changes: 2 additions & 1 deletion requirements/edx/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
-e openedx/core/lib/xblock_builtin/xblock_discussion # via -r requirements/edx/local.in
-e git+https://github.com/edx-solutions/xblock-google-drive.git@2d176468e33c0713c911b563f8f65f7cf232f5b6#egg=xblock-google-drive # via -r requirements/edx/github.in
-e common/lib/xmodule # via -r requirements/edx/local.in
-e git+https://github.com/technige/[email protected]#egg=py2neo==3.1.2 # via -r requirements/edx/github.in
amqp==1.4.9 # via kombu
analytics-python==1.2.9 # via -r requirements/edx/base.in
aniso8601==8.0.0 # via edx-tincan-py35
Expand Down Expand Up @@ -118,7 +119,7 @@ edx-submissions==3.1.7 # via -r requirements/edx/base.in, ora2
edx-tincan-py35==0.0.5 # via edx-enterprise
edx-user-state-client==1.2.0 # via -r requirements/edx/base.in
edx-when==1.2.3 # via -r requirements/edx/base.in, edx-proctoring
edxval==1.3.4 # via -r requirements/edx/base.in
edxval==1.4.2 # via -r requirements/edx/base.in
elasticsearch==1.9.0 # via edx-search
enum34==1.1.10 # via edxval
event-tracking==0.3.2 # via -r requirements/edx/base.in, edx-proctoring, edx-search
Expand Down

0 comments on commit 5ecc268

Please sign in to comment.