Commit fd3ba7db by Calen Pennington

Don't make cms.djangoapps a python module

parent fb8352e2
...@@ -13,7 +13,7 @@ import copy ...@@ -13,7 +13,7 @@ import copy
from json import loads from json import loads
from django.contrib.auth.models import User from django.contrib.auth.models import User
from cms.djangoapps.contentstore.utils import get_modulestore from contentstore.utils import get_modulestore
from utils import ModuleStoreTestCase, parse_json from utils import ModuleStoreTestCase, parse_json
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
......
...@@ -10,16 +10,16 @@ from django.core.urlresolvers import reverse ...@@ -10,16 +10,16 @@ from django.core.urlresolvers import reverse
from django.utils.timezone import UTC from django.utils.timezone import UTC
from xmodule.modulestore import Location from xmodule.modulestore import Location
from cms.djangoapps.models.settings.course_details import (CourseDetails, from models.settings.course_details import (CourseDetails,
CourseSettingsEncoder) CourseSettingsEncoder)
from cms.djangoapps.models.settings.course_grading import CourseGradingModel from models.settings.course_grading import CourseGradingModel
from cms.djangoapps.contentstore.utils import get_modulestore from contentstore.utils import get_modulestore
from django.test import TestCase from django.test import TestCase
from utils import ModuleStoreTestCase from utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.factories import CourseFactory
from cms.djangoapps.models.settings.course_metadata import CourseMetadata from models.settings.course_metadata import CourseMetadata
from xmodule.modulestore.xml_importer import import_from_xml from xmodule.modulestore.xml_importer import import_from_xml
from xmodule.modulestore.django import modulestore from xmodule.modulestore.django import modulestore
......
from cms.djangoapps.contentstore.tests.test_course_settings import CourseTestCase from contentstore.tests.test_course_settings import CourseTestCase
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
import json import json
......
from cms.djangoapps.contentstore import utils from contentstore import utils
import mock import mock
from django.test import TestCase from django.test import TestCase
......
...@@ -8,7 +8,7 @@ import json ...@@ -8,7 +8,7 @@ import json
from fs.osfs import OSFS from fs.osfs import OSFS
import copy import copy
from cms.djangoapps.contentstore.utils import get_modulestore from contentstore.utils import get_modulestore
from xmodule.modulestore import Location from xmodule.modulestore import Location
from xmodule.modulestore.store_utilities import clone_course from xmodule.modulestore.store_utilities import clone_course
......
...@@ -58,12 +58,12 @@ from contentstore.course_info_model import get_course_updates,\ ...@@ -58,12 +58,12 @@ from contentstore.course_info_model import get_course_updates,\
from cache_toolbox.core import del_cached_content from cache_toolbox.core import del_cached_content
from xmodule.timeparse import stringify_time from xmodule.timeparse import stringify_time
from contentstore.module_info_model import get_module_info, set_module_info from contentstore.module_info_model import get_module_info, set_module_info
from cms.djangoapps.models.settings.course_details import CourseDetails,\ from models.settings.course_details import CourseDetails,\
CourseSettingsEncoder CourseSettingsEncoder
from cms.djangoapps.models.settings.course_grading import CourseGradingModel from models.settings.course_grading import CourseGradingModel
from cms.djangoapps.contentstore.utils import get_modulestore from contentstore.utils import get_modulestore
from django.shortcuts import redirect from django.shortcuts import redirect
from cms.djangoapps.models.settings.course_metadata import CourseMetadata from models.settings.course_metadata import CourseMetadata
# to install PIL on MacOSX: 'easy_install http://dist.repoze.org/PIL-1.1.6.tar.gz' # to install PIL on MacOSX: 'easy_install http://dist.repoze.org/PIL-1.1.6.tar.gz'
......
...@@ -7,8 +7,8 @@ from json.encoder import JSONEncoder ...@@ -7,8 +7,8 @@ from json.encoder import JSONEncoder
import time import time
from contentstore.utils import get_modulestore from contentstore.utils import get_modulestore
from util.converters import jsdate_to_time, time_to_date from util.converters import jsdate_to_time, time_to_date
from cms.djangoapps.models.settings import course_grading from models.settings import course_grading
from cms.djangoapps.contentstore.utils import update_item from contentstore.utils import update_item
import re import re
import logging import logging
......
...@@ -231,16 +231,14 @@ class LoncapaResponse(object): ...@@ -231,16 +231,14 @@ class LoncapaResponse(object):
# hint specified by function? # hint specified by function?
hintfn = hintgroup.get('hintfn') hintfn = hintgroup.get('hintfn')
if hintfn: if hintfn:
''' # Hint is determined by a function defined in the <script> context; evaluate
Hint is determined by a function defined in the <script> context; evaluate # that function to obtain list of hint, hintmode for each answer_id.
that function to obtain list of hint, hintmode for each answer_id.
The function should take arguments (answer_ids, student_answers, new_cmap, old_cmap) # The function should take arguments (answer_ids, student_answers, new_cmap, old_cmap)
and it should modify new_cmap as appropriate. # and it should modify new_cmap as appropriate.
We may extend this in the future to add another argument which provides a # We may extend this in the future to add another argument which provides a
callback procedure to a social hint generation system. # callback procedure to a social hint generation system.
'''
if not hintfn in self.context: if not hintfn in self.context:
msg = 'missing specified hint function %s in script context' % hintfn msg = 'missing specified hint function %s in script context' % hintfn
msg += "\nSee XML source line %s" % getattr(self.xml, 'sourceline', '<unavailable>') msg += "\nSee XML source line %s" % getattr(self.xml, 'sourceline', '<unavailable>')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment