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'\[(?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/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

    -
    +
    location = ${location | h} github = ${edit_link | h} +%if source_file: +source_url = ${source_file | h} +%endif definition =
    ${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 @@
    {% 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/rakefile b/rakefile index 9eaa4534f2..053abf56a8 100644 --- a/rakefile +++ b/rakefile @@ -200,6 +200,8 @@ task :package do "--exclude=**/.git/**", "--exclude=**/*.pyc", "--exclude=**/reports/**", + "--exclude=**/test_root/**", + "--exclude=**/.coverage/**", "-C", "#{REPO_ROOT}", "--provides=#{PACKAGE_NAME}", "--name=#{NORMALIZED_DEPLOY_NAME}", 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