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 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']