Merge pull request #10825 from edx/kill-psycho

Remove psychometrics app
This commit is contained in:
Sarina Canelake
2015-12-04 17:23:20 -05:00
17 changed files with 2 additions and 615 deletions

View File

@@ -56,7 +56,6 @@ from openedx.core.lib.xblock_utils import (
wrap_xblock,
request_token as xblock_request_token,
)
from psychometrics.psychoanalyze import make_psychometrics_data_update_handler
from student.models import anonymous_id_for_user, user_by_anonymous_id
from student.roles import CourseBetaTesterRole
from xblock.core import XBlock
@@ -760,11 +759,6 @@ def get_module_system_for_user(user, student_data, # TODO # pylint: disable=to
position = None
system.set('position', position)
if settings.FEATURES.get('ENABLE_PSYCHOMETRICS') and user.is_authenticated():
system.set(
'psychometrics_handler', # set callback for updating PsychometricsData
make_psychometrics_data_update_handler(course_id, user, descriptor.location)
)
system.set(u'user_is_staff', user_is_staff)
system.set(u'user_is_admin', bool(has_access(user, u'staff', 'global')))

View File

@@ -1767,17 +1767,6 @@ class TestRebindModule(TestSubmittingProblems):
self.assertEqual(module.scope_ids.user_id, user2.id)
self.assertEqual(module.descriptor.scope_ids.user_id, user2.id)
@patch('courseware.module_render.make_psychometrics_data_update_handler')
@patch.dict(settings.FEATURES, {'ENABLE_PSYCHOMETRICS': True})
def test_psychometrics_anonymous(self, psycho_handler):
"""
Make sure that noauth modules with anonymous users don't have
the psychometrics callback bound.
"""
module = self.get_module_for_user(self.anon_user)
module.system.rebind_noauth_module_to_user(module, self.anon_user)
self.assertFalse(psycho_handler.called)
@attr('shard_1')
@ddt.ddt