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'\[(?P.+?)\]\(wiki:(?P[a-zA-Z\d/_-]*)\)' - wikiPathPattern = WikiPath(WIKI_RE, self.config) - wikiPathPattern.md = md - md.inlinePatterns.add('wikipath', wikiPathPattern, "
  • Courseware
  • Course Info
  • -% if settings.MITX_FEATURES.get('ENABLE_SYLLABUS'): +% if course.syllabus_present:
  • Syllabus
  • % endif % if user.is_authenticated(): diff --git a/lms/templates/enroll_students.html b/lms/templates/enroll_students.html new file mode 100644 index 0000000000..2f0b6ccc01 --- /dev/null +++ b/lms/templates/enroll_students.html @@ -0,0 +1,29 @@ +

    Student Enrollment Form

    + +

    Course: ${ course } + +

    + +

    Add new students

    + + +
    + +

    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 @@

    {% wiki_form create_form %}
    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 "Delete" %} "{{ article.current_revision.title }}"

    + + {% if cannot_delete_root %} +

    {% trans "You cannot delete a root article." %}

    +

    {% trans "Go back" %}

    + {% 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 "Articles that will be deleted" %}

    + +
      + {% for child in delete_children %} +
    • {{ child.article }}
    • + {% if delete_children_more %} +
    • {% trans "...and more!" %}
    • + {% endif %} + {% endfor %} +
    + + {% endif %} + + {% if not cannot_delete_children %} +

    {% trans "You are deleting an article. Please confirm." %}

    + +
    + {% wiki_form delete_form %} + +
    + + + + {% trans "Go back" %} + +
    +
    + {% endif %} + + {% endif %} +
    + +{% endblock %} + diff --git a/lms/templates/wiki/edit.html b/lms/templates/wiki/edit.html index e2c6cb64a5..f4bd7d138f 100644 --- a/lms/templates/wiki/edit.html +++ b/lms/templates/wiki/edit.html @@ -9,14 +9,14 @@
    {% include "wiki/includes/editor.html" %}
    - + @@ -29,16 +29,17 @@
    - +
    {% endblock %} diff --git a/lms/urls.py b/lms/urls.py index cadf75420f..ca5b01fa2c 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -154,7 +154,8 @@ if settings.COURSEWARE_ENABLED: 'courseware.views.gradebook', name='gradebook'), url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/grade_summary$', 'courseware.views.grade_summary', name='grade_summary'), - + url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/enroll_students$', + 'courseware.views.enroll_students', name='enroll_students'), ) # discussion forums live within courseware, so courseware must be enabled first diff --git a/repo-requirements.txt b/repo-requirements.txt index fcfb063077..82c0b06b34 100644 --- a/repo-requirements.txt +++ b/repo-requirements.txt @@ -1,6 +1,6 @@ -e git://github.com/MITx/django-staticfiles.git@6d2504e5c8#egg=django-staticfiles -e git://github.com/MITx/django-pipeline.git#egg=django-pipeline --e git://github.com/benjaoming/django-wiki.git@63003aa#egg=django-wiki +-e git://github.com/benjaoming/django-wiki.git@3576a2d#egg=django-wiki -e git://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev -e common/lib/capa -e common/lib/xmodule