Commit cd6b2147 by Calen Pennington

Merge pull request #628 from MITx/feature/cale/manual-git-reload-feature-flag

Isolate manual git reload behind a feature flag
parents 579544ec 4088ac54
...@@ -88,6 +88,7 @@ def instructor_dashboard(request, course_id): ...@@ -88,6 +88,7 @@ def instructor_dashboard(request, course_id):
# process actions from form POST # process actions from form POST
action = request.POST.get('action', '') action = request.POST.get('action', '')
if settings.MITX_FEATURES['ENABLE_MANUAL_GIT_RELOAD']:
if 'GIT pull' in action: if 'GIT pull' in action:
data_dir = course.metadata['data_dir'] data_dir = course.metadata['data_dir']
log.debug('git pull %s' % (data_dir)) log.debug('git pull %s' % (data_dir))
...@@ -115,7 +116,7 @@ def instructor_dashboard(request, course_id): ...@@ -115,7 +116,7 @@ def instructor_dashboard(request, course_id):
except Exception as err: except Exception as err:
msg += '<br/><p>Error: %s</p>' % escape(err) msg += '<br/><p>Error: %s</p>' % escape(err)
elif action == 'Dump list of enrolled students': if action == 'Dump list of enrolled students':
log.debug(action) log.debug(action)
datatable = get_student_grade_summary_data(request, course, course_id, get_grades=False) datatable = get_student_grade_summary_data(request, course, course_id, get_grades=False)
datatable['title'] = 'List of students enrolled in %s' % course_id datatable['title'] = 'List of students enrolled in %s' % course_id
......
...@@ -73,6 +73,7 @@ MITX_FEATURES = { ...@@ -73,6 +73,7 @@ MITX_FEATURES = {
'ENABLE_SQL_TRACKING_LOGS': False, 'ENABLE_SQL_TRACKING_LOGS': False,
'ENABLE_LMS_MIGRATION': False, 'ENABLE_LMS_MIGRATION': False,
'ENABLE_MANUAL_GIT_RELOAD': False,
'DISABLE_LOGIN_BUTTON': False, # used in systems where login is automatic, eg MIT SSL 'DISABLE_LOGIN_BUTTON': False, # used in systems where login is automatic, eg MIT SSL
......
...@@ -18,6 +18,7 @@ MITX_FEATURES['ENABLE_SQL_TRACKING_LOGS'] = True ...@@ -18,6 +18,7 @@ MITX_FEATURES['ENABLE_SQL_TRACKING_LOGS'] = True
MITX_FEATURES['SUBDOMAIN_COURSE_LISTINGS'] = False # Enable to test subdomains--otherwise, want all courses to show up MITX_FEATURES['SUBDOMAIN_COURSE_LISTINGS'] = False # Enable to test subdomains--otherwise, want all courses to show up
MITX_FEATURES['SUBDOMAIN_BRANDING'] = True MITX_FEATURES['SUBDOMAIN_BRANDING'] = True
MITX_FEATURES['FORCE_UNIVERSITY_DOMAIN'] = None # show all university courses if in dev (ie don't use HTTP_HOST) MITX_FEATURES['FORCE_UNIVERSITY_DOMAIN'] = None # show all university courses if in dev (ie don't use HTTP_HOST)
MITX_FEATURES['ENABLE_MANUAL_GIT_RELOAD'] = True
WIKI_ENABLED = True WIKI_ENABLED = True
......
...@@ -71,7 +71,7 @@ table.stat_table td { ...@@ -71,7 +71,7 @@ table.stat_table td {
<hr width="40%" style="align:left"> <hr width="40%" style="align:left">
%endif %endif
%if admin_access: %if settings.MITX_FEATURES['ENABLE_MANUAL_GIT_RELOAD'] and admin_access:
<p> <p>
<input type="submit" name="action" value="Reload course from XML files"> <input type="submit" name="action" value="Reload course from XML files">
<input type="submit" name="action" value="GIT pull and Reload course"> <input type="submit" name="action" value="GIT pull and Reload course">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment