From 55251039d9aef5e3ee3936f68adb663557affb35 Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Mon, 20 Aug 2012 16:35:42 -0400 Subject: [PATCH 1/7] updating dependencies for pystache, networkx, graphviz and removing redundant dependency for django-staticfiles --- brew-formulas.txt | 1 + create-dev-env.sh | 2 +- requirements.txt | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/brew-formulas.txt b/brew-formulas.txt index 61e3d33e3a..0aed9645d0 100644 --- a/brew-formulas.txt +++ b/brew-formulas.txt @@ -6,3 +6,4 @@ gfortran python yuicompressor node +graphviz diff --git a/create-dev-env.sh b/create-dev-env.sh index 7d8fdd2f17..96f212c9b5 100755 --- a/create-dev-env.sh +++ b/create-dev-env.sh @@ -105,7 +105,7 @@ NUMPY_VER="1.6.2" SCIPY_VER="0.10.1" BREW_FILE="$BASE/mitx/brew-formulas.txt" LOG="/var/tmp/install-$(date +%Y%m%d-%H%M%S).log" -APT_PKGS="curl git python-virtualenv build-essential python-dev gfortran liblapack-dev libfreetype6-dev libpng12-dev libxml2-dev libxslt-dev yui-compressor coffeescript" +APT_PKGS="curl git python-virtualenv build-essential python-dev gfortran liblapack-dev libfreetype6-dev libpng12-dev libxml2-dev libxslt-dev yui-compressor coffeescript graphviz" if [[ $EUID -eq 0 ]]; then error "This script should not be run using sudo or as the root user" diff --git a/requirements.txt b/requirements.txt index 130934a8ef..90c60a1e0b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,6 @@ python-memcached python-openid path.py django_debug_toolbar -django-staticfiles>=1.2.1 fs beautifulsoup beautifulsoup4 @@ -43,4 +42,6 @@ django-ses django-storages django-threaded-multihost django-sekizai<0.7 +networkx +pystache -r repo-requirements.txt From bb80c66ed79db791ab7e31948170cdbdd3f78b0b Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Mon, 20 Aug 2012 16:41:48 -0400 Subject: [PATCH 2/7] ensuring pystache>=0.5.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 90c60a1e0b..bd8c143eff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -43,5 +43,5 @@ django-storages django-threaded-multihost django-sekizai<0.7 networkx -pystache +pystache>=0.5.2 -r repo-requirements.txt From 868b076ea750b8c75123cc0b6828a43734d3e6fe Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Mon, 20 Aug 2012 15:00:22 -0400 Subject: [PATCH 3/7] html escape errors --- lms/templates/courseware/courseware.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/templates/courseware/courseware.html b/lms/templates/courseware/courseware.html index e1d6d11f37..b63ff89f5c 100644 --- a/lms/templates/courseware/courseware.html +++ b/lms/templates/courseware/courseware.html @@ -54,8 +54,8 @@
    % for (msg, err) in course_errors: -
  • ${msg} -
    • ${err}
    +
  • ${msg | h} +
    • ${err | h}
  • % endfor
From 356fac144b1763e08c6fa673d11eedaa9482cfb1 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 20 Aug 2012 18:04:37 -0400 Subject: [PATCH 4/7] Remove pystache in favor of our custom version --- repo-requirements.txt | 1 + requirements.txt | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/repo-requirements.txt b/repo-requirements.txt index 9dc4629b49..0cb7f2d4f5 100644 --- a/repo-requirements.txt +++ b/repo-requirements.txt @@ -1,5 +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@c145596#egg=django-wiki +-e git://github.com/dementrock/pystache_custom.git#egg=pystache_custom -e common/lib/capa -e common/lib/xmodule diff --git a/requirements.txt b/requirements.txt index bd8c143eff..7e69577073 100644 --- a/requirements.txt +++ b/requirements.txt @@ -43,5 +43,4 @@ django-storages django-threaded-multihost django-sekizai<0.7 networkx -pystache>=0.5.2 -r repo-requirements.txt From 7e7247d8bf40d8fc1479b9205aa2e5de1cfee37d Mon Sep 17 00:00:00 2001 From: kimth Date: Mon, 20 Aug 2012 18:47:18 -0400 Subject: [PATCH 5/7] Don't tabulate hidden chapters and sections in the Progress view --- lms/djangoapps/courseware/grades.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lms/djangoapps/courseware/grades.py b/lms/djangoapps/courseware/grades.py index 951c48822e..1ea7b87400 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 == '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 == 'true': + continue + # Same for sections graded = s.metadata.get('graded', False) scores = [] From eaef8c70a76111ced7dc24f3cc98515382c3317d Mon Sep 17 00:00:00 2001 From: kimth Date: Mon, 20 Aug 2012 18:51:34 -0400 Subject: [PATCH 6/7] Lowercase --- lms/djangoapps/courseware/grades.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/courseware/grades.py b/lms/djangoapps/courseware/grades.py index 1ea7b87400..3d8d8b0ebe 100644 --- a/lms/djangoapps/courseware/grades.py +++ b/lms/djangoapps/courseware/grades.py @@ -157,14 +157,14 @@ def progress_summary(student, course, grader, student_module_cache): for c in course.get_display_items(): # Skip if the chapter is hidden hidden = c.metadata.get('hide_from_toc','false') - if hidden == 'true': + 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 == 'true': + if hidden.lower() == 'true': continue # Same for sections From c5aef50701b17b8eaa6d3e3219dba4c651411880 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Mon, 20 Aug 2012 19:11:47 -0400 Subject: [PATCH 7/7] add test database for new toy course. Trying to fix build --- lms/envs/test.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 = {