diff --git a/lms/djangoapps/course_wiki/views.py b/lms/djangoapps/course_wiki/views.py index b1d9f1cf26..cfe802bbd7 100644 --- a/lms/djangoapps/course_wiki/views.py +++ b/lms/djangoapps/course_wiki/views.py @@ -80,8 +80,8 @@ def course_wiki_redirect(request, course_id): urlpath = URLPath.create_article( root, course_slug, - title=course.title, - content="This is the wiki for " + course.title + ".", + title=course.number, + content="{0}\n===\nThis is the wiki for **{1}**'s _{2}_.".format(course.number, course.org, course.title), user_message="Course page automatically created.", user=None, ip_address=None, diff --git a/lms/djangoapps/courseware/grades.py b/lms/djangoapps/courseware/grades.py index 951c48822e..3d8d8b0ebe 100644 --- a/lms/djangoapps/courseware/grades.py +++ b/lms/djangoapps/courseware/grades.py @@ -155,8 +155,18 @@ def progress_summary(student, course, grader, student_module_cache): chapters = [] # Don't include chapters that aren't displayable (e.g. due to error) for c in course.get_display_items(): + # Skip if the chapter is hidden + hidden = c.metadata.get('hide_from_toc','false') + if hidden.lower() == 'true': + continue + sections = [] for s in c.get_display_items(): + # Skip if the section is hidden + hidden = s.metadata.get('hide_from_toc','false') + if hidden.lower() == 'true': + continue + # Same for sections graded = s.metadata.get('graded', False) scores = [] diff --git a/lms/djangoapps/simplewiki/views.py b/lms/djangoapps/simplewiki/views.py index ac807b13ed..ef0928709f 100644 --- a/lms/djangoapps/simplewiki/views.py +++ b/lms/djangoapps/simplewiki/views.py @@ -39,7 +39,7 @@ def update_template_dictionary(dictionary, request=None, course=None, article=No if course: dictionary['course'] = course if 'namespace' not in dictionary: - dictionary['namespace'] = course.wiki_namespace + dictionary['namespace'] = "edX" else: dictionary['course'] = None @@ -99,7 +99,7 @@ def root_redirect(request, course_id=None): course = get_opt_course_with_access(request.user, course_id, 'load') #TODO: Add a default namespace to settings. - namespace = course.wiki_namespace if course else "edX" + namespace = "edX" try: root = Article.get_root(namespace) @@ -479,7 +479,7 @@ def not_found(request, article_path, course): """Generate a NOT FOUND message for some URL""" d = {'wiki_err_notfound': True, 'article_path': article_path, - 'namespace': course.wiki_namespace} + 'namespace': "edX"} update_template_dictionary(d, request, course) return render_to_response('simplewiki/simplewiki_error.html', d) diff --git a/lms/envs/common.py b/lms/envs/common.py index 408e770072..af8a69a8eb 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -304,6 +304,7 @@ SIMPLE_WIKI_REQUIRE_LOGIN_VIEW = False ################################# WIKI ################################### WIKI_ACCOUNT_HANDLING = False WIKI_EDITOR = 'course_wiki.editors.CodeMirror' +WIKI_SHOW_MAX_CHILDREN = 0 # We don't use the little menu that shows children of an article in the breadcrumb ################################# Jasmine ################################### JASMINE_TEST_DIRECTORY = PROJECT_ROOT + '/static/coffee' diff --git a/lms/envs/test.py b/lms/envs/test.py index 11534b3f4d..1ab3f550b8 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -84,11 +84,17 @@ DATABASES = { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ENV_ROOT / "db" / "course1.db", }, - + 'edx/full/6.002_Spring_2012': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ENV_ROOT / "db" / "course2.db", - } + }, + + 'edX/toy/TT_2012_Fall': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': ENV_ROOT / "db" / "course3.db", + }, + } CACHES = { diff --git a/lms/templates/courseware/courseware.html b/lms/templates/courseware/courseware.html index 6102afc6cb..483d11877b 100644 --- a/lms/templates/courseware/courseware.html +++ b/lms/templates/courseware/courseware.html @@ -59,8 +59,8 @@
${err}${err | h}+ {% trans "Click each revision to see a list of edited lines. Click the Preview button to see how the article looked at this stage. At the bottom of this page, you can change to a particular revision or merge an old revision with the current one." %} +