diff --git a/common/djangoapps/xmodule_modifiers.py b/common/djangoapps/xmodule_modifiers.py index 4b3050e227..86443520c2 100644 --- a/common/djangoapps/xmodule_modifiers.py +++ b/common/djangoapps/xmodule_modifiers.py @@ -112,11 +112,14 @@ def add_histogram(get_html, module, user): edit_link = "%s/%s/tree/master/%s" % (giturl,data_dir,filepath) else: edit_link = False + source_file = module.metadata.get('source_file','') # source used to generate the problem XML, eg latex or word staff_context = {'definition': module.definition.get('data'), 'metadata': json.dumps(module.metadata, indent=4), 'location': module.location, 'xqa_key': module.metadata.get('xqa_key',''), + 'source_file' : source_file, + 'source_url': '%s/%s/tree/master/%s' % (giturl,data_dir,source_file), 'category': str(module.__class__.__name__), 'element_id': module.location.html_id().replace('-','_'), 'edit_link': edit_link, diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index 3896affca1..e9ec4518c8 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -3,6 +3,7 @@ import time import logging import requests from lxml import etree +from path import path # NOTE (THK): Only used for detecting presence of syllabus from xmodule.util.decorators import lazyproperty from xmodule.graders import load_grading_policy @@ -77,6 +78,10 @@ class CourseDescriptor(SequenceDescriptor): # NOTE: relies on the modulestore to call set_grading_policy() right after # init. (Modulestore is in charge of figuring out where to load the policy from) + # NOTE (THK): This is a last-minute addition for Fall 2012 launch to dynamically + # disable the syllabus content for courses that do not provide a syllabus + self.syllabus_present = self.system.resources_fs.exists(path('syllabus')) + def set_grading_policy(self, policy_str): """Parse the policy specified in policy_str, and save it""" diff --git a/common/lib/xmodule/xmodule/css/sequence/display.scss b/common/lib/xmodule/xmodule/css/sequence/display.scss index 90b1ff53a4..05002e881d 100644 --- a/common/lib/xmodule/xmodule/css/sequence/display.scss +++ b/common/lib/xmodule/xmodule/css/sequence/display.scss @@ -73,6 +73,11 @@ nav.sequence-nav { padding: 0; position: relative; @include transition(); + outline: 0; + + &:focus { + outline: 0; + } &:hover { background-color: #fff; @@ -211,7 +216,7 @@ nav.sequence-nav { ul { position: absolute; top: 0; - list-style: none; + list-style: none !important; height: 100%; right: 0; top: 0; @@ -238,6 +243,11 @@ nav.sequence-nav { width: 40px; text-indent: -9999px; @include transition(all, .2s, $ease-in-out-quad); + outline: 0; + + &:focus { + outline: 0; + } &:hover { opacity: .5; @@ -345,3 +355,10 @@ nav.sequence-bottom { } } } + +div.course-wrapper section.course-content ol.vert-mod > li ul.sequence-nav-buttons { + list-style: none !important; +} + + + diff --git a/common/lib/xmodule/xmodule/css/video/display.scss b/common/lib/xmodule/xmodule/css/video/display.scss index fb78f46d77..504d5df8cf 100644 --- a/common/lib/xmodule/xmodule/css/video/display.scss +++ b/common/lib/xmodule/xmodule/css/video/display.scss @@ -101,6 +101,11 @@ div.video { @include transition(background-color, opacity); width: 14px; background: url('../images/vcr.png') 15px 15px no-repeat; + outline: 0; + + &:focus { + outline: 0; + } &:empty { height: 46px; @@ -171,6 +176,11 @@ div.video { @include transition(); -webkit-font-smoothing: antialiased; width: 116px; + outline: 0; + + &:focus { + outline: 0; + } h3 { color: #999; diff --git a/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_wikipath.py b/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_wikipath.py deleted file mode 100755 index 4c6f6fadd7..0000000000 --- a/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_wikipath.py +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env python - -''' -Wikipath Extension for Python-Markdown -====================================== - -Converts [Link Name](wiki:ArticleName) to relative links pointing to article. Requires Python-Markdown 2.0+ - -Basic usage: - - >>> import markdown - >>> text = "Some text with a [Link Name](wiki:ArticleName)." - >>> html = markdown.markdown(text, ['wikipath(base_url="/wiki/view/")']) - >>> html - u'
Some text with a Link Name.
' - -Dependencies: -* [Python 2.3+](http://python.org) -* [Markdown 2.0+](http://www.freewisdom.org/projects/python-markdown/) -''' - - -import markdown -try: - # Markdown 2.1.0 changed from 2.0.3. We try importing the new version first, - # but import the 2.0.3 version if it fails - from markdown.util import etree -except: - from markdown import etree - - -class WikiPathExtension(markdown.Extension): - def __init__(self, configs): - # set extension defaults - self.config = { - 'base_url' : ['/', 'String to append to beginning of URL.'], - 'html_class' : ['wikipath', 'CSS hook. Leave blank for none.'] - } - - # Override defaults with user settings - for key, value in configs : - # self.config[key][0] = value - self.setConfig(key, value) - - - def extendMarkdown(self, md, md_globals): - self.md = md - - # append to end of inline patterns - WIKI_RE = r'\[(?PCourse: ${ course } + +
+ +Existing students: + +
${ existing_students } + +
New students added: +${ added_students } + +
Students rejected: +${ rejected_students } + +
Debug: +
${ debug } + + +
foo +
bar +
biff
diff --git a/lms/templates/staff_problem_info.html b/lms/templates/staff_problem_info.html
index f91decf876..47194aa6fd 100644
--- a/lms/templates/staff_problem_info.html
+++ b/lms/templates/staff_problem_info.html
@@ -31,9 +31,12 @@ ${module_content}
Staff Debug
${definition | h}
metadata = ${metadata | h}
category = ${category | h}
diff --git a/lms/templates/wiki/create.html b/lms/templates/wiki/create.html
index 25cc197bc4..886764ba84 100644
--- a/lms/templates/wiki/create.html
+++ b/lms/templates/wiki/create.html
@@ -32,14 +32,15 @@
diff --git a/lms/templates/wiki/delete.html b/lms/templates/wiki/delete.html
new file mode 100644
index 0000000000..6cb2b36707
--- /dev/null
+++ b/lms/templates/wiki/delete.html
@@ -0,0 +1,64 @@
+{% extends "wiki/base.html" %}
+{% load wiki_tags i18n sekizai_tags %}
+{% load url from future %}
+
+{% block pagetitle %}{% trans "Delete article" %}{% endblock %}
+
+{% block wiki_contents %}
+ {% trans "You cannot delete a root article." %}
+ + {% else %} + + {% if cannot_delete_children %} + +{% trans "You cannot delete this article because you do not have permission to delete articles with children. Try to remove the children manually one-by-one." %}
+ + {% endif %} + + {% if delete_children %} + +{% trans "You are deleting an article. This means that its children will be deleted as well. If you choose to purge, children will also be purged!" %}
+ +{% trans "You are deleting an article. Please confirm." %}
+ + + {% endif %} + + {% endif %} +