From 409477522b237047cb44209562f9b0348266b546 Mon Sep 17 00:00:00 2001 From: Matthew Mongeau Date: Thu, 16 Aug 2012 17:07:02 -0400 Subject: [PATCH 1/5] Add jQuery scrollTo to courseware. --- lms/templates/courseware.html | 1 + 1 file changed, 1 insertion(+) diff --git a/lms/templates/courseware.html b/lms/templates/courseware.html index a14f35d154..92c6c9707c 100644 --- a/lms/templates/courseware.html +++ b/lms/templates/courseware.html @@ -8,6 +8,7 @@ <%block name="js_extra"> + ## codemirror From 61108c27cb9e8ce73b3cae634bb2a81e25a1ecaf Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Thu, 16 Aug 2012 19:12:41 -0400 Subject: [PATCH 2/5] When replicating CourseEnrollment, make sure Users were created in all DBs before replicating other models --- common/djangoapps/student/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index 6d1cbb5afb..4a8de5f5ed 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -279,7 +279,8 @@ def replicate_enrollment_save(sender, **kwargs): enrollment_obj = kwargs['instance'] log.debug("Replicating user because of new enrollment") - replicate_user(enrollment_obj.user, enrollment_obj.course_id) + for course_db_name in db_names_to_replicate_to(enrollment_obj.user.id): + replicate_user(enrollment_obj.user, course_db_name) log.debug("Replicating enrollment because of new enrollment") replicate_model(CourseEnrollment.save, enrollment_obj, enrollment_obj.user_id) From 0a9065f2bea773df5013c455a4405b941fe8a234 Mon Sep 17 00:00:00 2001 From: kimth Date: Thu, 16 Aug 2012 22:00:10 -0400 Subject: [PATCH 3/5] Fix CustomResponse for 6.002x --- common/lib/capa/capa/responsetypes.py | 2 ++ common/lib/capa/capa/templates/textinput.html | 2 ++ 2 files changed, 4 insertions(+) diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index d327b80c14..fcb36a1d03 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -873,6 +873,7 @@ def sympy_check2(): msg = 'No answer entered!' if self.xml.get('empty_answer_err') else '' return CorrectMap(idset[0], 'incorrect', msg=msg) + # NOTE: correct = 'unknown' could be dangerous. Inputtypes such as textline are not expecting 'unknown's correct = ['unknown'] * len(idset) messages = [''] * len(idset) @@ -898,6 +899,7 @@ def sympy_check2(): if type(self.code) == str: try: exec self.code in self.context['global_context'], self.context + correct = self.context['correct'] except Exception as err: print "oops in customresponse (code) error %s" % err print "context = ", self.context diff --git a/common/lib/capa/capa/templates/textinput.html b/common/lib/capa/capa/templates/textinput.html index 7f2f563b81..08aa8379a7 100644 --- a/common/lib/capa/capa/templates/textinput.html +++ b/common/lib/capa/capa/templates/textinput.html @@ -38,5 +38,7 @@ % if msg: ${msg|n} % endif +% if state in ['unsubmitted', 'correct', 'incorrect', 'incomplete'] or hidden: +% endif From b0627efc74d0d46abed3d39258cc792e0601ce2e Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Fri, 17 Aug 2012 09:23:37 -0400 Subject: [PATCH 4/5] Fix the tests of the book url --- lms/djangoapps/courseware/tests/tests.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/courseware/tests/tests.py b/lms/djangoapps/courseware/tests/tests.py index 22a65267c9..da518f45b7 100644 --- a/lms/djangoapps/courseware/tests/tests.py +++ b/lms/djangoapps/courseware/tests/tests.py @@ -388,7 +388,11 @@ class TestViewAuth(PageLoader): list of urls that students should be able to see only after launch, but staff should see before """ - urls = reverse_urls(['info', 'book', 'courseware', 'profile'], course) + urls = reverse_urls(['info', 'courseware', 'profile'], course) + urls.extend([ + reverse('book', kwargs={'course_id': course.id, 'book_index': book.title}) + for book in course.textbooks + ]) return urls def light_student_urls(course): From 4dbcfe927eb4b73abbdb1d433b71ccae2eba2dad Mon Sep 17 00:00:00 2001 From: ichuang Date: Fri, 17 Aug 2012 09:36:43 -0400 Subject: [PATCH 5/5] hotfix: eecs1 is inaccessible due to dead router; switch to qisx for pyxserver This needs a more permanent solution. --- common/lib/capa/capa/responsetypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index fcb36a1d03..3a2e40f896 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -1273,7 +1273,7 @@ main() def setup_response(self): xml = self.xml - self.url = xml.get('url') or "http://eecs1.mit.edu:8889/pyloncapa" # FIXME - hardcoded URL + self.url = xml.get('url') or "http://qisx.mit.edu:8889/pyloncapa" # FIXME - hardcoded URL # answer = xml.xpath('//*[@id=$id]//answer',id=xml.get('id'))[0] # FIXME - catch errors answer = xml.find('answer')