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/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/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 %} +