This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
... | |
show_gamification = settings.FEATURES.get('RG_GAMIFICATION', {}).get('ENABLED') | |
... | |
%> | |
... | |
<div class="nav-item hidden-mobile nav-item-dropdown" tabindex="-1"> | |
... | |
<div class="dropdown-user-menu hidden" aria-label=${_("More Options")} role="menu" id="user-menu" tabindex="-1"> | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/playbooks/openedx_native.yml b/playbooks/openedx_native.yml | |
index 9d7a04793..a97839f27 100644 | |
--- a/playbooks/openedx_native.yml | |
+++ b/playbooks/openedx_native.yml | |
@@ -67,7 +67,7 @@ | |
ECOMMERCE_CORS_ALLOW_CREDENTIALS: true | |
# For the mfe role. | |
COMMON_ECOMMERCE_BASE_URL: '{{ ECOMMERCE_ECOMMERCE_URL_ROOT }}' | |
- COMMON_ENABLE_PAYMENT_MFE: true | |
+ ECOMMERCE_ENABLE_PAYMENT_MFE: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RG_GAMIFICATION: | |
ENABLED: True | |
RG_GAMIFICATION_ENDPOINT: "https://ist-domain" | |
KEY: "{{ RG_GAMIFICATION_KEY }}" | |
SECRET: "{{ RG_GAMIFICATION_SECRET }}" | |
IGNORED_EVENT_TYPES: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FEATURES.update({ | |
"RG_GAMIFICATION": { | |
"ENABLED": True, | |
"RG_GAMIFICATION_ENDPOINT": "https://gamma.domain.in/", | |
"KEY": "key", | |
"SECRET": "secret", | |
"IGNORED_EVENT_TYPES": [] | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
show_gamification = settings.FEATURES.get('RG_GAMIFICATION', {}).get('ENABLED') | |
% if show_gamification and gamma_site_settings and check_gamma_enabled_with_cohorts_settings(self.real_user): | |
<div class="mobile-nav-item dropdown-item dropdown-nav-item"><a href="${reverse('gamma_dashboard:gamma-dashboard')}" role="menuitem">${_("Performance")}</a></div> | |
<div class="mobile-nav-item dropdown-item dropdown-nav-item"><a href="${reverse('gamma_dashboard:gamma-leaderboard')}" role="menuitem">${_("Leaderboard")}</a></div> | |
% endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def deploy(modname, username, app_name, prefix='.fsm_plugin.'): | |
""" | |
Load FSM specifications found in the specified plugin module. | |
""" | |
import importlib | |
mod = importlib.import_module(app_name + prefix + modname) | |
l = [] | |
for fsmSpec in mod.get_specs(): | |
l.append(fsmSpec.save_graph(username)) | |
return l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-def get_plugin(funcName, prefix='fsm.fsm_plugin.'): | |
+def get_plugin(funcName, prefix='.fsm_plugin.'): | |
""" | |
Import and call plugin func for this object. | |
""" | |
@@ -150,7 +151,18 @@ def get_plugin(funcName, prefix='fsm.fsm_plugin.'): | |
if not funcName: | |
raise ValueError('invalid call_plugin() with no funcName!') | |
i = funcName.rindex('.') | |
- modName = prefix + funcName[:i] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mysite/psa/views.py b/mysite/psa/views.py | |
index 3b8847a..51ea9ca 100644 | |
--- a/mysite/psa/views.py | |
+++ b/mysite/psa/views.py | |
@@ -65,7 +65,7 @@ def custom_login(request): | |
if user is not None: | |
if user.is_active: | |
login(request, user) | |
- return redirect(request.POST.get('next', '/ct/')) | |
+ return redirect(request.POST.get('next', '/ct/')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mysite/psa/views.py b/mysite/psa/views.py | |
index 37d49d5..66de578 100644 | |
--- a/mysite/psa/views.py | |
+++ b/mysite/psa/views.py | |
@@ -63,12 +63,13 @@ def custom_login(request): | |
if user is not None: | |
if user.is_active: | |
login(request, user) | |
- return redirect(request.POST.get('next', '/ct/')) | |
+ return redirect(request.POST.get('next', '/ct/')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import partial | |
class memoize(object): | |
"""cache the return value of a method | |
This class is meant to be used as a decorator of methods. The return value | |
from a given method invocation will be cached on the instance whose method | |
was invoked. All arguments passed to a method decorated with memoize must | |
be hashable. | |
NewerOlder