Commit 0bed1964 by Calen Pennington

Remove filename and giturl references

parent 4040f974
...@@ -106,20 +106,6 @@ def add_histogram(get_html, module, user): ...@@ -106,20 +106,6 @@ def add_histogram(get_html, module, user):
histogram = grade_histogram(module_id) histogram = grade_histogram(module_id)
render_histogram = len(histogram) > 0 render_histogram = len(histogram) > 0
# TODO (ichuang): Remove after fall 2012 LMS migration done
if settings.MITX_FEATURES.get('ENABLE_LMS_MIGRATION'):
[filepath, filename] = module.lms.filename
osfs = module.system.filestore
if filename is not None and osfs.exists(filename):
# if original, unmangled filename exists then use it (github
# doesn't like symlinks)
filepath = filename
data_dir = osfs.root_path.rsplit('/')[-1]
edit_link = "%s/%s/tree/master/%s" % (module.lms.giturl, data_dir, filepath)
else:
edit_link = False
# Need to define all the variables that are about to be used
data_dir = ""
source_file = module.lms.source_file # source used to generate the problem XML, eg latex or word source_file = module.lms.source_file # source used to generate the problem XML, eg latex or word
# useful to indicate to staff if problem has been released or not # useful to indicate to staff if problem has been released or not
...@@ -135,11 +121,9 @@ def add_histogram(get_html, module, user): ...@@ -135,11 +121,9 @@ def add_histogram(get_html, module, user):
'location': module.location, 'location': module.location,
'xqa_key': module.lms.xqa_key, 'xqa_key': module.lms.xqa_key,
'source_file' : source_file, 'source_file' : source_file,
'source_url': '%s/%s/tree/master/%s' % (module.lms.giturl, data_dir, source_file),
'category': str(module.__class__.__name__), 'category': str(module.__class__.__name__),
# Template uses element_id in js function names, so can't allow dashes # Template uses element_id in js function names, so can't allow dashes
'element_id': module.location.html_id().replace('-','_'), 'element_id': module.location.html_id().replace('-','_'),
'edit_link': edit_link,
'user': user, 'user': user,
'xqa_server' : settings.MITX_FEATURES.get('USE_XQA_SERVER','http://xqa:server@content-qa.mitx.mit.edu/xqa'), 'xqa_server' : settings.MITX_FEATURES.get('USE_XQA_SERVER','http://xqa:server@content-qa.mitx.mit.edu/xqa'),
'histogram': json.dumps(histogram), 'histogram': json.dumps(histogram),
......
...@@ -230,10 +230,6 @@ class XmlDescriptor(XModuleDescriptor): ...@@ -230,10 +230,6 @@ class XmlDescriptor(XModuleDescriptor):
if definition_metadata: if definition_metadata:
definition['definition_metadata'] = definition_metadata definition['definition_metadata'] = definition_metadata
# TODO (ichuang): remove this after migration
# for Fall 2012 LMS migration: keep filename (and unmangled filename)
definition['filename'] = [ filepath, filename ]
return definition, children return definition, children
@classmethod @classmethod
......
...@@ -21,8 +21,6 @@ function sendlog(element_id, edit_link, staff_context){ ...@@ -21,8 +21,6 @@ function sendlog(element_id, edit_link, staff_context){
entry: $('#' + element_id + '_xqa_entry').val() entry: $('#' + element_id + '_xqa_entry').val()
}; };
if (edit_link) xqaLog["giturl"] = edit_link;
$.ajax({ $.ajax({
url: '${xqa_server}/log', url: '${xqa_server}/log',
type: 'GET', type: 'GET',
......
...@@ -42,10 +42,6 @@ ${module_content} ...@@ -42,10 +42,6 @@ ${module_content}
<div class="staff_info" style="display:block"> <div class="staff_info" style="display:block">
is_released = ${is_released} is_released = ${is_released}
location = ${location | h} location = ${location | h}
github = <a href="${edit_link}">${edit_link | h}</a>
%if source_file:
source_url = <a href="${source_url}">${source_file | h}</a>
%endif
<table> <table>
<tr><th>Module Fields</th></tr> <tr><th>Module Fields</th></tr>
%for name, field in fields: %for name, field in fields:
......
...@@ -34,9 +34,7 @@ class LmsNamespace(Namespace): ...@@ -34,9 +34,7 @@ class LmsNamespace(Namespace):
) )
start = Date(help="Start time when this module is visible", scope=Scope.settings) start = Date(help="Start time when this module is visible", scope=Scope.settings)
due = String(help="Date that this problem is due by", scope=Scope.settings, default='') due = String(help="Date that this problem is due by", scope=Scope.settings, default='')
filename = List(help="DO NOT USE", scope=Scope.content, default=['', None])
source_file = String(help="DO NOT USE", scope=Scope.settings) source_file = String(help="DO NOT USE", scope=Scope.settings)
giturl = String(help="DO NOT USE", scope=Scope.settings, default='https://github.com/MITx')
xqa_key = String(help="DO NOT USE", scope=Scope.settings) xqa_key = String(help="DO NOT USE", scope=Scope.settings)
ispublic = Boolean(help="Whether this course is open to the public, or only to admins", scope=Scope.settings) ispublic = Boolean(help="Whether this course is open to the public, or only to admins", scope=Scope.settings)
graceperiod = Timedelta(help="Amount of time after the due date that submissions will be accepted", scope=Scope.settings) graceperiod = Timedelta(help="Amount of time after the due date that submissions will be accepted", scope=Scope.settings)
......
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