From 630607d34554aef03f4e74adbdf26f0dd3b01496 Mon Sep 17 00:00:00 2001 From: ichuang Date: Tue, 5 Feb 2013 00:21:04 +0000 Subject: [PATCH 01/31] fix forum management commands (assign_default_role moved); add reload_forum_users --- .../commands/assign_roles_for_course.py | 3 +- .../commands/create_roles_for_existing.py | 3 +- .../management/commands/reload_forum_users.py | 29 +++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 lms/djangoapps/django_comment_client/management/commands/reload_forum_users.py diff --git a/lms/djangoapps/django_comment_client/management/commands/assign_roles_for_course.py b/lms/djangoapps/django_comment_client/management/commands/assign_roles_for_course.py index 82f2290bc7..64378108b6 100644 --- a/lms/djangoapps/django_comment_client/management/commands/assign_roles_for_course.py +++ b/lms/djangoapps/django_comment_client/management/commands/assign_roles_for_course.py @@ -6,7 +6,8 @@ Enrollments. """ from django.core.management.base import BaseCommand, CommandError -from student.models import CourseEnrollment, assign_default_role +from student.models import CourseEnrollment +from django_comment_client.models import assign_default_role class Command(BaseCommand): args = 'course_id' diff --git a/lms/djangoapps/django_comment_client/management/commands/create_roles_for_existing.py b/lms/djangoapps/django_comment_client/management/commands/create_roles_for_existing.py index d1244a6690..3ec2d0646e 100644 --- a/lms/djangoapps/django_comment_client/management/commands/create_roles_for_existing.py +++ b/lms/djangoapps/django_comment_client/management/commands/create_roles_for_existing.py @@ -6,7 +6,8 @@ Enrollments. """ from django.core.management.base import BaseCommand, CommandError -from student.models import CourseEnrollment, assign_default_role +from student.models import CourseEnrollment +from django_comment_client.models import assign_default_role class Command(BaseCommand): args = 'course_id' diff --git a/lms/djangoapps/django_comment_client/management/commands/reload_forum_users.py b/lms/djangoapps/django_comment_client/management/commands/reload_forum_users.py new file mode 100644 index 0000000000..5e7e268270 --- /dev/null +++ b/lms/djangoapps/django_comment_client/management/commands/reload_forum_users.py @@ -0,0 +1,29 @@ +""" +Reload forum (comment client) users from existing users. +""" +from django.core.management.base import BaseCommand, CommandError + +from django.contrib.auth.models import User +import comment_client as cc + +class Command(BaseCommand): + help = 'Reload forum (comment client) users from existing users' + + def adduser(self,user): + print user + try: + cc_user = cc.User.from_django_user(user) + cc_user.save() + except Exception as err: + print "update user info to discussion failed for user with id: %s" % user + + def handle(self, *args, **options): + if len(args) != 0: + uset = [User.objects.get(username=x) for x in args] + else: + uset = User.objects.all() + + for user in uset: + self.adduser(user) + + \ No newline at end of file From b3f00a672504e70e66a38d9d35f85df48ff70afd Mon Sep 17 00:00:00 2001 From: ichuang Date: Sun, 31 Mar 2013 12:22:00 +0000 Subject: [PATCH 02/31] add default message to conditional --- common/lib/xmodule/xmodule/conditional_module.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/conditional_module.py b/common/lib/xmodule/xmodule/conditional_module.py index b3e0e0e06b..2433a143ed 100644 --- a/common/lib/xmodule/xmodule/conditional_module.py +++ b/common/lib/xmodule/xmodule/conditional_module.py @@ -125,7 +125,8 @@ class ConditionalModule(ConditionalFields, XModule): an AJAX call. """ if not self.is_condition_satisfied(): - message = self.descriptor.xml_attributes.get('message') + defmsg = "{link} must be attempted before this will become visible." + message = self.descriptor.xml_attributes.get('message', defmsg) context = {'module': self, 'message': message} html = self.system.render_template('conditional_module.html', From 14899b90667902aca65732acd942b04f22764b04 Mon Sep 17 00:00:00 2001 From: ichuang Date: Sat, 30 Mar 2013 03:40:40 +0000 Subject: [PATCH 03/31] fix lms migration to be compatible with xblock --- lms/djangoapps/lms_migration/migrate.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lms/djangoapps/lms_migration/migrate.py b/lms/djangoapps/lms_migration/migrate.py index 569129f469..a677383035 100644 --- a/lms/djangoapps/lms_migration/migrate.py +++ b/lms/djangoapps/lms_migration/migrate.py @@ -39,12 +39,14 @@ def getip(request): def get_commit_id(course): - return course.metadata.get('GIT_COMMIT_ID', 'No commit id') + #return course.metadata.get('GIT_COMMIT_ID', 'No commit id') + return getattr(course, 'GIT_COMMIT_ID', 'No commit id') # getattr(def_ms.courses[reload_dir], 'GIT_COMMIT_ID','No commit id') def set_commit_id(course, commit_id): - course.metadata['GIT_COMMIT_ID'] = commit_id + #course.metadata['GIT_COMMIT_ID'] = commit_id + setattr(course, 'GIT_COMMIT_ID', commit_id) # setattr(def_ms.courses[reload_dir], 'GIT_COMMIT_ID', new_commit_id) @@ -124,7 +126,8 @@ def manage_modulestores(request, reload_dir=None, commit_id=None): #---------------------------------------- - dumpfields = ['definition', 'location', 'metadata'] + #dumpfields = ['definition', 'location', 'metadata'] + dumpfields = ['location', 'metadata'] for cdir, course in def_ms.courses.items(): html += '
' @@ -133,7 +136,7 @@ def manage_modulestores(request, reload_dir=None, commit_id=None): html += '

commit_id=%s

' % get_commit_id(course) for field in dumpfields: - data = getattr(course, field) + data = getattr(course, field, None) html += '

%s

' % field if type(data) == dict: html += '
    ' From f1cc6e85976c634dc0a79ee5f9b3a5fbd753bf85 Mon Sep 17 00:00:00 2001 From: ichuang Date: Sat, 30 Mar 2013 02:01:32 +0000 Subject: [PATCH 04/31] fix psychoanalyze - make compatible with xblock --- common/lib/xmodule/xmodule/capa_module.py | 2 +- lms/djangoapps/psychometrics/psychoanalyze.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index b437478ecc..83710fd121 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -755,7 +755,7 @@ class CapaModule(CapaFields, XModule): self.system.track_function('save_problem_check', event_info) if hasattr(self.system, 'psychometrics_handler'): # update PsychometricsData using callback - self.system.psychometrics_handler(self.get_instance_state()) + self.system.psychometrics_handler(self.get_state_for_lcp()) # render problem into HTML html = self.get_problem_html(encapsulate=False) diff --git a/lms/djangoapps/psychometrics/psychoanalyze.py b/lms/djangoapps/psychometrics/psychoanalyze.py index 3e9edcc997..008a4034a5 100644 --- a/lms/djangoapps/psychometrics/psychoanalyze.py +++ b/lms/djangoapps/psychometrics/psychoanalyze.py @@ -302,12 +302,12 @@ def make_psychometrics_data_update_handler(course_id, user, module_state_key): Construct and return a procedure which may be called to update the PsychometricsData instance for the given StudentModule instance. """ - sm = studentmodule.objects.get_or_create( - course_id=course_id, - student=user, - module_state_key=module_state_key, - defaults={'state': '{}', 'module_type': 'problem'}, - ) + sm, status = StudentModule.objects.get_or_create( + course_id=course_id, + student=user, + module_state_key=module_state_key, + defaults={'state': '{}', 'module_type': 'problem'}, + ) try: pmd = PsychometricData.objects.using(db).get(studentmodule=sm) From 26f14aaf6d6be3c7d8fee91c63ef54a838ab5686 Mon Sep 17 00:00:00 2001 From: ichuang Date: Sun, 31 Mar 2013 12:21:22 +0000 Subject: [PATCH 05/31] fix psychoanalyze (compatibility with new xblock) --- lms/djangoapps/psychometrics/psychoanalyze.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/psychometrics/psychoanalyze.py b/lms/djangoapps/psychometrics/psychoanalyze.py index 008a4034a5..b6072ac997 100644 --- a/lms/djangoapps/psychometrics/psychoanalyze.py +++ b/lms/djangoapps/psychometrics/psychoanalyze.py @@ -329,7 +329,11 @@ def make_psychometrics_data_update_handler(course_id, user, module_state_key): return pmd.done = done - pmd.attempts = state['attempts'] + try: + pmd.attempts = state.get('attempts',0) + except: + log.exception("no attempts for %s (state=%s)" % (sm,sm.state)) + try: checktimes = eval(pmd.checktimes) # update log of attempt timestamps except: From febcb5113308fc5b9056558150ff70acb8a30cd0 Mon Sep 17 00:00:00 2001 From: ichuang Date: Sun, 31 Mar 2013 12:52:29 +0000 Subject: [PATCH 06/31] make psychometrics curve fitting more robust --- lms/djangoapps/psychometrics/psychoanalyze.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lms/djangoapps/psychometrics/psychoanalyze.py b/lms/djangoapps/psychometrics/psychoanalyze.py index b6072ac997..093051a3bd 100644 --- a/lms/djangoapps/psychometrics/psychoanalyze.py +++ b/lms/djangoapps/psychometrics/psychoanalyze.py @@ -246,13 +246,16 @@ def generate_plots_for_problem(problem): yset['ydat'] = ydat if len(ydat) > 3: # try to fit to logistic function if enough data points - cfp = curve_fit(func_2pl, xdat, ydat, [1.0, max_attempts / 2.0]) - yset['fitparam'] = cfp - yset['fitpts'] = func_2pl(np.array(xdat), *cfp[0]) - yset['fiterr'] = [yd - yf for (yd, yf) in zip(ydat, yset['fitpts'])] - fitx = np.linspace(xdat[0], xdat[-1], 100) - yset['fitx'] = fitx - yset['fity'] = func_2pl(np.array(fitx), *cfp[0]) + try: + cfp = curve_fit(func_2pl, xdat, ydat, [1.0, max_attempts / 2.0]) + yset['fitparam'] = cfp + yset['fitpts'] = func_2pl(np.array(xdat), *cfp[0]) + yset['fiterr'] = [yd - yf for (yd, yf) in zip(ydat, yset['fitpts'])] + fitx = np.linspace(xdat[0], xdat[-1], 100) + yset['fitx'] = fitx + yset['fity'] = func_2pl(np.array(fitx), *cfp[0]) + except Exception as err: + log.debug('Error in psychoanalyze curve fitting: %s' % err) dataset['grade_%d' % grade] = yset From a0fab132a1e8f7dcf7803c0460eaa717761f5a35 Mon Sep 17 00:00:00 2001 From: ichuang Date: Sun, 31 Mar 2013 15:50:00 +0000 Subject: [PATCH 07/31] sort course index in studio my courses page --- cms/templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/templates/index.html b/cms/templates/index.html index 9482b9d9af..9ce764ed8d 100644 --- a/cms/templates/index.html +++ b/cms/templates/index.html @@ -67,7 +67,7 @@
    % if user.is_active: From 15d1bc372d44c5b907ac5675acea351569ad95de Mon Sep 17 00:00:00 2001 From: ichuang Date: Sun, 31 Mar 2013 19:28:09 +0000 Subject: [PATCH 09/31] clean up xqueue callback url generation; allow override from settings --- lms/djangoapps/courseware/module_render.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index 7a40d5c458..c7c749d2a0 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -177,18 +177,13 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours # Intended use is as {ajax_url}/{dispatch_command}, so get rid of the trailing slash. ajax_url = ajax_url.rstrip('/') - # Fully qualified callback URL for external queueing system - xqueue_callback_url = '{proto}://{host}'.format( - host=request.get_host(), - proto=request.META.get('HTTP_X_FORWARDED_PROTO', 'https' if request.is_secure() else 'http') - ) - def make_xqueue_callback(dispatch='score_update'): # Fully qualified callback URL for external queueing system xqueue_callback_url = '{proto}://{host}'.format( host=request.get_host(), proto=request.META.get('HTTP_X_FORWARDED_PROTO', 'https' if request.is_secure() else 'http') ) + xqueue_callback_url = settings.XQUEUE_INTERFACE.get('callback_url',xqueue_callback_url) # allow override xqueue_callback_url += reverse('xqueue_callback', kwargs=dict(course_id=course_id, From 025c5df16e5c9c210a9eb74331f69f9a34d5e433 Mon Sep 17 00:00:00 2001 From: ichuang Date: Mon, 1 Apr 2013 21:49:11 +0000 Subject: [PATCH 10/31] fix IntegrityError duplicate entry issue with module_data Scope.student_state update --- lms/djangoapps/courseware/model_data.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/courseware/model_data.py b/lms/djangoapps/courseware/model_data.py index b725f64308..e5c8eec216 100644 --- a/lms/djangoapps/courseware/model_data.py +++ b/lms/djangoapps/courseware/model_data.py @@ -241,9 +241,10 @@ class ModelDataCache(object): field_object, _ = StudentModule.objects.get_or_create( course_id=self.course_id, student=self.user, - module_type=key.block_scope_id.category, module_state_key=key.block_scope_id.url(), - defaults={'state': json.dumps({})}, + defaults={'state': json.dumps({}), + 'module_type': key.block_scope_id.category, + }, ) elif key.scope == Scope.content: field_object, _ = XModuleContentField.objects.get_or_create( From c658c6514925634ad26c676011aaa59835efa56c Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Mon, 25 Mar 2013 15:00:45 -0400 Subject: [PATCH 11/31] Add new Matlab unit tests. --- common/lib/capa/capa/tests/test_inputtypes.py | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/common/lib/capa/capa/tests/test_inputtypes.py b/common/lib/capa/capa/tests/test_inputtypes.py index 250cedd549..911fdd07d2 100644 --- a/common/lib/capa/capa/tests/test_inputtypes.py +++ b/common/lib/capa/capa/tests/test_inputtypes.py @@ -381,6 +381,32 @@ class MatlabTest(unittest.TestCase): self.assertEqual(context, expected) + def test_rendering_while_queued(self): + state = {'value': 'print "good evening"', + 'status': 'incomplete', + 'input_state': {'queuestate': 'queued'}, + } + elt = etree.fromstring(self.xml) + + input_class = lookup_tag('matlabinput') + the_input = self.input_class(test_system, elt, state) + context = the_input._get_render_context() + expected = {'id': 'prob_1_2', + 'value': 'print "good evening"', + 'status': 'queued', + 'msg': self.input_class.plot_submitted_msg, + 'mode': self.mode, + 'rows': self.rows, + 'cols': self.cols, + 'queue_msg': '', + 'linenumbers': 'true', + 'hidden': '', + 'tabsize': int(self.tabsize), + 'queue_len': '1', + } + + self.assertEqual(context, expected) + def test_plot_data(self): get = {'submission': 'x = 1234;'} response = self.the_input.handle_ajax("plot", get) @@ -391,6 +417,43 @@ class MatlabTest(unittest.TestCase): self.assertTrue(self.the_input.input_state['queuekey'] is not None) self.assertEqual(self.the_input.input_state['queuestate'], 'queued') + def test_ungraded_response_success(self): + queuekey = 'abcd' + input_state = {'queuekey': queuekey, 'queuestate': 'queued'} + state = {'value': 'print "good evening"', + 'status': 'incomplete', + 'input_state': input_state, + 'feedback': {'message': '3'}, } + elt = etree.fromstring(self.xml) + + the_input = self.input_class(test_system, elt, state) + inner_msg = 'hello!' + queue_msg = json.dumps({'msg': inner_msg}) + + the_input.ungraded_response(queue_msg, queuekey) + self.assertTrue(input_state['queuekey'] is None) + self.assertTrue(input_state['queuestate'] is None) + self.assertEqual(input_state['queue_msg'], inner_msg) + + def test_ungraded_response_key_mismatch(self): + queuekey = 'abcd' + input_state = {'queuekey': queuekey, 'queuestate': 'queued'} + state = {'value': 'print "good evening"', + 'status': 'incomplete', + 'input_state': input_state, + 'feedback': {'message': '3'}, } + elt = etree.fromstring(self.xml) + + the_input = self.input_class(test_system, elt, state) + inner_msg = 'hello!' + queue_msg = json.dumps({'msg': inner_msg}) + + the_input.ungraded_response(queue_msg, 'abc') + self.assertEqual(input_state['queuekey'], queuekey) + self.assertEqual(input_state['queuestate'], 'queued') + self.assertFalse('queue_msg' in input_state) + + From 8cd4220b5fb79e211d61ac16555694d68abeb3c1 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Wed, 3 Apr 2013 09:15:38 -0400 Subject: [PATCH 12/31] Fix the conditions by which we show the queueing message for Matlab inputs --- common/lib/capa/capa/inputtypes.py | 6 +++--- common/lib/capa/capa/tests/test_inputtypes.py | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index b4e9fe1654..901ab25e60 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -655,11 +655,11 @@ class MatlabInput(CodeInput): # Check if problem has been queued self.queuename = 'matlab' self.queue_msg = '' - if 'queue_msg' in self.input_state and self.status in ['queued','incomplete', 'unsubmitted']: + if 'queue_msg' in self.input_state and self.status in ['queued', 'incomplete', 'unsubmitted']: self.queue_msg = self.input_state['queue_msg'] - if 'queued' in self.input_state and self.input_state['queuestate'] is not None: + if 'queuestate' in self.input_state and self.input_state['queuestate'] == 'queued': self.status = 'queued' - self.queue_len = 1 + self.queue_len = '1' self.msg = self.plot_submitted_msg diff --git a/common/lib/capa/capa/tests/test_inputtypes.py b/common/lib/capa/capa/tests/test_inputtypes.py index 911fdd07d2..e7f0b784bc 100644 --- a/common/lib/capa/capa/tests/test_inputtypes.py +++ b/common/lib/capa/capa/tests/test_inputtypes.py @@ -361,7 +361,6 @@ class MatlabTest(unittest.TestCase): 'feedback': {'message': '3'}, } elt = etree.fromstring(self.xml) - input_class = lookup_tag('matlabinput') the_input = self.input_class(test_system, elt, state) context = the_input._get_render_context() @@ -388,7 +387,6 @@ class MatlabTest(unittest.TestCase): } elt = etree.fromstring(self.xml) - input_class = lookup_tag('matlabinput') the_input = self.input_class(test_system, elt, state) context = the_input._get_render_context() expected = {'id': 'prob_1_2', From 9f9748b9fa72c77b66fc4a282e61049ace7342fd Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Wed, 3 Apr 2013 14:26:06 -0400 Subject: [PATCH 13/31] Stanford press release --- lms/templates/feed.rss | 11 ++- .../press_releases/stanford_announcement.html | 92 +++++++++++++++++++ lms/urls.py | 3 + 3 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 lms/templates/static_templates/press_releases/stanford_announcement.html diff --git a/lms/templates/feed.rss b/lms/templates/feed.rss index a6fda0d20a..b68a9ceb27 100644 --- a/lms/templates/feed.rss +++ b/lms/templates/feed.rss @@ -6,7 +6,16 @@ EdX Blog - 2013-03-15T14:00:12-07:00 + 2013-04-03T14:00:12-07:00 + + tag:www.edx.org,2012:Post/17 + 2012-12-19T14:00:00-07:00 + 2012-12-19T14:00:00-07:00 + + Stanford University to Collaborate with edX on Development of Non-Profit Open Source edX Platform + <img src="${static.url('images/press/releases/edx-logo_240x180.png')}" /> + <p></p> + tag:www.edx.org,2013:Post/16 2013-03-15T10:00:00-07:00 diff --git a/lms/templates/static_templates/press_releases/stanford_announcement.html b/lms/templates/static_templates/press_releases/stanford_announcement.html new file mode 100644 index 0000000000..be788f319c --- /dev/null +++ b/lms/templates/static_templates/press_releases/stanford_announcement.html @@ -0,0 +1,92 @@ +<%! from django.core.urlresolvers import reverse %> +<%inherit file="../../main.html" /> + +<%namespace name='static' file='../../static_content.html'/> + +<%block name="title">Stanford University to Collaborate with edX on Development of Non-Profit Open Source edX Platform +
    + + +
    +
    +

    Stanford University to Collaborate with edX on Development of Non-Profit Open Source edX Platform

    +
    +
    +

    edX Learning Platform to be open source and available on June 1

    + +

    CAMBRIDGE, MA and STANFORD, CA – April 3, 2013 – + +Stanford University and edX, the not-for-profit online learning enterprise founded by Harvard University and the Massachusetts Institute of Technology (MIT), today announced their collaboration to advance the development of edX’s open source learning platform and provide free and open online learning tools for institutions around the world.

    + +

    As part of this announcement, edX will release the source code for its entire online learning platform on June 1, 2013. In support of that move, Stanford will integrate features of its existing Class2Go platform into the edX platform, use the integration as an internal platform for online coursework for on-campus and distance learners, and work collaboratively with edX and other institutions to further develop the edX platform.

    + +

    “This collaboration brings together two leaders in online education in a common effort to ensure that the world’s universities have the strongest possible not-for-profit, open source platform available to them,” said John Mitchell, vice provost for online learning at Stanford University. “A not-for-profit, open source platform will help universities experiment with different ways to produce and share content, fostering continued innovation through a vibrant community of contributors.”

    + +

    EdX and Stanford will collaborate along with others around the globe on the ongoing development and refinement of the edX online learning platform. As of June 1, developers everywhere will be able to freely access the source code of the edX learning platform, including code for its Learning Management System (LMS); Studio, a course authoring tool; xBlock, an application programming interface (API) for integrating third-party learning objects; and machine grading API’s. EdX will support and nurture the community of developers contributing to the enhancement of the edX platform by providing a rich environment for developer collaboration as well as technical and process guidelines to facilitate developer contributions.

    + +

    “It has been our vision to offer our platform as open source since edX’s founding by Harvard and MIT,” stated Anant Agarwal, president of edX. “We are now realizing that vision, and I am pleased to welcome Stanford University, one of the world’s leading institutions of higher education, to further this global open source solution. I want to acknowledge the key role played by our X Consortium member UC Berkeley, which was instrumental in fostering this collaboration. We believe the edX platform—the Linux of learning—will benefit from all the world’s institutions and communities.”

    + +

    EdX is pursuing an open source vision to enhance access to higher education for the entire world. One of the chief benefits of massive open online courses (MOOCs) is that they bring together a tremendously diverse student body to learn with and from each other. EdX has chosen to extend that perspective to its learning platform as well, knowing that drawing upon the global community of developers is an effective route to both transform and deliver the world’s best and most accessible online and blended learning experience.

    + +

    MOOCs and innovative online teaching approaches on college campuses, such as the “flipped classroom,” use web environments that support interactive video, online discussion, social/cohort interaction, assessment and other functions. Open source online learning platforms will allow universities to develop their own delivery methods, partner with other universities and institutions as they choose, collect data, and control branding of their educational material. Further developing online opportunities through open source technology is a key objective of the partnership between edX and Stanford.

    + +

    Stanford will continue to provide a range of platforms for its instructors to choose from in hosting their online coursework, including continued partnerships with Coursera and other providers. The university will focus its ongoing platform development efforts on the new platform, combining key features from the Class2Go open source platform with the open source edX code base.

    + +

    The edX learning platform source code, as well as platform developments from Stanford, edX and other contributors, will be available on June 1, 2013 and can be accessed from the edX Platform Repository located at https://github.com/edX.

    + + +

    About edX

    + +

    EdX is a not-for-profit enterprise of its founding partners Harvard University and the Massachusetts Institute of Technology focused on transforming online and on-campus learning through groundbreaking methodologies, game-like experiences and cutting-edge research. EdX provides inspirational and transformative knowledge to students of all ages, social status, and income who form worldwide communities of learners. EdX uses its open source technology to transcend physical and social borders. We’re focused on people, not profit. EdX is based in Cambridge, Massachusetts in the USA.

    + +

    About Stanford University

    + +

    +Stanford University is engaged in a variety of efforts to develop online learning – experimenting with coursework for both on-campus and off-campus students, researching key questions around what a digital environment means for teaching and learning, and pursuing platform development. More information on Stanford’s online learning activities is available at http://online.stanford.edu + + +

    +

    Media Contact:

    +

    Dan O'Connell

    +

    oconnell@edx.org

    +

    (617) 480-6585

    +
    + +
    +

    Brad Hayward

    +

    bhayward@stanford.edu

    +

    650-724-0199

    +
    + +
    +

    Lisa Lapin

    +

    lapin@stanford.edu

    +

    650-725-8396

    +
    + + + +
    +
    +
    diff --git a/lms/urls.py b/lms/urls.py index de5c8184fa..4a0608720a 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -153,6 +153,9 @@ urlpatterns = ('', url(r'^press/xblock_announcement$', 'static_template_view.views.render', {'template': 'press_releases/xblock_announcement.html'}, name="press/xblock-announcement"), + url(r'^press/stanford-to-work-with-edx$', 'static_template_view.views.render', + {'template': 'press_releases/stanford_announcement.html'}, + name="press/stanford-to-work-with-edx"), # Should this always update to point to the latest press release? (r'^pressrelease$', 'django.views.generic.simple.redirect_to', From 2230fe3c23fdcc225db23b04e752d0d7f2c3a8d8 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Wed, 3 Apr 2013 15:08:33 -0400 Subject: [PATCH 14/31] Set the queue_len more consistently. --- common/lib/capa/capa/inputtypes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index 901ab25e60..18bc92f0a3 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -659,7 +659,7 @@ class MatlabInput(CodeInput): self.queue_msg = self.input_state['queue_msg'] if 'queuestate' in self.input_state and self.input_state['queuestate'] == 'queued': self.status = 'queued' - self.queue_len = '1' + self.queue_len = 1 self.msg = self.plot_submitted_msg @@ -702,7 +702,7 @@ class MatlabInput(CodeInput): def _extra_context(self): ''' Set up additional context variables''' extra_context = { - 'queue_len': self.queue_len, + 'queue_len': str(self.queue_len), 'queue_msg': self.queue_msg } return extra_context From 7b226c34f8ba533cf745462dbe4f9c56e951a177 Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Wed, 3 Apr 2013 15:34:54 -0400 Subject: [PATCH 15/31] Adding new logo for stanford --- .../press/releases/stanford-logo_325x260.gif | Bin 0 -> 5460 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 lms/static/images/press/releases/stanford-logo_325x260.gif diff --git a/lms/static/images/press/releases/stanford-logo_325x260.gif b/lms/static/images/press/releases/stanford-logo_325x260.gif new file mode 100644 index 0000000000000000000000000000000000000000..d7532bd81def2dace3df8b8e5597d02acd685a41 GIT binary patch literal 5460 zcmWkvc_7pMAOC*8JHGqwu+Ky{<|;auJR+&BkWh^-IwvVz&$D`XD(B=5H9~H4}Duy#ITh+jm%-nz>lPc=#s-#XwNrvSlBoQqjD5(+Wk~ zjT;RYE<8SYvNI{^A&>X9uP<9uvpqJp(bKce&Fwk_4V09;ud6FuwQ9Jwwly-ca@Veh zM~x3v{QP}b6=U%I=+r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RB++y)FVk;G4;}b{_MM6$u<+>JOE$rtO02jeer3PRTTryu)=PxEF z3E~cLu+cv~r+{WFh;%W;5m%Ac;VDeml#lZOWEem+Z$OmLRz(1s7|Ia6*dQhH6)=4q zJQd>?D56!?!EOrpxZq_Vm#EK0+{Dlx7Qz0{>o6d&h#3mzAP?`tMh@5l5`d1fQC9^q zFaFGC5rHlvWHKoSfyx_66OjYM3c?#7T#-3cRs%YHq#k^njCa0y9Hep)RVASJ)V^?) zKG|1F31T9aTmqE^e`^6Z#iSS>Cg5Q)QtWII$PrQ>o&#k)H}guD?WDFq-_ zidC{Y$ue?z5wP-Y-}i}BCBhtvfuxpVliD65CJCHfQ~KYe&At(7^kiD}WFP6t@$Jb= z?J0QBQ`Fy6GTS58=)G&vd;dspxo>Y}YH#&}-rD}&hqJvBjlRbgeNT?`HTd>5ruH>G z=xgckdpX-D)#z`t=x;yL-|5@mo!Z~?puexbe_-8gzf5Cb$YNml$iREwfzi}~@dpDR i`v*SH4k$DRzgY}U92uPS9h^!XoOv+#+XBEaWd1)EMU6oK literal 0 HcmV?d00001 From 0c81329fa515a64a12db9deea54fb56886937acb Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Wed, 3 Apr 2013 15:35:50 -0400 Subject: [PATCH 16/31] updating image link --- lms/templates/feed.rss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/templates/feed.rss b/lms/templates/feed.rss index b68a9ceb27..8347155cc0 100644 --- a/lms/templates/feed.rss +++ b/lms/templates/feed.rss @@ -13,7 +13,7 @@ 2012-12-19T14:00:00-07:00 Stanford University to Collaborate with edX on Development of Non-Profit Open Source edX Platform - <img src="${static.url('images/press/releases/edx-logo_240x180.png')}" /> + <img src="${static.url('images/press/releases/stanford-university_240x135.png')}" /> <p></p>
    From 71cfc4441bfee3e395b73ae9547bc9cb2b0ef761 Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Wed, 3 Apr 2013 15:37:12 -0400 Subject: [PATCH 17/31] university->logo --- lms/templates/feed.rss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/templates/feed.rss b/lms/templates/feed.rss index 8347155cc0..b329092f72 100644 --- a/lms/templates/feed.rss +++ b/lms/templates/feed.rss @@ -13,7 +13,7 @@ 2012-12-19T14:00:00-07:00 Stanford University to Collaborate with edX on Development of Non-Profit Open Source edX Platform - <img src="${static.url('images/press/releases/stanford-university_240x135.png')}" /> + <img src="${static.url('images/press/releases/stanford-logo_240x135.png')}" /> <p></p> From 1c581835f230a59411fe934e4dc4699adef20dbd Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Wed, 3 Apr 2013 15:39:11 -0400 Subject: [PATCH 18/31] changing stanford logo --- lms/templates/feed.rss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/templates/feed.rss b/lms/templates/feed.rss index b329092f72..8347155cc0 100644 --- a/lms/templates/feed.rss +++ b/lms/templates/feed.rss @@ -13,7 +13,7 @@ 2012-12-19T14:00:00-07:00 Stanford University to Collaborate with edX on Development of Non-Profit Open Source edX Platform - <img src="${static.url('images/press/releases/stanford-logo_240x135.png')}" /> + <img src="${static.url('images/press/releases/stanford-university_240x135.png')}" /> <p></p> From 6d78425a829027711205d06d7039a2f6950a0a3a Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Wed, 3 Apr 2013 15:39:22 -0400 Subject: [PATCH 19/31] dding stanford-univ logo --- .../releases/stanford-university_240x135.png | Bin 0 -> 8729 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 lms/static/images/press/releases/stanford-university_240x135.png diff --git a/lms/static/images/press/releases/stanford-university_240x135.png b/lms/static/images/press/releases/stanford-university_240x135.png new file mode 100644 index 0000000000000000000000000000000000000000..ba9d2a6e9538304cb9fe47a34910a8bdf9288423 GIT binary patch literal 8729 zcmbtacQ72#w_dCsLCvh80cw`kuZ<|001&AO*O-NeRx0PhzRai zkk`!ay#hL_=&Aq!4QZs;Hu(28j<=x(1b`T0`g3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tCt4cctc=PrJAeH?4^{}T!QL_6^2yP$s z=RWo}J`S>WUJmyPASNOzE+_&P6cINTm5>z|m6edZH)Tac2y0(V{tv(#cYEhof&U9Y z?7sn#$bqnX0R4Y57`eal@wf4E0I1lz+d8mmy|Hn0Fm$l75A+;z_)m)lKucXu4FP!> F`Ct3nxAg!3 literal 0 HcmV?d00001 From e8ee6616c44d4cf3e084cb339a10d46f6c415563 Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Wed, 3 Apr 2013 15:39:46 -0400 Subject: [PATCH 20/31] removing old logo --- .../press/releases/stanford-logo_325x260.gif | Bin 5460 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 lms/static/images/press/releases/stanford-logo_325x260.gif diff --git a/lms/static/images/press/releases/stanford-logo_325x260.gif b/lms/static/images/press/releases/stanford-logo_325x260.gif deleted file mode 100644 index d7532bd81def2dace3df8b8e5597d02acd685a41..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5460 zcmWkvc_7pMAOC*8JHGqwu+Ky{<|;auJR+&BkWh^-IwvVz&$D`XD(B=5H9~H4}Duy#ITh+jm%-nz>lPc=#s-#XwNrvSlBoQqjD5(+Wk~ zjT;RYE<8SYvNI{^A&>X9uP<9uvpqJp(bKce&Fwk_4V09;ud6FuwQ9Jwwly-ca@Veh zM~x3v{QP}b6=U%I=+rlut( zCa+^+dT-ypZ)G+5^l65gS{0XDwtf4{kdVg9mlfUJeYv@>!ou#_*c7o?V~vfH1tq$0w0UNqGE|GiRjX;V*)MS_Fcjii(z?phN`e z&CM;hvupJ7Dq6Sh?v^b%%a&!%pI>Zje4EKkAQ19btjJrjB3oBCO+_V{MiVVsluRTh z!f=VPamDW4Ia*p-OO~XmtKUM=cm%m)YC2R|+2ZeC>*VyMvvY2CHWq^7ASeNXroVi- z1wru;^z*}q*_oN{^z`EO>qqMA=YIblZD?o{3YBwnpF27_6B0hPwav}VO^%ICefsq7 z(W4(DBfqDnCPznqe*F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$ue?z5wP-Y-}i}BCBhtvfuxpVliD65CJCHfQ~KYe&At(7^kiD}WFP6t@$Jb= z?J0QBQ`Fy6GTS58=)G&vd;dspxo>Y}YH#&}-rD}&hqJvBjlRbgeNT?`HTd>5ruH>G z=xgckdpX-D)#z`t=x;yL-|5@mo!Z~?puexbe_-8gzf5Cb$YNml$iREwfzi}~@dpDR i`v*SH4k$DRzgY}U92uPS9h^!XoOv+#+XBEaWd1)EMU6oK From b2e8780f9b58d3e14a724f09a9d299227ae4af22 Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Wed, 3 Apr 2013 16:01:15 -0400 Subject: [PATCH 21/31] adding a smaller stanford image --- .../releases/stanford-university_102_57.png | Bin 0 -> 2982 bytes lms/templates/feed.rss | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 lms/static/images/press/releases/stanford-university_102_57.png diff --git a/lms/static/images/press/releases/stanford-university_102_57.png b/lms/static/images/press/releases/stanford-university_102_57.png new file mode 100644 index 0000000000000000000000000000000000000000..67910ff5d8da357887b2d60c3935c2ad32d25238 GIT binary patch literal 2982 zcmeHJ`8O178-6e|vP+go$gap(CrkEyYnVydhcWi07+Fe9nxrxjvTs>GLUuy--Pp4x zWhsiGD9QRxKYl-af5G>j^W4vMuIJp#IoG+*bKj4V7KSX0e2f497GonlD=NBCP2~g~ z_1>N-3!nnTUE5q6fQlHV17|3e(*#->>VUE#{;yObgf+4<2Ovxw00I$!J?ax-6@VZ( z0N*eGs3rrzb0fXMQXK%=J){|0pXw0J#r5y`SAqX41&)u88`)h1soj5ox3WM102R|W zzHow;O<0hIot1&^J zEsn6ZXZQ0NysWEZDiq^%y}3m-q}18dAt?{N#z`?P-jCC`kjoNO9cWxk z4fPI98RGwbBMdi;YytteDDu~6Lh?0l0RZzg*3(8`@1P{!Mn`+{_Z*rip*CIn6L~&# zDT+Ty9eXH;#q%bO>L-j|l~O`UTG?4m=9AD~`C|qgHIMBR{YnN*@~YzoDwWTz_v0v( zKiDi|&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R&zPg=cn$6O4hZ0aTZyQm%6Z=1nvVs#KMjuhShbeI=z5S>f z*iddpa3BFGUxK2vCHTB9=-i!~mIm1;1*2$@Uo^Uh@a|VA^G-nDaUr&^8wxH+vT@tld$-Bn z*!{$szGO>Zrc;|+ENK`5S@j(zc-3wRHU5?*$Mbk0gH!-_-4MOqu%S-4O){$MRaKe@ zzwH3cyBKbDYsg(wIo*X;85k(ssxw+*NN;mNdvD7bbT+f`s=CxKN>SRQSosFM9$1zd zD$em%M@=F^qR8#)wxk^aI!oy1!Zi9L+Rg407B-7XI?6^1r53?T&rX84c9mPm)ZIv+ zfmU1eLUX;;xMsrNojg9Sx68eX@mG;LQ?dk_s{O1dvQo6JwKU4av?#7wlJpn3_?9~< z?h#q}JDZfFoZ{@WczBWN-TK&xKaXrUe$1le`Lm{9R$yT*_Xt?|CCXZ$Fy?SZL;Y>F zZ_2!gag}Opet*5(VqubFB)qIdWr1c#LE_A#asJH6HzUIDk4(Cg3SOjq*R5qc+9GO* zu~{i_UQEud_SO3g_$^db1Bl-IoC{*0<0r I)4@di0|{WYp#T5? literal 0 HcmV?d00001 diff --git a/lms/templates/feed.rss b/lms/templates/feed.rss index 8347155cc0..1ac88ffe34 100644 --- a/lms/templates/feed.rss +++ b/lms/templates/feed.rss @@ -13,7 +13,7 @@ 2012-12-19T14:00:00-07:00 Stanford University to Collaborate with edX on Development of Non-Profit Open Source edX Platform - <img src="${static.url('images/press/releases/stanford-university_240x135.png')}" /> + <img src="${static.url('images/press/releases/stanford-university_102x57.png')}" /> <p></p> From d2313d851a98bbbb474a05c701f7ddb9309f31a7 Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Wed, 3 Apr 2013 16:02:41 -0400 Subject: [PATCH 22/31] renaming image --- ...ty_102_57.png => stanford-university_102x57.png} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename lms/static/images/press/releases/{stanford-university_102_57.png => stanford-university_102x57.png} (100%) diff --git a/lms/static/images/press/releases/stanford-university_102_57.png b/lms/static/images/press/releases/stanford-university_102x57.png similarity index 100% rename from lms/static/images/press/releases/stanford-university_102_57.png rename to lms/static/images/press/releases/stanford-university_102x57.png From 22017ac24c4b29958cc791dd47437a53314b221e Mon Sep 17 00:00:00 2001 From: Jay Zoldak Date: Thu, 4 Apr 2013 09:56:21 -0400 Subject: [PATCH 23/31] pep8 fixes for psychoanalyze and capa module --- common/lib/xmodule/xmodule/capa_module.py | 22 ++-- .../xmodule/xmodule/tests/test_capa_module.py | 108 ++++++------------ lms/djangoapps/psychometrics/psychoanalyze.py | 7 +- 3 files changed, 49 insertions(+), 88 deletions(-) diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index e1e023c185..2097e4d4ee 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -108,11 +108,10 @@ class CapaModule(CapaFields, XModule): ''' icon_class = 'problem' - js = {'coffee': [resource_string(__name__, 'js/src/capa/display.coffee'), resource_string(__name__, 'js/src/collapsible.coffee'), resource_string(__name__, 'js/src/javascript_loader.coffee'), - ], + ], 'js': [resource_string(__name__, 'js/src/capa/imageinput.js'), resource_string(__name__, 'js/src/capa/schematic.js') ]} @@ -367,11 +366,11 @@ class CapaModule(CapaFields, XModule): self.set_state_from_lcp() # Prepend a scary warning to the student - warning = '
    '\ - '

    Warning: The problem has been reset to its initial state!

    '\ - 'The problem\'s state was corrupted by an invalid submission. ' \ - 'The submission consisted of:'\ - '
      ' + warning = '
      '\ + '

      Warning: The problem has been reset to its initial state!

      '\ + 'The problem\'s state was corrupted by an invalid submission. ' \ + 'The submission consisted of:'\ + '
        ' for student_answer in student_answers.values(): if student_answer != '': warning += '
      • ' + cgi.escape(student_answer) + '
      • ' @@ -388,7 +387,6 @@ class CapaModule(CapaFields, XModule): return html - def get_problem_html(self, encapsulate=True): '''Return html for the problem. Adds check, reset, save buttons as necessary based on the problem config and state.''' @@ -401,7 +399,6 @@ class CapaModule(CapaFields, XModule): except Exception, err: html = self.handle_problem_html_error(err) - # The convention is to pass the name of the check button # if we want to show a check button, and False otherwise # This works because non-empty strings evaluate to True @@ -454,7 +451,7 @@ class CapaModule(CapaFields, XModule): 'score_update': self.update_score, 'input_ajax': self.handle_input_ajax, 'ungraded_response': self.handle_ungraded_response - } + } if dispatch not in handlers: return 'Error' @@ -472,7 +469,7 @@ class CapaModule(CapaFields, XModule): d.update({ 'progress_changed': after != before, 'progress_status': Progress.to_js_status_str(after), - }) + }) return json.dumps(d, cls=ComplexEncoder) def is_past_due(self): @@ -535,7 +532,6 @@ class CapaModule(CapaFields, XModule): return False - def update_score(self, get): """ Delivers grading response (e.g. from asynchronous code checking) to @@ -590,7 +586,6 @@ class CapaModule(CapaFields, XModule): self.set_state_from_lcp() return response - def get_answer(self, get): ''' For the "show answer" button. @@ -700,7 +695,6 @@ class CapaModule(CapaFields, XModule): 'max_value': score['total'], }) - def check_problem(self, get): ''' Checks whether answers to a problem are correct, and returns a map of correct/incorrect answers: diff --git a/common/lib/xmodule/xmodule/tests/test_capa_module.py b/common/lib/xmodule/xmodule/tests/test_capa_module.py index 1fefbb64cd..d94345fe1c 100644 --- a/common/lib/xmodule/xmodule/tests/test_capa_module.py +++ b/common/lib/xmodule/xmodule/tests/test_capa_module.py @@ -35,6 +35,7 @@ class CapaFactory(object): """ num = 0 + @staticmethod def next_num(): CapaFactory.num += 1 @@ -49,7 +50,7 @@ class CapaFactory(object): def answer_key(): """ Return the key stored in the capa problem answer dict """ return ("-".join(['i4x', 'edX', 'capa_test', 'problem', - 'SampleProblem%d' % CapaFactory.num]) + + 'SampleProblem%d' % CapaFactory.num]) + "_2_1") @staticmethod @@ -120,7 +121,6 @@ class CapaFactory(object): return module - class CapaModuleTest(unittest.TestCase): def setUp(self): @@ -142,9 +142,6 @@ class CapaModuleTest(unittest.TestCase): self.assertNotEqual(module.url_name, other_module.url_name, "Factory should be creating unique names for each problem") - - - def test_correct(self): """ Check that the factory creates correct and incorrect problems properly. @@ -155,7 +152,6 @@ class CapaModuleTest(unittest.TestCase): other_module = CapaFactory.create(correct=True) self.assertEqual(other_module.get_score()['score'], 1) - def test_showanswer_default(self): """ Make sure the show answer logic does the right thing. @@ -165,14 +161,12 @@ class CapaModuleTest(unittest.TestCase): problem = CapaFactory.create() self.assertFalse(problem.answer_available()) - def test_showanswer_attempted(self): problem = CapaFactory.create(showanswer='attempted') self.assertFalse(problem.answer_available()) problem.attempts = 1 self.assertTrue(problem.answer_available()) - def test_showanswer_closed(self): # can see after attempts used up, even with due date in the future @@ -182,21 +176,19 @@ class CapaModuleTest(unittest.TestCase): due=self.tomorrow_str) self.assertTrue(used_all_attempts.answer_available()) - # can see after due date after_due_date = CapaFactory.create(showanswer='closed', - max_attempts="1", - attempts="0", - due=self.yesterday_str) + max_attempts="1", + attempts="0", + due=self.yesterday_str) self.assertTrue(after_due_date.answer_available()) - # can't see because attempts left attempts_left_open = CapaFactory.create(showanswer='closed', - max_attempts="1", - attempts="0", - due=self.tomorrow_str) + max_attempts="1", + attempts="0", + due=self.tomorrow_str) self.assertFalse(attempts_left_open.answer_available()) # Can't see because grace period hasn't expired @@ -207,8 +199,6 @@ class CapaModuleTest(unittest.TestCase): graceperiod=self.two_day_delta_str) self.assertFalse(still_in_grace.answer_available()) - - def test_showanswer_past_due(self): """ With showanswer="past_due" should only show answer after the problem is closed @@ -222,20 +212,18 @@ class CapaModuleTest(unittest.TestCase): due=self.tomorrow_str) self.assertFalse(used_all_attempts.answer_available()) - # can see after due date past_due_date = CapaFactory.create(showanswer='past_due', - max_attempts="1", - attempts="0", - due=self.yesterday_str) + max_attempts="1", + attempts="0", + due=self.yesterday_str) self.assertTrue(past_due_date.answer_available()) - # can't see because attempts left attempts_left_open = CapaFactory.create(showanswer='past_due', - max_attempts="1", - attempts="0", - due=self.tomorrow_str) + max_attempts="1", + attempts="0", + due=self.tomorrow_str) self.assertFalse(attempts_left_open.answer_available()) # Can't see because grace period hasn't expired, even though have no more @@ -260,31 +248,28 @@ class CapaModuleTest(unittest.TestCase): due=self.tomorrow_str) self.assertTrue(used_all_attempts.answer_available()) - # can see after due date past_due_date = CapaFactory.create(showanswer='finished', - max_attempts="1", - attempts="0", - due=self.yesterday_str) + max_attempts="1", + attempts="0", + due=self.yesterday_str) self.assertTrue(past_due_date.answer_available()) - # can't see because attempts left and wrong attempts_left_open = CapaFactory.create(showanswer='finished', - max_attempts="1", - attempts="0", - due=self.tomorrow_str) + max_attempts="1", + attempts="0", + due=self.tomorrow_str) self.assertFalse(attempts_left_open.answer_available()) # _can_ see because attempts left and right correct_ans = CapaFactory.create(showanswer='finished', - max_attempts="1", - attempts="0", - due=self.tomorrow_str, - correct=True) + max_attempts="1", + attempts="0", + due=self.tomorrow_str, + correct=True) self.assertTrue(correct_ans.answer_available()) - # Can see even though grace period hasn't expired, because have no more # attempts. still_in_grace = CapaFactory.create(showanswer='finished', @@ -294,7 +279,6 @@ class CapaModuleTest(unittest.TestCase): graceperiod=self.two_day_delta_str) self.assertTrue(still_in_grace.answer_available()) - def test_closed(self): # Attempts < Max attempts --> NOT closed @@ -322,7 +306,6 @@ class CapaModuleTest(unittest.TestCase): due=self.yesterday_str) self.assertTrue(module.closed()) - def test_parse_get_params(self): # We have to set up Django settings in order to use QueryDict @@ -348,7 +331,6 @@ class CapaModuleTest(unittest.TestCase): "Output dict should have key %s" % original_key) self.assertEqual(valid_get_dict[original_key], result[key]) - # Valid GET param dict with list keys valid_get_dict = self._querydict_from_dict({'input_2[]': ['test1', 'test2']}) result = CapaModule.make_dict_of_responses(valid_get_dict) @@ -366,12 +348,11 @@ class CapaModuleTest(unittest.TestCase): with self.assertRaises(ValueError): result = CapaModule.make_dict_of_responses(invalid_get_dict) - # Two equivalent names (one list, one non-list) # One of the values would overwrite the other, so detect this # and raise an exception invalid_get_dict = self._querydict_from_dict({'input_1[]': 'test 1', - 'input_1': 'test 2'}) + 'input_1': 'test 2'}) with self.assertRaises(ValueError): result = CapaModule.make_dict_of_responses(invalid_get_dict) @@ -395,7 +376,6 @@ class CapaModuleTest(unittest.TestCase): return copyDict - def test_check_problem_correct(self): module = CapaFactory.create(attempts=1) @@ -403,6 +383,7 @@ class CapaModuleTest(unittest.TestCase): # Simulate that all answers are marked correct, no matter # what the input is, by patching CorrectMap.is_correct() # Also simulate rendering the HTML + # TODO: pep8 thinks the following line has invalid syntax with patch('capa.correctmap.CorrectMap.is_correct') as mock_is_correct,\ patch('xmodule.capa_module.CapaModule.get_problem_html') as mock_html: mock_is_correct.return_value = True @@ -439,7 +420,6 @@ class CapaModuleTest(unittest.TestCase): # Expect that the number of attempts is incremented by 1 self.assertEqual(module.attempts, 1) - def test_check_problem_closed(self): module = CapaFactory.create(attempts=3) @@ -503,12 +483,11 @@ class CapaModuleTest(unittest.TestCase): # Expect that the number of attempts is NOT incremented self.assertEqual(module.attempts, 1) - def test_check_problem_error(self): # Try each exception that capa_module should handle - for exception_class in [StudentInputError, - LoncapaProblemError, + for exception_class in [StudentInputError, + LoncapaProblemError, ResponseError]: # Create the module @@ -532,9 +511,9 @@ class CapaModuleTest(unittest.TestCase): self.assertEqual(module.attempts, 1) def test_check_problem_error_with_staff_user(self): - + # Try each exception that capa module should handle - for exception_class in [StudentInputError, + for exception_class in [StudentInputError, LoncapaProblemError, ResponseError]: @@ -560,7 +539,6 @@ class CapaModuleTest(unittest.TestCase): # Expect that the number of attempts is NOT incremented self.assertEqual(module.attempts, 1) - def test_reset_problem(self): module = CapaFactory.create(done=True) module.new_lcp = Mock(wraps=module.new_lcp) @@ -583,7 +561,6 @@ class CapaModuleTest(unittest.TestCase): # Expect that the problem was reset module.new_lcp.assert_called_once_with({'seed': None}) - def test_reset_problem_closed(self): module = CapaFactory.create() @@ -598,7 +575,6 @@ class CapaModuleTest(unittest.TestCase): # Expect that the problem was NOT reset self.assertTrue('success' in result and not result['success']) - def test_reset_problem_not_done(self): # Simulate that the problem is NOT done module = CapaFactory.create(done=False) @@ -610,7 +586,6 @@ class CapaModuleTest(unittest.TestCase): # Expect that the problem was NOT reset self.assertTrue('success' in result and not result['success']) - def test_save_problem(self): module = CapaFactory.create(done=False) @@ -625,7 +600,6 @@ class CapaModuleTest(unittest.TestCase): # Expect that the result is success self.assertTrue('success' in result and result['success']) - def test_save_problem_closed(self): module = CapaFactory.create(done=False) @@ -640,7 +614,6 @@ class CapaModuleTest(unittest.TestCase): # Expect that the result is failure self.assertTrue('success' in result and not result['success']) - def test_save_problem_submitted_with_randomize(self): module = CapaFactory.create(rerandomize='always', done=True) @@ -651,7 +624,6 @@ class CapaModuleTest(unittest.TestCase): # Expect that we cannot save self.assertTrue('success' in result and not result['success']) - def test_save_problem_submitted_no_randomize(self): module = CapaFactory.create(rerandomize='never', done=True) @@ -724,7 +696,6 @@ class CapaModuleTest(unittest.TestCase): module = CapaFactory.create(rerandomize="never", done=True) self.assertTrue(module.should_show_check_button()) - def test_should_show_reset_button(self): attempts = random.randint(1, 10) @@ -755,7 +726,6 @@ class CapaModuleTest(unittest.TestCase): module = CapaFactory.create(max_attempts=0, done=True) self.assertTrue(module.should_show_reset_button()) - def test_should_show_save_button(self): attempts = random.randint(1, 10) @@ -823,7 +793,6 @@ class CapaModuleTest(unittest.TestCase): html = module.get_problem_html() # assert that we got here without exploding - def test_get_problem_html(self): module = CapaFactory.create() @@ -869,7 +838,6 @@ class CapaModuleTest(unittest.TestCase): # Assert that the encapsulated html contains the original html self.assertTrue(html in html_encapsulated) - def test_get_problem_html_error(self): """ In production, when an error occurs with the problem HTML @@ -902,7 +870,6 @@ class CapaModuleTest(unittest.TestCase): # Expect that the module has created a new dummy problem with the error self.assertNotEqual(original_problem, module.lcp) - def test_random_seed_no_change(self): # Run the test for each possible rerandomize value @@ -920,10 +887,10 @@ class CapaModuleTest(unittest.TestCase): self.assertEqual(seed, 1) # Check the problem - get_request_dict = { CapaFactory.input_key(): '3.14'} + get_request_dict = {CapaFactory.input_key(): '3.14'} module.check_problem(get_request_dict) - # Expect that the seed is the same + # Expect that the seed is the same self.assertEqual(seed, module.seed) # Save the problem @@ -933,7 +900,7 @@ class CapaModuleTest(unittest.TestCase): self.assertEqual(seed, module.seed) def test_random_seed_with_reset(self): - + def _reset_and_get_seed(module): ''' Reset the XModule and return the module's seed @@ -956,7 +923,7 @@ class CapaModuleTest(unittest.TestCase): Returns True if *test_func* was successful (returned True) within *num_tries* attempts - *test_func* must be a function + *test_func* must be a function of the form test_func() -> bool ''' success = False @@ -989,9 +956,10 @@ class CapaModuleTest(unittest.TestCase): # Since there's a small chance we might get the # same seed again, give it 5 chances # to generate a different seed - success = _retry_and_check(5, - lambda: _reset_and_get_seed(module) != seed) - + success = _retry_and_check(5, + lambda: _reset_and_get_seed(module) != seed) + + # TODO: change this comparison to module.seed is not None? self.assertTrue(module.seed != None) msg = 'Could not get a new seed from reset after 5 tries' self.assertTrue(success, msg) diff --git a/lms/djangoapps/psychometrics/psychoanalyze.py b/lms/djangoapps/psychometrics/psychoanalyze.py index 093051a3bd..dd60776594 100644 --- a/lms/djangoapps/psychometrics/psychoanalyze.py +++ b/lms/djangoapps/psychometrics/psychoanalyze.py @@ -15,7 +15,6 @@ from scipy.optimize import curve_fit from django.conf import settings from django.db.models import Sum, Max from psychometrics.models import * -from xmodule.modulestore import Location log = logging.getLogger("mitx.psychometrics") @@ -292,7 +291,7 @@ def generate_plots_for_problem(problem): 'info': '', 'data': jsdata, 'cmd': '[%s], %s' % (','.join(jsplots), axisopts), - }) + }) #log.debug('plots = %s' % plots) return msg, plots @@ -333,9 +332,9 @@ def make_psychometrics_data_update_handler(course_id, user, module_state_key): pmd.done = done try: - pmd.attempts = state.get('attempts',0) + pmd.attempts = state.get('attempts', 0) except: - log.exception("no attempts for %s (state=%s)" % (sm,sm.state)) + log.exception("no attempts for %s (state=%s)" % (sm, sm.state)) try: checktimes = eval(pmd.checktimes) # update log of attempt timestamps From 039ccb83ccbb55a15d252fb59f1c97bb46e7a529 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Tue, 2 Apr 2013 16:23:32 -0400 Subject: [PATCH 24/31] Migrate to the open source XBlock repo --- common/lib/xmodule/xmodule/abtest_module.py | 2 +- common/lib/xmodule/xmodule/capa_module.py | 12 ++--- .../xmodule/combined_open_ended_module.py | 10 ++-- .../xmodule/xmodule/peer_grading_module.py | 2 +- common/lib/xmodule/xmodule/poll_module.py | 4 +- .../lib/xmodule/xmodule/randomize_module.py | 2 +- common/lib/xmodule/xmodule/seq_module.py | 2 +- .../lib/xmodule/xmodule/timelimit_module.py | 6 +-- common/lib/xmodule/xmodule/video_module.py | 2 +- .../lib/xmodule/xmodule/videoalpha_module.py | 2 +- lms/djangoapps/courseware/grades.py | 4 +- lms/djangoapps/courseware/model_data.py | 46 ++++++++-------- lms/djangoapps/courseware/models.py | 4 +- .../courseware/tests/test_model_data.py | 54 +++++++++---------- local-requirements.txt | 2 +- 15 files changed, 77 insertions(+), 77 deletions(-) diff --git a/common/lib/xmodule/xmodule/abtest_module.py b/common/lib/xmodule/xmodule/abtest_module.py index 0e1c66df8e..e84de270b2 100644 --- a/common/lib/xmodule/xmodule/abtest_module.py +++ b/common/lib/xmodule/xmodule/abtest_module.py @@ -33,7 +33,7 @@ def group_from_value(groups, v): class ABTestFields(object): group_portions = Object(help="What proportions of students should go in each group", default={DEFAULT: 1}, scope=Scope.content) - group_assignments = Object(help="What group this user belongs to", scope=Scope.student_preferences, default={}) + group_assignments = Object(help="What group this user belongs to", scope=Scope.preferences, default={}) group_content = Object(help="What content to display to each group", scope=Scope.content, default={DEFAULT: []}) experiment = String(help="Experiment that this A/B test belongs to", scope=Scope.content) has_children = True diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index 2097e4d4ee..025d156e03 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -83,7 +83,7 @@ class ComplexEncoder(json.JSONEncoder): class CapaFields(object): - attempts = StringyInteger(help="Number of attempts taken by the student on this problem", default=0, scope=Scope.student_state) + attempts = StringyInteger(help="Number of attempts taken by the student on this problem", default=0, scope=Scope.user_state) max_attempts = StringyInteger(help="Maximum number of attempts that a student is allowed", scope=Scope.settings) due = Date(help="Date that this problem is due by", scope=Scope.settings) graceperiod = Timedelta(help="Amount of time after the due date that submissions will be accepted", scope=Scope.settings) @@ -91,12 +91,12 @@ class CapaFields(object): force_save_button = Boolean(help="Whether to force the save button to appear on the page", scope=Scope.settings, default=False) rerandomize = Randomization(help="When to rerandomize the problem", default="always", scope=Scope.settings) data = String(help="XML data for the problem", scope=Scope.content) - correct_map = Object(help="Dictionary with the correctness of current student answers", scope=Scope.student_state, default={}) - input_state = Object(help="Dictionary for maintaining the state of inputtypes", scope=Scope.student_state) - student_answers = Object(help="Dictionary with the current student responses", scope=Scope.student_state) - done = Boolean(help="Whether the student has answered the problem", scope=Scope.student_state) + correct_map = Object(help="Dictionary with the correctness of current student answers", scope=Scope.user_state, default={}) + input_state = Object(help="Dictionary for maintaining the state of inputtypes", scope=Scope.user_state) + student_answers = Object(help="Dictionary with the current student responses", scope=Scope.user_state) + done = Boolean(help="Whether the student has answered the problem", scope=Scope.user_state) display_name = String(help="Display name for this module", scope=Scope.settings) - seed = StringyInteger(help="Random seed for this student", scope=Scope.student_state) + seed = StringyInteger(help="Random seed for this student", scope=Scope.user_state) weight = StringyFloat(help="How much to weight this problem by", scope=Scope.settings) markdown = String(help="Markdown source of this module", scope=Scope.settings) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index f70cf62d29..71b641fbd2 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -50,14 +50,14 @@ class VersionInteger(Integer): class CombinedOpenEndedFields(object): display_name = String(help="Display name for this module", default="Open Ended Grading", scope=Scope.settings) - current_task_number = Integer(help="Current task that the student is on.", default=0, scope=Scope.student_state) - task_states = List(help="List of state dictionaries of each task within this module.", scope=Scope.student_state) + current_task_number = Integer(help="Current task that the student is on.", default=0, scope=Scope.user_state) + task_states = List(help="List of state dictionaries of each task within this module.", scope=Scope.user_state) state = String(help="Which step within the current task that the student is on.", default="initial", - scope=Scope.student_state) + scope=Scope.user_state) student_attempts = Integer(help="Number of attempts taken by the student on this problem", default=0, - scope=Scope.student_state) + scope=Scope.user_state) ready_to_reset = Boolean(help="If the problem is ready to be reset or not.", default=False, - scope=Scope.student_state) + scope=Scope.user_state) attempts = Integer(help="Maximum number of attempts that a student is allowed.", default=1, scope=Scope.settings) is_graded = Boolean(help="Whether or not the problem is graded.", default=False, scope=Scope.settings) accept_file_upload = Boolean(help="Whether or not the problem accepts file uploads.", default=False, diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index 5d064378bf..2226b8f7dd 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -38,7 +38,7 @@ class PeerGradingFields(object): max_grade = Integer(help="The maximum grade that a student can receieve for this problem.", default=MAX_SCORE, scope=Scope.settings) student_data_for_location = Object(help="Student data for a given peer grading problem.", default=json.dumps({}), - scope=Scope.student_state) + scope=Scope.user_state) weight = StringyFloat(help="How much to weight this problem by", scope=Scope.settings) diff --git a/common/lib/xmodule/xmodule/poll_module.py b/common/lib/xmodule/xmodule/poll_module.py index 0fb3bfb496..c8ad44a918 100644 --- a/common/lib/xmodule/xmodule/poll_module.py +++ b/common/lib/xmodule/xmodule/poll_module.py @@ -30,8 +30,8 @@ class PollFields(object): # Name of poll to use in links to this poll display_name = String(help="Display name for this module", scope=Scope.settings) - voted = Boolean(help="Whether this student has voted on the poll", scope=Scope.student_state, default=False) - poll_answer = String(help="Student answer", scope=Scope.student_state, default='') + voted = Boolean(help="Whether this student has voted on the poll", scope=Scope.user_state, default=False) + poll_answer = String(help="Student answer", scope=Scope.user_state, default='') poll_answers = Object(help="All possible answers for the poll fro other students", scope=Scope.content) answers = List(help="Poll answers from xml", scope=Scope.content, default=[]) diff --git a/common/lib/xmodule/xmodule/randomize_module.py b/common/lib/xmodule/xmodule/randomize_module.py index 6620ab3cf7..240f33e33e 100644 --- a/common/lib/xmodule/xmodule/randomize_module.py +++ b/common/lib/xmodule/xmodule/randomize_module.py @@ -10,7 +10,7 @@ log = logging.getLogger('mitx.' + __name__) class RandomizeFields(object): - choice = Integer(help="Which random child was chosen", scope=Scope.student_state) + choice = Integer(help="Which random child was chosen", scope=Scope.user_state) class RandomizeModule(RandomizeFields, XModule): diff --git a/common/lib/xmodule/xmodule/seq_module.py b/common/lib/xmodule/xmodule/seq_module.py index f8e982f1a0..f6c3133ede 100644 --- a/common/lib/xmodule/xmodule/seq_module.py +++ b/common/lib/xmodule/xmodule/seq_module.py @@ -23,7 +23,7 @@ class SequenceFields(object): # NOTE: Position is 1-indexed. This is silly, but there are now student # positions saved on prod, so it's not easy to fix. - position = Integer(help="Last tab viewed in this sequence", scope=Scope.student_state) + position = Integer(help="Last tab viewed in this sequence", scope=Scope.user_state) class SequenceModule(SequenceFields, XModule): diff --git a/common/lib/xmodule/xmodule/timelimit_module.py b/common/lib/xmodule/xmodule/timelimit_module.py index efa47a5dca..732aa25e2e 100644 --- a/common/lib/xmodule/xmodule/timelimit_module.py +++ b/common/lib/xmodule/xmodule/timelimit_module.py @@ -16,9 +16,9 @@ log = logging.getLogger(__name__) class TimeLimitFields(object): - beginning_at = Float(help="The time this timer was started", scope=Scope.student_state) - ending_at = Float(help="The time this timer will end", scope=Scope.student_state) - accomodation_code = String(help="A code indicating accommodations to be given the student", scope=Scope.student_state) + beginning_at = Float(help="The time this timer was started", scope=Scope.user_state) + ending_at = Float(help="The time this timer will end", scope=Scope.user_state) + accomodation_code = String(help="A code indicating accommodations to be given the student", scope=Scope.user_state) time_expired_redirect_url = String(help="Url to redirect users to after the timelimit has expired", scope=Scope.settings) duration = Float(help="The length of this timer", scope=Scope.settings) suppress_toplevel_navigation = Boolean(help="Whether the toplevel navigation should be suppressed when viewing this module", scope=Scope.settings) diff --git a/common/lib/xmodule/xmodule/video_module.py b/common/lib/xmodule/xmodule/video_module.py index 0203299b40..2343d24a57 100644 --- a/common/lib/xmodule/xmodule/video_module.py +++ b/common/lib/xmodule/xmodule/video_module.py @@ -19,7 +19,7 @@ log = logging.getLogger(__name__) class VideoFields(object): data = String(help="XML data for the problem", scope=Scope.content) - position = Integer(help="Current position in the video", scope=Scope.student_state, default=0) + position = Integer(help="Current position in the video", scope=Scope.user_state, default=0) display_name = String(help="Display name for this module", scope=Scope.settings) diff --git a/common/lib/xmodule/xmodule/videoalpha_module.py b/common/lib/xmodule/xmodule/videoalpha_module.py index a88c906b9c..6754f8f664 100644 --- a/common/lib/xmodule/xmodule/videoalpha_module.py +++ b/common/lib/xmodule/xmodule/videoalpha_module.py @@ -21,7 +21,7 @@ log = logging.getLogger(__name__) class VideoAlphaFields(object): data = String(help="XML data for the problem", scope=Scope.content) - position = Integer(help="Current position in the video", scope=Scope.student_state, default=0) + position = Integer(help="Current position in the video", scope=Scope.user_state, default=0) display_name = String(help="Display name for this module", scope=Scope.settings) diff --git a/lms/djangoapps/courseware/grades.py b/lms/djangoapps/courseware/grades.py index 51c0b21799..ae386f1528 100644 --- a/lms/djangoapps/courseware/grades.py +++ b/lms/djangoapps/courseware/grades.py @@ -165,7 +165,7 @@ def grade(student, request, course, model_data_cache=None, keep_raw_scores=False # Create a fake key to pull out a StudentModule object from the ModelDataCache key = LmsKeyValueStore.Key( - Scope.student_state, + Scope.user_state, student.id, moduledescriptor.location, None @@ -370,7 +370,7 @@ def get_score(course_id, user, problem_descriptor, module_creator, model_data_ca # Create a fake KeyValueStore key to pull out the StudentModule key = LmsKeyValueStore.Key( - Scope.student_state, + Scope.user_state, user.id, problem_descriptor.location, None diff --git a/lms/djangoapps/courseware/model_data.py b/lms/djangoapps/courseware/model_data.py index b725f64308..826e766e5d 100644 --- a/lms/djangoapps/courseware/model_data.py +++ b/lms/djangoapps/courseware/model_data.py @@ -134,7 +134,7 @@ class ModelDataCache(object): """ if scope in (Scope.children, Scope.parent): return [] - elif scope == Scope.student_state: + elif scope == Scope.user_state: return self._chunked_query( StudentModule, 'module_state_key__in', @@ -159,7 +159,7 @@ class ModelDataCache(object): ), field_name__in=set(field.name for field in fields), ) - elif scope == Scope.student_preferences: + elif scope == Scope.preferences: return self._chunked_query( XModuleStudentPrefsField, 'module_type__in', @@ -167,7 +167,7 @@ class ModelDataCache(object): student=self.user.pk, field_name__in=set(field.name for field in fields), ) - elif scope == Scope.student_info: + elif scope == Scope.user_info: return self._query( XModuleStudentInfoField, student=self.user.pk, @@ -190,15 +190,15 @@ class ModelDataCache(object): """ Return the key used in the ModelDataCache for the specified KeyValueStore key """ - if key.scope == Scope.student_state: + if key.scope == Scope.user_state: return (key.scope, key.block_scope_id.url()) elif key.scope == Scope.content: return (key.scope, key.block_scope_id.url(), key.field_name) elif key.scope == Scope.settings: return (key.scope, '%s-%s' % (self.course_id, key.block_scope_id.url()), key.field_name) - elif key.scope == Scope.student_preferences: + elif key.scope == Scope.preferences: return (key.scope, key.block_scope_id, key.field_name) - elif key.scope == Scope.student_info: + elif key.scope == Scope.user_info: return (key.scope, key.field_name) def _cache_key_from_field_object(self, scope, field_object): @@ -206,15 +206,15 @@ class ModelDataCache(object): Return the key used in the ModelDataCache for the specified scope and field """ - if scope == Scope.student_state: + if scope == Scope.user_state: return (scope, field_object.module_state_key) elif scope == Scope.content: return (scope, field_object.definition_id, field_object.field_name) elif scope == Scope.settings: return (scope, field_object.usage_id, field_object.field_name) - elif scope == Scope.student_preferences: + elif scope == Scope.preferences: return (scope, field_object.module_type, field_object.field_name) - elif scope == Scope.student_info: + elif scope == Scope.user_info: return (scope, field_object.field_name) def find(self, key): @@ -237,7 +237,7 @@ class ModelDataCache(object): if field_object is not None: return field_object - if key.scope == Scope.student_state: + if key.scope == Scope.user_state: field_object, _ = StudentModule.objects.get_or_create( course_id=self.course_id, student=self.user, @@ -255,13 +255,13 @@ class ModelDataCache(object): field_name=key.field_name, usage_id='%s-%s' % (self.course_id, key.block_scope_id.url()), ) - elif key.scope == Scope.student_preferences: + elif key.scope == Scope.preferences: field_object, _ = XModuleStudentPrefsField.objects.get_or_create( field_name=key.field_name, module_type=key.block_scope_id, student=self.user, ) - elif key.scope == Scope.student_info: + elif key.scope == Scope.user_info: field_object, _ = XModuleStudentInfoField.objects.get_or_create( field_name=key.field_name, student=self.user, @@ -281,12 +281,12 @@ class LmsKeyValueStore(KeyValueStore): If the scope to write to is not one of the 5 named scopes: Scope.content Scope.settings - Scope.student_state - Scope.student_preferences - Scope.student_info + Scope.user_state + Scope.preferences + Scope.user_info then an InvalidScopeError will be raised. - Data for Scope.student_state is stored as StudentModule objects via the django orm. + Data for Scope.user_state is stored as StudentModule objects via the django orm. Data for the other scopes is stored in individual objects that are named for the scope involved and have the field name as a key @@ -297,9 +297,9 @@ class LmsKeyValueStore(KeyValueStore): _allowed_scopes = ( Scope.content, Scope.settings, - Scope.student_state, - Scope.student_preferences, - Scope.student_info, + Scope.user_state, + Scope.preferences, + Scope.user_info, Scope.children, ) @@ -321,7 +321,7 @@ class LmsKeyValueStore(KeyValueStore): if field_object is None: raise KeyError(key.field_name) - if key.scope == Scope.student_state: + if key.scope == Scope.user_state: return json.loads(field_object.state)[key.field_name] else: return json.loads(field_object.value) @@ -335,7 +335,7 @@ class LmsKeyValueStore(KeyValueStore): if key.scope not in self._allowed_scopes: raise InvalidScopeError(key.scope) - if key.scope == Scope.student_state: + if key.scope == Scope.user_state: state = json.loads(field_object.state) state[key.field_name] = value field_object.state = json.dumps(state) @@ -355,7 +355,7 @@ class LmsKeyValueStore(KeyValueStore): if field_object is None: raise KeyError(key.field_name) - if key.scope == Scope.student_state: + if key.scope == Scope.user_state: state = json.loads(field_object.state) del state[key.field_name] field_object.state = json.dumps(state) @@ -377,7 +377,7 @@ class LmsKeyValueStore(KeyValueStore): if field_object is None: return False - if key.scope == Scope.student_state: + if key.scope == Scope.user_state: return key.field_name in json.loads(field_object.state) else: return True diff --git a/lms/djangoapps/courseware/models.py b/lms/djangoapps/courseware/models.py index 448757a2f8..53493b8e45 100644 --- a/lms/djangoapps/courseware/models.py +++ b/lms/djangoapps/courseware/models.py @@ -165,7 +165,7 @@ class XModuleSettingsField(models.Model): class XModuleStudentPrefsField(models.Model): """ - Stores data set in the Scope.student_preferences scope by an xmodule field + Stores data set in the Scope.preferences scope by an xmodule field """ class Meta: @@ -199,7 +199,7 @@ class XModuleStudentPrefsField(models.Model): class XModuleStudentInfoField(models.Model): """ - Stores data set in the Scope.student_preferences scope by an xmodule field + Stores data set in the Scope.preferences scope by an xmodule field """ class Meta: diff --git a/lms/djangoapps/courseware/tests/test_model_data.py b/lms/djangoapps/courseware/tests/test_model_data.py index 7f4727cf15..65eaa5a4bd 100644 --- a/lms/djangoapps/courseware/tests/test_model_data.py +++ b/lms/djangoapps/courseware/tests/test_model_data.py @@ -32,9 +32,9 @@ course_id = 'edX/test_course/test' content_key = partial(LmsKeyValueStore.Key, Scope.content, None, location('def_id')) settings_key = partial(LmsKeyValueStore.Key, Scope.settings, None, location('def_id')) -student_state_key = partial(LmsKeyValueStore.Key, Scope.student_state, 'user', location('def_id')) -student_prefs_key = partial(LmsKeyValueStore.Key, Scope.student_preferences, 'user', 'problem') -student_info_key = partial(LmsKeyValueStore.Key, Scope.student_info, 'user', None) +user_state_key = partial(LmsKeyValueStore.Key, Scope.user_state, 'user', location('def_id')) +prefs_key = partial(LmsKeyValueStore.Key, Scope.preferences, 'user', 'problem') +user_info_key = partial(LmsKeyValueStore.Key, Scope.user_info, 'user', None) class UserFactory(factory.Factory): @@ -115,13 +115,13 @@ class TestInvalidScopes(TestCase): def setUp(self): self.desc_md = {} self.user = UserFactory.create() - self.mdc = ModelDataCache([mock_descriptor([mock_field(Scope.student_state, 'a_field')])], course_id, self.user) + self.mdc = ModelDataCache([mock_descriptor([mock_field(Scope.user_state, 'a_field')])], course_id, self.user) self.kvs = LmsKeyValueStore(self.desc_md, self.mdc) def test_invalid_scopes(self): - for scope in (Scope(student=True, block=BlockScope.DEFINITION), - Scope(student=False, block=BlockScope.TYPE), - Scope(student=False, block=BlockScope.ALL)): + for scope in (Scope(user=True, block=BlockScope.DEFINITION), + Scope(user=False, block=BlockScope.TYPE), + Scope(user=False, block=BlockScope.ALL)): self.assertRaises(InvalidScopeError, self.kvs.get, LmsKeyValueStore.Key(scope, None, None, 'field')) self.assertRaises(InvalidScopeError, self.kvs.set, LmsKeyValueStore.Key(scope, None, None, 'field'), 'value') self.assertRaises(InvalidScopeError, self.kvs.delete, LmsKeyValueStore.Key(scope, None, None, 'field')) @@ -134,48 +134,48 @@ class TestStudentModuleStorage(TestCase): self.desc_md = {} student_module = StudentModuleFactory(state=json.dumps({'a_field': 'a_value'})) self.user = student_module.student - self.mdc = ModelDataCache([mock_descriptor([mock_field(Scope.student_state, 'a_field')])], course_id, self.user) + self.mdc = ModelDataCache([mock_descriptor([mock_field(Scope.user_state, 'a_field')])], course_id, self.user) self.kvs = LmsKeyValueStore(self.desc_md, self.mdc) def test_get_existing_field(self): "Test that getting an existing field in an existing StudentModule works" - self.assertEquals('a_value', self.kvs.get(student_state_key('a_field'))) + self.assertEquals('a_value', self.kvs.get(user_state_key('a_field'))) def test_get_missing_field(self): "Test that getting a missing field from an existing StudentModule raises a KeyError" - self.assertRaises(KeyError, self.kvs.get, student_state_key('not_a_field')) + self.assertRaises(KeyError, self.kvs.get, user_state_key('not_a_field')) def test_set_existing_field(self): - "Test that setting an existing student_state field changes the value" - self.kvs.set(student_state_key('a_field'), 'new_value') + "Test that setting an existing user_state field changes the value" + self.kvs.set(user_state_key('a_field'), 'new_value') self.assertEquals(1, StudentModule.objects.all().count()) self.assertEquals({'a_field': 'new_value'}, json.loads(StudentModule.objects.all()[0].state)) def test_set_missing_field(self): - "Test that setting a new student_state field changes the value" - self.kvs.set(student_state_key('not_a_field'), 'new_value') + "Test that setting a new user_state field changes the value" + self.kvs.set(user_state_key('not_a_field'), 'new_value') self.assertEquals(1, StudentModule.objects.all().count()) self.assertEquals({'a_field': 'a_value', 'not_a_field': 'new_value'}, json.loads(StudentModule.objects.all()[0].state)) def test_delete_existing_field(self): "Test that deleting an existing field removes it from the StudentModule" - self.kvs.delete(student_state_key('a_field')) + self.kvs.delete(user_state_key('a_field')) self.assertEquals(1, StudentModule.objects.all().count()) - self.assertRaises(KeyError, self.kvs.get, student_state_key('not_a_field')) + self.assertRaises(KeyError, self.kvs.get, user_state_key('not_a_field')) def test_delete_missing_field(self): "Test that deleting a missing field from an existing StudentModule raises a KeyError" - self.assertRaises(KeyError, self.kvs.delete, student_state_key('not_a_field')) + self.assertRaises(KeyError, self.kvs.delete, user_state_key('not_a_field')) self.assertEquals(1, StudentModule.objects.all().count()) self.assertEquals({'a_field': 'a_value'}, json.loads(StudentModule.objects.all()[0].state)) def test_has_existing_field(self): "Test that `has` returns True for existing fields in StudentModules" - self.assertTrue(self.kvs.has(student_state_key('a_field'))) + self.assertTrue(self.kvs.has(user_state_key('a_field'))) def test_has_missing_field(self): "Test that `has` returns False for missing fields in StudentModule" - self.assertFalse(self.kvs.has(student_state_key('not_a_field'))) + self.assertFalse(self.kvs.has(user_state_key('not_a_field'))) class TestMissingStudentModule(TestCase): @@ -187,14 +187,14 @@ class TestMissingStudentModule(TestCase): def test_get_field_from_missing_student_module(self): "Test that getting a field from a missing StudentModule raises a KeyError" - self.assertRaises(KeyError, self.kvs.get, student_state_key('a_field')) + self.assertRaises(KeyError, self.kvs.get, user_state_key('a_field')) def test_set_field_in_missing_student_module(self): "Test that setting a field in a missing StudentModule creates the student module" self.assertEquals(0, len(self.mdc.cache)) self.assertEquals(0, StudentModule.objects.all().count()) - self.kvs.set(student_state_key('a_field'), 'a_value') + self.kvs.set(user_state_key('a_field'), 'a_value') self.assertEquals(1, len(self.mdc.cache)) self.assertEquals(1, StudentModule.objects.all().count()) @@ -207,11 +207,11 @@ class TestMissingStudentModule(TestCase): def test_delete_field_from_missing_student_module(self): "Test that deleting a field from a missing StudentModule raises a KeyError" - self.assertRaises(KeyError, self.kvs.delete, student_state_key('a_field')) + self.assertRaises(KeyError, self.kvs.delete, user_state_key('a_field')) def test_has_field_for_missing_student_module(self): "Test that `has` returns False for missing StudentModules" - self.assertFalse(self.kvs.has(student_state_key('a_field'))) + self.assertFalse(self.kvs.has(user_state_key('a_field'))) class StorageTestBase(object): @@ -286,13 +286,13 @@ class TestContentStorage(StorageTestBase, TestCase): class TestStudentPrefsStorage(StorageTestBase, TestCase): factory = StudentPrefsFactory - scope = Scope.student_preferences - key_factory = student_prefs_key + scope = Scope.preferences + key_factory = prefs_key storage_class = XModuleStudentPrefsField class TestStudentInfoStorage(StorageTestBase, TestCase): factory = StudentInfoFactory - scope = Scope.student_info - key_factory = student_info_key + scope = Scope.user_info + key_factory = user_info_key storage_class = XModuleStudentInfoField diff --git a/local-requirements.txt b/local-requirements.txt index de2d274719..177897f53d 100644 --- a/local-requirements.txt +++ b/local-requirements.txt @@ -6,4 +6,4 @@ # XBlock: # Might change frequently, so put it in local-requirements.txt, # but conceptually is an external package, so it is in a separate repo. --e git+ssh://git@github.com/MITx/xmodule-debugger@9a4f883a#egg=XBlock +-e git+https://github.com/edx/XBlock.git@96d8f5f4#egg=XBlock From 4c511c3c6634af9d57b985ccfe7b222c5fe08220 Mon Sep 17 00:00:00 2001 From: Brian Wilson Date: Thu, 4 Apr 2013 11:14:52 -0400 Subject: [PATCH 25/31] add progress logging --- .../courseware/management/commands/remove_input_state.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lms/djangoapps/courseware/management/commands/remove_input_state.py b/lms/djangoapps/courseware/management/commands/remove_input_state.py index 9adabeafc9..e45d08e351 100644 --- a/lms/djangoapps/courseware/management/commands/remove_input_state.py +++ b/lms/djangoapps/courseware/management/commands/remove_input_state.py @@ -76,6 +76,11 @@ class Command(BaseCommand): for hist_module in hist_modules: self.remove_studentmodulehistory_input_state(hist_module, save_changes) + if self.num_visited % 1000 == 0: + LOG.info(" Progress: updated {0} of {1} student modules".format(self.num_changed, self.num_visited)) + LOG.info(" Progress: updated {0} of {1} student history modules".format(self.num_hist_changed, + self.num_hist_visited)) + @transaction.autocommit def remove_studentmodule_input_state(self, module, save_changes): ''' Fix the grade assigned to a StudentModule''' From d3e7739b3b4b2f2ea72539148c9c082ac66d0a2b Mon Sep 17 00:00:00 2001 From: Brian Wilson Date: Thu, 4 Apr 2013 12:03:08 -0400 Subject: [PATCH 26/31] add user name and email to progress page --- lms/djangoapps/courseware/views.py | 1 + lms/templates/courseware/progress.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index b2b0874786..ae15b40d26 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -630,6 +630,7 @@ def progress(request, course_id, student_id=None): 'courseware_summary': courseware_summary, 'grade_summary': grade_summary, 'staff_access': staff_access, + 'student': student, } context.update() diff --git a/lms/templates/courseware/progress.html b/lms/templates/courseware/progress.html index f94e7651f0..9e2a2e5982 100644 --- a/lms/templates/courseware/progress.html +++ b/lms/templates/courseware/progress.html @@ -31,7 +31,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph",
        -

        Course Progress

        +

        Course Progress for Student '${student.username}' (${student.email})

        %if not course.disable_progress_graph: From 02b7ab4fa075ca22caa87722b3dd9b2c73c5fbe8 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 29 Mar 2013 12:49:24 -0400 Subject: [PATCH 27/31] Tests to make sure that input_states have the correct keys and are not cross-pollinating --- .../lib/xmodule/xmodule/tests/test_capa_module.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/common/lib/xmodule/xmodule/tests/test_capa_module.py b/common/lib/xmodule/xmodule/tests/test_capa_module.py index d94345fe1c..7f334207e7 100644 --- a/common/lib/xmodule/xmodule/tests/test_capa_module.py +++ b/common/lib/xmodule/xmodule/tests/test_capa_module.py @@ -838,6 +838,19 @@ class CapaModuleTest(unittest.TestCase): # Assert that the encapsulated html contains the original html self.assertTrue(html in html_encapsulated) + def test_input_state_consistency(self): + module1 = CapaFactory.create() + module2 = CapaFactory.create() + + # check to make sure that the input_state and the keys have the same values + module1.set_state_from_lcp() + self.assertEqual(module1.lcp.inputs.keys(),module1.input_state.keys()) + + module2.set_state_from_lcp() + + intersection = set(module2.input_state.keys()).intersection(set(module1.input_state.keys())) + self.assertEqual(len(intersection), 0) + def test_get_problem_html_error(self): """ In production, when an error occurs with the problem HTML From 42614c69b4cfc1c2477bcd7d43c23d361947c146 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Thu, 4 Apr 2013 14:16:27 -0400 Subject: [PATCH 28/31] Add space after comma. --- common/lib/xmodule/xmodule/tests/test_capa_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/tests/test_capa_module.py b/common/lib/xmodule/xmodule/tests/test_capa_module.py index 7f334207e7..bc5d342646 100644 --- a/common/lib/xmodule/xmodule/tests/test_capa_module.py +++ b/common/lib/xmodule/xmodule/tests/test_capa_module.py @@ -844,7 +844,7 @@ class CapaModuleTest(unittest.TestCase): # check to make sure that the input_state and the keys have the same values module1.set_state_from_lcp() - self.assertEqual(module1.lcp.inputs.keys(),module1.input_state.keys()) + self.assertEqual(module1.lcp.inputs.keys(), module1.input_state.keys()) module2.set_state_from_lcp() From d02dc37d9f230761ee4c932d1d8a9bc775aa9da2 Mon Sep 17 00:00:00 2001 From: cahrens Date: Thu, 4 Apr 2013 15:22:56 -0400 Subject: [PATCH 29/31] On course about page, display course end date if no about page HTML blog (end_date.html) exists. #224 --- common/lib/xmodule/xmodule/course_module.py | 7 +++- .../xmodule/tests/test_course_module.py | 16 ++++++-- .../data/test_about_blob_end_date/README.md | 5 +++ .../about/end_date.html | 1 + .../data/test_about_blob_end_date/course.xml | 1 + .../course/2012_Fall.xml | 2 + .../policies/2012_Fall.json | 9 +++++ common/test/data/test_end/README.md | 5 +++ common/test/data/test_end/course.xml | 1 + .../test/data/test_end/course/2012_Fall.xml | 2 + .../data/test_end/policies/2012_Fall.json | 9 +++++ lms/djangoapps/courseware/tests/test_views.py | 39 +++++++++++++------ lms/templates/courseware/course_about.html | 18 +++++++-- 13 files changed, 95 insertions(+), 20 deletions(-) create mode 100644 common/test/data/test_about_blob_end_date/README.md create mode 100644 common/test/data/test_about_blob_end_date/about/end_date.html create mode 100644 common/test/data/test_about_blob_end_date/course.xml create mode 100644 common/test/data/test_about_blob_end_date/course/2012_Fall.xml create mode 100644 common/test/data/test_about_blob_end_date/policies/2012_Fall.json create mode 100644 common/test/data/test_end/README.md create mode 100644 common/test/data/test_end/course.xml create mode 100644 common/test/data/test_end/course/2012_Fall.xml create mode 100644 common/test/data/test_end/policies/2012_Fall.json diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index ed5a37e580..4712bbe426 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -652,7 +652,12 @@ class CourseDescriptor(CourseFields, SequenceDescriptor): @property def end_date_text(self): - return time.strftime("%b %d, %Y", self.end) + """ + Returns the end date for the course formatted as a string. + + If the course does not have an end date set (course.end is None), an empty string will be returned. + """ + return '' if self.end is None else time.strftime("%b %d, %Y", self.end) @property def forum_posts_allowed(self): diff --git a/common/lib/xmodule/xmodule/tests/test_course_module.py b/common/lib/xmodule/xmodule/tests/test_course_module.py index 17930f1b89..15bab32c14 100644 --- a/common/lib/xmodule/xmodule/tests/test_course_module.py +++ b/common/lib/xmodule/xmodule/tests/test_course_module.py @@ -54,7 +54,7 @@ class IsNewCourseTestCase(unittest.TestCase): self.addCleanup(datetime_patcher.stop) @staticmethod - def get_dummy_course(start, announcement=None, is_new=None, advertised_start=None): + def get_dummy_course(start, announcement=None, is_new=None, advertised_start=None, end=None): """Get a dummy course""" system = DummySystem(load_error_modules=True) @@ -65,6 +65,7 @@ class IsNewCourseTestCase(unittest.TestCase): is_new = to_attrb('is_new', is_new) announcement = to_attrb('announcement', announcement) advertised_start = to_attrb('advertised_start', advertised_start) + end = to_attrb('end', end) start_xml = ''' + {advertised_start} + {end}> Two houses, ... '''.format(org=ORG, course=COURSE, start=start, is_new=is_new, - announcement=announcement, advertised_start=advertised_start) + announcement=announcement, advertised_start=advertised_start, end=end) return system.process_xml(start_xml) @@ -161,3 +163,11 @@ class IsNewCourseTestCase(unittest.TestCase): descriptor = self.get_dummy_course(start='2012-12-31T12:00') assert(descriptor.is_newish is True) + + def test_end_date_text(self): + # No end date set, returns empty string. + d = self.get_dummy_course('2012-12-02T12:00') + self.assertEqual('', d.end_date_text) + + d = self.get_dummy_course('2012-12-02T12:00', end='2014-9-04T12:00') + self.assertEqual('Sep 04, 2014', d.end_date_text) diff --git a/common/test/data/test_about_blob_end_date/README.md b/common/test/data/test_about_blob_end_date/README.md new file mode 100644 index 0000000000..521cd24623 --- /dev/null +++ b/common/test/data/test_about_blob_end_date/README.md @@ -0,0 +1,5 @@ +Test course for checking the end date displayed on the course about page. +This course has both an end_date HTML "blob", and it also has a course end date set. +The end_date "blob" has higher precedence and will show. + +See also test_end course. \ No newline at end of file diff --git a/common/test/data/test_about_blob_end_date/about/end_date.html b/common/test/data/test_about_blob_end_date/about/end_date.html new file mode 100644 index 0000000000..683ae74a50 --- /dev/null +++ b/common/test/data/test_about_blob_end_date/about/end_date.html @@ -0,0 +1 @@ +Learning never ends \ No newline at end of file diff --git a/common/test/data/test_about_blob_end_date/course.xml b/common/test/data/test_about_blob_end_date/course.xml new file mode 100644 index 0000000000..100e2783da --- /dev/null +++ b/common/test/data/test_about_blob_end_date/course.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/common/test/data/test_about_blob_end_date/course/2012_Fall.xml b/common/test/data/test_about_blob_end_date/course/2012_Fall.xml new file mode 100644 index 0000000000..c9d2e8702d --- /dev/null +++ b/common/test/data/test_about_blob_end_date/course/2012_Fall.xml @@ -0,0 +1,2 @@ + + diff --git a/common/test/data/test_about_blob_end_date/policies/2012_Fall.json b/common/test/data/test_about_blob_end_date/policies/2012_Fall.json new file mode 100644 index 0000000000..7df05a1392 --- /dev/null +++ b/common/test/data/test_about_blob_end_date/policies/2012_Fall.json @@ -0,0 +1,9 @@ +{ + "course/2012_Fall": { + "graceperiod": "2 days 5 hours 59 minutes 59 seconds", + "start": "2015-07-17T12:00", + "end": "2015-09-17T12:00", + "display_name": "Test About Blob End Date", + "graded": "true" + } +} diff --git a/common/test/data/test_end/README.md b/common/test/data/test_end/README.md new file mode 100644 index 0000000000..2861b5da24 --- /dev/null +++ b/common/test/data/test_end/README.md @@ -0,0 +1,5 @@ +Test course for checking the end date displayed on the course about page. +This course does not have an end_date HTML "blob", but it does have a course end date set. +Therefore the course end date should show on the course about page. + +See also test_about_blob_end_date course. \ No newline at end of file diff --git a/common/test/data/test_end/course.xml b/common/test/data/test_end/course.xml new file mode 100644 index 0000000000..45355c7cd2 --- /dev/null +++ b/common/test/data/test_end/course.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/common/test/data/test_end/course/2012_Fall.xml b/common/test/data/test_end/course/2012_Fall.xml new file mode 100644 index 0000000000..c9d2e8702d --- /dev/null +++ b/common/test/data/test_end/course/2012_Fall.xml @@ -0,0 +1,2 @@ + + diff --git a/common/test/data/test_end/policies/2012_Fall.json b/common/test/data/test_end/policies/2012_Fall.json new file mode 100644 index 0000000000..a114f23465 --- /dev/null +++ b/common/test/data/test_end/policies/2012_Fall.json @@ -0,0 +1,9 @@ +{ + "course/2012_Fall": { + "graceperiod": "2 days 5 hours 59 minutes 59 seconds", + "start": "2015-07-17T12:00", + "end": "2015-09-17T12:00", + "display_name": "Test End", + "graded": "true" + } +} diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index 979f347d1f..52051f13df 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -1,26 +1,19 @@ -import logging -from mock import MagicMock, patch +from mock import MagicMock import datetime -import factory -import unittest -import os from django.test import TestCase -from django.http import Http404, HttpResponse +from django.http import Http404 from django.conf import settings from django.test.utils import override_settings from django.contrib.auth.models import User from django.test.client import RequestFactory from student.models import CourseEnrollment -from xmodule.modulestore.django import modulestore, _MODULESTORES -from xmodule.modulestore.exceptions import InvalidLocationError,\ - ItemNotFoundError, NoPathToItem +from xmodule.modulestore.django import modulestore + import courseware.views as views from xmodule.modulestore import Location -from .factories import UserFactory - class Stub(): pass @@ -55,7 +48,6 @@ class TestJumpTo(TestCase): def test_jumpto_invalid_location(self): location = Location('i4x', 'edX', 'toy', 'NoSuchPlace', None) jumpto_url = '%s/%s/jump_to/%s' % ('/courses', self.course_name, location) - expected = 'courses/edX/toy/2012_Fall/courseware/Overview/' response = self.client.get(jumpto_url) self.assertEqual(response.status_code, 404) @@ -124,3 +116,26 @@ class ViewsTestCase(TestCase): request, 'bar', ()) self.assertRaisesRegexp(Http404, 'No data*', views.jump_to, request, 'dummy', self.location) + + def test_no_end_on_about_page(self): + # Toy course has no course end date or about/end_date blob + self.verify_end_date(self.course_id) + + def test_no_end_about_blob(self): + # test_end has a course end date, no end_date HTML blob + self.verify_end_date('edX/test_end/2012_Fall', "Sep 17, 2015") + + def test_about_blob_end_date(self): + # test_about_blob_end_date has both a course end date, and an end_date HTML blob + # HTML blob wins + self.verify_end_date('edX/test_about_blob_end_date/2012_Fall', "Learning never ends") + + def verify_end_date(self, course_id, expected_end_text=None): + request = self.request_factory.get('foo') + request.user = self.user + result = views.course_about(request, course_id) + if expected_end_text is not None: + self.assertContains(result, "Classes End") + self.assertContains(result, expected_end_text) + else: + self.assertNotContains(result, "Classes End") diff --git a/lms/templates/courseware/course_about.html b/lms/templates/courseware/course_about.html index b35c7a1b6f..dc1dc17532 100644 --- a/lms/templates/courseware/course_about.html +++ b/lms/templates/courseware/course_about.html @@ -144,10 +144,20 @@
      • Course Number

        ${course.number}
      • Classes Start

        ${course.start_date_text}
      • - ## End date should come from course.xml, but this is a quick hack - % if get_course_about_section(course, "end_date"): -
      • Classes End

        ${get_course_about_section(course, "end_date")}
      • - % endif + ## We plan to ditch end_date (which is not stored in course metadata), + ## but for backwards compatibility, show about/end_date blob if it exists. + % if get_course_about_section(course, "end_date") or course.end: +
      • +
        +

        Classes End

        + % if get_course_about_section(course, "end_date"): + ${get_course_about_section(course, "end_date")} + % else: + ${course.end_date_text} + % endif + +
      • + % endif % if get_course_about_section(course, "effort"):
      • Estimated Effort

        ${get_course_about_section(course, "effort")}
      • From bd055ddc22dcc053402e85400e3d70761b3b29e2 Mon Sep 17 00:00:00 2001 From: cahrens Date: Thu, 4 Apr 2013 15:30:34 -0400 Subject: [PATCH 30/31] On course about page, display course end date if no about page HTML blog (end_date.html) exists. #224 --- common/test/data/test_about_blob_end_date/README.md | 2 +- common/test/data/test_about_blob_end_date/about/end_date.html | 2 +- common/test/data/test_about_blob_end_date/course.xml | 2 +- common/test/data/test_end/README.md | 2 +- common/test/data/test_end/course.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/test/data/test_about_blob_end_date/README.md b/common/test/data/test_about_blob_end_date/README.md index 521cd24623..69cb3b7cb7 100644 --- a/common/test/data/test_about_blob_end_date/README.md +++ b/common/test/data/test_about_blob_end_date/README.md @@ -2,4 +2,4 @@ Test course for checking the end date displayed on the course about page. This course has both an end_date HTML "blob", and it also has a course end date set. The end_date "blob" has higher precedence and will show. -See also test_end course. \ No newline at end of file +See also test_end course. diff --git a/common/test/data/test_about_blob_end_date/about/end_date.html b/common/test/data/test_about_blob_end_date/about/end_date.html index 683ae74a50..918737595e 100644 --- a/common/test/data/test_about_blob_end_date/about/end_date.html +++ b/common/test/data/test_about_blob_end_date/about/end_date.html @@ -1 +1 @@ -Learning never ends \ No newline at end of file +Learning never ends diff --git a/common/test/data/test_about_blob_end_date/course.xml b/common/test/data/test_about_blob_end_date/course.xml index 100e2783da..e6ffae8481 100644 --- a/common/test/data/test_about_blob_end_date/course.xml +++ b/common/test/data/test_about_blob_end_date/course.xml @@ -1 +1 @@ - \ No newline at end of file + diff --git a/common/test/data/test_end/README.md b/common/test/data/test_end/README.md index 2861b5da24..6fc2f28728 100644 --- a/common/test/data/test_end/README.md +++ b/common/test/data/test_end/README.md @@ -2,4 +2,4 @@ Test course for checking the end date displayed on the course about page. This course does not have an end_date HTML "blob", but it does have a course end date set. Therefore the course end date should show on the course about page. -See also test_about_blob_end_date course. \ No newline at end of file +See also test_about_blob_end_date course. diff --git a/common/test/data/test_end/course.xml b/common/test/data/test_end/course.xml index 45355c7cd2..3071ba09ea 100644 --- a/common/test/data/test_end/course.xml +++ b/common/test/data/test_end/course.xml @@ -1 +1 @@ - \ No newline at end of file + From 57343c7d9ee607eae01e2711d710579c474f96d9 Mon Sep 17 00:00:00 2001 From: cahrens Date: Thu, 4 Apr 2013 15:35:07 -0400 Subject: [PATCH 31/31] On course about page, display course end date if no about page HTML blog (end_date.html) exists. #224 --- lms/djangoapps/courseware/tests/test_views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index 52051f13df..1d3166893e 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -123,15 +123,15 @@ class ViewsTestCase(TestCase): def test_no_end_about_blob(self): # test_end has a course end date, no end_date HTML blob - self.verify_end_date('edX/test_end/2012_Fall', "Sep 17, 2015") + self.verify_end_date("edX/test_end/2012_Fall", "Sep 17, 2015") def test_about_blob_end_date(self): - # test_about_blob_end_date has both a course end date, and an end_date HTML blob + # test_about_blob_end_date has both a course end date and an end_date HTML blob. # HTML blob wins - self.verify_end_date('edX/test_about_blob_end_date/2012_Fall', "Learning never ends") + self.verify_end_date("edX/test_about_blob_end_date/2012_Fall", "Learning never ends") def verify_end_date(self, course_id, expected_end_text=None): - request = self.request_factory.get('foo') + request = self.request_factory.get("foo") request.user = self.user result = views.course_about(request, course_id) if expected_end_text is not None: