From 1532943c653ef0e9034188426865cbc7302f055c Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Tue, 20 Oct 2015 19:34:40 -0700 Subject: [PATCH 1/2] Fix: Problem Builder does not show on Progress page until student submits an answer --- problem_builder/mentoring.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/problem_builder/mentoring.py b/problem_builder/mentoring.py index d61901c3..5c9e8d1f 100644 --- a/problem_builder/mentoring.py +++ b/problem_builder/mentoring.py @@ -221,6 +221,10 @@ def score(self): return Score(score, int(round(score * 100)), correct, incorrect, partially_correct) + def max_score(self): + """ Maximum score. We scale all scores to a maximum of 1.0 so this is always 1.0 """ + return 1.0 + def include_theme_files(self, fragment): theme = self.get_theme() theme_package, theme_files = theme['package'], theme['locations'] From d4ef221d09436254c2f782b6245850c0416f84e8 Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Tue, 20 Oct 2015 11:48:52 -0700 Subject: [PATCH 2/2] Fix Travis build --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6c0587c4..dbb65671 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,12 +5,13 @@ before_install: - "export DISPLAY=:99" - "sh -e /etc/init.d/xvfb start" install: - - "pip install -e git://github.com/edx/xblock-sdk.git#egg=xblock-sdk" + - "pip install -e git://github.com/edx/xblock-sdk.git@22c1b2f173919bef22f2d9d9295ec5396d02dffd#egg=xblock-sdk" - "pip install -r requirements.txt" - - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements.txt" - - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/test-requirements.txt" + - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/base.txt" + - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/test.txt" - "pip uninstall -y xblock-problem-builder && python setup.py sdist && pip install dist/xblock-problem-builder-2.0.tar.gz" - "pip install -r test_requirements.txt" + - "mkdir var" script: - pep8 problem_builder --max-line-length=120 - pylint problem_builder --disable=all --enable=function-redefined,undefined-variable,unused-variable