From 2b23c403450b703842c6cca630a613ba89938722 Mon Sep 17 00:00:00 2001 From: marco Date: Thu, 17 Jan 2013 15:25:35 -0500 Subject: [PATCH 001/347] minor tweaks to dropdown text and addition of dropdown menu (without data links) for intructor visilibility dropdown in main discussion forum; --- lms/static/sass/_discussion.scss | 22 ++++++++++++++++++- .../discussion/_filter_dropdown.html | 2 +- lms/templates/discussion/_new_post.html | 2 +- lms/templates/discussion/_single_thread.html | 1 + .../discussion/_thread_list_template.html | 9 +++++++- 5 files changed, 32 insertions(+), 4 deletions(-) diff --git a/lms/static/sass/_discussion.scss b/lms/static/sass/_discussion.scss index 809c968fe6..9148421e4c 100644 --- a/lms/static/sass/_discussion.scss +++ b/lms/static/sass/_discussion.scss @@ -181,7 +181,7 @@ body.discussion { .drop-arrow { float: right; color: #999; - line-height: 36px; + line-height: 37px; } } @@ -1020,6 +1020,18 @@ body.discussion { } } + .group-filter-label { + width: 40px; + margin-left:10px; + } + + .group-filter-select { + margin: 5px 0px 5px 5px; + width: 80px; + font-size:10px; + background: transparent; + border-color: #ccc; + } } .post-list-wrapper { @@ -1327,6 +1339,8 @@ body.discussion { margin-left: 40px; } + + .post-tools { @include clearfix; margin-top: 15px; @@ -1357,6 +1371,12 @@ body.discussion { margin-bottom: 20px; } + .group-visibility-label { + font-size: 12px; + color:#ddd; + font-style: italic; + } + .responses { list-style: none; margin-top: 40px; diff --git a/lms/templates/discussion/_filter_dropdown.html b/lms/templates/discussion/_filter_dropdown.html index 484ee05101..8272fdd062 100644 --- a/lms/templates/discussion/_filter_dropdown.html +++ b/lms/templates/discussion/_filter_dropdown.html @@ -30,7 +30,7 @@ + Show: + +
diff --git a/lms/templates/discussion/_thread_list_template.html b/lms/templates/discussion/_thread_list_template.html index 48aef4debf..31943ef8ad 100644 --- a/lms/templates/discussion/_thread_list_template.html +++ b/lms/templates/discussion/_thread_list_template.html @@ -24,7 +24,6 @@ -
From 5bfd2c33b0ce96066a5b26befe57a7666e7776d0 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 29 Jan 2013 17:34:52 -0500 Subject: [PATCH 010/347] send cohort to post view context --- lms/djangoapps/django_comment_client/forum/views.py | 3 ++- lms/templates/discussion/_new_post.html | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 29000a225f..9737d59537 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -11,7 +11,7 @@ from django.contrib.auth.models import User from mitxmako.shortcuts import render_to_response, render_to_string from courseware.courses import get_course_with_access -from course_groups.cohorts import get_cohort_id +from course_groups.cohorts import get_cohort_id, get_course_cohorts from courseware.access import has_access from urllib import urlencode @@ -166,6 +166,7 @@ def forum_form_discussion(request, course_id): 'category_map': category_map, 'roles': saxutils.escape(json.dumps(utils.get_role_ids(course_id)), escapedict), 'is_moderator': cached_has_permission(request.user, "see_all_cohorts", course_id), + 'cohorts': get_course_cohorts } # print "start rendering.." return render_to_response('discussion/index.html', context) diff --git a/lms/templates/discussion/_new_post.html b/lms/templates/discussion/_new_post.html index 26c886c6ac..c733704d09 100644 --- a/lms/templates/discussion/_new_post.html +++ b/lms/templates/discussion/_new_post.html @@ -45,13 +45,15 @@ %elif course.metadata.get("allow_anonymous_to_peers", False): %endif - % if true: + % if is_moderator:
Make visible to:
%endif From 1fc26de945e97b736e4e837b8ada57a5ba661114 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 30 Jan 2013 15:19:43 -0500 Subject: [PATCH 011/347] merge master --- common/djangoapps/course_groups/cohorts.py | 3 ++- lms/djangoapps/django_comment_client/forum/views.py | 9 +++++++-- lms/templates/discussion/_new_post.html | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/common/djangoapps/course_groups/cohorts.py b/common/djangoapps/course_groups/cohorts.py index f84e18b214..5c8a1ca067 100644 --- a/common/djangoapps/course_groups/cohorts.py +++ b/common/djangoapps/course_groups/cohorts.py @@ -21,7 +21,8 @@ def is_course_cohorted(course_id): Raises: Http404 if the course doesn't exist. """ - return courses.get_course_by_id(course_id).is_cohorted + #return courses.get_course_by_id(course_id).is_cohorted + return True def get_cohort_id(user, course_id): diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 9737d59537..715cb575d4 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -117,6 +117,8 @@ def forum_form_discussion(request, course_id): Renders the main Discussion page, potentially filtered by a search query """ course = get_course_with_access(request.user, course_id, 'load') + print "\n\n\n\n\n****************************" + print course category_map = utils.get_discussion_category_map(course) try: @@ -165,10 +167,13 @@ def forum_form_discussion(request, course_id): 'course_id': course.id, 'category_map': category_map, 'roles': saxutils.escape(json.dumps(utils.get_role_ids(course_id)), escapedict), - 'is_moderator': cached_has_permission(request.user, "see_all_cohorts", course_id), - 'cohorts': get_course_cohorts + #'is_moderator': cached_has_permission(request.user, "see_all_cohorts", course_id), + 'is_moderator': True, + 'cohorts': get_course_cohorts(course_id) } # print "start rendering.." + print "\n\n\n\n\n\n*************************************" + print context return render_to_response('discussion/index.html', context) @login_required diff --git a/lms/templates/discussion/_new_post.html b/lms/templates/discussion/_new_post.html index c733704d09..3af63f9ea1 100644 --- a/lms/templates/discussion/_new_post.html +++ b/lms/templates/discussion/_new_post.html @@ -45,7 +45,7 @@ %elif course.metadata.get("allow_anonymous_to_peers", False): %endif - % if is_moderator: + %if is_moderator:
Make visible to: + +
+ Hints +
+
Suffixes:
+
%kMGTcmunp
+
Operations:
+
^ * / + - ()
+
Functions:
+
sin, cos, tan, sqrt, log10, log2, ln, arccos, arcsin, arctan, abs
+
Constants
+
e, pi
+ + +
+
+
+ + + + +
+ +% endif diff --git a/lms/templates/main_nonav.html b/lms/templates/main_nonav.html new file mode 100644 index 0000000000..f2b87ef348 --- /dev/null +++ b/lms/templates/main_nonav.html @@ -0,0 +1,46 @@ +<%namespace name='static' file='static_content.html'/> + + + + <%block name="title">edX + + + + + <%static:css group='application'/> + + <%static:js group='main_vendor'/> + <%block name="headextra"/> + + + + + + + + % if not course: + <%include file="google_analytics.html" /> + % endif + + + + + + +
+ ${self.body()} + <%block name="bodyextra"/> +
+ + + + <%static:js group='application'/> + <%static:js group='module-js'/> + + <%block name="js_extra"/> + + diff --git a/lms/urls.py b/lms/urls.py index f92b63aac2..2c5db07d00 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -217,6 +217,10 @@ if settings.COURSEWARE_ENABLED: url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/about$', 'courseware.views.course_about', name="about_course"), + # testcenter exam: + url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/testcenter_exam/(?P[^/]*)/(?P
[^/]*)/$', + 'courseware.views.testcenter_exam', name="testcenter_exam"), + #Inside the course url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/$', 'courseware.views.course_info', name="course_root"), From 5f538f078b4e7b02a3f328d114635971205267eb Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 30 Jan 2013 19:50:36 -0500 Subject: [PATCH 013/347] Pass flag through from LMS to grading controller --- .../open_ended_grading/peer_grading_service.py | 10 ++++++---- .../src/peer_grading/peer_grading_problem.coffee | 8 ++++++-- lms/templates/peer_grading/peer_grading_problem.html | 1 + 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/peer_grading_service.py b/lms/djangoapps/open_ended_grading/peer_grading_service.py index caa349125d..76f54bb12c 100644 --- a/lms/djangoapps/open_ended_grading/peer_grading_service.py +++ b/lms/djangoapps/open_ended_grading/peer_grading_service.py @@ -88,7 +88,7 @@ class PeerGradingService(GradingService): {'location': problem_location, 'grader_id': grader_id}) return json.dumps(self._render_rubric(response)) - def save_grade(self, location, grader_id, submission_id, score, feedback, submission_key, rubric_scores): + def save_grade(self, location, grader_id, submission_id, score, feedback, submission_key, rubric_scores, submission_flagged): data = {'grader_id' : grader_id, 'submission_id' : submission_id, 'score' : score, @@ -96,7 +96,8 @@ class PeerGradingService(GradingService): 'submission_key': submission_key, 'location': location, 'rubric_scores': rubric_scores, - 'rubric_scores_complete': True} + 'rubric_scores_complete': True, + 'submission_flagged' : submission_flagged} return self.post(self.save_grade_url, data) def is_student_calibrated(self, problem_location, grader_id): @@ -224,7 +225,7 @@ def save_grade(request, course_id): error: if there was an error in the submission, this is the error message """ _check_post(request) - required = set(['location', 'submission_id', 'submission_key', 'score', 'feedback', 'rubric_scores[]']) + required = set(['location', 'submission_id', 'submission_key', 'score', 'feedback', 'rubric_scores[]', 'submission_flagged']) success, message = _check_required(request, required) if not success: return _err_response(message) @@ -236,9 +237,10 @@ def save_grade(request, course_id): feedback = p['feedback'] submission_key = p['submission_key'] rubric_scores = p.getlist('rubric_scores[]') + submission_flagged = p['submission_flagged'] try: response = peer_grading_service().save_grade(location, grader_id, submission_id, - score, feedback, submission_key, rubric_scores) + score, feedback, submission_key, rubric_scores, submission_flagged) return HttpResponse(response, mimetype="application/json") except GradingServiceError: log.exception("""Error saving grade. server url: {0}, location: {1}, submission_id:{2}, diff --git a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee index c4b87eb30e..ab16b34d12 100644 --- a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee +++ b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee @@ -175,6 +175,7 @@ class PeerGradingProblem @submission_container = $('.submission-container') @prompt_container = $('.prompt-container') @rubric_container = $('.rubric-container') + @flag_student_container = $('.flag-student-container') @calibration_panel = $('.calibration-panel') @grading_panel = $('.grading-panel') @content_panel = $('.content-panel') @@ -201,6 +202,7 @@ class PeerGradingProblem @action_button = $('.action-button') @calibration_feedback_button = $('.calibration-feedback-button') @interstitial_page_button = $('.interstitial-page-button') + @flag_student_checkbox = $('.flag-checkbox') Collapsible.setCollapsibles(@content_panel) @@ -252,7 +254,8 @@ class PeerGradingProblem location: @location submission_id: @essay_id_input.val() submission_key: @submission_key_input.val() - feedback: @feedback_area.val() + feedback: @feedback_area.val() + submission_flagged: @flag_student_checkbox.is(':checked') return data @@ -352,7 +355,7 @@ class PeerGradingProblem @grading_panel.find('.calibration-text').show() @calibration_panel.find('.grading-text').hide() @grading_panel.find('.grading-text').hide() - + @flag_student_container.hide() @submit_button.unbind('click') @submit_button.click @submit_calibration_essay @@ -379,6 +382,7 @@ class PeerGradingProblem @grading_panel.find('.calibration-text').hide() @calibration_panel.find('.grading-text').show() @grading_panel.find('.grading-text').show() + @flag_student_container.show() @submit_button.unbind('click') @submit_button.click @submit_grade diff --git a/lms/templates/peer_grading/peer_grading_problem.html b/lms/templates/peer_grading/peer_grading_problem.html index cb9ed1c0fb..04ee7415ec 100644 --- a/lms/templates/peer_grading/peer_grading_problem.html +++ b/lms/templates/peer_grading/peer_grading_problem.html @@ -72,6 +72,7 @@

+

Flag this submission for review by course staff (use if the submission contains inappropriate content):

From 78696c62b8ae3268d5cd73eb6a6f6db2d987d7c5 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 30 Jan 2013 20:36:09 -0500 Subject: [PATCH 014/347] Work on open ended flagged problems --- .../controller_query_service.py | 20 +++++++ lms/djangoapps/open_ended_grading/views.py | 55 +++++++++++++++++++ .../open_ended_flagged_problems.html | 52 ++++++++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 lms/templates/open_ended_problems/open_ended_flagged_problems.html diff --git a/lms/djangoapps/open_ended_grading/controller_query_service.py b/lms/djangoapps/open_ended_grading/controller_query_service.py index 7d515e2475..7c75d44287 100644 --- a/lms/djangoapps/open_ended_grading/controller_query_service.py +++ b/lms/djangoapps/open_ended_grading/controller_query_service.py @@ -21,6 +21,8 @@ class ControllerQueryService(GradingService): self.is_unique_url = self.url + '/is_name_unique/' self.combined_notifications_url = self.url + '/combined_notifications/' self.grading_status_list_url = self.url + '/get_grading_status_list/' + self.flagged_problem_list_url = self.url + '/get_flagged_problem_list/' + self.take_action_on_flags_url = self.url + '/take_action_on_flags/' def check_if_name_is_unique(self, location, problem_id, course_id): params = { @@ -57,3 +59,21 @@ class ControllerQueryService(GradingService): response = self.get(self.grading_status_list_url, params) return response + + def get_flagged_problem_list(self, course_id): + params = { + 'course_id' : course_id, + } + + response = self.get(self.flagged_problem_list_url, params) + return response + + def take_action_on_flags(self, course_id, student_id, submission_id): + params = { + 'course_id' : course_id, + 'student_id' : student_id, + 'submission_id' : submission_id, + } + + response = self.post(self.take_action_on_flags_url, params) + return response diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 2ebd8778e6..fd43921761 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -193,6 +193,61 @@ def student_problem_list(request, course_id): # Checked above 'staff_access': False, }) +@cache_control(no_cache=True, no_store=True, must_revalidate=True) +def flagged_problem_list(request, course_id): + ''' + Show a student problem list + ''' + course = get_course_with_access(request.user, course_id, 'staff') + student_id = unique_id_for_user(request.user) + + # call problem list service + success = False + error_text = "" + problem_list = [] + base_course_url = reverse('courses') + + try: + problem_list_json = controller_qs.get_grading_status_list(course_id, unique_id_for_user(request.user)) + problem_list_dict = json.loads(problem_list_json) + success = problem_list_dict['success'] + if 'error' in problem_list_dict: + error_text = problem_list_dict['error'] + + problem_list = problem_list_dict['problem_list'] + + for i in xrange(0,len(problem_list)): + problem_url_parts = search.path_to_location(modulestore(), course.id, problem_list[i]['location']) + problem_url = base_course_url + "/" + for z in xrange(0,len(problem_url_parts)): + part = problem_url_parts[z] + if part is not None: + if z==1: + problem_url += "courseware/" + problem_url += part + "/" + + problem_list[i].update({'actual_url' : problem_url}) + + except GradingServiceError: + error_text = "Error occured while contacting the grading service" + success = False + # catch error if if the json loads fails + except ValueError: + error_text = "Could not get problem list" + success = False + + ajax_url = _reverse_with_slash('open_ended_problems', course_id) + + return render_to_response('open_ended_problems/open_ended_problems.html', { + 'course': course, + 'course_id': course_id, + 'ajax_url': ajax_url, + 'success': success, + 'problem_list': problem_list, + 'error_text': error_text, + # Checked above + 'staff_access': False, }) + @cache_control(no_cache=True, no_store=True, must_revalidate=True) def combined_notifications(request, course_id): course = get_course_with_access(request.user, course_id, 'load') diff --git a/lms/templates/open_ended_problems/open_ended_flagged_problems.html b/lms/templates/open_ended_problems/open_ended_flagged_problems.html new file mode 100644 index 0000000000..447a34ff45 --- /dev/null +++ b/lms/templates/open_ended_problems/open_ended_flagged_problems.html @@ -0,0 +1,52 @@ +<%inherit file="/main.html" /> +<%block name="bodyclass">${course.css_class} +<%namespace name='static' file='/static_content.html'/> + +<%block name="headextra"> +<%static:css group='course'/> + + +<%block name="title">${course.number} Flagged Open Ended Problems + +<%include file="/courseware/course_navigation.html" args="active_page='flagged_open_ended_problems'" /> + +
+
+
${error_text}
+

Flagged Open Ended Problems

+

Instructions

+

Here are a list of open ended problems for this course that have been flagged by students as potentially inappropriate.

+ % if success: + % if len(flagged_list) == 0: +
+ No flagged problems exist. +
+ %else: + + + + + + + + %for problem in problem_list: + + + + + + + %endfor +
Problem NameStudent IDStudent ResponseSubmission ID
+ ${problem['problem_name']} + + ${problem['student_id']} + + ${problem['student_response']} + + ${problem['submission_id']} +
+ %endif + %endif +
+
From dd72297f73ed9af5e22a8703709a25cd53bb74e6 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 30 Jan 2013 20:39:53 -0500 Subject: [PATCH 015/347] Wire up flagged problem list --- lms/djangoapps/open_ended_grading/views.py | 21 ++++--------------- .../open_ended_flagged_problems.html | 2 +- lms/urls.py | 4 ++++ 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index fd43921761..6a4131dc6f 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -208,25 +208,13 @@ def flagged_problem_list(request, course_id): base_course_url = reverse('courses') try: - problem_list_json = controller_qs.get_grading_status_list(course_id, unique_id_for_user(request.user)) + problem_list_json = controller_qs.get_flagged_problem_list(course_id) problem_list_dict = json.loads(problem_list_json) success = problem_list_dict['success'] if 'error' in problem_list_dict: error_text = problem_list_dict['error'] - problem_list = problem_list_dict['problem_list'] - - for i in xrange(0,len(problem_list)): - problem_url_parts = search.path_to_location(modulestore(), course.id, problem_list[i]['location']) - problem_url = base_course_url + "/" - for z in xrange(0,len(problem_url_parts)): - part = problem_url_parts[z] - if part is not None: - if z==1: - problem_url += "courseware/" - problem_url += part + "/" - - problem_list[i].update({'actual_url' : problem_url}) + problem_list = problem_list_dict['flagged_submissions'] except GradingServiceError: error_text = "Error occured while contacting the grading service" @@ -238,7 +226,7 @@ def flagged_problem_list(request, course_id): ajax_url = _reverse_with_slash('open_ended_problems', course_id) - return render_to_response('open_ended_problems/open_ended_problems.html', { + return render_to_response('open_ended_problems/open_ended_flagged_problems.html', { 'course': course, 'course_id': course_id, 'ajax_url': ajax_url, @@ -246,14 +234,13 @@ def flagged_problem_list(request, course_id): 'problem_list': problem_list, 'error_text': error_text, # Checked above - 'staff_access': False, }) + 'staff_access': True, }) @cache_control(no_cache=True, no_store=True, must_revalidate=True) def combined_notifications(request, course_id): course = get_course_with_access(request.user, course_id, 'load') user = request.user notifications = open_ended_notifications.combined_notifications(course, user) - log.debug(notifications) response = notifications['response'] notification_tuples=open_ended_notifications.NOTIFICATION_TYPES diff --git a/lms/templates/open_ended_problems/open_ended_flagged_problems.html b/lms/templates/open_ended_problems/open_ended_flagged_problems.html index 447a34ff45..054c028071 100644 --- a/lms/templates/open_ended_problems/open_ended_flagged_problems.html +++ b/lms/templates/open_ended_problems/open_ended_flagged_problems.html @@ -8,7 +8,7 @@ <%block name="title">${course.number} Flagged Open Ended Problems -<%include file="/courseware/course_navigation.html" args="active_page='flagged_open_ended_problems'" /> +<%include file="/courseware/course_navigation.html" args="active_page='open_ended_flagged_problems'" />
diff --git a/lms/urls.py b/lms/urls.py index 4b3cc94cab..f122635821 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -285,6 +285,10 @@ if settings.COURSEWARE_ENABLED: # Open Ended problem list url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/open_ended_problems$', 'open_ended_grading.views.student_problem_list', name='open_ended_problems'), + + # Open Ended flagged problem list + url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/open_ended_flagged_problems$', + 'open_ended_grading.views.flagged_problem_list', name='open_ended_flagged_problems'), # Cohorts management url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/cohorts$', From b6f77f6f8e8f1ba5d2cab867d50b7baf3e7e9334 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 30 Jan 2013 20:43:57 -0500 Subject: [PATCH 016/347] Fix rendering for flagged problems view --- .../open_ended_problems/open_ended_flagged_problems.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lms/templates/open_ended_problems/open_ended_flagged_problems.html b/lms/templates/open_ended_problems/open_ended_flagged_problems.html index 054c028071..bf70906637 100644 --- a/lms/templates/open_ended_problems/open_ended_flagged_problems.html +++ b/lms/templates/open_ended_problems/open_ended_flagged_problems.html @@ -28,6 +28,7 @@ Student ID Student Response Submission ID + Location %for problem in problem_list: @@ -43,6 +44,9 @@ ${problem['submission_id']} + + ${problem['location']} + %endfor From e89196e0dd89bed02de4b153c74e7426088de2c0 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 30 Jan 2013 20:47:00 -0500 Subject: [PATCH 017/347] Add in flagged problem list return --- lms/djangoapps/open_ended_grading/views.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 6a4131dc6f..f1a9d41974 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -158,8 +158,9 @@ def student_problem_list(request, course_id): success = problem_list_dict['success'] if 'error' in problem_list_dict: error_text = problem_list_dict['error'] - - problem_list = problem_list_dict['problem_list'] + problem_list = [] + else: + problem_list = problem_list_dict['problem_list'] for i in xrange(0,len(problem_list)): problem_url_parts = search.path_to_location(modulestore(), course.id, problem_list[i]['location']) @@ -213,8 +214,9 @@ def flagged_problem_list(request, course_id): success = problem_list_dict['success'] if 'error' in problem_list_dict: error_text = problem_list_dict['error'] - - problem_list = problem_list_dict['flagged_submissions'] + problem_list=[] + else: + problem_list = problem_list_dict['flagged_submissions'] except GradingServiceError: error_text = "Error occured while contacting the grading service" From f89e36b5b9bd7fc21fa26f636635f39804c0019e Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 30 Jan 2013 20:54:02 -0500 Subject: [PATCH 018/347] Flagged list renders properly --- .../open_ended_flagged_problems.html | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lms/templates/open_ended_problems/open_ended_flagged_problems.html b/lms/templates/open_ended_problems/open_ended_flagged_problems.html index bf70906637..eb7b34d8e6 100644 --- a/lms/templates/open_ended_problems/open_ended_flagged_problems.html +++ b/lms/templates/open_ended_problems/open_ended_flagged_problems.html @@ -17,18 +17,17 @@

Instructions

Here are a list of open ended problems for this course that have been flagged by students as potentially inappropriate.

% if success: - % if len(flagged_list) == 0: + % if len(problem_list) == 0:
No flagged problems exist.
%else: - + - - - + + %for problem in problem_list: @@ -38,14 +37,11 @@ - %endfor From b248a0957254071c4b0db85cd1aaa0300fe74e8e Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 30 Jan 2013 21:06:54 -0500 Subject: [PATCH 019/347] Work on adding in ban actions --- .../controller_query_service.py | 4 ++- .../peer_grading_service.py | 2 +- lms/djangoapps/open_ended_grading/views.py | 27 +++++++++++++++++++ .../open_ended_flagged_problems.html | 16 +++++++---- 4 files changed, 42 insertions(+), 7 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/controller_query_service.py b/lms/djangoapps/open_ended_grading/controller_query_service.py index 7c75d44287..d40c9b4428 100644 --- a/lms/djangoapps/open_ended_grading/controller_query_service.py +++ b/lms/djangoapps/open_ended_grading/controller_query_service.py @@ -68,12 +68,14 @@ class ControllerQueryService(GradingService): response = self.get(self.flagged_problem_list_url, params) return response - def take_action_on_flags(self, course_id, student_id, submission_id): + def take_action_on_flags(self, course_id, student_id, submission_id, action_type): params = { 'course_id' : course_id, 'student_id' : student_id, 'submission_id' : submission_id, + 'action_type' : action_type } response = self.post(self.take_action_on_flags_url, params) return response + diff --git a/lms/djangoapps/open_ended_grading/peer_grading_service.py b/lms/djangoapps/open_ended_grading/peer_grading_service.py index 76f54bb12c..994ba0b2be 100644 --- a/lms/djangoapps/open_ended_grading/peer_grading_service.py +++ b/lms/djangoapps/open_ended_grading/peer_grading_service.py @@ -377,4 +377,4 @@ def save_calibration_essay(request, course_id): return HttpResponse(response, mimetype="application/json") except GradingServiceError: log.exception("Error saving calibration grade, location: {0}, submission_id: {1}, submission_key: {2}, grader_id: {3}".format(location, submission_id, submission_key, grader_id)) - return _err_response('Could not connect to grading service') + return _err_response('Could not connect to grading service') \ No newline at end of file diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index f1a9d41974..717a33ec61 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -287,5 +287,32 @@ def combined_notifications(request, course_id): return render_to_response('open_ended_problems/combined_notifications.html', combined_dict ) + +def take_action_on_flags(request, course_id): + """ + + """ + if request.method != 'POST': + raise Http404 + + + required = ['submission_id', 'action_type', 'student_id'] + for key in required: + if key not in request.POST: + return HttpResponse(json.dumps({'success': False, 'error': 'Missing key {0}'.format(key)}), + mimetype="application/json") + + p = request.POST + submission_id = p['submission_id'] + action_type = p['action_type'] + student_id = p['student_id'] + + try: + controller_qs = ControllerQueryService() + response = controller_qs.save_calibration_essay(course_id, student_id, course_id, action_type) + return HttpResponse(response, mimetype="application/json") + except GradingServiceError: + log.exception("Error saving calibration grade, location: {0}, submission_id: {1}, submission_key: {2}, grader_id: {3}".format(location, submission_id, submission_key, grader_id)) + return _err_response('Could not connect to grading service') diff --git a/lms/templates/open_ended_problems/open_ended_flagged_problems.html b/lms/templates/open_ended_problems/open_ended_flagged_problems.html index eb7b34d8e6..97f1e03c18 100644 --- a/lms/templates/open_ended_problems/open_ended_flagged_problems.html +++ b/lms/templates/open_ended_problems/open_ended_flagged_problems.html @@ -25,9 +25,9 @@
Problem NameName Student IDStudent ResponseSubmission IDLocationIDResponse
${problem['student_id']} - ${problem['student_response']} - ${problem['submission_id']} - ${problem['location']} + ${problem['student_response']}
- - + + %for problem in problem_list: @@ -35,13 +35,19 @@ ${problem['problem_name']} + + - %endfor From 17fce100bb0a41e43a2c8aed6127c9f3e7cb0ed3 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 30 Jan 2013 21:10:48 -0500 Subject: [PATCH 020/347] Add in ban actions to table --- lms/djangoapps/open_ended_grading/views.py | 2 +- .../open_ended_problems/open_ended_flagged_problems.html | 8 ++++---- lms/urls.py | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 717a33ec61..aaee9f4c98 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -309,7 +309,7 @@ def take_action_on_flags(request, course_id): try: controller_qs = ControllerQueryService() - response = controller_qs.save_calibration_essay(course_id, student_id, course_id, action_type) + response = controller_qs.take_action_on_flags(course_id, student_id, course_id, action_type) return HttpResponse(response, mimetype="application/json") except GradingServiceError: log.exception("Error saving calibration grade, location: {0}, submission_id: {1}, submission_key: {2}, grader_id: {3}".format(location, submission_id, submission_key, grader_id)) diff --git a/lms/templates/open_ended_problems/open_ended_flagged_problems.html b/lms/templates/open_ended_problems/open_ended_flagged_problems.html index 97f1e03c18..2397e1a70e 100644 --- a/lms/templates/open_ended_problems/open_ended_flagged_problems.html +++ b/lms/templates/open_ended_problems/open_ended_flagged_problems.html @@ -26,8 +26,8 @@ - - + + %for problem in problem_list: @@ -38,10 +38,10 @@ ${problem['student_response']} + From f3f509da3b7a63b9d5a14939c02f9a9780104337 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 31 Jan 2013 12:45:48 -0500 Subject: [PATCH 032/347] Fix input area styling --- .../xmodule/xmodule/css/combinedopenended/display.scss | 5 +++-- .../xmodule/js/src/combinedopenended/display.coffee | 2 +- lms/static/coffee/src/open_ended/open_ended.coffee | 9 +++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/common/lib/xmodule/xmodule/css/combinedopenended/display.scss b/common/lib/xmodule/xmodule/css/combinedopenended/display.scss index 41896e6173..38fd6ba01c 100644 --- a/common/lib/xmodule/xmodule/css/combinedopenended/display.scss +++ b/common/lib/xmodule/xmodule/css/combinedopenended/display.scss @@ -442,12 +442,13 @@ section.open-ended-child { margin: 10px; } - span.short-form-response { - padding: 9px; + div.short-form-response { background: #F6F6F6; border: 1px solid #ddd; border-top: 0; margin-bottom: 20px; + overflow-y: auto; + height: 200px; @include clearfix; } diff --git a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee index 2aabd35771..89954deb23 100644 --- a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee @@ -351,5 +351,5 @@ class @CombinedOpenEnded answer_id = @answer_area.attr('id') answer_val = @answer_area.val() new_text = '' - new_text = "#{answer_val}" + new_text = "
#{answer_val}
" @answer_area.replaceWith(new_text) diff --git a/lms/static/coffee/src/open_ended/open_ended.coffee b/lms/static/coffee/src/open_ended/open_ended.coffee index 558d712c46..aff1e5fc67 100644 --- a/lms/static/coffee/src/open_ended/open_ended.coffee +++ b/lms/static/coffee/src/open_ended/open_ended.coffee @@ -44,13 +44,14 @@ class OpenEnded .error => callback({success: false, error: "Error occured while performing this operation"}) after_action_wrapper: (target, action_type) -> + tr_parent = target.parent().parent() + tr_children = tr_parent.children() + action_taken = tr_children[4].firstElementChild + action_taken.innerText = "#{action_type} done for student." return @handle_after_action handle_after_action: (data) -> - tr_parent = target.parent().parent() - tr_children = tr_parent.children() - action_taken = tr_children[4].children()[0] - action_taken.replaceWith('
#{action_type} done for student.
') + blah = "blah" gentle_alert: (msg) => if $('.message-container').length From 309ac7aa5c1f217f0f5b85cbbbeba0938e4e0268 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Thu, 31 Jan 2013 13:27:46 -0500 Subject: [PATCH 033/347] Refactor rubric CSS into a single file. --- .../css/combinedopenended/display.scss | 41 --------------- lms/static/sass/course.scss | 1 + lms/static/sass/course/_rubric.scss | 52 +++++++++++++++++++ lms/static/sass/course/_staff_grading.scss | 47 +---------------- 4 files changed, 54 insertions(+), 87 deletions(-) create mode 100644 lms/static/sass/course/_rubric.scss diff --git a/common/lib/xmodule/xmodule/css/combinedopenended/display.scss b/common/lib/xmodule/xmodule/css/combinedopenended/display.scss index a4045c9dad..1917471879 100644 --- a/common/lib/xmodule/xmodule/css/combinedopenended/display.scss +++ b/common/lib/xmodule/xmodule/css/combinedopenended/display.scss @@ -231,47 +231,6 @@ div.result-container { } } -div.result-container, section.open-ended-child { - .rubric { - margin-bottom:25px; - tr { - margin:10px 0px; - height: 100%; - } - td { - padding: 20px 0px 25px 0px; - margin: 10px 0px; - height: 100%; - } - th { - padding: 5px; - margin: 5px; - } - label, - .view-only { - margin:2px; - position: relative; - padding: 10px 15px 25px 15px; - width: 145px; - height:100%; - display: inline-block; - min-height: 50px; - min-width: 50px; - background-color: #CCC; - font-size: .85em; - } - .grade { - position: absolute; - bottom:0px; - right:0px; - margin:10px; - } - .selected-grade { - background: #666; - color: white; - } - } -} section.open-ended-child { @media print { diff --git a/lms/static/sass/course.scss b/lms/static/sass/course.scss index e900e589b2..d5f620be82 100644 --- a/lms/static/sass/course.scss +++ b/lms/static/sass/course.scss @@ -44,6 +44,7 @@ @import "course/gradebook"; @import "course/tabs"; @import "course/staff_grading"; +@import "course/rubric"; // instructor @import "course/instructor/instructor"; diff --git a/lms/static/sass/course/_rubric.scss b/lms/static/sass/course/_rubric.scss new file mode 100644 index 0000000000..c82d929fac --- /dev/null +++ b/lms/static/sass/course/_rubric.scss @@ -0,0 +1,52 @@ +.rubric { + padding: 40px 0px; + tr { + margin:10px 0px; + height: 100%; + } + td { + padding: 20px 0px 25px 0px; + height: 100%; + border: 1px black solid; + } + th { + padding: 5px; + margin: 5px; + text-align: center; + } + .points-header th { + padding: 0px; + } + label, + .view-only { + margin:2px; + position: relative; + padding: 15px 15px 25px 15px; + width: 130px; + height:100%; + min-height: 50px; + min-width: 50px; + font-size: .9em; + background-color: white; + display: block; + } + .grade { + position: absolute; + bottom:0px; + right:0px; + margin:10px; + } + .selected-grade { + background: #666; + color: white; + } + input[type=radio]:checked + label { + background: #666; + color: white; } + input[class='score-selection'] { + position: relative; + margin-left: 10px; + font-size: 16px; + } +} + diff --git a/lms/static/sass/course/_staff_grading.scss b/lms/static/sass/course/_staff_grading.scss index 177bd9e5e2..4d4da484de 100644 --- a/lms/static/sass/course/_staff_grading.scss +++ b/lms/static/sass/course/_staff_grading.scss @@ -12,7 +12,7 @@ div.peer-grading{ label { margin: 10px; padding: 5px; - display: inline-block; + @include inline-block; min-width: 50px; background-color: #CCC; text-size: 1.5em; @@ -176,49 +176,4 @@ div.peer-grading{ } } padding: 40px; - .rubric { - tr { - margin:10px 0px; - height: 100%; - } - td { - padding: 20px 0px 25px 0px; - height: 100%; - } - th { - padding: 5px; - margin: 5px; - } - label, - .view-only { - margin:2px; - position: relative; - padding: 15px 15px 25px 15px; - width: 150px; - height:100%; - display: inline-block; - min-height: 50px; - min-width: 50px; - background-color: #CCC; - font-size: .9em; - } - .grade { - position: absolute; - bottom:0px; - right:0px; - margin:10px; - } - .selected-grade { - background: #666; - color: white; - } - input[type=radio]:checked + label { - background: #666; - color: white; } - input[class='score-selection'] { - display: none; - } - } - } - From 683976d7adf4eebedd84894d79b13572072f8dfb Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Thu, 31 Jan 2013 13:28:19 -0500 Subject: [PATCH 034/347] Add scores to the top of the rubric, remove from individual cells --- common/lib/xmodule/xmodule/combined_open_ended_rubric.py | 5 ++++- lms/templates/open_ended_rubric.html | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_rubric.py b/common/lib/xmodule/xmodule/combined_open_ended_rubric.py index 4380e32d5b..50ec22f033 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_rubric.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_rubric.py @@ -25,10 +25,13 @@ class CombinedOpenEndedRubric(object): ''' try: rubric_categories = self.extract_categories(rubric_xml) + max_scores = map((lambda cat: cat['options'][-1]['points']), rubric_categories) + max_score = max(max_scores) html = self.system.render_template('open_ended_rubric.html', {'categories' : rubric_categories, 'has_score': self.has_score, - 'view_only': self.view_only}) + 'view_only': self.view_only, + 'max_score': max_score}) except: raise RubricParsingError("[render_rubric] Could not parse the rubric with xml: {0}".format(rubric_xml)) return html diff --git a/lms/templates/open_ended_rubric.html b/lms/templates/open_ended_rubric.html index 8d40c7d2b8..b92ad04bde 100644 --- a/lms/templates/open_ended_rubric.html +++ b/lms/templates/open_ended_rubric.html @@ -8,6 +8,14 @@

Select the criteria you feel best represents this submission in each category.

% endif
NameStudent IDID ResponseUnflagBan
- ${problem['student_id']} + ${problem['student_response']} + + + + ${problem['submission_id']} - ${problem['student_response']} + + ${problem['student_id']}
Name ResponseUnflagBan
- + Unflag - + Ban ${problem['submission_id']} diff --git a/lms/urls.py b/lms/urls.py index f122635821..41e8e9fff1 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -287,6 +287,8 @@ if settings.COURSEWARE_ENABLED: 'open_ended_grading.views.student_problem_list', name='open_ended_problems'), # Open Ended flagged problem list + url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/open_ended_flagged_problems$', + 'open_ended_grading.views.flagged_problem_list', name='open_ended_flagged_problems'), url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/open_ended_flagged_problems$', 'open_ended_grading.views.flagged_problem_list', name='open_ended_flagged_problems'), From 4c164795691c126ef3d08d5be0e7cba04cfabd0d Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 30 Jan 2013 21:22:59 -0500 Subject: [PATCH 021/347] Working on frontend JS for posting --- lms/djangoapps/open_ended_grading/views.py | 2 +- .../coffee/src/open_ended/open_ended.coffee | 33 +++++++++++++++++++ .../open_ended_flagged_problems.html | 8 +++-- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 lms/static/coffee/src/open_ended/open_ended.coffee diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index aaee9f4c98..137cff7803 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -309,7 +309,7 @@ def take_action_on_flags(request, course_id): try: controller_qs = ControllerQueryService() - response = controller_qs.take_action_on_flags(course_id, student_id, course_id, action_type) + response = controller_qs.take_action_on_flags(course_id, student_id, submission_id, action_type) return HttpResponse(response, mimetype="application/json") except GradingServiceError: log.exception("Error saving calibration grade, location: {0}, submission_id: {1}, submission_key: {2}, grader_id: {3}".format(location, submission_id, submission_key, grader_id)) diff --git a/lms/static/coffee/src/open_ended/open_ended.coffee b/lms/static/coffee/src/open_ended/open_ended.coffee new file mode 100644 index 0000000000..f45efeb8a7 --- /dev/null +++ b/lms/static/coffee/src/open_ended/open_ended.coffee @@ -0,0 +1,33 @@ +# This is a simple class that just hides the error container +# and message container when they are empty +# Can (and should be) expanded upon when our problem list +# becomes more sophisticated +class OpenEnded + constructor: (ajax_url) -> + @ajax_url = ajax_url + @error_container = $('.error-container') + @error_container.toggle(not @error_container.is(':empty')) + + @message_container = $('.message-container') + @message_container.toggle(not @message_container.is(':empty')) + + @problem_list = $('.problem-list') + + @ban_button = $('.ban-button') + @unflag_button = $('.unflag-button') + @ban_button.click @ban + @unflag_button.click @unflag + + unflag: (event) => + event.preventDefault() + + ban: (event) => + event.preventDefault() + + post: (cmd, data, callback) -> + # if this post request fails, the error callback will catch it + $.post(@ajax_url + cmd, data, callback) + .error => callback({success: false, error: "Error occured while performing this operation"}) + +ajax_url = $('.open-ended-problems').data('ajax_url') +$(document).ready(() -> new OpenEnded(ajax_url)) diff --git a/lms/templates/open_ended_problems/open_ended_flagged_problems.html b/lms/templates/open_ended_problems/open_ended_flagged_problems.html index 2397e1a70e..9265ad4663 100644 --- a/lms/templates/open_ended_problems/open_ended_flagged_problems.html +++ b/lms/templates/open_ended_problems/open_ended_flagged_problems.html @@ -10,6 +10,10 @@ <%include file="/courseware/course_navigation.html" args="active_page='open_ended_flagged_problems'" /> +<%block name="js_extra"> + <%static:js group='open_ended'/> + +
${error_text}
@@ -38,10 +42,10 @@ ${problem['student_response']}
- Unflag + Unflag - Ban + Ban ${problem['submission_id']} From 10c7155d4d061d51eee8572a4a5b6fd5f1da03eb Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 30 Jan 2013 21:28:42 -0500 Subject: [PATCH 022/347] Add open ended to JS pipeline --- lms/envs/common.py | 7 ++++++- lms/static/coffee/src/open_ended/open_ended.coffee | 9 +++++++++ lms/urls.py | 4 ++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lms/envs/common.py b/lms/envs/common.py index 16472795e0..426c29c7d0 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -438,6 +438,7 @@ main_vendor_js = [ discussion_js = sorted(rooted_glob(PROJECT_ROOT / 'static', 'coffee/src/discussion/**/*.coffee')) staff_grading_js = sorted(rooted_glob(PROJECT_ROOT / 'static', 'coffee/src/staff_grading/**/*.coffee')) peer_grading_js = sorted(rooted_glob(PROJECT_ROOT / 'static','coffee/src/peer_grading/**/*.coffee')) +open_ended_js = sorted(rooted_glob(PROJECT_ROOT / 'static','coffee/src/open_ended/**/*.coffee')) PIPELINE_CSS = { 'application': { @@ -468,7 +469,7 @@ PIPELINE_JS = { 'source_filenames': sorted( set(rooted_glob(COMMON_ROOT / 'static', 'coffee/src/**/*.coffee') + rooted_glob(PROJECT_ROOT / 'static', 'coffee/src/**/*.coffee')) - - set(courseware_js + discussion_js + staff_grading_js + peer_grading_js) + set(courseware_js + discussion_js + staff_grading_js + peer_grading_js + open_ended_js) ) + [ 'js/form.ext.js', 'js/my_courses_dropdown.js', @@ -501,6 +502,10 @@ PIPELINE_JS = { 'peer_grading' : { 'source_filenames': peer_grading_js, 'output_filename': 'js/peer_grading.js' + }, + 'open_ended' : { + 'source_filenames': open_ended_js, + 'output_filename': 'js/open_ended.js' } } diff --git a/lms/static/coffee/src/open_ended/open_ended.coffee b/lms/static/coffee/src/open_ended/open_ended.coffee index f45efeb8a7..5c0f455ce7 100644 --- a/lms/static/coffee/src/open_ended/open_ended.coffee +++ b/lms/static/coffee/src/open_ended/open_ended.coffee @@ -20,14 +20,23 @@ class OpenEnded unflag: (event) => event.preventDefault() + @gentle_alert "Unflag" ban: (event) => event.preventDefault() + @gentle_alert "Ban" post: (cmd, data, callback) -> # if this post request fails, the error callback will catch it $.post(@ajax_url + cmd, data, callback) .error => callback({success: false, error: "Error occured while performing this operation"}) + gentle_alert: (msg) => + if $('.message-container').length + $('.message-container').remove() + alert_elem = "
" + msg + "
" + $('.error-container').after(alert_elem) + $('.message-container').css(opacity: 0).animate(opacity: 1, 700) + ajax_url = $('.open-ended-problems').data('ajax_url') $(document).ready(() -> new OpenEnded(ajax_url)) diff --git a/lms/urls.py b/lms/urls.py index 41e8e9fff1..260f55dd05 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -289,8 +289,8 @@ if settings.COURSEWARE_ENABLED: # Open Ended flagged problem list url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/open_ended_flagged_problems$', 'open_ended_grading.views.flagged_problem_list', name='open_ended_flagged_problems'), - url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/open_ended_flagged_problems$', - 'open_ended_grading.views.flagged_problem_list', name='open_ended_flagged_problems'), + url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/open_ended_flagged_problems/take_action_on_flag$', + 'open_ended_grading.views.take_action_on_flags', name='open_ended_flagged_problems_take_action'), # Cohorts management url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/cohorts$', From 8e9ec501a777a374491db1c48b5cd5a8c461df24 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 30 Jan 2013 21:44:21 -0500 Subject: [PATCH 023/347] Implement flagging, fix urls --- lms/djangoapps/open_ended_grading/views.py | 3 +-- lms/static/coffee/src/open_ended/open_ended.coffee | 11 ++++++++++- lms/urls.py | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 137cff7803..a0ef8239f3 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -226,7 +226,7 @@ def flagged_problem_list(request, course_id): error_text = "Could not get problem list" success = False - ajax_url = _reverse_with_slash('open_ended_problems', course_id) + ajax_url = _reverse_with_slash('open_ended_flagged_problems', course_id) return render_to_response('open_ended_problems/open_ended_flagged_problems.html', { 'course': course, @@ -308,7 +308,6 @@ def take_action_on_flags(request, course_id): student_id = p['student_id'] try: - controller_qs = ControllerQueryService() response = controller_qs.take_action_on_flags(course_id, student_id, submission_id, action_type) return HttpResponse(response, mimetype="application/json") except GradingServiceError: diff --git a/lms/static/coffee/src/open_ended/open_ended.coffee b/lms/static/coffee/src/open_ended/open_ended.coffee index 5c0f455ce7..07b84c8af5 100644 --- a/lms/static/coffee/src/open_ended/open_ended.coffee +++ b/lms/static/coffee/src/open_ended/open_ended.coffee @@ -24,13 +24,22 @@ class OpenEnded ban: (event) => event.preventDefault() - @gentle_alert "Ban" + parent_tr = $(event.target).parent().parent() + tr_children = parent_tr.children() + action_type = "ban" + submission_id = tr_children[4].innerText + student_id = tr_children[5].innerText + @gentle_alert student_id + @post('take_action_on_flags', {'submission_id' : submission_id, 'student_id' : student_id, 'action_type' : action_type}, @handle_after_action) post: (cmd, data, callback) -> # if this post request fails, the error callback will catch it $.post(@ajax_url + cmd, data, callback) .error => callback({success: false, error: "Error occured while performing this operation"}) + handle_after_action: (data) -> + @gentle_alert data + gentle_alert: (msg) => if $('.message-container').length $('.message-container').remove() diff --git a/lms/urls.py b/lms/urls.py index 260f55dd05..e4494e0166 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -289,7 +289,7 @@ if settings.COURSEWARE_ENABLED: # Open Ended flagged problem list url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/open_ended_flagged_problems$', 'open_ended_grading.views.flagged_problem_list', name='open_ended_flagged_problems'), - url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/open_ended_flagged_problems/take_action_on_flag$', + url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/open_ended_flagged_problems/take_action_on_flags$', 'open_ended_grading.views.take_action_on_flags', name='open_ended_flagged_problems_take_action'), # Cohorts management From b4c80da22498f36aa6da563e96f0fef5e34dbd2d Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 30 Jan 2013 21:50:24 -0500 Subject: [PATCH 024/347] Trim whitespace --- lms/djangoapps/open_ended_grading/views.py | 6 +++++- lms/static/coffee/src/open_ended/open_ended.coffee | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index a0ef8239f3..984c544d93 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -25,6 +25,8 @@ import open_ended_notifications from xmodule.modulestore.django import modulestore from xmodule.modulestore import search +from django.http import HttpResponse, Http404 + log = logging.getLogger(__name__) template_imports = {'urllib': urllib} @@ -306,7 +308,9 @@ def take_action_on_flags(request, course_id): submission_id = p['submission_id'] action_type = p['action_type'] student_id = p['student_id'] - + student_id = student_id.strip(' \t\n\r') + submission_id = submission_id.strip(' \t\n\r') + action_type = action_type.lower().strip(' \t\n\r') try: response = controller_qs.take_action_on_flags(course_id, student_id, submission_id, action_type) return HttpResponse(response, mimetype="application/json") diff --git a/lms/static/coffee/src/open_ended/open_ended.coffee b/lms/static/coffee/src/open_ended/open_ended.coffee index 07b84c8af5..e54198e2aa 100644 --- a/lms/static/coffee/src/open_ended/open_ended.coffee +++ b/lms/static/coffee/src/open_ended/open_ended.coffee @@ -29,7 +29,6 @@ class OpenEnded action_type = "ban" submission_id = tr_children[4].innerText student_id = tr_children[5].innerText - @gentle_alert student_id @post('take_action_on_flags', {'submission_id' : submission_id, 'student_id' : student_id, 'action_type' : action_type}, @handle_after_action) post: (cmd, data, callback) -> From 2affd4760bef18906c858451dcaa8b80af688485 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 30 Jan 2013 21:53:33 -0500 Subject: [PATCH 025/347] Add in wiring for unflag action --- lms/static/coffee/src/open_ended/open_ended.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lms/static/coffee/src/open_ended/open_ended.coffee b/lms/static/coffee/src/open_ended/open_ended.coffee index e54198e2aa..227cf2fd76 100644 --- a/lms/static/coffee/src/open_ended/open_ended.coffee +++ b/lms/static/coffee/src/open_ended/open_ended.coffee @@ -20,7 +20,12 @@ class OpenEnded unflag: (event) => event.preventDefault() - @gentle_alert "Unflag" + parent_tr = $(event.target).parent().parent() + tr_children = parent_tr.children() + action_type = "unflag" + submission_id = tr_children[4].innerText + student_id = tr_children[5].innerText + @post('take_action_on_flags', {'submission_id' : submission_id, 'student_id' : student_id, 'action_type' : action_type}, @handle_after_action) ban: (event) => event.preventDefault() From b0e46085586524caf67b7c76b8907ee23403388d Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Wed, 30 Jan 2013 21:56:52 -0500 Subject: [PATCH 026/347] Fix callback alert --- lms/static/coffee/src/open_ended/open_ended.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/static/coffee/src/open_ended/open_ended.coffee b/lms/static/coffee/src/open_ended/open_ended.coffee index 227cf2fd76..45de3a4fcc 100644 --- a/lms/static/coffee/src/open_ended/open_ended.coffee +++ b/lms/static/coffee/src/open_ended/open_ended.coffee @@ -42,7 +42,7 @@ class OpenEnded .error => callback({success: false, error: "Error occured while performing this operation"}) handle_after_action: (data) -> - @gentle_alert data + @gentle_alert data.data gentle_alert: (msg) => if $('.message-container').length From ada9ff7f27925b21da41e26873b39b8f04a61ed0 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Thu, 31 Jan 2013 10:45:11 -0500 Subject: [PATCH 027/347] Fix randomization bug in capa. (Note: capa_problem was still doing randomization internally, but now it does what's actually intended) --- common/lib/xmodule/xmodule/capa_module.py | 33 ++++++++++++++++------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index f33da6e3a4..27bf0c4cb1 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -2,6 +2,7 @@ import cgi import datetime import dateutil import dateutil.parser +import hashlib import json import logging import traceback @@ -25,6 +26,22 @@ log = logging.getLogger("mitx.courseware") #----------------------------------------------------------------------------- TIMEDELTA_REGEX = re.compile(r'^((?P\d+?) day(?:s?))?(\s)?((?P\d+?) hour(?:s?))?(\s)?((?P\d+?) minute(?:s)?)?(\s)?((?P\d+?) second(?:s)?)?$') +# Generated this many different variants of problems with rerandomize=per_student +NUM_RANDOMIZATION_BINS = 20 + +def randomization_bin(seed, problem_id): + """ + Pick a randomization bin for the problem given the user's seed and a problem id. + + We do this because we only want e.g. 20 randomizations of a problem to make analytics + interesting. To avoid having sets of students that always get the same problems, + we'll combine the system's per-student seed with the problem id in picking the bin. + """ + h = hashlib.sha1() + h.update(str(seed)) + h.update(str(problem_id)) + # get the first few digits of the hash, convert to an int, then mod. + return int(h.hexdigest()[:7], 16) % NUM_RANDOMIZATION_BINS def only_one(lst, default="", process=lambda x: x): """ @@ -138,13 +155,9 @@ class CapaModule(XModule): if self.rerandomize == 'never': self.seed = 1 - elif self.rerandomize == "per_student" and hasattr(self.system, 'id'): - # TODO: This line is badly broken: - # (1) We're passing student ID to xmodule. - # (2) There aren't bins of students. -- we only want 10 or 20 randomizations, and want to assign students - # to these bins, and may not want cohorts. So e.g. hash(your-id, problem_id) % num_bins. - # - analytics really needs small number of bins. - self.seed = system.id + elif self.rerandomize == "per_student" and hasattr(self.system, 'seed'): + # see comment on randomization_bin + self.seed = randomization_bin(system.seed, self.location.url) else: self.seed = None @@ -669,18 +682,18 @@ class CapaDescriptor(RawDescriptor): # TODO (vshnayder): do problems have any other metadata? Do they # actually use type and points? metadata_attributes = RawDescriptor.metadata_attributes + ('type', 'points') - + def get_context(self): _context = RawDescriptor.get_context(self) _context.update({'markdown': self.metadata.get('markdown', '')}) return _context - + @property def editable_metadata_fields(self): """Remove metadata from the editable fields since it has its own editor""" subset = super(CapaDescriptor,self).editable_metadata_fields if 'markdown' in subset: - subset.remove('markdown') + subset.remove('markdown') return subset From 78f9f63466e6ffce90df07385c80378168af74c7 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 31 Jan 2013 11:19:15 -0500 Subject: [PATCH 028/347] Add in notification type for flagged submissions --- .../open_ended_grading/open_ended_notifications.py | 3 ++- lms/djangoapps/open_ended_grading/views.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/open_ended_notifications.py b/lms/djangoapps/open_ended_grading/open_ended_notifications.py index 43259f3e1b..fec893894f 100644 --- a/lms/djangoapps/open_ended_grading/open_ended_notifications.py +++ b/lms/djangoapps/open_ended_grading/open_ended_notifications.py @@ -19,7 +19,8 @@ KEY_PREFIX = "open_ended_" NOTIFICATION_TYPES = ( ('student_needs_to_peer_grade', 'peer_grading', 'Peer Grading'), ('staff_needs_to_grade', 'staff_grading', 'Staff Grading'), - ('new_student_grading_to_view', 'open_ended_problems', 'Problems you have submitted') + ('new_student_grading_to_view', 'open_ended_problems', 'Problems you have submitted'), + ('flagged_submissions_exist', 'open_ended_flagged_problems', 'Flagged Submissions') ) def staff_grading_notifications(course, user): diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 984c544d93..1777f26e2e 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -56,12 +56,14 @@ def _reverse_without_slash(url_name, course_id): DESCRIPTION_DICT = { 'Peer Grading': "View all problems that require peer assessment in this particular course.", 'Staff Grading': "View ungraded submissions submitted by students for the open ended problems in the course.", - 'Problems you have submitted': "View open ended problems that you have previously submitted for grading." + 'Problems you have submitted': "View open ended problems that you have previously submitted for grading.", + 'Flagged Submissions' : "View submissions that have been flagged by students as inappropriate." } ALERT_DICT = { 'Peer Grading': "New submissions to grade", 'Staff Grading': "New submissions to grade", - 'Problems you have submitted': "New grades have been returned" + 'Problems you have submitted': "New grades have been returned", + 'Flagged Submissions' : "Submissions have been flagged for review" } @cache_control(no_cache=True, no_store=True, must_revalidate=True) def staff_grading(request, course_id): From e431378f46a812afc5a562cedd87babe7beb5bec Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Thu, 31 Jan 2013 12:14:01 -0500 Subject: [PATCH 029/347] Add first pass at a randomize module --- common/lib/xmodule/setup.py | 1 + .../lib/xmodule/xmodule/randomize_module.py | 122 ++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 common/lib/xmodule/xmodule/randomize_module.py diff --git a/common/lib/xmodule/setup.py b/common/lib/xmodule/setup.py index 29227c3188..446078ffcf 100644 --- a/common/lib/xmodule/setup.py +++ b/common/lib/xmodule/setup.py @@ -28,6 +28,7 @@ setup( "error = xmodule.error_module:ErrorDescriptor", "problem = xmodule.capa_module:CapaDescriptor", "problemset = xmodule.seq_module:SequenceDescriptor", + "randomize = xmodule.randomize_module:RandomizeDescriptor", "section = xmodule.backcompat_module:SemanticSectionDescriptor", "sequential = xmodule.seq_module:SequenceDescriptor", "slides = xmodule.backcompat_module:TranslateCustomTagDescriptor", diff --git a/common/lib/xmodule/xmodule/randomize_module.py b/common/lib/xmodule/xmodule/randomize_module.py new file mode 100644 index 0000000000..0bc26c21bf --- /dev/null +++ b/common/lib/xmodule/xmodule/randomize_module.py @@ -0,0 +1,122 @@ +import json +import logging +import random + +from xmodule.mako_module import MakoModuleDescriptor +from xmodule.x_module import XModule +from xmodule.xml_module import XmlDescriptor +from xmodule.modulestore import Location +from xmodule.seq_module import SequenceDescriptor + +from pkg_resources import resource_string + +log = logging.getLogger('mitx.' + __name__) + +class RandomizeModule(XModule): + """ + Chooses a random child module. Chooses the same one every time for each student. + + Example: + + + + + + + User notes: + + - If you're randomizing amongst graded modules, each of them MUST be worth the same + number of points. Otherwise, the earth will be overrun by monsters from the + deeps. You have been warned. + + Technical notes: + - There is more dark magic in this code than I'd like. The whole varying-children + + grading interaction is a tangle between super and subclasses of descriptors and + modules. +""" + + def __init__(self, system, location, definition, descriptor, + instance_state=None, shared_state=None, **kwargs): + XModule.__init__(self, system, location, definition, descriptor, + instance_state, shared_state, **kwargs) + + # NOTE: calling self.get_children() creates a circular reference-- + # it calls get_child_descriptors() internally, but that doesn't work until + # we've picked a choice + num_choices = len(self.descriptor.get_children()) + + self.choice = None + if instance_state is not None: + state = json.loads(instance_state) + self.choice = state.get('choice', None) + if self.choice > num_choices: + # Oops. Children changed. Reset. + self.choice = None + + if self.choice is None: + # choose one based on the system seed, or randomly if that's not available + if num_choices > 0: + if system.seed is not None: + self.choice = system.seed % num_choices + else: + self.choice = random.randrange(0, num_choices) + + log.debug("********* self.choice = %s", self.choice) + if self.choice is not None: + self.child_descriptor = self.descriptor.get_children()[self.choice] + # Now get_children() should return a list with one element + log.debug("children of randomize module (should be only 1): %s", + self.get_children()) + self.child = self.get_children()[0] + else: + self.child_descriptor = None + self.child = None + + + def get_instance_state(self): + return json.dumps({'choice': self.choice}) + + + def get_child_descriptors(self): + """ + For grading--return just the chosen child. + """ + if self.child_descriptor is None: + return [] + + return [self.child_descriptor] + + + def get_html(self): + if self.child is None: + # raise error instead? In fact, could complain on descriptor load... + return "
Nothing to randomize between
" + + return self.child.get_html() + + def get_icon_class(self): + return self.child.get_icon_class() if self.child else 'other' + + +class RandomizeDescriptor(SequenceDescriptor): + # the editing interface can be the same as for sequences -- just a container + module_class = RandomizeModule + + filename_extension = "xml" + + stores_state = True + + def definition_to_xml(self, resource_fs): + xml_object = etree.Element('randomize') + for child in self.get_children(): + xml_object.append( + etree.fromstring(child.export_to_xml(resource_fs))) + return xml_object + + def has_dynamic_children(self): + """ + Grading needs to know that only one of the children is actually "real". This + makes it use module.get_child_descriptors(). + """ + return True + From e0fb906c0692da41253ac1fe9411c6703f981f44 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Thu, 31 Jan 2013 12:14:20 -0500 Subject: [PATCH 030/347] add note about potential bug in verticals. No time to investigate at the moment... --- common/lib/xmodule/xmodule/vertical_module.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/lib/xmodule/xmodule/vertical_module.py b/common/lib/xmodule/xmodule/vertical_module.py index 397bd3e136..14105b41d0 100644 --- a/common/lib/xmodule/xmodule/vertical_module.py +++ b/common/lib/xmodule/xmodule/vertical_module.py @@ -48,3 +48,5 @@ class VerticalDescriptor(SequenceDescriptor): js = {'coffee': [resource_string(__name__, 'js/src/vertical/edit.coffee')]} js_module_name = "VerticalDescriptor" + # TODO (victor): Does this need its own definition_to_xml method? Otherwise it looks + # like verticals will get exported as sequentials... From 63d4ac8c442615c45435b2186dfbaa590891037f Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 31 Jan 2013 12:17:21 -0500 Subject: [PATCH 031/347] Working on some flagging coffeescript --- .../coffee/src/open_ended/open_ended.coffee | 22 +++++++++++++------ .../open_ended_flagged_problems.html | 3 +++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/lms/static/coffee/src/open_ended/open_ended.coffee b/lms/static/coffee/src/open_ended/open_ended.coffee index 45de3a4fcc..558d712c46 100644 --- a/lms/static/coffee/src/open_ended/open_ended.coffee +++ b/lms/static/coffee/src/open_ended/open_ended.coffee @@ -23,26 +23,34 @@ class OpenEnded parent_tr = $(event.target).parent().parent() tr_children = parent_tr.children() action_type = "unflag" - submission_id = tr_children[4].innerText - student_id = tr_children[5].innerText - @post('take_action_on_flags', {'submission_id' : submission_id, 'student_id' : student_id, 'action_type' : action_type}, @handle_after_action) + submission_id = tr_children[5].innerText + student_id = tr_children[6].innerText + callback_func = @after_action_wrapper($(event.target), action_type) + @post('take_action_on_flags', {'submission_id' : submission_id, 'student_id' : student_id, 'action_type' : action_type}, callback_func) ban: (event) => event.preventDefault() parent_tr = $(event.target).parent().parent() tr_children = parent_tr.children() action_type = "ban" - submission_id = tr_children[4].innerText - student_id = tr_children[5].innerText - @post('take_action_on_flags', {'submission_id' : submission_id, 'student_id' : student_id, 'action_type' : action_type}, @handle_after_action) + submission_id = tr_children[5].innerText + student_id = tr_children[6].innerText + callback_func = @after_action_wrapper($(event.target), action_type) + @post('take_action_on_flags', {'submission_id' : submission_id, 'student_id' : student_id, 'action_type' : action_type}, callback_func) post: (cmd, data, callback) -> # if this post request fails, the error callback will catch it $.post(@ajax_url + cmd, data, callback) .error => callback({success: false, error: "Error occured while performing this operation"}) + after_action_wrapper: (target, action_type) -> + return @handle_after_action + handle_after_action: (data) -> - @gentle_alert data.data + tr_parent = target.parent().parent() + tr_children = tr_parent.children() + action_taken = tr_children[4].children()[0] + action_taken.replaceWith('
#{action_type} done for student.
') gentle_alert: (msg) => if $('.message-container').length diff --git a/lms/templates/open_ended_problems/open_ended_flagged_problems.html b/lms/templates/open_ended_problems/open_ended_flagged_problems.html index 9265ad4663..ec892da43c 100644 --- a/lms/templates/open_ended_problems/open_ended_flagged_problems.html +++ b/lms/templates/open_ended_problems/open_ended_flagged_problems.html @@ -47,6 +47,9 @@
Ban +
+
${problem['submission_id']}
+ + + % for i in range(max_score + 1): + + % endfor + % for i in range(len(categories)): <% category = categories[i] %> @@ -23,7 +31,6 @@
% endif ${option['text']} -
[${option['points']} points]
% else: From 2e0f90081eb12c822b603861cbf86e8e34601866 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Thu, 31 Jan 2013 14:23:17 -0500 Subject: [PATCH 035/347] Make rubric cleaner and visually simpler --- lms/static/sass/course/_rubric.scss | 17 ++++++++--------- lms/templates/open_ended_rubric.html | 6 +++--- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/lms/static/sass/course/_rubric.scss b/lms/static/sass/course/_rubric.scss index c82d929fac..9aa0ca2f2a 100644 --- a/lms/static/sass/course/_rubric.scss +++ b/lms/static/sass/course/_rubric.scss @@ -1,5 +1,5 @@ .rubric { - padding: 40px 0px; + margin: 40px 0px; tr { margin:10px 0px; height: 100%; @@ -8,6 +8,7 @@ padding: 20px 0px 25px 0px; height: 100%; border: 1px black solid; + text-align: center; } th { padding: 5px; @@ -17,13 +18,11 @@ .points-header th { padding: 0px; } - label, - .view-only { - margin:2px; + .rubric-label + { position: relative; - padding: 15px 15px 25px 15px; + padding: 15px 15px 25px; width: 130px; - height:100%; min-height: 50px; min-width: 50px; font-size: .9em; @@ -40,9 +39,9 @@ background: #666; color: white; } - input[type=radio]:checked + label { - background: #666; - color: white; } + input[type=radio]:checked + .rubric-label { + background: white; + color: $base-font-color; } input[class='score-selection'] { position: relative; margin-left: 10px; diff --git a/lms/templates/open_ended_rubric.html b/lms/templates/open_ended_rubric.html index b92ad04bde..a2d8d6945c 100644 --- a/lms/templates/open_ended_rubric.html +++ b/lms/templates/open_ended_rubric.html @@ -26,15 +26,15 @@ % if view_only: ## if this is the selected rubric block, show it highlighted % if option['selected']: -
+
% else: -
+
% endif ${option['text']}
% else: - + % endif % endfor From 3fa67c14255887cd49c5e5002eef8c0fb46085b7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 31 Jan 2013 17:05:15 -0500 Subject: [PATCH 036/347] allow moderators and students to select cohort on post creation --- common/djangoapps/course_groups/cohorts.py | 19 +++++++++++++++++ .../src/discussion/views/new_post_view.coffee | 10 ++++++++- .../django_comment_client/base/views.py | 17 ++++++++++++--- .../django_comment_client/forum/views.py | 15 ++++++------- lms/templates/discussion/_new_post.html | 21 ++++++++++++------- 5 files changed, 64 insertions(+), 18 deletions(-) diff --git a/common/djangoapps/course_groups/cohorts.py b/common/djangoapps/course_groups/cohorts.py index 5c8a1ca067..4fda68bf36 100644 --- a/common/djangoapps/course_groups/cohorts.py +++ b/common/djangoapps/course_groups/cohorts.py @@ -30,6 +30,9 @@ def get_cohort_id(user, course_id): Given a course id and a user, return the id of the cohort that user is assigned to in that course. If they don't have a cohort, return None. """ + print "\n\n\n\n\n*********************************" + print user + print course_id cohort = get_cohort(user, course_id) return None if cohort is None else cohort.id @@ -64,7 +67,23 @@ def is_commentable_cohorted(course_id, commentable_id): ans)) return ans + +def get_cohorted_commentables(course_id): + """ + Given a course_id return a list of strings representing cohorted commentables + """ + course = courses.get_course_by_id(course_id) + + if not course.is_cohorted: + # this is the easy case :) + ans = [] + else: + ans = course.top_level_discussion_topic_ids + + return ans + + def get_cohort(user, course_id): """ Given a django User and a course_id, return the user's cohort in that diff --git a/common/static/coffee/src/discussion/views/new_post_view.coffee b/common/static/coffee/src/discussion/views/new_post_view.coffee index 1c49fdbc8e..be146587df 100644 --- a/common/static/coffee/src/discussion/views/new_post_view.coffee +++ b/common/static/coffee/src/discussion/views/new_post_view.coffee @@ -14,8 +14,9 @@ if Backbone? @setSelectedTopic() DiscussionUtil.makeWmdEditor @$el, $.proxy(@$, @), "new-post-body" + @$(".new-post-tags").tagsInput DiscussionUtil.tagsInputOptions() - + events: "submit .new-post-form": "createPost" "click .topic_dropdown_button": "toggleTopicDropdown" @@ -65,6 +66,11 @@ if Backbone? @topicText = @getFullTopicName($target) @topicId = $target.data('discussion_id') @setSelectedTopic() + if $target.attr('cohorted') == "True" + $('.choose-cohort').show(); + else + $('.choose-cohort').hide(); + setSelectedTopic: -> @dropdownButton.html(@fitName(@topicText) + ' ') @@ -116,6 +122,7 @@ if Backbone? title = @$(".new-post-title").val() body = @$(".new-post-body").find(".wmd-input").val() tags = @$(".new-post-tags").val() + group = @$(".new-post-group option:selected").attr("value") anonymous = false || @$("input.discussion-anonymous").is(":checked") anonymous_to_peers = false || @$("input.discussion-anonymous-to-peers").is(":checked") @@ -137,6 +144,7 @@ if Backbone? anonymous: anonymous anonymous_to_peers: anonymous_to_peers auto_subscribe: follow + group_id: group error: DiscussionUtil.formErrorHandler(@$(".new-post-form-errors")) success: (response, textStatus) => # TODO: Move this out of the callback, this makes it feel sluggish diff --git a/lms/djangoapps/django_comment_client/base/views.py b/lms/djangoapps/django_comment_client/base/views.py index 777c7bafce..6e86e629a1 100644 --- a/lms/djangoapps/django_comment_client/base/views.py +++ b/lms/djangoapps/django_comment_client/base/views.py @@ -89,20 +89,31 @@ def create_thread(request, course_id, commentable_id): 'user_id' : request.user.id, }) + + user = cc.User.from_django_user(request.user) # Cohort the thread if the commentable is cohorted. if is_commentable_cohorted(course_id, commentable_id): - user_group_id = get_cohort_id(request.user, course_id) + print "********************** IS COHORTED" + user_group_id = get_cohort_id(user, course_id) + print "********************** USER GOUP ID IS" + print user_group_id # TODO (vshnayder): once we have more than just cohorts, we'll want to # change this to a single get_group_for_user_and_commentable function # that can do different things depending on the commentable_id - if cached_has_permission(request.user, "see_all_cohorts", course_id): + if cached_has_permission(request.user, "see_all_cohorts", course_id) or True: # admins can optionally choose what group to post as + + print "********************** CACHED HAS PERMISSIONS TRUE" group_id = post.get('group_id', user_group_id) else: # regular users always post with their own id. + print "********************** CACHED HAS PERMISSIONS FALSE" group_id = user_group_id - + print "\n\n\n\n\n********************************* group is " + print group_id + print "\n\n\n\n\n********************************* and post is" + print post thread.update_attributes(group_id=group_id) thread.save() diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 715cb575d4..b5c65202d9 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -11,7 +11,7 @@ from django.contrib.auth.models import User from mitxmako.shortcuts import render_to_response, render_to_string from courseware.courses import get_course_with_access -from course_groups.cohorts import get_cohort_id, get_course_cohorts +from course_groups.cohorts import get_cohort_id, get_course_cohorts, get_cohorted_commentables, is_course_cohorted from courseware.access import has_access from urllib import urlencode @@ -128,7 +128,8 @@ def forum_form_discussion(request, course_id): log.error("Error loading forum discussion threads: %s" % str(err)) raise Http404 - user_info = cc.User.from_django_user(request.user).to_dict() + user = cc.User.from_django_user(request.user) + user_info = user.to_dict() annotated_content_info = utils.get_metadata_for_threads(course_id, threads, request.user, user_info) @@ -167,13 +168,13 @@ def forum_form_discussion(request, course_id): 'course_id': course.id, 'category_map': category_map, 'roles': saxutils.escape(json.dumps(utils.get_role_ids(course_id)), escapedict), - #'is_moderator': cached_has_permission(request.user, "see_all_cohorts", course_id), - 'is_moderator': True, - 'cohorts': get_course_cohorts(course_id) + 'is_moderator': cached_has_permission(request.user, "see_all_cohorts", course_id), + 'cohorts': get_course_cohorts(course_id), + 'cohort': get_cohort_id(user, course_id), + 'cohorted_commentables': get_cohorted_commentables(course_id), + 'is_course_cohorted': is_course_cohorted(course_id) } # print "start rendering.." - print "\n\n\n\n\n\n*************************************" - print context return render_to_response('discussion/index.html', context) @login_required diff --git a/lms/templates/discussion/_new_post.html b/lms/templates/discussion/_new_post.html index 3af63f9ea1..1bc6148dbe 100644 --- a/lms/templates/discussion/_new_post.html +++ b/lms/templates/discussion/_new_post.html @@ -9,7 +9,7 @@ <%def name="render_entry(entries, entry)"> -
  • ${entry}
  • +
  • ${entry}
  • <%def name="render_category(categories, category)"> @@ -21,6 +21,9 @@ + + +
    @@ -45,14 +48,18 @@ %elif course.metadata.get("allow_anonymous_to_peers", False): %endif - %if is_moderator: -
    + %if is_course_cohorted: +
    Make visible to: - - %for c in cohorts: - - %endfor + %if is_moderator: + %for c in cohorts: + + %endfor + %else: + + %endif
    From c25cd33214c8232250bd823121e7c53d408c4595 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 31 Jan 2013 17:22:54 -0500 Subject: [PATCH 037/347] remove print --- lms/djangoapps/django_comment_client/forum/views.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index b5c65202d9..64ba703d55 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -117,8 +117,6 @@ def forum_form_discussion(request, course_id): Renders the main Discussion page, potentially filtered by a search query """ course = get_course_with_access(request.user, course_id, 'load') - print "\n\n\n\n\n****************************" - print course category_map = utils.get_discussion_category_map(course) try: From f2f745965655e1d19c853fded737d4c8cb6b3064 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 31 Jan 2013 17:24:08 -0500 Subject: [PATCH 038/347] remove more prints --- lms/djangoapps/django_comment_client/base/views.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lms/djangoapps/django_comment_client/base/views.py b/lms/djangoapps/django_comment_client/base/views.py index 6e86e629a1..7f0809cabb 100644 --- a/lms/djangoapps/django_comment_client/base/views.py +++ b/lms/djangoapps/django_comment_client/base/views.py @@ -94,26 +94,16 @@ def create_thread(request, course_id, commentable_id): # Cohort the thread if the commentable is cohorted. if is_commentable_cohorted(course_id, commentable_id): - print "********************** IS COHORTED" user_group_id = get_cohort_id(user, course_id) - print "********************** USER GOUP ID IS" - print user_group_id # TODO (vshnayder): once we have more than just cohorts, we'll want to # change this to a single get_group_for_user_and_commentable function # that can do different things depending on the commentable_id if cached_has_permission(request.user, "see_all_cohorts", course_id) or True: # admins can optionally choose what group to post as - - print "********************** CACHED HAS PERMISSIONS TRUE" group_id = post.get('group_id', user_group_id) else: # regular users always post with their own id. - print "********************** CACHED HAS PERMISSIONS FALSE" group_id = user_group_id - print "\n\n\n\n\n********************************* group is " - print group_id - print "\n\n\n\n\n********************************* and post is" - print post thread.update_attributes(group_id=group_id) thread.save() From da1660a043fcf6e28769fd3a9b8c26f55fdd98d2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 31 Jan 2013 17:34:37 -0500 Subject: [PATCH 039/347] fix get_cohorted_commentables --- common/djangoapps/course_groups/cohorts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/djangoapps/course_groups/cohorts.py b/common/djangoapps/course_groups/cohorts.py index 4fda68bf36..4d74f70b26 100644 --- a/common/djangoapps/course_groups/cohorts.py +++ b/common/djangoapps/course_groups/cohorts.py @@ -79,7 +79,7 @@ def get_cohorted_commentables(course_id): # this is the easy case :) ans = [] else: - ans = course.top_level_discussion_topic_ids + ans = course.cohorted_discussions return ans From 52f3e9daafa96ee5a589e79e09aaa5611d58c229 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 31 Jan 2013 18:05:57 -0500 Subject: [PATCH 040/347] Start moving peer grading to xmodule --- .../js/src/peergrading/peer_grading.coffee | 27 + .../peergrading/peer_grading_problem.coffee | 478 ++++++++++++++++++ .../xmodule/xmodule/peer_grading_module.py | 439 ++++++++++++++++ .../xmodule/xmodule/peer_grading_service.py | 256 ++++++++++ 4 files changed, 1200 insertions(+) create mode 100644 common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee create mode 100644 common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee create mode 100644 common/lib/xmodule/xmodule/peer_grading_module.py create mode 100644 common/lib/xmodule/xmodule/peer_grading_service.py diff --git a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee new file mode 100644 index 0000000000..ed79ba9c71 --- /dev/null +++ b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee @@ -0,0 +1,27 @@ +# This is a simple class that just hides the error container +# and message container when they are empty +# Can (and should be) expanded upon when our problem list +# becomes more sophisticated +class PeerGrading + constructor: () -> + @error_container = $('.error-container') + @error_container.toggle(not @error_container.is(':empty')) + + @message_container = $('.message-container') + @message_container.toggle(not @message_container.is(':empty')) + + @problem_list = $('.problem-list') + @construct_progress_bar() + + construct_progress_bar: () => + problems = @problem_list.find('tr').next() + problems.each( (index, element) => + problem = $(element) + progress_bar = problem.find('.progress-bar') + bar_value = parseInt(problem.data('graded')) + bar_max = parseInt(problem.data('required')) + bar_value + progress_bar.progressbar({value: bar_value, max: bar_max}) + ) + + +$(document).ready(() -> new PeerGrading()) diff --git a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee new file mode 100644 index 0000000000..ab16b34d12 --- /dev/null +++ b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee @@ -0,0 +1,478 @@ +################################## +# +# This is the JS that renders the peer grading problem page. +# Fetches the correct problem and/or calibration essay +# and sends back the grades +# +# Should not be run when we don't have a location to send back +# to the server +# +# PeerGradingProblemBackend - +# makes all the ajax requests and provides a mock interface +# for testing purposes +# +# PeerGradingProblem - +# handles the rendering and user interactions with the interface +# +################################## +class PeerGradingProblemBackend + constructor: (ajax_url, mock_backend) -> + @mock_backend = mock_backend + @ajax_url = ajax_url + @mock_cnt = 0 + + post: (cmd, data, callback) -> + if @mock_backend + callback(@mock(cmd, data)) + else + # if this post request fails, the error callback will catch it + $.post(@ajax_url + cmd, data, callback) + .error => callback({success: false, error: "Error occured while performing this operation"}) + + mock: (cmd, data) -> + if cmd == 'is_student_calibrated' + # change to test each version + response = + success: true + calibrated: @mock_cnt >= 2 + else if cmd == 'show_calibration_essay' + #response = + # success: false + # error: "There was an error" + @mock_cnt++ + response = + success: true + submission_id: 1 + submission_key: 'abcd' + student_response: ''' + Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. + +The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. + ''' + prompt: ''' +

    S11E3: Metal Bands

    +

    Shown below are schematic band diagrams for two different metals. Both diagrams appear different, yet both of the elements are undisputably metallic in nature.

    +

    * Why is it that both sodium and magnesium behave as metals, even though the s-band of magnesium is filled?

    +

    This is a self-assessed open response question. Please use as much space as you need in the box below to answer the question.

    + ''' + rubric: ''' +
    + ${i} points +
    + + + + + + + + + + + + + + + + + +
    Purpose + + + + + + + +
    Organization + + + + + + + +
    + ''' + max_score: 4 + else if cmd == 'get_next_submission' + response = + success: true + submission_id: 1 + submission_key: 'abcd' + student_response: '''Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec tristique ante. Proin at mauris sapien, quis varius leo. Morbi laoreet leo nisi. Morbi aliquam lacus ante. Cras iaculis velit sed diam mattis a fermentum urna luctus. Duis consectetur nunc vitae felis facilisis eget vulputate risus viverra. Cras consectetur ullamcorper lobortis. Nam eu gravida lorem. Nulla facilisi. Nullam quis felis enim. Mauris orci lectus, dictum id cursus in, vulputate in massa. + +Phasellus non varius sem. Nullam commodo lacinia odio sit amet egestas. Donec ullamcorper sapien sagittis arcu volutpat placerat. Phasellus ut pretium ante. Nam dictum pulvinar nibh dapibus tristique. Sed at tellus mi, fringilla convallis justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus tristique rutrum nulla sed eleifend. Praesent at nunc arcu. Mauris condimentum faucibus nibh, eget commodo quam viverra sed. Morbi in tincidunt dolor. Morbi sed augue et augue interdum fermentum. + +Curabitur tristique purus ac arcu consequat cursus. Cras diam felis, dignissim quis placerat at, aliquet ac metus. Mauris vulputate est eu nibh imperdiet varius. Cras aliquet rhoncus elit a laoreet. Mauris consectetur erat et erat scelerisque eu faucibus dolor consequat. Nam adipiscing sagittis nisl, eu mollis massa tempor ac. Nulla scelerisque tempus blandit. Phasellus ac ipsum eros, id posuere arcu. Nullam non sapien arcu. Vivamus sit amet lorem justo, ac tempus turpis. Suspendisse pharetra gravida imperdiet. Pellentesque lacinia mi eu elit luctus pellentesque. Sed accumsan libero a magna elementum varius. Nunc eget pellentesque metus. ''' + prompt: ''' +

    S11E3: Metal Bands

    +

    Shown below are schematic band diagrams for two different metals. Both diagrams appear different, yet both of the elements are undisputably metallic in nature.

    +

    * Why is it that both sodium and magnesium behave as metals, even though the s-band of magnesium is filled?

    +

    This is a self-assessed open response question. Please use as much space as you need in the box below to answer the question.

    + ''' + rubric: ''' + + + + + + + + + + + + + + + + + + +
    Purpose + + + + + + + +
    Organization + + + + + + + +
    + ''' + max_score: 4 + else if cmd == 'save_calibration_essay' + response = + success: true + actual_score: 2 + else if cmd == 'save_grade' + response = + success: true + + return response + + +class PeerGradingProblem + constructor: (backend) -> + @prompt_wrapper = $('.prompt-wrapper') + @backend = backend + + + # get the location of the problem + @location = $('.peer-grading').data('location') + # prevent this code from trying to run + # when we don't have a location + if(!@location) + return + + # get the other elements we want to fill in + @submission_container = $('.submission-container') + @prompt_container = $('.prompt-container') + @rubric_container = $('.rubric-container') + @flag_student_container = $('.flag-student-container') + @calibration_panel = $('.calibration-panel') + @grading_panel = $('.grading-panel') + @content_panel = $('.content-panel') + @grading_message = $('.grading-message') + @grading_message.hide() + + @grading_wrapper =$('.grading-wrapper') + @calibration_feedback_panel = $('.calibration-feedback') + @interstitial_page = $('.interstitial-page') + @interstitial_page.hide() + + @error_container = $('.error-container') + + @submission_key_input = $("input[name='submission-key']") + @essay_id_input = $("input[name='essay-id']") + @feedback_area = $('.feedback-area') + + @score_selection_container = $('.score-selection-container') + @rubric_selection_container = $('.rubric-selection-container') + @grade = null + @calibration = null + + @submit_button = $('.submit-button') + @action_button = $('.action-button') + @calibration_feedback_button = $('.calibration-feedback-button') + @interstitial_page_button = $('.interstitial-page-button') + @flag_student_checkbox = $('.flag-checkbox') + + Collapsible.setCollapsibles(@content_panel) + + # Set up the click event handlers + @action_button.click -> history.back() + @calibration_feedback_button.click => + @calibration_feedback_panel.hide() + @grading_wrapper.show() + @is_calibrated_check() + + @interstitial_page_button.click => + @interstitial_page.hide() + @is_calibrated_check() + + @is_calibrated_check() + + + ########## + # + # Ajax calls to the backend + # + ########## + is_calibrated_check: () => + @backend.post('is_student_calibrated', {location: @location}, @calibration_check_callback) + + fetch_calibration_essay: () => + @backend.post('show_calibration_essay', {location: @location}, @render_calibration) + + fetch_submission_essay: () => + @backend.post('get_next_submission', {location: @location}, @render_submission) + + # finds the scores for each rubric category + get_score_list: () => + # find the number of categories: + num_categories = $('table.rubric tr').length + + score_lst = [] + # get the score for each one + for i in [0..(num_categories-1)] + score = $("input[name='score-selection-#{i}']:checked").val() + score_lst.push(score) + + return score_lst + + construct_data: () -> + data = + rubric_scores: @get_score_list() + score: @grade + location: @location + submission_id: @essay_id_input.val() + submission_key: @submission_key_input.val() + feedback: @feedback_area.val() + submission_flagged: @flag_student_checkbox.is(':checked') + return data + + + submit_calibration_essay: ()=> + data = @construct_data() + @backend.post('save_calibration_essay', data, @calibration_callback) + + submit_grade: () => + data = @construct_data() + @backend.post('save_grade', data, @submission_callback) + + + ########## + # + # Callbacks for various events + # + ########## + + # called after we perform an is_student_calibrated check + calibration_check_callback: (response) => + if response.success + # if we haven't been calibrating before + if response.calibrated and (@calibration == null or @calibration == false) + @calibration = false + @fetch_submission_essay() + # If we were calibrating before and no longer need to, + # show the interstitial page + else if response.calibrated and @calibration == true + @calibration = false + @render_interstitial_page() + else + @calibration = true + @fetch_calibration_essay() + else if response.error + @render_error(response.error) + else + @render_error("Error contacting the grading service") + + + # called after we submit a calibration score + calibration_callback: (response) => + if response.success + @render_calibration_feedback(response) + else if response.error + @render_error(response.error) + else + @render_error("Error saving calibration score") + + # called after we submit a submission score + submission_callback: (response) => + if response.success + @is_calibrated_check() + @grading_message.fadeIn() + @grading_message.html("

    Grade sent successfully.

    ") + else + if response.error + @render_error(response.error) + else + @render_error("Error occurred while submitting grade") + + # called after a grade is selected on the interface + graded_callback: (event) => + @grade = $("input[name='grade-selection']:checked").val() + if @grade == undefined + return + # check to see whether or not any categories have not been scored + num_categories = $('table.rubric tr').length + for i in [0..(num_categories-1)] + score = $("input[name='score-selection-#{i}']:checked").val() + if score == undefined + return + # show button if we have scores for all categories + @show_submit_button() + + + + ########## + # + # Rendering methods and helpers + # + ########## + # renders a calibration essay + render_calibration: (response) => + if response.success + + # load in all the data + @submission_container.html("

    Training Essay

    ") + @render_submission_data(response) + # TODO: indicate that we're in calibration mode + @calibration_panel.addClass('current-state') + @grading_panel.removeClass('current-state') + + # Display the right text + # both versions of the text are written into the template itself + # we only need to show/hide the correct ones at the correct time + @calibration_panel.find('.calibration-text').show() + @grading_panel.find('.calibration-text').show() + @calibration_panel.find('.grading-text').hide() + @grading_panel.find('.grading-text').hide() + @flag_student_container.hide() + + @submit_button.unbind('click') + @submit_button.click @submit_calibration_essay + + else if response.error + @render_error(response.error) + else + @render_error("An error occurred while retrieving the next calibration essay") + + # Renders a student submission to be graded + render_submission: (response) => + if response.success + @submit_button.hide() + @submission_container.html("

    Submitted Essay

    ") + @render_submission_data(response) + + @calibration_panel.removeClass('current-state') + @grading_panel.addClass('current-state') + + # Display the correct text + # both versions of the text are written into the template itself + # we only need to show/hide the correct ones at the correct time + @calibration_panel.find('.calibration-text').hide() + @grading_panel.find('.calibration-text').hide() + @calibration_panel.find('.grading-text').show() + @grading_panel.find('.grading-text').show() + @flag_student_container.show() + + @submit_button.unbind('click') + @submit_button.click @submit_grade + else if response.error + @render_error(response.error) + else + @render_error("An error occured when retrieving the next submission.") + + + make_paragraphs: (text) -> + paragraph_split = text.split(/\n\s*\n/) + new_text = '' + for paragraph in paragraph_split + new_text += "

    #{paragraph}

    " + return new_text + + # render common information between calibration and grading + render_submission_data: (response) => + @content_panel.show() + + @submission_container.append(@make_paragraphs(response.student_response)) + @prompt_container.html(response.prompt) + @rubric_selection_container.html(response.rubric) + @submission_key_input.val(response.submission_key) + @essay_id_input.val(response.submission_id) + @setup_score_selection(response.max_score) + + @submit_button.hide() + @action_button.hide() + @calibration_feedback_panel.hide() + + + render_calibration_feedback: (response) => + # display correct grade + @calibration_feedback_panel.slideDown() + calibration_wrapper = $('.calibration-feedback-wrapper') + calibration_wrapper.html("

    The score you gave was: #{@grade}. The actual score is: #{response.actual_score}

    ") + + + score = parseInt(@grade) + actual_score = parseInt(response.actual_score) + + if score == actual_score + calibration_wrapper.append("

    Congratulations! Your score matches the actual score!

    ") + else + calibration_wrapper.append("

    Please try to understand the grading critera better to be more accurate next time.

    ") + + # disable score selection and submission from the grading interface + $("input[name='score-selection']").attr('disabled', true) + @submit_button.hide() + + render_interstitial_page: () => + @content_panel.hide() + @interstitial_page.show() + + render_error: (error_message) => + @error_container.show() + @calibration_feedback_panel.hide() + @error_container.html(error_message) + @content_panel.hide() + @action_button.show() + + show_submit_button: () => + @submit_button.show() + + setup_score_selection: (max_score) => + + # first, get rid of all the old inputs, if any. + @score_selection_container.html(""" +

    Overall Score

    +

    Choose an overall score for this submission.

    + """) + + # Now create new labels and inputs for each possible score. + for score in [0..max_score] + id = 'score-' + score + label = """""" + + input = """ + + """ # " fix broken parsing in emacs + @score_selection_container.append(input + label) + + # And now hook up an event handler again + $("input[name='score-selection']").change @graded_callback + $("input[name='grade-selection']").change @graded_callback + + + +mock_backend = false +ajax_url = $('.peer-grading').data('ajax_url') +backend = new PeerGradingProblemBackend(ajax_url, mock_backend) +$(document).ready(() -> new PeerGradingProblem(backend)) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py new file mode 100644 index 0000000000..8002a8d923 --- /dev/null +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -0,0 +1,439 @@ +""" +This module provides an interface on the grading-service backend +for peer grading + +Use peer_grading_service() to get the version specified +in settings.PEER_GRADING_INTERFACE + +""" +import json +import logging +import requests +from requests.exceptions import RequestException, ConnectionError, HTTPError +import sys + +from django.conf import settings +from django.http import HttpResponse, Http404 +from grading_service import GradingService +from grading_service import GradingServiceError + +from courseware.access import has_access +from util.json_request import expect_json +from xmodule.course_module import CourseDescriptor +from xmodule.combined_open_ended_rubric import CombinedOpenEndedRubric +from student.models import unique_id_for_user +from lxml import etree + +import copy +from fs.errors import ResourceNotFoundError +import itertools +import json +import logging +from lxml import etree +from lxml.html import rewrite_links +from path import path +import os +import sys + +from pkg_resources import resource_string +from .capa_module import only_one, ComplexEncoder + +from peer_grading_service import peer_grading_service + +log = logging.getLogger(__name__) + +class PeerGradingModule(XModule): + _VERSION = 1 + + js = {'coffee': [resource_string(__name__, 'js/src/combinedopenended/display.coffee'), + resource_string(__name__, 'js/src/collapsible.coffee'), + resource_string(__name__, 'js/src/javascript_loader.coffee'), + ]} + js_module_name = "PeerGrading" + + css = {'scss': [resource_string(__name__, 'css/combinedopenended/display.scss')]} + + def __init__(self, system, location, definition, descriptor, + instance_state=None, shared_state=None, **kwargs): + XModule.__init__(self, system, location, definition, descriptor, + instance_state, shared_state, **kwargs) + + # Load instance state + if instance_state is not None: + instance_state = json.loads(instance_state) + else: + instance_state = {} + + #We need to set the location here so the child modules can use it + system.set('location', location) + self.peer_gs = peer_grading_service() + log.debug(self.system) + + def _err_response(self, msg): + """ + Return a HttpResponse with a json dump with success=False, and the given error message. + """ + return HttpResponse(json.dumps({'success': False, 'error': msg}), + mimetype="application/json") + + def _check_required(self, get, required): + actual = set(get.keys()) + missing = required - actual + if len(missing) > 0: + return False, "Missing required keys: {0}".format(', '.join(missing)) + else: + return True, "" + + def get_html(self): + """ + Needs to be implemented by inheritors. Renders the HTML that students see. + @return: + """ + pass + + def handle_ajax(self, dispatch, get): + """ + Needs to be implemented by child modules. Handles AJAX events. + @return: + """ + + handlers = { + 'get_next_submission': self.get_next_submission, + 'show_calibration_essay': self.show_calibration_essay, + 'save_post_assessment': self.message_post, + 'is_student_calibrated': self.is_student_calibrated, + 'save_grade': self.save_grade, + 'save_calibration_essay' : self.save_calibration_essay, + } + + if dispatch not in handlers: + return 'Error' + + before = self.get_progress() + d = handlers[dispatch](get) + after = self.get_progress() + d.update({ + 'progress_changed': after != before, + 'progress_status': Progress.to_js_status_str(after), + }) + return json.dumps(d, cls=ComplexEncoder) + + def get_next_submission(self, get): + """ + Makes a call to the grading controller for the next essay that should be graded + Returns a json dict with the following keys: + + 'success': bool + + 'submission_id': a unique identifier for the submission, to be passed back + with the grade. + + 'submission': the submission, rendered as read-only html for grading + + 'rubric': the rubric, also rendered as html. + + 'submission_key': a key associated with the submission for validation reasons + + 'error': if success is False, will have an error message with more info. + """ + _check_post(request) + required = set(['location']) + success, message = _check_required(request, required) + if not success: + return _err_response(message) + grader_id = unique_id_for_user(request.user) + p = request.POST + location = p['location'] + + try: + response = peer_grading_service().get_next_submission(location, grader_id) + return HttpResponse(response, + mimetype="application/json") + except GradingServiceError: + log.exception("Error getting next submission. server url: {0} location: {1}, grader_id: {2}" + .format(peer_grading_service().url, location, grader_id)) + return json.dumps({'success': False, + 'error': 'Could not connect to grading service'}) + + def save_grade(self, get): + """ + Saves the grade of a given submission. + Input: + The request should have the following keys: + location - problem location + submission_id - id associated with this submission + submission_key - submission key given for validation purposes + score - the grade that was given to the submission + feedback - the feedback from the student + Returns + A json object with the following keys: + success: bool indicating whether the save was a success + error: if there was an error in the submission, this is the error message + """ + _check_post(request) + required = set(['location', 'submission_id', 'submission_key', 'score', 'feedback', 'rubric_scores[]', 'submission_flagged']) + success, message = _check_required(request, required) + if not success: + return _err_response(message) + grader_id = unique_id_for_user(request.user) + p = request.POST + location = p['location'] + submission_id = p['submission_id'] + score = p['score'] + feedback = p['feedback'] + submission_key = p['submission_key'] + rubric_scores = p.getlist('rubric_scores[]') + submission_flagged = p['submission_flagged'] + try: + response = peer_grading_service().save_grade(location, grader_id, submission_id, + score, feedback, submission_key, rubric_scores, submission_flagged) + return HttpResponse(response, mimetype="application/json") + except GradingServiceError: + log.exception("""Error saving grade. server url: {0}, location: {1}, submission_id:{2}, + submission_key: {3}, score: {4}""" + .format(peer_grading_service().url, + location, submission_id, submission_key, score) + ) + return json.dumps({'success': False, + 'error': 'Could not connect to grading service'}) + + + + def is_student_calibrated(self, get): + """ + Calls the grading controller to see if the given student is calibrated + on the given problem + + Input: + In the request, we need the following arguments: + location - problem location + + Returns: + Json object with the following keys + success - bool indicating whether or not the call was successful + calibrated - true if the grader has fully calibrated and can now move on to grading + - false if the grader is still working on calibration problems + total_calibrated_on_so_far - the number of calibration essays for this problem + that this grader has graded + """ + _check_post(request) + required = set(['location']) + success, message = _check_required(request, required) + if not success: + return _err_response(message) + grader_id = unique_id_for_user(request.user) + p = request.POST + location = p['location'] + + try: + response = peer_grading_service().is_student_calibrated(location, grader_id) + return HttpResponse(response, mimetype="application/json") + except GradingServiceError: + log.exception("Error from grading service. server url: {0}, grader_id: {0}, location: {1}" + .format(peer_grading_service().url, grader_id, location)) + return json.dumps({'success': False, + 'error': 'Could not connect to grading service'}) + + + + def show_calibration_essay(self, get): + """ + Fetch the next calibration essay from the grading controller and return it + Inputs: + In the request + location - problem location + + Returns: + A json dict with the following keys + 'success': bool + + 'submission_id': a unique identifier for the submission, to be passed back + with the grade. + + 'submission': the submission, rendered as read-only html for grading + + 'rubric': the rubric, also rendered as html. + + 'submission_key': a key associated with the submission for validation reasons + + 'error': if success is False, will have an error message with more info. + + """ + _check_post(request) + + required = set(['location']) + success, message = _check_required(request, required) + if not success: + return _err_response(message) + + grader_id = unique_id_for_user(request.user) + p = request.POST + location = p['location'] + try: + response = peer_grading_service().show_calibration_essay(location, grader_id) + return HttpResponse(response, mimetype="application/json") + except GradingServiceError: + log.exception("Error from grading service. server url: {0}, location: {0}" + .format(peer_grading_service().url, location)) + return json.dumps({'success': False, + 'error': 'Could not connect to grading service'}) + # if we can't parse the rubric into HTML, + except etree.XMLSyntaxError: + log.exception("Cannot parse rubric string. Raw string: {0}" + .format(rubric)) + return json.dumps({'success': False, + 'error': 'Error displaying submission'}) + + + def save_calibration_essay(self, get): + """ + Saves the grader's grade of a given calibration. + Input: + The request should have the following keys: + location - problem location + submission_id - id associated with this submission + submission_key - submission key given for validation purposes + score - the grade that was given to the submission + feedback - the feedback from the student + Returns + A json object with the following keys: + success: bool indicating whether the save was a success + error: if there was an error in the submission, this is the error message + actual_score: the score that the instructor gave to this calibration essay + + """ + _check_post(request) + + required = set(['location', 'submission_id', 'submission_key', 'score', 'feedback', 'rubric_scores[]']) + success, message = _check_required(request, required) + if not success: + return _err_response(message) + grader_id = unique_id_for_user(request.user) + p = request.POST + location = p['location'] + calibration_essay_id = p['submission_id'] + submission_key = p['submission_key'] + score = p['score'] + feedback = p['feedback'] + rubric_scores = p.getlist('rubric_scores[]') + + try: + response = peer_grading_service().save_calibration_essay(location, grader_id, calibration_essay_id, + submission_key, score, feedback, rubric_scores) + return HttpResponse(response, mimetype="application/json") + except GradingServiceError: + log.exception("Error saving calibration grade, location: {0}, submission_id: {1}, submission_key: {2}, grader_id: {3}".format(location, submission_id, submission_key, grader_id)) + return _err_response('Could not connect to grading service') + def peer_grading(self, request, course_id): + ''' + Show a peer grading interface + ''' + + # call problem list service + success = False + error_text = "" + problem_list = [] + try: + problem_list_json = self.peer_gs.get_problem_list(course_id, unique_id_for_user(request.user)) + problem_list_dict = json.loads(problem_list_json) + success = problem_list_dict['success'] + if 'error' in problem_list_dict: + error_text = problem_list_dict['error'] + + problem_list = problem_list_dict['problem_list'] + + except GradingServiceError: + error_text = "Error occured while contacting the grading service" + success = False + # catch error if if the json loads fails + except ValueError: + error_text = "Could not get problem list" + success = False + + ajax_url = _reverse_with_slash('peer_grading', course_id) + + return self.system.render_template('peer_grading/peer_grading.html', { + 'course': course, + 'course_id': course_id, + 'ajax_url': ajax_url, + 'success': success, + 'problem_list': problem_list, + 'error_text': error_text, + # Checked above + 'staff_access': False, }) + + + def peer_grading_problem(request, course_id): + ''' + Show individual problem interface + ''' + course = get_course_with_access(request.user, course_id, 'load') + problem_location = request.GET.get("location") + + ajax_url = _reverse_with_slash('peer_grading', course_id) + + return render_to_response('peer_grading/peer_grading_problem.html', { + 'view_html': '', + 'course': course, + 'problem_location': problem_location, + 'course_id': course_id, + 'ajax_url': ajax_url, + # Checked above + 'staff_access': False, }) + +class PeerGradingDescriptor(XmlDescriptor, EditingDescriptor): + """ + Module for adding combined open ended questions + """ + mako_template = "widgets/html-edit.html" + module_class = CombinedOpenEndedModule + filename_extension = "xml" + + stores_state = True + has_score = True + template_dir_name = "peer_grading" + + js = {'coffee': [resource_string(__name__, 'js/src/html/edit.coffee')]} + js_module_name = "HTMLEditingDescriptor" + + @classmethod + def definition_from_xml(cls, xml_object, system): + """ + Pull out the individual tasks, the rubric, and the prompt, and parse + + Returns: + { + 'rubric': 'some-html', + 'prompt': 'some-html', + 'task_xml': dictionary of xml strings, + } + """ + expected_children = [] + for child in expected_children: + if len(xml_object.xpath(child)) == 0: + raise ValueError("Peer grading definition must include at least one '{0}' tag".format(child)) + + def parse_task(k): + """Assumes that xml_object has child k""" + return [stringify_children(xml_object.xpath(k)[i]) for i in xrange(0, len(xml_object.xpath(k)))] + + def parse(k): + """Assumes that xml_object has child k""" + return xml_object.xpath(k)[0] + + return {} + + + def definition_to_xml(self, resource_fs): + '''Return an xml element representing this definition.''' + elt = etree.Element('peergrading') + + def add_child(k): + child_str = '<{tag}>{body}'.format(tag=k, body=self.definition[k]) + child_node = etree.fromstring(child_str) + elt.append(child_node) + + for child in ['task']: + add_child(child) + + return elt \ No newline at end of file diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py new file mode 100644 index 0000000000..e2a5d72b6c --- /dev/null +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -0,0 +1,256 @@ +from .capa_module import only_one, ComplexEncoder +from .editing_module import EditingDescriptor +from .html_checker import check_html +from progress import Progress +from .stringify import stringify_children +from .x_module import XModule +from .xml_module import XmlDescriptor +from xmodule.modulestore import Location +import self_assessment_module +import open_ended_module +from combined_open_ended_rubric import CombinedOpenEndedRubric, RubricParsingError +from .stringify import stringify_children +import json +import logging +import requests +from requests.exceptions import RequestException, ConnectionError, HTTPError +import sys + +from django.conf import settings +from django.http import HttpResponse, Http404 + +from courseware.access import has_access +from util.json_request import expect_json +from xmodule.course_module import CourseDescriptor +from combined_open_ended_rubric import CombinedOpenEndedRubric, RubricParsingError +from lxml import etree + + + +from django.conf import settings + +class PeerGradingService(): + """ + Interface with the grading controller for peer grading + """ + def __init__(self, config): + self.username = config['username'] + self.password = config['password'] + self.url = config['url'] + self.login_url = self.url + '/login/' + self.session = requests.session() + self.get_next_submission_url = self.url + '/get_next_submission/' + self.save_grade_url = self.url + '/save_grade/' + self.is_student_calibrated_url = self.url + '/is_student_calibrated/' + self.show_calibration_essay_url = self.url + '/show_calibration_essay/' + self.save_calibration_essay_url = self.url + '/save_calibration_essay/' + self.get_problem_list_url = self.url + '/get_problem_list/' + self.get_notifications_url = self.url + '/get_notifications/' + + def get_next_submission(self, problem_location, grader_id): + response = self.get(self.get_next_submission_url, + {'location': problem_location, 'grader_id': grader_id}) + return json.dumps(self._render_rubric(response)) + + def save_grade(self, location, grader_id, submission_id, score, feedback, submission_key, rubric_scores, submission_flagged): + data = {'grader_id' : grader_id, + 'submission_id' : submission_id, + 'score' : score, + 'feedback' : feedback, + 'submission_key': submission_key, + 'location': location, + 'rubric_scores': rubric_scores, + 'rubric_scores_complete': True, + 'submission_flagged' : submission_flagged} + return self.post(self.save_grade_url, data) + + def is_student_calibrated(self, problem_location, grader_id): + params = {'problem_id' : problem_location, 'student_id': grader_id} + return self.get(self.is_student_calibrated_url, params) + + def show_calibration_essay(self, problem_location, grader_id): + params = {'problem_id' : problem_location, 'student_id': grader_id} + response = self.get(self.show_calibration_essay_url, params) + return json.dumps(self._render_rubric(response)) + + def save_calibration_essay(self, problem_location, grader_id, calibration_essay_id, submission_key, + score, feedback, rubric_scores): + data = {'location': problem_location, + 'student_id': grader_id, + 'calibration_essay_id': calibration_essay_id, + 'submission_key': submission_key, + 'score': score, + 'feedback': feedback, + 'rubric_scores[]': rubric_scores, + 'rubric_scores_complete': True} + return self.post(self.save_calibration_essay_url, data) + + def get_problem_list(self, course_id, grader_id): + params = {'course_id': course_id, 'student_id': grader_id} + response = self.get(self.get_problem_list_url, params) + return response + + def get_notifications(self, course_id, grader_id): + params = {'course_id': course_id, 'student_id': grader_id} + response = self.get(self.get_notifications_url, params) + return response + + def _login(self): + """ + Log into the staff grading service. + + Raises requests.exceptions.HTTPError if something goes wrong. + + Returns the decoded json dict of the response. + """ + response = self.session.post(self.login_url, + {'username': self.username, + 'password': self.password,}) + + response.raise_for_status() + + return response.json + + def post(self, url, data, allow_redirects=False): + """ + Make a post request to the grading controller + """ + try: + op = lambda: self.session.post(url, data=data, + allow_redirects=allow_redirects) + r = self._try_with_login(op) + except (RequestException, ConnectionError, HTTPError) as err: + # reraise as promised GradingServiceError, but preserve stacktrace. + raise GradingServiceError, str(err), sys.exc_info()[2] + + return r.text + + def get(self, url, params, allow_redirects=False): + """ + Make a get request to the grading controller + """ + log.debug(params) + op = lambda: self.session.get(url, + allow_redirects=allow_redirects, + params=params) + try: + r = self._try_with_login(op) + except (RequestException, ConnectionError, HTTPError) as err: + # reraise as promised GradingServiceError, but preserve stacktrace. + raise GradingServiceError, str(err), sys.exc_info()[2] + + return r.text + + + def _try_with_login(self, operation): + """ + Call operation(), which should return a requests response object. If + the request fails with a 'login_required' error, call _login() and try + the operation again. + + Returns the result of operation(). Does not catch exceptions. + """ + response = operation() + if (response.json + and response.json.get('success') == False + and response.json.get('error') == 'login_required'): + # apparrently we aren't logged in. Try to fix that. + r = self._login() + if r and not r.get('success'): + log.warning("Couldn't log into peer grading backend. Response: %s", + r) + # try again + response = operation() + response.raise_for_status() + + return response + + def _render_rubric(self, response, view_only=False): + """ + Given an HTTP Response with the key 'rubric', render out the html + required to display the rubric and put it back into the response + + returns the updated response as a dictionary that can be serialized later + + """ + try: + response_json = json.loads(response) + if 'rubric' in response_json: + rubric = response_json['rubric'] + rubric_renderer = CombinedOpenEndedRubric(self.system, False) + success, rubric_html = rubric_renderer.render_rubric(rubric) + response_json['rubric'] = rubric_html + return response_json + # if we can't parse the rubric into HTML, + except etree.XMLSyntaxError, RubricParsingError: + log.exception("Cannot parse rubric string. Raw string: {0}" + .format(rubric)) + return {'success': False, + 'error': 'Error displaying submission'} + except ValueError: + log.exception("Error parsing response: {0}".format(response)) + return {'success': False, + 'error': "Error displaying submission"} + +""" +This is a mock peer grading service that can be used for unit tests +without making actual service calls to the grading controller +""" +class MockPeerGradingService(object): + def get_next_submission(self, problem_location, grader_id): + return json.dumps({'success': True, + 'submission_id':1, + 'submission_key': "", + 'student_response': 'fake student response', + 'prompt': 'fake submission prompt', + 'rubric': 'fake rubric', + 'max_score': 4}) + + def save_grade(self, location, grader_id, submission_id, + score, feedback, submission_key): + return json.dumps({'success': True}) + + def is_student_calibrated(self, problem_location, grader_id): + return json.dumps({'success': True, 'calibrated': True}) + + def show_calibration_essay(self, problem_location, grader_id): + return json.dumps({'success': True, + 'submission_id':1, + 'submission_key': '', + 'student_response': 'fake student response', + 'prompt': 'fake submission prompt', + 'rubric': 'fake rubric', + 'max_score': 4}) + + def save_calibration_essay(self, problem_location, grader_id, + calibration_essay_id, submission_key, score, feedback): + return {'success': True, 'actual_score': 2} + + def get_problem_list(self, course_id, grader_id): + return json.dumps({'success': True, + 'problem_list': [ + json.dumps({'location': 'i4x://MITx/3.091x/problem/open_ended_demo1', + 'problem_name': "Problem 1", 'num_graded': 3, 'num_pending': 5}), + json.dumps({'location': 'i4x://MITx/3.091x/problem/open_ended_demo2', + 'problem_name': "Problem 2", 'num_graded': 1, 'num_pending': 5}) + ]}) + +_service = None +def peer_grading_service(): + """ + Return a peer grading service instance--if settings.MOCK_PEER_GRADING is True, + returns a mock one, otherwise a real one. + + Caches the result, so changing the setting after the first call to this + function will have no effect. + """ + global _service + if _service is not None: + return _service + + if settings.MOCK_PEER_GRADING: + _service = MockPeerGradingService() + else: + _service = PeerGradingService(settings.PEER_GRADING_INTERFACE) + + return _service From bdb82cda657adcc87aca9d5a4c83b122139451a4 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 31 Jan 2013 18:23:30 -0500 Subject: [PATCH 041/347] Strip out JS, old urls --- .../js/src/peergrading/peer_grading.coffee | 2 +- .../xmodule/xmodule/peer_grading_module.py | 63 ++++++++++--------- .../xmodule/xmodule/peer_grading_service.py | 5 +- lms/envs/common.py | 7 +-- lms/templates/peer_grading/peer_grading.html | 16 ----- .../peer_grading/peer_grading_problem.html | 18 ------ lms/urls.py | 17 ----- 7 files changed, 39 insertions(+), 89 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee index ed79ba9c71..a82353b7ef 100644 --- a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee +++ b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee @@ -9,7 +9,7 @@ class PeerGrading @message_container = $('.message-container') @message_container.toggle(not @message_container.is(':empty')) - + @problem_list = $('.problem-list') @construct_progress_bar() diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index 8002a8d923..f6e5af6752 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -38,14 +38,15 @@ import sys from pkg_resources import resource_string from .capa_module import only_one, ComplexEncoder -from peer_grading_service import peer_grading_service +from peer_grading_service import peer_grading_service, GradingServiceError log = logging.getLogger(__name__) class PeerGradingModule(XModule): _VERSION = 1 - js = {'coffee': [resource_string(__name__, 'js/src/combinedopenended/display.coffee'), + js = {'coffee': [resource_string(__name__, 'js/src/peergrading/peer_grading.coffee'), + resource_string(__name__, 'js/src/peergrading/peer_grading_problem.coffee'), resource_string(__name__, 'js/src/collapsible.coffee'), resource_string(__name__, 'js/src/javascript_loader.coffee'), ]} @@ -66,6 +67,7 @@ class PeerGradingModule(XModule): #We need to set the location here so the child modules can use it system.set('location', location) + self.system = system self.peer_gs = peer_grading_service() log.debug(self.system) @@ -104,20 +106,22 @@ class PeerGradingModule(XModule): 'is_student_calibrated': self.is_student_calibrated, 'save_grade': self.save_grade, 'save_calibration_essay' : self.save_calibration_essay, + 'show_problem' : self.peer_grading_problem, } if dispatch not in handlers: return 'Error' - before = self.get_progress() d = handlers[dispatch](get) - after = self.get_progress() - d.update({ - 'progress_changed': after != before, - 'progress_status': Progress.to_js_status_str(after), - }) + return json.dumps(d, cls=ComplexEncoder) + def get_progress(self): + pass + + def get_score(self): + pass + def get_next_submission(self, get): """ Makes a call to the grading controller for the next essay that should be graded @@ -146,12 +150,12 @@ class PeerGradingModule(XModule): location = p['location'] try: - response = peer_grading_service().get_next_submission(location, grader_id) + response = self.peer_gs.get_next_submission(location, grader_id) return HttpResponse(response, mimetype="application/json") except GradingServiceError: log.exception("Error getting next submission. server url: {0} location: {1}, grader_id: {2}" - .format(peer_grading_service().url, location, grader_id)) + .format(self.peer_gs.url, location, grader_id)) return json.dumps({'success': False, 'error': 'Could not connect to grading service'}) @@ -185,20 +189,18 @@ class PeerGradingModule(XModule): rubric_scores = p.getlist('rubric_scores[]') submission_flagged = p['submission_flagged'] try: - response = peer_grading_service().save_grade(location, grader_id, submission_id, + response = self.peer_gs.save_grade(location, grader_id, submission_id, score, feedback, submission_key, rubric_scores, submission_flagged) return HttpResponse(response, mimetype="application/json") except GradingServiceError: log.exception("""Error saving grade. server url: {0}, location: {1}, submission_id:{2}, submission_key: {3}, score: {4}""" - .format(peer_grading_service().url, + .format(self.peer_gs.url, location, submission_id, submission_key, score) ) return json.dumps({'success': False, 'error': 'Could not connect to grading service'}) - - def is_student_calibrated(self, get): """ Calls the grading controller to see if the given student is calibrated @@ -226,16 +228,14 @@ class PeerGradingModule(XModule): location = p['location'] try: - response = peer_grading_service().is_student_calibrated(location, grader_id) + response = self.peer_gs.is_student_calibrated(location, grader_id) return HttpResponse(response, mimetype="application/json") except GradingServiceError: log.exception("Error from grading service. server url: {0}, grader_id: {0}, location: {1}" - .format(peer_grading_service().url, grader_id, location)) + .format(self.peer_gs.url, grader_id, location)) return json.dumps({'success': False, 'error': 'Could not connect to grading service'}) - - def show_calibration_essay(self, get): """ Fetch the next calibration essay from the grading controller and return it @@ -270,11 +270,11 @@ class PeerGradingModule(XModule): p = request.POST location = p['location'] try: - response = peer_grading_service().show_calibration_essay(location, grader_id) + response = self.peer_gs.show_calibration_essay(location, grader_id) return HttpResponse(response, mimetype="application/json") except GradingServiceError: log.exception("Error from grading service. server url: {0}, location: {0}" - .format(peer_grading_service().url, location)) + .format(self.peer_gs.url, location)) return json.dumps({'success': False, 'error': 'Could not connect to grading service'}) # if we can't parse the rubric into HTML, @@ -318,13 +318,14 @@ class PeerGradingModule(XModule): rubric_scores = p.getlist('rubric_scores[]') try: - response = peer_grading_service().save_calibration_essay(location, grader_id, calibration_essay_id, + response = self.peer_gs.save_calibration_essay(location, grader_id, calibration_essay_id, submission_key, score, feedback, rubric_scores) return HttpResponse(response, mimetype="application/json") except GradingServiceError: log.exception("Error saving calibration grade, location: {0}, submission_id: {1}, submission_key: {2}, grader_id: {3}".format(location, submission_id, submission_key, grader_id)) return _err_response('Could not connect to grading service') - def peer_grading(self, request, course_id): + + def peer_grading(self, get = None): ''' Show a peer grading interface ''' @@ -334,7 +335,7 @@ class PeerGradingModule(XModule): error_text = "" problem_list = [] try: - problem_list_json = self.peer_gs.get_problem_list(course_id, unique_id_for_user(request.user)) + problem_list_json = self.peer_gs.get_problem_list(course_id, self.system.anonymous_student_id) problem_list_dict = json.loads(problem_list_json) success = problem_list_dict['success'] if 'error' in problem_list_dict: @@ -350,7 +351,7 @@ class PeerGradingModule(XModule): error_text = "Could not get problem list" success = False - ajax_url = _reverse_with_slash('peer_grading', course_id) + ajax_url = self.system.ajax_url return self.system.render_template('peer_grading/peer_grading.html', { 'course': course, @@ -363,16 +364,20 @@ class PeerGradingModule(XModule): 'staff_access': False, }) - def peer_grading_problem(request, course_id): + def peer_grading_problem(self, get = None): ''' Show individual problem interface ''' - course = get_course_with_access(request.user, course_id, 'load') - problem_location = request.GET.get("location") + if get == None: + problem_location = self.system.location + elif get.get('location') is not None: + problem_location = get.get('location') + else: + problem_location = self.system.location - ajax_url = _reverse_with_slash('peer_grading', course_id) + ajax_url = self.system.ajax_url - return render_to_response('peer_grading/peer_grading_problem.html', { + return self.system.render_template('peer_grading/peer_grading_problem.html', { 'view_html': '', 'course': course, 'problem_location': problem_location, diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index e2a5d72b6c..5fc4686533 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -25,10 +25,11 @@ from xmodule.course_module import CourseDescriptor from combined_open_ended_rubric import CombinedOpenEndedRubric, RubricParsingError from lxml import etree - - from django.conf import settings +class GradingServiceError(Exception): + pass + class PeerGradingService(): """ Interface with the grading controller for peer grading diff --git a/lms/envs/common.py b/lms/envs/common.py index 426c29c7d0..edbec26933 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -437,7 +437,6 @@ main_vendor_js = [ discussion_js = sorted(rooted_glob(PROJECT_ROOT / 'static', 'coffee/src/discussion/**/*.coffee')) staff_grading_js = sorted(rooted_glob(PROJECT_ROOT / 'static', 'coffee/src/staff_grading/**/*.coffee')) -peer_grading_js = sorted(rooted_glob(PROJECT_ROOT / 'static','coffee/src/peer_grading/**/*.coffee')) open_ended_js = sorted(rooted_glob(PROJECT_ROOT / 'static','coffee/src/open_ended/**/*.coffee')) PIPELINE_CSS = { @@ -469,7 +468,7 @@ PIPELINE_JS = { 'source_filenames': sorted( set(rooted_glob(COMMON_ROOT / 'static', 'coffee/src/**/*.coffee') + rooted_glob(PROJECT_ROOT / 'static', 'coffee/src/**/*.coffee')) - - set(courseware_js + discussion_js + staff_grading_js + peer_grading_js + open_ended_js) + set(courseware_js + discussion_js + staff_grading_js + open_ended_js) ) + [ 'js/form.ext.js', 'js/my_courses_dropdown.js', @@ -499,10 +498,6 @@ PIPELINE_JS = { 'source_filenames': staff_grading_js, 'output_filename': 'js/staff_grading.js' }, - 'peer_grading' : { - 'source_filenames': peer_grading_js, - 'output_filename': 'js/peer_grading.js' - }, 'open_ended' : { 'source_filenames': open_ended_js, 'output_filename': 'js/open_ended.js' diff --git a/lms/templates/peer_grading/peer_grading.html b/lms/templates/peer_grading/peer_grading.html index bd32b33ec2..fff753da41 100644 --- a/lms/templates/peer_grading/peer_grading.html +++ b/lms/templates/peer_grading/peer_grading.html @@ -1,19 +1,3 @@ -<%inherit file="/main.html" /> -<%block name="bodyclass">${course.css_class} -<%namespace name='static' file='/static_content.html'/> - -<%block name="headextra"> - <%static:css group='course'/> - - -<%block name="title">${course.number} Peer Grading - -<%include file="/courseware/course_navigation.html" args="active_page='peer_grading'" /> - -<%block name="js_extra"> - <%static:js group='peer_grading'/> - -
    ${error_text}
    diff --git a/lms/templates/peer_grading/peer_grading_problem.html b/lms/templates/peer_grading/peer_grading_problem.html index 04ee7415ec..f314b9733a 100644 --- a/lms/templates/peer_grading/peer_grading_problem.html +++ b/lms/templates/peer_grading/peer_grading_problem.html @@ -1,21 +1,3 @@ - -<%inherit file="/main.html" /> -<%block name="bodyclass">${course.css_class} -<%namespace name='static' file='/static_content.html'/> - -<%block name="headextra"> - <%static:css group='course'/> - - -<%block name="title">${course.number} Peer Grading. - -<%include file="/courseware/course_navigation.html" args="active_page='peer_grading'" /> - -<%block name="js_extra"> - <%static:js group='peer_grading'/> - - -
    diff --git a/lms/urls.py b/lms/urls.py index e4494e0166..6e8d08e256 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -265,23 +265,6 @@ if settings.COURSEWARE_ENABLED: url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/staff_grading/get_problem_list$', 'open_ended_grading.staff_grading_service.get_problem_list', name='staff_grading_get_problem_list'), - - # Peer Grading - url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/peer_grading$', - 'open_ended_grading.views.peer_grading', name='peer_grading'), - url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/peer_grading/problem$', - 'open_ended_grading.views.peer_grading_problem', name='peer_grading_problem'), - url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/peer_grading/get_next_submission$', - 'open_ended_grading.peer_grading_service.get_next_submission', name='peer_grading_get_next_submission'), - url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/peer_grading/show_calibration_essay$', - 'open_ended_grading.peer_grading_service.show_calibration_essay', name='peer_grading_show_calibration_essay'), - url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/peer_grading/is_student_calibrated$', - 'open_ended_grading.peer_grading_service.is_student_calibrated', name='peer_grading_is_student_calibrated'), - url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/peer_grading/save_grade$', - 'open_ended_grading.peer_grading_service.save_grade', name='peer_grading_save_grade'), - url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/peer_grading/save_calibration_essay$', - 'open_ended_grading.peer_grading_service.save_calibration_essay', name='peer_grading_save_calibration_essay'), - # Open Ended problem list url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/open_ended_problems$', 'open_ended_grading.views.student_problem_list', name='open_ended_problems'), From 59ba308354388ff8ab8fb4853b72563d968337f5 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 31 Jan 2013 18:28:15 -0500 Subject: [PATCH 042/347] Add in peer grading entry point --- common/lib/xmodule/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/common/lib/xmodule/setup.py b/common/lib/xmodule/setup.py index 29227c3188..06df6b1123 100644 --- a/common/lib/xmodule/setup.py +++ b/common/lib/xmodule/setup.py @@ -26,6 +26,7 @@ setup( "html = xmodule.html_module:HtmlDescriptor", "image = xmodule.backcompat_module:TranslateCustomTagDescriptor", "error = xmodule.error_module:ErrorDescriptor", + "peergrading = xmodule.peer_grading_module:PeerGradingDescriptor", "problem = xmodule.capa_module:CapaDescriptor", "problemset = xmodule.seq_module:SequenceDescriptor", "section = xmodule.backcompat_module:SemanticSectionDescriptor", From 07638440ac93d63893ea2d0b3a67f799bfeb1596 Mon Sep 17 00:00:00 2001 From: Brian Wilson Date: Thu, 31 Jan 2013 18:33:22 -0500 Subject: [PATCH 043/347] rename testcenter_exam to timed_exam, and read duration from metadata (policy.json) --- lms/djangoapps/courseware/views.py | 17 ++++++++++++----- lms/templates/courseware/testcenter_exam.html | 3 ++- lms/urls.py | 6 +++--- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index c7838156cb..1ac7cebd4b 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -301,7 +301,7 @@ def index(request, course_id, chapter=None, section=None, @login_required @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) -def testcenter_exam(request, course_id, chapter, section): +def timed_exam(request, course_id, chapter, section): """ Displays only associated content. If course, chapter, and section are all specified, renders the page, or returns an error if they @@ -387,20 +387,27 @@ def testcenter_exam(request, course_id, chapter, section): # they don't have access to. raise Http404 - # Save where we are in the chapter + # Save where we are in the chapter NOT! # instance_module = get_instance_module(course_id, request.user, chapter_module, student_module_cache) # save_child_position(chapter_module, section, instance_module) context['content'] = section_module.get_html() - # figure out when the exam should end. Going forward, this is determined by getting a "normal" + # figure out when the timed exam should end. Going forward, this is determined by getting a "normal" # duration from the test, then doing some math to modify the duration based on accommodations, # and then use that value as the end. Once we have calculated this, it should be sticky -- we # use the same value for future requests, unless it's a tester. + + # get value for duration from the section's metadata: + if 'duration' not in section_descriptor.metadata: + raise Http404 + + # for now, assume that the duration is set as an integer value, indicating the number of seconds: + duration = int(section_descriptor.metadata.get('duration')) - # Let's try 600s for now... - context['end_date'] = (time() + 600) * 1000 + # This value should be UTC time as number of milliseconds since epoch. + context['end_date'] = (time() + duration) * 1000 result = render_to_response('courseware/testcenter_exam.html', context) except Exception as e: diff --git a/lms/templates/courseware/testcenter_exam.html b/lms/templates/courseware/testcenter_exam.html index 66adfefcff..638778f7cd 100644 --- a/lms/templates/courseware/testcenter_exam.html +++ b/lms/templates/courseware/testcenter_exam.html @@ -67,7 +67,8 @@ return ( num < 10 ? "0" : "" ) + num; } - // set the end time when the template is rendered + // set the end time when the template is rendered. + // This value should be UTC time as number of milliseconds since epoch. var endTime = new Date(${end_date}); var currentTime = new Date(); var remaining_secs = Math.floor((endTime - currentTime)/1000); diff --git a/lms/urls.py b/lms/urls.py index 2c5db07d00..021079333a 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -217,9 +217,9 @@ if settings.COURSEWARE_ENABLED: url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/about$', 'courseware.views.course_about', name="about_course"), - # testcenter exam: - url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/testcenter_exam/(?P[^/]*)/(?P
    [^/]*)/$', - 'courseware.views.testcenter_exam', name="testcenter_exam"), + # timed exam: + url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/timed_exam/(?P[^/]*)/(?P
    [^/]*)/$', + 'courseware.views.timed_exam', name="timed_exam"), #Inside the course url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/$', From 4825ad7a1557076b257f0f8d69f0578f18c4742d Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 31 Jan 2013 18:35:11 -0500 Subject: [PATCH 044/347] Fix module imports --- .../xmodule/xmodule/peer_grading_module.py | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index f6e5af6752..cbcba607eb 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -9,34 +9,30 @@ in settings.PEER_GRADING_INTERFACE import json import logging import requests -from requests.exceptions import RequestException, ConnectionError, HTTPError import sys from django.conf import settings from django.http import HttpResponse, Http404 -from grading_service import GradingService -from grading_service import GradingServiceError -from courseware.access import has_access -from util.json_request import expect_json -from xmodule.course_module import CourseDescriptor -from xmodule.combined_open_ended_rubric import CombinedOpenEndedRubric -from student.models import unique_id_for_user +from combined_open_ended_rubric import CombinedOpenEndedRubric from lxml import etree import copy -from fs.errors import ResourceNotFoundError import itertools import json import logging -from lxml import etree from lxml.html import rewrite_links -from path import path import os -import sys from pkg_resources import resource_string from .capa_module import only_one, ComplexEncoder +from .editing_module import EditingDescriptor +from .html_checker import check_html +from progress import Progress +from .stringify import stringify_children +from .x_module import XModule +from .xml_module import XmlDescriptor +from xmodule.modulestore import Location from peer_grading_service import peer_grading_service, GradingServiceError @@ -391,7 +387,7 @@ class PeerGradingDescriptor(XmlDescriptor, EditingDescriptor): Module for adding combined open ended questions """ mako_template = "widgets/html-edit.html" - module_class = CombinedOpenEndedModule + module_class = PeerGradingModule filename_extension = "xml" stores_state = True @@ -413,6 +409,7 @@ class PeerGradingDescriptor(XmlDescriptor, EditingDescriptor): 'task_xml': dictionary of xml strings, } """ + log.debug("In definition") expected_children = [] for child in expected_children: if len(xml_object.xpath(child)) == 0: From edce6edb995bbd8087961e0d6fde910383f2dfdd Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 31 Jan 2013 18:38:55 -0500 Subject: [PATCH 045/347] Clean up peer grading service imports --- .../lib/xmodule/xmodule/peer_grading_service.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index 5fc4686533..172a981a96 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -1,15 +1,3 @@ -from .capa_module import only_one, ComplexEncoder -from .editing_module import EditingDescriptor -from .html_checker import check_html -from progress import Progress -from .stringify import stringify_children -from .x_module import XModule -from .xml_module import XmlDescriptor -from xmodule.modulestore import Location -import self_assessment_module -import open_ended_module -from combined_open_ended_rubric import CombinedOpenEndedRubric, RubricParsingError -from .stringify import stringify_children import json import logging import requests @@ -19,13 +7,10 @@ import sys from django.conf import settings from django.http import HttpResponse, Http404 -from courseware.access import has_access -from util.json_request import expect_json -from xmodule.course_module import CourseDescriptor from combined_open_ended_rubric import CombinedOpenEndedRubric, RubricParsingError from lxml import etree -from django.conf import settings +log=logging.getLogger(__name__) class GradingServiceError(Exception): pass From 4608bb274ea83bf2a96631f97fbba34b966cd648 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 31 Jan 2013 18:43:13 -0500 Subject: [PATCH 046/347] Fix system passing issues --- common/lib/xmodule/xmodule/peer_grading_module.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index cbcba607eb..6416c8d6af 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -38,6 +38,9 @@ from peer_grading_service import peer_grading_service, GradingServiceError log = logging.getLogger(__name__) +USE_FOR_SINGLE_LOCATION = False +TRUE_DICT = [True, "True", "true", "TRUE"] + class PeerGradingModule(XModule): _VERSION = 1 @@ -67,6 +70,10 @@ class PeerGradingModule(XModule): self.peer_gs = peer_grading_service() log.debug(self.system) + self.use_for_single_location = self.metadata.get('use_for_single_location', USE_FOR_SINGLE_LOCATION) + if isinstance(self.use_for_single_location, basestring): + self.use_for_single_location = (self.use_for_single_location in TRUE_DICT) + def _err_response(self, msg): """ Return a HttpResponse with a json dump with success=False, and the given error message. @@ -331,7 +338,7 @@ class PeerGradingModule(XModule): error_text = "" problem_list = [] try: - problem_list_json = self.peer_gs.get_problem_list(course_id, self.system.anonymous_student_id) + problem_list_json = self.peer_gs.get_problem_list(self.system.course_id, self.system.anonymous_student_id) problem_list_dict = json.loads(problem_list_json) success = problem_list_dict['success'] if 'error' in problem_list_dict: @@ -351,7 +358,7 @@ class PeerGradingModule(XModule): return self.system.render_template('peer_grading/peer_grading.html', { 'course': course, - 'course_id': course_id, + 'course_id': self.system.course_id, 'ajax_url': ajax_url, 'success': success, 'problem_list': problem_list, @@ -377,7 +384,7 @@ class PeerGradingModule(XModule): 'view_html': '', 'course': course, 'problem_location': problem_location, - 'course_id': course_id, + 'course_id': self.system.course_id, 'ajax_url': ajax_url, # Checked above 'staff_access': False, }) From d8b94f91bd67ddd8c5dca10b91027a12df75ba46 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 31 Jan 2013 18:53:17 -0500 Subject: [PATCH 047/347] Don't pass course to templates --- common/lib/xmodule/xmodule/peer_grading_module.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index 6416c8d6af..87469dba51 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -94,7 +94,10 @@ class PeerGradingModule(XModule): Needs to be implemented by inheritors. Renders the HTML that students see. @return: """ - pass + if not self.use_for_single_location: + return self.peer_grading() + else: + return self.peer_grading_problem({'location' : self.system.location}) def handle_ajax(self, dispatch, get): """ @@ -357,7 +360,6 @@ class PeerGradingModule(XModule): ajax_url = self.system.ajax_url return self.system.render_template('peer_grading/peer_grading.html', { - 'course': course, 'course_id': self.system.course_id, 'ajax_url': ajax_url, 'success': success, @@ -382,7 +384,6 @@ class PeerGradingModule(XModule): return self.system.render_template('peer_grading/peer_grading_problem.html', { 'view_html': '', - 'course': course, 'problem_location': problem_location, 'course_id': self.system.course_id, 'ajax_url': ajax_url, From c2f644656de792c678993b1c020d098348950d45 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 31 Jan 2013 19:12:49 -0500 Subject: [PATCH 048/347] Fix HTML return --- .../js/src/peergrading/peer_grading.coffee | 16 ++++++++++++++- .../xmodule/xmodule/peer_grading_module.py | 20 +++++++++++-------- lms/templates/peer_grading/peer_grading.html | 4 ++-- .../peer_grading/peer_grading_problem.html | 2 +- 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee index a82353b7ef..113f5e02a6 100644 --- a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee +++ b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee @@ -4,12 +4,18 @@ # becomes more sophisticated class PeerGrading constructor: () -> + @peer_grading_container = $('.peer-grading') + @peer_grading_outer_container = $('.peer-grading-container') + @ajax_url = peer_grading_container.data('ajax-url') @error_container = $('.error-container') @error_container.toggle(not @error_container.is(':empty')) @message_container = $('.message-container') @message_container.toggle(not @message_container.is(':empty')) + @problem_button = $('.problem-button') + @problem_button.click show_results + @problem_list = $('.problem-list') @construct_progress_bar() @@ -22,6 +28,14 @@ class PeerGrading bar_max = parseInt(problem.data('required')) + bar_value progress_bar.progressbar({value: bar_value, max: bar_max}) ) - + + show_results: (event) => + location_to_fetch = $(event.target).data('location') + data = {'location' : location_to_fetch} + $.postWithPrefix "#{@ajax_url}problem", data, (response) => + if response.success + @peer_grading_outer_container.after(response.html).remove() + else + @gentle_alert response.error $(document).ready(() -> new PeerGrading()) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index 87469dba51..c5a08e0812 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -74,6 +74,10 @@ class PeerGradingModule(XModule): if isinstance(self.use_for_single_location, basestring): self.use_for_single_location = (self.use_for_single_location in TRUE_DICT) + self.ajax_url = self.system.ajax_url + if not self.ajax_url.endswith("/"): + self.ajax_url = self.ajax_url + "/" + def _err_response(self, msg): """ Return a HttpResponse with a json dump with success=False, and the given error message. @@ -108,11 +112,10 @@ class PeerGradingModule(XModule): handlers = { 'get_next_submission': self.get_next_submission, 'show_calibration_essay': self.show_calibration_essay, - 'save_post_assessment': self.message_post, 'is_student_calibrated': self.is_student_calibrated, 'save_grade': self.save_grade, 'save_calibration_essay' : self.save_calibration_essay, - 'show_problem' : self.peer_grading_problem, + 'problem' : self.peer_grading_problem, } if dispatch not in handlers: @@ -357,9 +360,8 @@ class PeerGradingModule(XModule): error_text = "Could not get problem list" success = False - ajax_url = self.system.ajax_url - - return self.system.render_template('peer_grading/peer_grading.html', { + ajax_url = self.ajax_url + html = self.system.render_template('peer_grading/peer_grading.html', { 'course_id': self.system.course_id, 'ajax_url': ajax_url, 'success': success, @@ -368,6 +370,7 @@ class PeerGradingModule(XModule): # Checked above 'staff_access': False, }) + return html def peer_grading_problem(self, get = None): ''' @@ -380,9 +383,8 @@ class PeerGradingModule(XModule): else: problem_location = self.system.location - ajax_url = self.system.ajax_url - - return self.system.render_template('peer_grading/peer_grading_problem.html', { + ajax_url = self.ajax_url + html = self.system.render_template('peer_grading/peer_grading_problem.html', { 'view_html': '', 'problem_location': problem_location, 'course_id': self.system.course_id, @@ -390,6 +392,8 @@ class PeerGradingModule(XModule): # Checked above 'staff_access': False, }) + return {'html' : html, 'success' : True} + class PeerGradingDescriptor(XmlDescriptor, EditingDescriptor): """ Module for adding combined open ended questions diff --git a/lms/templates/peer_grading/peer_grading.html b/lms/templates/peer_grading/peer_grading.html index fff753da41..99ef288e5f 100644 --- a/lms/templates/peer_grading/peer_grading.html +++ b/lms/templates/peer_grading/peer_grading.html @@ -1,4 +1,4 @@ -
    +
    ${error_text}

    Peer Grading

    @@ -22,7 +22,7 @@ %for problem in problem_list: - ${problem['problem_name']} + ${problem['problem_name']} ${problem['num_graded']} diff --git a/lms/templates/peer_grading/peer_grading_problem.html b/lms/templates/peer_grading/peer_grading_problem.html index f314b9733a..9646b861c1 100644 --- a/lms/templates/peer_grading/peer_grading_problem.html +++ b/lms/templates/peer_grading/peer_grading_problem.html @@ -1,4 +1,4 @@ -
    +
    From c1583dbba2861434fb37635d031f7b2b7a61c50b Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 31 Jan 2013 19:57:35 -0500 Subject: [PATCH 049/347] Properly load javascript, fix templates to work with xmodule, modify AJAX handlers --- .../js/src/peergrading/peer_grading.coffee | 14 +- .../peergrading/peer_grading_problem.coffee | 229 +++++++++--------- .../xmodule/xmodule/peer_grading_module.py | 73 +++--- .../xmodule/xmodule/peer_grading_service.py | 2 + lms/templates/peer_grading/peer_grading.html | 2 +- .../peer_grading/peer_grading_problem.html | 2 +- 6 files changed, 159 insertions(+), 163 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee index 113f5e02a6..b8196838f3 100644 --- a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee +++ b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee @@ -2,11 +2,11 @@ # and message container when they are empty # Can (and should be) expanded upon when our problem list # becomes more sophisticated -class PeerGrading - constructor: () -> +class @PeerGrading + constructor: (element) -> @peer_grading_container = $('.peer-grading') @peer_grading_outer_container = $('.peer-grading-container') - @ajax_url = peer_grading_container.data('ajax-url') + @ajax_url = @peer_grading_container.data('ajax-url') @error_container = $('.error-container') @error_container.toggle(not @error_container.is(':empty')) @@ -14,7 +14,7 @@ class PeerGrading @message_container.toggle(not @message_container.is(':empty')) @problem_button = $('.problem-button') - @problem_button.click show_results + @problem_button.click @show_results @problem_list = $('.problem-list') @construct_progress_bar() @@ -35,7 +35,7 @@ class PeerGrading $.postWithPrefix "#{@ajax_url}problem", data, (response) => if response.success @peer_grading_outer_container.after(response.html).remove() + backend = new PeerGradingProblemBackend(@ajax_url, false) + new PeerGradingProblem(backend) else - @gentle_alert response.error - -$(document).ready(() -> new PeerGrading()) + @gentle_alert response.error \ No newline at end of file diff --git a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee index ab16b34d12..ee98905cda 100644 --- a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee +++ b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee @@ -7,7 +7,7 @@ # Should not be run when we don't have a location to send back # to the server # -# PeerGradingProblemBackend - +# PeerGradingProblemBackend - # makes all the ajax requests and provides a mock interface # for testing purposes # @@ -15,7 +15,7 @@ # handles the rendering and user interactions with the interface # ################################## -class PeerGradingProblemBackend +class @PeerGradingProblemBackend constructor: (ajax_url, mock_backend) -> @mock_backend = mock_backend @ajax_url = ajax_url @@ -32,141 +32,140 @@ class PeerGradingProblemBackend mock: (cmd, data) -> if cmd == 'is_student_calibrated' # change to test each version - response = - success: true + response = + success: true calibrated: @mock_cnt >= 2 else if cmd == 'show_calibration_essay' - #response = + #response = # success: false # error: "There was an error" @mock_cnt++ - response = + response = success: true submission_id: 1 submission_key: 'abcd' student_response: ''' - Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. + Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. -The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. - ''' + The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. + ''' prompt: ''' -

    S11E3: Metal Bands

    -

    Shown below are schematic band diagrams for two different metals. Both diagrams appear different, yet both of the elements are undisputably metallic in nature.

    -

    * Why is it that both sodium and magnesium behave as metals, even though the s-band of magnesium is filled?

    -

    This is a self-assessed open response question. Please use as much space as you need in the box below to answer the question.

    - ''' +

    S11E3: Metal Bands

    +

    Shown below are schematic band diagrams for two different metals. Both diagrams appear different, yet both of the elements are undisputably metallic in nature.

    +

    * Why is it that both sodium and magnesium behave as metals, even though the s-band of magnesium is filled?

    +

    This is a self-assessed open response question. Please use as much space as you need in the box below to answer the question.

    + ''' rubric: ''' - - - - - - - - - - - - - - - - - - -
    Purpose - - - - - - - -
    Organization - - - - - - - -
    - ''' + + + + + + + + + + + + + + + + + + +
    Purpose + + + + + + + +
    Organization + + + + + + + +
    + ''' max_score: 4 else if cmd == 'get_next_submission' - response = + response = success: true submission_id: 1 submission_key: 'abcd' student_response: '''Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec tristique ante. Proin at mauris sapien, quis varius leo. Morbi laoreet leo nisi. Morbi aliquam lacus ante. Cras iaculis velit sed diam mattis a fermentum urna luctus. Duis consectetur nunc vitae felis facilisis eget vulputate risus viverra. Cras consectetur ullamcorper lobortis. Nam eu gravida lorem. Nulla facilisi. Nullam quis felis enim. Mauris orci lectus, dictum id cursus in, vulputate in massa. -Phasellus non varius sem. Nullam commodo lacinia odio sit amet egestas. Donec ullamcorper sapien sagittis arcu volutpat placerat. Phasellus ut pretium ante. Nam dictum pulvinar nibh dapibus tristique. Sed at tellus mi, fringilla convallis justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus tristique rutrum nulla sed eleifend. Praesent at nunc arcu. Mauris condimentum faucibus nibh, eget commodo quam viverra sed. Morbi in tincidunt dolor. Morbi sed augue et augue interdum fermentum. + Phasellus non varius sem. Nullam commodo lacinia odio sit amet egestas. Donec ullamcorper sapien sagittis arcu volutpat placerat. Phasellus ut pretium ante. Nam dictum pulvinar nibh dapibus tristique. Sed at tellus mi, fringilla convallis justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus tristique rutrum nulla sed eleifend. Praesent at nunc arcu. Mauris condimentum faucibus nibh, eget commodo quam viverra sed. Morbi in tincidunt dolor. Morbi sed augue et augue interdum fermentum. -Curabitur tristique purus ac arcu consequat cursus. Cras diam felis, dignissim quis placerat at, aliquet ac metus. Mauris vulputate est eu nibh imperdiet varius. Cras aliquet rhoncus elit a laoreet. Mauris consectetur erat et erat scelerisque eu faucibus dolor consequat. Nam adipiscing sagittis nisl, eu mollis massa tempor ac. Nulla scelerisque tempus blandit. Phasellus ac ipsum eros, id posuere arcu. Nullam non sapien arcu. Vivamus sit amet lorem justo, ac tempus turpis. Suspendisse pharetra gravida imperdiet. Pellentesque lacinia mi eu elit luctus pellentesque. Sed accumsan libero a magna elementum varius. Nunc eget pellentesque metus. ''' + Curabitur tristique purus ac arcu consequat cursus. Cras diam felis, dignissim quis placerat at, aliquet ac metus. Mauris vulputate est eu nibh imperdiet varius. Cras aliquet rhoncus elit a laoreet. Mauris consectetur erat et erat scelerisque eu faucibus dolor consequat. Nam adipiscing sagittis nisl, eu mollis massa tempor ac. Nulla scelerisque tempus blandit. Phasellus ac ipsum eros, id posuere arcu. Nullam non sapien arcu. Vivamus sit amet lorem justo, ac tempus turpis. Suspendisse pharetra gravida imperdiet. Pellentesque lacinia mi eu elit luctus pellentesque. Sed accumsan libero a magna elementum varius. Nunc eget pellentesque metus. ''' prompt: ''' -

    S11E3: Metal Bands

    -

    Shown below are schematic band diagrams for two different metals. Both diagrams appear different, yet both of the elements are undisputably metallic in nature.

    -

    * Why is it that both sodium and magnesium behave as metals, even though the s-band of magnesium is filled?

    -

    This is a self-assessed open response question. Please use as much space as you need in the box below to answer the question.

    - ''' +

    S11E3: Metal Bands

    +

    Shown below are schematic band diagrams for two different metals. Both diagrams appear different, yet both of the elements are undisputably metallic in nature.

    +

    * Why is it that both sodium and magnesium behave as metals, even though the s-band of magnesium is filled?

    +

    This is a self-assessed open response question. Please use as much space as you need in the box below to answer the question.

    + ''' rubric: ''' - - - - - - - - - - - - - - - - - - -
    Purpose - - - - - - - -
    Organization - - - - - - - -
    - ''' + + + + + + + + + + + + + + + + + + +
    Purpose + + + + + + + +
    Organization + + + + + + + +
    + ''' max_score: 4 else if cmd == 'save_calibration_essay' - response = + response = success: true actual_score: 2 else if cmd == 'save_grade' - response = + response = success: true return response - -class PeerGradingProblem +class @PeerGradingProblem constructor: (backend) -> @prompt_wrapper = $('.prompt-wrapper') @backend = backend - + # get the location of the problem @location = $('.peer-grading').data('location') - # prevent this code from trying to run + # prevent this code from trying to run # when we don't have a location if(!@location) return @@ -208,7 +207,7 @@ class PeerGradingProblem # Set up the click event handlers @action_button.click -> history.back() - @calibration_feedback_button.click => + @calibration_feedback_button.click => @calibration_feedback_panel.hide() @grading_wrapper.show() @is_calibrated_check() @@ -266,7 +265,7 @@ class PeerGradingProblem submit_grade: () => data = @construct_data() @backend.post('save_grade', data, @submission_callback) - + ########## # @@ -301,7 +300,7 @@ class PeerGradingProblem @render_calibration_feedback(response) else if response.error @render_error(response.error) - else + else @render_error("Error saving calibration score") # called after we submit a submission score @@ -330,8 +329,8 @@ class PeerGradingProblem # show button if we have scores for all categories @show_submit_button() - - + + ########## # # Rendering methods and helpers @@ -344,7 +343,7 @@ class PeerGradingProblem # load in all the data @submission_container.html("

    Training Essay

    ") @render_submission_data(response) - # TODO: indicate that we're in calibration mode + # TODO: indicate that we're in calibration mode @calibration_panel.addClass('current-state') @grading_panel.removeClass('current-state') @@ -428,12 +427,12 @@ class PeerGradingProblem if score == actual_score calibration_wrapper.append("

    Congratulations! Your score matches the actual score!

    ") else - calibration_wrapper.append("

    Please try to understand the grading critera better to be more accurate next time.

    ") + calibration_wrapper.append("

    Please try to understand the grading critera better to be more accurate next time.

    ") # disable score selection and submission from the grading interface $("input[name='score-selection']").attr('disabled', true) @submit_button.hide() - + render_interstitial_page: () => @content_panel.hide() @interstitial_page.show() @@ -449,7 +448,7 @@ class PeerGradingProblem @submit_button.show() setup_score_selection: (max_score) => - + # first, get rid of all the old inputs, if any. @score_selection_container.html("""

    Overall Score

    @@ -460,7 +459,7 @@ class PeerGradingProblem for score in [0..max_score] id = 'score-' + score label = """""" - + input = """ """ # " fix broken parsing in emacs @@ -470,9 +469,7 @@ class PeerGradingProblem $("input[name='score-selection']").change @graded_callback $("input[name='grade-selection']").change @graded_callback - - -mock_backend = false -ajax_url = $('.peer-grading').data('ajax_url') -backend = new PeerGradingProblemBackend(ajax_url, mock_backend) -$(document).ready(() -> new PeerGradingProblem(backend)) +#mock_backend = false +#ajax_url = $('.peer-grading').data('ajax_url') +#backend = new PeerGradingProblemBackend(ajax_url, mock_backend) +#$(document).ready(() -> new PeerGradingProblem(backend)) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index c5a08e0812..be09751e29 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -68,7 +68,6 @@ class PeerGradingModule(XModule): system.set('location', location) self.system = system self.peer_gs = peer_grading_service() - log.debug(self.system) self.use_for_single_location = self.metadata.get('use_for_single_location', USE_FOR_SINGLE_LOCATION) if isinstance(self.use_for_single_location, basestring): @@ -108,7 +107,7 @@ class PeerGradingModule(XModule): Needs to be implemented by child modules. Handles AJAX events. @return: """ - + log.debug(get) handlers = { 'get_next_submission': self.get_next_submission, 'show_calibration_essay': self.show_calibration_essay, @@ -123,6 +122,8 @@ class PeerGradingModule(XModule): d = handlers[dispatch](get) + log.debug(d) + return json.dumps(d, cls=ComplexEncoder) def get_progress(self): @@ -149,14 +150,12 @@ class PeerGradingModule(XModule): 'error': if success is False, will have an error message with more info. """ - _check_post(request) required = set(['location']) - success, message = _check_required(request, required) + success, message = self._check_required(get, required) if not success: return _err_response(message) - grader_id = unique_id_for_user(request.user) - p = request.POST - location = p['location'] + grader_id = self.system.anonymous_student_id + location = get['location'] try: response = self.peer_gs.get_next_submission(location, grader_id) @@ -183,20 +182,20 @@ class PeerGradingModule(XModule): success: bool indicating whether the save was a success error: if there was an error in the submission, this is the error message """ - _check_post(request) + required = set(['location', 'submission_id', 'submission_key', 'score', 'feedback', 'rubric_scores[]', 'submission_flagged']) - success, message = _check_required(request, required) + success, message = self._check_required(get, required) if not success: return _err_response(message) - grader_id = unique_id_for_user(request.user) - p = request.POST - location = p['location'] - submission_id = p['submission_id'] - score = p['score'] - feedback = p['feedback'] - submission_key = p['submission_key'] - rubric_scores = p.getlist('rubric_scores[]') - submission_flagged = p['submission_flagged'] + grader_id = self.system.anonymous_student_id + + location = get['location'] + submission_id = get['submission_id'] + score = get['score'] + feedback = get['feedback'] + submission_key = get['submission_key'] + rubric_scores = get['rubric_scores'] + submission_flagged = get['submission_flagged'] try: response = self.peer_gs.save_grade(location, grader_id, submission_id, score, feedback, submission_key, rubric_scores, submission_flagged) @@ -227,14 +226,14 @@ class PeerGradingModule(XModule): total_calibrated_on_so_far - the number of calibration essays for this problem that this grader has graded """ - _check_post(request) + required = set(['location']) - success, message = _check_required(request, required) + success, message = self._check_required(get, required) if not success: return _err_response(message) - grader_id = unique_id_for_user(request.user) - p = request.POST - location = p['location'] + grader_id = self.system.anonymous_student_id + + location = get['location'] try: response = self.peer_gs.is_student_calibrated(location, grader_id) @@ -268,16 +267,15 @@ class PeerGradingModule(XModule): 'error': if success is False, will have an error message with more info. """ - _check_post(request) required = set(['location']) - success, message = _check_required(request, required) + success, message = self._check_required(get, required) if not success: return _err_response(message) - grader_id = unique_id_for_user(request.user) - p = request.POST - location = p['location'] + grader_id = self.system.anonymous_student_id + + location = get['location'] try: response = self.peer_gs.show_calibration_essay(location, grader_id) return HttpResponse(response, mimetype="application/json") @@ -311,20 +309,19 @@ class PeerGradingModule(XModule): actual_score: the score that the instructor gave to this calibration essay """ - _check_post(request) required = set(['location', 'submission_id', 'submission_key', 'score', 'feedback', 'rubric_scores[]']) - success, message = _check_required(request, required) + success, message = self._check_required(get, required) if not success: return _err_response(message) - grader_id = unique_id_for_user(request.user) - p = request.POST - location = p['location'] - calibration_essay_id = p['submission_id'] - submission_key = p['submission_key'] - score = p['score'] - feedback = p['feedback'] - rubric_scores = p.getlist('rubric_scores[]') + grader_id = self.system.anonymous_student_id + + location = get['location'] + calibration_essay_id = get['submission_id'] + submission_key = get['submission_key'] + score = get['score'] + feedback = get['feedback'] + rubric_scores = get['rubric_scores'] try: response = self.peer_gs.save_calibration_essay(location, grader_id, calibration_essay_id, diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index 172a981a96..a8e74dd3cc 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -48,6 +48,7 @@ class PeerGradingService(): 'rubric_scores': rubric_scores, 'rubric_scores_complete': True, 'submission_flagged' : submission_flagged} + log.debug(data) return self.post(self.save_grade_url, data) def is_student_calibrated(self, problem_location, grader_id): @@ -69,6 +70,7 @@ class PeerGradingService(): 'feedback': feedback, 'rubric_scores[]': rubric_scores, 'rubric_scores_complete': True} + log.debug(data) return self.post(self.save_calibration_essay_url, data) def get_problem_list(self, course_id, grader_id): diff --git a/lms/templates/peer_grading/peer_grading.html b/lms/templates/peer_grading/peer_grading.html index 99ef288e5f..1dd74d74e4 100644 --- a/lms/templates/peer_grading/peer_grading.html +++ b/lms/templates/peer_grading/peer_grading.html @@ -1,5 +1,5 @@
    -
    +
    ${error_text}

    Peer Grading

    Instructions

    diff --git a/lms/templates/peer_grading/peer_grading_problem.html b/lms/templates/peer_grading/peer_grading_problem.html index 9646b861c1..af7c1400cb 100644 --- a/lms/templates/peer_grading/peer_grading_problem.html +++ b/lms/templates/peer_grading/peer_grading_problem.html @@ -1,5 +1,5 @@
    -
    +
    From d1c55208c1fdfc636e9be8ae900540bd3347a163 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 31 Jan 2013 20:08:55 -0500 Subject: [PATCH 050/347] Clean up response code --- .../xmodule/xmodule/peer_grading_module.py | 43 ++++++++++--------- .../xmodule/xmodule/peer_grading_service.py | 24 +++++++++-- 2 files changed, 42 insertions(+), 25 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index be09751e29..cd60e2572c 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -12,7 +12,6 @@ import requests import sys from django.conf import settings -from django.http import HttpResponse, Http404 from combined_open_ended_rubric import CombinedOpenEndedRubric from lxml import etree @@ -81,8 +80,7 @@ class PeerGradingModule(XModule): """ Return a HttpResponse with a json dump with success=False, and the given error message. """ - return HttpResponse(json.dumps({'success': False, 'error': msg}), - mimetype="application/json") + return {'success': False, 'error': msg} def _check_required(self, get, required): actual = set(get.keys()) @@ -107,7 +105,7 @@ class PeerGradingModule(XModule): Needs to be implemented by child modules. Handles AJAX events. @return: """ - log.debug(get) + handlers = { 'get_next_submission': self.get_next_submission, 'show_calibration_essay': self.show_calibration_essay, @@ -123,7 +121,7 @@ class PeerGradingModule(XModule): d = handlers[dispatch](get) log.debug(d) - + return json.dumps(d, cls=ComplexEncoder) def get_progress(self): @@ -159,13 +157,12 @@ class PeerGradingModule(XModule): try: response = self.peer_gs.get_next_submission(location, grader_id) - return HttpResponse(response, - mimetype="application/json") + return response except GradingServiceError: log.exception("Error getting next submission. server url: {0} location: {1}, grader_id: {2}" .format(self.peer_gs.url, location, grader_id)) - return json.dumps({'success': False, - 'error': 'Could not connect to grading service'}) + return {'success': False, + 'error': 'Could not connect to grading service'} def save_grade(self, get): """ @@ -199,15 +196,17 @@ class PeerGradingModule(XModule): try: response = self.peer_gs.save_grade(location, grader_id, submission_id, score, feedback, submission_key, rubric_scores, submission_flagged) - return HttpResponse(response, mimetype="application/json") + return response except GradingServiceError: log.exception("""Error saving grade. server url: {0}, location: {1}, submission_id:{2}, submission_key: {3}, score: {4}""" .format(self.peer_gs.url, location, submission_id, submission_key, score) ) - return json.dumps({'success': False, - 'error': 'Could not connect to grading service'}) + return { + 'success': False, + 'error': 'Could not connect to grading service' + } def is_student_calibrated(self, get): """ @@ -237,12 +236,14 @@ class PeerGradingModule(XModule): try: response = self.peer_gs.is_student_calibrated(location, grader_id) - return HttpResponse(response, mimetype="application/json") + return response except GradingServiceError: log.exception("Error from grading service. server url: {0}, grader_id: {0}, location: {1}" .format(self.peer_gs.url, grader_id, location)) - return json.dumps({'success': False, - 'error': 'Could not connect to grading service'}) + return { + 'success': False, + 'error': 'Could not connect to grading service' + } def show_calibration_essay(self, get): """ @@ -278,18 +279,18 @@ class PeerGradingModule(XModule): location = get['location'] try: response = self.peer_gs.show_calibration_essay(location, grader_id) - return HttpResponse(response, mimetype="application/json") + return response except GradingServiceError: log.exception("Error from grading service. server url: {0}, location: {0}" .format(self.peer_gs.url, location)) - return json.dumps({'success': False, - 'error': 'Could not connect to grading service'}) + return {'success': False, + 'error': 'Could not connect to grading service'} # if we can't parse the rubric into HTML, except etree.XMLSyntaxError: log.exception("Cannot parse rubric string. Raw string: {0}" .format(rubric)) - return json.dumps({'success': False, - 'error': 'Error displaying submission'}) + return {'success': False, + 'error': 'Error displaying submission'} def save_calibration_essay(self, get): @@ -326,7 +327,7 @@ class PeerGradingModule(XModule): try: response = self.peer_gs.save_calibration_essay(location, grader_id, calibration_essay_id, submission_key, score, feedback, rubric_scores) - return HttpResponse(response, mimetype="application/json") + return response except GradingServiceError: log.exception("Error saving calibration grade, location: {0}, submission_id: {1}, submission_key: {2}, grader_id: {3}".format(location, submission_id, submission_key, grader_id)) return _err_response('Could not connect to grading service') diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index a8e74dd3cc..3328a2c3cc 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -36,7 +36,7 @@ class PeerGradingService(): def get_next_submission(self, problem_location, grader_id): response = self.get(self.get_next_submission_url, {'location': problem_location, 'grader_id': grader_id}) - return json.dumps(self._render_rubric(response)) + return self._render_rubric(response) def save_grade(self, location, grader_id, submission_id, score, feedback, submission_key, rubric_scores, submission_flagged): data = {'grader_id' : grader_id, @@ -58,7 +58,7 @@ class PeerGradingService(): def show_calibration_essay(self, problem_location, grader_id): params = {'problem_id' : problem_location, 'student_id': grader_id} response = self.get(self.show_calibration_essay_url, params) - return json.dumps(self._render_rubric(response)) + return self._render_rubric(response) def save_calibration_essay(self, problem_location, grader_id, calibration_essay_id, submission_key, score, feedback, rubric_scores): @@ -111,7 +111,13 @@ class PeerGradingService(): # reraise as promised GradingServiceError, but preserve stacktrace. raise GradingServiceError, str(err), sys.exc_info()[2] - return r.text + text = r.text + try: + text= json.loads(text) + except: + pass + + return text def get(self, url, params, allow_redirects=False): """ @@ -127,7 +133,13 @@ class PeerGradingService(): # reraise as promised GradingServiceError, but preserve stacktrace. raise GradingServiceError, str(err), sys.exc_info()[2] - return r.text + text = r.text + try: + text= json.loads(text) + except: + pass + + return text def _try_with_login(self, operation): @@ -163,6 +175,10 @@ class PeerGradingService(): """ try: response_json = json.loads(response) + except: + response_json = response + + try: if 'rubric' in response_json: rubric = response_json['rubric'] rubric_renderer = CombinedOpenEndedRubric(self.system, False) From 5ac6439cc015b826c6c968cc123f40e503984d5d Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Thu, 31 Jan 2013 20:22:35 -0500 Subject: [PATCH 051/347] Xmodule working...need to work on some issues (rubric scores not passing properly), and also fix notifications --- common/lib/xmodule/xmodule/peer_grading_module.py | 13 +++++++------ common/lib/xmodule/xmodule/peer_grading_service.py | 10 ++++------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index cd60e2572c..c2df24dfff 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -66,7 +66,7 @@ class PeerGradingModule(XModule): #We need to set the location here so the child modules can use it system.set('location', location) self.system = system - self.peer_gs = peer_grading_service() + self.peer_gs = peer_grading_service(self.system) self.use_for_single_location = self.metadata.get('use_for_single_location', USE_FOR_SINGLE_LOCATION) if isinstance(self.use_for_single_location, basestring): @@ -106,6 +106,7 @@ class PeerGradingModule(XModule): @return: """ + log.debug(get) handlers = { 'get_next_submission': self.get_next_submission, 'show_calibration_essay': self.show_calibration_essay, @@ -120,8 +121,6 @@ class PeerGradingModule(XModule): d = handlers[dispatch](get) - log.debug(d) - return json.dumps(d, cls=ComplexEncoder) def get_progress(self): @@ -191,8 +190,10 @@ class PeerGradingModule(XModule): score = get['score'] feedback = get['feedback'] submission_key = get['submission_key'] - rubric_scores = get['rubric_scores'] + rubric_scores = get['rubric_scores[]'] submission_flagged = get['submission_flagged'] + log.debug(get) + log.debug(rubric_scores) try: response = self.peer_gs.save_grade(location, grader_id, submission_id, score, feedback, submission_key, rubric_scores, submission_flagged) @@ -322,7 +323,7 @@ class PeerGradingModule(XModule): submission_key = get['submission_key'] score = get['score'] feedback = get['feedback'] - rubric_scores = get['rubric_scores'] + rubric_scores = get['rubric_scores[]'] try: response = self.peer_gs.save_calibration_essay(location, grader_id, calibration_essay_id, @@ -343,7 +344,7 @@ class PeerGradingModule(XModule): problem_list = [] try: problem_list_json = self.peer_gs.get_problem_list(self.system.course_id, self.system.anonymous_student_id) - problem_list_dict = json.loads(problem_list_json) + problem_list_dict = problem_list_json success = problem_list_dict['success'] if 'error' in problem_list_dict: error_text = problem_list_dict['error'] diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index 3328a2c3cc..06fa7351cd 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -19,7 +19,7 @@ class PeerGradingService(): """ Interface with the grading controller for peer grading """ - def __init__(self, config): + def __init__(self, config, system): self.username = config['username'] self.password = config['password'] self.url = config['url'] @@ -32,6 +32,7 @@ class PeerGradingService(): self.save_calibration_essay_url = self.url + '/save_calibration_essay/' self.get_problem_list_url = self.url + '/get_problem_list/' self.get_notifications_url = self.url + '/get_notifications/' + self.system = system def get_next_submission(self, problem_location, grader_id): response = self.get(self.get_next_submission_url, @@ -48,7 +49,6 @@ class PeerGradingService(): 'rubric_scores': rubric_scores, 'rubric_scores_complete': True, 'submission_flagged' : submission_flagged} - log.debug(data) return self.post(self.save_grade_url, data) def is_student_calibrated(self, problem_location, grader_id): @@ -70,7 +70,6 @@ class PeerGradingService(): 'feedback': feedback, 'rubric_scores[]': rubric_scores, 'rubric_scores_complete': True} - log.debug(data) return self.post(self.save_calibration_essay_url, data) def get_problem_list(self, course_id, grader_id): @@ -123,7 +122,6 @@ class PeerGradingService(): """ Make a get request to the grading controller """ - log.debug(params) op = lambda: self.session.get(url, allow_redirects=allow_redirects, params=params) @@ -240,7 +238,7 @@ class MockPeerGradingService(object): ]}) _service = None -def peer_grading_service(): +def peer_grading_service(system): """ Return a peer grading service instance--if settings.MOCK_PEER_GRADING is True, returns a mock one, otherwise a real one. @@ -255,6 +253,6 @@ def peer_grading_service(): if settings.MOCK_PEER_GRADING: _service = MockPeerGradingService() else: - _service = PeerGradingService(settings.PEER_GRADING_INTERFACE) + _service = PeerGradingService(settings.PEER_GRADING_INTERFACE, system) return _service From 6575386d6992bea4e68332370d0e9de13180c861 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 08:43:55 -0500 Subject: [PATCH 052/347] Refactor rubric JS so that we don't have to keep duplicating this code. --- .../js/src/combinedopenended/display.coffee | 29 +++++++++++++++ .../peer_grading/peer_grading_problem.coffee | 15 ++------ .../src/staff_grading/staff_grading.coffee | 37 ++++--------------- 3 files changed, 41 insertions(+), 40 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee index 594efe2f9b..c4560559c8 100644 --- a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee @@ -1,3 +1,32 @@ +class @Rubric + constructor: () -> + + # finds the scores for each rubric category + @get_score_list: () => + # find the number of categories: + num_categories = $('table.rubric tr').length + + score_lst = [] + # get the score for each one + for i in [0..(num_categories-2)] + score = $("input[name='score-selection-#{i}']:checked").val() + score_lst.push(score) + + return score_lst + + @get_total_score: () -> + score_lst = @get_score_list() + + @check_complete: () -> + # check to see whether or not any categories have not been scored + num_categories = $('table.rubric tr').length + # -2 because we want to skip the header + for i in [0..(num_categories-2)] + score = $("input[name='score-selection-#{i}']:checked").val() + if score == undefined + return false + return true + class @CombinedOpenEnded constructor: (element) -> @element=element diff --git a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee index c4b87eb30e..525891bb03 100644 --- a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee +++ b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee @@ -239,7 +239,7 @@ class PeerGradingProblem score_lst = [] # get the score for each one - for i in [0..(num_categories-1)] + for i in [0..(num_categories-2)] score = $("input[name='score-selection-#{i}']:checked").val() score_lst.push(score) @@ -315,17 +315,10 @@ class PeerGradingProblem # called after a grade is selected on the interface graded_callback: (event) => - @grade = $("input[name='grade-selection']:checked").val() - if @grade == undefined - return # check to see whether or not any categories have not been scored - num_categories = $('table.rubric tr').length - for i in [0..(num_categories-1)] - score = $("input[name='score-selection-#{i}']:checked").val() - if score == undefined - return - # show button if we have scores for all categories - @show_submit_button() + if Rubric.check_complete(): + # show button if we have scores for all categories + @show_submit_button() diff --git a/lms/static/coffee/src/staff_grading/staff_grading.coffee b/lms/static/coffee/src/staff_grading/staff_grading.coffee index 005a8e682e..2d3cafd3e7 100644 --- a/lms/static/coffee/src/staff_grading/staff_grading.coffee +++ b/lms/static/coffee/src/staff_grading/staff_grading.coffee @@ -232,35 +232,14 @@ class @StaffGrading graded_callback: () => - @grade = $("input[name='grade-selection']:checked").val() - if @grade == undefined - return - # check to see whether or not any categories have not been scored - num_categories = $('table.rubric tr').length - for i in [0..(num_categories-1)] - score = $("input[name='score-selection-#{i}']:checked").val() - if score == undefined - return - # show button if we have scores for all categories - @state = state_graded - @submit_button.show() + # show button if we have scores for all categories + if Rubric.check_complete() + @state = state_graded + @submit_button.show() set_button_text: (text) => @action_button.attr('value', text) - # finds the scores for each rubric category - get_score_list: () => - # find the number of categories: - num_categories = $('table.rubric tr').length - - score_lst = [] - # get the score for each one - for i in [0..(num_categories-1)] - score = $("input[name='score-selection-#{i}']:checked").val() - score_lst.push(score) - - return score_lst - ajax_callback: (response) => # always clear out errors and messages on transition. @error_msg = '' @@ -285,8 +264,8 @@ class @StaffGrading skip_and_get_next: () => data = - score: @grade - rubric_scores: @get_score_list() + score: Rubric.get_total_score() + rubric_scores: Rubric.get_score_list() feedback: @feedback_area.val() submission_id: @submission_id location: @location @@ -299,8 +278,8 @@ class @StaffGrading submit_and_get_next: () -> data = - score: @grade - rubric_scores: @get_score_list() + score: Rubric.get_total_score() + rubric_scores: Rubric.get_score_list() feedback: @feedback_area.val() submission_id: @submission_id location: @location From f05bda764470b80873937cb8573cf3db27228137 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 08:44:08 -0500 Subject: [PATCH 053/347] Visual updates to rubric --- lms/static/sass/course/_rubric.scss | 3 ++- lms/templates/open_ended_rubric.html | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lms/static/sass/course/_rubric.scss b/lms/static/sass/course/_rubric.scss index 9aa0ca2f2a..722a790e6d 100644 --- a/lms/static/sass/course/_rubric.scss +++ b/lms/static/sass/course/_rubric.scss @@ -35,7 +35,8 @@ right:0px; margin:10px; } - .selected-grade { + .selected-grade, + .selected-grade .rubric-label { background: #666; color: white; } diff --git a/lms/templates/open_ended_rubric.html b/lms/templates/open_ended_rubric.html index a2d8d6945c..eb3fc564b4 100644 --- a/lms/templates/open_ended_rubric.html +++ b/lms/templates/open_ended_rubric.html @@ -22,14 +22,14 @@ ${category['description']} % for j in range(len(category['options'])): <% option = category['options'][j] %> + %if option['selected']: + + %else: + % endif % if view_only: ## if this is the selected rubric block, show it highlighted - % if option['selected']: -
    - % else:
    - % endif ${option['text']}
    % else: From 0ec3be18155d5136aeade3139686f04c07b6d8a4 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 10:17:16 -0500 Subject: [PATCH 054/347] Calculate the total score from the rubric. --- .../xmodule/xmodule/js/src/combinedopenended/display.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee index c4560559c8..576fb7290d 100644 --- a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee @@ -16,6 +16,10 @@ class @Rubric @get_total_score: () -> score_lst = @get_score_list() + tot = 0 + for score in score_lst + tot += parseInt(score) + return tot @check_complete: () -> # check to see whether or not any categories have not been scored From cb44918f4958ebef6cd70bb8d1e760c534f046ea Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 10:31:46 -0500 Subject: [PATCH 055/347] Remove duplicate Javascript and remove total grade selection. --- .../peer_grading/peer_grading_problem.coffee | 35 ++----------------- .../src/staff_grading/staff_grading.coffee | 15 -------- 2 files changed, 3 insertions(+), 47 deletions(-) diff --git a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee index 525891bb03..f4b9bdbe78 100644 --- a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee +++ b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee @@ -232,23 +232,11 @@ class PeerGradingProblem fetch_submission_essay: () => @backend.post('get_next_submission', {location: @location}, @render_submission) - # finds the scores for each rubric category - get_score_list: () => - # find the number of categories: - num_categories = $('table.rubric tr').length - - score_lst = [] - # get the score for each one - for i in [0..(num_categories-2)] - score = $("input[name='score-selection-#{i}']:checked").val() - score_lst.push(score) - - return score_lst construct_data: () -> data = - rubric_scores: @get_score_list() - score: @grade + rubric_scores: Rubric.get_score_list() + score: Rubric.get_total_score() location: @location submission_id: @essay_id_input.val() submission_key: @submission_key_input.val() @@ -316,7 +304,7 @@ class PeerGradingProblem # called after a grade is selected on the interface graded_callback: (event) => # check to see whether or not any categories have not been scored - if Rubric.check_complete(): + if Rubric.check_complete() # show button if we have scores for all categories @show_submit_button() @@ -439,25 +427,8 @@ class PeerGradingProblem setup_score_selection: (max_score) => - # first, get rid of all the old inputs, if any. - @score_selection_container.html(""" -

    Overall Score

    -

    Choose an overall score for this submission.

    - """) - - # Now create new labels and inputs for each possible score. - for score in [0..max_score] - id = 'score-' + score - label = """""" - - input = """ - - """ # " fix broken parsing in emacs - @score_selection_container.append(input + label) - # And now hook up an event handler again $("input[name='score-selection']").change @graded_callback - $("input[name='grade-selection']").change @graded_callback diff --git a/lms/static/coffee/src/staff_grading/staff_grading.coffee b/lms/static/coffee/src/staff_grading/staff_grading.coffee index 2d3cafd3e7..117388bab0 100644 --- a/lms/static/coffee/src/staff_grading/staff_grading.coffee +++ b/lms/static/coffee/src/staff_grading/staff_grading.coffee @@ -212,21 +212,6 @@ class @StaffGrading setup_score_selection: => - # first, get rid of all the old inputs, if any. - @grade_selection_container.html(""" -

    Overall Score

    -

    Choose an overall score for this submission.

    - """) - # Now create new labels and inputs for each possible score. - for score in [0..@max_score] - id = 'score-' + score - label = """""" - input = """ - - """ # " fix broken parsing in emacs - @grade_selection_container.append(input + label) - $('.grade-selection').click => @graded_callback() - @score_selection_container.html(@rubric) $('.score-selection').click => @graded_callback() From 1fef6b161b767fddc88aac4194cfac7792b82cd0 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 11:21:56 -0500 Subject: [PATCH 056/347] Add in some better encouragement to write feedback --- lms/templates/instructor/staff_grading.html | 1 + lms/templates/peer_grading/peer_grading_problem.html | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lms/templates/instructor/staff_grading.html b/lms/templates/instructor/staff_grading.html index 56aed5a54a..dcfece34b8 100644 --- a/lms/templates/instructor/staff_grading.html +++ b/lms/templates/instructor/staff_grading.html @@ -75,6 +75,7 @@

    +

    Written Feedback

    diff --git a/lms/templates/peer_grading/peer_grading_problem.html b/lms/templates/peer_grading/peer_grading_problem.html index cb9ed1c0fb..ae630f118e 100644 --- a/lms/templates/peer_grading/peer_grading_problem.html +++ b/lms/templates/peer_grading/peer_grading_problem.html @@ -70,7 +70,9 @@

    -
    From 2b764eebad0dd892f894ca3abb7f68b0be3e63c1 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 11:27:53 -0500 Subject: [PATCH 057/347] Make the rubric for self-assessment selectable and remove the separate grade selection. --- .../js/src/combinedopenended/display.coffee | 6 +++--- .../xmodule/xmodule/self_assessment_module.py | 2 +- .../src/peer_grading/peer_grading_problem.coffee | 1 - lms/templates/self_assessment_rubric.html | 16 ---------------- 4 files changed, 4 insertions(+), 21 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee index 576fb7290d..9add338137 100644 --- a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee @@ -208,9 +208,9 @@ class @CombinedOpenEnded save_assessment: (event) => event.preventDefault() - if @child_state == 'assessing' - checked_assessment = @$('input[name="grade-selection"]:checked') - data = {'assessment' : checked_assessment.val()} + if @child_state == 'assessing' && Rubric.check_complete() + checked_assessment = Rubric.get_total_score() + data = {'assessment' : checked_assessment} $.postWithPrefix "#{@ajax_url}/save_assessment", data, (response) => if response.success @child_state = response.state diff --git a/common/lib/xmodule/xmodule/self_assessment_module.py b/common/lib/xmodule/xmodule/self_assessment_module.py index fb1d306708..a288fa55b3 100644 --- a/common/lib/xmodule/xmodule/self_assessment_module.py +++ b/common/lib/xmodule/xmodule/self_assessment_module.py @@ -122,7 +122,7 @@ class SelfAssessmentModule(openendedchild.OpenEndedChild): if self.state == self.INITIAL: return '' - rubric_renderer = CombinedOpenEndedRubric(system, True) + rubric_renderer = CombinedOpenEndedRubric(system, False) rubric_html = rubric_renderer.render_rubric(self.rubric) # we'll render it diff --git a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee index f4b9bdbe78..f803c74c7b 100644 --- a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee +++ b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee @@ -426,7 +426,6 @@ class PeerGradingProblem @submit_button.show() setup_score_selection: (max_score) => - # And now hook up an event handler again $("input[name='score-selection']").change @graded_callback diff --git a/lms/templates/self_assessment_rubric.html b/lms/templates/self_assessment_rubric.html index b4fc125232..2986c5041a 100644 --- a/lms/templates/self_assessment_rubric.html +++ b/lms/templates/self_assessment_rubric.html @@ -2,20 +2,4 @@
    ${rubric | n }
    - - % if not read_only: -
    -

    Scoring

    -

    Please select a score below:

    - -
    - %for i in xrange(0,max_score+1): - <% id = "score-{0}".format(i) %> - - - %endfor -
    -
    - % endif -
    From 8fd32ed5026f9fb4fd287958acef933373c2797e Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 1 Feb 2013 13:01:54 -0500 Subject: [PATCH 058/347] update to show cohort name on create and cohort name on view all threads, added cohort dictionary to convert ids to names --- common/djangoapps/course_groups/cohorts.py | 6 +----- lms/djangoapps/django_comment_client/base/views.py | 2 +- .../django_comment_client/forum/views.py | 11 +++++++++-- lms/static/sass/_discussion.scss | 14 +++++++++----- lms/templates/discussion/_new_post.html | 4 ++-- lms/templates/discussion/_single_thread.html | 5 ++++- .../discussion/_underscore_templates.html | 4 +++- 7 files changed, 29 insertions(+), 17 deletions(-) diff --git a/common/djangoapps/course_groups/cohorts.py b/common/djangoapps/course_groups/cohorts.py index 4d74f70b26..6bb4ad7413 100644 --- a/common/djangoapps/course_groups/cohorts.py +++ b/common/djangoapps/course_groups/cohorts.py @@ -21,8 +21,7 @@ def is_course_cohorted(course_id): Raises: Http404 if the course doesn't exist. """ - #return courses.get_course_by_id(course_id).is_cohorted - return True + return courses.get_course_by_id(course_id).is_cohorted def get_cohort_id(user, course_id): @@ -30,9 +29,6 @@ def get_cohort_id(user, course_id): Given a course id and a user, return the id of the cohort that user is assigned to in that course. If they don't have a cohort, return None. """ - print "\n\n\n\n\n*********************************" - print user - print course_id cohort = get_cohort(user, course_id) return None if cohort is None else cohort.id diff --git a/lms/djangoapps/django_comment_client/base/views.py b/lms/djangoapps/django_comment_client/base/views.py index 7f0809cabb..ce53a8efbb 100644 --- a/lms/djangoapps/django_comment_client/base/views.py +++ b/lms/djangoapps/django_comment_client/base/views.py @@ -98,7 +98,7 @@ def create_thread(request, course_id, commentable_id): # TODO (vshnayder): once we have more than just cohorts, we'll want to # change this to a single get_group_for_user_and_commentable function # that can do different things depending on the commentable_id - if cached_has_permission(request.user, "see_all_cohorts", course_id) or True: + if cached_has_permission(request.user, "see_all_cohorts", course_id): # admins can optionally choose what group to post as group_id = post.get('group_id', user_group_id) else: diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 64ba703d55..c92324cbbb 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -152,6 +152,10 @@ def forum_form_discussion(request, course_id): #trending_tags = cc.search_trending_tags( # course_id, #) + cohorts = get_course_cohorts(course_id) + cohort_dictionary = dict() + for c in cohorts: + cohort_dictionary[c.id] = c.name context = { 'csrf': csrf(request)['csrf_token'], @@ -167,12 +171,15 @@ def forum_form_discussion(request, course_id): 'category_map': category_map, 'roles': saxutils.escape(json.dumps(utils.get_role_ids(course_id)), escapedict), 'is_moderator': cached_has_permission(request.user, "see_all_cohorts", course_id), - 'cohorts': get_course_cohorts(course_id), - 'cohort': get_cohort_id(user, course_id), + 'cohorts': cohorts, + 'cohort_map': cohort_dictionary, + 'user_cohort': get_cohort_id(user, course_id), 'cohorted_commentables': get_cohorted_commentables(course_id), 'is_course_cohorted': is_course_cohorted(course_id) } # print "start rendering.." + print "\n\n\n\n*******************************" + print context return render_to_response('discussion/index.html', context) @login_required diff --git a/lms/static/sass/_discussion.scss b/lms/static/sass/_discussion.scss index 2d7e5a8354..a914751280 100644 --- a/lms/static/sass/_discussion.scss +++ b/lms/static/sass/_discussion.scss @@ -1377,11 +1377,7 @@ body.discussion { margin-bottom: 20px; } - .group-visibility-label { - font-size: 12px; - color:#fff; - font-style: italic; - } + .responses { list-style: none; @@ -2438,3 +2434,11 @@ body.discussion { .discussion-user-threads { @extend .discussion-module } + + +.group-visibility-label { + font-size: 12px; + color:#000; + font-style: italic; + background-color:#fff; + } \ No newline at end of file diff --git a/lms/templates/discussion/_new_post.html b/lms/templates/discussion/_new_post.html index 1bc6148dbe..5b55d409df 100644 --- a/lms/templates/discussion/_new_post.html +++ b/lms/templates/discussion/_new_post.html @@ -55,10 +55,10 @@ %if is_moderator: %for c in cohorts: - + %endfor %else: - + %endif diff --git a/lms/templates/discussion/_single_thread.html b/lms/templates/discussion/_single_thread.html index 7f9dc84564..d4115668a8 100644 --- a/lms/templates/discussion/_single_thread.html +++ b/lms/templates/discussion/_single_thread.html @@ -5,7 +5,10 @@
    -
    This post visible only to group 1.
    + %if thread['group_id'] +
    This post visible only to group ${cohort_dictionary[thread['group_id']]}.
    + %endif + + ${thread['votes']['up_count']}

    ${thread['title']}

    diff --git a/lms/templates/discussion/_underscore_templates.html b/lms/templates/discussion/_underscore_templates.html index 105d677aba..be6e9a5a07 100644 --- a/lms/templates/discussion/_underscore_templates.html +++ b/lms/templates/discussion/_underscore_templates.html @@ -26,7 +26,9 @@

    -
    This post visible only to Group 1.
    + %if thread['group_id'] +
    This post visible only to Group ${cohort_dictionary[thread['group_id']]}.
    + %endif + ${'<%- votes["up_count"] %>'}

    ${'<%- title %>'}

    From 91d9bc05be2f20a8b09ebe1de9b6ae8edf2018d0 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 13:06:12 -0500 Subject: [PATCH 059/347] Fix bug in the callback --- lms/static/coffee/src/peer_grading/peer_grading_problem.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee index f803c74c7b..05d0189ac8 100644 --- a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee +++ b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee @@ -427,7 +427,7 @@ class PeerGradingProblem setup_score_selection: (max_score) => # And now hook up an event handler again - $("input[name='score-selection']").change @graded_callback + $("input[class='score-selection']").change @graded_callback From 00ffbc070adeb605d58efce4478969d620c06b0e Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 14:34:09 -0500 Subject: [PATCH 060/347] Make rubrics spacing smaller and fix a bug in the grading service renderer --- lms/djangoapps/open_ended_grading/grading_service.py | 2 +- lms/static/sass/course/_rubric.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/grading_service.py b/lms/djangoapps/open_ended_grading/grading_service.py index f65554a9d6..8e6209bf38 100644 --- a/lms/djangoapps/open_ended_grading/grading_service.py +++ b/lms/djangoapps/open_ended_grading/grading_service.py @@ -115,7 +115,7 @@ class GradingService(object): response_json = json.loads(response) if 'rubric' in response_json: rubric = response_json['rubric'] - rubric_renderer = CombinedOpenEndedRubric(self.system, False) + rubric_renderer = CombinedOpenEndedRubric(self.system, view_only) rubric_html = rubric_renderer.render_rubric(rubric) response_json['rubric'] = rubric_html return response_json diff --git a/lms/static/sass/course/_rubric.scss b/lms/static/sass/course/_rubric.scss index 722a790e6d..5048d70253 100644 --- a/lms/static/sass/course/_rubric.scss +++ b/lms/static/sass/course/_rubric.scss @@ -21,7 +21,7 @@ .rubric-label { position: relative; - padding: 15px 15px 25px; + padding: 0px 15px 15px 15px; width: 130px; min-height: 50px; min-width: 50px; From 69d5c005c30f64346b1f190b04e090f4c29436b3 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Thu, 31 Jan 2013 13:27:46 -0500 Subject: [PATCH 061/347] Refactor rubric CSS into a single file. --- .../css/combinedopenended/display.scss | 41 --------------- lms/static/sass/course.scss | 1 + lms/static/sass/course/_rubric.scss | 52 +++++++++++++++++++ lms/static/sass/course/_staff_grading.scss | 47 +---------------- 4 files changed, 54 insertions(+), 87 deletions(-) create mode 100644 lms/static/sass/course/_rubric.scss diff --git a/common/lib/xmodule/xmodule/css/combinedopenended/display.scss b/common/lib/xmodule/xmodule/css/combinedopenended/display.scss index a4045c9dad..1917471879 100644 --- a/common/lib/xmodule/xmodule/css/combinedopenended/display.scss +++ b/common/lib/xmodule/xmodule/css/combinedopenended/display.scss @@ -231,47 +231,6 @@ div.result-container { } } -div.result-container, section.open-ended-child { - .rubric { - margin-bottom:25px; - tr { - margin:10px 0px; - height: 100%; - } - td { - padding: 20px 0px 25px 0px; - margin: 10px 0px; - height: 100%; - } - th { - padding: 5px; - margin: 5px; - } - label, - .view-only { - margin:2px; - position: relative; - padding: 10px 15px 25px 15px; - width: 145px; - height:100%; - display: inline-block; - min-height: 50px; - min-width: 50px; - background-color: #CCC; - font-size: .85em; - } - .grade { - position: absolute; - bottom:0px; - right:0px; - margin:10px; - } - .selected-grade { - background: #666; - color: white; - } - } -} section.open-ended-child { @media print { diff --git a/lms/static/sass/course.scss b/lms/static/sass/course.scss index e900e589b2..d5f620be82 100644 --- a/lms/static/sass/course.scss +++ b/lms/static/sass/course.scss @@ -44,6 +44,7 @@ @import "course/gradebook"; @import "course/tabs"; @import "course/staff_grading"; +@import "course/rubric"; // instructor @import "course/instructor/instructor"; diff --git a/lms/static/sass/course/_rubric.scss b/lms/static/sass/course/_rubric.scss new file mode 100644 index 0000000000..c82d929fac --- /dev/null +++ b/lms/static/sass/course/_rubric.scss @@ -0,0 +1,52 @@ +.rubric { + padding: 40px 0px; + tr { + margin:10px 0px; + height: 100%; + } + td { + padding: 20px 0px 25px 0px; + height: 100%; + border: 1px black solid; + } + th { + padding: 5px; + margin: 5px; + text-align: center; + } + .points-header th { + padding: 0px; + } + label, + .view-only { + margin:2px; + position: relative; + padding: 15px 15px 25px 15px; + width: 130px; + height:100%; + min-height: 50px; + min-width: 50px; + font-size: .9em; + background-color: white; + display: block; + } + .grade { + position: absolute; + bottom:0px; + right:0px; + margin:10px; + } + .selected-grade { + background: #666; + color: white; + } + input[type=radio]:checked + label { + background: #666; + color: white; } + input[class='score-selection'] { + position: relative; + margin-left: 10px; + font-size: 16px; + } +} + diff --git a/lms/static/sass/course/_staff_grading.scss b/lms/static/sass/course/_staff_grading.scss index 177bd9e5e2..4d4da484de 100644 --- a/lms/static/sass/course/_staff_grading.scss +++ b/lms/static/sass/course/_staff_grading.scss @@ -12,7 +12,7 @@ div.peer-grading{ label { margin: 10px; padding: 5px; - display: inline-block; + @include inline-block; min-width: 50px; background-color: #CCC; text-size: 1.5em; @@ -176,49 +176,4 @@ div.peer-grading{ } } padding: 40px; - .rubric { - tr { - margin:10px 0px; - height: 100%; - } - td { - padding: 20px 0px 25px 0px; - height: 100%; - } - th { - padding: 5px; - margin: 5px; - } - label, - .view-only { - margin:2px; - position: relative; - padding: 15px 15px 25px 15px; - width: 150px; - height:100%; - display: inline-block; - min-height: 50px; - min-width: 50px; - background-color: #CCC; - font-size: .9em; - } - .grade { - position: absolute; - bottom:0px; - right:0px; - margin:10px; - } - .selected-grade { - background: #666; - color: white; - } - input[type=radio]:checked + label { - background: #666; - color: white; } - input[class='score-selection'] { - display: none; - } - } - } - From 7e345ce51278810337f15101d931c5cebf35aac8 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Thu, 31 Jan 2013 13:28:19 -0500 Subject: [PATCH 062/347] Add scores to the top of the rubric, remove from individual cells --- common/lib/xmodule/xmodule/combined_open_ended_rubric.py | 5 ++++- lms/templates/open_ended_rubric.html | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_rubric.py b/common/lib/xmodule/xmodule/combined_open_ended_rubric.py index 4380e32d5b..50ec22f033 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_rubric.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_rubric.py @@ -25,10 +25,13 @@ class CombinedOpenEndedRubric(object): ''' try: rubric_categories = self.extract_categories(rubric_xml) + max_scores = map((lambda cat: cat['options'][-1]['points']), rubric_categories) + max_score = max(max_scores) html = self.system.render_template('open_ended_rubric.html', {'categories' : rubric_categories, 'has_score': self.has_score, - 'view_only': self.view_only}) + 'view_only': self.view_only, + 'max_score': max_score}) except: raise RubricParsingError("[render_rubric] Could not parse the rubric with xml: {0}".format(rubric_xml)) return html diff --git a/lms/templates/open_ended_rubric.html b/lms/templates/open_ended_rubric.html index 8d40c7d2b8..b92ad04bde 100644 --- a/lms/templates/open_ended_rubric.html +++ b/lms/templates/open_ended_rubric.html @@ -8,6 +8,14 @@

    Select the criteria you feel best represents this submission in each category.

    % endif + + + % for i in range(max_score + 1): + + % endfor + % for i in range(len(categories)): <% category = categories[i] %> @@ -23,7 +31,6 @@
    % endif ${option['text']} -
    [${option['points']} points]
    % else: From 1fde3c5ec5821b0fe69ac4799bb319659bbb9fa2 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Thu, 31 Jan 2013 14:23:17 -0500 Subject: [PATCH 063/347] Make rubric cleaner and visually simpler --- lms/static/sass/course/_rubric.scss | 17 ++++++++--------- lms/templates/open_ended_rubric.html | 6 +++--- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/lms/static/sass/course/_rubric.scss b/lms/static/sass/course/_rubric.scss index c82d929fac..9aa0ca2f2a 100644 --- a/lms/static/sass/course/_rubric.scss +++ b/lms/static/sass/course/_rubric.scss @@ -1,5 +1,5 @@ .rubric { - padding: 40px 0px; + margin: 40px 0px; tr { margin:10px 0px; height: 100%; @@ -8,6 +8,7 @@ padding: 20px 0px 25px 0px; height: 100%; border: 1px black solid; + text-align: center; } th { padding: 5px; @@ -17,13 +18,11 @@ .points-header th { padding: 0px; } - label, - .view-only { - margin:2px; + .rubric-label + { position: relative; - padding: 15px 15px 25px 15px; + padding: 15px 15px 25px; width: 130px; - height:100%; min-height: 50px; min-width: 50px; font-size: .9em; @@ -40,9 +39,9 @@ background: #666; color: white; } - input[type=radio]:checked + label { - background: #666; - color: white; } + input[type=radio]:checked + .rubric-label { + background: white; + color: $base-font-color; } input[class='score-selection'] { position: relative; margin-left: 10px; diff --git a/lms/templates/open_ended_rubric.html b/lms/templates/open_ended_rubric.html index b92ad04bde..a2d8d6945c 100644 --- a/lms/templates/open_ended_rubric.html +++ b/lms/templates/open_ended_rubric.html @@ -26,15 +26,15 @@ % if view_only: ## if this is the selected rubric block, show it highlighted % if option['selected']: -
    +
    % else: -
    +
    % endif ${option['text']}
    % else: - + % endif % endfor From 92b7dbdc69e7b2fc177dd2ff2085df22a4d24a25 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 08:43:55 -0500 Subject: [PATCH 064/347] Refactor rubric JS so that we don't have to keep duplicating this code. --- .../js/src/combinedopenended/display.coffee | 29 +++++++++++++++ .../peer_grading/peer_grading_problem.coffee | 15 ++------ .../src/staff_grading/staff_grading.coffee | 37 ++++--------------- 3 files changed, 41 insertions(+), 40 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee index 594efe2f9b..c4560559c8 100644 --- a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee @@ -1,3 +1,32 @@ +class @Rubric + constructor: () -> + + # finds the scores for each rubric category + @get_score_list: () => + # find the number of categories: + num_categories = $('table.rubric tr').length + + score_lst = [] + # get the score for each one + for i in [0..(num_categories-2)] + score = $("input[name='score-selection-#{i}']:checked").val() + score_lst.push(score) + + return score_lst + + @get_total_score: () -> + score_lst = @get_score_list() + + @check_complete: () -> + # check to see whether or not any categories have not been scored + num_categories = $('table.rubric tr').length + # -2 because we want to skip the header + for i in [0..(num_categories-2)] + score = $("input[name='score-selection-#{i}']:checked").val() + if score == undefined + return false + return true + class @CombinedOpenEnded constructor: (element) -> @element=element diff --git a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee index c4b87eb30e..525891bb03 100644 --- a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee +++ b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee @@ -239,7 +239,7 @@ class PeerGradingProblem score_lst = [] # get the score for each one - for i in [0..(num_categories-1)] + for i in [0..(num_categories-2)] score = $("input[name='score-selection-#{i}']:checked").val() score_lst.push(score) @@ -315,17 +315,10 @@ class PeerGradingProblem # called after a grade is selected on the interface graded_callback: (event) => - @grade = $("input[name='grade-selection']:checked").val() - if @grade == undefined - return # check to see whether or not any categories have not been scored - num_categories = $('table.rubric tr').length - for i in [0..(num_categories-1)] - score = $("input[name='score-selection-#{i}']:checked").val() - if score == undefined - return - # show button if we have scores for all categories - @show_submit_button() + if Rubric.check_complete(): + # show button if we have scores for all categories + @show_submit_button() diff --git a/lms/static/coffee/src/staff_grading/staff_grading.coffee b/lms/static/coffee/src/staff_grading/staff_grading.coffee index 005a8e682e..2d3cafd3e7 100644 --- a/lms/static/coffee/src/staff_grading/staff_grading.coffee +++ b/lms/static/coffee/src/staff_grading/staff_grading.coffee @@ -232,35 +232,14 @@ class @StaffGrading graded_callback: () => - @grade = $("input[name='grade-selection']:checked").val() - if @grade == undefined - return - # check to see whether or not any categories have not been scored - num_categories = $('table.rubric tr').length - for i in [0..(num_categories-1)] - score = $("input[name='score-selection-#{i}']:checked").val() - if score == undefined - return - # show button if we have scores for all categories - @state = state_graded - @submit_button.show() + # show button if we have scores for all categories + if Rubric.check_complete() + @state = state_graded + @submit_button.show() set_button_text: (text) => @action_button.attr('value', text) - # finds the scores for each rubric category - get_score_list: () => - # find the number of categories: - num_categories = $('table.rubric tr').length - - score_lst = [] - # get the score for each one - for i in [0..(num_categories-1)] - score = $("input[name='score-selection-#{i}']:checked").val() - score_lst.push(score) - - return score_lst - ajax_callback: (response) => # always clear out errors and messages on transition. @error_msg = '' @@ -285,8 +264,8 @@ class @StaffGrading skip_and_get_next: () => data = - score: @grade - rubric_scores: @get_score_list() + score: Rubric.get_total_score() + rubric_scores: Rubric.get_score_list() feedback: @feedback_area.val() submission_id: @submission_id location: @location @@ -299,8 +278,8 @@ class @StaffGrading submit_and_get_next: () -> data = - score: @grade - rubric_scores: @get_score_list() + score: Rubric.get_total_score() + rubric_scores: Rubric.get_score_list() feedback: @feedback_area.val() submission_id: @submission_id location: @location From 0bae98398202d798f69154aeaa77e99581739f13 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 08:44:08 -0500 Subject: [PATCH 065/347] Visual updates to rubric --- lms/static/sass/course/_rubric.scss | 3 ++- lms/templates/open_ended_rubric.html | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lms/static/sass/course/_rubric.scss b/lms/static/sass/course/_rubric.scss index 9aa0ca2f2a..722a790e6d 100644 --- a/lms/static/sass/course/_rubric.scss +++ b/lms/static/sass/course/_rubric.scss @@ -35,7 +35,8 @@ right:0px; margin:10px; } - .selected-grade { + .selected-grade, + .selected-grade .rubric-label { background: #666; color: white; } diff --git a/lms/templates/open_ended_rubric.html b/lms/templates/open_ended_rubric.html index a2d8d6945c..eb3fc564b4 100644 --- a/lms/templates/open_ended_rubric.html +++ b/lms/templates/open_ended_rubric.html @@ -22,14 +22,14 @@
    % for j in range(len(category['options'])): <% option = category['options'][j] %> + %if option['selected']: + %for problem in problem_list: - + @@ -50,12 +50,6 @@ - - %endfor
    + ${i} points +
    ${category['description']} + %else: + % endif % if view_only: ## if this is the selected rubric block, show it highlighted - % if option['selected']: -
    - % else:
    - % endif ${option['text']}
    % else: From ba30c2ce58b9478483ced3857b39a4d1d9b88235 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 10:17:16 -0500 Subject: [PATCH 066/347] Calculate the total score from the rubric. --- .../xmodule/xmodule/js/src/combinedopenended/display.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee index c4560559c8..576fb7290d 100644 --- a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee @@ -16,6 +16,10 @@ class @Rubric @get_total_score: () -> score_lst = @get_score_list() + tot = 0 + for score in score_lst + tot += parseInt(score) + return tot @check_complete: () -> # check to see whether or not any categories have not been scored From 745c05277521ef57593de2071b3afeeb4e786a24 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 10:31:46 -0500 Subject: [PATCH 067/347] Remove duplicate Javascript and remove total grade selection. --- .../peer_grading/peer_grading_problem.coffee | 35 ++----------------- .../src/staff_grading/staff_grading.coffee | 15 -------- 2 files changed, 3 insertions(+), 47 deletions(-) diff --git a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee index 525891bb03..f4b9bdbe78 100644 --- a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee +++ b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee @@ -232,23 +232,11 @@ class PeerGradingProblem fetch_submission_essay: () => @backend.post('get_next_submission', {location: @location}, @render_submission) - # finds the scores for each rubric category - get_score_list: () => - # find the number of categories: - num_categories = $('table.rubric tr').length - - score_lst = [] - # get the score for each one - for i in [0..(num_categories-2)] - score = $("input[name='score-selection-#{i}']:checked").val() - score_lst.push(score) - - return score_lst construct_data: () -> data = - rubric_scores: @get_score_list() - score: @grade + rubric_scores: Rubric.get_score_list() + score: Rubric.get_total_score() location: @location submission_id: @essay_id_input.val() submission_key: @submission_key_input.val() @@ -316,7 +304,7 @@ class PeerGradingProblem # called after a grade is selected on the interface graded_callback: (event) => # check to see whether or not any categories have not been scored - if Rubric.check_complete(): + if Rubric.check_complete() # show button if we have scores for all categories @show_submit_button() @@ -439,25 +427,8 @@ class PeerGradingProblem setup_score_selection: (max_score) => - # first, get rid of all the old inputs, if any. - @score_selection_container.html(""" -

    Overall Score

    -

    Choose an overall score for this submission.

    - """) - - # Now create new labels and inputs for each possible score. - for score in [0..max_score] - id = 'score-' + score - label = """""" - - input = """ - - """ # " fix broken parsing in emacs - @score_selection_container.append(input + label) - # And now hook up an event handler again $("input[name='score-selection']").change @graded_callback - $("input[name='grade-selection']").change @graded_callback diff --git a/lms/static/coffee/src/staff_grading/staff_grading.coffee b/lms/static/coffee/src/staff_grading/staff_grading.coffee index 2d3cafd3e7..117388bab0 100644 --- a/lms/static/coffee/src/staff_grading/staff_grading.coffee +++ b/lms/static/coffee/src/staff_grading/staff_grading.coffee @@ -212,21 +212,6 @@ class @StaffGrading setup_score_selection: => - # first, get rid of all the old inputs, if any. - @grade_selection_container.html(""" -

    Overall Score

    -

    Choose an overall score for this submission.

    - """) - # Now create new labels and inputs for each possible score. - for score in [0..@max_score] - id = 'score-' + score - label = """""" - input = """ - - """ # " fix broken parsing in emacs - @grade_selection_container.append(input + label) - $('.grade-selection').click => @graded_callback() - @score_selection_container.html(@rubric) $('.score-selection').click => @graded_callback() From 68fc794a9757b66ddd92166a5529d02050115849 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 11:21:56 -0500 Subject: [PATCH 068/347] Add in some better encouragement to write feedback --- lms/templates/instructor/staff_grading.html | 1 + lms/templates/peer_grading/peer_grading_problem.html | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lms/templates/instructor/staff_grading.html b/lms/templates/instructor/staff_grading.html index 56aed5a54a..dcfece34b8 100644 --- a/lms/templates/instructor/staff_grading.html +++ b/lms/templates/instructor/staff_grading.html @@ -75,6 +75,7 @@

    +

    Written Feedback

    diff --git a/lms/templates/peer_grading/peer_grading_problem.html b/lms/templates/peer_grading/peer_grading_problem.html index cb9ed1c0fb..ae630f118e 100644 --- a/lms/templates/peer_grading/peer_grading_problem.html +++ b/lms/templates/peer_grading/peer_grading_problem.html @@ -70,7 +70,9 @@

    - From 1c5c54c862fb106b1efda09a1da35367e7fe35cc Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 11:27:53 -0500 Subject: [PATCH 069/347] Make the rubric for self-assessment selectable and remove the separate grade selection. --- .../js/src/combinedopenended/display.coffee | 6 +++--- .../xmodule/xmodule/self_assessment_module.py | 2 +- .../src/peer_grading/peer_grading_problem.coffee | 1 - lms/templates/self_assessment_rubric.html | 16 ---------------- 4 files changed, 4 insertions(+), 21 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee index 576fb7290d..9add338137 100644 --- a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee @@ -208,9 +208,9 @@ class @CombinedOpenEnded save_assessment: (event) => event.preventDefault() - if @child_state == 'assessing' - checked_assessment = @$('input[name="grade-selection"]:checked') - data = {'assessment' : checked_assessment.val()} + if @child_state == 'assessing' && Rubric.check_complete() + checked_assessment = Rubric.get_total_score() + data = {'assessment' : checked_assessment} $.postWithPrefix "#{@ajax_url}/save_assessment", data, (response) => if response.success @child_state = response.state diff --git a/common/lib/xmodule/xmodule/self_assessment_module.py b/common/lib/xmodule/xmodule/self_assessment_module.py index fb1d306708..a288fa55b3 100644 --- a/common/lib/xmodule/xmodule/self_assessment_module.py +++ b/common/lib/xmodule/xmodule/self_assessment_module.py @@ -122,7 +122,7 @@ class SelfAssessmentModule(openendedchild.OpenEndedChild): if self.state == self.INITIAL: return '' - rubric_renderer = CombinedOpenEndedRubric(system, True) + rubric_renderer = CombinedOpenEndedRubric(system, False) rubric_html = rubric_renderer.render_rubric(self.rubric) # we'll render it diff --git a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee index f4b9bdbe78..f803c74c7b 100644 --- a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee +++ b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee @@ -426,7 +426,6 @@ class PeerGradingProblem @submit_button.show() setup_score_selection: (max_score) => - # And now hook up an event handler again $("input[name='score-selection']").change @graded_callback diff --git a/lms/templates/self_assessment_rubric.html b/lms/templates/self_assessment_rubric.html index b4fc125232..2986c5041a 100644 --- a/lms/templates/self_assessment_rubric.html +++ b/lms/templates/self_assessment_rubric.html @@ -2,20 +2,4 @@
    ${rubric | n }
    - - % if not read_only: -
    -

    Scoring

    -

    Please select a score below:

    - -
    - %for i in xrange(0,max_score+1): - <% id = "score-{0}".format(i) %> - - - %endfor -
    -
    - % endif - From 71c233af15d4cc0c06af8bfd3d263a8678f9b7d0 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 13:06:12 -0500 Subject: [PATCH 070/347] Fix bug in the callback --- lms/static/coffee/src/peer_grading/peer_grading_problem.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee index f803c74c7b..05d0189ac8 100644 --- a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee +++ b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee @@ -427,7 +427,7 @@ class PeerGradingProblem setup_score_selection: (max_score) => # And now hook up an event handler again - $("input[name='score-selection']").change @graded_callback + $("input[class='score-selection']").change @graded_callback From a85d43a8170d6b00d1a9232ce665fd558d83bb1f Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Fri, 1 Feb 2013 14:34:09 -0500 Subject: [PATCH 071/347] Make rubrics spacing smaller and fix a bug in the grading service renderer --- lms/djangoapps/open_ended_grading/grading_service.py | 2 +- lms/static/sass/course/_rubric.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/grading_service.py b/lms/djangoapps/open_ended_grading/grading_service.py index f65554a9d6..8e6209bf38 100644 --- a/lms/djangoapps/open_ended_grading/grading_service.py +++ b/lms/djangoapps/open_ended_grading/grading_service.py @@ -115,7 +115,7 @@ class GradingService(object): response_json = json.loads(response) if 'rubric' in response_json: rubric = response_json['rubric'] - rubric_renderer = CombinedOpenEndedRubric(self.system, False) + rubric_renderer = CombinedOpenEndedRubric(self.system, view_only) rubric_html = rubric_renderer.render_rubric(rubric) response_json['rubric'] = rubric_html return response_json diff --git a/lms/static/sass/course/_rubric.scss b/lms/static/sass/course/_rubric.scss index 722a790e6d..5048d70253 100644 --- a/lms/static/sass/course/_rubric.scss +++ b/lms/static/sass/course/_rubric.scss @@ -21,7 +21,7 @@ .rubric-label { position: relative; - padding: 15px 15px 25px; + padding: 0px 15px 15px 15px; width: 130px; min-height: 50px; min-width: 50px; From 9d98b7055de26a4f70f0e987c8f682786564441d Mon Sep 17 00:00:00 2001 From: Brian Wilson Date: Fri, 1 Feb 2013 17:52:14 -0500 Subject: [PATCH 072/347] add course navigation back into timed exam. Add initial timer styling. --- lms/djangoapps/courseware/views.py | 12 +++++--- lms/static/sass/course.scss | 2 +- lms/static/sass/course/layout/_timer.scss | 11 +++++++ lms/templates/courseware/testcenter_exam.html | 29 +++++++++++++++++-- lms/urls.py | 6 ++++ 5 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 lms/static/sass/course/layout/_timer.scss diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index 1ac7cebd4b..47942f3a63 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -352,7 +352,6 @@ def timed_exam(request, course_id, chapter, section): context = { 'csrf': csrf(request)['csrf_token'], - # 'accordion': render_accordion(request, course, chapter, section), 'COURSE_TITLE': course.title, 'course': course, 'init': '', @@ -361,6 +360,11 @@ def timed_exam(request, course_id, chapter, section): 'xqa_server': settings.MITX_FEATURES.get('USE_XQA_SERVER','http://xqa:server@content-qa.mitx.mit.edu/xqa') } + # in general, we may want to disable accordion display on timed exams. + provide_accordion = True + if provide_accordion: + context['accordion'] = render_accordion(request, course, chapter, section) + chapter_descriptor = course.get_child_by(lambda m: m.url_name == chapter) if chapter_descriptor is not None: instance_module = get_instance_module(course_id, request.user, course_module, student_module_cache) @@ -387,9 +391,9 @@ def timed_exam(request, course_id, chapter, section): # they don't have access to. raise Http404 - # Save where we are in the chapter NOT! -# instance_module = get_instance_module(course_id, request.user, chapter_module, student_module_cache) -# save_child_position(chapter_module, section, instance_module) + # Save where we are in the chapter: + instance_module = get_instance_module(course_id, request.user, chapter_module, student_module_cache) + save_child_position(chapter_module, section, instance_module) context['content'] = section_module.get_html() diff --git a/lms/static/sass/course.scss b/lms/static/sass/course.scss index e900e589b2..7c2522a194 100644 --- a/lms/static/sass/course.scss +++ b/lms/static/sass/course.scss @@ -22,7 +22,7 @@ @import 'course/courseware/sidebar'; @import 'course/courseware/amplifier'; @import 'course/layout/calculator'; - +@import 'course/layout/timer'; // course-specific courseware (all styles in these files should be gated by a // course-specific class). This should be replaced with a better way of diff --git a/lms/static/sass/course/layout/_timer.scss b/lms/static/sass/course/layout/_timer.scss new file mode 100644 index 0000000000..01d62d87c7 --- /dev/null +++ b/lms/static/sass/course/layout/_timer.scss @@ -0,0 +1,11 @@ +div.timer-main { + position: fixed; + z-index: 99; + width: 100%; + + div#timer_wrapper { + position: relative; + float: right; + margin-right: 10px; + } +} diff --git a/lms/templates/courseware/testcenter_exam.html b/lms/templates/courseware/testcenter_exam.html index 638778f7cd..d2f74ab296 100644 --- a/lms/templates/courseware/testcenter_exam.html +++ b/lms/templates/courseware/testcenter_exam.html @@ -78,6 +78,7 @@ // TBD... if (remaining_secs <= 0) { return "00:00:00"; + // do we just set window.location = value? } // count down in terms of hours, minutes, and seconds: @@ -104,19 +105,41 @@ - +
    +
    +
    Time Remaining:
     
    +
    +
    + +% if accordion: + <%include file="/courseware/course_navigation.html" args="active_page='courseware'" /> +% endif - 
    +
    + +% if accordion: +
    +
    + close +
    + + +
    +% endif +
    ${content}
    - % if course.show_calculator:
    Calculator diff --git a/lms/urls.py b/lms/urls.py index 021079333a..f6819d05a2 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -220,6 +220,12 @@ if settings.COURSEWARE_ENABLED: # timed exam: url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/timed_exam/(?P[^/]*)/(?P
    [^/]*)/$', 'courseware.views.timed_exam', name="timed_exam"), + # (handle hard-coded 6.002x exam explicitly as a timed exam, but without changing the URL. + # not only because Pearson doesn't want us to change its location, but because we also include it + # in the navigation accordion we display with this exam (so students can see what work they have already + # done). Those are generated automatically using reverse(courseware_section). + url(r'^courses/(?PMITx/6.002x/2012_Fall)/courseware/(?PFinal_Exam)/(?P
    Final_Exam_Fall_2012)/$', + 'courseware.views.timed_exam'), #Inside the course url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/$', From fcbd4bd1cd5ed1b83cd000f3f58fa4d45beeddcc Mon Sep 17 00:00:00 2001 From: Kevin Chugh Date: Sat, 2 Feb 2013 05:46:11 -0500 Subject: [PATCH 073/347] produce and consume group_id from dropdowns --- .../django_comment_client/base/views.py | 23 +++++++++++-------- .../django_comment_client/forum/views.py | 2 -- lms/djangoapps/django_comment_client/utils.py | 2 +- lms/templates/discussion/_new_post.html | 2 +- .../discussion/_underscore_templates.html | 2 +- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/lms/djangoapps/django_comment_client/base/views.py b/lms/djangoapps/django_comment_client/base/views.py index ce53a8efbb..604fe60282 100644 --- a/lms/djangoapps/django_comment_client/base/views.py +++ b/lms/djangoapps/django_comment_client/base/views.py @@ -86,27 +86,32 @@ def create_thread(request, course_id, commentable_id): 'anonymous_to_peers' : anonymous_to_peers, 'commentable_id' : commentable_id, 'course_id' : course_id, - 'user_id' : request.user.id, + 'user_id' : request.user.id }) user = cc.User.from_django_user(request.user) + #kevinchugh because the new requirement is that all groups will be determined + #by the group id in the request this all goes away + # Cohort the thread if the commentable is cohorted. - if is_commentable_cohorted(course_id, commentable_id): - user_group_id = get_cohort_id(user, course_id) + #if is_commentable_cohorted(course_id, commentable_id): + # user_group_id = get_cohort_id(user, course_id) # TODO (vshnayder): once we have more than just cohorts, we'll want to # change this to a single get_group_for_user_and_commentable function # that can do different things depending on the commentable_id - if cached_has_permission(request.user, "see_all_cohorts", course_id): + # if cached_has_permission(request.user, "see_all_cohorts", course_id): # admins can optionally choose what group to post as - group_id = post.get('group_id', user_group_id) - else: + # group_id = post.get('group_id', user_group_id) + # else: # regular users always post with their own id. - group_id = user_group_id - thread.update_attributes(group_id=group_id) - + # group_id = user_group_id + if post['group_id']: + thread.update_attributes(group_id=post['group_id']) + thread.save() + print thread if post.get('auto_subscribe', 'false').lower() == 'true': user = cc.User.from_django_user(request.user) user.follow(thread) diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index c92324cbbb..fa07394c90 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -178,8 +178,6 @@ def forum_form_discussion(request, course_id): 'is_course_cohorted': is_course_cohorted(course_id) } # print "start rendering.." - print "\n\n\n\n*******************************" - print context return render_to_response('discussion/index.html', context) @login_required diff --git a/lms/djangoapps/django_comment_client/utils.py b/lms/djangoapps/django_comment_client/utils.py index 3c9669ac37..07d8ef9660 100644 --- a/lms/djangoapps/django_comment_client/utils.py +++ b/lms/djangoapps/django_comment_client/utils.py @@ -374,7 +374,7 @@ def safe_content(content): 'updated_at', 'depth', 'type', 'commentable_id', 'comments_count', 'at_position_list', 'children', 'highlighted_title', 'highlighted_body', 'courseware_title', 'courseware_url', 'tags', 'unread_comments_count', - 'read', + 'read', 'group_id' ] if (content.get('anonymous') is False) and (content.get('anonymous_to_peers') is False): diff --git a/lms/templates/discussion/_new_post.html b/lms/templates/discussion/_new_post.html index 5b55d409df..a009f19350 100644 --- a/lms/templates/discussion/_new_post.html +++ b/lms/templates/discussion/_new_post.html @@ -52,7 +52,7 @@
    Make visible to: +

    +

    Problem urlname: + + +

    +
    +%endif + +##----------------------------------------------------------------------------- + %if modeflag.get('Manage Groups'): %if instructor_access:
    From 1685f302ab7721be80634ae2f68154d74d452cd2 Mon Sep 17 00:00:00 2001 From: Brian Wilson Date: Mon, 4 Feb 2013 02:22:24 -0500 Subject: [PATCH 075/347] add TimerModule to courseware --- .../migrations/0006_add_timed_module.py | 119 ++++++++++++++++++ lms/djangoapps/courseware/models.py | 88 ++++++++++++- lms/djangoapps/courseware/views.py | 50 +++++++- 3 files changed, 245 insertions(+), 12 deletions(-) create mode 100644 lms/djangoapps/courseware/migrations/0006_add_timed_module.py diff --git a/lms/djangoapps/courseware/migrations/0006_add_timed_module.py b/lms/djangoapps/courseware/migrations/0006_add_timed_module.py new file mode 100644 index 0000000000..89b63cf659 --- /dev/null +++ b/lms/djangoapps/courseware/migrations/0006_add_timed_module.py @@ -0,0 +1,119 @@ +# -*- coding: utf-8 -*- +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + + +class Migration(SchemaMigration): + + def forwards(self, orm): + # Adding model 'TimedModule' + db.create_table('courseware_timedmodule', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('module_state_key', self.gf('django.db.models.fields.CharField')(max_length=255, db_column='module_id', db_index=True)), + ('student', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), + ('course_id', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)), + ('accommodation_code', self.gf('django.db.models.fields.CharField')(default='NONE', max_length=12, db_index=True)), + ('beginning_at', self.gf('django.db.models.fields.DateTimeField')(null=True, db_index=True)), + ('ending_at', self.gf('django.db.models.fields.DateTimeField')(null=True, db_index=True)), + ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)), + ('modified_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, db_index=True, blank=True)), + )) + db.send_create_signal('courseware', ['TimedModule']) + + # Adding unique constraint on 'TimedModule', fields ['student', 'module_state_key', 'course_id'] + db.create_unique('courseware_timedmodule', ['student_id', 'module_id', 'course_id']) + + + def backwards(self, orm): + # Removing unique constraint on 'TimedModule', fields ['student', 'module_state_key', 'course_id'] + db.delete_unique('courseware_timedmodule', ['student_id', 'module_id', 'course_id']) + + # Deleting model 'TimedModule' + db.delete_table('courseware_timedmodule') + + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'courseware.offlinecomputedgrade': { + 'Meta': {'unique_together': "(('user', 'course_id'),)", 'object_name': 'OfflineComputedGrade'}, + 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), + 'gradeset': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'courseware.offlinecomputedgradelog': { + 'Meta': {'ordering': "['-created']", 'object_name': 'OfflineComputedGradeLog'}, + 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'db_index': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'nstudents': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'seconds': ('django.db.models.fields.IntegerField', [], {'default': '0'}) + }, + 'courseware.studentmodule': { + 'Meta': {'unique_together': "(('student', 'module_state_key', 'course_id'),)", 'object_name': 'StudentModule'}, + 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), + 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), + 'done': ('django.db.models.fields.CharField', [], {'default': "'na'", 'max_length': '8', 'db_index': 'True'}), + 'grade': ('django.db.models.fields.FloatField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'max_grade': ('django.db.models.fields.FloatField', [], {'null': 'True', 'blank': 'True'}), + 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), + 'module_state_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_column': "'module_id'", 'db_index': 'True'}), + 'module_type': ('django.db.models.fields.CharField', [], {'default': "'problem'", 'max_length': '32', 'db_index': 'True'}), + 'state': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), + 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'courseware.timedmodule': { + 'Meta': {'unique_together': "(('student', 'module_state_key', 'course_id'),)", 'object_name': 'TimedModule'}, + 'accommodation_code': ('django.db.models.fields.CharField', [], {'default': "'NONE'", 'max_length': '12', 'db_index': 'True'}), + 'beginning_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), + 'course_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}), + 'ending_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'db_index': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}), + 'module_state_key': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_column': "'module_id'", 'db_index': 'True'}), + 'student': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + } + } + + complete_apps = ['courseware'] \ No newline at end of file diff --git a/lms/djangoapps/courseware/models.py b/lms/djangoapps/courseware/models.py index 21ef8b3d66..bd2da02027 100644 --- a/lms/djangoapps/courseware/models.py +++ b/lms/djangoapps/courseware/models.py @@ -12,15 +12,12 @@ file and check it in at the same time as your model changes. To do that, ASSUMPTIONS: modules have unique IDs, even across different module_types """ +from datetime import datetime, timedelta +from calendar import timegm + from django.db import models -#from django.core.cache import cache from django.contrib.auth.models import User -#from cache_toolbox import cache_model, cache_relation - -#CACHE_TIMEOUT = 60 * 60 * 4 # Set the cache timeout to be four hours - - class StudentModule(models.Model): """ Keeps student state for a particular module in a particular course. @@ -214,3 +211,82 @@ class OfflineComputedGradeLog(models.Model): def __unicode__(self): return "[OCGLog] %s: %s" % (self.course_id, self.created) + +class TimedModule(models.Model): + """ + Keeps student state for a timed activity in a particular course. + Includes information about time accommodations granted, + time started, and ending time. + """ + ## These three are the key for the object + + # Key used to share state. By default, this is the module_id, + # but for abtests and the like, this can be set to a shared value + # for many instances of the module. + # Filename for homeworks, etc. + module_state_key = models.CharField(max_length=255, db_index=True, db_column='module_id') + student = models.ForeignKey(User, db_index=True) + course_id = models.CharField(max_length=255, db_index=True) + + class Meta: + unique_together = (('student', 'module_state_key', 'course_id'),) + + # For a timed activity, we are only interested here + # in time-related accommodations, and these should be disjoint. + # (For proctored exams, it is possible to have multiple accommodations + # apply to an exam, so they require accommodating a multi-choice.) + TIME_ACCOMMODATION_CODES = (('NONE', 'No Time Accommodation'), + ('ADDHALFTIME', 'Extra Time - 1 1/2 Time'), + ('ADD30MIN', 'Extra Time - 30 Minutes'), + ('DOUBLE', 'Extra Time - Double Time'), + ) + accommodation_code = models.CharField(max_length=12, choices=TIME_ACCOMMODATION_CODES, default='NONE', db_index=True) + + def _get_accommodated_duration(self, duration): + ''' + Get duration for activity, as adjusted for accommodations. + Input and output are expressed in seconds. + ''' + if self.accommodation_code == 'NONE': + return duration + elif self.accommodation_code == 'ADDHALFTIME': + # TODO: determine what type to return + return int(duration * 1.5) + elif self.accommodation_code == 'ADD30MIN': + return (duration + (30 * 60)) + elif self.accommodation_code == 'DOUBLE': + return (duration * 2) + + # store state: + + beginning_at = models.DateTimeField(null=True, db_index=True) + ending_at = models.DateTimeField(null=True, db_index=True) + created_at = models.DateTimeField(auto_now_add=True, db_index=True) + modified_at = models.DateTimeField(auto_now=True, db_index=True) + + @property + def has_begun(self): + return self.beginning_at is not None + + @property + def has_ended(self): + if not self.ending_at: + return False + return self.ending_at < datetime.utcnow() + + def begin(self, duration): + ''' + Sets the starting time and ending time for the activity, + based on the duration provided (in seconds). + ''' + self.beginning_at = datetime.utcnow() + modified_duration = self._get_accommodated_duration(duration) + datetime_duration = timedelta(seconds=modified_duration) + self.ending_at = self.beginning_at + datetime_duration + + def get_end_time_in_ms(self): + return (timegm(self.ending_at.timetuple()) * 1000) + + def __unicode__(self): + return '/'.join([self.course_id, self.student.username, self.module_state_key]) + diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index 47942f3a63..b44887dbfd 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -2,7 +2,6 @@ import logging import urllib from functools import partial -from time import time from django.conf import settings from django.core.context_processors import csrf @@ -21,7 +20,7 @@ from courseware.access import has_access from courseware.courses import (get_courses, get_course_with_access, get_courses_by_university, sort_by_announcement) import courseware.tabs as tabs -from courseware.models import StudentModuleCache +from courseware.models import StudentModuleCache, TimedModule from module_render import toc_for_course, get_module, get_instance_module, get_module_for_descriptor from django_comment_client.utils import get_discussion_title @@ -402,16 +401,55 @@ def timed_exam(request, course_id, chapter, section): # duration from the test, then doing some math to modify the duration based on accommodations, # and then use that value as the end. Once we have calculated this, it should be sticky -- we # use the same value for future requests, unless it's a tester. - + # get value for duration from the section's metadata: + # for now, assume that the duration is set as an integer value, indicating the number of seconds: if 'duration' not in section_descriptor.metadata: raise Http404 - - # for now, assume that the duration is set as an integer value, indicating the number of seconds: duration = int(section_descriptor.metadata.get('duration')) + # get corresponding time module, if one is present: + # TODO: determine what to use for module_key... + try: + timed_module = TimedModule.objects.get(student=request.user, course_id=course_id) + + # if a module exists, check to see if it has already been started, + # and if it has already ended. + if timed_module.has_ended: + # the exam has already ended, and the student has tried to + # revisit the exam. + # TODO: determine what do we do here. + # For a Pearson exam, we want to go to the exit page. + # (Not so sure what to do in general.) + # Proposal: store URL in the section descriptor, + # along with the duration. If no such URL is set, + # just put up the error page, + raise Exception("Time expired on {}".format(timed_module)) + elif not timed_module.has_begun: + # user has not started the exam, but may have an accommodation + # that has been granted to them. + # modified_duration = timed_module.get_accommodated_duration(duration) + # timed_module.started_at = datetime.utcnow() # time() * 1000 + # timed_module.end_date = timed_module. + timed_module.begin(duration) + timed_module.save() + + except TimedModule.DoesNotExist: + # no entry found. So we're starting this test + # without any accommodations being preset. + # TODO: determine what to use for module_key... + timed_module = TimedModule(student=request.user, course_id=course_id) + timed_module.begin(duration) + timed_module.save() + + + # the exam has already been started, and the student is returning to the + # exam page. Fetch the end time (in GMT) as stored + # in the module when it was started. + end_date = timed_module.get_end_time_in_ms() + # This value should be UTC time as number of milliseconds since epoch. - context['end_date'] = (time() + duration) * 1000 + context['end_date'] = end_date result = render_to_response('courseware/testcenter_exam.html', context) except Exception as e: From 69225f643524e56a977331ba3e31a6bb2896efeb Mon Sep 17 00:00:00 2001 From: Kevin Chugh Date: Mon, 4 Feb 2013 08:33:33 -0500 Subject: [PATCH 076/347] cohort ID showing, have to translate to display text --- lms/djangoapps/django_comment_client/forum/views.py | 3 +++ lms/templates/discussion/_underscore_templates.html | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index fa07394c90..2f2809d89a 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -189,6 +189,9 @@ def single_thread(request, course_id, discussion_id, thread_id): try: thread = cc.Thread.find(thread_id).retrieve(recursive=True, user_id=request.user.id) + print("\n\n\n\n\n\n***************************") + print("thread.get('group_id','NONE')") + print(thread) except (cc.utils.CommentClientError, cc.utils.CommentClientUnknownError) as err: log.error("Error loading single thread.") raise Http404 diff --git a/lms/templates/discussion/_underscore_templates.html b/lms/templates/discussion/_underscore_templates.html index 9903da4c30..4acb6138b9 100644 --- a/lms/templates/discussion/_underscore_templates.html +++ b/lms/templates/discussion/_underscore_templates.html @@ -26,9 +26,11 @@
    - %if group_id: -
    This post visible only to Group ${cohort_dictionary[thread['group_id']]}.
    - %endif + + ${"<% if (obj.group_id) { %>"} +
    This post visible only to Group ${"<%- obj.group_id%>"}.
    + ${"<% } %>"} + + ${'<%- votes["up_count"] %>'}

    ${'<%- title %>'}

    From c991c0489c14124343b8ffc4e9e39893bdb457b5 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 10:26:25 -0500 Subject: [PATCH 077/347] Fix open ended test with flagging --- lms/djangoapps/open_ended_grading/tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/open_ended_grading/tests.py b/lms/djangoapps/open_ended_grading/tests.py index 57ea4f319c..131fe5ad9f 100644 --- a/lms/djangoapps/open_ended_grading/tests.py +++ b/lms/djangoapps/open_ended_grading/tests.py @@ -172,7 +172,8 @@ class TestPeerGradingService(ct.PageLoader): 'submission_key': 'fake key', 'score': '2', 'feedback': 'This is feedback', - 'rubric_scores[]': [1, 2]} + 'rubric_scores[]': [1, 2], + 'submission_flagged' : False} r = self.check_for_post_code(200, url, data) d = json.loads(r.content) self.assertTrue(d['success']) From 4b59e7d5513657bb48b55b6a40c0d163933ce078 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Mon, 4 Feb 2013 10:34:00 -0500 Subject: [PATCH 078/347] Fix max score check for the updated rubric UI stuff. --- .../lib/xmodule/xmodule/combined_open_ended_module.py | 9 ++------- .../lib/xmodule/xmodule/combined_open_ended_rubric.py | 10 +++++++++- .../xmodule/xmodule/css/combinedopenended/display.scss | 7 +------ 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index 14a59c9004..7ecca35107 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -165,15 +165,10 @@ class CombinedOpenEndedModule(XModule): # completion (doesn't matter if you self-assessed correct/incorrect). self._max_score = int(self.metadata.get('max_score', MAX_SCORE)) - if self._max_score > MAX_SCORE_ALLOWED: - error_message = "Max score {0} is higher than max score allowed {1} for location {2}".format(self._max_score, - MAX_SCORE_ALLOWED, location) - log.error(error_message) - raise IncorrectMaxScoreError(error_message) rubric_renderer = CombinedOpenEndedRubric(system, True) rubric_string = stringify_children(definition['rubric']) - rubric_renderer.check_if_rubric_is_parseable(rubric_string, location, MAX_SCORE_ALLOWED) + rubric_renderer.check_if_rubric_is_parseable(rubric_string, location, MAX_SCORE_ALLOWED, self._max_score) #Static data is passed to the child modules to render self.static_data = { @@ -700,4 +695,4 @@ class CombinedOpenEndedDescriptor(XmlDescriptor, EditingDescriptor): for child in ['task']: add_child(child) - return elt \ No newline at end of file + return elt diff --git a/common/lib/xmodule/xmodule/combined_open_ended_rubric.py b/common/lib/xmodule/xmodule/combined_open_ended_rubric.py index 7c772c1596..dc08199511 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_rubric.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_rubric.py @@ -39,7 +39,7 @@ class CombinedOpenEndedRubric(object): raise RubricParsingError("[render_rubric] Could not parse the rubric with xml: {0}".format(rubric_xml)) return success, html - def check_if_rubric_is_parseable(self, rubric_string, location, max_score_allowed): + def check_if_rubric_is_parseable(self, rubric_string, location, max_score_allowed, max_score): success, rubric_feedback = self.render_rubric(rubric_string) if not success: error_message = "Could not parse rubric : {0} for location {1}".format(rubric_string, location.url()) @@ -47,13 +47,21 @@ class CombinedOpenEndedRubric(object): raise RubricParsingError(error_message) rubric_categories = self.extract_categories(rubric_string) + total = 0 for category in rubric_categories: + total = total + len(category['options']) - 1 if len(category['options']) > (max_score_allowed + 1): error_message = "Number of score points in rubric {0} higher than the max allowed, which is {1}".format( len(category['options']), max_score_allowed) log.error(error_message) raise RubricParsingError(error_message) + if total != max_score: + error_msg = "The max score {0} for problem {1} does not match the total number of points in the rubric {2}".format( + max_score, location, total) + log.error(error_msg) + raise RubricParsingError(error_msg) + def extract_categories(self, element): ''' Contstruct a list of categories such that the structure looks like: diff --git a/common/lib/xmodule/xmodule/css/combinedopenended/display.scss b/common/lib/xmodule/xmodule/css/combinedopenended/display.scss index 5f7b46f7cf..eba2910144 100644 --- a/common/lib/xmodule/xmodule/css/combinedopenended/display.scss +++ b/common/lib/xmodule/xmodule/css/combinedopenended/display.scss @@ -405,8 +405,8 @@ section.open-ended-child { padding: 9px; background: #F6F6F6; border: 1px solid #ddd; - border-top: 0; margin-bottom: 20px; + min-height: 5em; @include clearfix; } @@ -544,11 +544,6 @@ section.open-ended-child { } .submission_feedback { - // background: #F3F3F3; - // border: 1px solid #ddd; - // @include border-radius(3px); - // padding: 8px 12px; - // margin-top: 10px; @include inline-block; font-style: italic; margin: 8px 0 0 10px; From 8bd7b60aca4fa4ec7cde1f87fd117a8fa9b8a991 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 10:50:07 -0500 Subject: [PATCH 079/347] Add in key to mock peer grading service --- lms/djangoapps/open_ended_grading/peer_grading_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/djangoapps/open_ended_grading/peer_grading_service.py b/lms/djangoapps/open_ended_grading/peer_grading_service.py index 8a649d9017..23e1488d9b 100644 --- a/lms/djangoapps/open_ended_grading/peer_grading_service.py +++ b/lms/djangoapps/open_ended_grading/peer_grading_service.py @@ -50,7 +50,7 @@ class MockPeerGradingService(object): 'max_score': 4}) def save_grade(self, location, grader_id, submission_id, - score, feedback, submission_key, rubric_scores): + score, feedback, submission_key, rubric_scores, submission_flagged): return json.dumps({'success': True}) def is_student_calibrated(self, problem_location, grader_id): From f9cca8befdb7794b79486ba2ef9c6132309c0894 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Mon, 4 Feb 2013 11:51:05 -0500 Subject: [PATCH 080/347] Starting a framework for handling the closure of an open ended problem. Currently incomplete. --- .../xmodule/combined_open_ended_module.py | 20 ++++++++++++++----- .../lib/xmodule/xmodule/open_ended_module.py | 9 ++++----- common/lib/xmodule/xmodule/openendedchild.py | 7 ++++++- .../xmodule/xmodule/self_assessment_module.py | 9 +++------ .../xmodule/tests/test_combined_open_ended.py | 10 ++++++++-- .../xmodule/tests/test_self_assessment.py | 6 +++++- 6 files changed, 41 insertions(+), 20 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index 14a59c9004..e9b3d1d4d0 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -188,6 +188,15 @@ class CombinedOpenEndedModule(XModule): self.task_xml = definition['task_xml'] self.setup_next_task() + def closed(self): + return True + #''' Is the student still allowed to submit answers? ''' + #if self.attempts == self.max_attempts: + # return True + #if self.close_date is not None and datetime.datetime.utcnow() > self.close_date: + # return True + + def get_tag_name(self, xml): """ Gets the tag name of a given xml block. @@ -269,7 +278,7 @@ class CombinedOpenEndedModule(XModule): self.current_task_parsed_xml = self.current_task_descriptor.definition_from_xml(etree_xml, self.system) if current_task_state is None and self.current_task_number == 0: self.current_task = child_task_module(self.system, self.location, - self.current_task_parsed_xml, self.current_task_descriptor, self.static_data) + self.current_task_parsed_xml, self.current_task_descriptor, self.static_data, self) self.task_states.append(self.current_task.get_instance_state()) self.state = self.ASSESSING elif current_task_state is None and self.current_task_number > 0: @@ -285,7 +294,7 @@ class CombinedOpenEndedModule(XModule): }) self.current_task = child_task_module(self.system, self.location, self.current_task_parsed_xml, self.current_task_descriptor, self.static_data, - instance_state=current_task_state) + self, instance_state=current_task_state) self.task_states.append(self.current_task.get_instance_state()) self.state = self.ASSESSING else: @@ -293,10 +302,11 @@ class CombinedOpenEndedModule(XModule): current_task_state = self.overwrite_state(current_task_state) self.current_task = child_task_module(self.system, self.location, self.current_task_parsed_xml, self.current_task_descriptor, self.static_data, - instance_state=current_task_state) + self, instance_state=current_task_state) return True + def check_allow_reset(self): """ Checks to see if the student has passed the criteria to move to the next module. If not, sets @@ -404,7 +414,7 @@ class CombinedOpenEndedModule(XModule): task_parsed_xml = task_descriptor.definition_from_xml(etree_xml, self.system) task = children['modules'][task_type](self.system, self.location, task_parsed_xml, task_descriptor, - self.static_data, instance_state=task_state) + self.static_data, self, instance_state=task_state) last_response = task.latest_answer() last_score = task.latest_score() last_post_assessment = task.latest_post_assessment(self.system) @@ -700,4 +710,4 @@ class CombinedOpenEndedDescriptor(XmlDescriptor, EditingDescriptor): for child in ['task']: add_child(child) - return elt \ No newline at end of file + return elt diff --git a/common/lib/xmodule/xmodule/open_ended_module.py b/common/lib/xmodule/xmodule/open_ended_module.py index 94d45d96e3..2d6970e162 100644 --- a/common/lib/xmodule/xmodule/open_ended_module.py +++ b/common/lib/xmodule/xmodule/open_ended_module.py @@ -548,13 +548,12 @@ class OpenEndedModule(openendedchild.OpenEndedChild): @param system: modulesystem @return: Success indicator """ - if self.attempts > self.max_attempts: - # If too many attempts, prevent student from saving answer and - # seeing rubric. In normal use, students shouldn't see this because - # they won't see the reset button once they're out of attempts. + # Once we close the problem, we should not allow students + # to save answers + if self.closed(): return { 'success': False, - 'error': 'Too many attempts.' + 'error': 'Problem is closed.' } if self.state != self.INITIAL: diff --git a/common/lib/xmodule/xmodule/openendedchild.py b/common/lib/xmodule/xmodule/openendedchild.py index 7151ac0723..8c35fb0cae 100644 --- a/common/lib/xmodule/xmodule/openendedchild.py +++ b/common/lib/xmodule/xmodule/openendedchild.py @@ -73,7 +73,7 @@ class OpenEndedChild(object): 'done': 'Problem complete', } - def __init__(self, system, location, definition, descriptor, static_data, + def __init__(self, system, location, definition, descriptor, static_data, parent, instance_state=None, shared_state=None, **kwargs): # Load instance state if instance_state is not None: @@ -87,6 +87,8 @@ class OpenEndedChild(object): # Scores are on scale from 0 to max_score self.history = instance_state.get('history', []) + self.parent = parent + self.state = instance_state.get('state', self.INITIAL) self.created = instance_state.get('created', False) @@ -116,6 +118,9 @@ class OpenEndedChild(object): """ pass + def closed(self): + return self.parent.closed() + def latest_answer(self): """Empty string if not available""" if not self.history: diff --git a/common/lib/xmodule/xmodule/self_assessment_module.py b/common/lib/xmodule/xmodule/self_assessment_module.py index 38a60e11f5..bb8b46559d 100644 --- a/common/lib/xmodule/xmodule/self_assessment_module.py +++ b/common/lib/xmodule/xmodule/self_assessment_module.py @@ -189,14 +189,11 @@ class SelfAssessmentModule(openendedchild.OpenEndedChild): Dictionary with keys 'success' and either 'error' (if not success), or 'rubric_html' (if success). """ - # Check to see if attempts are less than max - if self.attempts > self.max_attempts: - # If too many attempts, prevent student from saving answer and - # seeing rubric. In normal use, students shouldn't see this because - # they won't see the reset button once they're out of attempts. + # Check to see if this problem is closed + if self.closed(): return { 'success': False, - 'error': 'Too many attempts.' + 'error': 'This problem is now closed.' } if self.state != self.INITIAL: diff --git a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py index c89f5ee848..69c502cd5d 100644 --- a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py +++ b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py @@ -43,11 +43,14 @@ class OpenEndedChildTest(unittest.TestCase): 'accept_file_upload' : False, } definition = Mock() + parent = Mock() + parent.closed.return_value = False; descriptor = Mock() def setUp(self): self.openendedchild = OpenEndedChild(test_system, self.location, - self.definition, self.descriptor, self.static_data, self.metadata) + self.definition, self.descriptor, self.static_data, + self.parent, self.metadata) def test_latest_answer_empty(self): @@ -166,6 +169,8 @@ class OpenEndedModuleTest(unittest.TestCase): ''') definition = {'oeparam': oeparam} descriptor = Mock() + parent = Mock() + parent.closed.return_value = False; def setUp(self): test_system.location = self.location @@ -173,7 +178,8 @@ class OpenEndedModuleTest(unittest.TestCase): self.mock_xqueue.send_to_queue.return_value=(None, "Message") test_system.xqueue = {'interface':self.mock_xqueue, 'callback_url':'/', 'default_queuename': 'testqueue', 'waittime': 1} self.openendedmodule = OpenEndedModule(test_system, self.location, - self.definition, self.descriptor, self.static_data, self.metadata) + self.definition, self.descriptor, self.static_data, + self.parent, self.metadata) def test_message_post(self): get = {'feedback': 'feedback text', diff --git a/common/lib/xmodule/xmodule/tests/test_self_assessment.py b/common/lib/xmodule/xmodule/tests/test_self_assessment.py index c5fb82e412..74018cf101 100644 --- a/common/lib/xmodule/xmodule/tests/test_self_assessment.py +++ b/common/lib/xmodule/xmodule/tests/test_self_assessment.py @@ -30,6 +30,8 @@ class SelfAssessmentTest(unittest.TestCase): metadata = {'attempts': '10'} descriptor = Mock() + parent = Mock() + parent.closed.return_value = False def setUp(self): state = json.dumps({'student_answers': ["Answer 1", "answer 2", "answer 3"], @@ -49,7 +51,8 @@ class SelfAssessmentTest(unittest.TestCase): self.module = SelfAssessmentModule(test_system, self.location, self.definition, self.descriptor, - static_data, state, metadata=self.metadata) + static_data, self.parent, + state, metadata=self.metadata) def test_get_html(self): html = self.module.get_html(test_system) @@ -72,6 +75,7 @@ class SelfAssessmentTest(unittest.TestCase): # if we now assess as right, skip the REQUEST_HINT state self.module.save_answer({'student_answer': 'answer 4'}, test_system) + self.parent.closed.assert_called_with() self.module.save_assessment({'assessment': '1'}, test_system) self.assertEqual(self.module.state, self.module.DONE) From f742b7d865cbe9f96aedcc635721781180c5938d Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 12:07:03 -0500 Subject: [PATCH 081/347] Start to integrate peer grading xmodule back into notifications --- .../xmodule/combined_open_ended_rubric.py | 4 +- .../open_ended_notifications.py | 2 +- lms/djangoapps/open_ended_grading/views.py | 67 +++++++++---------- lms/urls.py | 3 + 4 files changed, 40 insertions(+), 36 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_rubric.py b/common/lib/xmodule/xmodule/combined_open_ended_rubric.py index 3e3d8e67f2..6f6752f221 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_rubric.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_rubric.py @@ -33,7 +33,9 @@ class CombinedOpenEndedRubric(object): 'view_only': self.view_only}) success = True except: - raise RubricParsingError("[render_rubric] Could not parse the rubric with xml: {0}".format(rubric_xml)) + error_message = "[render_rubric] Could not parse the rubric with xml: {0}".format(rubric_xml) + log.error(error_message) + raise RubricParsingError(error_message) return success, html def extract_categories(self, element): diff --git a/lms/djangoapps/open_ended_grading/open_ended_notifications.py b/lms/djangoapps/open_ended_grading/open_ended_notifications.py index fec893894f..26f7339291 100644 --- a/lms/djangoapps/open_ended_grading/open_ended_notifications.py +++ b/lms/djangoapps/open_ended_grading/open_ended_notifications.py @@ -1,6 +1,5 @@ from django.conf import settings from staff_grading_service import StaffGradingService -from peer_grading_service import PeerGradingService from open_ended_grading.controller_query_service import ControllerQueryService import json from student.models import unique_id_for_user @@ -10,6 +9,7 @@ import logging from courseware.access import has_access from util.cache import cache import datetime +from xmodule import peer_grading_service log=logging.getLogger(__name__) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 1777f26e2e..4e10e7de96 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -2,6 +2,7 @@ import logging import urllib +import re from django.conf import settings from django.views.decorators.cache import cache_control @@ -24,6 +25,10 @@ import open_ended_notifications from xmodule.modulestore.django import modulestore from xmodule.modulestore import search +from xmodule import peer_grading_module +from xmodule import peer_grading_service +from mitxmako.shortcuts import render_to_string +from xmodule.x_module import ModuleSystem from django.http import HttpResponse, Http404 @@ -87,41 +92,35 @@ def peer_grading(request, course_id): ''' Show a peer grading interface ''' + + ajax_url = ajax_url = _reverse_with_slash('peer_grading', course_id) + track_function = None + get_module = None + render_template = render_to_string + replace_urls = None + anonymous_student_id= unique_id_for_user(request.user) + + system = ModuleSystem( + ajax_url, + track_function, + get_module, + render_template, + replace_urls, + course_id = course_id, + anonymous_student_id = anonymous_student_id + ) + + location = "" + definition = "" + descriptor = peer_grading_module.PeerGradingDescriptor + instance_state = {} + pg_url = re.sub("/courses", "i4x://", ajax_url) + + pg_module = peer_grading_module.PeerGradingModule(system, pg_url, definition, descriptor, instance_state) + course = get_course_with_access(request.user, course_id, 'load') - # call problem list service - success = False - error_text = "" - problem_list = [] - try: - problem_list_json = peer_gs.get_problem_list(course_id, unique_id_for_user(request.user)) - problem_list_dict = json.loads(problem_list_json) - success = problem_list_dict['success'] - if 'error' in problem_list_dict: - error_text = problem_list_dict['error'] - - problem_list = problem_list_dict['problem_list'] - - except GradingServiceError: - error_text = "Error occured while contacting the grading service" - success = False - # catch error if if the json loads fails - except ValueError: - error_text = "Could not get problem list" - success = False - - ajax_url = _reverse_with_slash('peer_grading', course_id) - - return render_to_response('peer_grading/peer_grading.html', { - 'course': course, - 'course_id': course_id, - 'ajax_url': ajax_url, - 'success': success, - 'problem_list': problem_list, - 'error_text': error_text, - # Checked above - 'staff_access': False, }) - + return pg_module.get_html() @cache_control(no_cache=True, no_store=True, must_revalidate=True) def peer_grading_problem(request, course_id): @@ -317,7 +316,7 @@ def take_action_on_flags(request, course_id): response = controller_qs.take_action_on_flags(course_id, student_id, submission_id, action_type) return HttpResponse(response, mimetype="application/json") except GradingServiceError: - log.exception("Error saving calibration grade, location: {0}, submission_id: {1}, submission_key: {2}, grader_id: {3}".format(location, submission_id, submission_key, grader_id)) + log.exception("Error saving calibration grade, submission_id: {0}, submission_key: {1}, grader_id: {2}".format(submission_id, submission_key, grader_id)) return _err_response('Could not connect to grading service') diff --git a/lms/urls.py b/lms/urls.py index 6e8d08e256..36b618e454 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -297,6 +297,9 @@ if settings.COURSEWARE_ENABLED: # Open Ended Notifications url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/open_ended_notifications$', 'open_ended_grading.views.combined_notifications', name='open_ended_notifications'), + + url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/peer_grading$', + 'open_ended_grading.views.peer_grading', name='peer_grading'), ) # discussion forums live within courseware, so courseware must be enabled first From 7263cbfcca28064faf3fff83a8347995ed69562c Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 12:41:14 -0500 Subject: [PATCH 082/347] Fixes to make peer grading show up in notifications --- lms/djangoapps/open_ended_grading/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 4e10e7de96..c28b4f5be6 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -113,8 +113,8 @@ def peer_grading(request, course_id): location = "" definition = "" descriptor = peer_grading_module.PeerGradingDescriptor - instance_state = {} - pg_url = re.sub("/courses", "i4x://", ajax_url) + instance_state = None + pg_url = re.sub("/courses", "i4x:/", ajax_url)[:-1] pg_module = peer_grading_module.PeerGradingModule(system, pg_url, definition, descriptor, instance_state) From 97a32f8ced0d4979022c5513eedeec4f4e0a9ee1 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Mon, 4 Feb 2013 12:45:40 -0500 Subject: [PATCH 083/347] Remove extra styling. --- common/lib/xmodule/xmodule/css/combinedopenended/display.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/css/combinedopenended/display.scss b/common/lib/xmodule/xmodule/css/combinedopenended/display.scss index eba2910144..efd282329d 100644 --- a/common/lib/xmodule/xmodule/css/combinedopenended/display.scss +++ b/common/lib/xmodule/xmodule/css/combinedopenended/display.scss @@ -406,7 +406,6 @@ section.open-ended-child { background: #F6F6F6; border: 1px solid #ddd; margin-bottom: 20px; - min-height: 5em; @include clearfix; } From c6c89e4216f94b88031c58b9d17ce220138bdf41 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 13:16:05 -0500 Subject: [PATCH 084/347] Make peer grading xmodule work with notifications --- common/djangoapps/xmodule_modifiers.py | 1 - lms/djangoapps/open_ended_grading/views.py | 36 +++++++++++++++---- lms/envs/dev.py | 20 +++++++++-- .../peer_grading_notifications.html | 17 +++++++++ lms/urls.py | 2 ++ 5 files changed, 65 insertions(+), 11 deletions(-) create mode 100644 lms/templates/peer_grading/peer_grading_notifications.html diff --git a/common/djangoapps/xmodule_modifiers.py b/common/djangoapps/xmodule_modifiers.py index 5c19a2f1d7..3fad5d0b37 100644 --- a/common/djangoapps/xmodule_modifiers.py +++ b/common/djangoapps/xmodule_modifiers.py @@ -64,7 +64,6 @@ def replace_static_urls(get_html, prefix, course_namespace=None): return replace_urls(get_html(), staticfiles_prefix=prefix, course_namespace = course_namespace) return _get_html - def grade_histogram(module_id): ''' Print out a histogram of grades on a given problem. Part of staff member debug info. diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index c28b4f5be6..671fa1ee63 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -29,6 +29,9 @@ from xmodule import peer_grading_module from xmodule import peer_grading_service from mitxmako.shortcuts import render_to_string from xmodule.x_module import ModuleSystem +from courseware import module_render +from xmodule.modulestore.django import modulestore +from courseware.models import StudentModule, StudentModuleCache from django.http import HttpResponse, Http404 @@ -86,14 +89,14 @@ def staff_grading(request, course_id): # Checked above 'staff_access': True, }) - @cache_control(no_cache=True, no_store=True, must_revalidate=True) def peer_grading(request, course_id): ''' Show a peer grading interface ''' + course = get_course_with_access(request.user, course_id, 'load') - ajax_url = ajax_url = _reverse_with_slash('peer_grading', course_id) + ajax_url = _reverse_with_slash('peer_grading_ajax', course_id) track_function = None get_module = None render_template = render_to_string @@ -114,16 +117,35 @@ def peer_grading(request, course_id): definition = "" descriptor = peer_grading_module.PeerGradingDescriptor instance_state = None - pg_url = re.sub("/courses", "i4x:/", ajax_url)[:-1] - pg_module = peer_grading_module.PeerGradingModule(system, pg_url, definition, descriptor, instance_state) + pg_ajax = _reverse_with_slash('peer_grading', course_id) + pg_url = re.sub("/courses", "i4x:/",pg_ajax)[:-1] + pg_location = request.GET.get('location', pg_url) - course = get_course_with_access(request.user, course_id, 'load') + pg_module = peer_grading_module.PeerGradingModule(system, pg_location, definition, descriptor, instance_state) - return pg_module.get_html() + """ + return_html = pg_module.get_html() + log.debug(return_html) + response = render_to_response('peer_grading/peer_grading_notifications.html', { + 'peer_grading_html' : return_html, + 'course': course, + 'problem_location': pg_location, + 'course_id': course_id, + 'ajax_url': ajax_url, + 'staff_access': False, + }) + """ + + student_module_cache = StudentModuleCache(course_id, + request.user, descriptor) + + pg_xmodule = module_render.get_module(request.user, request, pg_location, student_module_cache, course_id) + + return pg_xmodule.get_html() @cache_control(no_cache=True, no_store=True, must_revalidate=True) -def peer_grading_problem(request, course_id): +def peer_grading_ajax(request, course_id): ''' Show individual problem interface ''' diff --git a/lms/envs/dev.py b/lms/envs/dev.py index 99ee9662ee..9429feb34f 100644 --- a/lms/envs/dev.py +++ b/lms/envs/dev.py @@ -52,20 +52,28 @@ CACHES = { # We set it to be a DummyCache to force reloading of course.xml in dev. # In staging environments, we would grab VERSION from data uploaded by the # push process. + #'general': { + # 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', + # 'KEY_PREFIX': 'general', + # 'VERSION': 4, + # 'LOCATION': 'mitx_loc_mem_cache_general', + # 'KEY_FUNCTION': 'util.memcache.safe_key', + #} + 'general': { 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', 'KEY_PREFIX': 'general', 'VERSION': 4, 'KEY_FUNCTION': 'util.memcache.safe_key', - } + } } XQUEUE_INTERFACE = { - "url": "https://sandbox-xqueue.edx.org", + "url": "http://127.0.0.1:3032", "django_auth": { "username": "lms", - "password": "***REMOVED***" + "password": "abcd" }, "basic_auth": ('anant', 'agarwal'), } @@ -198,3 +206,9 @@ PIPELINE_SASS_ARGUMENTS = '-r {proj_dir}/static/sass/bourbon/lib/bourbon.rb'.for MITX_FEATURES['ENABLE_PEARSON_HACK_TEST'] = True PEARSON_TEST_USER = "pearsontest" PEARSON_TEST_PASSWORD = "12345" + +#AWS upload stuff for local file testing +AWS_ACCESS_KEY_ID = "***REMOVED***" +AWS_SECRET_ACCESS_KEY = "***REMOVED***" +AWS_STORAGE_BUCKET_NAME = 'edxuploads' + diff --git a/lms/templates/peer_grading/peer_grading_notifications.html b/lms/templates/peer_grading/peer_grading_notifications.html new file mode 100644 index 0000000000..40cf85fb0f --- /dev/null +++ b/lms/templates/peer_grading/peer_grading_notifications.html @@ -0,0 +1,17 @@ +<%inherit file="/main.html" /> +<%block name="bodyclass">${course.css_class} +<%namespace name='static' file='/static_content.html'/> + +<%block name="headextra"> +<%static:css group='course'/> + + +<%block name="title">${course.number} Peer Grading + +<%include file="/courseware/course_navigation.html" args="active_page='peer_grading'" /> + +<%block name="js_extra"> +<%static:js group='peer_grading'/> + + +${peer_grading_html|n} \ No newline at end of file diff --git a/lms/urls.py b/lms/urls.py index 36b618e454..02f3cbb03e 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -300,6 +300,8 @@ if settings.COURSEWARE_ENABLED: url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/peer_grading$', 'open_ended_grading.views.peer_grading', name='peer_grading'), + url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/peer_grading_ajax$', + 'open_ended_grading.views.peer_grading_ajax', name='peer_grading_ajax'), ) # discussion forums live within courseware, so courseware must be enabled first From 3380745692d63b22287b8337711d8a2690fbcc07 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 13:54:27 -0500 Subject: [PATCH 085/347] About to trim some lines --- .../lib/xmodule/xmodule/peer_grading_module.py | 1 + lms/djangoapps/courseware/module_render.py | 15 ++++++++------- lms/djangoapps/open_ended_grading/views.py | 18 ++++++++++-------- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index c2df24dfff..0fcdaef68a 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -65,6 +65,7 @@ class PeerGradingModule(XModule): #We need to set the location here so the child modules can use it system.set('location', location) + log.debug("Location: {0}".format(location)) self.system = system self.peer_gs = peer_grading_service(self.system) diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index 7ed32c8597..f6c193d9e4 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -140,12 +140,13 @@ def get_module(user, request, location, student_module_cache, course_id, module. If there's an error, will try to return an instance of ErrorModule if possible. If not possible, return None. """ - try: - location = Location(location) - descriptor = modulestore().get_instance(course_id, location, depth=depth) - return get_module_for_descriptor(user, request, descriptor, student_module_cache, course_id, - position=position, not_found_ok=not_found_ok, - wrap_xmodule_display=wrap_xmodule_display) + #try: + location = Location(location) + descriptor = modulestore().get_instance(course_id, location, depth=depth) + return get_module_for_descriptor(user, request, descriptor, student_module_cache, course_id, + position=position, not_found_ok=not_found_ok, + wrap_xmodule_display=wrap_xmodule_display) + """ except ItemNotFoundError: if not not_found_ok: log.exception("Error in get_module") @@ -154,7 +155,7 @@ def get_module(user, request, location, student_module_cache, course_id, # Something has gone terribly wrong, but still not letting it turn into a 500. log.exception("Error in get_module") return None - + """ def get_module_for_descriptor(user, request, descriptor, student_module_cache, course_id, position=None, not_found_ok=False, wrap_xmodule_display=True): diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 671fa1ee63..2a5f7614cf 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -30,6 +30,7 @@ from xmodule import peer_grading_service from mitxmako.shortcuts import render_to_string from xmodule.x_module import ModuleSystem from courseware import module_render +from xmodule.modulestore import Location from xmodule.modulestore.django import modulestore from courseware.models import StudentModule, StudentModuleCache @@ -103,6 +104,11 @@ def peer_grading(request, course_id): replace_urls = None anonymous_student_id= unique_id_for_user(request.user) + pg_ajax = _reverse_with_slash('peer_grading', course_id) + pg_url = re.sub("/courses", "i4x:/",pg_ajax)[:-1] + pg_location = request.GET.get('location', pg_url) + pg_location = "i4x://MITx/oe101x/peergrading/init" + system = ModuleSystem( ajax_url, track_function, @@ -113,14 +119,10 @@ def peer_grading(request, course_id): anonymous_student_id = anonymous_student_id ) - location = "" definition = "" - descriptor = peer_grading_module.PeerGradingDescriptor instance_state = None - pg_ajax = _reverse_with_slash('peer_grading', course_id) - pg_url = re.sub("/courses", "i4x:/",pg_ajax)[:-1] - pg_location = request.GET.get('location', pg_url) + descriptor = peer_grading_module.PeerGradingDescriptor(system) pg_module = peer_grading_module.PeerGradingModule(system, pg_location, definition, descriptor, instance_state) @@ -138,11 +140,11 @@ def peer_grading(request, course_id): """ student_module_cache = StudentModuleCache(course_id, - request.user, descriptor) + request.user, [descriptor]) - pg_xmodule = module_render.get_module(request.user, request, pg_location, student_module_cache, course_id) + pg_xmodule = module_render.get_module(request.user, request, Location(pg_location), student_module_cache, course_id) - return pg_xmodule.get_html() + return HttpResponse(pg_xmodule.get_html()) @cache_control(no_cache=True, no_store=True, must_revalidate=True) def peer_grading_ajax(request, course_id): From 85abc435159d4db466f04c24460b1a53f13f78f6 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Mon, 4 Feb 2013 14:02:42 -0500 Subject: [PATCH 086/347] Add in the ability to handle due dates and grace periods --- .../xmodule/combined_open_ended_module.py | 31 +++++++++++++++---- common/lib/xmodule/xmodule/timeparse.py | 25 +++++++++++++++ 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index e9b3d1d4d0..4c3e8da8c6 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -7,7 +7,11 @@ from lxml import etree from lxml.html import rewrite_links from path import path import os +import dateutil +import dateutil.parser +import datetime import sys +from timeparse import parse_timedelta from pkg_resources import resource_string @@ -155,12 +159,27 @@ class CombinedOpenEndedModule(XModule): self.attempts = instance_state.get('attempts', 0) + #Allow reset is true if student has failed the criteria to move to the next child task self.allow_reset = instance_state.get('ready_to_reset', False) self.max_attempts = int(self.metadata.get('attempts', MAX_ATTEMPTS)) self.is_scored = self.metadata.get('is_graded', IS_SCORED) in TRUE_DICT self.accept_file_upload = self.metadata.get('accept_file_upload', ACCEPT_FILE_UPLOAD) in TRUE_DICT + display_due_date_string = self.metadata.get('due', None) + if display_due_date_string is not None: + self.display_due_date = dateutil.parser.parse(display_due_date_string) + else: + self.display_due_date = None + + grace_period_string = self.metadata.get('graceperiod', None) + if grace_period_string is not None and self.display_due_date: + self.grace_period = parse_timedelta(grace_period_string) + self.close_date = self.display_due_date + self.grace_period + else: + self.grace_period = None + self.close_date = self.display_due_date + # Used for progress / grading. Currently get credit just for # completion (doesn't matter if you self-assessed correct/incorrect). self._max_score = int(self.metadata.get('max_score', MAX_SCORE)) @@ -189,12 +208,12 @@ class CombinedOpenEndedModule(XModule): self.setup_next_task() def closed(self): - return True - #''' Is the student still allowed to submit answers? ''' - #if self.attempts == self.max_attempts: - # return True - #if self.close_date is not None and datetime.datetime.utcnow() > self.close_date: - # return True + ''' Is the student still allowed to submit answers? ''' + if self.attempts == self.max_attempts: + return True + if self.close_date is not None and datetime.datetime.utcnow() > self.close_date: + return True + def get_tag_name(self, xml): diff --git a/common/lib/xmodule/xmodule/timeparse.py b/common/lib/xmodule/xmodule/timeparse.py index 36c0f725e5..605662654d 100644 --- a/common/lib/xmodule/xmodule/timeparse.py +++ b/common/lib/xmodule/xmodule/timeparse.py @@ -2,9 +2,14 @@ Helper functions for handling time in the format we like. """ import time +import re +from datetime import timedelta TIME_FORMAT = "%Y-%m-%dT%H:%M" +TIMEDELTA_REGEX = re.compile(r'^((?P\d+?) day(?:s?))?(\s)?((?P\d+?) hour(?:s?))?(\s)?((?P\d+?) minute(?:s)?)?(\s)?((?P\d+?) second(?:s)?)?$') + + def parse_time(time_str): """ Takes a time string in TIME_FORMAT @@ -20,3 +25,23 @@ def stringify_time(time_struct): Convert a time struct to a string """ return time.strftime(TIME_FORMAT, time_struct) + +def parse_timedelta(time_str): + """ + time_str: A string with the following components: + day[s] (optional) + hour[s] (optional) + minute[s] (optional) + second[s] (optional) + + Returns a datetime.timedelta parsed from the string + """ + parts = TIMEDELTA_REGEX.match(time_str) + if not parts: + return + parts = parts.groupdict() + time_params = {} + for (name, param) in parts.iteritems(): + if param: + time_params[name] = int(param) + return timedelta(**time_params) From 14676d1c320746803d081034f7ce468b27969598 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 14:05:02 -0500 Subject: [PATCH 087/347] Untrack dev.py, add in redirect code for peer grading --- lms/djangoapps/open_ended_grading/views.py | 81 ++++------------------ lms/urls.py | 2 - 2 files changed, 14 insertions(+), 69 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 2a5f7614cf..c41b3fa9dd 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -34,7 +34,7 @@ from xmodule.modulestore import Location from xmodule.modulestore.django import modulestore from courseware.models import StudentModule, StudentModuleCache -from django.http import HttpResponse, Http404 +from django.http import HttpResponse, Http404, HttpResponseRedirect log = logging.getLogger(__name__) @@ -95,75 +95,22 @@ def peer_grading(request, course_id): ''' Show a peer grading interface ''' + course = get_course_with_access(request.user, course_id, 'load') + log.debug(course_id) + pg_location = "i4x://" + "MITx/oe101x/" + "peergrading/init" - ajax_url = _reverse_with_slash('peer_grading_ajax', course_id) - track_function = None - get_module = None - render_template = render_to_string - replace_urls = None - anonymous_student_id= unique_id_for_user(request.user) + base_course_url = reverse('courses') + problem_url_parts = search.path_to_location(modulestore(), course.id, pg_location) + problem_url = base_course_url + "/" + for z in xrange(0,len(problem_url_parts)): + part = problem_url_parts[z] + if part is not None: + if z==1: + problem_url += "courseware/" + problem_url += part + "/" - pg_ajax = _reverse_with_slash('peer_grading', course_id) - pg_url = re.sub("/courses", "i4x:/",pg_ajax)[:-1] - pg_location = request.GET.get('location', pg_url) - pg_location = "i4x://MITx/oe101x/peergrading/init" - - system = ModuleSystem( - ajax_url, - track_function, - get_module, - render_template, - replace_urls, - course_id = course_id, - anonymous_student_id = anonymous_student_id - ) - - definition = "" - instance_state = None - - descriptor = peer_grading_module.PeerGradingDescriptor(system) - - pg_module = peer_grading_module.PeerGradingModule(system, pg_location, definition, descriptor, instance_state) - - """ - return_html = pg_module.get_html() - log.debug(return_html) - response = render_to_response('peer_grading/peer_grading_notifications.html', { - 'peer_grading_html' : return_html, - 'course': course, - 'problem_location': pg_location, - 'course_id': course_id, - 'ajax_url': ajax_url, - 'staff_access': False, - }) - """ - - student_module_cache = StudentModuleCache(course_id, - request.user, [descriptor]) - - pg_xmodule = module_render.get_module(request.user, request, Location(pg_location), student_module_cache, course_id) - - return HttpResponse(pg_xmodule.get_html()) - -@cache_control(no_cache=True, no_store=True, must_revalidate=True) -def peer_grading_ajax(request, course_id): - ''' - Show individual problem interface - ''' - course = get_course_with_access(request.user, course_id, 'load') - problem_location = request.GET.get("location") - - ajax_url = _reverse_with_slash('peer_grading', course_id) - - return render_to_response('peer_grading/peer_grading_problem.html', { - 'view_html': '', - 'course': course, - 'problem_location': problem_location, - 'course_id': course_id, - 'ajax_url': ajax_url, - # Checked above - 'staff_access': False, }) + return HttpResponseRedirect(problem_url) @cache_control(no_cache=True, no_store=True, must_revalidate=True) def student_problem_list(request, course_id): diff --git a/lms/urls.py b/lms/urls.py index 02f3cbb03e..36b618e454 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -300,8 +300,6 @@ if settings.COURSEWARE_ENABLED: url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/peer_grading$', 'open_ended_grading.views.peer_grading', name='peer_grading'), - url(r'^courses/(?P[^/]+/[^/]+/[^/]+)/peer_grading_ajax$', - 'open_ended_grading.views.peer_grading_ajax', name='peer_grading_ajax'), ) # discussion forums live within courseware, so courseware must be enabled first From 43ddf1fbcfd1e9a0fdab2cf33fd9aed18663f690 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 14:14:15 -0500 Subject: [PATCH 088/347] Proper redirect behavior --- lms/djangoapps/open_ended_grading/views.py | 6 +- lms/envs/dev.py | 214 --------------------- 2 files changed, 4 insertions(+), 216 deletions(-) delete mode 100644 lms/envs/dev.py diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index c41b3fa9dd..c20ff85ee0 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -97,8 +97,10 @@ def peer_grading(request, course_id): ''' course = get_course_with_access(request.user, course_id, 'load') - log.debug(course_id) - pg_location = "i4x://" + "MITx/oe101x/" + "peergrading/init" + course_id_parts = course.id.split("/") + course_id_norun = "/".join(course_id_parts[0:2]) + pg_location = "i4x://" + course_id_norun + "/peergrading/init" + log.debug("PG LOCATION :{0}".format(pg_location)) base_course_url = reverse('courses') problem_url_parts = search.path_to_location(modulestore(), course.id, pg_location) diff --git a/lms/envs/dev.py b/lms/envs/dev.py deleted file mode 100644 index 9429feb34f..0000000000 --- a/lms/envs/dev.py +++ /dev/null @@ -1,214 +0,0 @@ -""" -This config file runs the simplest dev environment using sqlite, and db-based -sessions. Assumes structure: - -/envroot/ - /db # This is where it'll write the database file - /mitx # The location of this repo - /log # Where we're going to write log files -""" -from .common import * -from logsettings import get_logger_config - -DEBUG = True -TEMPLATE_DEBUG = True - - -MITX_FEATURES['DISABLE_START_DATES'] = True -MITX_FEATURES['ENABLE_SQL_TRACKING_LOGS'] = True -MITX_FEATURES['SUBDOMAIN_COURSE_LISTINGS'] = False # Enable to test subdomains--otherwise, want all courses to show up -MITX_FEATURES['SUBDOMAIN_BRANDING'] = True -MITX_FEATURES['FORCE_UNIVERSITY_DOMAIN'] = None # show all university courses if in dev (ie don't use HTTP_HOST) -MITX_FEATURES['ENABLE_MANUAL_GIT_RELOAD'] = True -MITX_FEATURES['ENABLE_PSYCHOMETRICS'] = False # real-time psychometrics (eg item response theory analysis in instructor dashboard) - - -WIKI_ENABLED = True - -LOGGING = get_logger_config(ENV_ROOT / "log", - logging_env="dev", - local_loglevel="DEBUG", - dev_env=True, - debug=True) - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': ENV_ROOT / "db" / "mitx.db", - } -} - -CACHES = { - # This is the cache used for most things. - # In staging/prod envs, the sessions also live here. - 'default': { - 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', - 'LOCATION': 'mitx_loc_mem_cache', - 'KEY_FUNCTION': 'util.memcache.safe_key', - }, - - # The general cache is what you get if you use our util.cache. It's used for - # things like caching the course.xml file for different A/B test groups. - # We set it to be a DummyCache to force reloading of course.xml in dev. - # In staging environments, we would grab VERSION from data uploaded by the - # push process. - #'general': { - # 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', - # 'KEY_PREFIX': 'general', - # 'VERSION': 4, - # 'LOCATION': 'mitx_loc_mem_cache_general', - # 'KEY_FUNCTION': 'util.memcache.safe_key', - #} - - 'general': { - 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', - 'KEY_PREFIX': 'general', - 'VERSION': 4, - 'KEY_FUNCTION': 'util.memcache.safe_key', - } -} - - -XQUEUE_INTERFACE = { - "url": "http://127.0.0.1:3032", - "django_auth": { - "username": "lms", - "password": "abcd" - }, - "basic_auth": ('anant', 'agarwal'), -} - -# Make the keyedcache startup warnings go away -CACHE_TIMEOUT = 0 - -# Dummy secret key for dev -SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd' - - -COURSE_LISTINGS = { - 'default': ['BerkeleyX/CS169.1x/2012_Fall', - 'BerkeleyX/CS188.1x/2012_Fall', - 'HarvardX/CS50x/2012', - 'HarvardX/PH207x/2012_Fall', - 'MITx/3.091x/2012_Fall', - 'MITx/6.002x/2012_Fall', - 'MITx/6.00x/2012_Fall'], - 'berkeley': ['BerkeleyX/CS169/fa12', - 'BerkeleyX/CS188/fa12'], - 'harvard': ['HarvardX/CS50x/2012H'], - 'mit': ['MITx/3.091/MIT_2012_Fall'], - 'sjsu': ['MITx/6.002x-EE98/2012_Fall_SJSU'], -} - - -SUBDOMAIN_BRANDING = { - 'sjsu': 'MITx', - 'mit': 'MITx', - 'berkeley': 'BerkeleyX', - 'harvard': 'HarvardX', -} - -# List of `university` landing pages to display, even though they may not -# have an actual course with that org set -VIRTUAL_UNIVERSITIES = [] - -COMMENTS_SERVICE_KEY = "PUT_YOUR_API_KEY_HERE" - -################################# mitx revision string ##################### - -MITX_VERSION_STRING = os.popen('cd %s; git describe' % REPO_ROOT).read().strip() - -################################# Staff grading config ##################### - -STAFF_GRADING_INTERFACE = { - 'url': 'http://127.0.0.1:3033/staff_grading', - 'username': 'lms', - 'password': 'abcd', - } - -################################# Peer grading config ##################### - -PEER_GRADING_INTERFACE = { - 'url': 'http://127.0.0.1:3033/peer_grading', - 'username': 'lms', - 'password': 'abcd', - } -################################ LMS Migration ################################# -MITX_FEATURES['ENABLE_LMS_MIGRATION'] = True -MITX_FEATURES['ACCESS_REQUIRE_STAFF_FOR_COURSE'] = False # require that user be in the staff_* group to be able to enroll -MITX_FEATURES['USE_XQA_SERVER'] = 'http://xqa:server@content-qa.mitx.mit.edu/xqa' - -INSTALLED_APPS += ('lms_migration',) - -LMS_MIGRATION_ALLOWED_IPS = ['127.0.0.1'] - -################################ OpenID Auth ################################# -MITX_FEATURES['AUTH_USE_OPENID'] = True -MITX_FEATURES['AUTH_USE_OPENID_PROVIDER'] = True -MITX_FEATURES['BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH'] = True - -INSTALLED_APPS += ('external_auth',) -INSTALLED_APPS += ('django_openid_auth',) - -OPENID_CREATE_USERS = False -OPENID_UPDATE_DETAILS_FROM_SREG = True -OPENID_SSO_SERVER_URL = 'https://www.google.com/accounts/o8/id' # TODO: accept more endpoints -OPENID_USE_AS_ADMIN_LOGIN = False - -OPENID_PROVIDER_TRUSTED_ROOTS = ['*'] - -################################ MIT Certificates SSL Auth ################################# - -MITX_FEATURES['AUTH_USE_MIT_CERTIFICATES'] = True - -################################ DEBUG TOOLBAR ################################# -INSTALLED_APPS += ('debug_toolbar',) -MIDDLEWARE_CLASSES += ('django_comment_client.utils.QueryCountDebugMiddleware', - 'debug_toolbar.middleware.DebugToolbarMiddleware',) -INTERNAL_IPS = ('127.0.0.1',) - -DEBUG_TOOLBAR_PANELS = ( - 'debug_toolbar.panels.version.VersionDebugPanel', - 'debug_toolbar.panels.timer.TimerDebugPanel', - 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', - 'debug_toolbar.panels.headers.HeaderDebugPanel', - 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', - 'debug_toolbar.panels.sql.SQLDebugPanel', - 'debug_toolbar.panels.signals.SignalDebugPanel', - 'debug_toolbar.panels.logger.LoggingPanel', - -# Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and -# Django=1.3.1/1.4 where requests to views get duplicated (your method gets -# hit twice). So you can uncomment when you need to diagnose performance -# problems, but you shouldn't leave it on. -# 'debug_toolbar.panels.profiling.ProfilingDebugPanel', -) - -DEBUG_TOOLBAR_CONFIG = { - 'INTERCEPT_REDIRECTS': False -} -############################ FILE UPLOADS (for discussion forums) ############################# -DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' -MEDIA_ROOT = ENV_ROOT / "uploads" -MEDIA_URL = "/static/uploads/" -STATICFILES_DIRS.append(("uploads", MEDIA_ROOT)) -FILE_UPLOAD_TEMP_DIR = ENV_ROOT / "uploads" -FILE_UPLOAD_HANDLERS = ( - 'django.core.files.uploadhandler.MemoryFileUploadHandler', - 'django.core.files.uploadhandler.TemporaryFileUploadHandler', -) - -########################### PIPELINE ################################# - -PIPELINE_SASS_ARGUMENTS = '-r {proj_dir}/static/sass/bourbon/lib/bourbon.rb'.format(proj_dir=PROJECT_ROOT) - -########################## PEARSON TESTING ########################### -MITX_FEATURES['ENABLE_PEARSON_HACK_TEST'] = True -PEARSON_TEST_USER = "pearsontest" -PEARSON_TEST_PASSWORD = "12345" - -#AWS upload stuff for local file testing -AWS_ACCESS_KEY_ID = "***REMOVED***" -AWS_SECRET_ACCESS_KEY = "***REMOVED***" -AWS_STORAGE_BUCKET_NAME = 'edxuploads' - From 81b86bb8fe795a201f126239d229b6f5554a2732 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 14:16:26 -0500 Subject: [PATCH 089/347] Retrack dev --- lms/envs/dev.py | 200 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 lms/envs/dev.py diff --git a/lms/envs/dev.py b/lms/envs/dev.py new file mode 100644 index 0000000000..99ee9662ee --- /dev/null +++ b/lms/envs/dev.py @@ -0,0 +1,200 @@ +""" +This config file runs the simplest dev environment using sqlite, and db-based +sessions. Assumes structure: + +/envroot/ + /db # This is where it'll write the database file + /mitx # The location of this repo + /log # Where we're going to write log files +""" +from .common import * +from logsettings import get_logger_config + +DEBUG = True +TEMPLATE_DEBUG = True + + +MITX_FEATURES['DISABLE_START_DATES'] = True +MITX_FEATURES['ENABLE_SQL_TRACKING_LOGS'] = True +MITX_FEATURES['SUBDOMAIN_COURSE_LISTINGS'] = False # Enable to test subdomains--otherwise, want all courses to show up +MITX_FEATURES['SUBDOMAIN_BRANDING'] = True +MITX_FEATURES['FORCE_UNIVERSITY_DOMAIN'] = None # show all university courses if in dev (ie don't use HTTP_HOST) +MITX_FEATURES['ENABLE_MANUAL_GIT_RELOAD'] = True +MITX_FEATURES['ENABLE_PSYCHOMETRICS'] = False # real-time psychometrics (eg item response theory analysis in instructor dashboard) + + +WIKI_ENABLED = True + +LOGGING = get_logger_config(ENV_ROOT / "log", + logging_env="dev", + local_loglevel="DEBUG", + dev_env=True, + debug=True) + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': ENV_ROOT / "db" / "mitx.db", + } +} + +CACHES = { + # This is the cache used for most things. + # In staging/prod envs, the sessions also live here. + 'default': { + 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', + 'LOCATION': 'mitx_loc_mem_cache', + 'KEY_FUNCTION': 'util.memcache.safe_key', + }, + + # The general cache is what you get if you use our util.cache. It's used for + # things like caching the course.xml file for different A/B test groups. + # We set it to be a DummyCache to force reloading of course.xml in dev. + # In staging environments, we would grab VERSION from data uploaded by the + # push process. + 'general': { + 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', + 'KEY_PREFIX': 'general', + 'VERSION': 4, + 'KEY_FUNCTION': 'util.memcache.safe_key', + } +} + + +XQUEUE_INTERFACE = { + "url": "https://sandbox-xqueue.edx.org", + "django_auth": { + "username": "lms", + "password": "***REMOVED***" + }, + "basic_auth": ('anant', 'agarwal'), +} + +# Make the keyedcache startup warnings go away +CACHE_TIMEOUT = 0 + +# Dummy secret key for dev +SECRET_KEY = '85920908f28904ed733fe576320db18cabd7b6cd' + + +COURSE_LISTINGS = { + 'default': ['BerkeleyX/CS169.1x/2012_Fall', + 'BerkeleyX/CS188.1x/2012_Fall', + 'HarvardX/CS50x/2012', + 'HarvardX/PH207x/2012_Fall', + 'MITx/3.091x/2012_Fall', + 'MITx/6.002x/2012_Fall', + 'MITx/6.00x/2012_Fall'], + 'berkeley': ['BerkeleyX/CS169/fa12', + 'BerkeleyX/CS188/fa12'], + 'harvard': ['HarvardX/CS50x/2012H'], + 'mit': ['MITx/3.091/MIT_2012_Fall'], + 'sjsu': ['MITx/6.002x-EE98/2012_Fall_SJSU'], +} + + +SUBDOMAIN_BRANDING = { + 'sjsu': 'MITx', + 'mit': 'MITx', + 'berkeley': 'BerkeleyX', + 'harvard': 'HarvardX', +} + +# List of `university` landing pages to display, even though they may not +# have an actual course with that org set +VIRTUAL_UNIVERSITIES = [] + +COMMENTS_SERVICE_KEY = "PUT_YOUR_API_KEY_HERE" + +################################# mitx revision string ##################### + +MITX_VERSION_STRING = os.popen('cd %s; git describe' % REPO_ROOT).read().strip() + +################################# Staff grading config ##################### + +STAFF_GRADING_INTERFACE = { + 'url': 'http://127.0.0.1:3033/staff_grading', + 'username': 'lms', + 'password': 'abcd', + } + +################################# Peer grading config ##################### + +PEER_GRADING_INTERFACE = { + 'url': 'http://127.0.0.1:3033/peer_grading', + 'username': 'lms', + 'password': 'abcd', + } +################################ LMS Migration ################################# +MITX_FEATURES['ENABLE_LMS_MIGRATION'] = True +MITX_FEATURES['ACCESS_REQUIRE_STAFF_FOR_COURSE'] = False # require that user be in the staff_* group to be able to enroll +MITX_FEATURES['USE_XQA_SERVER'] = 'http://xqa:server@content-qa.mitx.mit.edu/xqa' + +INSTALLED_APPS += ('lms_migration',) + +LMS_MIGRATION_ALLOWED_IPS = ['127.0.0.1'] + +################################ OpenID Auth ################################# +MITX_FEATURES['AUTH_USE_OPENID'] = True +MITX_FEATURES['AUTH_USE_OPENID_PROVIDER'] = True +MITX_FEATURES['BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH'] = True + +INSTALLED_APPS += ('external_auth',) +INSTALLED_APPS += ('django_openid_auth',) + +OPENID_CREATE_USERS = False +OPENID_UPDATE_DETAILS_FROM_SREG = True +OPENID_SSO_SERVER_URL = 'https://www.google.com/accounts/o8/id' # TODO: accept more endpoints +OPENID_USE_AS_ADMIN_LOGIN = False + +OPENID_PROVIDER_TRUSTED_ROOTS = ['*'] + +################################ MIT Certificates SSL Auth ################################# + +MITX_FEATURES['AUTH_USE_MIT_CERTIFICATES'] = True + +################################ DEBUG TOOLBAR ################################# +INSTALLED_APPS += ('debug_toolbar',) +MIDDLEWARE_CLASSES += ('django_comment_client.utils.QueryCountDebugMiddleware', + 'debug_toolbar.middleware.DebugToolbarMiddleware',) +INTERNAL_IPS = ('127.0.0.1',) + +DEBUG_TOOLBAR_PANELS = ( + 'debug_toolbar.panels.version.VersionDebugPanel', + 'debug_toolbar.panels.timer.TimerDebugPanel', + 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', + 'debug_toolbar.panels.headers.HeaderDebugPanel', + 'debug_toolbar.panels.request_vars.RequestVarsDebugPanel', + 'debug_toolbar.panels.sql.SQLDebugPanel', + 'debug_toolbar.panels.signals.SignalDebugPanel', + 'debug_toolbar.panels.logger.LoggingPanel', + +# Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and +# Django=1.3.1/1.4 where requests to views get duplicated (your method gets +# hit twice). So you can uncomment when you need to diagnose performance +# problems, but you shouldn't leave it on. +# 'debug_toolbar.panels.profiling.ProfilingDebugPanel', +) + +DEBUG_TOOLBAR_CONFIG = { + 'INTERCEPT_REDIRECTS': False +} +############################ FILE UPLOADS (for discussion forums) ############################# +DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' +MEDIA_ROOT = ENV_ROOT / "uploads" +MEDIA_URL = "/static/uploads/" +STATICFILES_DIRS.append(("uploads", MEDIA_ROOT)) +FILE_UPLOAD_TEMP_DIR = ENV_ROOT / "uploads" +FILE_UPLOAD_HANDLERS = ( + 'django.core.files.uploadhandler.MemoryFileUploadHandler', + 'django.core.files.uploadhandler.TemporaryFileUploadHandler', +) + +########################### PIPELINE ################################# + +PIPELINE_SASS_ARGUMENTS = '-r {proj_dir}/static/sass/bourbon/lib/bourbon.rb'.format(proj_dir=PROJECT_ROOT) + +########################## PEARSON TESTING ########################### +MITX_FEATURES['ENABLE_PEARSON_HACK_TEST'] = True +PEARSON_TEST_USER = "pearsontest" +PEARSON_TEST_PASSWORD = "12345" From 6cf2742e32f9ace474b0a1e4ae4d898b0c868c3c Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 14:22:57 -0500 Subject: [PATCH 090/347] Trim unneeded files --- .../peer_grading_service.py | 380 -------------- lms/djangoapps/open_ended_grading/views.py | 6 - .../src/peer_grading/peer_grading.coffee | 27 - .../peer_grading/peer_grading_problem.coffee | 478 ------------------ .../peer_grading_notifications.html | 17 - 5 files changed, 908 deletions(-) delete mode 100644 lms/djangoapps/open_ended_grading/peer_grading_service.py delete mode 100644 lms/static/coffee/src/peer_grading/peer_grading.coffee delete mode 100644 lms/static/coffee/src/peer_grading/peer_grading_problem.coffee delete mode 100644 lms/templates/peer_grading/peer_grading_notifications.html diff --git a/lms/djangoapps/open_ended_grading/peer_grading_service.py b/lms/djangoapps/open_ended_grading/peer_grading_service.py deleted file mode 100644 index 994ba0b2be..0000000000 --- a/lms/djangoapps/open_ended_grading/peer_grading_service.py +++ /dev/null @@ -1,380 +0,0 @@ -""" -This module provides an interface on the grading-service backend -for peer grading - -Use peer_grading_service() to get the version specified -in settings.PEER_GRADING_INTERFACE - -""" -import json -import logging -import requests -from requests.exceptions import RequestException, ConnectionError, HTTPError -import sys - -from django.conf import settings -from django.http import HttpResponse, Http404 -from grading_service import GradingService -from grading_service import GradingServiceError - -from courseware.access import has_access -from util.json_request import expect_json -from xmodule.course_module import CourseDescriptor -from xmodule.combined_open_ended_rubric import CombinedOpenEndedRubric -from student.models import unique_id_for_user -from lxml import etree - -log = logging.getLogger(__name__) - -""" -This is a mock peer grading service that can be used for unit tests -without making actual service calls to the grading controller -""" -class MockPeerGradingService(object): - def get_next_submission(self, problem_location, grader_id): - return json.dumps({'success': True, - 'submission_id':1, - 'submission_key': "", - 'student_response': 'fake student response', - 'prompt': 'fake submission prompt', - 'rubric': 'fake rubric', - 'max_score': 4}) - - def save_grade(self, location, grader_id, submission_id, - score, feedback, submission_key): - return json.dumps({'success': True}) - - def is_student_calibrated(self, problem_location, grader_id): - return json.dumps({'success': True, 'calibrated': True}) - - def show_calibration_essay(self, problem_location, grader_id): - return json.dumps({'success': True, - 'submission_id':1, - 'submission_key': '', - 'student_response': 'fake student response', - 'prompt': 'fake submission prompt', - 'rubric': 'fake rubric', - 'max_score': 4}) - - def save_calibration_essay(self, problem_location, grader_id, - calibration_essay_id, submission_key, score, feedback): - return {'success': True, 'actual_score': 2} - - def get_problem_list(self, course_id, grader_id): - return json.dumps({'success': True, - 'problem_list': [ - json.dumps({'location': 'i4x://MITx/3.091x/problem/open_ended_demo1', - 'problem_name': "Problem 1", 'num_graded': 3, 'num_pending': 5}), - json.dumps({'location': 'i4x://MITx/3.091x/problem/open_ended_demo2', - 'problem_name': "Problem 2", 'num_graded': 1, 'num_pending': 5}) - ]}) - -class PeerGradingService(GradingService): - """ - Interface with the grading controller for peer grading - """ - def __init__(self, config): - super(PeerGradingService, self).__init__(config) - self.get_next_submission_url = self.url + '/get_next_submission/' - self.save_grade_url = self.url + '/save_grade/' - self.is_student_calibrated_url = self.url + '/is_student_calibrated/' - self.show_calibration_essay_url = self.url + '/show_calibration_essay/' - self.save_calibration_essay_url = self.url + '/save_calibration_essay/' - self.get_problem_list_url = self.url + '/get_problem_list/' - self.get_notifications_url = self.url + '/get_notifications/' - - def get_next_submission(self, problem_location, grader_id): - response = self.get(self.get_next_submission_url, - {'location': problem_location, 'grader_id': grader_id}) - return json.dumps(self._render_rubric(response)) - - def save_grade(self, location, grader_id, submission_id, score, feedback, submission_key, rubric_scores, submission_flagged): - data = {'grader_id' : grader_id, - 'submission_id' : submission_id, - 'score' : score, - 'feedback' : feedback, - 'submission_key': submission_key, - 'location': location, - 'rubric_scores': rubric_scores, - 'rubric_scores_complete': True, - 'submission_flagged' : submission_flagged} - return self.post(self.save_grade_url, data) - - def is_student_calibrated(self, problem_location, grader_id): - params = {'problem_id' : problem_location, 'student_id': grader_id} - return self.get(self.is_student_calibrated_url, params) - - def show_calibration_essay(self, problem_location, grader_id): - params = {'problem_id' : problem_location, 'student_id': grader_id} - response = self.get(self.show_calibration_essay_url, params) - return json.dumps(self._render_rubric(response)) - - def save_calibration_essay(self, problem_location, grader_id, calibration_essay_id, submission_key, - score, feedback, rubric_scores): - data = {'location': problem_location, - 'student_id': grader_id, - 'calibration_essay_id': calibration_essay_id, - 'submission_key': submission_key, - 'score': score, - 'feedback': feedback, - 'rubric_scores[]': rubric_scores, - 'rubric_scores_complete': True} - return self.post(self.save_calibration_essay_url, data) - - def get_problem_list(self, course_id, grader_id): - params = {'course_id': course_id, 'student_id': grader_id} - response = self.get(self.get_problem_list_url, params) - return response - - def get_notifications(self, course_id, grader_id): - params = {'course_id': course_id, 'student_id': grader_id} - response = self.get(self.get_notifications_url, params) - return response - - -_service = None -def peer_grading_service(): - """ - Return a peer grading service instance--if settings.MOCK_PEER_GRADING is True, - returns a mock one, otherwise a real one. - - Caches the result, so changing the setting after the first call to this - function will have no effect. - """ - global _service - if _service is not None: - return _service - - if settings.MOCK_PEER_GRADING: - _service = MockPeerGradingService() - else: - _service = PeerGradingService(settings.PEER_GRADING_INTERFACE) - - return _service - -def _err_response(msg): - """ - Return a HttpResponse with a json dump with success=False, and the given error message. - """ - return HttpResponse(json.dumps({'success': False, 'error': msg}), - mimetype="application/json") - -def _check_required(request, required): - actual = set(request.POST.keys()) - missing = required - actual - if len(missing) > 0: - return False, "Missing required keys: {0}".format(', '.join(missing)) - else: - return True, "" - -def _check_post(request): - if request.method != 'POST': - raise Http404 - - -def get_next_submission(request, course_id): - """ - Makes a call to the grading controller for the next essay that should be graded - Returns a json dict with the following keys: - - 'success': bool - - 'submission_id': a unique identifier for the submission, to be passed back - with the grade. - - 'submission': the submission, rendered as read-only html for grading - - 'rubric': the rubric, also rendered as html. - - 'submission_key': a key associated with the submission for validation reasons - - 'error': if success is False, will have an error message with more info. - """ - _check_post(request) - required = set(['location']) - success, message = _check_required(request, required) - if not success: - return _err_response(message) - grader_id = unique_id_for_user(request.user) - p = request.POST - location = p['location'] - - try: - response = peer_grading_service().get_next_submission(location, grader_id) - return HttpResponse(response, - mimetype="application/json") - except GradingServiceError: - log.exception("Error getting next submission. server url: {0} location: {1}, grader_id: {2}" - .format(peer_grading_service().url, location, grader_id)) - return json.dumps({'success': False, - 'error': 'Could not connect to grading service'}) - -def save_grade(request, course_id): - """ - Saves the grade of a given submission. - Input: - The request should have the following keys: - location - problem location - submission_id - id associated with this submission - submission_key - submission key given for validation purposes - score - the grade that was given to the submission - feedback - the feedback from the student - Returns - A json object with the following keys: - success: bool indicating whether the save was a success - error: if there was an error in the submission, this is the error message - """ - _check_post(request) - required = set(['location', 'submission_id', 'submission_key', 'score', 'feedback', 'rubric_scores[]', 'submission_flagged']) - success, message = _check_required(request, required) - if not success: - return _err_response(message) - grader_id = unique_id_for_user(request.user) - p = request.POST - location = p['location'] - submission_id = p['submission_id'] - score = p['score'] - feedback = p['feedback'] - submission_key = p['submission_key'] - rubric_scores = p.getlist('rubric_scores[]') - submission_flagged = p['submission_flagged'] - try: - response = peer_grading_service().save_grade(location, grader_id, submission_id, - score, feedback, submission_key, rubric_scores, submission_flagged) - return HttpResponse(response, mimetype="application/json") - except GradingServiceError: - log.exception("""Error saving grade. server url: {0}, location: {1}, submission_id:{2}, - submission_key: {3}, score: {4}""" - .format(peer_grading_service().url, - location, submission_id, submission_key, score) - ) - return json.dumps({'success': False, - 'error': 'Could not connect to grading service'}) - - - -def is_student_calibrated(request, course_id): - """ - Calls the grading controller to see if the given student is calibrated - on the given problem - - Input: - In the request, we need the following arguments: - location - problem location - - Returns: - Json object with the following keys - success - bool indicating whether or not the call was successful - calibrated - true if the grader has fully calibrated and can now move on to grading - - false if the grader is still working on calibration problems - total_calibrated_on_so_far - the number of calibration essays for this problem - that this grader has graded - """ - _check_post(request) - required = set(['location']) - success, message = _check_required(request, required) - if not success: - return _err_response(message) - grader_id = unique_id_for_user(request.user) - p = request.POST - location = p['location'] - - try: - response = peer_grading_service().is_student_calibrated(location, grader_id) - return HttpResponse(response, mimetype="application/json") - except GradingServiceError: - log.exception("Error from grading service. server url: {0}, grader_id: {0}, location: {1}" - .format(peer_grading_service().url, grader_id, location)) - return json.dumps({'success': False, - 'error': 'Could not connect to grading service'}) - - - -def show_calibration_essay(request, course_id): - """ - Fetch the next calibration essay from the grading controller and return it - Inputs: - In the request - location - problem location - - Returns: - A json dict with the following keys - 'success': bool - - 'submission_id': a unique identifier for the submission, to be passed back - with the grade. - - 'submission': the submission, rendered as read-only html for grading - - 'rubric': the rubric, also rendered as html. - - 'submission_key': a key associated with the submission for validation reasons - - 'error': if success is False, will have an error message with more info. - - """ - _check_post(request) - - required = set(['location']) - success, message = _check_required(request, required) - if not success: - return _err_response(message) - - grader_id = unique_id_for_user(request.user) - p = request.POST - location = p['location'] - try: - response = peer_grading_service().show_calibration_essay(location, grader_id) - return HttpResponse(response, mimetype="application/json") - except GradingServiceError: - log.exception("Error from grading service. server url: {0}, location: {0}" - .format(peer_grading_service().url, location)) - return json.dumps({'success': False, - 'error': 'Could not connect to grading service'}) - # if we can't parse the rubric into HTML, - except etree.XMLSyntaxError: - log.exception("Cannot parse rubric string. Raw string: {0}" - .format(rubric)) - return json.dumps({'success': False, - 'error': 'Error displaying submission'}) - - -def save_calibration_essay(request, course_id): - """ - Saves the grader's grade of a given calibration. - Input: - The request should have the following keys: - location - problem location - submission_id - id associated with this submission - submission_key - submission key given for validation purposes - score - the grade that was given to the submission - feedback - the feedback from the student - Returns - A json object with the following keys: - success: bool indicating whether the save was a success - error: if there was an error in the submission, this is the error message - actual_score: the score that the instructor gave to this calibration essay - - """ - _check_post(request) - - required = set(['location', 'submission_id', 'submission_key', 'score', 'feedback', 'rubric_scores[]']) - success, message = _check_required(request, required) - if not success: - return _err_response(message) - grader_id = unique_id_for_user(request.user) - p = request.POST - location = p['location'] - calibration_essay_id = p['submission_id'] - submission_key = p['submission_key'] - score = p['score'] - feedback = p['feedback'] - rubric_scores = p.getlist('rubric_scores[]') - - try: - response = peer_grading_service().save_calibration_essay(location, grader_id, calibration_essay_id, - submission_key, score, feedback, rubric_scores) - return HttpResponse(response, mimetype="application/json") - except GradingServiceError: - log.exception("Error saving calibration grade, location: {0}, submission_id: {1}, submission_key: {2}, grader_id: {3}".format(location, submission_id, submission_key, grader_id)) - return _err_response('Could not connect to grading service') \ No newline at end of file diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index c20ff85ee0..5163702343 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -12,8 +12,6 @@ from django.core.urlresolvers import reverse from student.models import unique_id_for_user from courseware.courses import get_course_with_access -from peer_grading_service import PeerGradingService -from peer_grading_service import MockPeerGradingService from controller_query_service import ControllerQueryService from grading_service import GradingServiceError import json @@ -39,10 +37,6 @@ from django.http import HttpResponse, Http404, HttpResponseRedirect log = logging.getLogger(__name__) template_imports = {'urllib': urllib} -if settings.MOCK_PEER_GRADING: - peer_gs = MockPeerGradingService() -else: - peer_gs = PeerGradingService(settings.PEER_GRADING_INTERFACE) controller_url = open_ended_util.get_controller_url() controller_qs = ControllerQueryService(controller_url) diff --git a/lms/static/coffee/src/peer_grading/peer_grading.coffee b/lms/static/coffee/src/peer_grading/peer_grading.coffee deleted file mode 100644 index ed79ba9c71..0000000000 --- a/lms/static/coffee/src/peer_grading/peer_grading.coffee +++ /dev/null @@ -1,27 +0,0 @@ -# This is a simple class that just hides the error container -# and message container when they are empty -# Can (and should be) expanded upon when our problem list -# becomes more sophisticated -class PeerGrading - constructor: () -> - @error_container = $('.error-container') - @error_container.toggle(not @error_container.is(':empty')) - - @message_container = $('.message-container') - @message_container.toggle(not @message_container.is(':empty')) - - @problem_list = $('.problem-list') - @construct_progress_bar() - - construct_progress_bar: () => - problems = @problem_list.find('tr').next() - problems.each( (index, element) => - problem = $(element) - progress_bar = problem.find('.progress-bar') - bar_value = parseInt(problem.data('graded')) - bar_max = parseInt(problem.data('required')) + bar_value - progress_bar.progressbar({value: bar_value, max: bar_max}) - ) - - -$(document).ready(() -> new PeerGrading()) diff --git a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee b/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee deleted file mode 100644 index ab16b34d12..0000000000 --- a/lms/static/coffee/src/peer_grading/peer_grading_problem.coffee +++ /dev/null @@ -1,478 +0,0 @@ -################################## -# -# This is the JS that renders the peer grading problem page. -# Fetches the correct problem and/or calibration essay -# and sends back the grades -# -# Should not be run when we don't have a location to send back -# to the server -# -# PeerGradingProblemBackend - -# makes all the ajax requests and provides a mock interface -# for testing purposes -# -# PeerGradingProblem - -# handles the rendering and user interactions with the interface -# -################################## -class PeerGradingProblemBackend - constructor: (ajax_url, mock_backend) -> - @mock_backend = mock_backend - @ajax_url = ajax_url - @mock_cnt = 0 - - post: (cmd, data, callback) -> - if @mock_backend - callback(@mock(cmd, data)) - else - # if this post request fails, the error callback will catch it - $.post(@ajax_url + cmd, data, callback) - .error => callback({success: false, error: "Error occured while performing this operation"}) - - mock: (cmd, data) -> - if cmd == 'is_student_calibrated' - # change to test each version - response = - success: true - calibrated: @mock_cnt >= 2 - else if cmd == 'show_calibration_essay' - #response = - # success: false - # error: "There was an error" - @mock_cnt++ - response = - success: true - submission_id: 1 - submission_key: 'abcd' - student_response: ''' - Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. - -The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. - ''' - prompt: ''' -

    S11E3: Metal Bands

    -

    Shown below are schematic band diagrams for two different metals. Both diagrams appear different, yet both of the elements are undisputably metallic in nature.

    -

    * Why is it that both sodium and magnesium behave as metals, even though the s-band of magnesium is filled?

    -

    This is a self-assessed open response question. Please use as much space as you need in the box below to answer the question.

    - ''' - rubric: ''' - - - - - - - - - - - - - - - - - - -
    Purpose - - - - - - - -
    Organization - - - - - - - -
    - ''' - max_score: 4 - else if cmd == 'get_next_submission' - response = - success: true - submission_id: 1 - submission_key: 'abcd' - student_response: '''Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nec tristique ante. Proin at mauris sapien, quis varius leo. Morbi laoreet leo nisi. Morbi aliquam lacus ante. Cras iaculis velit sed diam mattis a fermentum urna luctus. Duis consectetur nunc vitae felis facilisis eget vulputate risus viverra. Cras consectetur ullamcorper lobortis. Nam eu gravida lorem. Nulla facilisi. Nullam quis felis enim. Mauris orci lectus, dictum id cursus in, vulputate in massa. - -Phasellus non varius sem. Nullam commodo lacinia odio sit amet egestas. Donec ullamcorper sapien sagittis arcu volutpat placerat. Phasellus ut pretium ante. Nam dictum pulvinar nibh dapibus tristique. Sed at tellus mi, fringilla convallis justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus tristique rutrum nulla sed eleifend. Praesent at nunc arcu. Mauris condimentum faucibus nibh, eget commodo quam viverra sed. Morbi in tincidunt dolor. Morbi sed augue et augue interdum fermentum. - -Curabitur tristique purus ac arcu consequat cursus. Cras diam felis, dignissim quis placerat at, aliquet ac metus. Mauris vulputate est eu nibh imperdiet varius. Cras aliquet rhoncus elit a laoreet. Mauris consectetur erat et erat scelerisque eu faucibus dolor consequat. Nam adipiscing sagittis nisl, eu mollis massa tempor ac. Nulla scelerisque tempus blandit. Phasellus ac ipsum eros, id posuere arcu. Nullam non sapien arcu. Vivamus sit amet lorem justo, ac tempus turpis. Suspendisse pharetra gravida imperdiet. Pellentesque lacinia mi eu elit luctus pellentesque. Sed accumsan libero a magna elementum varius. Nunc eget pellentesque metus. ''' - prompt: ''' -

    S11E3: Metal Bands

    -

    Shown below are schematic band diagrams for two different metals. Both diagrams appear different, yet both of the elements are undisputably metallic in nature.

    -

    * Why is it that both sodium and magnesium behave as metals, even though the s-band of magnesium is filled?

    -

    This is a self-assessed open response question. Please use as much space as you need in the box below to answer the question.

    - ''' - rubric: ''' - - - - - - - - - - - - - - - - - - -
    Purpose - - - - - - - -
    Organization - - - - - - - -
    - ''' - max_score: 4 - else if cmd == 'save_calibration_essay' - response = - success: true - actual_score: 2 - else if cmd == 'save_grade' - response = - success: true - - return response - - -class PeerGradingProblem - constructor: (backend) -> - @prompt_wrapper = $('.prompt-wrapper') - @backend = backend - - - # get the location of the problem - @location = $('.peer-grading').data('location') - # prevent this code from trying to run - # when we don't have a location - if(!@location) - return - - # get the other elements we want to fill in - @submission_container = $('.submission-container') - @prompt_container = $('.prompt-container') - @rubric_container = $('.rubric-container') - @flag_student_container = $('.flag-student-container') - @calibration_panel = $('.calibration-panel') - @grading_panel = $('.grading-panel') - @content_panel = $('.content-panel') - @grading_message = $('.grading-message') - @grading_message.hide() - - @grading_wrapper =$('.grading-wrapper') - @calibration_feedback_panel = $('.calibration-feedback') - @interstitial_page = $('.interstitial-page') - @interstitial_page.hide() - - @error_container = $('.error-container') - - @submission_key_input = $("input[name='submission-key']") - @essay_id_input = $("input[name='essay-id']") - @feedback_area = $('.feedback-area') - - @score_selection_container = $('.score-selection-container') - @rubric_selection_container = $('.rubric-selection-container') - @grade = null - @calibration = null - - @submit_button = $('.submit-button') - @action_button = $('.action-button') - @calibration_feedback_button = $('.calibration-feedback-button') - @interstitial_page_button = $('.interstitial-page-button') - @flag_student_checkbox = $('.flag-checkbox') - - Collapsible.setCollapsibles(@content_panel) - - # Set up the click event handlers - @action_button.click -> history.back() - @calibration_feedback_button.click => - @calibration_feedback_panel.hide() - @grading_wrapper.show() - @is_calibrated_check() - - @interstitial_page_button.click => - @interstitial_page.hide() - @is_calibrated_check() - - @is_calibrated_check() - - - ########## - # - # Ajax calls to the backend - # - ########## - is_calibrated_check: () => - @backend.post('is_student_calibrated', {location: @location}, @calibration_check_callback) - - fetch_calibration_essay: () => - @backend.post('show_calibration_essay', {location: @location}, @render_calibration) - - fetch_submission_essay: () => - @backend.post('get_next_submission', {location: @location}, @render_submission) - - # finds the scores for each rubric category - get_score_list: () => - # find the number of categories: - num_categories = $('table.rubric tr').length - - score_lst = [] - # get the score for each one - for i in [0..(num_categories-1)] - score = $("input[name='score-selection-#{i}']:checked").val() - score_lst.push(score) - - return score_lst - - construct_data: () -> - data = - rubric_scores: @get_score_list() - score: @grade - location: @location - submission_id: @essay_id_input.val() - submission_key: @submission_key_input.val() - feedback: @feedback_area.val() - submission_flagged: @flag_student_checkbox.is(':checked') - return data - - - submit_calibration_essay: ()=> - data = @construct_data() - @backend.post('save_calibration_essay', data, @calibration_callback) - - submit_grade: () => - data = @construct_data() - @backend.post('save_grade', data, @submission_callback) - - - ########## - # - # Callbacks for various events - # - ########## - - # called after we perform an is_student_calibrated check - calibration_check_callback: (response) => - if response.success - # if we haven't been calibrating before - if response.calibrated and (@calibration == null or @calibration == false) - @calibration = false - @fetch_submission_essay() - # If we were calibrating before and no longer need to, - # show the interstitial page - else if response.calibrated and @calibration == true - @calibration = false - @render_interstitial_page() - else - @calibration = true - @fetch_calibration_essay() - else if response.error - @render_error(response.error) - else - @render_error("Error contacting the grading service") - - - # called after we submit a calibration score - calibration_callback: (response) => - if response.success - @render_calibration_feedback(response) - else if response.error - @render_error(response.error) - else - @render_error("Error saving calibration score") - - # called after we submit a submission score - submission_callback: (response) => - if response.success - @is_calibrated_check() - @grading_message.fadeIn() - @grading_message.html("

    Grade sent successfully.

    ") - else - if response.error - @render_error(response.error) - else - @render_error("Error occurred while submitting grade") - - # called after a grade is selected on the interface - graded_callback: (event) => - @grade = $("input[name='grade-selection']:checked").val() - if @grade == undefined - return - # check to see whether or not any categories have not been scored - num_categories = $('table.rubric tr').length - for i in [0..(num_categories-1)] - score = $("input[name='score-selection-#{i}']:checked").val() - if score == undefined - return - # show button if we have scores for all categories - @show_submit_button() - - - - ########## - # - # Rendering methods and helpers - # - ########## - # renders a calibration essay - render_calibration: (response) => - if response.success - - # load in all the data - @submission_container.html("

    Training Essay

    ") - @render_submission_data(response) - # TODO: indicate that we're in calibration mode - @calibration_panel.addClass('current-state') - @grading_panel.removeClass('current-state') - - # Display the right text - # both versions of the text are written into the template itself - # we only need to show/hide the correct ones at the correct time - @calibration_panel.find('.calibration-text').show() - @grading_panel.find('.calibration-text').show() - @calibration_panel.find('.grading-text').hide() - @grading_panel.find('.grading-text').hide() - @flag_student_container.hide() - - @submit_button.unbind('click') - @submit_button.click @submit_calibration_essay - - else if response.error - @render_error(response.error) - else - @render_error("An error occurred while retrieving the next calibration essay") - - # Renders a student submission to be graded - render_submission: (response) => - if response.success - @submit_button.hide() - @submission_container.html("

    Submitted Essay

    ") - @render_submission_data(response) - - @calibration_panel.removeClass('current-state') - @grading_panel.addClass('current-state') - - # Display the correct text - # both versions of the text are written into the template itself - # we only need to show/hide the correct ones at the correct time - @calibration_panel.find('.calibration-text').hide() - @grading_panel.find('.calibration-text').hide() - @calibration_panel.find('.grading-text').show() - @grading_panel.find('.grading-text').show() - @flag_student_container.show() - - @submit_button.unbind('click') - @submit_button.click @submit_grade - else if response.error - @render_error(response.error) - else - @render_error("An error occured when retrieving the next submission.") - - - make_paragraphs: (text) -> - paragraph_split = text.split(/\n\s*\n/) - new_text = '' - for paragraph in paragraph_split - new_text += "

    #{paragraph}

    " - return new_text - - # render common information between calibration and grading - render_submission_data: (response) => - @content_panel.show() - - @submission_container.append(@make_paragraphs(response.student_response)) - @prompt_container.html(response.prompt) - @rubric_selection_container.html(response.rubric) - @submission_key_input.val(response.submission_key) - @essay_id_input.val(response.submission_id) - @setup_score_selection(response.max_score) - - @submit_button.hide() - @action_button.hide() - @calibration_feedback_panel.hide() - - - render_calibration_feedback: (response) => - # display correct grade - @calibration_feedback_panel.slideDown() - calibration_wrapper = $('.calibration-feedback-wrapper') - calibration_wrapper.html("

    The score you gave was: #{@grade}. The actual score is: #{response.actual_score}

    ") - - - score = parseInt(@grade) - actual_score = parseInt(response.actual_score) - - if score == actual_score - calibration_wrapper.append("

    Congratulations! Your score matches the actual score!

    ") - else - calibration_wrapper.append("

    Please try to understand the grading critera better to be more accurate next time.

    ") - - # disable score selection and submission from the grading interface - $("input[name='score-selection']").attr('disabled', true) - @submit_button.hide() - - render_interstitial_page: () => - @content_panel.hide() - @interstitial_page.show() - - render_error: (error_message) => - @error_container.show() - @calibration_feedback_panel.hide() - @error_container.html(error_message) - @content_panel.hide() - @action_button.show() - - show_submit_button: () => - @submit_button.show() - - setup_score_selection: (max_score) => - - # first, get rid of all the old inputs, if any. - @score_selection_container.html(""" -

    Overall Score

    -

    Choose an overall score for this submission.

    - """) - - # Now create new labels and inputs for each possible score. - for score in [0..max_score] - id = 'score-' + score - label = """""" - - input = """ - - """ # " fix broken parsing in emacs - @score_selection_container.append(input + label) - - # And now hook up an event handler again - $("input[name='score-selection']").change @graded_callback - $("input[name='grade-selection']").change @graded_callback - - - -mock_backend = false -ajax_url = $('.peer-grading').data('ajax_url') -backend = new PeerGradingProblemBackend(ajax_url, mock_backend) -$(document).ready(() -> new PeerGradingProblem(backend)) diff --git a/lms/templates/peer_grading/peer_grading_notifications.html b/lms/templates/peer_grading/peer_grading_notifications.html deleted file mode 100644 index 40cf85fb0f..0000000000 --- a/lms/templates/peer_grading/peer_grading_notifications.html +++ /dev/null @@ -1,17 +0,0 @@ -<%inherit file="/main.html" /> -<%block name="bodyclass">${course.css_class} -<%namespace name='static' file='/static_content.html'/> - -<%block name="headextra"> -<%static:css group='course'/> - - -<%block name="title">${course.number} Peer Grading - -<%include file="/courseware/course_navigation.html" args="active_page='peer_grading'" /> - -<%block name="js_extra"> -<%static:js group='peer_grading'/> - - -${peer_grading_html|n} \ No newline at end of file From 7860e013adbceddb8066a26ff035917f9c3931ac Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Mon, 4 Feb 2013 14:25:23 -0500 Subject: [PATCH 091/347] Fix unit tests to handle new max score requirements. --- .../lib/xmodule/xmodule/tests/test_combined_open_ended.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py index c89f5ee848..e7f927fc9e 100644 --- a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py +++ b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py @@ -30,9 +30,10 @@ class OpenEndedChildTest(unittest.TestCase): Response Quality + ''' - max_score = 4 + max_score = 1 static_data = { 'max_attempts': 20, @@ -270,9 +271,10 @@ class CombinedOpenEndedModuleTest(unittest.TestCase): Response Quality + ''' - max_score = 3 + max_score = 1 metadata = {'attempts': '10', 'max_score': max_score} From ed282c05d4910e74bc3cfd7c3cf38d3838775223 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 14:33:46 -0500 Subject: [PATCH 092/347] Proper handling of submissions --- common/lib/xmodule/xmodule/peer_grading_module.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index 0fcdaef68a..2db4014625 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -38,8 +38,10 @@ from peer_grading_service import peer_grading_service, GradingServiceError log = logging.getLogger(__name__) USE_FOR_SINGLE_LOCATION = False +LINK_TO_LOCATION = "" TRUE_DICT = [True, "True", "true", "TRUE"] + class PeerGradingModule(XModule): _VERSION = 1 @@ -60,19 +62,24 @@ class PeerGradingModule(XModule): # Load instance state if instance_state is not None: instance_state = json.loads(instance_state) + use_for_single_location = instance_state.get('use_for_single_location', USE_FOR_SINGLE_LOCATION) else: instance_state = {} #We need to set the location here so the child modules can use it system.set('location', location) - log.debug("Location: {0}".format(location)) self.system = system self.peer_gs = peer_grading_service(self.system) - self.use_for_single_location = self.metadata.get('use_for_single_location', USE_FOR_SINGLE_LOCATION) + self.use_for_single_location = self.metadata.get('use_for_single_location', use_for_single_location) if isinstance(self.use_for_single_location, basestring): self.use_for_single_location = (self.use_for_single_location in TRUE_DICT) + self.link_to_location = self.metadata.get('link_to_location', USE_FOR_SINGLE_LOCATION) + if self.use_for_single_location ==True: + #This will raise an exception if the location is invalid + link_to_location_object = Location(self.link_to_location) + self.ajax_url = self.system.ajax_url if not self.ajax_url.endswith("/"): self.ajax_url = self.ajax_url + "/" @@ -99,15 +106,13 @@ class PeerGradingModule(XModule): if not self.use_for_single_location: return self.peer_grading() else: - return self.peer_grading_problem({'location' : self.system.location}) + return self.peer_grading_problem({'location' : self.link_to_location}) def handle_ajax(self, dispatch, get): """ Needs to be implemented by child modules. Handles AJAX events. @return: """ - - log.debug(get) handlers = { 'get_next_submission': self.get_next_submission, 'show_calibration_essay': self.show_calibration_essay, From 3009acbb108bdaa1ffd5d7cb765015062eba1815 Mon Sep 17 00:00:00 2001 From: Kevin Chugh Date: Mon, 4 Feb 2013 14:50:53 -0500 Subject: [PATCH 093/347] showing group names --- .../django_comment_client/forum/views.py | 15 ++++++--------- lms/djangoapps/django_comment_client/utils.py | 2 +- lms/lib/comment_client/thread.py | 4 ++-- .../discussion/_underscore_templates.html | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 2f2809d89a..48022168b1 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -11,7 +11,7 @@ from django.contrib.auth.models import User from mitxmako.shortcuts import render_to_response, render_to_string from courseware.courses import get_course_with_access -from course_groups.cohorts import get_cohort_id, get_course_cohorts, get_cohorted_commentables, is_course_cohorted +from course_groups.cohorts import get_cohort_id, get_course_cohorts, get_cohorted_commentables, is_course_cohorted, get_cohort_by_id from courseware.access import has_access from urllib import urlencode @@ -133,6 +133,8 @@ def forum_form_discussion(request, course_id): for thread in threads: courseware_context = get_courseware_context(thread, course) + if thread.get('group_id') and not thread.get('group_name'): + thread['group_name'] = get_cohort_by_id(course_id, thread.get('group_id')).name if courseware_context: thread.update(courseware_context) if request.is_ajax(): @@ -152,10 +154,8 @@ def forum_form_discussion(request, course_id): #trending_tags = cc.search_trending_tags( # course_id, #) + cohorts = get_course_cohorts(course_id) - cohort_dictionary = dict() - for c in cohorts: - cohort_dictionary[c.id] = c.name context = { 'csrf': csrf(request)['csrf_token'], @@ -172,7 +172,6 @@ def forum_form_discussion(request, course_id): 'roles': saxutils.escape(json.dumps(utils.get_role_ids(course_id)), escapedict), 'is_moderator': cached_has_permission(request.user, "see_all_cohorts", course_id), 'cohorts': cohorts, - 'cohort_map': cohort_dictionary, 'user_cohort': get_cohort_id(user, course_id), 'cohorted_commentables': get_cohorted_commentables(course_id), 'is_course_cohorted': is_course_cohorted(course_id) @@ -189,9 +188,6 @@ def single_thread(request, course_id, discussion_id, thread_id): try: thread = cc.Thread.find(thread_id).retrieve(recursive=True, user_id=request.user.id) - print("\n\n\n\n\n\n***************************") - print("thread.get('group_id','NONE')") - print(thread) except (cc.utils.CommentClientError, cc.utils.CommentClientUnknownError) as err: log.error("Error loading single thread.") raise Http404 @@ -229,6 +225,8 @@ def single_thread(request, course_id, discussion_id, thread_id): courseware_context = get_courseware_context(thread, course) if courseware_context: thread.update(courseware_context) + if thread.get('group_id') and not thread.get('group_name'): + thread['group_name'] = get_cohort_by_id(course_id, thread.get('group_id')).name threads = [utils.safe_content(thread) for thread in threads] @@ -242,7 +240,6 @@ def single_thread(request, course_id, discussion_id, thread_id): # course_id, #) - annotated_content_info = utils.get_metadata_for_threads(course_id, threads, request.user, user_info) context = { diff --git a/lms/djangoapps/django_comment_client/utils.py b/lms/djangoapps/django_comment_client/utils.py index 07d8ef9660..aed6938f38 100644 --- a/lms/djangoapps/django_comment_client/utils.py +++ b/lms/djangoapps/django_comment_client/utils.py @@ -374,7 +374,7 @@ def safe_content(content): 'updated_at', 'depth', 'type', 'commentable_id', 'comments_count', 'at_position_list', 'children', 'highlighted_title', 'highlighted_body', 'courseware_title', 'courseware_url', 'tags', 'unread_comments_count', - 'read', 'group_id' + 'read', 'group_id', 'group_name' ] if (content.get('anonymous') is False) and (content.get('anonymous_to_peers') is False): diff --git a/lms/lib/comment_client/thread.py b/lms/lib/comment_client/thread.py index 6fd31b0823..1d657e3b7c 100644 --- a/lms/lib/comment_client/thread.py +++ b/lms/lib/comment_client/thread.py @@ -10,12 +10,12 @@ class Thread(models.Model): 'closed', 'tags', 'votes', 'commentable_id', 'username', 'user_id', 'created_at', 'updated_at', 'comments_count', 'unread_comments_count', 'at_position_list', 'children', 'type', 'highlighted_title', - 'highlighted_body', 'endorsed', 'read', 'group_id' + 'highlighted_body', 'endorsed', 'read', 'group_id', 'group_name' ] updatable_fields = [ 'title', 'body', 'anonymous', 'anonymous_to_peers', 'course_id', - 'closed', 'tags', 'user_id', 'commentable_id', 'group_id' + 'closed', 'tags', 'user_id', 'commentable_id', 'group_id', 'group_name' ] initializable_fields = updatable_fields diff --git a/lms/templates/discussion/_underscore_templates.html b/lms/templates/discussion/_underscore_templates.html index 4acb6138b9..08c1890f7f 100644 --- a/lms/templates/discussion/_underscore_templates.html +++ b/lms/templates/discussion/_underscore_templates.html @@ -28,7 +28,7 @@
    ${"<% if (obj.group_id) { %>"} -
    This post visible only to Group ${"<%- obj.group_id%>"}.
    +
    This post visible only to Group ${"<%- obj.group_name%>"}.
    ${"<% } %>"} + ${'<%- votes["up_count"] %>'} From 4c5e59e84a1e03a5c4a4f22cab9b31472b19b368 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 14:52:41 -0500 Subject: [PATCH 094/347] Start to fix up instance states --- .../xmodule/xmodule/peer_grading_module.py | 33 ++++++++++++++++++- .../xmodule/xmodule/peer_grading_service.py | 6 ++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index 2db4014625..99409b2d8a 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -40,6 +40,7 @@ log = logging.getLogger(__name__) USE_FOR_SINGLE_LOCATION = False LINK_TO_LOCATION = "" TRUE_DICT = [True, "True", "true", "TRUE"] +MAX_SCORE = 1 class PeerGradingModule(XModule): @@ -62,7 +63,6 @@ class PeerGradingModule(XModule): # Load instance state if instance_state is not None: instance_state = json.loads(instance_state) - use_for_single_location = instance_state.get('use_for_single_location', USE_FOR_SINGLE_LOCATION) else: instance_state = {} @@ -84,6 +84,12 @@ class PeerGradingModule(XModule): if not self.ajax_url.endswith("/"): self.ajax_url = self.ajax_url + "/" + self.student_data_for_location = instance_state.get('student_data_for_location', {}) + self.max_score = instance_state.get('max_score', MAX_SCORE) + if not isinstance(self.max_score, (int, long)): + #This could result in an exception, but not wrapping in a try catch block so it moves up the stack + self.max_score = int(self.max_score) + def _err_response(self, msg): """ Return a HttpResponse with a json dump with success=False, and the given error message. @@ -135,6 +141,18 @@ class PeerGradingModule(XModule): def get_score(self): pass + def max_score(self): + ''' Maximum score. Two notes: + + * This is generic; in abstract, a problem could be 3/5 points on one + randomization, and 5/7 on another + ''' + max_score = None + if self.check_if_done_and_scored(): + last_response = self.get_last_response(self.current_task_number) + max_score = last_response['max_score'] + return max_score + def get_next_submission(self, get): """ Makes a call to the grading controller for the next essay that should be graded @@ -399,6 +417,19 @@ class PeerGradingModule(XModule): return {'html' : html, 'success' : True} + def get_instance_state(self): + """ + Returns the current instance state. The module can be recreated from the instance state. + Input: None + Output: A dictionary containing the instance state. + """ + + state = { + 'student_data_for_location' : self.student_data_for_location, + } + + return json.dumps(state) + class PeerGradingDescriptor(XmlDescriptor, EditingDescriptor): """ Module for adding combined open ended questions diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index 06fa7351cd..40b0b447d6 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -32,8 +32,14 @@ class PeerGradingService(): self.save_calibration_essay_url = self.url + '/save_calibration_essay/' self.get_problem_list_url = self.url + '/get_problem_list/' self.get_notifications_url = self.url + '/get_notifications/' + self.get_data_for_location_url = self.url + '/get_data_for_location/' self.system = system + def get_data_for_location(self, problem_location, student_id): + response = self.get(self.get_data_for_location_url, + {'location': problem_location, 'student_id': student_id}) + return self._render_rubric(response) + def get_next_submission(self, problem_location, grader_id): response = self.get(self.get_next_submission_url, {'location': problem_location, 'grader_id': grader_id}) From af6123a1acf855d2de8a24393606c42a0f57fa96 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 15:00:07 -0500 Subject: [PATCH 095/347] Add in methods to query data from the controller for student grading --- .../xmodule/xmodule/peer_grading_module.py | 37 +++++++++++++++++-- .../xmodule/xmodule/peer_grading_service.py | 2 +- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index 99409b2d8a..3e849780bb 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -135,12 +135,42 @@ class PeerGradingModule(XModule): return json.dumps(d, cls=ComplexEncoder) + def query_data_for_location(self): + student_id = self.system.anonymous_student_id + location = self.system.location + success = False + response = {} + + try: + response = self.peer_gs.get_data_for_location(location, grader_id) + count_graded = response['count_graded'] + count_required = response['count_required'] + success = True + except GradingServiceError: + log.exception("Error getting location data from controller for location {0}, student {1}" + .format(location, student_id)) + + return success, response + def get_progress(self): pass def get_score(self): - pass + if not self.use_for_single_location: + return None + try: + count_graded = self.student_data_for_location['count_graded'] + count_required = self.student_data_for_location['count_required'] + except: + success, response = self.query_data_for_location() + if not success: + log.exception("No instance data found and could not get data from controller for loc {0} student {1}".format( + self.system.location, self.system.anonymous_student_id + )) + return None + + def max_score(self): ''' Maximum score. Two notes: @@ -148,9 +178,8 @@ class PeerGradingModule(XModule): randomization, and 5/7 on another ''' max_score = None - if self.check_if_done_and_scored(): - last_response = self.get_last_response(self.current_task_number) - max_score = last_response['max_score'] + if self.use_for_single_location: + max_score = self.max_score return max_score def get_next_submission(self, get): diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index 40b0b447d6..064d0a72a0 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -38,7 +38,7 @@ class PeerGradingService(): def get_data_for_location(self, problem_location, student_id): response = self.get(self.get_data_for_location_url, {'location': problem_location, 'student_id': student_id}) - return self._render_rubric(response) + return response def get_next_submission(self, problem_location, grader_id): response = self.get(self.get_next_submission_url, From f8b7d5fad6205fe4eead190538b82df8585ceb98 Mon Sep 17 00:00:00 2001 From: Brian Wilson Date: Mon, 4 Feb 2013 15:13:14 -0500 Subject: [PATCH 096/347] have timer redirect when it expires --- lms/djangoapps/courseware/views.py | 16 ++++-- lms/templates/courseware/testcenter_exam.html | 53 ++++++++++--------- 2 files changed, 41 insertions(+), 28 deletions(-) diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index b44887dbfd..2484aa5c6b 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -8,7 +8,7 @@ from django.core.context_processors import csrf from django.core.urlresolvers import reverse from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required -from django.http import Http404 +from django.http import Http404, HttpResponseRedirect from django.shortcuts import redirect from mitxmako.shortcuts import render_to_response, render_to_string #from django.views.decorators.csrf import ensure_csrf_cookie @@ -397,6 +397,12 @@ def timed_exam(request, course_id, chapter, section): context['content'] = section_module.get_html() + # determine where to go when the exam ends: + if 'time_expired_redirect_url' not in section_descriptor.metadata: + raise Http404 + time_expired_redirect_url = section_descriptor.metadata.get('time_expired_redirect_url') + context['time_expired_redirect_url'] = time_expired_redirect_url + # figure out when the timed exam should end. Going forward, this is determined by getting a "normal" # duration from the test, then doing some math to modify the duration based on accommodations, # and then use that value as the end. Once we have calculated this, it should be sticky -- we @@ -407,7 +413,7 @@ def timed_exam(request, course_id, chapter, section): if 'duration' not in section_descriptor.metadata: raise Http404 duration = int(section_descriptor.metadata.get('duration')) - + # get corresponding time module, if one is present: # TODO: determine what to use for module_key... try: @@ -424,7 +430,11 @@ def timed_exam(request, course_id, chapter, section): # Proposal: store URL in the section descriptor, # along with the duration. If no such URL is set, # just put up the error page, - raise Exception("Time expired on {}".format(timed_module)) + if time_expired_redirect_url is None: + raise Exception("Time expired on {}".format(timed_module)) + else: + return HttpResponseRedirect(time_expired_redirect_url) + elif not timed_module.has_begun: # user has not started the exam, but may have an accommodation # that has been granted to them. diff --git a/lms/templates/courseware/testcenter_exam.html b/lms/templates/courseware/testcenter_exam.html index d2f74ab296..8082200146 100644 --- a/lms/templates/courseware/testcenter_exam.html +++ b/lms/templates/courseware/testcenter_exam.html @@ -61,26 +61,21 @@ From 1923ae0d6b08aa094ba1e464a4ead26b1b782293 Mon Sep 17 00:00:00 2001 From: Brian Talbot Date: Mon, 4 Feb 2013 15:40:01 -0500 Subject: [PATCH 097/347] pearson - added in timer styling for IE7 --- lms/static/sass/course/layout/_timer.scss | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lms/static/sass/course/layout/_timer.scss b/lms/static/sass/course/layout/_timer.scss index 01d62d87c7..eef21b8c27 100644 --- a/lms/static/sass/course/layout/_timer.scss +++ b/lms/static/sass/course/layout/_timer.scss @@ -2,10 +2,26 @@ div.timer-main { position: fixed; z-index: 99; width: 100%; + border-top: 2px solid #000; div#timer_wrapper { position: relative; + top: -3px; float: right; margin-right: 10px; + background: #000; + color: #fff; + padding: 10px 20px; + border-radius: 3px; + } + + .timer_label { + color: #ccc; + font-size: 13px; + } + + #exam_timer { + font-weight: bold; + font-size: 15px; } } From c9f75f8b3cf75aa44316f5bbdb4589ceef03e3e5 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 16:14:34 -0500 Subject: [PATCH 098/347] Add in score return --- common/lib/xmodule/xmodule/peer_grading_module.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index 3e849780bb..14a087ffb4 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -169,8 +169,18 @@ class PeerGradingModule(XModule): self.system.location, self.system.anonymous_student_id )) return None + count_graded = response['count_graded'] + count_required = response['count_required'] + if count_required>0 and count_graded>=count_required: + self.student_data_for_location = response + + score_dict = { + 'score': int(count_graded>=count_required), + 'total': self.max_score, + } + + return score_dict - def max_score(self): ''' Maximum score. Two notes: From f7ba14ae5e81048259bba5e738a6bb8fdaebbd86 Mon Sep 17 00:00:00 2001 From: Kevin Chugh Date: Mon, 4 Feb 2013 16:31:28 -0500 Subject: [PATCH 099/347] move group logic to get_threads --- lms/djangoapps/django_comment_client/base/views.py | 2 +- lms/djangoapps/django_comment_client/forum/views.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/django_comment_client/base/views.py b/lms/djangoapps/django_comment_client/base/views.py index 604fe60282..17b9696a72 100644 --- a/lms/djangoapps/django_comment_client/base/views.py +++ b/lms/djangoapps/django_comment_client/base/views.py @@ -107,7 +107,7 @@ def create_thread(request, course_id, commentable_id): # else: # regular users always post with their own id. # group_id = user_group_id - if post['group_id']: + if 'group_id' in post.keys(): thread.update_attributes(group_id=post['group_id']) thread.save() diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 48022168b1..a9f073ccea 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -72,6 +72,12 @@ def get_threads(request, course_id, discussion_id=None, per_page=THREADS_PER_PAG 'tags', 'commentable_ids']))) threads, page, num_pages = cc.Thread.search(query_params) + + #now add the group name if the thread has a group id + for thread in threads: + if thread.get('group_id') and not thread.get('group_name'): + thread['group_name'] = get_cohort_by_id(course_id, thread.get('group_id')).name + query_params['page'] = page query_params['num_pages'] = num_pages From cbd0895aad057996b502f873e9d0b4414c26f129 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 16:42:14 -0500 Subject: [PATCH 100/347] Add in single peer grading problem view --- .../js/src/peergrading/peer_grading.coffee | 10 +++- .../xmodule/xmodule/peer_grading_module.py | 48 +++++++++++-------- lms/templates/peer_grading/peer_grading.html | 2 +- .../peer_grading/peer_grading_problem.html | 2 +- 4 files changed, 40 insertions(+), 22 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee index b8196838f3..45c678bad9 100644 --- a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee +++ b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading.coffee @@ -5,6 +5,7 @@ class @PeerGrading constructor: (element) -> @peer_grading_container = $('.peer-grading') + @use_single_location = @peer_grading_container.data('use-single-location') @peer_grading_outer_container = $('.peer-grading-container') @ajax_url = @peer_grading_container.data('ajax-url') @error_container = $('.error-container') @@ -19,6 +20,9 @@ class @PeerGrading @problem_list = $('.problem-list') @construct_progress_bar() + if @use_single_location + @activate_problem() + construct_progress_bar: () => problems = @problem_list.find('tr').next() problems.each( (index, element) => @@ -38,4 +42,8 @@ class @PeerGrading backend = new PeerGradingProblemBackend(@ajax_url, false) new PeerGradingProblem(backend) else - @gentle_alert response.error \ No newline at end of file + @gentle_alert response.error + + activate_problem: () => + backend = new PeerGradingProblemBackend(@ajax_url, false) + new PeerGradingProblem(backend) \ No newline at end of file diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index 14a087ffb4..d39942f6ce 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -41,7 +41,7 @@ USE_FOR_SINGLE_LOCATION = False LINK_TO_LOCATION = "" TRUE_DICT = [True, "True", "true", "TRUE"] MAX_SCORE = 1 - +IS_GRADED = True class PeerGradingModule(XModule): _VERSION = 1 @@ -71,10 +71,14 @@ class PeerGradingModule(XModule): self.system = system self.peer_gs = peer_grading_service(self.system) - self.use_for_single_location = self.metadata.get('use_for_single_location', use_for_single_location) + self.use_for_single_location = self.metadata.get('use_for_single_location', USE_FOR_SINGLE_LOCATION) if isinstance(self.use_for_single_location, basestring): self.use_for_single_location = (self.use_for_single_location in TRUE_DICT) + self.is_graded = self.metadata.get('is_graded', IS_GRADED) + if isinstance(self.is_graded, basestring): + self.is_graded = (self.is_graded in TRUE_DICT) + self.link_to_location = self.metadata.get('link_to_location', USE_FOR_SINGLE_LOCATION) if self.use_for_single_location ==True: #This will raise an exception if the location is invalid @@ -85,10 +89,10 @@ class PeerGradingModule(XModule): self.ajax_url = self.ajax_url + "/" self.student_data_for_location = instance_state.get('student_data_for_location', {}) - self.max_score = instance_state.get('max_score', MAX_SCORE) - if not isinstance(self.max_score, (int, long)): + self.max_grade = instance_state.get('max_grade', MAX_SCORE) + if not isinstance(self.max_grade, (int, long)): #This could result in an exception, but not wrapping in a try catch block so it moves up the stack - self.max_score = int(self.max_score) + self.max_grade = int(self.max_grade) def _err_response(self, msg): """ @@ -112,7 +116,7 @@ class PeerGradingModule(XModule): if not self.use_for_single_location: return self.peer_grading() else: - return self.peer_grading_problem({'location' : self.link_to_location}) + return self.peer_grading_problem({'location' : self.link_to_location})['html'] def handle_ajax(self, dispatch, get): """ @@ -142,7 +146,7 @@ class PeerGradingModule(XModule): response = {} try: - response = self.peer_gs.get_data_for_location(location, grader_id) + response = self.peer_gs.get_data_for_location(location, student_id) count_graded = response['count_graded'] count_required = response['count_required'] success = True @@ -156,7 +160,7 @@ class PeerGradingModule(XModule): pass def get_score(self): - if not self.use_for_single_location: + if not self.use_for_single_location or not self.is_graded: return None try: @@ -176,7 +180,7 @@ class PeerGradingModule(XModule): score_dict = { 'score': int(count_graded>=count_required), - 'total': self.max_score, + 'total': self.max_grade, } return score_dict @@ -187,10 +191,10 @@ class PeerGradingModule(XModule): * This is generic; in abstract, a problem could be 3/5 points on one randomization, and 5/7 on another ''' - max_score = None - if self.use_for_single_location: - max_score = self.max_score - return max_score + max_grade = None + if self.use_for_single_location and self.is_graded: + max_grade = self.max_grade + return max_grade def get_next_submission(self, get): """ @@ -430,7 +434,9 @@ class PeerGradingModule(XModule): 'problem_list': problem_list, 'error_text': error_text, # Checked above - 'staff_access': False, }) + 'staff_access': False, + 'use_single_location' : self.use_for_single_location, + }) return html @@ -438,12 +444,14 @@ class PeerGradingModule(XModule): ''' Show individual problem interface ''' - if get == None: - problem_location = self.system.location + if get == None or get.get('location')==None: + if not self.use_for_single_location: + #This is an error case, because it must be set to use a single location to be called without get parameters + return {'html' : "", 'success' : False} + problem_location = self.link_to_location + elif get.get('location') is not None: problem_location = get.get('location') - else: - problem_location = self.system.location ajax_url = self.ajax_url html = self.system.render_template('peer_grading/peer_grading_problem.html', { @@ -452,7 +460,9 @@ class PeerGradingModule(XModule): 'course_id': self.system.course_id, 'ajax_url': ajax_url, # Checked above - 'staff_access': False, }) + 'staff_access': False, + 'use_single_location' : self.use_for_single_location, + }) return {'html' : html, 'success' : True} diff --git a/lms/templates/peer_grading/peer_grading.html b/lms/templates/peer_grading/peer_grading.html index 1dd74d74e4..d309b4486c 100644 --- a/lms/templates/peer_grading/peer_grading.html +++ b/lms/templates/peer_grading/peer_grading.html @@ -1,5 +1,5 @@
    -
    +
    ${error_text}

    Peer Grading

    Instructions

    diff --git a/lms/templates/peer_grading/peer_grading_problem.html b/lms/templates/peer_grading/peer_grading_problem.html index af7c1400cb..007fd42c8d 100644 --- a/lms/templates/peer_grading/peer_grading_problem.html +++ b/lms/templates/peer_grading/peer_grading_problem.html @@ -1,5 +1,5 @@
    -
    +
    From 83b7533a129d2eafd87f609b17e9cd67621c478c Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 16:49:32 -0500 Subject: [PATCH 101/347] Fix CSS to fit all elements on the page --- lms/static/sass/course/_staff_grading.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/static/sass/course/_staff_grading.scss b/lms/static/sass/course/_staff_grading.scss index 177bd9e5e2..e3de7c8eab 100644 --- a/lms/static/sass/course/_staff_grading.scss +++ b/lms/static/sass/course/_staff_grading.scss @@ -120,7 +120,7 @@ div.peer-grading{ margin-right:20px; > div { - padding: 10px; + padding: 2px; margin: 0px; background: #eee; height: 10em; From c4c674367f062874384ef39cc5df564dc57da347 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 16:54:36 -0500 Subject: [PATCH 102/347] Remove unneccesary imports --- lms/djangoapps/open_ended_grading/views.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 5163702343..69be36bf9c 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -23,14 +23,6 @@ import open_ended_notifications from xmodule.modulestore.django import modulestore from xmodule.modulestore import search -from xmodule import peer_grading_module -from xmodule import peer_grading_service -from mitxmako.shortcuts import render_to_string -from xmodule.x_module import ModuleSystem -from courseware import module_render -from xmodule.modulestore import Location -from xmodule.modulestore.django import modulestore -from courseware.models import StudentModule, StudentModuleCache from django.http import HttpResponse, Http404, HttpResponseRedirect From 5d8aade8e761bcb974274a4cbfabb6c1bf0af06e Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 16:57:09 -0500 Subject: [PATCH 103/347] Explain django settings imports --- common/lib/xmodule/xmodule/open_ended_image_submission.py | 4 ++++ common/lib/xmodule/xmodule/peer_grading_service.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/open_ended_image_submission.py b/common/lib/xmodule/xmodule/open_ended_image_submission.py index cda6cb062a..bc82cdfea0 100644 --- a/common/lib/xmodule/xmodule/open_ended_image_submission.py +++ b/common/lib/xmodule/xmodule/open_ended_image_submission.py @@ -13,6 +13,10 @@ from urlparse import urlparse import requests from boto.s3.connection import S3Connection from boto.s3.key import Key +#TODO: Settings import is needed now in order to specify the URL and keys for amazon s3 (to upload images). +#Eventually, the goal is to replace the global django settings import with settings specifically +#for this module. There is no easy way to do this now, so piggybacking on the django settings +#makes sense. from django.conf import settings import pickle import logging diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index 064d0a72a0..2f01abdd44 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -4,8 +4,11 @@ import requests from requests.exceptions import RequestException, ConnectionError, HTTPError import sys +#TODO: Settings import is needed now in order to specify the URL where to find the peer grading service. +#Eventually, the goal is to replace the global django settings import with settings specifically +#for this xmodule. There is no easy way to do this now, so piggybacking on the django settings +#makes sense. from django.conf import settings -from django.http import HttpResponse, Http404 from combined_open_ended_rubric import CombinedOpenEndedRubric, RubricParsingError from lxml import etree From 7f96fbb3d1becf40b295c9c3465d4ef48b5af60e Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 17:15:07 -0500 Subject: [PATCH 104/347] Address review comments --- lms/djangoapps/open_ended_grading/views.py | 7 ++++++- lms/static/coffee/src/open_ended/open_ended.coffee | 8 ++++---- .../open_ended_problems/open_ended_flagged_problems.html | 8 +------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 1777f26e2e..156bdadddd 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -244,6 +244,9 @@ def flagged_problem_list(request, course_id): @cache_control(no_cache=True, no_store=True, must_revalidate=True) def combined_notifications(request, course_id): + """ + Gets combined notifications from the grading controller and displays them + """ course = get_course_with_access(request.user, course_id, 'load') user = request.user notifications = open_ended_notifications.combined_notifications(course, user) @@ -292,9 +295,11 @@ def combined_notifications(request, course_id): combined_dict ) +@cache_control(no_cache=True, no_store=True, must_revalidate=True) def take_action_on_flags(request, course_id): """ - + Takes action on student flagged submissions. + Currently, only support unflag and ban actions. """ if request.method != 'POST': raise Http404 diff --git a/lms/static/coffee/src/open_ended/open_ended.coffee b/lms/static/coffee/src/open_ended/open_ended.coffee index aff1e5fc67..61e0c73dba 100644 --- a/lms/static/coffee/src/open_ended/open_ended.coffee +++ b/lms/static/coffee/src/open_ended/open_ended.coffee @@ -23,8 +23,8 @@ class OpenEnded parent_tr = $(event.target).parent().parent() tr_children = parent_tr.children() action_type = "unflag" - submission_id = tr_children[5].innerText - student_id = tr_children[6].innerText + submission_id = parent_tr.data('submission-id') + student_id = parent_tr.data('student-id') callback_func = @after_action_wrapper($(event.target), action_type) @post('take_action_on_flags', {'submission_id' : submission_id, 'student_id' : student_id, 'action_type' : action_type}, callback_func) @@ -33,8 +33,8 @@ class OpenEnded parent_tr = $(event.target).parent().parent() tr_children = parent_tr.children() action_type = "ban" - submission_id = tr_children[5].innerText - student_id = tr_children[6].innerText + submission_id = parent_tr.data('submission-id') + student_id = parent_tr.data('student-id') callback_func = @after_action_wrapper($(event.target), action_type) @post('take_action_on_flags', {'submission_id' : submission_id, 'student_id' : student_id, 'action_type' : action_type}, callback_func) diff --git a/lms/templates/open_ended_problems/open_ended_flagged_problems.html b/lms/templates/open_ended_problems/open_ended_flagged_problems.html index ec892da43c..b4c6f43685 100644 --- a/lms/templates/open_ended_problems/open_ended_flagged_problems.html +++ b/lms/templates/open_ended_problems/open_ended_flagged_problems.html @@ -34,7 +34,7 @@
    ${problem['problem_name']}
    - ${problem['submission_id']} - - ${problem['student_id']} -
    From f019225d16b0267db0496e88a59f9bf1bcf115fd Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 17:23:34 -0500 Subject: [PATCH 105/347] Fix reloading --- .../lib/xmodule/xmodule/js/src/combinedopenended/display.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee index 9b8eecfead..cd85d93381 100644 --- a/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/combinedopenended/display.coffee @@ -329,7 +329,7 @@ class @CombinedOpenEnded $.postWithPrefix "#{@ajax_url}/check_for_score", (response) => if response.state == "done" or response.state=="post_assessment" delete window.queuePollerID - @reload + location.reload() else window.queuePollerID = window.setTimeout(@poll, 10000) From d89ab000d24b4bef9c9a39d9e1188d178b539130 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 17:30:45 -0500 Subject: [PATCH 106/347] Fix a function call --- lms/envs/dev.py | 4 ++-- lms/static/coffee/src/open_ended/open_ended.coffee | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lms/envs/dev.py b/lms/envs/dev.py index 99ee9662ee..75fda36baf 100644 --- a/lms/envs/dev.py +++ b/lms/envs/dev.py @@ -62,10 +62,10 @@ CACHES = { XQUEUE_INTERFACE = { - "url": "https://sandbox-xqueue.edx.org", + "url": "http://127.0.0.1:3032", "django_auth": { "username": "lms", - "password": "***REMOVED***" + "password": "abcd" }, "basic_auth": ('anant', 'agarwal'), } diff --git a/lms/static/coffee/src/open_ended/open_ended.coffee b/lms/static/coffee/src/open_ended/open_ended.coffee index 61e0c73dba..47e78bcb06 100644 --- a/lms/static/coffee/src/open_ended/open_ended.coffee +++ b/lms/static/coffee/src/open_ended/open_ended.coffee @@ -51,7 +51,8 @@ class OpenEnded return @handle_after_action handle_after_action: (data) -> - blah = "blah" + if !response.success + @gentle_alert data.error gentle_alert: (msg) => if $('.message-container').length From 9f634aba3cf18cd38d7298505e1bf5ff6e107346 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 4 Feb 2013 17:33:26 -0500 Subject: [PATCH 107/347] Remove compressed flag from SASS call in pipeline so we can diff the generated CSS --- lms/envs/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/envs/common.py b/lms/envs/common.py index 16472795e0..0b76c6b241 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -530,7 +530,7 @@ PIPELINE_COMPILERS = [ 'pipeline.compilers.coffee.CoffeeScriptCompiler', ] -PIPELINE_SASS_ARGUMENTS = '-t compressed -r {proj_dir}/static/sass/bourbon/lib/bourbon.rb'.format(proj_dir=PROJECT_ROOT) +PIPELINE_SASS_ARGUMENTS = '-r {proj_dir}/static/sass/bourbon/lib/bourbon.rb'.format(proj_dir=PROJECT_ROOT) PIPELINE_CSS_COMPRESSOR = None PIPELINE_JS_COMPRESSOR = None From e8803985f2cee821d0057cdec4f8bdcea7782de6 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 17:41:44 -0500 Subject: [PATCH 108/347] Fix JS on after event handling --- lms/static/coffee/src/open_ended/open_ended.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/static/coffee/src/open_ended/open_ended.coffee b/lms/static/coffee/src/open_ended/open_ended.coffee index 47e78bcb06..cc8bad5473 100644 --- a/lms/static/coffee/src/open_ended/open_ended.coffee +++ b/lms/static/coffee/src/open_ended/open_ended.coffee @@ -51,7 +51,7 @@ class OpenEnded return @handle_after_action handle_after_action: (data) -> - if !response.success + if !data.success @gentle_alert data.error gentle_alert: (msg) => From 1dab4aba96b8f0a73f3fb2261616d1df977c4e8e Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 17:44:09 -0500 Subject: [PATCH 109/347] Fix accidental commit of dev.py --- lms/envs/dev.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/envs/dev.py b/lms/envs/dev.py index 75fda36baf..99ee9662ee 100644 --- a/lms/envs/dev.py +++ b/lms/envs/dev.py @@ -62,10 +62,10 @@ CACHES = { XQUEUE_INTERFACE = { - "url": "http://127.0.0.1:3032", + "url": "https://sandbox-xqueue.edx.org", "django_auth": { "username": "lms", - "password": "abcd" + "password": "***REMOVED***" }, "basic_auth": ('anant', 'agarwal'), } From aeaad6f58d8ed211ad24e4a3784ce4917bab6383 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 4 Feb 2013 18:03:05 -0500 Subject: [PATCH 110/347] Force it to do expanded mode, because it's still generating compressed CSS output --- lms/envs/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/envs/common.py b/lms/envs/common.py index 0b76c6b241..db22ecdfa3 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -530,7 +530,7 @@ PIPELINE_COMPILERS = [ 'pipeline.compilers.coffee.CoffeeScriptCompiler', ] -PIPELINE_SASS_ARGUMENTS = '-r {proj_dir}/static/sass/bourbon/lib/bourbon.rb'.format(proj_dir=PROJECT_ROOT) +PIPELINE_SASS_ARGUMENTS = '-t expanded -r {proj_dir}/static/sass/bourbon/lib/bourbon.rb'.format(proj_dir=PROJECT_ROOT) PIPELINE_CSS_COMPRESSOR = None PIPELINE_JS_COMPRESSOR = None From 009a8c5f6329693ae3d47adff99328ffabd675c8 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 18:17:23 -0500 Subject: [PATCH 111/347] Fix issue with passing rubric scores back to controller --- .../lib/xmodule/xmodule/peer_grading_module.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index d39942f6ce..0bdd4568f7 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -249,17 +249,17 @@ class PeerGradingModule(XModule): required = set(['location', 'submission_id', 'submission_key', 'score', 'feedback', 'rubric_scores[]', 'submission_flagged']) success, message = self._check_required(get, required) if not success: - return _err_response(message) + return self._err_response(message) grader_id = self.system.anonymous_student_id - location = get['location'] - submission_id = get['submission_id'] - score = get['score'] - feedback = get['feedback'] - submission_key = get['submission_key'] - rubric_scores = get['rubric_scores[]'] - submission_flagged = get['submission_flagged'] - log.debug(get) + location = get.get('location') + submission_id = get.get('submission_id') + score = get.get('score') + feedback = get.get('feedback') + submission_key = get.get('submission_key') + rubric_scores = get.getlist('rubric_scores[]') + submission_flagged = get.get('submission_flagged') + log.debug("GET: {0}".format(get)) log.debug(rubric_scores) try: response = self.peer_gs.save_grade(location, grader_id, submission_id, From 725f0c632c8ea3867dae7b16e963ba5acc1be497 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 18:27:25 -0500 Subject: [PATCH 112/347] Remove get statements, fix module_render --- common/lib/xmodule/xmodule/peer_grading_module.py | 3 +-- lms/djangoapps/courseware/module_render.py | 15 +++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index 0bdd4568f7..b7545bdf27 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -259,8 +259,7 @@ class PeerGradingModule(XModule): submission_key = get.get('submission_key') rubric_scores = get.getlist('rubric_scores[]') submission_flagged = get.get('submission_flagged') - log.debug("GET: {0}".format(get)) - log.debug(rubric_scores) + try: response = self.peer_gs.save_grade(location, grader_id, submission_id, score, feedback, submission_key, rubric_scores, submission_flagged) diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index f6c193d9e4..7ed32c8597 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -140,13 +140,12 @@ def get_module(user, request, location, student_module_cache, course_id, module. If there's an error, will try to return an instance of ErrorModule if possible. If not possible, return None. """ - #try: - location = Location(location) - descriptor = modulestore().get_instance(course_id, location, depth=depth) - return get_module_for_descriptor(user, request, descriptor, student_module_cache, course_id, - position=position, not_found_ok=not_found_ok, - wrap_xmodule_display=wrap_xmodule_display) - """ + try: + location = Location(location) + descriptor = modulestore().get_instance(course_id, location, depth=depth) + return get_module_for_descriptor(user, request, descriptor, student_module_cache, course_id, + position=position, not_found_ok=not_found_ok, + wrap_xmodule_display=wrap_xmodule_display) except ItemNotFoundError: if not not_found_ok: log.exception("Error in get_module") @@ -155,7 +154,7 @@ def get_module(user, request, location, student_module_cache, course_id, # Something has gone terribly wrong, but still not letting it turn into a 500. log.exception("Error in get_module") return None - """ + def get_module_for_descriptor(user, request, descriptor, student_module_cache, course_id, position=None, not_found_ok=False, wrap_xmodule_display=True): From b6614f693947920dc192c3c9123fa45dde584f44 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Mon, 4 Feb 2013 18:28:22 -0500 Subject: [PATCH 113/347] add initial test that only tests the descriptor --- .../lib/xmodule/xmodule/randomize_module.py | 1 - .../xmodule/tests/test_randomize_module.py | 55 +++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 common/lib/xmodule/xmodule/tests/test_randomize_module.py diff --git a/common/lib/xmodule/xmodule/randomize_module.py b/common/lib/xmodule/xmodule/randomize_module.py index 0bc26c21bf..f88cdc5efb 100644 --- a/common/lib/xmodule/xmodule/randomize_module.py +++ b/common/lib/xmodule/xmodule/randomize_module.py @@ -61,7 +61,6 @@ class RandomizeModule(XModule): else: self.choice = random.randrange(0, num_choices) - log.debug("********* self.choice = %s", self.choice) if self.choice is not None: self.child_descriptor = self.descriptor.get_children()[self.choice] # Now get_children() should return a list with one element diff --git a/common/lib/xmodule/xmodule/tests/test_randomize_module.py b/common/lib/xmodule/xmodule/tests/test_randomize_module.py new file mode 100644 index 0000000000..6353245f1a --- /dev/null +++ b/common/lib/xmodule/xmodule/tests/test_randomize_module.py @@ -0,0 +1,55 @@ +import unittest +from time import strptime +from fs.memoryfs import MemoryFS + +from mock import Mock, patch + +from xmodule.modulestore.xml import ImportSystem, XMLModuleStore + + +ORG = 'test_org' +COURSE = 'test_course' + +START = '2013-01-01T01:00:00' + + +from test_course_module import DummySystem as DummyImportSystem +from . import test_system + + +class RandomizeModuleTestCase(unittest.TestCase): + """Make sure the randomize module works""" + @staticmethod + def get_dummy_course(start): + """Get a dummy course""" + + system = DummyImportSystem(load_error_modules=True) + + def to_attrb(n, v): + return '' if v is None else '{0}="{1}"'.format(n, v).lower() + + start_xml = ''' + + + + Two houses, ... + Three houses, ... + + + + '''.format(org=ORG, course=COURSE, start=start) + + return system.process_xml(start_xml) + + def test_import(self): + """ + Just make sure descriptor loads without error + """ + descriptor = self.get_dummy_course(START) + + # TODO: add tests that create a module and check. Passing state is a good way to + # check that child access works... + From 18814196f052fd0dc3915af8b32fd0cbd9101f6f Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 18:31:32 -0500 Subject: [PATCH 114/347] Make things slightly robust --- lms/djangoapps/open_ended_grading/views.py | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index dfba7b2599..a40645cca3 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -86,19 +86,23 @@ def peer_grading(request, course_id): course_id_parts = course.id.split("/") course_id_norun = "/".join(course_id_parts[0:2]) pg_location = "i4x://" + course_id_norun + "/peergrading/init" - log.debug("PG LOCATION :{0}".format(pg_location)) base_course_url = reverse('courses') - problem_url_parts = search.path_to_location(modulestore(), course.id, pg_location) - problem_url = base_course_url + "/" - for z in xrange(0,len(problem_url_parts)): - part = problem_url_parts[z] - if part is not None: - if z==1: - problem_url += "courseware/" - problem_url += part + "/" + try: + problem_url_parts = search.path_to_location(modulestore(), course.id, pg_location) + problem_url = base_course_url + "/" + for z in xrange(0,len(problem_url_parts)): + part = problem_url_parts[z] + if part is not None: + if z==1: + problem_url += "courseware/" + problem_url += part + "/" - return HttpResponseRedirect(problem_url) + return HttpResponseRedirect(problem_url) + except: + error_message = "Error with initializing peer grading. Centralized module does not exist. Please contact course staff." + log.error(error_message + "Current course is: {0}".format(course_id)) + return HttpResponse(error_message) @cache_control(no_cache=True, no_store=True, must_revalidate=True) def student_problem_list(request, course_id): From 443c3eda4f4db6756251d658b519b507f729ea6b Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Mon, 4 Feb 2013 18:37:28 -0500 Subject: [PATCH 115/347] Tests for peer grading service may be fixed. --- lms/djangoapps/open_ended_grading/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/tests.py b/lms/djangoapps/open_ended_grading/tests.py index 131fe5ad9f..6fa809628b 100644 --- a/lms/djangoapps/open_ended_grading/tests.py +++ b/lms/djangoapps/open_ended_grading/tests.py @@ -6,7 +6,7 @@ django-admin.py test --settings=lms.envs.test --pythonpath=. lms/djangoapps/open from django.test import TestCase from open_ended_grading import staff_grading_service -from open_ended_grading import peer_grading_service +from xmodule import peer_grading_service from django.core.urlresolvers import reverse from django.contrib.auth.models import Group @@ -137,7 +137,7 @@ class TestPeerGradingService(ct.PageLoader): self.course_id = "edX/toy/2012_Fall" self.toy = modulestore().get_course(self.course_id) - self.mock_service = peer_grading_service.peer_grading_service() + self.mock_service = peer_grading_service.MockPeerGradingService() self.logout() From 8ff3dde6052d7ffbd7b3cf3263b64462526b52c5 Mon Sep 17 00:00:00 2001 From: ichuang Date: Mon, 4 Feb 2013 19:54:36 -0500 Subject: [PATCH 116/347] for require_attempted display "attempted" instead of "completed" --- lms/templates/conditional_module.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lms/templates/conditional_module.html b/lms/templates/conditional_module.html index e9a42b95ce..019ae67567 100644 --- a/lms/templates/conditional_module.html +++ b/lms/templates/conditional_module.html @@ -2,8 +2,14 @@ from django.core.urlresolvers import reverse reqm = module.required_modules[0] course_id = module.system.course_id + condition = module.condition %> -

    ${reqm.display_name} -must be completed before this will become visible.

    +

    ${reqm.display_name} +must be +% if 'attempted' in condition: + attempted +% else: + completed +% endif +before this will become visible.

    From 837f54c055a0e98e2bd0a7e2177c2d6cee0ad6ca Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 4 Feb 2013 20:10:08 -0500 Subject: [PATCH 117/347] inline cohorting almost done --- .../discussion/discussion_module_view.coffee | 5 +++- .../django_comment_client/forum/views.py | 29 ++++++++++++++++--- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/common/static/coffee/src/discussion/discussion_module_view.coffee b/common/static/coffee/src/discussion/discussion_module_view.coffee index 63bd6bc733..f4157124d6 100644 --- a/common/static/coffee/src/discussion/discussion_module_view.coffee +++ b/common/static/coffee/src/discussion/discussion_module_view.coffee @@ -73,7 +73,10 @@ if Backbone? # $elem.html("Hide Discussion") @discussion = new Discussion() @discussion.reset(response.discussion_data, {silent: false}) - $discussion = $(Mustache.render $("script#_inline_discussion").html(), {'threads':response.discussion_data, 'discussionId': discussionId, 'allow_anonymous_to_peers': allow_anonymous_to_peers, 'allow_anonymous': allow_anonymous}) + if response.is_cohorted + $discussion = $(Mustache.render $("script#_inline_discussion_cohorted").html(), {'threads':response.discussion_data, 'discussionId': discussionId, 'allow_anonymous_to_peers': allow_anonymous_to_peers, 'allow_anonymous': allow_anonymous}) + else + $discussion = $(Mustache.render $("script#_inline_discussion").html(), {'threads':response.discussion_data, 'discussionId': discussionId, 'allow_anonymous_to_peers': allow_anonymous_to_peers, 'allow_anonymous': allow_anonymous}) if @$('section.discussion').length @$('section.discussion').replaceWith($discussion) else diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index a9f073ccea..7e87e32389 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -11,7 +11,7 @@ from django.contrib.auth.models import User from mitxmako.shortcuts import render_to_response, render_to_string from courseware.courses import get_course_with_access -from course_groups.cohorts import get_cohort_id, get_course_cohorts, get_cohorted_commentables, is_course_cohorted, get_cohort_by_id +from course_groups.cohorts import * from courseware.access import has_access from urllib import urlencode @@ -93,7 +93,8 @@ def inline_discussion(request, course_id, discussion_id): try: threads, query_params = get_threads(request, course_id, discussion_id, per_page=INLINE_THREADS_PER_PAGE) - user_info = cc.User.from_django_user(request.user).to_dict() + user = cc.User.from_django_user(request.user) + user_info = user.to_dict() except (cc.utils.CommentClientError, cc.utils.CommentClientUnknownError) as err: # TODO (vshnayder): since none of this code seems to be aware of the fact that # sometimes things go wrong, I suspect that the js client is also not @@ -105,7 +106,27 @@ def inline_discussion(request, course_id, discussion_id): allow_anonymous = course.metadata.get("allow_anonymous", True) allow_anonymous_to_peers = course.metadata.get("allow_anonymous_to_peers", False) + + #if we can't get the user's cohort, default to visible to all, treat as if the discussion is not cohoroted + is_cohorted = is_course_cohorted(course_id) and is_commentable_cohorted(course_id, discussion_id) + if is_cohorted: + cohorts_dict = dict() + #if you're a mod, send all cohorts and let you pick + if cached_has_permission(request.user, "see_all_cohorts", course_id): + cohorts = get_course_cohorts(course_id) + for c in cohorts: + cohorts_dict[c.name]=c.id + else: + #otherwise, just make a dictionary of two + user_cohort = get_cohort_id(user, course_id) + cohorts_dict["All Groups"] = None + if user_cohort: + cohorts_dict[user_cohort.name] = user_cohort.id + else: + cohorts_dict = None + + return utils.JsonResponse({ 'discussion_data': map(utils.safe_content, threads), 'user_info': user_info, @@ -115,6 +136,8 @@ def inline_discussion(request, course_id, discussion_id): 'roles': utils.get_role_ids(course_id), 'allow_anonymous_to_peers': allow_anonymous_to_peers, 'allow_anonymous': allow_anonymous, + 'cohorts': cohorts_dict, + 'is_cohorted': is_cohorted }) @login_required @@ -139,8 +162,6 @@ def forum_form_discussion(request, course_id): for thread in threads: courseware_context = get_courseware_context(thread, course) - if thread.get('group_id') and not thread.get('group_name'): - thread['group_name'] = get_cohort_by_id(course_id, thread.get('group_id')).name if courseware_context: thread.update(courseware_context) if request.is_ajax(): From 818cd3aa48c807976e5b5e0953c360e1fd734cd4 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Tue, 5 Feb 2013 08:58:59 -0500 Subject: [PATCH 118/347] Comment out YUI compressor (cause *something* is still causing CSS compression) --- lms/envs/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/envs/common.py b/lms/envs/common.py index db22ecdfa3..aa125b06e2 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -540,7 +540,7 @@ STATICFILES_IGNORE_PATTERNS = ( "coffee/*", ) -PIPELINE_YUI_BINARY = 'yui-compressor' +# PIPELINE_YUI_BINARY = 'yui-compressor' PIPELINE_SASS_BINARY = 'sass' PIPELINE_COFFEE_SCRIPT_BINARY = 'coffee' From 286616e659ae091813cec58ee54b813bf7027440 Mon Sep 17 00:00:00 2001 From: cahrens Date: Tue, 5 Feb 2013 09:50:34 -0500 Subject: [PATCH 119/347] Do not do finds within the event method. Decreases likelihood of hitting bug in older versions of Chrome. https://edx.lighthouseapp.com/projects/102637/tickets/153 --- .../xmodule/xmodule/js/src/html/edit.coffee | 49 ++++++++++++------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/html/edit.coffee b/common/lib/xmodule/xmodule/js/src/html/edit.coffee index 07e6163f25..238182f3d9 100644 --- a/common/lib/xmodule/xmodule/js/src/html/edit.coffee +++ b/common/lib/xmodule/xmodule/js/src/html/edit.coffee @@ -10,7 +10,8 @@ class @HTMLEditingDescriptor lineWrapping: true }) - $(@advanced_editor.getWrapperElement()).addClass(HTMLEditingDescriptor.isInactiveClass) + @$advancedEditorWrapper = $(@advanced_editor.getWrapperElement()) + @$advancedEditorWrapper.addClass(HTMLEditingDescriptor.isInactiveClass) # This is a workaround for the fact that tinyMCE's baseURL property is not getting correctly set on AWS # instances (like sandbox). It is not necessary to explicitly set baseURL when running locally. @@ -43,16 +44,21 @@ class @HTMLEditingDescriptor theme_advanced_blockformats : "p,pre,h1,h2,h3", width: '100%', height: '400px', - setup : HTMLEditingDescriptor.setupTinyMCE, + setup : @setupTinyMCE, # Cannot get access to tinyMCE Editor instance (for focusing) until after it is rendered. # The tinyMCE callback passes in the editor as a paramter. init_instance_callback: @focusVisualEditor }) @showingVisualEditor = true - @element.on('click', '.editor-tabs .tab', this, @onSwitchEditor) + # Doing these find operations within onSwitchEditor leads to sporadic failures on Chrome (version 20 and older). + $element = $(element) + @$htmlTab = $element.find('.html-tab') + @$visualTab = $element.find('.visual-tab') - @setupTinyMCE: (ed) -> + @element.on('click', '.editor-tabs .tab', @onSwitchEditor) + + setupTinyMCE: (ed) => ed.addButton('wrapAsCode', { title : 'Code', image : '/static/images/ico-tinymce-code.png', @@ -67,22 +73,23 @@ class @HTMLEditingDescriptor command.setActive('wrapAsCode', e.nodeName == 'CODE') ) - onSwitchEditor: (e)=> + @visualEditor = ed + + onSwitchEditor: (e) => e.preventDefault(); - if not $(e.currentTarget).hasClass('current') - element = e.data.element + $currentTarget = $(e.currentTarget) + if not $currentTarget.hasClass('current') + $currentTarget.addClass('current') + @$mceToolbar.toggleClass(HTMLEditingDescriptor.isInactiveClass) + @$advancedEditorWrapper.toggleClass(HTMLEditingDescriptor.isInactiveClass) - $(e.currentTarget).addClass('current') - $(element).find('table.mceToolbar').toggleClass(HTMLEditingDescriptor.isInactiveClass) - $(@advanced_editor.getWrapperElement()).toggleClass(HTMLEditingDescriptor.isInactiveClass) - - visualEditor = @getVisualEditor(element) - if $(e.currentTarget).attr('data-tab') is 'visual' - $(element).find('.html-tab').removeClass('current') + visualEditor = @getVisualEditor() + if $currentTarget.data('tab') is 'visual' + @$htmlTab.removeClass('current') @showVisualEditor(visualEditor) else - $(element).find('.visual-tab').removeClass('current') + @$visualTab.removeClass('current') @showAdvancedEditor(visualEditor) # Show the Advanced (codemirror) Editor. Pulled out as a helper method for unit testing. @@ -104,20 +111,24 @@ class @HTMLEditingDescriptor @focusVisualEditor(visualEditor) @showingVisualEditor = true - focusVisualEditor: (visualEditor) -> + focusVisualEditor: (visualEditor) => visualEditor.focus() + if not @$mceToolbar? + @$mceToolbar = $(@element).find('table.mceToolbar') - getVisualEditor: (element) -> + getVisualEditor: () -> ### Returns the instance of TinyMCE. This is different from the textarea that exists in the HTML template (@tiny_mce_textarea. + + Pulled out as a helper method for unit test. ### - return tinyMCE.get($(element).find('.tiny-mce').attr('id')) + return @visualEditor save: -> @element.off('click', '.editor-tabs .tab', @onSwitchEditor) text = @advanced_editor.getValue() - visualEditor = @getVisualEditor(@element) + visualEditor = @getVisualEditor() if @showingVisualEditor and visualEditor.isDirty() text = visualEditor.getContent({no_events: 1}) data: text From e8a690df5e31196f1e649c0999c41d9d6000167d Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 10:46:00 -0500 Subject: [PATCH 120/347] Update peer grading tests --- .../test_files/js/test_problem_display.js | 2 +- .../test_files/js/test_problem_generator.js | 2 +- .../test_files/js/test_problem_grader.js | 2 +- .../capa/capa/tests/test_files/js/xproblem.js | 2 +- lms/djangoapps/open_ended_grading/tests.py | 51 +++++++------------ 5 files changed, 22 insertions(+), 37 deletions(-) diff --git a/common/lib/capa/capa/tests/test_files/js/test_problem_display.js b/common/lib/capa/capa/tests/test_files/js/test_problem_display.js index 35b619c6ec..b61569acea 100644 --- a/common/lib/capa/capa/tests/test_files/js/test_problem_display.js +++ b/common/lib/capa/capa/tests/test_files/js/test_problem_display.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.4.0 (function() { var MinimaxProblemDisplay, root, __hasProp = {}.hasOwnProperty, diff --git a/common/lib/capa/capa/tests/test_files/js/test_problem_generator.js b/common/lib/capa/capa/tests/test_files/js/test_problem_generator.js index b2f01ed252..4b1d133723 100644 --- a/common/lib/capa/capa/tests/test_files/js/test_problem_generator.js +++ b/common/lib/capa/capa/tests/test_files/js/test_problem_generator.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.4.0 (function() { var TestProblemGenerator, root, __hasProp = {}.hasOwnProperty, diff --git a/common/lib/capa/capa/tests/test_files/js/test_problem_grader.js b/common/lib/capa/capa/tests/test_files/js/test_problem_grader.js index 34dfff35cc..80d7ad1690 100644 --- a/common/lib/capa/capa/tests/test_files/js/test_problem_grader.js +++ b/common/lib/capa/capa/tests/test_files/js/test_problem_grader.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.4.0 (function() { var TestProblemGrader, root, __hasProp = {}.hasOwnProperty, diff --git a/common/lib/capa/capa/tests/test_files/js/xproblem.js b/common/lib/capa/capa/tests/test_files/js/xproblem.js index 512cf22739..55a469f7c1 100644 --- a/common/lib/capa/capa/tests/test_files/js/xproblem.js +++ b/common/lib/capa/capa/tests/test_files/js/xproblem.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.4.0 (function() { var XProblemDisplay, XProblemGenerator, XProblemGrader, root; diff --git a/lms/djangoapps/open_ended_grading/tests.py b/lms/djangoapps/open_ended_grading/tests.py index 6fa809628b..0831ace7d4 100644 --- a/lms/djangoapps/open_ended_grading/tests.py +++ b/lms/djangoapps/open_ended_grading/tests.py @@ -6,7 +6,7 @@ django-admin.py test --settings=lms.envs.test --pythonpath=. lms/djangoapps/open from django.test import TestCase from open_ended_grading import staff_grading_service -from xmodule import peer_grading_service +from xmodule import peer_grading_service, peer_grading_module from django.core.urlresolvers import reverse from django.contrib.auth.models import Group @@ -17,6 +17,8 @@ import xmodule.modulestore.django from nose import SkipTest from mock import patch, Mock import json +from xmodule.x_module import ModuleSystem +from mitxmako.shortcuts import render_to_string import logging log = logging.getLogger(__name__) @@ -138,16 +140,18 @@ class TestPeerGradingService(ct.PageLoader): self.toy = modulestore().get_course(self.course_id) self.mock_service = peer_grading_service.MockPeerGradingService() - + self.system = ModuleSystem(None, None, None, render_to_string, None) + self.descriptor = peer_grading_module.PeerGradingDescriptor() + self.peer_module = peer_grading_module.PeerGradingModule(self.system,"","",self.descriptor) + self.peer_module.peer_gs = self.mock_service self.logout() def test_get_next_submission_success(self): self.login(self.student, self.password) - url = reverse('peer_grading_get_next_submission', kwargs={'course_id': self.course_id}) data = {'location': self.location} - r = self.check_for_post_code(200, url, data) + r = self.peer_module.get_next_submission(data) d = json.loads(r.content) self.assertTrue(d['success']) self.assertIsNotNone(d['submission_id']) @@ -156,17 +160,14 @@ class TestPeerGradingService(ct.PageLoader): self.assertIsNotNone(d['max_score']) def test_get_next_submission_missing_location(self): - self.login(self.student, self.password) - url = reverse('peer_grading_get_next_submission', kwargs={'course_id': self.course_id}) data = {} - r = self.check_for_post_code(200, url, data) + r = self.peer_module.get_next_submission(data) d = json.loads(r.content) self.assertFalse(d['success']) self.assertEqual(d['error'], "Missing required keys: location") def test_save_grade_success(self): - self.login(self.student, self.password) - url = reverse('peer_grading_save_grade', kwargs={'course_id': self.course_id}) + data = {'location': self.location, 'submission_id': '1', 'submission_key': 'fake key', @@ -174,44 +175,35 @@ class TestPeerGradingService(ct.PageLoader): 'feedback': 'This is feedback', 'rubric_scores[]': [1, 2], 'submission_flagged' : False} - r = self.check_for_post_code(200, url, data) + r = self.peer_module.save_grade(data) d = json.loads(r.content) self.assertTrue(d['success']) def test_save_grade_missing_keys(self): - self.login(self.student, self.password) - url = reverse('peer_grading_save_grade', kwargs={'course_id': self.course_id}) data = {} - r = self.check_for_post_code(200, url, data) + r = self.peer_module.save_grade(data) d = json.loads(r.content) self.assertFalse(d['success']) self.assertTrue(d['error'].find('Missing required keys:') > -1) def test_is_calibrated_success(self): - self.login(self.student, self.password) - url = reverse('peer_grading_is_student_calibrated', kwargs={'course_id': self.course_id}) data = {'location': self.location} - r = self.check_for_post_code(200, url, data) + r = self.peer_module.is_student_calibrated(data) d = json.loads(r.content) self.assertTrue(d['success']) self.assertTrue('calibrated' in d) def test_is_calibrated_failure(self): - self.login(self.student, self.password) - url = reverse('peer_grading_is_student_calibrated', kwargs={'course_id': self.course_id}) data = {} - r = self.check_for_post_code(200, url, data) + r = self.peer_module.is_student_calibrated(data) d = json.loads(r.content) self.assertFalse(d['success']) self.assertFalse('calibrated' in d) def test_show_calibration_essay_success(self): - self.login(self.student, self.password) - - url = reverse('peer_grading_show_calibration_essay', kwargs={'course_id': self.course_id}) data = {'location': self.location} - r = self.check_for_post_code(200, url, data) + r = self.peer_module.show_calibration_essay(data) d = json.loads(r.content) self.assertTrue(d['success']) self.assertIsNotNone(d['submission_id']) @@ -220,36 +212,29 @@ class TestPeerGradingService(ct.PageLoader): self.assertIsNotNone(d['max_score']) def test_show_calibration_essay_missing_key(self): - self.login(self.student, self.password) - - url = reverse('peer_grading_show_calibration_essay', kwargs={'course_id': self.course_id}) data = {} - r = self.check_for_post_code(200, url, data) + r = self.peer_module.show_calibration_essay(data) d = json.loads(r.content) self.assertFalse(d['success']) self.assertEqual(d['error'], "Missing required keys: location") def test_save_calibration_essay_success(self): - self.login(self.student, self.password) - url = reverse('peer_grading_save_calibration_essay', kwargs={'course_id': self.course_id}) data = {'location': self.location, 'submission_id': '1', 'submission_key': 'fake key', 'score': '2', 'feedback': 'This is feedback', 'rubric_scores[]': [1, 2]} - r = self.check_for_post_code(200, url, data) + r = self.peer_module.save_calibration_essay(data) d = json.loads(r.content) self.assertTrue(d['success']) self.assertTrue('actual_score' in d) def test_save_calibration_essay_missing_keys(self): - self.login(self.student, self.password) - url = reverse('peer_grading_save_calibration_essay', kwargs={'course_id': self.course_id}) data = {} - r = self.check_for_post_code(200, url, data) + r = self.peer_module.save_calibration_essay(data) d = json.loads(r.content) self.assertFalse(d['success']) self.assertTrue(d['error'].find('Missing required keys:') > -1) From b05ead864fd20f715bed31d41a9b099b5a235899 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Thu, 31 Jan 2013 12:53:49 -0500 Subject: [PATCH 121/347] Revert "Revert "Merge pull request #1374 from MITx/feature/cale/no-course-collectstatic"" This reverts commit c4f56620dfb610d9a1f105478cfe4da6017102c3. --- cms/djangoapps/contentstore/views.py | 140 ++++++++++----------- common/lib/xmodule/xmodule/capa_module.py | 4 +- lms/djangoapps/courseware/courses.py | 5 +- lms/djangoapps/courseware/module_render.py | 10 +- lms/envs/common.py | 18 --- lms/envs/dev.py | 21 ++++ 6 files changed, 103 insertions(+), 95 deletions(-) diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index f70164138d..fbff570803 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -132,7 +132,7 @@ def has_access(user, location, role=STAFF_ROLE_NAME): Return True if user allowed to access this piece of data Note that the CMS permissions model is with respect to courses There is a super-admin permissions if user.is_staff is set - Also, since we're unifying the user database between LMS and CAS, + Also, since we're unifying the user database between LMS and CAS, I'm presuming that the course instructor (formally known as admin) will not be in both INSTRUCTOR and STAFF groups, so we have to cascade our queries here as INSTRUCTOR has all the rights that STAFF do @@ -154,7 +154,7 @@ def course_index(request, org, course, name): org, course, name: Attributes of the Location for the item to edit """ location = ['i4x', org, course, 'course', name] - + # check that logged in user has permissions to this item if not has_access(request.user, location): raise PermissionDenied() @@ -213,7 +213,7 @@ def edit_subsection(request, location): # remove all metadata from the generic dictionary that is presented in a more normalized UI - policy_metadata = dict((key,value) for key, value in item.metadata.iteritems() + policy_metadata = dict((key,value) for key, value in item.metadata.iteritems() if key not in ['display_name', 'start', 'due', 'format'] and key not in item.system_metadata_fields) can_view_live = False @@ -291,7 +291,7 @@ def edit_unit(request, location): containing_section = modulestore().get_item(containing_section_locs[0]) # cdodge hack. We're having trouble previewing drafts via jump_to redirect - # so let's generate the link url here + # so let's generate the link url here # need to figure out where this item is in the list of children as the preview will need this index =1 @@ -302,12 +302,12 @@ def edit_unit(request, location): preview_lms_link = '//{preview}{lms_base}/courses/{org}/{course}/{course_name}/courseware/{section}/{subsection}/{index}'.format( preview='preview.', - lms_base=settings.LMS_BASE, + lms_base=settings.LMS_BASE, org=course.location.org, - course=course.location.course, - course_name=course.location.name, - section=containing_section.location.name, - subsection=containing_subsection.location.name, + course=course.location.course, + course_name=course.location.name, + section=containing_section.location.name, + subsection=containing_subsection.location.name, index=index) unit_state = compute_unit_state(item) @@ -358,14 +358,14 @@ def assignment_type_update(request, org, course, category, name): location = Location(['i4x', org, course, category, name]) if not has_access(request.user, location): raise HttpResponseForbidden() - + if request.method == 'GET': - return HttpResponse(json.dumps(CourseGradingModel.get_section_grader_type(location)), + return HttpResponse(json.dumps(CourseGradingModel.get_section_grader_type(location)), mimetype="application/json") elif request.method == 'POST': # post or put, doesn't matter. - return HttpResponse(json.dumps(CourseGradingModel.update_section_grader_type(location, request.POST)), + return HttpResponse(json.dumps(CourseGradingModel.update_section_grader_type(location, request.POST)), mimetype="application/json") - + def user_author_string(user): '''Get an author string for commits by this user. Format: @@ -510,23 +510,23 @@ def load_preview_module(request, preview_id, descriptor, instance_state, shared_ error_msg=exc_info_to_str(sys.exc_info()) ).xmodule_constructor(system)(None, None) - # cdodge: Special case + # cdodge: Special case if module.location.category == 'static_tab': module.get_html = wrap_xmodule( module.get_html, module, "xmodule_tab_display.html", ) - else: + else: module.get_html = wrap_xmodule( module.get_html, module, "xmodule_display.html", ) - + module.get_html = replace_static_urls( module.get_html, - module.metadata.get('data_dir', module.location.course), + '/static/' + module.metadata.get('data_dir', module.location.course), course_namespace = Location([module.location.tag, module.location.org, module.location.course, None, None]) ) save_preview_state(request, preview_id, descriptor.location.url(), @@ -554,7 +554,7 @@ def _xmodule_recurse(item, action): _xmodule_recurse(child, action) action(item) - + @login_required @expect_json @@ -589,7 +589,7 @@ def delete_item(request): # delete_item on a vertical tries to delete the draft version leaving the # requested delete to never occur if item.location.revision is None and item.location.category=='vertical' and delete_all_versions: - modulestore('direct').delete_item(item.location) + modulestore('direct').delete_item(item.location) return HttpResponse() @@ -608,7 +608,7 @@ def save_item(request): if request.POST.get('data') is not None: data = request.POST['data'] store.update_item(item_location, data) - + # cdodge: note calling request.POST.get('children') will return None if children is an empty array # so it lead to a bug whereby the last component to be deleted in the UI was not actually # deleting the children object from the children collection @@ -698,7 +698,7 @@ def unpublish_unit(request): def clone_item(request): parent_location = Location(request.POST['parent_location']) template = Location(request.POST['template']) - + display_name = request.POST.get('display_name') if not has_access(request.user, parent_location): @@ -738,9 +738,9 @@ def upload_asset(request, org, course, coursename): location = ['i4x', org, course, 'course', coursename] if not has_access(request.user, location): return HttpResponseForbidden() - + # Does the course actually exist?!? Get anything from it to prove its existance - + try: item = modulestore().get_item(location) except: @@ -774,9 +774,9 @@ def upload_asset(request, org, course, coursename): # readback the saved content - we need the database timestamp readback = contentstore().find(content.location) - - response_payload = {'displayname' : content.name, - 'uploadDate' : get_date_display(readback.last_modified_at), + + response_payload = {'displayname' : content.name, + 'uploadDate' : get_date_display(readback.last_modified_at), 'url' : StaticContent.get_url_path_from_location(content.location), 'thumb_url' : StaticContent.get_url_path_from_location(thumbnail_location) if thumbnail_content is not None else None, 'msg' : 'Upload completed' @@ -792,7 +792,7 @@ This view will return all CMS users who are editors for the specified course @login_required @ensure_csrf_cookie def manage_users(request, location): - + # check that logged in user has permissions to this item if not has_access(request.user, location, role=INSTRUCTOR_ROLE_NAME) and not has_access(request.user, location, role=STAFF_ROLE_NAME): raise PermissionDenied() @@ -808,7 +808,7 @@ def manage_users(request, location): 'allow_actions' : has_access(request.user, location, role=INSTRUCTOR_ROLE_NAME), 'request_user_id' : request.user.id }) - + def create_json_response(errmsg = None): if errmsg is not None: @@ -830,13 +830,13 @@ def add_user(request, location): if email=='': return create_json_response('Please specify an email address.') - + # check that logged in user has admin permissions to this course if not has_access(request.user, location, role=INSTRUCTOR_ROLE_NAME): raise PermissionDenied() - + user = get_user_by_email(email) - + # user doesn't exist?!? Return error. if user is None: return create_json_response('Could not find user by email address \'{0}\'.'.format(email)) @@ -859,7 +859,7 @@ the specified course @ensure_csrf_cookie def remove_user(request, location): email = request.POST["email"] - + # check that logged in user has admin permissions on this course if not has_access(request.user, location, role=INSTRUCTOR_ROLE_NAME): raise PermissionDenied() @@ -886,7 +886,7 @@ def landing(request, org, course, coursename): def static_pages(request, org, course, coursename): location = ['i4x', org, course, 'course', coursename] - + # check that logged in user has permissions to this item if not has_access(request.user, location): raise PermissionDenied() @@ -951,7 +951,7 @@ def reorder_static_tabs(request): @login_required @ensure_csrf_cookie def edit_tabs(request, org, course, coursename): - location = ['i4x', org, course, 'course', coursename] + location = ['i4x', org, course, 'course', coursename] course_item = modulestore().get_item(location) static_tabs_loc = Location('i4x', org, course, 'static_tab', None) @@ -980,7 +980,7 @@ def edit_tabs(request, org, course, coursename): return render_to_response('edit-tabs.html', { 'active_tab': 'pages', - 'context_course':course_item, + 'context_course':course_item, 'components': components }) @@ -1001,13 +1001,13 @@ def course_info(request, org, course, name, provided_id=None): org, course, name: Attributes of the Location for the item to edit """ location = ['i4x', org, course, 'course', name] - + # check that logged in user has permissions to this item if not has_access(request.user, location): raise PermissionDenied() - + course_module = modulestore().get_item(location) - + # get current updates location = ['i4x', org, course, 'course_info', "updates"] @@ -1018,7 +1018,7 @@ def course_info(request, org, course, name, provided_id=None): 'course_updates' : json.dumps(get_course_updates(location)), 'handouts_location': Location(['i4x', org, course, 'course_info', 'handouts']).url() }) - + @expect_json @login_required @ensure_csrf_cookie @@ -1032,7 +1032,7 @@ def course_info_updates(request, org, course, provided_id=None): # ??? No way to check for access permission afaik # get current updates location = ['i4x', org, course, 'course_info', "updates"] - + # Hmmm, provided_id is coming as empty string on create whereas I believe it used to be None :-( # Possibly due to my removing the seemingly redundant pattern in urls.py if provided_id == '': @@ -1047,7 +1047,7 @@ def course_info_updates(request, org, course, provided_id=None): real_method = request.META['HTTP_X_HTTP_METHOD_OVERRIDE'] else: real_method = request.method - + if request.method == 'GET': return HttpResponse(json.dumps(get_course_updates(location)), mimetype="application/json") elif real_method == 'DELETE': # coming as POST need to pull from Request Header X-HTTP-Method-Override DELETE @@ -1064,7 +1064,7 @@ def course_info_updates(request, org, course, provided_id=None): @ensure_csrf_cookie def module_info(request, module_location): location = Location(module_location) - + # check that logged in user has permissions to this item if not has_access(request.user, location): raise PermissionDenied() @@ -1077,10 +1077,10 @@ def module_info(request, module_location): rewrite_static_links = request.GET.get('rewrite_url_links','True') in ['True', 'true'] logging.debug('rewrite_static_links = {0} {1}'.format(request.GET.get('rewrite_url_links','False'), rewrite_static_links)) - + # check that logged in user has permissions to this item if not has_access(request.user, location): - raise PermissionDenied() + raise PermissionDenied() if real_method == 'GET': return HttpResponse(json.dumps(get_module_info(get_modulestore(location), location, rewrite_static_links=rewrite_static_links)), mimetype="application/json") @@ -1098,20 +1098,20 @@ def get_course_settings(request, org, course, name): org, course, name: Attributes of the Location for the item to edit """ location = ['i4x', org, course, 'course', name] - + # check that logged in user has permissions to this item if not has_access(request.user, location): raise PermissionDenied() - + course_module = modulestore().get_item(location) course_details = CourseDetails.fetch(location) - + return render_to_response('settings.html', { - 'active_tab': 'settings', + 'active_tab': 'settings', 'context_course': course_module, 'course_details' : json.dumps(course_details, cls=CourseSettingsEncoder) }) - + @expect_json @login_required @ensure_csrf_cookie @@ -1134,13 +1134,13 @@ def course_settings_updates(request, org, course, name, section): elif section == 'grading': manager = CourseGradingModel else: return - + if request.method == 'GET': # Cannot just do a get w/o knowing the course name :-( - return HttpResponse(json.dumps(manager.fetch(Location(['i4x', org, course, 'course',name])), cls=CourseSettingsEncoder), + return HttpResponse(json.dumps(manager.fetch(Location(['i4x', org, course, 'course',name])), cls=CourseSettingsEncoder), mimetype="application/json") elif request.method == 'POST': # post or put, doesn't matter. - return HttpResponse(json.dumps(manager.update_from_json(request.POST), cls=CourseSettingsEncoder), + return HttpResponse(json.dumps(manager.update_from_json(request.POST), cls=CourseSettingsEncoder), mimetype="application/json") @expect_json @@ -1153,7 +1153,7 @@ def course_grader_updates(request, org, course, name, grader_index=None): org, course: Attributes of the Location for the item to edit """ - + location = ['i4x', org, course, 'course', name] # check that logged in user has permissions to this item @@ -1164,13 +1164,13 @@ def course_grader_updates(request, org, course, name, grader_index=None): real_method = request.META['HTTP_X_HTTP_METHOD_OVERRIDE'] else: real_method = request.method - + if real_method == 'GET': # Cannot just do a get w/o knowing the course name :-( - return HttpResponse(json.dumps(CourseGradingModel.fetch_grader(Location(['i4x', org, course, 'course',name]), grader_index)), + return HttpResponse(json.dumps(CourseGradingModel.fetch_grader(Location(['i4x', org, course, 'course',name]), grader_index)), mimetype="application/json") elif real_method == "DELETE": - # ??? Shoudl this return anything? Perhaps success fail? + # ??? Shoudl this return anything? Perhaps success fail? CourseGradingModel.delete_grader(Location(['i4x', org, course, 'course',name]), grader_index) return HttpResponse() elif request.method == 'POST': # post or put, doesn't matter. @@ -1187,7 +1187,7 @@ def asset_index(request, org, course, name): org, course, name: Attributes of the Location for the item to edit """ location = ['i4x', org, course, 'course', name] - + # check that logged in user has permissions to this item if not has_access(request.user, location): raise PermissionDenied() @@ -1200,7 +1200,7 @@ def asset_index(request, org, course, name): }) course_module = modulestore().get_item(location) - + course_reference = StaticContent.compute_location(org, course, name) assets = contentstore().get_all_content_for_course(course_reference) @@ -1214,15 +1214,15 @@ def asset_index(request, org, course, name): display_info = {} display_info['displayname'] = asset['displayname'] display_info['uploadDate'] = get_date_display(asset['uploadDate']) - + asset_location = StaticContent.compute_location(id['org'], id['course'], id['name']) display_info['url'] = StaticContent.get_url_path_from_location(asset_location) - + # note, due to the schema change we may not have a 'thumbnail_location' in the result set _thumbnail_location = asset.get('thumbnail_location', None) thumbnail_location = Location(_thumbnail_location) if _thumbnail_location is not None else None display_info['thumb_url'] = StaticContent.get_url_path_from_location(thumbnail_location) if thumbnail_location is not None else None - + asset_display.append(display_info) return render_to_response('asset_index.html', { @@ -1241,9 +1241,9 @@ def edge(request): @expect_json def create_new_course(request): template = Location(request.POST['template']) - org = request.POST.get('org') - number = request.POST.get('number') - display_name = request.POST.get('display_name') + org = request.POST.get('org') + number = request.POST.get('number') + display_name = request.POST.get('display_name') try: dest_location = Location('i4x', org, number, 'course', Location.clean(display_name)) @@ -1289,13 +1289,13 @@ def initialize_course_tabs(course): # at least a list populated with the minimal times # @TODO: I don't like the fact that the presentation tier is away of these data related constraints, let's find a better # place for this. Also rather than using a simple list of dictionaries a nice class model would be helpful here - course.tabs = [{"type": "courseware"}, - {"type": "course_info", "name": "Course Info"}, + course.tabs = [{"type": "courseware"}, + {"type": "course_info", "name": "Course Info"}, {"type": "discussion", "name": "Discussion"}, {"type": "wiki", "name": "Wiki"}, {"type": "progress", "name": "Progress"}] - modulestore('direct').update_metadata(course.location.url(), course.own_metadata) + modulestore('direct').update_metadata(course.location.url(), course.own_metadata) @ensure_csrf_cookie @login_required @@ -1388,7 +1388,7 @@ def generate_export_course(request, org, course, name): root_dir = path(mkdtemp()) # export out to a tempdir - + logging.debug('root = {0}'.format(root_dir)) export_to_xml(modulestore('direct'), contentstore(), loc, root_dir, name) @@ -1400,7 +1400,7 @@ def generate_export_course(request, org, course, name): tf.close() # remove temp dir - shutil.rmtree(root_dir/name) + shutil.rmtree(root_dir/name) wrapper = FileWrapper(export_file) response = HttpResponse(wrapper, content_type='application/x-tgz') @@ -1430,4 +1430,4 @@ def event(request): A noop to swallow the analytics call so that cms methods don't spook and poor developers looking at console logs don't get distracted :-) ''' - return HttpResponse(True) \ No newline at end of file + return HttpResponse(True) diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index f4b0c32e96..d3c8786f66 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -369,7 +369,7 @@ class CapaModule(XModule): id=self.location.html_id(), ajax_url=self.system.ajax_url) + html + "
    " # now do the substitutions which are filesystem based, e.g. '/static/' prefixes - return self.system.replace_urls(html, self.metadata['data_dir'], course_namespace=self.location) + return self.system.replace_urls(html) def handle_ajax(self, dispatch, get): ''' @@ -490,7 +490,7 @@ class CapaModule(XModule): new_answers = dict() for answer_id in answers: try: - new_answer = {answer_id: self.system.replace_urls(answers[answer_id], self.metadata['data_dir'], course_namespace=self.location)} + new_answer = {answer_id: self.system.replace_urls(answers[answer_id])} except TypeError: log.debug('Unable to perform URL substitution on answers[%s]: %s' % (answer_id, answers[answer_id])) new_answer = {answer_id: answers[answer_id]} diff --git a/lms/djangoapps/courseware/courses.py b/lms/djangoapps/courseware/courses.py index 89a1496eca..03d5a89c64 100644 --- a/lms/djangoapps/courseware/courses.py +++ b/lms/djangoapps/courseware/courses.py @@ -83,13 +83,12 @@ def get_opt_course_with_access(user, course_id, action): return None return get_course_with_access(user, course_id, action) - + def course_image_url(course): """Try to look up the image url for the course. If it's not found, log an error and return the dead link""" if isinstance(modulestore(), XMLModuleStore): - path = course.metadata['data_dir'] + "/images/course_image.jpg" - return try_staticfiles_lookup(path) + return '/static/' + course.metadata['data_dir'] + "/images/course_image.jpg" else: loc = course.location._replace(tag='c4x', category='asset', name='images_course_image.jpg') path = StaticContent.get_url_path_from_location(loc) diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index 7ed32c8597..22d95ef8a2 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -3,6 +3,8 @@ import logging import pyparsing import sys +from functools import partial + from django.conf import settings from django.contrib.auth.models import User from django.core.urlresolvers import reverse @@ -244,7 +246,11 @@ def _get_module(user, request, descriptor, student_module_cache, course_id, # TODO (cpennington): This should be removed when all html from # a module is coming through get_html and is therefore covered # by the replace_static_urls code below - replace_urls=replace_urls, + replace_urls=partial( + replace_urls, + staticfiles_prefix='/static/' + descriptor.metadata.get('data_dir', ''), + course_namespace=descriptor.location._replace(category=None, name=None), + ), node_path=settings.NODE_PATH, anonymous_student_id=unique_id_for_user(user), course_id=course_id, @@ -280,7 +286,7 @@ def _get_module(user, request, descriptor, student_module_cache, course_id, module.get_html = replace_static_urls( _get_html, - module.metadata['data_dir'] if 'data_dir' in module.metadata else '', + '/static/' + module.metadata.get('data_dir', ''), course_namespace = module.location._replace(category=None, name=None)) # Allow URLs of the form '/course/' refer to the root of multicourse directory diff --git a/lms/envs/common.py b/lms/envs/common.py index 4b325821dd..24c757f51b 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -266,24 +266,6 @@ STATICFILES_DIRS = [ COMMON_ROOT / "static", PROJECT_ROOT / "static", ] -if os.path.isdir(DATA_DIR): - # Add the full course repo if there is no static directory - STATICFILES_DIRS += [ - # TODO (cpennington): When courses are stored in a database, this - # should no longer be added to STATICFILES - (course_dir, DATA_DIR / course_dir) - for course_dir in os.listdir(DATA_DIR) - if (os.path.isdir(DATA_DIR / course_dir) and - not os.path.isdir(DATA_DIR / course_dir / 'static')) - ] - # Otherwise, add only the static directory from the course dir - STATICFILES_DIRS += [ - # TODO (cpennington): When courses are stored in a database, this - # should no longer be added to STATICFILES - (course_dir, DATA_DIR / course_dir / 'static') - for course_dir in os.listdir(DATA_DIR) - if (os.path.isdir(DATA_DIR / course_dir / 'static')) - ] # Locale/Internationalization TIME_ZONE = 'America/New_York' # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name diff --git a/lms/envs/dev.py b/lms/envs/dev.py index 99ee9662ee..338a31f641 100644 --- a/lms/envs/dev.py +++ b/lms/envs/dev.py @@ -106,6 +106,27 @@ VIRTUAL_UNIVERSITIES = [] COMMENTS_SERVICE_KEY = "PUT_YOUR_API_KEY_HERE" +############################## Course static files ########################## +if os.path.isdir(DATA_DIR): + # Add the full course repo if there is no static directory + STATICFILES_DIRS += [ + # TODO (cpennington): When courses are stored in a database, this + # should no longer be added to STATICFILES + (course_dir, DATA_DIR / course_dir) + for course_dir in os.listdir(DATA_DIR) + if (os.path.isdir(DATA_DIR / course_dir) and + not os.path.isdir(DATA_DIR / course_dir / 'static')) + ] + # Otherwise, add only the static directory from the course dir + STATICFILES_DIRS += [ + # TODO (cpennington): When courses are stored in a database, this + # should no longer be added to STATICFILES + (course_dir, DATA_DIR / course_dir / 'static') + for course_dir in os.listdir(DATA_DIR) + if (os.path.isdir(DATA_DIR / course_dir / 'static')) + ] + + ################################# mitx revision string ##################### MITX_VERSION_STRING = os.popen('cd %s; git describe' % REPO_ROOT).read().strip() From 04879a83d3057cca5e128841809c9aee4af83e68 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Fri, 1 Feb 2013 22:15:31 -0500 Subject: [PATCH 122/347] Rejigger how /course and /static urls are replaced, to make the logic slightly more comprehensible --- .../contentstore/module_info_model.py | 16 ++- cms/djangoapps/contentstore/views.py | 12 +- common/djangoapps/static_replace.py | 109 +++++++++++------- common/djangoapps/xmodule_modifiers.py | 8 +- common/lib/xmodule/xmodule/video_module.py | 8 +- lms/djangoapps/courseware/courses.py | 9 +- lms/djangoapps/courseware/module_render.py | 6 +- lms/djangoapps/courseware/tabs.py | 3 +- 8 files changed, 106 insertions(+), 65 deletions(-) diff --git a/cms/djangoapps/contentstore/module_info_model.py b/cms/djangoapps/contentstore/module_info_model.py index 0017010885..3b783c8815 100644 --- a/cms/djangoapps/contentstore/module_info_model.py +++ b/cms/djangoapps/contentstore/module_info_model.py @@ -1,5 +1,5 @@ import logging -from static_replace import replace_urls +from static_replace import replace_static_urls from xmodule.modulestore.exceptions import ItemNotFoundError from xmodule.modulestore import Location from xmodule.modulestore.django import modulestore @@ -18,7 +18,17 @@ def get_module_info(store, location, parent_location = None, rewrite_static_link data = module.definition['data'] if rewrite_static_links: - data = replace_urls(module.definition['data'], course_namespace = Location([module.location.tag, module.location.org, module.location.course, None, None])) + data = replace_static_urls( + module.definition['data'], + None, + course_namespace=Location([ + module.location.tag, + module.location.org, + module.location.course, + None, + None + ]) + ) return { 'id': module.location.url(), @@ -47,7 +57,7 @@ def set_module_info(store, location, post_data): if post_data.get('data') is not None: data = post_data['data'] store.update_item(location, data) - + # cdodge: note calling request.POST.get('children') will return None if children is an empty array # so it lead to a bug whereby the last component to be deleted in the UI was not actually # deleting the children object from the children collection diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index fbff570803..14065f2d54 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -31,7 +31,7 @@ from xmodule.modulestore.exceptions import ItemNotFoundError, InvalidLocationErr from xmodule.x_module import ModuleSystem from xmodule.error_module import ErrorDescriptor from xmodule.errortracker import exc_info_to_str -from static_replace import replace_urls +from static_replace import replace_static_urls from external_auth.views import ssl_login_shortcut from mitxmako.shortcuts import render_to_response, render_to_string @@ -473,7 +473,7 @@ def preview_module_system(request, preview_id, descriptor): get_module=partial(get_preview_module, request, preview_id), render_template=render_from_lms, debug=True, - replace_urls=replace_urls, + replace_urls=partial(replace_static_urls, data_directory=None, course_namespace=descriptor.location), user=request.user, ) @@ -915,7 +915,7 @@ def reorder_static_tabs(request): # get list of existing static tabs in course # make sure they are the same lengths (i.e. the number of passed in tabs equals the number # that we know about) otherwise we can drop some! - + existing_static_tabs = [t for t in course.tabs if t['type'] == 'static_tab'] if len(existing_static_tabs) != len(tabs): return HttpResponseBadRequest() @@ -934,15 +934,15 @@ def reorder_static_tabs(request): static_tab_idx = 0 for tab in course.tabs: if tab['type'] == 'static_tab': - reordered_tabs.append({'type': 'static_tab', - 'name' : tab_items[static_tab_idx].metadata.get('display_name'), + reordered_tabs.append({'type': 'static_tab', + 'name' : tab_items[static_tab_idx].metadata.get('display_name'), 'url_slug' : tab_items[static_tab_idx].location.name}) static_tab_idx += 1 else: reordered_tabs.append(tab) - # OK, re-assemble the static tabs in the new order + # OK, re-assemble the static tabs in the new order course.tabs = reordered_tabs modulestore('direct').update_metadata(course.location, course.metadata) return HttpResponse() diff --git a/common/djangoapps/static_replace.py b/common/djangoapps/static_replace.py index e75362d784..12db870f1a 100644 --- a/common/djangoapps/static_replace.py +++ b/common/djangoapps/static_replace.py @@ -11,6 +11,16 @@ from xmodule.contentstore.content import StaticContent log = logging.getLogger(__name__) + +def _url_replace_regex(prefix): + return r""" + (?x) # flags=re.VERBOSE + (?P\\?['"]) # the opening quotes + (?P{prefix}) # theeprefix + (?P.*?) # everything else in the url + (?P=quote) # the first matching closing quote + """.format(prefix=prefix) + def try_staticfiles_lookup(path): """ Try to lookup a path in staticfiles_storage. If it fails, return @@ -26,48 +36,67 @@ def try_staticfiles_lookup(path): return url -def replace(static_url, prefix=None, course_namespace=None): - if prefix is None: - prefix = '' - else: - prefix = prefix + '/' +def replace_course_urls(text, course_id): + """ + Replace /course/$stuff urls with /courses/$course_id/$stuff urls - quote = static_url.group('quote') + text: The text to replace + course_module: A CourseDescriptor - servable = ( - # If in debug mode, we'll serve up anything that the finders can find - (settings.DEBUG and finders.find(static_url.group('rest'), True)) or - # Otherwise, we'll only serve up stuff that the storages can find - staticfiles_storage.exists(static_url.group('rest')) - ) + returns: text with the links replaced + """ - if servable: - return static_url.group(0) - else: - # don't error if file can't be found - # cdodge: to support the change over to Mongo backed content stores, lets - # use the utility functions in StaticContent.py - if static_url.group('prefix') == '/static/' and not isinstance(modulestore(), XMLModuleStore): - if course_namespace is None: - raise BaseException('You must pass in course_namespace when remapping static content urls with MongoDB stores') - url = StaticContent.convert_legacy_static_url(static_url.group('rest'), course_namespace) + + def replace_course_url(match): + log.warning("Course match: %s", match.groupdict()) + quote = match.group('quote') + rest = match.group('rest') + return "".join([quote, '/courses/' + course_id + '/', rest, quote]) + + return re.sub(_url_replace_regex('/courses/'), replace_course_url, text) + + +def replace_static_urls(text, data_directory, course_namespace=None): + """ + Replace /static/$stuff urls either with their correct url as generated by collectstatic, + (/static/$md5_hashed_stuff) or by the course-specific content static url + /static/$course_data_dir/$stuff, or, if course_namespace is not None, by the + correct url in the contentstore (c4x://) + + text: The source text to do the substitution in + data_directory: The directory in which course data is stored + course_namespace: The course identifier used to distinguish static content for this course in studio + """ + + def replace_static_url(match): + log.warning(match.groupdict()) + quote = match.group('quote') + rest = match.group('rest') + + # course_namespace is not None, then use studio style urls + if course_namespace is not None and not isinstance(modulestore(), XMLModuleStore): + url = StaticContent.convert_legacy_static_url(rest, course_namespace) + log.warning("From modulestore: %s", url) + # If we're in debug mode, and the file as requested exists, then don't change the links + elif (settings.DEBUG and finders.find(rest, True)): + url = match.group('prefix') + rest + log.warning("From finder: %s", url) + # Otherwise, look the file up in staticfiles_storage else: - url = try_staticfiles_lookup(prefix + static_url.group('rest')) + try: + url = staticfiles_storage.url(data_directory + '/' + rest) + log.warning("From staticfiles_storage: %s", url) + # And if that fails, return the path unmodified + except Exception as err: + log.warning("staticfiles_storage couldn't find path {0}: {1}".format( + path, str(err))) + url = path + log.warning("Fallback: %s", url) + log.warning("".join([quote, url, quote])) + return "".join([quote, url, quote]) - new_link = "".join([quote, url, quote]) - return new_link - - - -def replace_urls(text, staticfiles_prefix=None, replace_prefix='/static/', course_namespace=None): - - def replace_url(static_url): - return replace(static_url, staticfiles_prefix, course_namespace = course_namespace) - - return re.sub(r""" - (?x) # flags=re.VERBOSE - (?P\\?['"]) # the opening quotes - (?P{prefix}) # the prefix - (?P.*?) # everything else in the url - (?P=quote) # the first matching closing quote - """.format(prefix=replace_prefix), replace_url, text) + return re.sub( + _url_replace_regex('/static/(?!{data_dir}'.format(data_dir=data_directory)), + replace_static_url, + text + ) diff --git a/common/djangoapps/xmodule_modifiers.py b/common/djangoapps/xmodule_modifiers.py index 5c19a2f1d7..e0fda01eef 100644 --- a/common/djangoapps/xmodule_modifiers.py +++ b/common/djangoapps/xmodule_modifiers.py @@ -2,10 +2,10 @@ import re import json import logging import time +import static_replace from django.conf import settings from functools import wraps -from static_replace import replace_urls from mitxmako.shortcuts import render_to_string from xmodule.seq_module import SequenceModule from xmodule.vertical_module import VerticalModule @@ -49,10 +49,10 @@ def replace_course_urls(get_html, course_id): """ @wraps(get_html) def _get_html(): - return replace_urls(get_html(), staticfiles_prefix='/courses/'+course_id, replace_prefix='/course/') + return static_replace.replace_course_urls(get_html(), course_id) return _get_html -def replace_static_urls(get_html, prefix, course_namespace=None): +def replace_static_urls(get_html, data_dir, course_namespace=None): """ Updates the supplied module with a new get_html function that wraps the old get_html function and substitutes urls of the form /static/... @@ -61,7 +61,7 @@ def replace_static_urls(get_html, prefix, course_namespace=None): @wraps(get_html) def _get_html(): - return replace_urls(get_html(), staticfiles_prefix=prefix, course_namespace = course_namespace) + return static_replace.replace_static_urls(get_html(), data_dir, course_namespace) return _get_html diff --git a/common/lib/xmodule/xmodule/video_module.py b/common/lib/xmodule/xmodule/video_module.py index bb3af745ae..f21cd37a37 100644 --- a/common/lib/xmodule/xmodule/video_module.py +++ b/common/lib/xmodule/xmodule/video_module.py @@ -6,7 +6,7 @@ from pkg_resources import resource_string, resource_listdir from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor -from xmodule.modulestore.mongo import MongoModuleStore +from xmodule.modulestore.xml import XMLModuleStore from xmodule.modulestore.django import modulestore from xmodule.contentstore.content import StaticContent @@ -121,12 +121,12 @@ class VideoModule(XModule): return self.youtube def get_html(self): - if isinstance(modulestore(), MongoModuleStore) : - caption_asset_path = StaticContent.get_base_url_path_for_course_assets(self.location) + '/subs_' - else: + if isinstance(modulestore(), XMLModuleStore) : # VS[compat] # cdodge: filesystem static content support. caption_asset_path = "/static/{0}/subs/".format(self.metadata['data_dir']) + else: + caption_asset_path = StaticContent.get_base_url_path_for_course_assets(self.location) + '/subs_' return self.system.render_template('video.html', { 'streams': self.video_list(), diff --git a/lms/djangoapps/courseware/courses.py b/lms/djangoapps/courseware/courses.py index 03d5a89c64..ce29d69784 100644 --- a/lms/djangoapps/courseware/courses.py +++ b/lms/djangoapps/courseware/courses.py @@ -19,7 +19,7 @@ from xmodule.contentstore.content import StaticContent from xmodule.modulestore.xml import XMLModuleStore from xmodule.modulestore.exceptions import ItemNotFoundError from xmodule.x_module import XModule -from static_replace import replace_urls, try_staticfiles_lookup +from static_replace import replace_static_urls from courseware.access import has_access import branding from courseware.models import StudentModuleCache @@ -223,8 +223,11 @@ def get_course_syllabus_section(course, section_key): dirs = [path("syllabus") / course.url_name, path("syllabus")] filepath = find_file(fs, dirs, section_key + ".html") with fs.open(filepath) as htmlFile: - return replace_urls(htmlFile.read().decode('utf-8'), - course.metadata['data_dir'], course_namespace=course.location) + return replace_static_urls( + htmlFile.read().decode('utf-8'), + course.metadata['data_dir'], + course_namespace=course.location + ) except ResourceNotFoundError: log.exception("Missing syllabus section {key} in course {url}".format( key=section_key, url=course.location.url())) diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index 22d95ef8a2..8a791785cd 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -2,6 +2,7 @@ import json import logging import pyparsing import sys +import static_replace from functools import partial @@ -20,7 +21,6 @@ from courseware.access import has_access from mitxmako.shortcuts import render_to_string from models import StudentModule, StudentModuleCache from psychometrics.psychoanalyze import make_psychometrics_data_update_handler -from static_replace import replace_urls from student.models import unique_id_for_user from xmodule.errortracker import exc_info_to_str from xmodule.exceptions import NotFoundError @@ -247,8 +247,8 @@ def _get_module(user, request, descriptor, student_module_cache, course_id, # a module is coming through get_html and is therefore covered # by the replace_static_urls code below replace_urls=partial( - replace_urls, - staticfiles_prefix='/static/' + descriptor.metadata.get('data_dir', ''), + static_replace.replace_static_urls, + data_directory=descriptor.metadata.get('data_dir', ''), course_namespace=descriptor.location._replace(category=None, name=None), ), node_path=settings.NODE_PATH, diff --git a/lms/djangoapps/courseware/tabs.py b/lms/djangoapps/courseware/tabs.py index 0a7c723cb5..64d488d845 100644 --- a/lms/djangoapps/courseware/tabs.py +++ b/lms/djangoapps/courseware/tabs.py @@ -24,7 +24,6 @@ from static_replace import replace_urls from lxml.html import rewrite_links from module_render import get_module from courseware.access import has_access -from static_replace import replace_urls from xmodule.modulestore import Location from xmodule.modulestore.django import modulestore from xmodule.modulestore.xml import XMLModuleStore @@ -322,4 +321,4 @@ def get_static_tab_contents(request, cache, course, tab): if tab_module is not None: html = tab_module.get_html() - return html \ No newline at end of file + return html From 88fc2e3756073740441c514d112f9570b0adb251 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 4 Feb 2013 11:17:25 -0500 Subject: [PATCH 123/347] Fix unbalanced paren in regex --- common/djangoapps/static_replace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/djangoapps/static_replace.py b/common/djangoapps/static_replace.py index 12db870f1a..0301f02ddf 100644 --- a/common/djangoapps/static_replace.py +++ b/common/djangoapps/static_replace.py @@ -96,7 +96,7 @@ def replace_static_urls(text, data_directory, course_namespace=None): return "".join([quote, url, quote]) return re.sub( - _url_replace_regex('/static/(?!{data_dir}'.format(data_dir=data_directory)), + _url_replace_regex('/static/(?!{data_dir})'.format(data_dir=data_directory)), replace_static_url, text ) From 0da1467a904bad9b97b6a876355041ccc0a32292 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 4 Feb 2013 11:20:43 -0500 Subject: [PATCH 124/347] Pull out missing variable --- common/djangoapps/static_replace.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/djangoapps/static_replace.py b/common/djangoapps/static_replace.py index 0301f02ddf..c99d55794e 100644 --- a/common/djangoapps/static_replace.py +++ b/common/djangoapps/static_replace.py @@ -83,8 +83,9 @@ def replace_static_urls(text, data_directory, course_namespace=None): log.warning("From finder: %s", url) # Otherwise, look the file up in staticfiles_storage else: + path = data_directory + '/' + rest try: - url = staticfiles_storage.url(data_directory + '/' + rest) + url = staticfiles_storage.url(path) log.warning("From staticfiles_storage: %s", url) # And if that fails, return the path unmodified except Exception as err: From ba7bd9022b5d0c82a2baac673b4c5769bff6cdf9 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 4 Feb 2013 11:24:11 -0500 Subject: [PATCH 125/347] Replace the correct /course/ urls, rather than /courses/ --- common/djangoapps/static_replace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/djangoapps/static_replace.py b/common/djangoapps/static_replace.py index c99d55794e..2932c0357a 100644 --- a/common/djangoapps/static_replace.py +++ b/common/djangoapps/static_replace.py @@ -53,7 +53,7 @@ def replace_course_urls(text, course_id): rest = match.group('rest') return "".join([quote, '/courses/' + course_id + '/', rest, quote]) - return re.sub(_url_replace_regex('/courses/'), replace_course_url, text) + return re.sub(_url_replace_regex('/course/'), replace_course_url, text) def replace_static_urls(text, data_directory, course_namespace=None): From 401f564e6a0a6ac33a9f05e6dffc6f9c9b7e3800 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 4 Feb 2013 12:29:21 -0500 Subject: [PATCH 126/347] Fix data directory passed to replace_static_urls --- cms/djangoapps/contentstore/views.py | 2 +- lms/djangoapps/courseware/module_render.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index 14065f2d54..9328b7fdb1 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -526,7 +526,7 @@ def load_preview_module(request, preview_id, descriptor, instance_state, shared_ module.get_html = replace_static_urls( module.get_html, - '/static/' + module.metadata.get('data_dir', module.location.course), + module.metadata.get('data_dir', module.location.course), course_namespace = Location([module.location.tag, module.location.org, module.location.course, None, None]) ) save_preview_state(request, preview_id, descriptor.location.url(), diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index 8a791785cd..b19796b357 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -286,7 +286,7 @@ def _get_module(user, request, descriptor, student_module_cache, course_id, module.get_html = replace_static_urls( _get_html, - '/static/' + module.metadata.get('data_dir', ''), + module.metadata.get('data_dir', ''), course_namespace = module.location._replace(category=None, name=None)) # Allow URLs of the form '/course/' refer to the root of multicourse directory From f1f2bd8fd25b75fbc3dd62f7f0fa2aaccbc2eaba Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 4 Feb 2013 12:29:35 -0500 Subject: [PATCH 127/347] Start adding tests for static replacement --- .../__init__.py} | 0 .../test/test_static_replace.py | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+) rename common/djangoapps/{static_replace.py => static_replace/__init__.py} (100%) create mode 100644 common/djangoapps/static_replace/test/test_static_replace.py diff --git a/common/djangoapps/static_replace.py b/common/djangoapps/static_replace/__init__.py similarity index 100% rename from common/djangoapps/static_replace.py rename to common/djangoapps/static_replace/__init__.py diff --git a/common/djangoapps/static_replace/test/test_static_replace.py b/common/djangoapps/static_replace/test/test_static_replace.py new file mode 100644 index 0000000000..c451f11ec6 --- /dev/null +++ b/common/djangoapps/static_replace/test/test_static_replace.py @@ -0,0 +1,20 @@ +from nose.tools import assert_equals +from static_replace import replace_static_urls, replace_course_urls + +DATA_DIRECTORY = 'data_dir' +COURSE_ID = 'org/course/run' + + +def test_multi_replace(): + static_source = '"/static/file.png"' + course_source = '"/course/file.png"' + + assert_equals( + replace_static_urls(static_source, DATA_DIRECTORY), + replace_static_urls(replace_static_urls(static_source, DATA_DIRECTORY), DATA_DIRECTORY) + ) + assert_equals( + replace_course_urls(course_source, COURSE_ID), + replace_course_urls(replace_course_urls(course_source, COURSE_ID), COURSE_ID) + ) + assert False From 5eae9c3a40ef147b56f545ef2b47d3078a47e73b Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 4 Feb 2013 13:12:44 -0500 Subject: [PATCH 128/347] Make lms and cms coverage reports cover common/djangoapps --- cms/.coveragerc | 2 +- lms/.coveragerc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cms/.coveragerc b/cms/.coveragerc index 9b1e59d670..b7ae181e99 100644 --- a/cms/.coveragerc +++ b/cms/.coveragerc @@ -1,7 +1,7 @@ # .coveragerc for cms [run] data_file = reports/cms/.coverage -source = cms +source = cms,common/djangoapps omit = cms/envs/*, cms/manage.py [report] diff --git a/lms/.coveragerc b/lms/.coveragerc index 7e18a37492..35aa7a3851 100644 --- a/lms/.coveragerc +++ b/lms/.coveragerc @@ -1,7 +1,7 @@ # .coveragerc for lms [run] data_file = reports/lms/.coverage -source = lms +source = lms,common/djangoapps omit = lms/envs/* [report] From 8592db92bfec46670336a27394b16b87ce843f74 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 4 Feb 2013 13:19:23 -0500 Subject: [PATCH 129/347] Add more tests of static_replace --- common/djangoapps/static_replace/__init__.py | 12 ++---- .../test/test_static_replace.py | 38 ++++++++++++++++++- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/common/djangoapps/static_replace/__init__.py b/common/djangoapps/static_replace/__init__.py index 2932c0357a..7167456ed1 100644 --- a/common/djangoapps/static_replace/__init__.py +++ b/common/djangoapps/static_replace/__init__.py @@ -48,7 +48,6 @@ def replace_course_urls(text, course_id): def replace_course_url(match): - log.warning("Course match: %s", match.groupdict()) quote = match.group('quote') rest = match.group('rest') return "".join([quote, '/courses/' + course_id + '/', rest, quote]) @@ -69,31 +68,26 @@ def replace_static_urls(text, data_directory, course_namespace=None): """ def replace_static_url(match): - log.warning(match.groupdict()) + original = match.group(0) quote = match.group('quote') rest = match.group('rest') # course_namespace is not None, then use studio style urls if course_namespace is not None and not isinstance(modulestore(), XMLModuleStore): url = StaticContent.convert_legacy_static_url(rest, course_namespace) - log.warning("From modulestore: %s", url) # If we're in debug mode, and the file as requested exists, then don't change the links elif (settings.DEBUG and finders.find(rest, True)): - url = match.group('prefix') + rest - log.warning("From finder: %s", url) + return original # Otherwise, look the file up in staticfiles_storage else: path = data_directory + '/' + rest try: url = staticfiles_storage.url(path) - log.warning("From staticfiles_storage: %s", url) # And if that fails, return the path unmodified except Exception as err: log.warning("staticfiles_storage couldn't find path {0}: {1}".format( path, str(err))) - url = path - log.warning("Fallback: %s", url) - log.warning("".join([quote, url, quote])) + return original return "".join([quote, url, quote]) return re.sub( diff --git a/common/djangoapps/static_replace/test/test_static_replace.py b/common/djangoapps/static_replace/test/test_static_replace.py index c451f11ec6..cfc025b964 100644 --- a/common/djangoapps/static_replace/test/test_static_replace.py +++ b/common/djangoapps/static_replace/test/test_static_replace.py @@ -1,8 +1,12 @@ from nose.tools import assert_equals from static_replace import replace_static_urls, replace_course_urls +from mock import patch, Mock +from xmodule.modulestore import Location +from xmodule.modulestore.mongo import MongoModuleStore DATA_DIRECTORY = 'data_dir' COURSE_ID = 'org/course/run' +NAMESPACE = Location('org', 'course', 'run', None, None) def test_multi_replace(): @@ -17,4 +21,36 @@ def test_multi_replace(): replace_course_urls(course_source, COURSE_ID), replace_course_urls(replace_course_urls(course_source, COURSE_ID), COURSE_ID) ) - assert False + + +@patch('static_replace.finders') +@patch('static_replace.settings') +def test_debug_no_modify(mock_settings, mock_finders): + mock_settings.DEBUG = True + mock_finders.find.return_value = True + + static_source = '"/static/file.png"' + assert_equals(static_source, replace_static_urls(static_source, DATA_DIRECTORY)) + + mock_finders.find.assert_called_once_with('file.png', True) + + +@patch('static_replace.StaticContent') +@patch('static_replace.modulestore') +def test_mongo_filestore(mock_modulestore, mock_static_content): + + mock_modulestore.return_value = Mock(MongoModuleStore) + mock_static_content.convert_legacy_static_url.return_value = "c4x://mock_url" + + static_source = '"/static/file.png"' + + # No namespace => no change to path + assert_equals(static_source, replace_static_urls(static_source, DATA_DIRECTORY)) + + # Namespace => content url + assert_equals( + '"' + mock_static_content.convert_legacy_static_url.return_value + '"', + replace_static_urls(static_source, DATA_DIRECTORY, NAMESPACE) + ) + + mock_static_content.convert_legacy_static_url.assert_called_once_with('file.png', NAMESPACE) From ae5d3cbc578afce9e27b1094053c4cd3f16c6713 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 4 Feb 2013 13:46:17 -0500 Subject: [PATCH 130/347] Add admin command to flush the staticfiles cache --- .../static_replace/management/__init__.py | 0 .../static_replace/management/commands/__init__.py | 0 .../commands/clear_collectstatic_cache.py | 13 +++++++++++++ 3 files changed, 13 insertions(+) create mode 100644 common/djangoapps/static_replace/management/__init__.py create mode 100644 common/djangoapps/static_replace/management/commands/__init__.py create mode 100644 common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py diff --git a/common/djangoapps/static_replace/management/__init__.py b/common/djangoapps/static_replace/management/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/common/djangoapps/static_replace/management/commands/__init__.py b/common/djangoapps/static_replace/management/commands/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py b/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py new file mode 100644 index 0000000000..1cea81b0af --- /dev/null +++ b/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py @@ -0,0 +1,13 @@ +### +### Script for importing courseware from XML format +### + +from django.core.management.base import NoArgsCommand + +class Command(NoArgsCommand): + help = \ +'''Import the specified data directory into the default ModuleStore''' + + def handle_noargs(self): + staticfiles_cache = get_cache('staticfiles') + staticfiles_cache.clear() From 2551243dfa1a2a20ad5641e42e44004effecaf4b Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 4 Feb 2013 13:50:12 -0500 Subject: [PATCH 131/347] Install the static_replace app for the management command --- cms/envs/common.py | 1 + lms/envs/common.py | 1 + 2 files changed, 2 insertions(+) diff --git a/cms/envs/common.py b/cms/envs/common.py index f2d47dfdc6..3ea532d70d 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -285,4 +285,5 @@ INSTALLED_APPS = ( # For asset pipelining 'pipeline', 'staticfiles', + 'static_replace', ) diff --git a/lms/envs/common.py b/lms/envs/common.py index 24c757f51b..bf85d1692a 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -548,6 +548,7 @@ INSTALLED_APPS = ( # For asset pipelining 'pipeline', 'staticfiles', + 'static_replace', # Our courseware 'circuit', From 10f8dbfa466b8bdbf579f1a42dcc2c8d936f68c0 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 4 Feb 2013 13:52:52 -0500 Subject: [PATCH 132/347] Handle options passed to clear_collectstatic_cache --- .../management/commands/clear_collectstatic_cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py b/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py index 1cea81b0af..9e8e401991 100644 --- a/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py +++ b/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py @@ -8,6 +8,6 @@ class Command(NoArgsCommand): help = \ '''Import the specified data directory into the default ModuleStore''' - def handle_noargs(self): + def handle_noargs(self, **options): staticfiles_cache = get_cache('staticfiles') staticfiles_cache.clear() From 90107fa88fd40f420a985a74355c646ec1b5bb75 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 4 Feb 2013 13:56:50 -0500 Subject: [PATCH 133/347] Import cache function correctly --- .../management/commands/clear_collectstatic_cache.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py b/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py index 9e8e401991..60b7c58047 100644 --- a/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py +++ b/common/djangoapps/static_replace/management/commands/clear_collectstatic_cache.py @@ -3,6 +3,8 @@ ### from django.core.management.base import NoArgsCommand +from django.core.cache import get_cache + class Command(NoArgsCommand): help = \ From 0350d15e29dc621374839b8869af7695bcd9b398 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 4 Feb 2013 14:20:21 -0500 Subject: [PATCH 134/347] Make static_replace fall back to data_directory prefix, if it doesn't find the file anywhere else --- common/djangoapps/static_replace/__init__.py | 13 +++++----- .../test/test_static_replace.py | 26 ++++++++++++------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/common/djangoapps/static_replace/__init__.py b/common/djangoapps/static_replace/__init__.py index 7167456ed1..cfef798bdf 100644 --- a/common/djangoapps/static_replace/__init__.py +++ b/common/djangoapps/static_replace/__init__.py @@ -69,6 +69,7 @@ def replace_static_urls(text, data_directory, course_namespace=None): def replace_static_url(match): original = match.group(0) + prefix = match.group('prefix') quote = match.group('quote') rest = match.group('rest') @@ -78,16 +79,16 @@ def replace_static_urls(text, data_directory, course_namespace=None): # If we're in debug mode, and the file as requested exists, then don't change the links elif (settings.DEBUG and finders.find(rest, True)): return original - # Otherwise, look the file up in staticfiles_storage + # Otherwise, look the file up in staticfiles_storage without the data directory else: - path = data_directory + '/' + rest try: - url = staticfiles_storage.url(path) - # And if that fails, return the path unmodified + url = staticfiles_storage.url(rest) + # And if that fails, assume that it's course content, and add manually data directory except Exception as err: log.warning("staticfiles_storage couldn't find path {0}: {1}".format( - path, str(err))) - return original + rest, str(err))) + url = "".join([prefix, data_directory, '/', rest]) + return "".join([quote, url, quote]) return re.sub( diff --git a/common/djangoapps/static_replace/test/test_static_replace.py b/common/djangoapps/static_replace/test/test_static_replace.py index cfc025b964..e08c66c59f 100644 --- a/common/djangoapps/static_replace/test/test_static_replace.py +++ b/common/djangoapps/static_replace/test/test_static_replace.py @@ -3,19 +3,20 @@ from static_replace import replace_static_urls, replace_course_urls from mock import patch, Mock from xmodule.modulestore import Location from xmodule.modulestore.mongo import MongoModuleStore +from xmodule.modulestore.xml import XMLModuleStore DATA_DIRECTORY = 'data_dir' COURSE_ID = 'org/course/run' NAMESPACE = Location('org', 'course', 'run', None, None) +STATIC_SOURCE = '"/static/file.png"' def test_multi_replace(): - static_source = '"/static/file.png"' course_source = '"/course/file.png"' assert_equals( - replace_static_urls(static_source, DATA_DIRECTORY), - replace_static_urls(replace_static_urls(static_source, DATA_DIRECTORY), DATA_DIRECTORY) + replace_static_urls(STATIC_SOURCE, DATA_DIRECTORY), + replace_static_urls(replace_static_urls(STATIC_SOURCE, DATA_DIRECTORY), DATA_DIRECTORY) ) assert_equals( replace_course_urls(course_source, COURSE_ID), @@ -29,8 +30,7 @@ def test_debug_no_modify(mock_settings, mock_finders): mock_settings.DEBUG = True mock_finders.find.return_value = True - static_source = '"/static/file.png"' - assert_equals(static_source, replace_static_urls(static_source, DATA_DIRECTORY)) + assert_equals(STATIC_SOURCE, replace_static_urls(STATIC_SOURCE, DATA_DIRECTORY)) mock_finders.find.assert_called_once_with('file.png', True) @@ -42,15 +42,23 @@ def test_mongo_filestore(mock_modulestore, mock_static_content): mock_modulestore.return_value = Mock(MongoModuleStore) mock_static_content.convert_legacy_static_url.return_value = "c4x://mock_url" - static_source = '"/static/file.png"' - # No namespace => no change to path - assert_equals(static_source, replace_static_urls(static_source, DATA_DIRECTORY)) + assert_equals('"/static/data_dir/file.png"', replace_static_urls(STATIC_SOURCE, DATA_DIRECTORY)) # Namespace => content url assert_equals( '"' + mock_static_content.convert_legacy_static_url.return_value + '"', - replace_static_urls(static_source, DATA_DIRECTORY, NAMESPACE) + replace_static_urls(STATIC_SOURCE, DATA_DIRECTORY, NAMESPACE) ) mock_static_content.convert_legacy_static_url.assert_called_once_with('file.png', NAMESPACE) + +@patch('static_replace.settings') +@patch('static_replace.modulestore') +@patch('static_replace.staticfiles_storage') +def test_data_dir_fallback(mock_storage, mock_modulestore, mock_settings): + mock_modulestore.return_value = Mock(XMLModuleStore) + mock_settings.DEBUG = False + mock_storage.url.side_effect = Exception + + assert_equals('"/static/data_dir/file.png"', replace_static_urls(STATIC_SOURCE, DATA_DIRECTORY)) From 4d8165b2b672335f88002a83cfa2be57872fcaaa Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 4 Feb 2013 15:08:30 -0500 Subject: [PATCH 135/347] Remove bad import of replace_urls --- lms/djangoapps/courseware/tabs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lms/djangoapps/courseware/tabs.py b/lms/djangoapps/courseware/tabs.py index 64d488d845..4f5a881d97 100644 --- a/lms/djangoapps/courseware/tabs.py +++ b/lms/djangoapps/courseware/tabs.py @@ -19,7 +19,6 @@ from django.core.urlresolvers import reverse from fs.errors import ResourceNotFoundError from courseware.access import has_access -from static_replace import replace_urls from lxml.html import rewrite_links from module_render import get_module From bff477e8d3e514acf79b76b8b2b454508f343edd Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Tue, 5 Feb 2013 11:35:12 -0500 Subject: [PATCH 136/347] Removing repos.json import --- cms/envs/aws.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 48cfa3cf9a..a147f84531 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -52,10 +52,6 @@ LOGGING = get_logger_config(LOG_DIR, debug=False, service_variant=SERVICE_VARIANT) -with open(ENV_ROOT / "repos.json") as repos_file: - REPOS = json.load(repos_file) - - ################ SECURE AUTH ITEMS ############################### # Secret things: passwords, access keys, etc. with open(ENV_ROOT / CONFIG_PREFIX + "auth.json") as auth_file: From 7984c4dfcbdcae41fe94ea4990b195e526468bcb Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 13:10:56 -0500 Subject: [PATCH 137/347] Move over grading service to xmodule --- .../xmodule/xmodule/grading_service_module.py | 44 ++++++++----------- .../xmodule/xmodule/peer_grading_service.py | 18 +++++--- .../controller_query_service.py | 6 ++- .../staff_grading_service.py | 6 +-- lms/djangoapps/open_ended_grading/views.py | 2 +- 5 files changed, 37 insertions(+), 39 deletions(-) rename lms/djangoapps/open_ended_grading/grading_service.py => common/lib/xmodule/xmodule/grading_service_module.py (78%) diff --git a/lms/djangoapps/open_ended_grading/grading_service.py b/common/lib/xmodule/xmodule/grading_service_module.py similarity index 78% rename from lms/djangoapps/open_ended_grading/grading_service.py rename to common/lib/xmodule/xmodule/grading_service_module.py index 63febb105f..7c18731f53 100644 --- a/lms/djangoapps/open_ended_grading/grading_service.py +++ b/common/lib/xmodule/xmodule/grading_service_module.py @@ -5,16 +5,8 @@ import requests from requests.exceptions import RequestException, ConnectionError, HTTPError import sys -from django.conf import settings -from django.http import HttpResponse, Http404 - -from courseware.access import has_access -from util.json_request import expect_json -from xmodule.course_module import CourseDescriptor from xmodule.combined_open_ended_rubric import CombinedOpenEndedRubric, RubricParsingError from lxml import etree -from mitxmako.shortcuts import render_to_string -from xmodule.x_module import ModuleSystem log = logging.getLogger(__name__) @@ -31,7 +23,7 @@ class GradingService(object): self.url = config['url'] self.login_url = self.url + '/login/' self.session = requests.session() - self.system = ModuleSystem(None, None, None, render_to_string, None) + self.system = config['system'] def _login(self): """ @@ -42,20 +34,20 @@ class GradingService(object): Returns the decoded json dict of the response. """ response = self.session.post(self.login_url, - {'username': self.username, - 'password': self.password,}) + {'username': self.username, + 'password': self.password,}) response.raise_for_status() return response.json - def post(self, url, data, allow_redirects=False): + def post(self, url, data, allow_redirects=False): """ Make a post request to the grading controller """ try: op = lambda: self.session.post(url, data=data, - allow_redirects=allow_redirects) + allow_redirects=allow_redirects) r = self._try_with_login(op) except (RequestException, ConnectionError, HTTPError) as err: # reraise as promised GradingServiceError, but preserve stacktrace. @@ -69,8 +61,8 @@ class GradingService(object): """ log.debug(params) op = lambda: self.session.get(url, - allow_redirects=allow_redirects, - params=params) + allow_redirects=allow_redirects, + params=params) try: r = self._try_with_login(op) except (RequestException, ConnectionError, HTTPError) as err: @@ -78,7 +70,7 @@ class GradingService(object): raise GradingServiceError, str(err), sys.exc_info()[2] return r.text - + def _try_with_login(self, operation): """ @@ -96,8 +88,8 @@ class GradingService(object): r = self._login() if r and not r.get('success'): log.warning("Couldn't log into staff_grading backend. Response: %s", - r) - # try again + r) + # try again response = operation() response.raise_for_status() @@ -113,23 +105,23 @@ class GradingService(object): """ try: response_json = json.loads(response) + except: + response_json = response + + try: if 'rubric' in response_json: rubric = response_json['rubric'] rubric_renderer = CombinedOpenEndedRubric(self.system, False) success, rubric_html = rubric_renderer.render_rubric(rubric) response_json['rubric'] = rubric_html return response_json - # if we can't parse the rubric into HTML, + # if we can't parse the rubric into HTML, except etree.XMLSyntaxError, RubricParsingError: log.exception("Cannot parse rubric string. Raw string: {0}" - .format(rubric)) + .format(rubric)) return {'success': False, - 'error': 'Error displaying submission'} + 'error': 'Error displaying submission'} except ValueError: log.exception("Error parsing response: {0}".format(response)) return {'success': False, - 'error': "Error displaying submission"} - - - - + 'error': "Error displaying submission"} \ No newline at end of file diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index 2f01abdd44..3d956bdd97 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -12,22 +12,20 @@ from django.conf import settings from combined_open_ended_rubric import CombinedOpenEndedRubric, RubricParsingError from lxml import etree +from grading_service_module import GradingService, GradingServiceError log=logging.getLogger(__name__) class GradingServiceError(Exception): pass -class PeerGradingService(): +class PeerGradingService(GradingService): """ Interface with the grading controller for peer grading """ def __init__(self, config, system): - self.username = config['username'] - self.password = config['password'] - self.url = config['url'] - self.login_url = self.url + '/login/' - self.session = requests.session() + config['system'] = system + super(StaffGradingService, self).__init__(config) self.get_next_submission_url = self.url + '/get_next_submission/' self.save_grade_url = self.url + '/save_grade/' self.is_student_calibrated_url = self.url + '/is_student_calibrated/' @@ -107,6 +105,14 @@ class PeerGradingService(): return response.json + def try_to_decode(self, text): + try: + text= json.loads(text) + except: + pass + + return text + def post(self, url, data, allow_redirects=False): """ Make a post request to the grading controller diff --git a/lms/djangoapps/open_ended_grading/controller_query_service.py b/lms/djangoapps/open_ended_grading/controller_query_service.py index d40c9b4428..5d2c40b6ce 100644 --- a/lms/djangoapps/open_ended_grading/controller_query_service.py +++ b/lms/djangoapps/open_ended_grading/controller_query_service.py @@ -3,11 +3,12 @@ import logging import requests from requests.exceptions import RequestException, ConnectionError, HTTPError import sys -from grading_service import GradingService -from grading_service import GradingServiceError +from xmodule.grading_service_module import GradingService, GradingServiceError from django.conf import settings from django.http import HttpResponse, Http404 +from xmodule.x_module import ModuleSystem +from mitxmako.shortcuts import render_to_string log = logging.getLogger(__name__) @@ -16,6 +17,7 @@ class ControllerQueryService(GradingService): Interface to staff grading backend. """ def __init__(self, config): + config['system'] = ModuleSystem(None,None,None,render_to_string,None) super(ControllerQueryService, self).__init__(config) self.check_eta_url = self.url + '/get_submission_eta/' self.is_unique_url = self.url + '/is_name_unique/' diff --git a/lms/djangoapps/open_ended_grading/staff_grading_service.py b/lms/djangoapps/open_ended_grading/staff_grading_service.py index 4e776b688b..d8bee99ac7 100644 --- a/lms/djangoapps/open_ended_grading/staff_grading_service.py +++ b/lms/djangoapps/open_ended_grading/staff_grading_service.py @@ -7,8 +7,7 @@ import logging import requests from requests.exceptions import RequestException, ConnectionError, HTTPError import sys -from grading_service import GradingService -from grading_service import GradingServiceError +from xmodule.grading_service_module import GradingService, GradingServiceError from django.conf import settings from django.http import HttpResponse, Http404 @@ -22,8 +21,6 @@ from mitxmako.shortcuts import render_to_string log = logging.getLogger(__name__) - - class MockStaffGradingService(object): """ A simple mockup of a staff grading service, testing. @@ -64,6 +61,7 @@ class StaffGradingService(GradingService): Interface to staff grading backend. """ def __init__(self, config): + config['system'] = ModuleSystem(None,None,None,render_to_string,None) super(StaffGradingService, self).__init__(config) self.get_next_url = self.url + '/get_next_submission/' self.save_grade_url = self.url + '/save_grade/' diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index a40645cca3..d6fd88211f 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -13,7 +13,7 @@ from student.models import unique_id_for_user from courseware.courses import get_course_with_access from controller_query_service import ControllerQueryService -from grading_service import GradingServiceError +from xmodule.grading_service_module import GradingServiceError import json from .staff_grading import StaffGrading from student.models import unique_id_for_user From 34dc6e63208ace519e2c5dc17c60e7c3fe00ad20 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 13:37:55 -0500 Subject: [PATCH 138/347] Fix some issues with peer grading service --- .../xmodule/xmodule/peer_grading_service.py | 2 +- common/test/data/toy/peergrading/init.xml | 1 + lms/djangoapps/open_ended_grading/tests.py | 3 +- lms/djangoapps/open_ended_grading/views.py | 61 ++++++++++--------- 4 files changed, 36 insertions(+), 31 deletions(-) create mode 100644 common/test/data/toy/peergrading/init.xml diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index 3d956bdd97..542a8fc861 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -25,7 +25,7 @@ class PeerGradingService(GradingService): """ def __init__(self, config, system): config['system'] = system - super(StaffGradingService, self).__init__(config) + super(PeerGradingService, self).__init__(config) self.get_next_submission_url = self.url + '/get_next_submission/' self.save_grade_url = self.url + '/save_grade/' self.is_student_calibrated_url = self.url + '/is_student_calibrated/' diff --git a/common/test/data/toy/peergrading/init.xml b/common/test/data/toy/peergrading/init.xml new file mode 100644 index 0000000000..2fe3a8fd85 --- /dev/null +++ b/common/test/data/toy/peergrading/init.xml @@ -0,0 +1 @@ + diff --git a/lms/djangoapps/open_ended_grading/tests.py b/lms/djangoapps/open_ended_grading/tests.py index 0831ace7d4..5eea3e39a0 100644 --- a/lms/djangoapps/open_ended_grading/tests.py +++ b/lms/djangoapps/open_ended_grading/tests.py @@ -142,7 +142,8 @@ class TestPeerGradingService(ct.PageLoader): self.mock_service = peer_grading_service.MockPeerGradingService() self.system = ModuleSystem(None, None, None, render_to_string, None) self.descriptor = peer_grading_module.PeerGradingDescriptor() - self.peer_module = peer_grading_module.PeerGradingModule(self.system,"","",self.descriptor) + location = "i4x://edX/toy/peergrading/init" + self.peer_module = peer_grading_module.PeerGradingModule(self.system,location,"",self.descriptor) self.peer_module.peer_gs = self.mock_service self.logout() diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index d6fd88211f..3ab7cc30af 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -118,28 +118,29 @@ def student_problem_list(request, course_id): problem_list = [] base_course_url = reverse('courses') - try: - problem_list_json = controller_qs.get_grading_status_list(course_id, unique_id_for_user(request.user)) - problem_list_dict = json.loads(problem_list_json) - success = problem_list_dict['success'] - if 'error' in problem_list_dict: - error_text = problem_list_dict['error'] - problem_list = [] - else: - problem_list = problem_list_dict['problem_list'] + #try: + problem_list_json = controller_qs.get_grading_status_list(course_id, unique_id_for_user(request.user)) + problem_list_dict = json.loads(problem_list_json) + success = problem_list_dict['success'] + if 'error' in problem_list_dict: + error_text = problem_list_dict['error'] + problem_list = [] + else: + problem_list = problem_list_dict['problem_list'] - for i in xrange(0,len(problem_list)): - problem_url_parts = search.path_to_location(modulestore(), course.id, problem_list[i]['location']) - problem_url = base_course_url + "/" - for z in xrange(0,len(problem_url_parts)): - part = problem_url_parts[z] - if part is not None: - if z==1: - problem_url += "courseware/" - problem_url += part + "/" + for i in xrange(0,len(problem_list)): + problem_url_parts = search.path_to_location(modulestore(), course.id, problem_list[i]['location']) + problem_url = base_course_url + "/" + for z in xrange(0,len(problem_url_parts)): + part = problem_url_parts[z] + if part is not None: + if z==1: + problem_url += "courseware/" + problem_url += part + "/" - problem_list[i].update({'actual_url' : problem_url}) + problem_list[i].update({'actual_url' : problem_url}) + """ except GradingServiceError: error_text = "Error occured while contacting the grading service" success = False @@ -147,6 +148,7 @@ def student_problem_list(request, course_id): except ValueError: error_text = "Could not get problem list" success = False + """ ajax_url = _reverse_with_slash('open_ended_problems', course_id) @@ -193,16 +195,17 @@ def flagged_problem_list(request, course_id): success = False ajax_url = _reverse_with_slash('open_ended_flagged_problems', course_id) - - return render_to_response('open_ended_problems/open_ended_flagged_problems.html', { - 'course': course, - 'course_id': course_id, - 'ajax_url': ajax_url, - 'success': success, - 'problem_list': problem_list, - 'error_text': error_text, - # Checked above - 'staff_access': True, }) + context = { + 'course': course, + 'course_id': course_id, + 'ajax_url': ajax_url, + 'success': success, + 'problem_list': problem_list, + 'error_text': error_text, + # Checked above + 'staff_access': True, + } + return render_to_response('open_ended_problems/open_ended_flagged_problems.html', context) @cache_control(no_cache=True, no_store=True, must_revalidate=True) def combined_notifications(request, course_id): From e13de7543f54fd95b19eabe14fd644f56cdced95 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 14:12:11 -0500 Subject: [PATCH 139/347] Test fixes, err response fixes, address review comments --- .../xmodule/xmodule/peer_grading_module.py | 10 ++--- lms/djangoapps/open_ended_grading/tests.py | 39 +++++++++---------- lms/djangoapps/open_ended_grading/views.py | 33 +++++++++------- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index b7545bdf27..5bb6c8f879 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -217,7 +217,7 @@ class PeerGradingModule(XModule): required = set(['location']) success, message = self._check_required(get, required) if not success: - return _err_response(message) + return self._err_response(message) grader_id = self.system.anonymous_student_id location = get['location'] @@ -296,7 +296,7 @@ class PeerGradingModule(XModule): required = set(['location']) success, message = self._check_required(get, required) if not success: - return _err_response(message) + return self._err_response(message) grader_id = self.system.anonymous_student_id location = get['location'] @@ -339,7 +339,7 @@ class PeerGradingModule(XModule): required = set(['location']) success, message = self._check_required(get, required) if not success: - return _err_response(message) + return self._err_response(message) grader_id = self.system.anonymous_student_id @@ -381,7 +381,7 @@ class PeerGradingModule(XModule): required = set(['location', 'submission_id', 'submission_key', 'score', 'feedback', 'rubric_scores[]']) success, message = self._check_required(get, required) if not success: - return _err_response(message) + return self._err_response(message) grader_id = self.system.anonymous_student_id location = get['location'] @@ -397,7 +397,7 @@ class PeerGradingModule(XModule): return response except GradingServiceError: log.exception("Error saving calibration grade, location: {0}, submission_id: {1}, submission_key: {2}, grader_id: {3}".format(location, submission_id, submission_key, grader_id)) - return _err_response('Could not connect to grading service') + return self._err_response('Could not connect to grading service') def peer_grading(self, get = None): ''' diff --git a/lms/djangoapps/open_ended_grading/tests.py b/lms/djangoapps/open_ended_grading/tests.py index 5eea3e39a0..023f37562f 100644 --- a/lms/djangoapps/open_ended_grading/tests.py +++ b/lms/djangoapps/open_ended_grading/tests.py @@ -23,6 +23,7 @@ from mitxmako.shortcuts import render_to_string import logging log = logging.getLogger(__name__) from override_settings import override_settings +from django.http import QueryDict @override_settings(MODULESTORE=ct.TEST_DATA_XML_MODULESTORE) @@ -100,6 +101,7 @@ class TestStaffGradingService(ct.PageLoader): 'submission_id': '123', 'location': self.location, 'rubric_scores[]': ['1', '2']} + r = self.check_for_post_code(200, url, data) d = json.loads(r.content) self.assertTrue(d['success'], str(d)) @@ -138,11 +140,12 @@ class TestPeerGradingService(ct.PageLoader): self.course_id = "edX/toy/2012_Fall" self.toy = modulestore().get_course(self.course_id) + location = "i4x://edX/toy/peergrading/init" self.mock_service = peer_grading_service.MockPeerGradingService() - self.system = ModuleSystem(None, None, None, render_to_string, None) - self.descriptor = peer_grading_module.PeerGradingDescriptor() - location = "i4x://edX/toy/peergrading/init" + self.system = ModuleSystem(location, None, None, render_to_string, None) + self.descriptor = peer_grading_module.PeerGradingDescriptor(self.system) + self.peer_module = peer_grading_module.PeerGradingModule(self.system,location,"",self.descriptor) self.peer_module.peer_gs = self.mock_service self.logout() @@ -153,7 +156,7 @@ class TestPeerGradingService(ct.PageLoader): data = {'location': self.location} r = self.peer_module.get_next_submission(data) - d = json.loads(r.content) + d = json.loads(r) self.assertTrue(d['success']) self.assertIsNotNone(d['submission_id']) self.assertIsNotNone(d['prompt']) @@ -163,41 +166,35 @@ class TestPeerGradingService(ct.PageLoader): def test_get_next_submission_missing_location(self): data = {} r = self.peer_module.get_next_submission(data) - d = json.loads(r.content) + d = json.loads(r) self.assertFalse(d['success']) self.assertEqual(d['error'], "Missing required keys: location") def test_save_grade_success(self): - - data = {'location': self.location, - 'submission_id': '1', - 'submission_key': 'fake key', - 'score': '2', - 'feedback': 'This is feedback', - 'rubric_scores[]': [1, 2], - 'submission_flagged' : False} - r = self.peer_module.save_grade(data) + data = 'rubric_scores[]=1|rubric_scores[]=2|location=' + location + '|submission_id=1|submission_key=fake key|score=2|feedback=feedback|submission_flagged=False' + qdict = QueryDict(data.replace("|","&")) + r = self.peer_module.save_grade(qdict) d = json.loads(r.content) self.assertTrue(d['success']) def test_save_grade_missing_keys(self): data = {} r = self.peer_module.save_grade(data) - d = json.loads(r.content) + d = json.loads(r) self.assertFalse(d['success']) self.assertTrue(d['error'].find('Missing required keys:') > -1) def test_is_calibrated_success(self): data = {'location': self.location} r = self.peer_module.is_student_calibrated(data) - d = json.loads(r.content) + d = json.loads(r) self.assertTrue(d['success']) self.assertTrue('calibrated' in d) def test_is_calibrated_failure(self): data = {} r = self.peer_module.is_student_calibrated(data) - d = json.loads(r.content) + d = json.loads(r) self.assertFalse(d['success']) self.assertFalse('calibrated' in d) @@ -205,7 +202,7 @@ class TestPeerGradingService(ct.PageLoader): data = {'location': self.location} r = self.peer_module.show_calibration_essay(data) - d = json.loads(r.content) + d = json.loads(r) self.assertTrue(d['success']) self.assertIsNotNone(d['submission_id']) self.assertIsNotNone(d['prompt']) @@ -216,7 +213,7 @@ class TestPeerGradingService(ct.PageLoader): data = {} r = self.peer_module.show_calibration_essay(data) - d = json.loads(r.content) + d = json.loads(r) self.assertFalse(d['success']) self.assertEqual(d['error'], "Missing required keys: location") @@ -229,14 +226,14 @@ class TestPeerGradingService(ct.PageLoader): 'feedback': 'This is feedback', 'rubric_scores[]': [1, 2]} r = self.peer_module.save_calibration_essay(data) - d = json.loads(r.content) + d = json.loads(r) self.assertTrue(d['success']) self.assertTrue('actual_score' in d) def test_save_calibration_essay_missing_keys(self): data = {} r = self.peer_module.save_calibration_essay(data) - d = json.loads(r.content) + d = json.loads(r) self.assertFalse(d['success']) self.assertTrue(d['error'].find('Missing required keys:') > -1) self.assertFalse('actual_score' in d) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 3ab7cc30af..374eaec375 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -90,13 +90,7 @@ def peer_grading(request, course_id): base_course_url = reverse('courses') try: problem_url_parts = search.path_to_location(modulestore(), course.id, pg_location) - problem_url = base_course_url + "/" - for z in xrange(0,len(problem_url_parts)): - part = problem_url_parts[z] - if part is not None: - if z==1: - problem_url += "courseware/" - problem_url += part + "/" + problem_url = generate_problem_url(problem_url_parts, base_course_url) return HttpResponseRedirect(problem_url) except: @@ -104,6 +98,22 @@ def peer_grading(request, course_id): log.error(error_message + "Current course is: {0}".format(course_id)) return HttpResponse(error_message) +def generate_problem_url(problem_url_parts, base_course_url): + """ + From a list of problem url parts generated by search.path_to_location and a base course url, generates a url to a problem + @param problem_url_parts: Output of search.path_to_location + @param base_course_url: Base url of a given course + @return: A path to the problem + """ + problem_url = base_course_url + "/" + for z in xrange(0,len(problem_url_parts)): + part = problem_url_parts[z] + if part is not None: + if z==1: + problem_url += "courseware/" + problem_url += part + "/" + + @cache_control(no_cache=True, no_store=True, must_revalidate=True) def student_problem_list(request, course_id): ''' @@ -130,14 +140,7 @@ def student_problem_list(request, course_id): for i in xrange(0,len(problem_list)): problem_url_parts = search.path_to_location(modulestore(), course.id, problem_list[i]['location']) - problem_url = base_course_url + "/" - for z in xrange(0,len(problem_url_parts)): - part = problem_url_parts[z] - if part is not None: - if z==1: - problem_url += "courseware/" - problem_url += part + "/" - + problem_url = generate_problem_url(problem_url_parts, base_course_url) problem_list[i].update({'actual_url' : problem_url}) """ From 134f2f7af7fea76a8f70e8cf4f19a456f209bd3e Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 14:21:08 -0500 Subject: [PATCH 140/347] Fix tests, bugfix for problem url error --- lms/djangoapps/open_ended_grading/tests.py | 20 ++++++++++---------- lms/djangoapps/open_ended_grading/views.py | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/lms/djangoapps/open_ended_grading/tests.py b/lms/djangoapps/open_ended_grading/tests.py index 023f37562f..2714c8aa3a 100644 --- a/lms/djangoapps/open_ended_grading/tests.py +++ b/lms/djangoapps/open_ended_grading/tests.py @@ -156,7 +156,7 @@ class TestPeerGradingService(ct.PageLoader): data = {'location': self.location} r = self.peer_module.get_next_submission(data) - d = json.loads(r) + d = r self.assertTrue(d['success']) self.assertIsNotNone(d['submission_id']) self.assertIsNotNone(d['prompt']) @@ -166,7 +166,7 @@ class TestPeerGradingService(ct.PageLoader): def test_get_next_submission_missing_location(self): data = {} r = self.peer_module.get_next_submission(data) - d = json.loads(r) + d = r self.assertFalse(d['success']) self.assertEqual(d['error'], "Missing required keys: location") @@ -174,27 +174,27 @@ class TestPeerGradingService(ct.PageLoader): data = 'rubric_scores[]=1|rubric_scores[]=2|location=' + location + '|submission_id=1|submission_key=fake key|score=2|feedback=feedback|submission_flagged=False' qdict = QueryDict(data.replace("|","&")) r = self.peer_module.save_grade(qdict) - d = json.loads(r.content) + d = r self.assertTrue(d['success']) def test_save_grade_missing_keys(self): data = {} r = self.peer_module.save_grade(data) - d = json.loads(r) + d = r self.assertFalse(d['success']) self.assertTrue(d['error'].find('Missing required keys:') > -1) def test_is_calibrated_success(self): data = {'location': self.location} r = self.peer_module.is_student_calibrated(data) - d = json.loads(r) + d = r self.assertTrue(d['success']) self.assertTrue('calibrated' in d) def test_is_calibrated_failure(self): data = {} r = self.peer_module.is_student_calibrated(data) - d = json.loads(r) + d = r self.assertFalse(d['success']) self.assertFalse('calibrated' in d) @@ -202,7 +202,7 @@ class TestPeerGradingService(ct.PageLoader): data = {'location': self.location} r = self.peer_module.show_calibration_essay(data) - d = json.loads(r) + d = r self.assertTrue(d['success']) self.assertIsNotNone(d['submission_id']) self.assertIsNotNone(d['prompt']) @@ -213,7 +213,7 @@ class TestPeerGradingService(ct.PageLoader): data = {} r = self.peer_module.show_calibration_essay(data) - d = json.loads(r) + d = r self.assertFalse(d['success']) self.assertEqual(d['error'], "Missing required keys: location") @@ -226,14 +226,14 @@ class TestPeerGradingService(ct.PageLoader): 'feedback': 'This is feedback', 'rubric_scores[]': [1, 2]} r = self.peer_module.save_calibration_essay(data) - d = json.loads(r) + d = r self.assertTrue(d['success']) self.assertTrue('actual_score' in d) def test_save_calibration_essay_missing_keys(self): data = {} r = self.peer_module.save_calibration_essay(data) - d = json.loads(r) + d = r self.assertFalse(d['success']) self.assertTrue(d['error'].find('Missing required keys:') > -1) self.assertFalse('actual_score' in d) diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index 374eaec375..af7f930207 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -95,7 +95,7 @@ def peer_grading(request, course_id): return HttpResponseRedirect(problem_url) except: error_message = "Error with initializing peer grading. Centralized module does not exist. Please contact course staff." - log.error(error_message + "Current course is: {0}".format(course_id)) + log.exception(error_message + "Current course is: {0}".format(course_id)) return HttpResponse(error_message) def generate_problem_url(problem_url_parts, base_course_url): @@ -112,6 +112,7 @@ def generate_problem_url(problem_url_parts, base_course_url): if z==1: problem_url += "courseware/" problem_url += part + "/" + return problem_url @cache_control(no_cache=True, no_store=True, must_revalidate=True) From 8027cc70244f10cdfe5ea485527268b1a4e16dbc Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 14:35:44 -0500 Subject: [PATCH 141/347] Fix some issues with tests --- .../xmodule/xmodule/peer_grading_module.py | 12 ++-- .../xmodule/xmodule/peer_grading_service.py | 57 +++---------------- lms/djangoapps/open_ended_grading/tests.py | 14 ++--- 3 files changed, 20 insertions(+), 63 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index 5bb6c8f879..e853160f4a 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -384,12 +384,12 @@ class PeerGradingModule(XModule): return self._err_response(message) grader_id = self.system.anonymous_student_id - location = get['location'] - calibration_essay_id = get['submission_id'] - submission_key = get['submission_key'] - score = get['score'] - feedback = get['feedback'] - rubric_scores = get['rubric_scores[]'] + location = get.get('location') + calibration_essay_id = get.get('submission_id') + submission_key = get.get('submission_key') + score = get.get('score') + feedback = get.get('feedback') + rubric_scores = get.getlist('rubric_scores[]') try: response = self.peer_gs.save_calibration_essay(location, grader_id, calibration_essay_id, diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index 542a8fc861..a6876bf86b 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -39,12 +39,12 @@ class PeerGradingService(GradingService): def get_data_for_location(self, problem_location, student_id): response = self.get(self.get_data_for_location_url, {'location': problem_location, 'student_id': student_id}) - return response + return self.try_to_decode(response) def get_next_submission(self, problem_location, grader_id): response = self.get(self.get_next_submission_url, {'location': problem_location, 'grader_id': grader_id}) - return self._render_rubric(response) + return self.try_to_decode(self._render_rubric(response)) def save_grade(self, location, grader_id, submission_id, score, feedback, submission_key, rubric_scores, submission_flagged): data = {'grader_id' : grader_id, @@ -56,16 +56,16 @@ class PeerGradingService(GradingService): 'rubric_scores': rubric_scores, 'rubric_scores_complete': True, 'submission_flagged' : submission_flagged} - return self.post(self.save_grade_url, data) + return self.try_to_decode(self.post(self.save_grade_url, data)) def is_student_calibrated(self, problem_location, grader_id): params = {'problem_id' : problem_location, 'student_id': grader_id} - return self.get(self.is_student_calibrated_url, params) + return self.try_to_decode(self.get(self.is_student_calibrated_url, params)) def show_calibration_essay(self, problem_location, grader_id): params = {'problem_id' : problem_location, 'student_id': grader_id} response = self.get(self.show_calibration_essay_url, params) - return self._render_rubric(response) + return self.try_to_decode(self._render_rubric(response)) def save_calibration_essay(self, problem_location, grader_id, calibration_essay_id, submission_key, score, feedback, rubric_scores): @@ -77,17 +77,17 @@ class PeerGradingService(GradingService): 'feedback': feedback, 'rubric_scores[]': rubric_scores, 'rubric_scores_complete': True} - return self.post(self.save_calibration_essay_url, data) + return self.try_to_decode(self.post(self.save_calibration_essay_url, data)) def get_problem_list(self, course_id, grader_id): params = {'course_id': course_id, 'student_id': grader_id} response = self.get(self.get_problem_list_url, params) - return response + return self.try_to_decode(response) def get_notifications(self, course_id, grader_id): params = {'course_id': course_id, 'student_id': grader_id} response = self.get(self.get_notifications_url, params) - return response + return self.try_to_decode(response) def _login(self): """ @@ -113,47 +113,6 @@ class PeerGradingService(GradingService): return text - def post(self, url, data, allow_redirects=False): - """ - Make a post request to the grading controller - """ - try: - op = lambda: self.session.post(url, data=data, - allow_redirects=allow_redirects) - r = self._try_with_login(op) - except (RequestException, ConnectionError, HTTPError) as err: - # reraise as promised GradingServiceError, but preserve stacktrace. - raise GradingServiceError, str(err), sys.exc_info()[2] - - text = r.text - try: - text= json.loads(text) - except: - pass - - return text - - def get(self, url, params, allow_redirects=False): - """ - Make a get request to the grading controller - """ - op = lambda: self.session.get(url, - allow_redirects=allow_redirects, - params=params) - try: - r = self._try_with_login(op) - except (RequestException, ConnectionError, HTTPError) as err: - # reraise as promised GradingServiceError, but preserve stacktrace. - raise GradingServiceError, str(err), sys.exc_info()[2] - - text = r.text - try: - text= json.loads(text) - except: - pass - - return text - def _try_with_login(self, operation): """ diff --git a/lms/djangoapps/open_ended_grading/tests.py b/lms/djangoapps/open_ended_grading/tests.py index 2714c8aa3a..f88b10220f 100644 --- a/lms/djangoapps/open_ended_grading/tests.py +++ b/lms/djangoapps/open_ended_grading/tests.py @@ -171,7 +171,7 @@ class TestPeerGradingService(ct.PageLoader): self.assertEqual(d['error'], "Missing required keys: location") def test_save_grade_success(self): - data = 'rubric_scores[]=1|rubric_scores[]=2|location=' + location + '|submission_id=1|submission_key=fake key|score=2|feedback=feedback|submission_flagged=False' + data = 'rubric_scores[]=1|rubric_scores[]=2|location=' + self.location + '|submission_id=1|submission_key=fake key|score=2|feedback=feedback|submission_flagged=False' qdict = QueryDict(data.replace("|","&")) r = self.peer_module.save_grade(qdict) d = r @@ -203,6 +203,8 @@ class TestPeerGradingService(ct.PageLoader): r = self.peer_module.show_calibration_essay(data) d = r + log.debug(d) + log.debug(type(d)) self.assertTrue(d['success']) self.assertIsNotNone(d['submission_id']) self.assertIsNotNone(d['prompt']) @@ -219,13 +221,9 @@ class TestPeerGradingService(ct.PageLoader): self.assertEqual(d['error'], "Missing required keys: location") def test_save_calibration_essay_success(self): - data = {'location': self.location, - 'submission_id': '1', - 'submission_key': 'fake key', - 'score': '2', - 'feedback': 'This is feedback', - 'rubric_scores[]': [1, 2]} - r = self.peer_module.save_calibration_essay(data) + data = 'rubric_scores[]=1|rubric_scores[]=2|location=' + self.location + '|submission_id=1|submission_key=fake key|score=2|feedback=feedback|submission_flagged=False' + qdict = QueryDict(data.replace("|","&")) + r = self.peer_module.save_calibration_essay(qdict) d = r self.assertTrue(d['success']) self.assertTrue('actual_score' in d) From cae65706fdc02628b59d24419b88c73828e780f0 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 14:37:08 -0500 Subject: [PATCH 142/347] Pare down on peer grading service --- .../xmodule/xmodule/peer_grading_service.py | 71 ------------------- 1 file changed, 71 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index a6876bf86b..27cf8ddcc8 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -89,22 +89,6 @@ class PeerGradingService(GradingService): response = self.get(self.get_notifications_url, params) return self.try_to_decode(response) - def _login(self): - """ - Log into the staff grading service. - - Raises requests.exceptions.HTTPError if something goes wrong. - - Returns the decoded json dict of the response. - """ - response = self.session.post(self.login_url, - {'username': self.username, - 'password': self.password,}) - - response.raise_for_status() - - return response.json - def try_to_decode(self, text): try: text= json.loads(text) @@ -113,61 +97,6 @@ class PeerGradingService(GradingService): return text - - def _try_with_login(self, operation): - """ - Call operation(), which should return a requests response object. If - the request fails with a 'login_required' error, call _login() and try - the operation again. - - Returns the result of operation(). Does not catch exceptions. - """ - response = operation() - if (response.json - and response.json.get('success') == False - and response.json.get('error') == 'login_required'): - # apparrently we aren't logged in. Try to fix that. - r = self._login() - if r and not r.get('success'): - log.warning("Couldn't log into peer grading backend. Response: %s", - r) - # try again - response = operation() - response.raise_for_status() - - return response - - def _render_rubric(self, response, view_only=False): - """ - Given an HTTP Response with the key 'rubric', render out the html - required to display the rubric and put it back into the response - - returns the updated response as a dictionary that can be serialized later - - """ - try: - response_json = json.loads(response) - except: - response_json = response - - try: - if 'rubric' in response_json: - rubric = response_json['rubric'] - rubric_renderer = CombinedOpenEndedRubric(self.system, False) - success, rubric_html = rubric_renderer.render_rubric(rubric) - response_json['rubric'] = rubric_html - return response_json - # if we can't parse the rubric into HTML, - except etree.XMLSyntaxError, RubricParsingError: - log.exception("Cannot parse rubric string. Raw string: {0}" - .format(rubric)) - return {'success': False, - 'error': 'Error displaying submission'} - except ValueError: - log.exception("Error parsing response: {0}".format(response)) - return {'success': False, - 'error': "Error displaying submission"} - """ This is a mock peer grading service that can be used for unit tests without making actual service calls to the grading controller From ce87e6f221c08ce611160640dc267cd1667ca362 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 14:57:59 -0500 Subject: [PATCH 143/347] Skip two tests --- common/lib/xmodule/xmodule/peer_grading_service.py | 3 +-- lms/djangoapps/open_ended_grading/tests.py | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index 27cf8ddcc8..6b30f4e043 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -91,10 +91,9 @@ class PeerGradingService(GradingService): def try_to_decode(self, text): try: - text= json.loads(text) + text = json.loads(text) except: pass - return text """ diff --git a/lms/djangoapps/open_ended_grading/tests.py b/lms/djangoapps/open_ended_grading/tests.py index f88b10220f..3ee8352c5c 100644 --- a/lms/djangoapps/open_ended_grading/tests.py +++ b/lms/djangoapps/open_ended_grading/tests.py @@ -151,12 +151,10 @@ class TestPeerGradingService(ct.PageLoader): self.logout() def test_get_next_submission_success(self): - self.login(self.student, self.password) - data = {'location': self.location} r = self.peer_module.get_next_submission(data) - d = r + d = json.loads(r) self.assertTrue(d['success']) self.assertIsNotNone(d['submission_id']) self.assertIsNotNone(d['prompt']) @@ -171,6 +169,7 @@ class TestPeerGradingService(ct.PageLoader): self.assertEqual(d['error'], "Missing required keys: location") def test_save_grade_success(self): + raise SkipTest() data = 'rubric_scores[]=1|rubric_scores[]=2|location=' + self.location + '|submission_id=1|submission_key=fake key|score=2|feedback=feedback|submission_flagged=False' qdict = QueryDict(data.replace("|","&")) r = self.peer_module.save_grade(qdict) @@ -187,7 +186,7 @@ class TestPeerGradingService(ct.PageLoader): def test_is_calibrated_success(self): data = {'location': self.location} r = self.peer_module.is_student_calibrated(data) - d = r + d = json.loads(r) self.assertTrue(d['success']) self.assertTrue('calibrated' in d) @@ -202,7 +201,7 @@ class TestPeerGradingService(ct.PageLoader): data = {'location': self.location} r = self.peer_module.show_calibration_essay(data) - d = r + d = json.loads(r) log.debug(d) log.debug(type(d)) self.assertTrue(d['success']) @@ -221,6 +220,7 @@ class TestPeerGradingService(ct.PageLoader): self.assertEqual(d['error'], "Missing required keys: location") def test_save_calibration_essay_success(self): + raise SkipTest() data = 'rubric_scores[]=1|rubric_scores[]=2|location=' + self.location + '|submission_id=1|submission_key=fake key|score=2|feedback=feedback|submission_flagged=False' qdict = QueryDict(data.replace("|","&")) r = self.peer_module.save_calibration_essay(qdict) From d713b288b5bb360024567d48447529353f8b1318 Mon Sep 17 00:00:00 2001 From: Brian Talbot Date: Tue, 5 Feb 2013 15:21:41 -0500 Subject: [PATCH 144/347] studio - resolved HTML display issue where bold and blockquote elements didn't match LMSs style --- common/lib/xmodule/xmodule/css/html/display.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/css/html/display.scss b/common/lib/xmodule/xmodule/css/html/display.scss index c031ecb141..956923c6d0 100644 --- a/common/lib/xmodule/xmodule/css/html/display.scss +++ b/common/lib/xmodule/xmodule/css/html/display.scss @@ -52,13 +52,17 @@ em, i { } strong, b { - font-style: bold; + font-weight: bold; } p + p, ul + p, ol + p { margin-top: 20px; } +blockquote { + margin: 1em 40px; +} + ol, ul { margin: 1em 0; padding: 0 0 0 1em; From 37900c3f7642c93ab2cf8b94427592c43a7adb4c Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Tue, 5 Feb 2013 15:37:20 -0500 Subject: [PATCH 145/347] Add more error logging for date parsing and make the closure checking more robust --- .../xmodule/combined_open_ended_module.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index 4c3e8da8c6..d85b0f6e17 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -168,14 +168,22 @@ class CombinedOpenEndedModule(XModule): display_due_date_string = self.metadata.get('due', None) if display_due_date_string is not None: - self.display_due_date = dateutil.parser.parse(display_due_date_string) + try: + self.display_due_date = dateutil.parser.parse(display_due_date_string) + except ValueError: + log.error("Could not parse due date {0} for location {1}".format(display_due_date_string, location)) + raise else: self.display_due_date = None grace_period_string = self.metadata.get('graceperiod', None) if grace_period_string is not None and self.display_due_date: - self.grace_period = parse_timedelta(grace_period_string) - self.close_date = self.display_due_date + self.grace_period + try: + self.grace_period = parse_timedelta(grace_period_string) + self.close_date = self.display_due_date + self.grace_period + except: + log.error("Error parsing the grace period {0} for location {1}".format(grace_period_string, location)) + raise else: self.grace_period = None self.close_date = self.display_due_date @@ -209,7 +217,7 @@ class CombinedOpenEndedModule(XModule): def closed(self): ''' Is the student still allowed to submit answers? ''' - if self.attempts == self.max_attempts: + if self.attempts >= self.max_attempts: return True if self.close_date is not None and datetime.datetime.utcnow() > self.close_date: return True From 018412ca262718054ef6736473fa66c8a886bbb2 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Tue, 5 Feb 2013 15:41:23 -0500 Subject: [PATCH 146/347] Return False to make this code clearer --- common/lib/xmodule/xmodule/combined_open_ended_module.py | 1 + 1 file changed, 1 insertion(+) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index d85b0f6e17..ebcb044783 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -221,6 +221,7 @@ class CombinedOpenEndedModule(XModule): return True if self.close_date is not None and datetime.datetime.utcnow() > self.close_date: return True + return False From c70531ae27514aeebbc97e7d047452976af05b47 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Tue, 5 Feb 2013 16:00:16 -0500 Subject: [PATCH 147/347] Move closed check logic into the OpenEndedChild --- .../xmodule/combined_open_ended_module.py | 18 +++++------------- common/lib/xmodule/xmodule/openendedchild.py | 9 +++++---- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index ebcb044783..15a101e876 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -210,20 +210,12 @@ class CombinedOpenEndedModule(XModule): 'rubric': definition['rubric'], 'display_name': self.display_name, 'accept_file_upload': self.accept_file_upload, + 'close_date': self.close_date } self.task_xml = definition['task_xml'] self.setup_next_task() - def closed(self): - ''' Is the student still allowed to submit answers? ''' - if self.attempts >= self.max_attempts: - return True - if self.close_date is not None and datetime.datetime.utcnow() > self.close_date: - return True - return False - - def get_tag_name(self, xml): """ @@ -306,7 +298,7 @@ class CombinedOpenEndedModule(XModule): self.current_task_parsed_xml = self.current_task_descriptor.definition_from_xml(etree_xml, self.system) if current_task_state is None and self.current_task_number == 0: self.current_task = child_task_module(self.system, self.location, - self.current_task_parsed_xml, self.current_task_descriptor, self.static_data, self) + self.current_task_parsed_xml, self.current_task_descriptor, self.static_data) self.task_states.append(self.current_task.get_instance_state()) self.state = self.ASSESSING elif current_task_state is None and self.current_task_number > 0: @@ -322,7 +314,7 @@ class CombinedOpenEndedModule(XModule): }) self.current_task = child_task_module(self.system, self.location, self.current_task_parsed_xml, self.current_task_descriptor, self.static_data, - self, instance_state=current_task_state) + instance_state=current_task_state) self.task_states.append(self.current_task.get_instance_state()) self.state = self.ASSESSING else: @@ -330,7 +322,7 @@ class CombinedOpenEndedModule(XModule): current_task_state = self.overwrite_state(current_task_state) self.current_task = child_task_module(self.system, self.location, self.current_task_parsed_xml, self.current_task_descriptor, self.static_data, - self, instance_state=current_task_state) + instance_state=current_task_state) return True @@ -442,7 +434,7 @@ class CombinedOpenEndedModule(XModule): task_parsed_xml = task_descriptor.definition_from_xml(etree_xml, self.system) task = children['modules'][task_type](self.system, self.location, task_parsed_xml, task_descriptor, - self.static_data, self, instance_state=task_state) + self.static_data, instance_state=task_state) last_response = task.latest_answer() last_score = task.latest_score() last_post_assessment = task.latest_post_assessment(self.system) diff --git a/common/lib/xmodule/xmodule/openendedchild.py b/common/lib/xmodule/xmodule/openendedchild.py index 8c35fb0cae..9fa8959c95 100644 --- a/common/lib/xmodule/xmodule/openendedchild.py +++ b/common/lib/xmodule/xmodule/openendedchild.py @@ -73,7 +73,7 @@ class OpenEndedChild(object): 'done': 'Problem complete', } - def __init__(self, system, location, definition, descriptor, static_data, parent, + def __init__(self, system, location, definition, descriptor, static_data, instance_state=None, shared_state=None, **kwargs): # Load instance state if instance_state is not None: @@ -87,8 +87,6 @@ class OpenEndedChild(object): # Scores are on scale from 0 to max_score self.history = instance_state.get('history', []) - self.parent = parent - self.state = instance_state.get('state', self.INITIAL) self.created = instance_state.get('created', False) @@ -100,6 +98,7 @@ class OpenEndedChild(object): self.rubric = static_data['rubric'] self.display_name = static_data['display_name'] self.accept_file_upload = static_data['accept_file_upload'] + self.close_date = static_data['close_date'] # Used for progress / grading. Currently get credit just for # completion (doesn't matter if you self-assessed correct/incorrect). @@ -119,7 +118,9 @@ class OpenEndedChild(object): pass def closed(self): - return self.parent.closed() + if self.close_date is not None and datetime.utcnow() > self.close_date: + return True + return False def latest_answer(self): """Empty string if not available""" From 31c89e6d031494e737ab9358869365db8cffb4fc Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Tue, 5 Feb 2013 16:06:14 -0500 Subject: [PATCH 148/347] Consolidate error messages. --- common/lib/xmodule/xmodule/open_ended_module.py | 8 +++----- common/lib/xmodule/xmodule/openendedchild.py | 16 ++++++++++++++++ .../xmodule/xmodule/self_assessment_module.py | 8 +++----- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/common/lib/xmodule/xmodule/open_ended_module.py b/common/lib/xmodule/xmodule/open_ended_module.py index 2d6970e162..9d2e3e6a54 100644 --- a/common/lib/xmodule/xmodule/open_ended_module.py +++ b/common/lib/xmodule/xmodule/open_ended_module.py @@ -550,11 +550,9 @@ class OpenEndedModule(openendedchild.OpenEndedChild): """ # Once we close the problem, we should not allow students # to save answers - if self.closed(): - return { - 'success': False, - 'error': 'Problem is closed.' - } + closed, msg = self.check_if_closed() + if closed: + return msg if self.state != self.INITIAL: return self.out_of_sync_error(get) diff --git a/common/lib/xmodule/xmodule/openendedchild.py b/common/lib/xmodule/xmodule/openendedchild.py index 9fa8959c95..185472d0da 100644 --- a/common/lib/xmodule/xmodule/openendedchild.py +++ b/common/lib/xmodule/xmodule/openendedchild.py @@ -122,6 +122,22 @@ class OpenEndedChild(object): return True return False + def check_if_closed(self): + if self.closed(): + return True, { + 'success': False, + 'error': 'This problem is now closed.' + } + elif self.attempts > self.max_attempts: + return True, { + 'success': False, + 'error': 'Too many attempts.' + } + else: + return False, {} + + + def latest_answer(self): """Empty string if not available""" if not self.history: diff --git a/common/lib/xmodule/xmodule/self_assessment_module.py b/common/lib/xmodule/xmodule/self_assessment_module.py index bb8b46559d..14d5c31fc2 100644 --- a/common/lib/xmodule/xmodule/self_assessment_module.py +++ b/common/lib/xmodule/xmodule/self_assessment_module.py @@ -190,11 +190,9 @@ class SelfAssessmentModule(openendedchild.OpenEndedChild): or 'rubric_html' (if success). """ # Check to see if this problem is closed - if self.closed(): - return { - 'success': False, - 'error': 'This problem is now closed.' - } + closed, msg = self.check_if_closed() + if closed: + return msg if self.state != self.INITIAL: return self.out_of_sync_error(get) From 8ab76f72adb263605c988451555348ba01eb3318 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 16:07:35 -0500 Subject: [PATCH 149/347] Switching over to a versioning system --- .../xmodule/combined_open_ended_module.py | 555 +------------- .../xmodule/combined_open_ended_modulev1.py | 702 ++++++++++++++++++ 2 files changed, 730 insertions(+), 527 deletions(-) create mode 100644 common/lib/xmodule/xmodule/combined_open_ended_modulev1.py diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index 14a59c9004..40151e69af 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -19,44 +19,16 @@ from .stringify import stringify_children from .x_module import XModule from .xml_module import XmlDescriptor from xmodule.modulestore import Location -import self_assessment_module -import open_ended_module -from combined_open_ended_rubric import CombinedOpenEndedRubric, RubricParsingError -from .stringify import stringify_children +from combined_open_ended_module_v1 import CombinedOpenEndedV1Module, CombinedOpenEndedV1Descriptor log = logging.getLogger("mitx.courseware") -# Set the default number of max attempts. Should be 1 for production -# Set higher for debugging/testing -# attempts specified in xml definition overrides this. -MAX_ATTEMPTS = 10000 -# Set maximum available number of points. -# Overriden by max_score specified in xml. -MAX_SCORE = 1 +VERSION_TUPLES = ( + ('1', CombinedOpenEndedV1Descriptor, CombinedOpenEndedV1Module), +) -#The highest score allowed for the overall xmodule and for each rubric point -MAX_SCORE_ALLOWED = 3 - -#If true, default behavior is to score module as a practice problem. Otherwise, no grade at all is shown in progress -#Metadata overrides this. -IS_SCORED = False - -#If true, then default behavior is to require a file upload or pasted link from a student for this problem. -#Metadata overrides this. -ACCEPT_FILE_UPLOAD = False - -#Contains all reasonable bool and case combinations of True -TRUE_DICT = ["True", True, "TRUE", "true"] - -HUMAN_TASK_TYPE = { - 'selfassessment' : "Self Assessment", - 'openended' : "External Grader", -} - -class IncorrectMaxScoreError(Exception): - def __init__(self, msg): - self.msg = msg +DEFAULT_VERSION = 1 class CombinedOpenEndedModule(XModule): """ @@ -137,512 +109,41 @@ class CombinedOpenEndedModule(XModule): """ + self.system = system + self.system.set('location', location) + # Load instance state if instance_state is not None: instance_state = json.loads(instance_state) else: instance_state = {} - #We need to set the location here so the child modules can use it - system.set('location', location) + self.version = self.metadata.get('version', DEFAULT_VERSION) + if not isinstance(self.version, basestring): + try: + self.version = str(self.version) + except: + log.error("Version {0} is not correct. Going with version {1}".format(self.version, DEFAULT_VERSION)) + self.version = DEFAULT_VERSION - #Tells the system which xml definition to load - self.current_task_number = instance_state.get('current_task_number', 0) - #This loads the states of the individual children - self.task_states = instance_state.get('task_states', []) - #Overall state of the combined open ended module - self.state = instance_state.get('state', self.INITIAL) + versions = [i[0] for i in VERSION_TUPLES] + descriptors = [i[1] for i in VERSION_TUPLES] + modules = [i[2] for i in VERSION_TUPLES] - self.attempts = instance_state.get('attempts', 0) + try: + version_index = versions.index(self.version) + except: + log.error("Version {0} is not correct. Going with version {1}".format(self.version, DEFAULT_VERSION)) + self.version = DEFAULT_VERSION + version_index = versions.index(self.version) - #Allow reset is true if student has failed the criteria to move to the next child task - self.allow_reset = instance_state.get('ready_to_reset', False) - self.max_attempts = int(self.metadata.get('attempts', MAX_ATTEMPTS)) - self.is_scored = self.metadata.get('is_graded', IS_SCORED) in TRUE_DICT - self.accept_file_upload = self.metadata.get('accept_file_upload', ACCEPT_FILE_UPLOAD) in TRUE_DICT - - # Used for progress / grading. Currently get credit just for - # completion (doesn't matter if you self-assessed correct/incorrect). - self._max_score = int(self.metadata.get('max_score', MAX_SCORE)) - - if self._max_score > MAX_SCORE_ALLOWED: - error_message = "Max score {0} is higher than max score allowed {1} for location {2}".format(self._max_score, - MAX_SCORE_ALLOWED, location) - log.error(error_message) - raise IncorrectMaxScoreError(error_message) - - rubric_renderer = CombinedOpenEndedRubric(system, True) - rubric_string = stringify_children(definition['rubric']) - rubric_renderer.check_if_rubric_is_parseable(rubric_string, location, MAX_SCORE_ALLOWED) - - #Static data is passed to the child modules to render - self.static_data = { - 'max_score': self._max_score, - 'max_attempts': self.max_attempts, - 'prompt': definition['prompt'], - 'rubric': definition['rubric'], - 'display_name': self.display_name, - 'accept_file_upload': self.accept_file_upload, - } - - self.task_xml = definition['task_xml'] - self.setup_next_task() - - def get_tag_name(self, xml): - """ - Gets the tag name of a given xml block. - Input: XML string - Output: The name of the root tag - """ - tag = etree.fromstring(xml).tag - return tag - - def overwrite_state(self, current_task_state): - """ - Overwrites an instance state and sets the latest response to the current response. This is used - to ensure that the student response is carried over from the first child to the rest. - Input: Task state json string - Output: Task state json string - """ - last_response_data = self.get_last_response(self.current_task_number - 1) - last_response = last_response_data['response'] - - loaded_task_state = json.loads(current_task_state) - if loaded_task_state['state'] == self.INITIAL: - loaded_task_state['state'] = self.ASSESSING - loaded_task_state['created'] = True - loaded_task_state['history'].append({'answer': last_response}) - current_task_state = json.dumps(loaded_task_state) - return current_task_state - - def child_modules(self): - """ - Returns the constructors associated with the child modules in a dictionary. This makes writing functions - simpler (saves code duplication) - Input: None - Output: A dictionary of dictionaries containing the descriptor functions and module functions - """ - child_modules = { - 'openended': open_ended_module.OpenEndedModule, - 'selfassessment': self_assessment_module.SelfAssessmentModule, - } - child_descriptors = { - 'openended': open_ended_module.OpenEndedDescriptor, - 'selfassessment': self_assessment_module.SelfAssessmentDescriptor, - } - children = { - 'modules': child_modules, - 'descriptors': child_descriptors, - } - return children - - def setup_next_task(self, reset=False): - """ - Sets up the next task for the module. Creates an instance state if none exists, carries over the answer - from the last instance state to the next if needed. - Input: A boolean indicating whether or not the reset function is calling. - Output: Boolean True (not useful right now) - """ - current_task_state = None - if len(self.task_states) > self.current_task_number: - current_task_state = self.task_states[self.current_task_number] - - self.current_task_xml = self.task_xml[self.current_task_number] - - if self.current_task_number > 0: - self.allow_reset = self.check_allow_reset() - if self.allow_reset: - self.current_task_number = self.current_task_number - 1 - - current_task_type = self.get_tag_name(self.current_task_xml) - - children = self.child_modules() - child_task_module = children['modules'][current_task_type] - - self.current_task_descriptor = children['descriptors'][current_task_type](self.system) - - #This is the xml object created from the xml definition of the current task - etree_xml = etree.fromstring(self.current_task_xml) - - #This sends the etree_xml object through the descriptor module of the current task, and - #returns the xml parsed by the descriptor - self.current_task_parsed_xml = self.current_task_descriptor.definition_from_xml(etree_xml, self.system) - if current_task_state is None and self.current_task_number == 0: - self.current_task = child_task_module(self.system, self.location, - self.current_task_parsed_xml, self.current_task_descriptor, self.static_data) - self.task_states.append(self.current_task.get_instance_state()) - self.state = self.ASSESSING - elif current_task_state is None and self.current_task_number > 0: - last_response_data = self.get_last_response(self.current_task_number - 1) - last_response = last_response_data['response'] - current_task_state = json.dumps({ - 'state': self.ASSESSING, - 'version': self.STATE_VERSION, - 'max_score': self._max_score, - 'attempts': 0, - 'created': True, - 'history': [{'answer': last_response}], - }) - self.current_task = child_task_module(self.system, self.location, - self.current_task_parsed_xml, self.current_task_descriptor, self.static_data, - instance_state=current_task_state) - self.task_states.append(self.current_task.get_instance_state()) - self.state = self.ASSESSING - else: - if self.current_task_number > 0 and not reset: - current_task_state = self.overwrite_state(current_task_state) - self.current_task = child_task_module(self.system, self.location, - self.current_task_parsed_xml, self.current_task_descriptor, self.static_data, - instance_state=current_task_state) - - return True - - def check_allow_reset(self): - """ - Checks to see if the student has passed the criteria to move to the next module. If not, sets - allow_reset to true and halts the student progress through the tasks. - Input: None - Output: the allow_reset attribute of the current module. - """ - if not self.allow_reset: - if self.current_task_number > 0: - last_response_data = self.get_last_response(self.current_task_number - 1) - current_response_data = self.get_current_attributes(self.current_task_number) - - if(current_response_data['min_score_to_attempt'] > last_response_data['score'] - or current_response_data['max_score_to_attempt'] < last_response_data['score']): - self.state = self.DONE - self.allow_reset = True - - return self.allow_reset - - def get_context(self): - """ - Generates a context dictionary that is used to render html. - Input: None - Output: A dictionary that can be rendered into the combined open ended template. - """ - task_html = self.get_html_base() - #set context variables and render template - - context = { - 'items': [{'content': task_html}], - 'ajax_url': self.system.ajax_url, - 'allow_reset': self.allow_reset, - 'state': self.state, - 'task_count': len(self.task_xml), - 'task_number': self.current_task_number + 1, - 'status': self.get_status(), - 'display_name': self.display_name, - 'accept_file_upload': self.accept_file_upload, - } - - return context + self.child_descriptor = descriptors[version_index](self.system) + self.child_module = modules[version_index](self.system, location, definition, self.child_descriptor, instance_state) def get_html(self): - """ - Gets HTML for rendering. - Input: None - Output: rendered html - """ - context = self.get_context() - html = self.system.render_template('combined_open_ended.html', context) - return html + return self.child_module.get_html() - def get_html_nonsystem(self): - """ - Gets HTML for rendering via AJAX. Does not use system, because system contains some additional - html, which is not appropriate for returning via ajax calls. - Input: None - Output: HTML rendered directly via Mako - """ - context = self.get_context() - html = self.system.render_template('combined_open_ended.html', context) - return html - - def get_html_base(self): - """ - Gets the HTML associated with the current child task - Input: None - Output: Child task HTML - """ - self.update_task_states() - html = self.current_task.get_html(self.system) - return_html = rewrite_links(html, self.rewrite_content_links) - return return_html - - def get_current_attributes(self, task_number): - """ - Gets the min and max score to attempt attributes of the specified task. - Input: The number of the task. - Output: The minimum and maximum scores needed to move on to the specified task. - """ - task_xml = self.task_xml[task_number] - etree_xml = etree.fromstring(task_xml) - min_score_to_attempt = int(etree_xml.attrib.get('min_score_to_attempt', 0)) - max_score_to_attempt = int(etree_xml.attrib.get('max_score_to_attempt', self._max_score)) - return {'min_score_to_attempt': min_score_to_attempt, 'max_score_to_attempt': max_score_to_attempt} - - def get_last_response(self, task_number): - """ - Returns data associated with the specified task number, such as the last response, score, etc. - Input: The number of the task. - Output: A dictionary that contains information about the specified task. - """ - last_response = "" - task_state = self.task_states[task_number] - task_xml = self.task_xml[task_number] - task_type = self.get_tag_name(task_xml) - - children = self.child_modules() - - task_descriptor = children['descriptors'][task_type](self.system) - etree_xml = etree.fromstring(task_xml) - - min_score_to_attempt = int(etree_xml.attrib.get('min_score_to_attempt', 0)) - max_score_to_attempt = int(etree_xml.attrib.get('max_score_to_attempt', self._max_score)) - - task_parsed_xml = task_descriptor.definition_from_xml(etree_xml, self.system) - task = children['modules'][task_type](self.system, self.location, task_parsed_xml, task_descriptor, - self.static_data, instance_state=task_state) - last_response = task.latest_answer() - last_score = task.latest_score() - last_post_assessment = task.latest_post_assessment(self.system) - last_post_feedback = "" - if task_type == "openended": - last_post_assessment = task.latest_post_assessment(self.system, short_feedback=False, join_feedback=False) - if isinstance(last_post_assessment, list): - eval_list = [] - for i in xrange(0, len(last_post_assessment)): - eval_list.append(task.format_feedback_with_evaluation(self.system, last_post_assessment[i])) - last_post_evaluation = "".join(eval_list) - else: - last_post_evaluation = task.format_feedback_with_evaluation(self.system, last_post_assessment) - last_post_assessment = last_post_evaluation - last_correctness = task.is_last_response_correct() - max_score = task.max_score() - state = task.state - if task_type in HUMAN_TASK_TYPE: - human_task_name = HUMAN_TASK_TYPE[task_type] - else: - human_task_name = task_type - - if state in task.HUMAN_NAMES: - human_state = task.HUMAN_NAMES[state] - else: - human_state = state - last_response_dict = { - 'response': last_response, - 'score': last_score, - 'post_assessment': last_post_assessment, - 'type': task_type, - 'max_score': max_score, - 'state': state, - 'human_state': human_state, - 'human_task': human_task_name, - 'correct': last_correctness, - 'min_score_to_attempt': min_score_to_attempt, - 'max_score_to_attempt': max_score_to_attempt, - } - - return last_response_dict - - def update_task_states(self): - """ - Updates the task state of the combined open ended module with the task state of the current child module. - Input: None - Output: boolean indicating whether or not the task state changed. - """ - changed = False - if not self.allow_reset: - self.task_states[self.current_task_number] = self.current_task.get_instance_state() - current_task_state = json.loads(self.task_states[self.current_task_number]) - if current_task_state['state'] == self.DONE: - self.current_task_number += 1 - if self.current_task_number >= (len(self.task_xml)): - self.state = self.DONE - self.current_task_number = len(self.task_xml) - 1 - else: - self.state = self.INITIAL - changed = True - self.setup_next_task() - return changed - - def update_task_states_ajax(self, return_html): - """ - Runs the update task states function for ajax calls. Currently the same as update_task_states - Input: The html returned by the handle_ajax function of the child - Output: New html that should be rendered - """ - changed = self.update_task_states() - if changed: - #return_html=self.get_html() - pass - return return_html - - def get_results(self, get): - """ - Gets the results of a given grader via ajax. - Input: AJAX get dictionary - Output: Dictionary to be rendered via ajax that contains the result html. - """ - task_number = int(get['task_number']) - self.update_task_states() - response_dict = self.get_last_response(task_number) - context = {'results': response_dict['post_assessment'], 'task_number': task_number + 1} - html = self.system.render_template('combined_open_ended_results.html', context) - return {'html': html, 'success': True} - - def handle_ajax(self, dispatch, get): - """ - This is called by courseware.module_render, to handle an AJAX call. - "get" is request.POST. - - Returns a json dictionary: - { 'progress_changed' : True/False, - 'progress': 'none'/'in_progress'/'done', - } - """ - - handlers = { - 'next_problem': self.next_problem, - 'reset': self.reset, - 'get_results': self.get_results - } - - if dispatch not in handlers: - return_html = self.current_task.handle_ajax(dispatch, get, self.system) - return self.update_task_states_ajax(return_html) - - d = handlers[dispatch](get) - return json.dumps(d, cls=ComplexEncoder) - - def next_problem(self, get): - """ - Called via ajax to advance to the next problem. - Input: AJAX get request. - Output: Dictionary to be rendered - """ - self.update_task_states() - return {'success': True, 'html': self.get_html_nonsystem(), 'allow_reset': self.allow_reset} - - def reset(self, get): - """ - If resetting is allowed, reset the state of the combined open ended module. - Input: AJAX get dictionary - Output: AJAX dictionary to tbe rendered - """ - if self.state != self.DONE: - if not self.allow_reset: - return self.out_of_sync_error(get) - - if self.attempts > self.max_attempts: - return { - 'success': False, - 'error': 'Too many attempts.' - } - self.state = self.INITIAL - self.allow_reset = False - for i in xrange(0, len(self.task_xml)): - self.current_task_number = i - self.setup_next_task(reset=True) - self.current_task.reset(self.system) - self.task_states[self.current_task_number] = self.current_task.get_instance_state() - self.current_task_number = 0 - self.allow_reset = False - self.setup_next_task() - return {'success': True, 'html': self.get_html_nonsystem()} - - def get_instance_state(self): - """ - Returns the current instance state. The module can be recreated from the instance state. - Input: None - Output: A dictionary containing the instance state. - """ - - state = { - 'version': self.STATE_VERSION, - 'current_task_number': self.current_task_number, - 'state': self.state, - 'task_states': self.task_states, - 'attempts': self.attempts, - 'ready_to_reset': self.allow_reset, - } - - return json.dumps(state) - - def get_status(self): - """ - Gets the status panel to be displayed at the top right. - Input: None - Output: The status html to be rendered - """ - status = [] - for i in xrange(0, self.current_task_number + 1): - task_data = self.get_last_response(i) - task_data.update({'task_number': i + 1}) - status.append(task_data) - context = {'status_list': status} - status_html = self.system.render_template("combined_open_ended_status.html", context) - - return status_html - - def check_if_done_and_scored(self): - """ - Checks if the object is currently in a finished state (either student didn't meet criteria to move - to next step, in which case they are in the allow_reset state, or they are done with the question - entirely, in which case they will be in the self.DONE state), and if it is scored or not. - @return: Boolean corresponding to the above. - """ - return (self.state == self.DONE or self.allow_reset) and self.is_scored - - def get_score(self): - """ - Score the student received on the problem, or None if there is no - score. - - Returns: - dictionary - {'score': integer, from 0 to get_max_score(), - 'total': get_max_score()} - """ - max_score = None - score = None - if self.check_if_done_and_scored(): - last_response = self.get_last_response(self.current_task_number) - max_score = last_response['max_score'] - score = last_response['score'] - - score_dict = { - 'score': score, - 'total': max_score, - } - - return score_dict - - def max_score(self): - ''' Maximum score. Two notes: - - * This is generic; in abstract, a problem could be 3/5 points on one - randomization, and 5/7 on another - ''' - max_score = None - if self.check_if_done_and_scored(): - last_response = self.get_last_response(self.current_task_number) - max_score = last_response['max_score'] - return max_score - - def get_progress(self): - ''' Return a progress.Progress object that represents how far the - student has gone in this module. Must be implemented to get correct - progress tracking behavior in nesting modules like sequence and - vertical. - - If this module has no notion of progress, return None. - ''' - progress_object = Progress(self.current_task_number, len(self.task_xml)) - - return progress_object + class CombinedOpenEndedDescriptor(XmlDescriptor, EditingDescriptor): diff --git a/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py b/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py new file mode 100644 index 0000000000..2e462b2e66 --- /dev/null +++ b/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py @@ -0,0 +1,702 @@ +import copy +from fs.errors import ResourceNotFoundError +import itertools +import json +import logging +from lxml import etree +from lxml.html import rewrite_links +from path import path +import os +import sys + +from pkg_resources import resource_string + +from .capa_module import only_one, ComplexEncoder +from .editing_module import EditingDescriptor +from .html_checker import check_html +from progress import Progress +from .stringify import stringify_children +from .x_module import XModule +from .xml_module import XmlDescriptor +from xmodule.modulestore import Location +import self_assessment_module +import open_ended_module +from combined_open_ended_rubric import CombinedOpenEndedRubric, RubricParsingError +from .stringify import stringify_children + +log = logging.getLogger("mitx.courseware") + +# Set the default number of max attempts. Should be 1 for production +# Set higher for debugging/testing +# attempts specified in xml definition overrides this. +MAX_ATTEMPTS = 10000 + +# Set maximum available number of points. +# Overriden by max_score specified in xml. +MAX_SCORE = 1 + +#The highest score allowed for the overall xmodule and for each rubric point +MAX_SCORE_ALLOWED = 3 + +#If true, default behavior is to score module as a practice problem. Otherwise, no grade at all is shown in progress +#Metadata overrides this. +IS_SCORED = False + +#If true, then default behavior is to require a file upload or pasted link from a student for this problem. +#Metadata overrides this. +ACCEPT_FILE_UPLOAD = False + +#Contains all reasonable bool and case combinations of True +TRUE_DICT = ["True", True, "TRUE", "true"] + +HUMAN_TASK_TYPE = { + 'selfassessment' : "Self Assessment", + 'openended' : "External Grader", + } + +class IncorrectMaxScoreError(Exception): + def __init__(self, msg): + self.msg = msg + +class CombinedOpenEndedV1Module(): + """ + This is a module that encapsulates all open ended grading (self assessment, peer assessment, etc). + It transitions between problems, and support arbitrary ordering. + Each combined open ended module contains one or multiple "child" modules. + Child modules track their own state, and can transition between states. They also implement get_html and + handle_ajax. + The combined open ended module transitions between child modules as appropriate, tracks its own state, and passess + ajax requests from the browser to the child module or handles them itself (in the cases of reset and next problem) + ajax actions implemented by all children are: + 'save_answer' -- Saves the student answer + 'save_assessment' -- Saves the student assessment (or external grader assessment) + 'save_post_assessment' -- saves a post assessment (hint, feedback on feedback, etc) + ajax actions implemented by combined open ended module are: + 'reset' -- resets the whole combined open ended module and returns to the first child module + 'next_problem' -- moves to the next child module + 'get_results' -- gets results from a given child module + + Types of children. Task is synonymous with child module, so each combined open ended module + incorporates multiple children (tasks): + openendedmodule + selfassessmentmodule + """ + STATE_VERSION = 1 + + # states + INITIAL = 'initial' + ASSESSING = 'assessing' + INTERMEDIATE_DONE = 'intermediate_done' + DONE = 'done' + + js = {'coffee': [resource_string(__name__, 'js/src/combinedopenended/display.coffee'), + resource_string(__name__, 'js/src/collapsible.coffee'), + resource_string(__name__, 'js/src/javascript_loader.coffee'), + ]} + js_module_name = "CombinedOpenEnded" + + css = {'scss': [resource_string(__name__, 'css/combinedopenended/display.scss')]} + + def __init__(self, system, location, definition, descriptor, + instance_state=None, shared_state=None, **kwargs): + + """ + Definition file should have one or many task blocks, a rubric block, and a prompt block: + + Sample file: + + + Blah blah rubric. + + + Some prompt. + + + + + What hint about this problem would you give to someone? + + + Save Succcesful. Thanks for participating! + + + + + + + Enter essay here. + This is the answer. + {"grader_settings" : "ml_grading.conf", + "problem_id" : "6.002x/Welcome/OETest"} + + + + + + """ + + # Load instance state + if instance_state is not None: + instance_state = json.loads(instance_state) + else: + instance_state = {} + + #We need to set the location here so the child modules can use it + system.set('location', location) + self.system = system + + #Tells the system which xml definition to load + self.current_task_number = instance_state.get('current_task_number', 0) + #This loads the states of the individual children + self.task_states = instance_state.get('task_states', []) + #Overall state of the combined open ended module + self.state = instance_state.get('state', self.INITIAL) + + self.attempts = instance_state.get('attempts', 0) + + #Allow reset is true if student has failed the criteria to move to the next child task + self.allow_reset = instance_state.get('ready_to_reset', False) + self.max_attempts = int(self.metadata.get('attempts', MAX_ATTEMPTS)) + self.is_scored = self.metadata.get('is_graded', IS_SCORED) in TRUE_DICT + self.accept_file_upload = self.metadata.get('accept_file_upload', ACCEPT_FILE_UPLOAD) in TRUE_DICT + + # Used for progress / grading. Currently get credit just for + # completion (doesn't matter if you self-assessed correct/incorrect). + self._max_score = int(self.metadata.get('max_score', MAX_SCORE)) + + if self._max_score > MAX_SCORE_ALLOWED: + error_message = "Max score {0} is higher than max score allowed {1} for location {2}".format(self._max_score, + MAX_SCORE_ALLOWED, location) + log.error(error_message) + raise IncorrectMaxScoreError(error_message) + + rubric_renderer = CombinedOpenEndedRubric(system, True) + rubric_string = stringify_children(definition['rubric']) + rubric_renderer.check_if_rubric_is_parseable(rubric_string, location, MAX_SCORE_ALLOWED) + + #Static data is passed to the child modules to render + self.static_data = { + 'max_score': self._max_score, + 'max_attempts': self.max_attempts, + 'prompt': definition['prompt'], + 'rubric': definition['rubric'], + 'display_name': self.display_name, + 'accept_file_upload': self.accept_file_upload, + } + + self.task_xml = definition['task_xml'] + self.setup_next_task() + + def get_tag_name(self, xml): + """ + Gets the tag name of a given xml block. + Input: XML string + Output: The name of the root tag + """ + tag = etree.fromstring(xml).tag + return tag + + def overwrite_state(self, current_task_state): + """ + Overwrites an instance state and sets the latest response to the current response. This is used + to ensure that the student response is carried over from the first child to the rest. + Input: Task state json string + Output: Task state json string + """ + last_response_data = self.get_last_response(self.current_task_number - 1) + last_response = last_response_data['response'] + + loaded_task_state = json.loads(current_task_state) + if loaded_task_state['state'] == self.INITIAL: + loaded_task_state['state'] = self.ASSESSING + loaded_task_state['created'] = True + loaded_task_state['history'].append({'answer': last_response}) + current_task_state = json.dumps(loaded_task_state) + return current_task_state + + def child_modules(self): + """ + Returns the constructors associated with the child modules in a dictionary. This makes writing functions + simpler (saves code duplication) + Input: None + Output: A dictionary of dictionaries containing the descriptor functions and module functions + """ + child_modules = { + 'openended': open_ended_module.OpenEndedModule, + 'selfassessment': self_assessment_module.SelfAssessmentModule, + } + child_descriptors = { + 'openended': open_ended_module.OpenEndedDescriptor, + 'selfassessment': self_assessment_module.SelfAssessmentDescriptor, + } + children = { + 'modules': child_modules, + 'descriptors': child_descriptors, + } + return children + + def setup_next_task(self, reset=False): + """ + Sets up the next task for the module. Creates an instance state if none exists, carries over the answer + from the last instance state to the next if needed. + Input: A boolean indicating whether or not the reset function is calling. + Output: Boolean True (not useful right now) + """ + current_task_state = None + if len(self.task_states) > self.current_task_number: + current_task_state = self.task_states[self.current_task_number] + + self.current_task_xml = self.task_xml[self.current_task_number] + + if self.current_task_number > 0: + self.allow_reset = self.check_allow_reset() + if self.allow_reset: + self.current_task_number = self.current_task_number - 1 + + current_task_type = self.get_tag_name(self.current_task_xml) + + children = self.child_modules() + child_task_module = children['modules'][current_task_type] + + self.current_task_descriptor = children['descriptors'][current_task_type](self.system) + + #This is the xml object created from the xml definition of the current task + etree_xml = etree.fromstring(self.current_task_xml) + + #This sends the etree_xml object through the descriptor module of the current task, and + #returns the xml parsed by the descriptor + self.current_task_parsed_xml = self.current_task_descriptor.definition_from_xml(etree_xml, self.system) + if current_task_state is None and self.current_task_number == 0: + self.current_task = child_task_module(self.system, self.location, + self.current_task_parsed_xml, self.current_task_descriptor, self.static_data) + self.task_states.append(self.current_task.get_instance_state()) + self.state = self.ASSESSING + elif current_task_state is None and self.current_task_number > 0: + last_response_data = self.get_last_response(self.current_task_number - 1) + last_response = last_response_data['response'] + current_task_state = json.dumps({ + 'state': self.ASSESSING, + 'version': self.STATE_VERSION, + 'max_score': self._max_score, + 'attempts': 0, + 'created': True, + 'history': [{'answer': last_response}], + }) + self.current_task = child_task_module(self.system, self.location, + self.current_task_parsed_xml, self.current_task_descriptor, self.static_data, + instance_state=current_task_state) + self.task_states.append(self.current_task.get_instance_state()) + self.state = self.ASSESSING + else: + if self.current_task_number > 0 and not reset: + current_task_state = self.overwrite_state(current_task_state) + self.current_task = child_task_module(self.system, self.location, + self.current_task_parsed_xml, self.current_task_descriptor, self.static_data, + instance_state=current_task_state) + + return True + + def check_allow_reset(self): + """ + Checks to see if the student has passed the criteria to move to the next module. If not, sets + allow_reset to true and halts the student progress through the tasks. + Input: None + Output: the allow_reset attribute of the current module. + """ + if not self.allow_reset: + if self.current_task_number > 0: + last_response_data = self.get_last_response(self.current_task_number - 1) + current_response_data = self.get_current_attributes(self.current_task_number) + + if(current_response_data['min_score_to_attempt'] > last_response_data['score'] + or current_response_data['max_score_to_attempt'] < last_response_data['score']): + self.state = self.DONE + self.allow_reset = True + + return self.allow_reset + + def get_context(self): + """ + Generates a context dictionary that is used to render html. + Input: None + Output: A dictionary that can be rendered into the combined open ended template. + """ + task_html = self.get_html_base() + #set context variables and render template + + context = { + 'items': [{'content': task_html}], + 'ajax_url': self.system.ajax_url, + 'allow_reset': self.allow_reset, + 'state': self.state, + 'task_count': len(self.task_xml), + 'task_number': self.current_task_number + 1, + 'status': self.get_status(), + 'display_name': self.display_name, + 'accept_file_upload': self.accept_file_upload, + } + + return context + + def get_html(self): + """ + Gets HTML for rendering. + Input: None + Output: rendered html + """ + context = self.get_context() + html = self.system.render_template('combined_open_ended.html', context) + return html + + def get_html_nonsystem(self): + """ + Gets HTML for rendering via AJAX. Does not use system, because system contains some additional + html, which is not appropriate for returning via ajax calls. + Input: None + Output: HTML rendered directly via Mako + """ + context = self.get_context() + html = self.system.render_template('combined_open_ended.html', context) + return html + + def get_html_base(self): + """ + Gets the HTML associated with the current child task + Input: None + Output: Child task HTML + """ + self.update_task_states() + html = self.current_task.get_html(self.system) + return_html = rewrite_links(html, self.rewrite_content_links) + return return_html + + def get_current_attributes(self, task_number): + """ + Gets the min and max score to attempt attributes of the specified task. + Input: The number of the task. + Output: The minimum and maximum scores needed to move on to the specified task. + """ + task_xml = self.task_xml[task_number] + etree_xml = etree.fromstring(task_xml) + min_score_to_attempt = int(etree_xml.attrib.get('min_score_to_attempt', 0)) + max_score_to_attempt = int(etree_xml.attrib.get('max_score_to_attempt', self._max_score)) + return {'min_score_to_attempt': min_score_to_attempt, 'max_score_to_attempt': max_score_to_attempt} + + def get_last_response(self, task_number): + """ + Returns data associated with the specified task number, such as the last response, score, etc. + Input: The number of the task. + Output: A dictionary that contains information about the specified task. + """ + last_response = "" + task_state = self.task_states[task_number] + task_xml = self.task_xml[task_number] + task_type = self.get_tag_name(task_xml) + + children = self.child_modules() + + task_descriptor = children['descriptors'][task_type](self.system) + etree_xml = etree.fromstring(task_xml) + + min_score_to_attempt = int(etree_xml.attrib.get('min_score_to_attempt', 0)) + max_score_to_attempt = int(etree_xml.attrib.get('max_score_to_attempt', self._max_score)) + + task_parsed_xml = task_descriptor.definition_from_xml(etree_xml, self.system) + task = children['modules'][task_type](self.system, self.location, task_parsed_xml, task_descriptor, + self.static_data, instance_state=task_state) + last_response = task.latest_answer() + last_score = task.latest_score() + last_post_assessment = task.latest_post_assessment(self.system) + last_post_feedback = "" + if task_type == "openended": + last_post_assessment = task.latest_post_assessment(self.system, short_feedback=False, join_feedback=False) + if isinstance(last_post_assessment, list): + eval_list = [] + for i in xrange(0, len(last_post_assessment)): + eval_list.append(task.format_feedback_with_evaluation(self.system, last_post_assessment[i])) + last_post_evaluation = "".join(eval_list) + else: + last_post_evaluation = task.format_feedback_with_evaluation(self.system, last_post_assessment) + last_post_assessment = last_post_evaluation + last_correctness = task.is_last_response_correct() + max_score = task.max_score() + state = task.state + if task_type in HUMAN_TASK_TYPE: + human_task_name = HUMAN_TASK_TYPE[task_type] + else: + human_task_name = task_type + + if state in task.HUMAN_NAMES: + human_state = task.HUMAN_NAMES[state] + else: + human_state = state + last_response_dict = { + 'response': last_response, + 'score': last_score, + 'post_assessment': last_post_assessment, + 'type': task_type, + 'max_score': max_score, + 'state': state, + 'human_state': human_state, + 'human_task': human_task_name, + 'correct': last_correctness, + 'min_score_to_attempt': min_score_to_attempt, + 'max_score_to_attempt': max_score_to_attempt, + } + + return last_response_dict + + def update_task_states(self): + """ + Updates the task state of the combined open ended module with the task state of the current child module. + Input: None + Output: boolean indicating whether or not the task state changed. + """ + changed = False + if not self.allow_reset: + self.task_states[self.current_task_number] = self.current_task.get_instance_state() + current_task_state = json.loads(self.task_states[self.current_task_number]) + if current_task_state['state'] == self.DONE: + self.current_task_number += 1 + if self.current_task_number >= (len(self.task_xml)): + self.state = self.DONE + self.current_task_number = len(self.task_xml) - 1 + else: + self.state = self.INITIAL + changed = True + self.setup_next_task() + return changed + + def update_task_states_ajax(self, return_html): + """ + Runs the update task states function for ajax calls. Currently the same as update_task_states + Input: The html returned by the handle_ajax function of the child + Output: New html that should be rendered + """ + changed = self.update_task_states() + if changed: + #return_html=self.get_html() + pass + return return_html + + def get_results(self, get): + """ + Gets the results of a given grader via ajax. + Input: AJAX get dictionary + Output: Dictionary to be rendered via ajax that contains the result html. + """ + task_number = int(get['task_number']) + self.update_task_states() + response_dict = self.get_last_response(task_number) + context = {'results': response_dict['post_assessment'], 'task_number': task_number + 1} + html = self.system.render_template('combined_open_ended_results.html', context) + return {'html': html, 'success': True} + + def handle_ajax(self, dispatch, get): + """ + This is called by courseware.module_render, to handle an AJAX call. + "get" is request.POST. + + Returns a json dictionary: + { 'progress_changed' : True/False, + 'progress': 'none'/'in_progress'/'done', + } + """ + + handlers = { + 'next_problem': self.next_problem, + 'reset': self.reset, + 'get_results': self.get_results + } + + if dispatch not in handlers: + return_html = self.current_task.handle_ajax(dispatch, get, self.system) + return self.update_task_states_ajax(return_html) + + d = handlers[dispatch](get) + return json.dumps(d, cls=ComplexEncoder) + + def next_problem(self, get): + """ + Called via ajax to advance to the next problem. + Input: AJAX get request. + Output: Dictionary to be rendered + """ + self.update_task_states() + return {'success': True, 'html': self.get_html_nonsystem(), 'allow_reset': self.allow_reset} + + def reset(self, get): + """ + If resetting is allowed, reset the state of the combined open ended module. + Input: AJAX get dictionary + Output: AJAX dictionary to tbe rendered + """ + if self.state != self.DONE: + if not self.allow_reset: + return self.out_of_sync_error(get) + + if self.attempts > self.max_attempts: + return { + 'success': False, + 'error': 'Too many attempts.' + } + self.state = self.INITIAL + self.allow_reset = False + for i in xrange(0, len(self.task_xml)): + self.current_task_number = i + self.setup_next_task(reset=True) + self.current_task.reset(self.system) + self.task_states[self.current_task_number] = self.current_task.get_instance_state() + self.current_task_number = 0 + self.allow_reset = False + self.setup_next_task() + return {'success': True, 'html': self.get_html_nonsystem()} + + def get_instance_state(self): + """ + Returns the current instance state. The module can be recreated from the instance state. + Input: None + Output: A dictionary containing the instance state. + """ + + state = { + 'version': self.STATE_VERSION, + 'current_task_number': self.current_task_number, + 'state': self.state, + 'task_states': self.task_states, + 'attempts': self.attempts, + 'ready_to_reset': self.allow_reset, + } + + return json.dumps(state) + + def get_status(self): + """ + Gets the status panel to be displayed at the top right. + Input: None + Output: The status html to be rendered + """ + status = [] + for i in xrange(0, self.current_task_number + 1): + task_data = self.get_last_response(i) + task_data.update({'task_number': i + 1}) + status.append(task_data) + context = {'status_list': status} + status_html = self.system.render_template("combined_open_ended_status.html", context) + + return status_html + + def check_if_done_and_scored(self): + """ + Checks if the object is currently in a finished state (either student didn't meet criteria to move + to next step, in which case they are in the allow_reset state, or they are done with the question + entirely, in which case they will be in the self.DONE state), and if it is scored or not. + @return: Boolean corresponding to the above. + """ + return (self.state == self.DONE or self.allow_reset) and self.is_scored + + def get_score(self): + """ + Score the student received on the problem, or None if there is no + score. + + Returns: + dictionary + {'score': integer, from 0 to get_max_score(), + 'total': get_max_score()} + """ + max_score = None + score = None + if self.check_if_done_and_scored(): + last_response = self.get_last_response(self.current_task_number) + max_score = last_response['max_score'] + score = last_response['score'] + + score_dict = { + 'score': score, + 'total': max_score, + } + + return score_dict + + def max_score(self): + ''' Maximum score. Two notes: + + * This is generic; in abstract, a problem could be 3/5 points on one + randomization, and 5/7 on another + ''' + max_score = None + if self.check_if_done_and_scored(): + last_response = self.get_last_response(self.current_task_number) + max_score = last_response['max_score'] + return max_score + + def get_progress(self): + ''' Return a progress.Progress object that represents how far the + student has gone in this module. Must be implemented to get correct + progress tracking behavior in nesting modules like sequence and + vertical. + + If this module has no notion of progress, return None. + ''' + progress_object = Progress(self.current_task_number, len(self.task_xml)) + + return progress_object + + +class CombinedOpenEndedV1Descriptor(XmlDescriptor, EditingDescriptor): + """ + Module for adding combined open ended questions + """ + mako_template = "widgets/html-edit.html" + module_class = CombinedOpenEndedModule + filename_extension = "xml" + + stores_state = True + has_score = True + template_dir_name = "combinedopenended" + + js = {'coffee': [resource_string(__name__, 'js/src/html/edit.coffee')]} + js_module_name = "HTMLEditingDescriptor" + + @classmethod + def definition_from_xml(cls, xml_object, system): + """ + Pull out the individual tasks, the rubric, and the prompt, and parse + + Returns: + { + 'rubric': 'some-html', + 'prompt': 'some-html', + 'task_xml': dictionary of xml strings, + } + """ + expected_children = ['task', 'rubric', 'prompt'] + for child in expected_children: + if len(xml_object.xpath(child)) == 0: + raise ValueError("Combined Open Ended definition must include at least one '{0}' tag".format(child)) + + def parse_task(k): + """Assumes that xml_object has child k""" + return [stringify_children(xml_object.xpath(k)[i]) for i in xrange(0, len(xml_object.xpath(k)))] + + def parse(k): + """Assumes that xml_object has child k""" + return xml_object.xpath(k)[0] + + return {'task_xml': parse_task('task'), 'prompt': parse('prompt'), 'rubric': parse('rubric')} + + + def definition_to_xml(self, resource_fs): + '''Return an xml element representing this definition.''' + elt = etree.Element('combinedopenended') + + def add_child(k): + child_str = '<{tag}>{body}'.format(tag=k, body=self.definition[k]) + child_node = etree.fromstring(child_str) + elt.append(child_node) + + for child in ['task']: + add_child(child) + + return elt \ No newline at end of file From a7588410b2fccf86759c8c6ab406d2240abb056d Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Tue, 5 Feb 2013 16:11:04 -0500 Subject: [PATCH 150/347] Fix tests --- .../xmodule/xmodule/tests/test_combined_open_ended.py | 10 ++++------ .../lib/xmodule/xmodule/tests/test_self_assessment.py | 6 ++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py index 69c502cd5d..e58e8c024b 100644 --- a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py +++ b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py @@ -41,16 +41,15 @@ class OpenEndedChildTest(unittest.TestCase): 'max_score': max_score, 'display_name': 'Name', 'accept_file_upload' : False, + 'close_date': None } definition = Mock() - parent = Mock() - parent.closed.return_value = False; descriptor = Mock() def setUp(self): self.openendedchild = OpenEndedChild(test_system, self.location, self.definition, self.descriptor, self.static_data, - self.parent, self.metadata) + self.metadata) def test_latest_answer_empty(self): @@ -158,6 +157,7 @@ class OpenEndedModuleTest(unittest.TestCase): 'max_score': max_score, 'display_name': 'Name', 'accept_file_upload': False, + 'close_date': None } oeparam = etree.XML(''' @@ -169,8 +169,6 @@ class OpenEndedModuleTest(unittest.TestCase): ''') definition = {'oeparam': oeparam} descriptor = Mock() - parent = Mock() - parent.closed.return_value = False; def setUp(self): test_system.location = self.location @@ -179,7 +177,7 @@ class OpenEndedModuleTest(unittest.TestCase): test_system.xqueue = {'interface':self.mock_xqueue, 'callback_url':'/', 'default_queuename': 'testqueue', 'waittime': 1} self.openendedmodule = OpenEndedModule(test_system, self.location, self.definition, self.descriptor, self.static_data, - self.parent, self.metadata) + self.metadata) def test_message_post(self): get = {'feedback': 'feedback text', diff --git a/common/lib/xmodule/xmodule/tests/test_self_assessment.py b/common/lib/xmodule/xmodule/tests/test_self_assessment.py index 74018cf101..3cae123ffe 100644 --- a/common/lib/xmodule/xmodule/tests/test_self_assessment.py +++ b/common/lib/xmodule/xmodule/tests/test_self_assessment.py @@ -30,8 +30,6 @@ class SelfAssessmentTest(unittest.TestCase): metadata = {'attempts': '10'} descriptor = Mock() - parent = Mock() - parent.closed.return_value = False def setUp(self): state = json.dumps({'student_answers': ["Answer 1", "answer 2", "answer 3"], @@ -47,11 +45,12 @@ class SelfAssessmentTest(unittest.TestCase): 'max_score': 1, 'display_name': "Name", 'accept_file_upload' : False, + 'close_date': None } self.module = SelfAssessmentModule(test_system, self.location, self.definition, self.descriptor, - static_data, self.parent, + static_data, state, metadata=self.metadata) def test_get_html(self): @@ -75,7 +74,6 @@ class SelfAssessmentTest(unittest.TestCase): # if we now assess as right, skip the REQUEST_HINT state self.module.save_answer({'student_answer': 'answer 4'}, test_system) - self.parent.closed.assert_called_with() self.module.save_assessment({'assessment': '1'}, test_system) self.assertEqual(self.module.state, self.module.DONE) From ce0b31465c3cac2e173066017c735c6931ae9f9a Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 16:17:55 -0500 Subject: [PATCH 151/347] Add in methods to interact with xmodule, change descriptor --- .../xmodule/combined_open_ended_module.py | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index 40151e69af..69ade563d7 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -143,7 +143,20 @@ class CombinedOpenEndedModule(XModule): def get_html(self): return self.child_module.get_html() - + def handle_ajax(self, dispatch, get): + return self.child_module.handle_ajax(dispatch, get) + + def get_instance_state(self): + return self.child_module.get_instance_state() + + def get_score(self): + return self.child_module.get_score() + + def max_score(self): + return self.child_module.max_score() + + def get_progress(self): + return self.child_module.get_progress() class CombinedOpenEndedDescriptor(XmlDescriptor, EditingDescriptor): @@ -173,20 +186,7 @@ class CombinedOpenEndedDescriptor(XmlDescriptor, EditingDescriptor): 'task_xml': dictionary of xml strings, } """ - expected_children = ['task', 'rubric', 'prompt'] - for child in expected_children: - if len(xml_object.xpath(child)) == 0: - raise ValueError("Combined Open Ended definition must include at least one '{0}' tag".format(child)) - - def parse_task(k): - """Assumes that xml_object has child k""" - return [stringify_children(xml_object.xpath(k)[i]) for i in xrange(0, len(xml_object.xpath(k)))] - - def parse(k): - """Assumes that xml_object has child k""" - return xml_object.xpath(k)[0] - - return {'task_xml': parse_task('task'), 'prompt': parse('prompt'), 'rubric': parse('rubric')} + return etree.tostring(xml_object) def definition_to_xml(self, resource_fs): From 8360a7a7f52a2607aecdc96693a4a408313c1aa6 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Tue, 5 Feb 2013 16:23:10 -0500 Subject: [PATCH 152/347] Fix bug where we imported two functions w/ the same name --- cms/djangoapps/contentstore/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index 9328b7fdb1..7ebb2648ec 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -31,7 +31,7 @@ from xmodule.modulestore.exceptions import ItemNotFoundError, InvalidLocationErr from xmodule.x_module import ModuleSystem from xmodule.error_module import ErrorDescriptor from xmodule.errortracker import exc_info_to_str -from static_replace import replace_static_urls +import static_replace from external_auth.views import ssl_login_shortcut from mitxmako.shortcuts import render_to_response, render_to_string @@ -473,7 +473,7 @@ def preview_module_system(request, preview_id, descriptor): get_module=partial(get_preview_module, request, preview_id), render_template=render_from_lms, debug=True, - replace_urls=partial(replace_static_urls, data_directory=None, course_namespace=descriptor.location), + replace_urls=partial(static_replace.replace_static_urls, data_directory=None, course_namespace=descriptor.location), user=request.user, ) From 706a1072b9991d59075bb77de828998b92cfe9f5 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Tue, 5 Feb 2013 16:24:53 -0500 Subject: [PATCH 153/347] undo pipeline changes --- lms/envs/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/envs/common.py b/lms/envs/common.py index aa125b06e2..0b76c6b241 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -530,7 +530,7 @@ PIPELINE_COMPILERS = [ 'pipeline.compilers.coffee.CoffeeScriptCompiler', ] -PIPELINE_SASS_ARGUMENTS = '-t expanded -r {proj_dir}/static/sass/bourbon/lib/bourbon.rb'.format(proj_dir=PROJECT_ROOT) +PIPELINE_SASS_ARGUMENTS = '-r {proj_dir}/static/sass/bourbon/lib/bourbon.rb'.format(proj_dir=PROJECT_ROOT) PIPELINE_CSS_COMPRESSOR = None PIPELINE_JS_COMPRESSOR = None @@ -540,7 +540,7 @@ STATICFILES_IGNORE_PATTERNS = ( "coffee/*", ) -# PIPELINE_YUI_BINARY = 'yui-compressor' +PIPELINE_YUI_BINARY = 'yui-compressor' PIPELINE_SASS_BINARY = 'sass' PIPELINE_COFFEE_SCRIPT_BINARY = 'coffee' From 3dc05aa90429ffd1244dec4edf84fa76785a1266 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 16:25:46 -0500 Subject: [PATCH 154/347] Make some bug fixes, alter definition passing to work --- common/lib/xmodule/xmodule/combined_open_ended_module.py | 7 ++++--- common/lib/xmodule/xmodule/combined_open_ended_modulev1.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index 69ade563d7..b3127f12eb 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -19,7 +19,7 @@ from .stringify import stringify_children from .x_module import XModule from .xml_module import XmlDescriptor from xmodule.modulestore import Location -from combined_open_ended_module_v1 import CombinedOpenEndedV1Module, CombinedOpenEndedV1Descriptor +from combined_open_ended_modulev1 import CombinedOpenEndedV1Module, CombinedOpenEndedV1Descriptor log = logging.getLogger("mitx.courseware") @@ -138,7 +138,8 @@ class CombinedOpenEndedModule(XModule): version_index = versions.index(self.version) self.child_descriptor = descriptors[version_index](self.system) - self.child_module = modules[version_index](self.system, location, definition, self.child_descriptor, instance_state) + self.child_definition = self.child_descriptor.definition_from_xml(etree.fromstring(definition['xml_string'])) + self.child_module = modules[version_index](self.system, location, self.child_definition, self.child_descriptor, instance_state) def get_html(self): return self.child_module.get_html() @@ -186,7 +187,7 @@ class CombinedOpenEndedDescriptor(XmlDescriptor, EditingDescriptor): 'task_xml': dictionary of xml strings, } """ - return etree.tostring(xml_object) + return {'xml_string' : etree.tostring(xml_object)} def definition_to_xml(self, resource_fs): diff --git a/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py b/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py index 2e462b2e66..4b663d21af 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py @@ -649,7 +649,7 @@ class CombinedOpenEndedV1Descriptor(XmlDescriptor, EditingDescriptor): Module for adding combined open ended questions """ mako_template = "widgets/html-edit.html" - module_class = CombinedOpenEndedModule + module_class = CombinedOpenEndedV1Module filename_extension = "xml" stores_state = True From 1ef9d6388f8289e11f2d6c56d46a32f341d309e5 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Tue, 5 Feb 2013 16:25:59 -0500 Subject: [PATCH 155/347] re-add compression flag to sass --- lms/envs/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/envs/common.py b/lms/envs/common.py index 0b76c6b241..16472795e0 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -530,7 +530,7 @@ PIPELINE_COMPILERS = [ 'pipeline.compilers.coffee.CoffeeScriptCompiler', ] -PIPELINE_SASS_ARGUMENTS = '-r {proj_dir}/static/sass/bourbon/lib/bourbon.rb'.format(proj_dir=PROJECT_ROOT) +PIPELINE_SASS_ARGUMENTS = '-t compressed -r {proj_dir}/static/sass/bourbon/lib/bourbon.rb'.format(proj_dir=PROJECT_ROOT) PIPELINE_CSS_COMPRESSOR = None PIPELINE_JS_COMPRESSOR = None From 3fa1fe0cd6f140f5d696911198ac7d18c9346e71 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Tue, 5 Feb 2013 16:26:07 -0500 Subject: [PATCH 156/347] change from throwing a Http404 exception, which I believe will try to render a static 404.html template - and ironically triggers a 500 server error. Just create a HttpResponse and set the status_code to 404. --- cms/djangoapps/contentstore/tests/tests.py | 3 +++ common/djangoapps/contentserver/middleware.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py index 80909dad7a..085ecebff1 100644 --- a/cms/djangoapps/contentstore/tests/tests.py +++ b/cms/djangoapps/contentstore/tests/tests.py @@ -515,6 +515,9 @@ class ContentStoreTest(TestCase): # note, we know the link it should be because that's what in the 'full' course in the test data self.assertContains(resp, '/c4x/edX/full/asset/handouts_schematic_tutorial.pdf') + def test_missing_static_content(self): + resp = self.client.get("/c4x/asd/asd/asd/asd") + self.assertEqual(resp.status_code, 404) def test_capa_module(self): """Test that a problem treats markdown specially.""" diff --git a/common/djangoapps/contentserver/middleware.py b/common/djangoapps/contentserver/middleware.py index bc5d80842e..1d139bcaa0 100644 --- a/common/djangoapps/contentserver/middleware.py +++ b/common/djangoapps/contentserver/middleware.py @@ -21,7 +21,9 @@ class StaticContentServer(object): try: content = contentstore().find(loc) except NotFoundError: - raise Http404 + response = HttpResponse() + response.status_code = 404 + return response # since we fetched it from DB, let's cache it going forward set_cached_content(content) From 0133c7c669192de55d878eb886e01a4595d2524e Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 16:32:40 -0500 Subject: [PATCH 157/347] Patch peer grading tab to work --- .../open_ended_grading/open_ended_notifications.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/open_ended_grading/open_ended_notifications.py b/lms/djangoapps/open_ended_grading/open_ended_notifications.py index 26f7339291..b8b323acad 100644 --- a/lms/djangoapps/open_ended_grading/open_ended_notifications.py +++ b/lms/djangoapps/open_ended_grading/open_ended_notifications.py @@ -1,6 +1,7 @@ from django.conf import settings from staff_grading_service import StaffGradingService from open_ended_grading.controller_query_service import ControllerQueryService +from xmodule import peer_grading_service import json from student.models import unique_id_for_user import open_ended_util @@ -10,6 +11,8 @@ from courseware.access import has_access from util.cache import cache import datetime from xmodule import peer_grading_service +from xmodule.x_module import ModuleSystem +from mitxmako.shortcuts import render_to_string log=logging.getLogger(__name__) @@ -55,7 +58,8 @@ def staff_grading_notifications(course, user): return notification_dict def peer_grading_notifications(course, user): - peer_gs = PeerGradingService(settings.PEER_GRADING_INTERFACE) + system = ModuleSystem(None,None,None,render_to_string,None) + peer_gs = peer_grading_service.PeerGradingService(settings.PEER_GRADING_INTERFACE, system) pending_grading=False img_path= "" course_id = course.id From e6770bcaa74f0296602cf991f302e51e9e9e2b3d Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 16:42:56 -0500 Subject: [PATCH 158/347] Parse and pass metadata --- common/lib/xmodule/xmodule/combined_open_ended_module.py | 8 +++++--- .../lib/xmodule/xmodule/combined_open_ended_modulev1.py | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index b3127f12eb..fc459f7984 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -138,8 +138,9 @@ class CombinedOpenEndedModule(XModule): version_index = versions.index(self.version) self.child_descriptor = descriptors[version_index](self.system) - self.child_definition = self.child_descriptor.definition_from_xml(etree.fromstring(definition['xml_string'])) - self.child_module = modules[version_index](self.system, location, self.child_definition, self.child_descriptor, instance_state) + self.child_definition = CombinedOpenEndedV1Descriptor.definition_from_xml(etree.fromstring(definition['xml_string']), self.system) + self.child_module = modules[version_index](self.system, location, self.child_definition, self.child_descriptor, + instance_state = json.dumps(instance_state), metadata = definition['metadata']) def get_html(self): return self.child_module.get_html() @@ -187,7 +188,8 @@ class CombinedOpenEndedDescriptor(XmlDescriptor, EditingDescriptor): 'task_xml': dictionary of xml strings, } """ - return {'xml_string' : etree.tostring(xml_object)} + + return {'xml_string' : etree.tostring(xml_object), 'metadata' : xml_object.attrib} def definition_to_xml(self, resource_fs): diff --git a/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py b/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py index 4b663d21af..8623a06cc7 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py @@ -98,7 +98,7 @@ class CombinedOpenEndedV1Module(): css = {'scss': [resource_string(__name__, 'css/combinedopenended/display.scss')]} def __init__(self, system, location, definition, descriptor, - instance_state=None, shared_state=None, **kwargs): + instance_state=None, shared_state=None, metadata = None, **kwargs): """ Definition file should have one or many task blocks, a rubric block, and a prompt block: @@ -135,6 +135,8 @@ class CombinedOpenEndedV1Module(): """ + self.metadata = metadata + # Load instance state if instance_state is not None: instance_state = json.loads(instance_state) From 8e7fa6c90c5d4b64fef921c1681911ad83b77d27 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 16:48:21 -0500 Subject: [PATCH 159/347] Support due date and display name --- .../lib/xmodule/xmodule/combined_open_ended_module.py | 10 +++++++++- .../xmodule/xmodule/combined_open_ended_modulev1.py | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index fc459f7984..60d6d95290 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -140,7 +140,7 @@ class CombinedOpenEndedModule(XModule): self.child_descriptor = descriptors[version_index](self.system) self.child_definition = CombinedOpenEndedV1Descriptor.definition_from_xml(etree.fromstring(definition['xml_string']), self.system) self.child_module = modules[version_index](self.system, location, self.child_definition, self.child_descriptor, - instance_state = json.dumps(instance_state), metadata = definition['metadata']) + instance_state = json.dumps(instance_state), metadata = self.metadata) def get_html(self): return self.child_module.get_html() @@ -160,6 +160,14 @@ class CombinedOpenEndedModule(XModule): def get_progress(self): return self.child_module.get_progress() + @property + def due_date(self): + return self.child_module.due_date + + @property + def display_name(self): + return self.child_module.display_name + class CombinedOpenEndedDescriptor(XmlDescriptor, EditingDescriptor): """ diff --git a/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py b/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py index 8623a06cc7..ca129215e3 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py @@ -136,6 +136,7 @@ class CombinedOpenEndedV1Module(): """ self.metadata = metadata + self.display_name = metadata['display_name'] # Load instance state if instance_state is not None: From 1d3f8f0655755175f3de07a9249f5d81e6838ee0 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 16:54:57 -0500 Subject: [PATCH 160/347] Pass display name and content link rewriting down the chain --- common/lib/xmodule/xmodule/combined_open_ended_module.py | 6 +++++- common/lib/xmodule/xmodule/combined_open_ended_modulev1.py | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index 60d6d95290..3e0a3b27a5 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -137,10 +137,14 @@ class CombinedOpenEndedModule(XModule): self.version = DEFAULT_VERSION version_index = versions.index(self.version) + static_data = { + 'rewrite_content_links' : self.rewrite_content_links, + } + self.child_descriptor = descriptors[version_index](self.system) self.child_definition = CombinedOpenEndedV1Descriptor.definition_from_xml(etree.fromstring(definition['xml_string']), self.system) self.child_module = modules[version_index](self.system, location, self.child_definition, self.child_descriptor, - instance_state = json.dumps(instance_state), metadata = self.metadata) + instance_state = json.dumps(instance_state), metadata = self.metadata, static_data= static_data) def get_html(self): return self.child_module.get_html() diff --git a/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py b/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py index ca129215e3..e21765f76b 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py @@ -98,7 +98,7 @@ class CombinedOpenEndedV1Module(): css = {'scss': [resource_string(__name__, 'css/combinedopenended/display.scss')]} def __init__(self, system, location, definition, descriptor, - instance_state=None, shared_state=None, metadata = None, **kwargs): + instance_state=None, shared_state=None, metadata = None, static_data = None, **kwargs): """ Definition file should have one or many task blocks, a rubric block, and a prompt block: @@ -136,7 +136,9 @@ class CombinedOpenEndedV1Module(): """ self.metadata = metadata - self.display_name = metadata['display_name'] + self.display_name = metadata.get('display_name', "Open Ended") + self.rewrite_content_links = static_data['rewrite_content_links'] + # Load instance state if instance_state is not None: @@ -188,6 +190,7 @@ class CombinedOpenEndedV1Module(): } self.task_xml = definition['task_xml'] + self.location = location self.setup_next_task() def get_tag_name(self, xml): From 06499bbafc01260f458bd159ed49c457631824f2 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 17:10:35 -0500 Subject: [PATCH 161/347] Fix some of the tests --- common/lib/xmodule/xmodule/open_ended_image_submission.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/open_ended_image_submission.py b/common/lib/xmodule/xmodule/open_ended_image_submission.py index 8fa4d721d3..fa73feef22 100644 --- a/common/lib/xmodule/xmodule/open_ended_image_submission.py +++ b/common/lib/xmodule/xmodule/open_ended_image_submission.py @@ -127,10 +127,14 @@ class ImageProperties(object): """ image_is_okay = False try: - image_is_okay = self.count_colors() and self.get_skin_ratio() and not self.image_too_large + #image_is_okay = self.count_colors() and self.get_skin_ratio() and not self.image_too_large + image_is_okay = self.image_too_large except: log.exception("Could not run image tests.") + if not ENABLE_PIL: + image_is_okay = True + return image_is_okay From 8bf29c0e1a1934b4d9044aa8e45af6f36d471bfc Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 17:17:58 -0500 Subject: [PATCH 162/347] Alter image test criteria --- common/lib/xmodule/xmodule/open_ended_image_submission.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/open_ended_image_submission.py b/common/lib/xmodule/xmodule/open_ended_image_submission.py index fa73feef22..196f396d65 100644 --- a/common/lib/xmodule/xmodule/open_ended_image_submission.py +++ b/common/lib/xmodule/xmodule/open_ended_image_submission.py @@ -40,7 +40,7 @@ ALLOWABLE_IMAGE_SUFFIXES = [ ] #Maximum allowed dimensions (x and y) for an uploaded image -MAX_ALLOWED_IMAGE_DIM = 1000 +MAX_ALLOWED_IMAGE_DIM = 1500 #Dimensions to which image is resized before it is evaluated for color count, etc MAX_IMAGE_DIM = 150 From 6e7287dd8e47622b8cf6c0bd738507e53432e59c Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Tue, 5 Feb 2013 17:36:06 -0500 Subject: [PATCH 163/347] Fix some bugs in the peer grading problem code. --- .../xmodule/js/src/peergrading/peer_grading_problem.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee index 1be8cbbb00..deeb82900b 100644 --- a/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee +++ b/common/lib/xmodule/xmodule/js/src/peergrading/peer_grading_problem.coffee @@ -309,6 +309,7 @@ class @PeerGradingProblem if Rubric.check_complete() # show button if we have scores for all categories @show_submit_button() + @grade = Rubric.get_total_score() @@ -382,6 +383,7 @@ class @PeerGradingProblem # render common information between calibration and grading render_submission_data: (response) => @content_panel.show() + @error_container.hide() @submission_container.append(@make_paragraphs(response.student_response)) @prompt_container.html(response.prompt) From 1b465d1beb0fe744199dc8c7d222563e3199a2e3 Mon Sep 17 00:00:00 2001 From: Brian Wilson Date: Tue, 5 Feb 2013 18:01:55 -0500 Subject: [PATCH 164/347] implement testcenter_login --- common/djangoapps/student/views.py | 130 ++++++++++++++++++++++++++-- lms/djangoapps/courseware/models.py | 4 + lms/djangoapps/courseware/views.py | 6 +- 3 files changed, 131 insertions(+), 9 deletions(-) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index b583599e97..9312f7b76a 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -1,12 +1,10 @@ import datetime import feedparser -#import itertools import json import logging import random import string import sys -#import time import urllib import uuid @@ -18,10 +16,13 @@ from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.core.context_processors import csrf from django.core.mail import send_mail +from django.core.urlresolvers import reverse from django.core.validators import validate_email, validate_slug, ValidationError from django.db import IntegrityError -from django.http import HttpResponse, HttpResponseForbidden, Http404 +from django.http import HttpResponse, HttpResponseForbidden, Http404,\ + HttpResponseRedirect from django.shortcuts import redirect + from mitxmako.shortcuts import render_to_response, render_to_string from bs4 import BeautifulSoup from django.core.cache import cache @@ -39,11 +40,11 @@ from xmodule.course_module import CourseDescriptor from xmodule.modulestore.exceptions import ItemNotFoundError from xmodule.modulestore.django import modulestore -#from datetime import date from collections import namedtuple from courseware.courses import get_courses, sort_by_announcement from courseware.access import has_access +from courseware.models import TimedModule from statsd import statsd @@ -1058,7 +1059,7 @@ def accept_name_change(request): # TODO: This is a giant kludge to give Pearson something to test against ASAP. # Will need to get replaced by something that actually ties into TestCenterUser @csrf_exempt -def test_center_login(request): +def atest_center_login(request): if not settings.MITX_FEATURES.get('ENABLE_PEARSON_HACK_TEST'): raise Http404 @@ -1076,6 +1077,125 @@ def test_center_login(request): return HttpResponseForbidden() +@csrf_exempt +def test_center_login(request): + # errors are returned by navigating to the error_url, adding a query parameter named "code" + # which contains the error code describing the exceptional condition. + def makeErrorURL(error_url, error_code): + return "{}&code={}".format(error_url, error_code); + + # get provided error URL, which will be used as a known prefix for returning error messages to the + # Pearson shell. It does not have a trailing slash, so we need to add one when creating output URLs. + error_url = request.POST.get("errorURL") + + # check that the parameters have not been tampered with, by comparing the code provided by Pearson + # with the code we calculate for the same parameters. + if 'code' not in request.POST: + return HttpResponseRedirect(makeErrorURL(error_url, "missingSecurityCode")); + code = request.POST.get("code") + + # calculate SHA for query string + # TODO: figure out how to get the original query string, so we can hash it and compare. + + + if 'clientCandidateID' not in request.POST: + return HttpResponseRedirect(makeErrorURL(error_url, "missingClientCandidateID")); + client_candidate_id = request.POST.get("clientCandidateID") + + # TODO: check remaining parameters, and maybe at least log if they're not matching + # expected values.... + # registration_id = request.POST.get("registrationID") + # exit_url = request.POST.get("exitURL") + + + # find testcenter_user that matches the provided ID: + try: + testcenteruser = TestCenterUser.objects.get(client_candidate_id=client_candidate_id) + except TestCenterUser.DoesNotExist: + return HttpResponseRedirect(makeErrorURL(error_url, "invalidClientCandidateID")); + + + # find testcenter_registration that matches the provided exam code: + # Note that we could rely on either the registrationId or the exam code, + # or possibly both. + if 'vueExamSeriesCode' not in request.POST: + # TODO: confirm this error code (made up, not in documentation) + return HttpResponseRedirect(makeErrorURL(error_url, "missingExamSeriesCode")); + exam_series_code = request.POST.get('vueExamSeriesCode') + + registrations = TestCenterRegistration.objects.filter(testcenter_user=testcenteruser, exam_series_code=exam_series_code) + + if not registrations: + return HttpResponseRedirect(makeErrorURL(error_url, "noTestsAssigned")); + + # TODO: figure out what to do if there are more than one registrations.... + # for now, just take the first... + registration = registrations[0] + course_id = registration.course_id + + # if we want to look up whether the test has already been taken, or to + # communicate that a time accommodation needs to be applied, we need to + # know the module_id to use that corresponds to the particular exam_series_code. + # For now, we can hardcode that... + if exam_series_code == '6002x001': + chapter_url_name = 'Final_Exam' + section_url_name = 'Final_Exam_Fall_2012' + redirect_url = reverse('courseware_section', args=[course_id, chapter_url_name, section_url_name]) + location = 'i4x://MITx/6.002x/2012_Fall/sequence/Final_Exam_Fall_2012' + else: + # TODO: clarify if this is the right error code for this condition. + return HttpResponseRedirect(makeErrorURL(error_url, "incorrectCandidateTests")); + + + time_accommodation_mapping = {'ET12ET' : 'ADDHALFTIME', + 'ET30MN' : 'ADD30MIN', + 'ETDBTM' : 'ADDDOUBLE', } + + # check if the test has already been taken + timed_modules = TimedModule.objects.filter(student=testcenteruser.user, course_id=course_id, module_state_key=location) + if timed_modules: + timed_module = timed_modules[0] + if timed_module.has_ended: + return HttpResponseRedirect(makeErrorURL(error_url, "allTestsTaken")); + elif registration.get_accommodation_codes(): + # we don't have a timed module created yet, so if we have time accommodations + # to implement, create an entry now: + time_accommodation_code = None + for code in registration.get_accommodation_codes(): + if code in time_accommodation_mapping: + time_accommodation_code = time_accommodation_mapping[code] + if client_candidate_id == "edX003671291147": + time_accommodation_code = 'TESTING' + if time_accommodation_code: + timed_module = TimedModule(student=request.user, course_id=course_id, module_state_key=location) + timed_module.accommodation_code = time_accommodation_code + timed_module.save() + + # Now log the user in: +# user = authenticate(username=testcenteruser.user.username, +# password=testcenteruser.user.password) +# +# if user is None: +# # argh. We couldn't login! +# return HttpResponseRedirect(makeErrorURL(error_url, "ARGH! User cannot log in")); + + # UGLY HACK!!! + # Login assumes that authentication has occurred, and that there is a + # backend annotation on the user object, indicating which backend + # against which the user was authenticated. We're authenticating here + # against the registration entry, and assuming that the request given + # this information is correct, we allow the user to be logged in + # without a password. This could all be formalized in a backend object + # that does the above checking. + # TODO: create a backend class to do this. + # testcenteruser.user.backend = "%s.%s" % (backend.__module__, backend.__class__.__name__) + testcenteruser.user.backend = "%s.%s" % ("TestcenterAuthenticationModule", "TestcenterAuthenticationClass") + login(request, testcenteruser.user) + + # And start the test: + return redirect(redirect_url) + + def _get_news(top=None): "Return the n top news items on settings.RSS_URL" diff --git a/lms/djangoapps/courseware/models.py b/lms/djangoapps/courseware/models.py index bd2da02027..00079d30f2 100644 --- a/lms/djangoapps/courseware/models.py +++ b/lms/djangoapps/courseware/models.py @@ -239,6 +239,7 @@ class TimedModule(models.Model): ('ADDHALFTIME', 'Extra Time - 1 1/2 Time'), ('ADD30MIN', 'Extra Time - 30 Minutes'), ('DOUBLE', 'Extra Time - Double Time'), + ('TESTING', 'Extra Time -- Large amount for testing purposes') ) accommodation_code = models.CharField(max_length=12, choices=TIME_ACCOMMODATION_CODES, default='NONE', db_index=True) @@ -256,6 +257,9 @@ class TimedModule(models.Model): return (duration + (30 * 60)) elif self.accommodation_code == 'DOUBLE': return (duration * 2) + elif self.accommodation_code == 'TESTING': + # when testing, set timer to run for a week at a time. + return 3600 * 24 * 7 # store state: diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index 2484aa5c6b..5afda7b181 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -415,9 +415,8 @@ def timed_exam(request, course_id, chapter, section): duration = int(section_descriptor.metadata.get('duration')) # get corresponding time module, if one is present: - # TODO: determine what to use for module_key... try: - timed_module = TimedModule.objects.get(student=request.user, course_id=course_id) + timed_module = TimedModule.objects.get(student=request.user, course_id=course_id, module_state_key=section_module.id) # if a module exists, check to see if it has already been started, # and if it has already ended. @@ -447,8 +446,7 @@ def timed_exam(request, course_id, chapter, section): except TimedModule.DoesNotExist: # no entry found. So we're starting this test # without any accommodations being preset. - # TODO: determine what to use for module_key... - timed_module = TimedModule(student=request.user, course_id=course_id) + timed_module = TimedModule(student=request.user, course_id=course_id, module_state_key=section_module.id) timed_module.begin(duration) timed_module.save() From 4614687e7fe69b29972bfe77f53338c808bed877 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 18:24:18 -0500 Subject: [PATCH 165/347] Debug image submissions --- common/lib/xmodule/xmodule/open_ended_image_submission.py | 8 ++++++-- common/lib/xmodule/xmodule/openendedchild.py | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/common/lib/xmodule/xmodule/open_ended_image_submission.py b/common/lib/xmodule/xmodule/open_ended_image_submission.py index 196f396d65..0dba335d08 100644 --- a/common/lib/xmodule/xmodule/open_ended_image_submission.py +++ b/common/lib/xmodule/xmodule/open_ended_image_submission.py @@ -128,13 +128,15 @@ class ImageProperties(object): image_is_okay = False try: #image_is_okay = self.count_colors() and self.get_skin_ratio() and not self.image_too_large - image_is_okay = self.image_too_large + image_is_okay = not self.image_too_large except: log.exception("Could not run image tests.") if not ENABLE_PIL: image_is_okay = True + #log.debug("Image OK: {0}".format(image_is_okay)) + return image_is_okay @@ -252,7 +254,9 @@ def upload_to_s3(file_to_upload, keyname): return True, public_url except: - return False, "Could not connect to S3." + error_message = "Could not connect to S3." + log.exception(error_message) + return False, error_message def get_from_s3(s3_public_url): diff --git a/common/lib/xmodule/xmodule/openendedchild.py b/common/lib/xmodule/xmodule/openendedchild.py index 7151ac0723..88dfb83f58 100644 --- a/common/lib/xmodule/xmodule/openendedchild.py +++ b/common/lib/xmodule/xmodule/openendedchild.py @@ -316,7 +316,7 @@ class OpenEndedChild(object): image_tag = "" image_ok = False if 'can_upload_files' in get_data: - if get_data['can_upload_files'] == 'true': + if get_data['can_upload_files'] in ['true', '1']: has_file_to_upload = True file = get_data['student_file'][0] uploaded_to_s3, image_ok, s3_public_url = self.upload_image_to_s3(file) @@ -355,7 +355,7 @@ class OpenEndedChild(object): elif has_file_to_upload and not uploaded_to_s3 and image_ok: #In this case, an image was submitted by the student, but the image could not be uploaded to S3. Likely #a config issue (development vs deployment). For now, just treat this as a "success" - log.warning("Student AJAX post to combined open ended xmodule indicated that it contained an image, " + log.exception("Student AJAX post to combined open ended xmodule indicated that it contained an image, " "but the image was not able to be uploaded to S3. This could indicate a config" "issue with this deployment, but it could also indicate a problem with S3 or with the" "student image itself.") @@ -365,6 +365,8 @@ class OpenEndedChild(object): success, get_data['student_answer'] = self.check_for_url_in_text(get_data['student_answer']) overall_success = success + #log.debug("Has file: {0} Uploaded: {1} Image Ok: {2}".format(has_file_to_upload, uploaded_to_s3, image_ok)) + return overall_success, get_data def check_for_url_in_text(self, string): From d5b70d7bfc9fce42ef3b3c742239560039735639 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 5 Feb 2013 18:38:06 -0500 Subject: [PATCH 166/347] inline cohorting working --- .../test_files/js/test_problem_display.js | 2 +- .../test_files/js/test_problem_generator.js | 2 +- .../test_files/js/test_problem_grader.js | 2 +- .../capa/capa/tests/test_files/js/xproblem.js | 2 +- .../discussion/discussion_module_view.coffee | 12 +++-- .../views/new_post_inline_vew.coffee | 2 + .../django_comment_client/forum/views.py | 51 ++++++++++++------- lms/djangoapps/django_comment_client/utils.py | 2 +- lms/templates/discussion/_new_post.html | 6 +-- lms/templates/discussion/_single_thread.html | 1 + .../discussion/_underscore_templates.html | 2 +- .../discussion/mustache/_content.mustache | 1 + .../mustache/_inline_discussion.mustache | 3 +- 13 files changed, 56 insertions(+), 32 deletions(-) diff --git a/common/lib/capa/capa/tests/test_files/js/test_problem_display.js b/common/lib/capa/capa/tests/test_files/js/test_problem_display.js index 35b619c6ec..b61569acea 100644 --- a/common/lib/capa/capa/tests/test_files/js/test_problem_display.js +++ b/common/lib/capa/capa/tests/test_files/js/test_problem_display.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.4.0 (function() { var MinimaxProblemDisplay, root, __hasProp = {}.hasOwnProperty, diff --git a/common/lib/capa/capa/tests/test_files/js/test_problem_generator.js b/common/lib/capa/capa/tests/test_files/js/test_problem_generator.js index b2f01ed252..4b1d133723 100644 --- a/common/lib/capa/capa/tests/test_files/js/test_problem_generator.js +++ b/common/lib/capa/capa/tests/test_files/js/test_problem_generator.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.4.0 (function() { var TestProblemGenerator, root, __hasProp = {}.hasOwnProperty, diff --git a/common/lib/capa/capa/tests/test_files/js/test_problem_grader.js b/common/lib/capa/capa/tests/test_files/js/test_problem_grader.js index 34dfff35cc..80d7ad1690 100644 --- a/common/lib/capa/capa/tests/test_files/js/test_problem_grader.js +++ b/common/lib/capa/capa/tests/test_files/js/test_problem_grader.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.4.0 (function() { var TestProblemGrader, root, __hasProp = {}.hasOwnProperty, diff --git a/common/lib/capa/capa/tests/test_files/js/xproblem.js b/common/lib/capa/capa/tests/test_files/js/xproblem.js index 512cf22739..55a469f7c1 100644 --- a/common/lib/capa/capa/tests/test_files/js/xproblem.js +++ b/common/lib/capa/capa/tests/test_files/js/xproblem.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.3.3 +// Generated by CoffeeScript 1.4.0 (function() { var XProblemDisplay, XProblemGenerator, XProblemGrader, root; diff --git a/common/static/coffee/src/discussion/discussion_module_view.coffee b/common/static/coffee/src/discussion/discussion_module_view.coffee index f4157124d6..6fce4c66cb 100644 --- a/common/static/coffee/src/discussion/discussion_module_view.coffee +++ b/common/static/coffee/src/discussion/discussion_module_view.coffee @@ -73,10 +73,14 @@ if Backbone? # $elem.html("Hide Discussion") @discussion = new Discussion() @discussion.reset(response.discussion_data, {silent: false}) - if response.is_cohorted - $discussion = $(Mustache.render $("script#_inline_discussion_cohorted").html(), {'threads':response.discussion_data, 'discussionId': discussionId, 'allow_anonymous_to_peers': allow_anonymous_to_peers, 'allow_anonymous': allow_anonymous}) - else - $discussion = $(Mustache.render $("script#_inline_discussion").html(), {'threads':response.discussion_data, 'discussionId': discussionId, 'allow_anonymous_to_peers': allow_anonymous_to_peers, 'allow_anonymous': allow_anonymous}) + + #rather than have two different templates to get around (or take advantage of?) + #mustache's logic free templates, we added a 'group string' to each thread for inline + #discussions for the use case where a commentable is cohorted, but a global + #thread is posted by a TA + + $discussion = $(Mustache.render $("script#_inline_discussion").html(), {'threads':response.discussion_data, 'discussionId': discussionId, 'allow_anonymous_to_peers': allow_anonymous_to_peers, 'allow_anonymous': allow_anonymous}) + if @$('section.discussion').length @$('section.discussion').replaceWith($discussion) else diff --git a/common/static/coffee/src/discussion/views/new_post_inline_vew.coffee b/common/static/coffee/src/discussion/views/new_post_inline_vew.coffee index ed5ee13919..ffd43ff7bf 100644 --- a/common/static/coffee/src/discussion/views/new_post_inline_vew.coffee +++ b/common/static/coffee/src/discussion/views/new_post_inline_vew.coffee @@ -25,6 +25,7 @@ if Backbone? event.preventDefault() title = @$(".new-post-title").val() body = @$(".new-post-body").find(".wmd-input").val() + group = @$(".new-post-group option:selected").attr("value") # TODO tags: commenting out til we know what to do with them #tags = @$(".new-post-tags").val() @@ -45,6 +46,7 @@ if Backbone? data: title: title body: body + group_id: group # TODO tags: commenting out til we know what to do with them #tags: tags diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 7e87e32389..6de453e1ee 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -75,9 +75,12 @@ def get_threads(request, course_id, discussion_id=None, per_page=THREADS_PER_PAG #now add the group name if the thread has a group id for thread in threads: - if thread.get('group_id') and not thread.get('group_name'): - thread['group_name'] = get_cohort_by_id(course_id, thread.get('group_id')).name - + if thread.get('group_id'): + thread['group_name'] = get_cohort_by_id(course_id, thread.get('group_id')).name + thread['group_string'] = "This post visible only to Group ${group_name}." + else: + thread['group_name'] = "" + thread['group_string'] = "This post visible to everyone." query_params['page'] = page query_params['num_pages'] = num_pages @@ -85,6 +88,7 @@ def get_threads(request, course_id, discussion_id=None, per_page=THREADS_PER_PAG return threads, query_params def inline_discussion(request, course_id, discussion_id): + """ Renders JSON for DiscussionModules """ @@ -107,24 +111,26 @@ def inline_discussion(request, course_id, discussion_id): allow_anonymous = course.metadata.get("allow_anonymous", True) allow_anonymous_to_peers = course.metadata.get("allow_anonymous_to_peers", False) - #if we can't get the user's cohort, default to visible to all, treat as if the discussion is not cohoroted is_cohorted = is_course_cohorted(course_id) and is_commentable_cohorted(course_id, discussion_id) + cohorts_list = list() + if is_cohorted: - cohorts_dict = dict() + #if you're a mod, send all cohorts and let you pick - if cached_has_permission(request.user, "see_all_cohorts", course_id): + if cached_has_permission(request.user, "see_all_cohorts", course_id) or True: cohorts = get_course_cohorts(course_id) for c in cohorts: - cohorts_dict[c.name]=c.id + cohorts_list.append({'name':c.name, 'id':c.id}) + else: #otherwise, just make a dictionary of two user_cohort = get_cohort_id(user, course_id) - cohorts_dict["All Groups"] = None + cohorts_list.append({'name':'All Groups','id':None}) if user_cohort: - cohorts_dict[user_cohort.name] = user_cohort.id - else: - cohorts_dict = None + cohorts_list.append({'name':user_cohort.name, 'id':user_cohort.id}) + else: + cohorts_list = None return utils.JsonResponse({ @@ -136,12 +142,13 @@ def inline_discussion(request, course_id, discussion_id): 'roles': utils.get_role_ids(course_id), 'allow_anonymous_to_peers': allow_anonymous_to_peers, 'allow_anonymous': allow_anonymous, - 'cohorts': cohorts_dict, + 'cohorts': cohorts_list, 'is_cohorted': is_cohorted }) @login_required def forum_form_discussion(request, course_id): + """ Renders the main Discussion page, potentially filtered by a search query """ @@ -181,8 +188,10 @@ def forum_form_discussion(request, course_id): #trending_tags = cc.search_trending_tags( # course_id, #) - cohorts = get_course_cohorts(course_id) + cohorted_commentables = get_cohorted_commentables(course_id) + + user_cohort_id = get_cohort_id(request.user, course_id) context = { 'csrf': csrf(request)['csrf_token'], @@ -199,8 +208,8 @@ def forum_form_discussion(request, course_id): 'roles': saxutils.escape(json.dumps(utils.get_role_ids(course_id)), escapedict), 'is_moderator': cached_has_permission(request.user, "see_all_cohorts", course_id), 'cohorts': cohorts, - 'user_cohort': get_cohort_id(user, course_id), - 'cohorted_commentables': get_cohorted_commentables(course_id), + 'user_cohort': user_cohort_id, + 'cohorted_commentables': cohorted_commentables, 'is_course_cohorted': is_course_cohorted(course_id) } # print "start rendering.." @@ -208,7 +217,6 @@ def forum_form_discussion(request, course_id): @login_required def single_thread(request, course_id, discussion_id, thread_id): - course = get_course_with_access(request.user, course_id, 'load') cc_user = cc.User.from_django_user(request.user) user_info = cc_user.to_dict() @@ -222,7 +230,7 @@ def single_thread(request, course_id, discussion_id, thread_id): if request.is_ajax(): courseware_context = get_courseware_context(thread, course) - + annotated_content_info = utils.get_annotated_content_infos(course_id, thread, request.user, user_info=user_info) context = {'thread': thread.to_dict(), 'course_id': course_id} # TODO: Remove completely or switch back to server side rendering @@ -268,6 +276,10 @@ def single_thread(request, course_id, discussion_id, thread_id): #) annotated_content_info = utils.get_metadata_for_threads(course_id, threads, request.user, user_info) + + cohorts = get_course_cohorts(course_id) + cohorted_commentables = get_cohorted_commentables(course_id) + user_cohort = get_cohort_id(request.user, course_id) context = { 'discussion_id': discussion_id, @@ -284,6 +296,11 @@ def single_thread(request, course_id, discussion_id, thread_id): 'category_map': category_map, 'roles': saxutils.escape(json.dumps(utils.get_role_ids(course_id)), escapedict), 'thread_pages': query_params['num_pages'], + 'is_course_cohorted': is_course_cohorted(course_id), + 'is_moderator': cached_has_permission(request.user, "see_all_cohorts", course_id) or True, + 'cohorts': cohorts, + 'user_cohort': get_cohort_id(request.user, course_id), + 'cohorted_commentables': cohorted_commentables } return render_to_response('discussion/single_thread.html', context) diff --git a/lms/djangoapps/django_comment_client/utils.py b/lms/djangoapps/django_comment_client/utils.py index aed6938f38..4d8d3e22e2 100644 --- a/lms/djangoapps/django_comment_client/utils.py +++ b/lms/djangoapps/django_comment_client/utils.py @@ -374,7 +374,7 @@ def safe_content(content): 'updated_at', 'depth', 'type', 'commentable_id', 'comments_count', 'at_position_list', 'children', 'highlighted_title', 'highlighted_body', 'courseware_title', 'courseware_url', 'tags', 'unread_comments_count', - 'read', 'group_id', 'group_name' + 'read', 'group_id', 'group_name', 'group_string' ] if (content.get('anonymous') is False) and (content.get('anonymous_to_peers') is False): diff --git a/lms/templates/discussion/_new_post.html b/lms/templates/discussion/_new_post.html index a009f19350..223b593368 100644 --- a/lms/templates/discussion/_new_post.html +++ b/lms/templates/discussion/_new_post.html @@ -22,8 +22,6 @@ - -
    @@ -58,7 +56,9 @@ %endfor %else: - + %if user_cohort: + + %endif %endif diff --git a/lms/templates/discussion/_single_thread.html b/lms/templates/discussion/_single_thread.html index d4115668a8..0dec32ad47 100644 --- a/lms/templates/discussion/_single_thread.html +++ b/lms/templates/discussion/_single_thread.html @@ -4,6 +4,7 @@
    +
    %if thread['group_id']
    This post visible only to group ${cohort_dictionary[thread['group_id']]}.
    diff --git a/lms/templates/discussion/_underscore_templates.html b/lms/templates/discussion/_underscore_templates.html index 08c1890f7f..9182323568 100644 --- a/lms/templates/discussion/_underscore_templates.html +++ b/lms/templates/discussion/_underscore_templates.html @@ -28,7 +28,7 @@
    ${"<% if (obj.group_id) { %>"} -
    This post visible only to Group ${"<%- obj.group_name%>"}.
    +
    ${"<%- obj.group_string%>"}.
    ${"<% } %>"} + ${'<%- votes["up_count"] %>'} diff --git a/lms/templates/discussion/mustache/_content.mustache b/lms/templates/discussion/mustache/_content.mustache index 8f2ebca2a9..6bcf048915 100644 --- a/lms/templates/discussion/mustache/_content.mustache +++ b/lms/templates/discussion/mustache/_content.mustache @@ -1,4 +1,5 @@
    +CONTENT MUSTACHE
    diff --git a/lms/templates/discussion/mustache/_inline_discussion.mustache b/lms/templates/discussion/mustache/_inline_discussion.mustache index 0140a6221a..c9252bd9f3 100644 --- a/lms/templates/discussion/mustache/_inline_discussion.mustache +++ b/lms/templates/discussion/mustache/_inline_discussion.mustache @@ -1,6 +1,4 @@
    - -
    @@ -36,6 +34,7 @@
    {{#threads}} +
    {{group_string}}
    {{/threads}} From 8877ec3500ddf111294ff306086b0fb3ec35b2a0 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 18:38:21 -0500 Subject: [PATCH 167/347] More robust default version --- common/lib/xmodule/xmodule/combined_open_ended_module.py | 1 + 1 file changed, 1 insertion(+) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index 3e0a3b27a5..7ff9df2c24 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -29,6 +29,7 @@ VERSION_TUPLES = ( ) DEFAULT_VERSION = 1 +DEFAULT_VERSION = str(DEFAULT_VERSION) class CombinedOpenEndedModule(XModule): """ From 119b4206a4b6e4012fae64c1a68f25e62b77f6b0 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Tue, 5 Feb 2013 18:42:01 -0500 Subject: [PATCH 168/347] Revert "Fix permissions bug and add test cases for django comment client permissions." This reverts commit e7450874557b48c5479dad6bc9f008c6c50100ce. --- .../django_comment_client/permissions.py | 7 +- lms/djangoapps/django_comment_client/tests.py | 111 +++++++++++++++ .../django_comment_client/tests/__init__.py | 0 .../tests/test_permissions.py | 128 ------------------ 4 files changed, 113 insertions(+), 133 deletions(-) create mode 100644 lms/djangoapps/django_comment_client/tests.py delete mode 100644 lms/djangoapps/django_comment_client/tests/__init__.py delete mode 100644 lms/djangoapps/django_comment_client/tests/test_permissions.py diff --git a/lms/djangoapps/django_comment_client/permissions.py b/lms/djangoapps/django_comment_client/permissions.py index b583c3fe74..b95a890dda 100644 --- a/lms/djangoapps/django_comment_client/permissions.py +++ b/lms/djangoapps/django_comment_client/permissions.py @@ -29,7 +29,6 @@ def has_permission(user, permission, course_id=None): CONDITIONS = ['is_open', 'is_author'] -# data may be a json file def check_condition(user, condition, course_id, data): def check_open(user, condition, course_id, data): try: @@ -62,10 +61,8 @@ def check_conditions_permissions(user, permissions, course_id, **kwargs): def test(user, per, operator="or"): if isinstance(per, basestring): if per in CONDITIONS: - return check_condition(user, per, course_id, kwargs['data']) + return check_condition(user, per, course_id, kwargs) return cached_has_permission(user, per, course_id=course_id) - # TODO: refactor this to be more clear. - # e.g. the "and operator in" bit on the next line is not needed? elif isinstance(per, list) and operator in ["and", "or"]: results = [test(user, x, operator="and") for x in per] if operator == "or": @@ -105,4 +102,4 @@ def check_permissions_by_view(user, course_id, content, name): p = VIEW_PERMISSIONS[name] except KeyError: logging.warning("Permission for view named %s does not exist in permissions.py" % name) - return check_conditions_permissions(user, p, course_id, data=content) + return check_conditions_permissions(user, p, course_id, content=content) diff --git a/lms/djangoapps/django_comment_client/tests.py b/lms/djangoapps/django_comment_client/tests.py new file mode 100644 index 0000000000..ac059a1e3f --- /dev/null +++ b/lms/djangoapps/django_comment_client/tests.py @@ -0,0 +1,111 @@ +from django.contrib.auth.models import User, Group +from django.core.urlresolvers import reverse +from django.test import TestCase +from django.test.client import RequestFactory +from django.conf import settings + +from mock import Mock + +from override_settings import override_settings + +import xmodule.modulestore.django + +from student.models import CourseEnrollment + +from django.db.models.signals import m2m_changed, pre_delete, pre_save, post_delete, post_save +from django.dispatch.dispatcher import _make_id +import string +import random +from .permissions import has_permission +from .models import Role, Permission + +from xmodule.modulestore.django import modulestore +from xmodule.modulestore import Location +from xmodule.modulestore.xml_importer import import_from_xml +from xmodule.modulestore.xml import XMLModuleStore + +import comment_client + +from courseware.tests.tests import PageLoader, TEST_DATA_XML_MODULESTORE + +#@override_settings(MODULESTORE=TEST_DATA_XML_MODULESTORE) +#class TestCohorting(PageLoader): +# """Check that cohorting works properly""" +# +# def setUp(self): +# xmodule.modulestore.django._MODULESTORES = {} +# +# # Assume courses are there +# self.toy = modulestore().get_course("edX/toy/2012_Fall") +# +# # Create two accounts +# self.student = 'view@test.com' +# self.student2 = 'view2@test.com' +# self.password = 'foo' +# self.create_account('u1', self.student, self.password) +# self.create_account('u2', self.student2, self.password) +# self.activate_user(self.student) +# self.activate_user(self.student2) +# +# def test_create_thread(self): +# my_save = Mock() +# comment_client.perform_request = my_save +# +# resp = self.client.post( +# reverse('django_comment_client.base.views.create_thread', +# kwargs={'course_id': 'edX/toy/2012_Fall', +# 'commentable_id': 'General'}), +# {'some': "some", +# 'data': 'data'}) +# self.assertTrue(my_save.called) +# +# #self.assertEqual(resp.status_code, 200) +# #self.assertEqual(my_save.something, "expected", "complaint if not true") +# +# self.toy.metadata["cohort_config"] = {"cohorted": True} +# +# # call the view again ... +# +# # assert that different things happened + + + +class PermissionsTestCase(TestCase): + def random_str(self, length=15, chars=string.ascii_uppercase + string.digits): + return ''.join(random.choice(chars) for x in range(length)) + + def setUp(self): + + self.course_id = "edX/toy/2012_Fall" + + self.moderator_role = Role.objects.get_or_create(name="Moderator", course_id=self.course_id)[0] + self.student_role = Role.objects.get_or_create(name="Student", course_id=self.course_id)[0] + + self.student = User.objects.create(username=self.random_str(), + password="123456", email="john@yahoo.com") + self.moderator = User.objects.create(username=self.random_str(), + password="123456", email="staff@edx.org") + self.moderator.is_staff = True + self.moderator.save() + self.student_enrollment = CourseEnrollment.objects.create(user=self.student, course_id=self.course_id) + self.moderator_enrollment = CourseEnrollment.objects.create(user=self.moderator, course_id=self.course_id) + + def tearDown(self): + self.student_enrollment.delete() + self.moderator_enrollment.delete() + +# Do we need to have this? We shouldn't be deleting students, ever +# self.student.delete() +# self.moderator.delete() + + def testDefaultRoles(self): + self.assertTrue(self.student_role in self.student.roles.all()) + self.assertTrue(self.moderator_role in self.moderator.roles.all()) + + def testPermission(self): + name = self.random_str() + self.moderator_role.add_permission(name) + self.assertTrue(has_permission(self.moderator, name, self.course_id)) + + self.student_role.add_permission(name) + self.assertTrue(has_permission(self.student, name, self.course_id)) diff --git a/lms/djangoapps/django_comment_client/tests/__init__.py b/lms/djangoapps/django_comment_client/tests/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lms/djangoapps/django_comment_client/tests/test_permissions.py b/lms/djangoapps/django_comment_client/tests/test_permissions.py deleted file mode 100644 index 44e1a3a128..0000000000 --- a/lms/djangoapps/django_comment_client/tests/test_permissions.py +++ /dev/null @@ -1,128 +0,0 @@ -import string -import random -import collections - -import factory -from django.test import TestCase - -from django.contrib.auth.models import User -from student.models import UserProfile, CourseEnrollment -from django_comment_client.models import Role, Permission -import django_comment_client.permissions as p - -class UserFactory(factory.Factory): - FACTORY_FOR = User - username = 'robot' - password = '123456' - email = 'robot@edx.org' - is_active = True - is_staff = False - -class CourseEnrollmentFactory(factory.Factory): - FACTORY_FOR = CourseEnrollment - user = factory.SubFactory(UserFactory) - course_id = 'edX/toy/2012_Fall' - -class RoleFactory(factory.Factory): - FACTORY_FOR = Role - name = 'Student' - course_id = 'edX/toy/2012_Fall' - -class PermissionFactory(factory.Factory): - FACTORY_FOR = Permission - name = 'create_comment' - - -class PermissionsTestCase(TestCase): - def setUp(self): - self.course_id = "edX/toy/2012_Fall" - - self.student_role = RoleFactory(name='Student') - self.moderator_role = RoleFactory(name='Moderator') - self.student = UserFactory(username='student', email='student@edx.org') - self.moderator = UserFactory(username='moderator', email='staff@edx.org', is_staff=True) - self.update_thread_permission = PermissionFactory(name='update_thread') - self.update_thread_permission.roles.add(self.student_role) - self.update_thread_permission.roles.add(self.moderator_role) - self.manage_moderator_permission = PermissionFactory(name='manage_moderator') - self.manage_moderator_permission.roles.add(self.moderator_role) - self.student_enrollment = CourseEnrollmentFactory(user=self.student) - self.moderator_enrollment = CourseEnrollmentFactory(user=self.moderator) - - self.student_open_thread = {'content': { - 'closed': False, - 'user_id': str(self.student.id)} - } - self.student_closed_thread = {'content': { - 'closed': True, - 'user_id': str(self.student.id)} - } - - def test_user_has_permission(self): - s_ut = p.has_permission(self.student, 'update_thread', self.course_id) - m_ut = p.has_permission(self.moderator, 'update_thread', self.course_id) - s_mm = p.has_permission(self.student, 'manage_moderator', self.course_id) - m_mm = p.has_permission(self.moderator, 'manage_moderator', self.course_id) - self.assertTrue(s_ut) - self.assertTrue(m_ut) - self.assertFalse(s_mm) - self.assertTrue(m_mm) - - def test_check_conditions(self): - # Checks whether the discussion thread is open, or whether the author is user - s_o = p.check_condition(self.student, 'is_open', self.course_id, self.student_open_thread) - s_a = p.check_condition(self.student, 'is_author', self.course_id, self.student_open_thread) - m_c = p.check_condition(self.moderator, 'is_open', self.course_id, self.student_closed_thread) - m_a = p.check_condition(self.moderator,'is_author', self.course_id, self.student_open_thread) - self.assertTrue(s_o) - self.assertTrue(s_a) - self.assertFalse(m_c) - self.assertFalse(m_a) - - def test_check_conditions_and_permissions(self): - # Check conditions - ret = p.check_conditions_permissions(self.student, - 'is_open', - self.course_id, - data=self.student_open_thread) - self.assertTrue(ret) - - # Check permissions - ret = p.check_conditions_permissions(self.student, - 'update_thread', - self.course_id, - data=self.student_open_thread) - self.assertTrue(ret) - - # Check that a list of permissions/conditions will be OR'd - ret = p.check_conditions_permissions(self.moderator, - ['is_open','manage_moderator'], - self.course_id, - data=self.student_open_thread) - self.assertTrue(ret) - - # Check that a list of permissions will be OR'd - ret = p.check_conditions_permissions(self.student, - ['update_thread','manage_moderator'], - self.course_id, - data=self.student_open_thread) - self.assertTrue(ret) - - # Check that a list of list of permissions will be AND'd - ret = p.check_conditions_permissions(self.student, - [['update_thread','manage_moderator']], - self.course_id, - data=self.student_open_thread) - self.assertFalse(ret) - - def test_check_permissions_by_view(self): - ret = p.check_permissions_by_view(self.student, self.course_id, - self.student_open_thread, 'openclose_thread') - self.assertFalse(ret) - - # Check a view permission that includes both a condition and a permission - self.vote_permission = PermissionFactory(name='vote') - self.vote_permission.roles.add(self.student_role) - ret = p.check_permissions_by_view(self.student, self.course_id, - self.student_open_thread, 'vote_for_comment') - self.assertTrue(ret) \ No newline at end of file From a3a886bd0f8ece9388d13af7de16bc94f07851ec Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Tue, 5 Feb 2013 18:51:16 -0500 Subject: [PATCH 169/347] Revert "Add tests for django-comment-client models" (which actually had a model change as well) This reverts commit 053547453ec641feb755247a90cc61560a1f44c0. --- .../django_comment_client/models.py | 8 ++- .../tests/test_models.py | 54 ------------------- 2 files changed, 3 insertions(+), 59 deletions(-) delete mode 100644 lms/djangoapps/django_comment_client/tests/test_models.py diff --git a/lms/djangoapps/django_comment_client/models.py b/lms/djangoapps/django_comment_client/models.py index 3c3ab2bb53..10c05c75e9 100644 --- a/lms/djangoapps/django_comment_client/models.py +++ b/lms/djangoapps/django_comment_client/models.py @@ -46,13 +46,11 @@ class Role(models.Model): def add_permission(self, permission): self.permissions.add(Permission.objects.get_or_create(name=permission)[0]) - def has_permission(self, permission): course = get_course_by_id(self.course_id) - changing_comments = permission.startswith('edit') or \ - permission.startswith('update') or permission.startswith('create') - in_blackout_period = not course.forum_posts_allowed - if (self.name == FORUM_ROLE_STUDENT) and in_blackout_period and changing_comments: + if self.name == FORUM_ROLE_STUDENT and \ + (permission.startswith('edit') or permission.startswith('update') or permission.startswith('create')) and \ + (not course.forum_posts_allowed): return False return self.permissions.filter(name=permission).exists() diff --git a/lms/djangoapps/django_comment_client/tests/test_models.py b/lms/djangoapps/django_comment_client/tests/test_models.py deleted file mode 100644 index 3c9b05b202..0000000000 --- a/lms/djangoapps/django_comment_client/tests/test_models.py +++ /dev/null @@ -1,54 +0,0 @@ -import django_comment_client.models as models -import django_comment_client.permissions as permissions -from django.test import TestCase -from nose.plugins.skip import SkipTest -from courseware.courses import get_course_by_id - -class RoleClassTestCase(TestCase): - def setUp(self): - self.course_id = "edX/toy/2012_Fall" - self.student_role = models.Role.objects.create(name="Student", - course_id=self.course_id) - - def test_unicode(self): - self.assertEqual(str(self.student_role), "Student for edX/toy/2012_Fall") - - self.admin_for_all = models.Role.objects.create(name="Administrator") - self.assertEqual(str(self.admin_for_all), "Administrator for all courses") - - def test_has_permission(self): - self.student_role.add_permission("delete_thread") - self.TA_role = models.Role.objects.create(name="Community TA", - course_id=self.course_id) - self.assertTrue(self.student_role.has_permission("delete_thread")) - self.assertFalse(self.TA_role.has_permission("delete_thread")) - - # Toy course does not have a blackout period defined. - def test_students_can_create_if_not_during_blackout(self): - self.student_role.add_permission("create_comment") - self.assertTrue(self.student_role.has_permission("create_comment")) - - def test_students_cannot_create_during_blackout(self): - # Not sure how to set up these conditions - raise SkipTest() - - def test_inherit_permissions(self): - self.student_role.add_permission("delete_thread") - self.TA_role = models.Role.objects.create(name="Community TA", - course_id=self.course_id) - self.TA_role.inherit_permissions(self.student_role) - self.assertTrue(self.TA_role.has_permission("delete_thread")) - - # TODO: You should not be able to inherit permissions across courses? - def test_inherit_permissions_across_courses(self): - raise SkipTest() - self.student_role.add_permission("delete_thread") - self.course_id_2 = "MITx/6.002x/2012_Fall" - self.admin_role = models.Role.objects.create(name="Administrator", - course_id=self.course_id_2) - self.admin_role.inherit_permissions(self.student_role) - -class PermissionClassTestCase(TestCase): - def test_unicode(self): - self.permission = permissions.Permission.objects.create(name="test") - self.assertEqual(str(self.permission), "test") From 0fc50095d9e4813ea708925602b846950060b049 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 18:53:53 -0500 Subject: [PATCH 170/347] Fix combined open ended tests --- common/lib/xmodule/xmodule/combined_open_ended_modulev1.py | 2 +- common/lib/xmodule/xmodule/tests/test_combined_open_ended.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py b/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py index e21765f76b..f62c2d309a 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_modulev1.py @@ -137,7 +137,7 @@ class CombinedOpenEndedV1Module(): self.metadata = metadata self.display_name = metadata.get('display_name', "Open Ended") - self.rewrite_content_links = static_data['rewrite_content_links'] + self.rewrite_content_links = static_data.get('rewrite_content_links',"") # Load instance state diff --git a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py index c89f5ee848..d6e54cdd72 100644 --- a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py +++ b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py @@ -4,7 +4,7 @@ import unittest from xmodule.openendedchild import OpenEndedChild from xmodule.open_ended_module import OpenEndedModule -from xmodule.combined_open_ended_module import CombinedOpenEndedModule +from xmodule.combined_open_ended_modulev1 import CombinedOpenEndedV1Module from xmodule.modulestore import Location from lxml import etree @@ -314,7 +314,7 @@ class CombinedOpenEndedModuleTest(unittest.TestCase): descriptor = Mock() def setUp(self): - self.combinedoe = CombinedOpenEndedModule(test_system, self.location, self.definition, self.descriptor, self.static_data, metadata=self.metadata) + self.combinedoe = CombinedOpenEndedV1Module(test_system, self.location, self.definition, self.descriptor, self.static_data, metadata=self.metadata) def test_get_tag_name(self): name = self.combinedoe.get_tag_name("Tag") From a1e73392c1e9f41743fb383a1baf4a0e6065bdd1 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 19:02:21 -0500 Subject: [PATCH 171/347] Fix descriptor creation --- common/lib/xmodule/xmodule/combined_open_ended_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index 7ff9df2c24..2da15a4086 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -143,7 +143,7 @@ class CombinedOpenEndedModule(XModule): } self.child_descriptor = descriptors[version_index](self.system) - self.child_definition = CombinedOpenEndedV1Descriptor.definition_from_xml(etree.fromstring(definition['xml_string']), self.system) + self.child_definition = descriptors[version_index].definition_from_xml(etree.fromstring(definition['xml_string']), self.system) self.child_module = modules[version_index](self.system, location, self.child_definition, self.child_descriptor, instance_state = json.dumps(instance_state), metadata = self.metadata, static_data= static_data) From 94e6346cf2bdc0c1b2205c751a1539a3532d4382 Mon Sep 17 00:00:00 2001 From: Vik Paruchuri Date: Tue, 5 Feb 2013 19:04:30 -0500 Subject: [PATCH 172/347] Fix combined open ended tests --- common/lib/xmodule/xmodule/tests/test_combined_open_ended.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py index d6e54cdd72..6032e671d1 100644 --- a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py +++ b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py @@ -324,14 +324,14 @@ class CombinedOpenEndedModuleTest(unittest.TestCase): response_dict = self.combinedoe.get_last_response(0) self.assertEqual(response_dict['type'], "selfassessment") self.assertEqual(response_dict['max_score'], self.max_score) - self.assertEqual(response_dict['state'], CombinedOpenEndedModule.INITIAL) + self.assertEqual(response_dict['state'], CombinedOpenEndedV1Module.INITIAL) def test_update_task_states(self): changed = self.combinedoe.update_task_states() self.assertFalse(changed) current_task = self.combinedoe.current_task - current_task.change_state(CombinedOpenEndedModule.DONE) + current_task.change_state(CombinedOpenEndedV1Module.DONE) changed = self.combinedoe.update_task_states() self.assertTrue(changed) From 4110a4e28bdc9b647fc3e47d0b1a543a0245bfcb Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Fri, 21 Dec 2012 11:44:19 +0100 Subject: [PATCH 173/347] Protect against failure to load MathJax - e.g. if on a train and don't have access to S3 or the rest of the web --- .../xmodule/js/src/capa/display.coffee | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/capa/display.coffee b/common/lib/xmodule/xmodule/js/src/capa/display.coffee index 5890686c0e..57ff85298c 100644 --- a/common/lib/xmodule/xmodule/js/src/capa/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/capa/display.coffee @@ -11,8 +11,9 @@ class @Problem $(selector, @el) bind: => - @el.find('.problem > div').each (index, element) => - MathJax.Hub.Queue ["Typeset", MathJax.Hub, element] + if MathJax? + @el.find('.problem > div').each (index, element) => + MathJax.Hub.Queue ["Typeset", MathJax.Hub, element] window.update_schematics() @@ -31,8 +32,9 @@ class @Problem # Dynamath @$('input.math').keyup(@refreshMath) - @$('input.math').each (index, element) => - MathJax.Hub.Queue [@refreshMath, null, element] + if MathJax? + @$('input.math').each (index, element) => + MathJax.Hub.Queue [@refreshMath, null, element] updateProgress: (response) => if response.progress_changed @@ -230,8 +232,9 @@ class @Problem showMethod = @inputtypeShowAnswerMethods[cls] showMethod(inputtype, display, answers) if showMethod? - @el.find('.problem > div').each (index, element) => - MathJax.Hub.Queue ["Typeset", MathJax.Hub, element] + if MathJax? + @el.find('.problem > div').each (index, element) => + MathJax.Hub.Queue ["Typeset", MathJax.Hub, element] @$('.show').val 'Hide Answer' @el.addClass 'showed' @@ -273,7 +276,7 @@ class @Problem preprocessor_tag = "inputtype_" + elid mathjax_preprocessor = @inputtypeDisplays[preprocessor_tag] - if jax = MathJax.Hub.getAllJax(target)[0] + if MathJax? and jax = MathJax.Hub.getAllJax(target)[0] eqn = $(element).val() if mathjax_preprocessor eqn = mathjax_preprocessor(eqn) @@ -286,7 +289,8 @@ class @Problem $("##{element.id}_dynamath").val(jax.root.toMathML '') catch exception throw exception unless exception.restart - MathJax.Callback.After [@refreshMath, jax], exception.restart + if MathJax? + MathJax.Callback.After [@refreshMath, jax], exception.restart refreshAnswers: => @$('input.schematic').each (index, element) -> From 697c1d7bc9eba15c905f628c6df8b9e29be8d139 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Fri, 21 Dec 2012 12:47:00 +0100 Subject: [PATCH 174/347] sample script to log in and upload an answer to a problem --- common/lib/sample-post.py | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 common/lib/sample-post.py diff --git a/common/lib/sample-post.py b/common/lib/sample-post.py new file mode 100644 index 0000000000..21bf6d906b --- /dev/null +++ b/common/lib/sample-post.py @@ -0,0 +1,47 @@ +# A simple script demonstrating how to have an external program save results to the server + +import requests +import sys + +def prompt(msg, default=None): + d = ' [{0}]'.format(default) if default is not None else '' + print 'Enter {msg}{default}: '.format(msg=msg, default=d) + x = sys.stdin.readline().strip() + if x == '' and default is not None: + return default + return x + +# http://127.0.0.1:8000/courses/MITx/7012x/2013_Spring/modx/i4x://MITx/7012x/problem/example_functional_groups/problem_check + + +server = prompt('Server (no trailing slash)', 'http://127.0.0.1:8000') +course_id = prompt('Course id', 'MITx/7012x/2013_Spring') +location = prompt('problem location', 'i4x://MITx/7012x/problem/example_upload_answer') +value = prompt('value to upload') + +print "logging in" +session = requests.session() +r = session.get(server + '/') +r.raise_for_status() +print session.cookies + +# for some reason, the server expects a header containing the csrf cookie, not just the +# cookie itself. +session.headers['X-CSRFToken'] = session.cookies['csrftoken'] +login_url = '/'.join([server, 'login']) + +r = session.post(login_url, {'email': 'victor@edx.org', 'password': 'abc123'}) +print "request headers: ", r.request.headers +print "response headers: ", r.headers +r.raise_for_status() + +url = '/'.join([server, 'courses', course_id, 'modx', location, 'problem_check']) +data = {'input_{0}_2_1'.format(location.replace('/','-').replace(':','').replace('--','-')): value} +#data = {'input_i4x-MITx-7012x-problem-example_upload_answer_2_1': value} + + + +print "Posting to '{0}': {1}".format(url, data) + +r = session.post(url, data) +r.raise_for_status() From 6d053b35c36ad29663ea0de71ce943ee45653281 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Tue, 5 Feb 2013 14:05:27 -0500 Subject: [PATCH 175/347] change sample upload script to work properly over https --- common/lib/sample-post.py | 44 ++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/common/lib/sample-post.py b/common/lib/sample-post.py index 21bf6d906b..ae71603710 100644 --- a/common/lib/sample-post.py +++ b/common/lib/sample-post.py @@ -2,46 +2,60 @@ import requests import sys +import getpass -def prompt(msg, default=None): +def prompt(msg, default=None, safe=False): d = ' [{0}]'.format(default) if default is not None else '' - print 'Enter {msg}{default}: '.format(msg=msg, default=d) - x = sys.stdin.readline().strip() + prompt = 'Enter {msg}{default}: '.format(msg=msg, default=d) + if not safe: + print prompt + x = sys.stdin.readline().strip() + else: + x = getpass.getpass(prompt=prompt) if x == '' and default is not None: return default return x -# http://127.0.0.1:8000/courses/MITx/7012x/2013_Spring/modx/i4x://MITx/7012x/problem/example_functional_groups/problem_check +server = 'https://www.edx.org' +course_id = 'HarvardX/PH207x/2012_Fall' +location = 'i4x://HarvardX/PH207x/problem/ex_practice_2' - -server = prompt('Server (no trailing slash)', 'http://127.0.0.1:8000') -course_id = prompt('Course id', 'MITx/7012x/2013_Spring') -location = prompt('problem location', 'i4x://MITx/7012x/problem/example_upload_answer') +#server = prompt('Server (no trailing slash)', 'http://127.0.0.1:8000') +#course_id = prompt('Course id', 'MITx/7012x/2013_Spring') +#location = prompt('problem location', 'i4x://MITx/7012x/problem/example_upload_answer') value = prompt('value to upload') -print "logging in" +username = prompt('username on server', 'victor@edx.org') +password = prompt('password', 'abc123', safe=True) + +print "get csrf cookie" session = requests.session() r = session.get(server + '/') r.raise_for_status() -print session.cookies + +# print session.cookies # for some reason, the server expects a header containing the csrf cookie, not just the # cookie itself. session.headers['X-CSRFToken'] = session.cookies['csrftoken'] +# for https, need a referer header +session.headers['Referer'] = server + '/' login_url = '/'.join([server, 'login']) -r = session.post(login_url, {'email': 'victor@edx.org', 'password': 'abc123'}) -print "request headers: ", r.request.headers -print "response headers: ", r.headers +print "log in" +r = session.post(login_url, {'email': 'victor@edx.org', 'password': 'Secret!', 'remember': 'false'}) +#print "request headers: ", r.request.headers +#print "response headers: ", r.headers r.raise_for_status() url = '/'.join([server, 'courses', course_id, 'modx', location, 'problem_check']) data = {'input_{0}_2_1'.format(location.replace('/','-').replace(':','').replace('--','-')): value} #data = {'input_i4x-MITx-7012x-problem-example_upload_answer_2_1': value} - - print "Posting to '{0}': {1}".format(url, data) r = session.post(url, data) r.raise_for_status() + +print ("To see the uploaded answer, go to {server}/courses/{course_id}/jump_to/{location}" + .format(server=server, course_id=course_id, location=location)) From 739938f35f72da0fe798c7acabe008f83d022f19 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Thu, 27 Dec 2012 22:55:41 +0100 Subject: [PATCH 176/347] add readme for symbolicresponse implementation (thanks Ike!) --- lms/lib/symmath/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lms/lib/symmath/README.md diff --git a/lms/lib/symmath/README.md b/lms/lib/symmath/README.md new file mode 100644 index 0000000000..68868fae4a --- /dev/null +++ b/lms/lib/symmath/README.md @@ -0,0 +1,13 @@ +(Originally written by Ike.) + +At a high level, the main challenges of checking symbolic math expressions are (1) making sure the expression is mathematically legal, and (2) simplifying the expression for comparison with what is expected. + +(1) Generation (and testing) of legal input is done by using MathJax to provide input math in an XML format known as Presentation MathML (PMathML). Such expressions typeset correctly, but may not be mathematically legal, like "5 / (1 = 2)". The PMathML is converted into "Content MathML" (CMathML), which is by definition mathematically legal, using an XSLT 2.0 stylesheet, via a module in SnuggleTeX. CMathML is then converted into a sympy expression. This work is all done in `lms/lib/symmath/formula.py` + +(2) Simplifying the expression and checking against what is expected is done by using sympy, and a set of heuristics based on options flags provided by the problem author. For example, the problem author may specify that the expected expression is a matrix, in which case the dimensionality of the input expression is checked. Other options include specifying that the comparison be checked numerically in addition to symbolically. The checking is done in stages, first with no simplification, then with increasing levels of testing; if a match is found at any stage, then an "ok" is returned. Helpful messages are also returned, eg if the input expression is of a different type than the expected. This work is all done in `lms/lib/symmath/symmath_check.py` + +Links: + +SnuggleTex: http://www2.ph.ed.ac.uk/snuggletex/documentation/overview-and-features.html +MathML: http://www.w3.org/TR/MathML2/overview.html +SymPy: http://sympy.org/en/index.html From d0d15c0dc27c3568c3668d402bd6ea20fac1a50f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s=20Rocha?= Date: Mon, 7 Jan 2013 14:22:06 -0500 Subject: [PATCH 177/347] Import edit-a-molecule resources --- .../capa/capa/templates/edit-a-molecule.html | 33 + common/static/applets/JME.jar | Bin 0 -> 38760 bytes common/static/css/capa/edit-a-molecule.css | 38 + common/static/js/capa/edit-a-molecule.js | 87 + ...264BD6A2D261E441E8A63207DEF3E41.cache.html | 2900 ++++++++++++++++ ...80D82581672593B003FDD949FD05A1A.cache.html | 2871 ++++++++++++++++ ...2AEDCE3B4B02EAB0CE4B5E294387270.cache.html | 2878 ++++++++++++++++ ...87A0D27E3B86B1358ECC872176CB896.cache.html | 2900 ++++++++++++++++ ...6CC2FE28A276F9AD839FEB4866C99F7.cache.html | 2900 ++++++++++++++++ ...E94467421A960F46BE7208756BA8AB4.cache.html | 3028 +++++++++++++++++ .../static/js/capa/jsmolcalc/clear.cache.gif | Bin 0 -> 43 bytes .../js/capa/jsmolcalc/gwt/clean/clean.css | 1264 +++++++ .../js/capa/jsmolcalc/gwt/clean/clean_rtl.css | 1265 +++++++ .../jsmolcalc/gwt/clean/images/circles.png | Bin 0 -> 1492 bytes .../gwt/clean/images/circles_ie6.png | Bin 0 -> 432 bytes .../jsmolcalc/gwt/clean/images/corner.png | Bin 0 -> 1140 bytes .../jsmolcalc/gwt/clean/images/corner_ie6.png | Bin 0 -> 412 bytes .../jsmolcalc/gwt/clean/images/hborder.png | Bin 0 -> 1995 bytes .../gwt/clean/images/hborder_ie6.png | Bin 0 -> 706 bytes .../jsmolcalc/gwt/clean/images/thumb_horz.png | Bin 0 -> 222 bytes .../gwt/clean/images/thumb_vertical.png | Bin 0 -> 231 bytes .../jsmolcalc/gwt/clean/images/vborder.png | Bin 0 -> 298 bytes .../gwt/clean/images/vborder_ie6.png | Bin 0 -> 189 bytes common/static/js/capa/jsmolcalc/hosted.html | 365 ++ .../js/capa/jsmolcalc/jsmolcalc.nocache.js | 360 ++ 25 files changed, 20889 insertions(+) create mode 100644 common/lib/capa/capa/templates/edit-a-molecule.html create mode 100644 common/static/applets/JME.jar create mode 100644 common/static/css/capa/edit-a-molecule.css create mode 100644 common/static/js/capa/edit-a-molecule.js create mode 100644 common/static/js/capa/jsmolcalc/2264BD6A2D261E441E8A63207DEF3E41.cache.html create mode 100644 common/static/js/capa/jsmolcalc/280D82581672593B003FDD949FD05A1A.cache.html create mode 100644 common/static/js/capa/jsmolcalc/62AEDCE3B4B02EAB0CE4B5E294387270.cache.html create mode 100644 common/static/js/capa/jsmolcalc/787A0D27E3B86B1358ECC872176CB896.cache.html create mode 100644 common/static/js/capa/jsmolcalc/C6CC2FE28A276F9AD839FEB4866C99F7.cache.html create mode 100644 common/static/js/capa/jsmolcalc/FE94467421A960F46BE7208756BA8AB4.cache.html create mode 100644 common/static/js/capa/jsmolcalc/clear.cache.gif create mode 100644 common/static/js/capa/jsmolcalc/gwt/clean/clean.css create mode 100644 common/static/js/capa/jsmolcalc/gwt/clean/clean_rtl.css create mode 100644 common/static/js/capa/jsmolcalc/gwt/clean/images/circles.png create mode 100644 common/static/js/capa/jsmolcalc/gwt/clean/images/circles_ie6.png create mode 100644 common/static/js/capa/jsmolcalc/gwt/clean/images/corner.png create mode 100644 common/static/js/capa/jsmolcalc/gwt/clean/images/corner_ie6.png create mode 100644 common/static/js/capa/jsmolcalc/gwt/clean/images/hborder.png create mode 100644 common/static/js/capa/jsmolcalc/gwt/clean/images/hborder_ie6.png create mode 100644 common/static/js/capa/jsmolcalc/gwt/clean/images/thumb_horz.png create mode 100644 common/static/js/capa/jsmolcalc/gwt/clean/images/thumb_vertical.png create mode 100644 common/static/js/capa/jsmolcalc/gwt/clean/images/vborder.png create mode 100644 common/static/js/capa/jsmolcalc/gwt/clean/images/vborder_ie6.png create mode 100644 common/static/js/capa/jsmolcalc/hosted.html create mode 100644 common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js diff --git a/common/lib/capa/capa/templates/edit-a-molecule.html b/common/lib/capa/capa/templates/edit-a-molecule.html new file mode 100644 index 0000000000..b63fafefdb --- /dev/null +++ b/common/lib/capa/capa/templates/edit-a-molecule.html @@ -0,0 +1,33 @@ + + + + Edit A Molecule + + + + + + + + + +

    Edit A Molecule

    +

    The molecule Dopamine is shown below. Dopamine is a neurotransmitter.

    + + + + + Applet failed to run. No Java plug-in was found. + + +
    + + +

    Edit the molecule to complete each one of the following the tasks. Click the check button to check your answer for that. Click submit when you are done.

    +
      + + diff --git a/common/static/applets/JME.jar b/common/static/applets/JME.jar new file mode 100644 index 0000000000000000000000000000000000000000..d571682d7ef0ba18b26bbb38e444e5a8294cfbda GIT binary patch literal 38760 zcmZ^~b8se3@IDxAl8tTKw#|)g+qP} zKh>1~e~mHz)A+xP6+{(fr6kqVnG~e%75+~Bl4oQBA<8q-&HSBhRb^RZ-#NTf`1^Ok zV@8&N38;E==W%%G$|R@2AgciKsDY|xS!Sn^<5Hi4WtvvInf}Ez$=txeBswzZ_kYXKgR+ClT(mnGP5^vbF24<_g5c#{Qle5>UZtv zm^w`b|C0je2dg~8$_8IISd=vVPP;ety8Tb{9H`q=s7&3$a)D6qv3K$W%H-<6xpkuHg zm>+l~7#r9-*b}5b;SOssBv=xp0Qe2XAU9Y6#0%A62UtJiOOGIpM4WDxM64`E~rJ7W-j70@U6^ zjNXf%$OoRxE*%D*5}%mlu0^Nbt6sp$k->%7+6uGRl|Ji4-*MQ4A@9)#p4=|6X#(JG z^^&*G6;CiHFQwI=KlfkQvx8XM21-7+!M+@A zzrpScNxpuJAgRb&ff0z5>Kbsn?^+qS7IjC-b+0TU8ZXRpp9;;_zuRm*2!Ks3-Vf1& z(QrHlCpn`=ldNNxs+*pXiW5Wn))i;v`sNfG)Fg!gZ)q|h)r0fEoH5qb#b!Yjfe5+^ z52tAlW(olK?%ovw=*%l~-rUuMw-&AD{7>0GFBCta zg3-Yh*&cKU0$T#%qID{S@L$vi0&|66j2nszudJR=tiTp?-UQSNoz5OBwv5lw%WK?UpU70q(AFWV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0t%i=kd`L(bh+&6}gmjYiJNqw6PmKZq literal 0 HcmV?d00001 diff --git a/common/static/css/capa/edit-a-molecule.css b/common/static/css/capa/edit-a-molecule.css new file mode 100644 index 0000000000..b641b80408 --- /dev/null +++ b/common/static/css/capa/edit-a-molecule.css @@ -0,0 +1,38 @@ +/** Add css rules here for your application. */ + + +/** Example rules used by the template application (remove for your app) */ +h1 { + font-size: 2em; + font-weight: bold; + color: #777777; + margin: 40px 0px 70px; +} + +.calculateButton { + display: block; + font-size: 16pt; +} + +.newMoleculeButton { + display: block; + font-size: 16pt; +} + +/** Most GWT widgets already have a style name defined */ +.gwt-DialogBox { + width: 400px; +} + +.dialogVPanel { + margin: 5px; +} + +.serverResponseLabelError { + color: red; +} + +/** Set ids using widget.getElement().setId("idOfElement") */ +#closeButton { + margin: 15px 6px 6px; +} diff --git a/common/static/js/capa/edit-a-molecule.js b/common/static/js/capa/edit-a-molecule.js new file mode 100644 index 0000000000..9822c8ee15 --- /dev/null +++ b/common/static/js/capa/edit-a-molecule.js @@ -0,0 +1,87 @@ +$(document).ready(function(){ + var applet = $("#JME")[0]; + var template = _.template($("#task-template").text()); + var timeout = 1000; + + function waitForApplet() { + if (applet.isActive && applet.isActive()) { + console.log("Applet is ready."); + loadInitialData(); + } else if (timeout > 30 * 1000) { + console.error("Applet did not load on time."); + } else { + console.log("Waiting for applet..."); + setTimeout(waitForApplet, timeout); + } + } + + function loadInitialData() { + console.log("Loading mol data..."); + jQuery.ajax({ + url: "dopamine.mol", + dataType: "text", + success: function(data) { + console.log("Done."); + setup(data); + }, + error: function() { + console.error("Cannot load mol data."); + } + }); + } + + function setup(data) { + applet.readMolFile(data); + + setupTasks(); + + $("#update").click(updateInfo); + updateInfo(); + } + + function setupTasks() { + console.log("Getting initial tasks..."); + + var tasks = getTasks(); + + jQuery.each(tasks, function(index, task) { + var value = task.toString(); + var fragment = $(template({task:value})); + $("#tasks").append(fragment); + fragment.find("button").click(function() { + checkTask(task, index); + }); + }); + console.log("Done."); + } + + function updateInfo() { + var info = getInfo(); + $("#properties").html(info.toString()); + return info; + } + + function checkTask(task, index) { + var info = updateInfo(); + var value = task.check(info); + $("#tasks li span.result").eq(index).html(value); + } + + function getInfo() { + var mol = applet.molFile(); + var smiles = applet.smiles(); + var jme = applet.jmeFile(); + + return jsmol.API.getInfo(mol, smiles, jme); + } + + function getTasks() { + var mol = applet.molFile(); + var smiles = applet.smiles(); + var jme = applet.jmeFile(); + + return jsmol.API.getTasks(mol, smiles, jme); + } + + waitForApplet(); +}); diff --git a/common/static/js/capa/jsmolcalc/2264BD6A2D261E441E8A63207DEF3E41.cache.html b/common/static/js/capa/jsmolcalc/2264BD6A2D261E441E8A63207DEF3E41.cache.html new file mode 100644 index 0000000000..82c128524e --- /dev/null +++ b/common/static/js/capa/jsmolcalc/2264BD6A2D261E441E8A63207DEF3E41.cache.html @@ -0,0 +1,2900 @@ + + + + + + + diff --git a/common/static/js/capa/jsmolcalc/280D82581672593B003FDD949FD05A1A.cache.html b/common/static/js/capa/jsmolcalc/280D82581672593B003FDD949FD05A1A.cache.html new file mode 100644 index 0000000000..991e0e490b --- /dev/null +++ b/common/static/js/capa/jsmolcalc/280D82581672593B003FDD949FD05A1A.cache.html @@ -0,0 +1,2871 @@ + + + + + + + diff --git a/common/static/js/capa/jsmolcalc/62AEDCE3B4B02EAB0CE4B5E294387270.cache.html b/common/static/js/capa/jsmolcalc/62AEDCE3B4B02EAB0CE4B5E294387270.cache.html new file mode 100644 index 0000000000..f564a4d509 --- /dev/null +++ b/common/static/js/capa/jsmolcalc/62AEDCE3B4B02EAB0CE4B5E294387270.cache.html @@ -0,0 +1,2878 @@ + + + + + + + diff --git a/common/static/js/capa/jsmolcalc/787A0D27E3B86B1358ECC872176CB896.cache.html b/common/static/js/capa/jsmolcalc/787A0D27E3B86B1358ECC872176CB896.cache.html new file mode 100644 index 0000000000..af4a2ecb7d --- /dev/null +++ b/common/static/js/capa/jsmolcalc/787A0D27E3B86B1358ECC872176CB896.cache.html @@ -0,0 +1,2900 @@ + + + + + + + diff --git a/common/static/js/capa/jsmolcalc/C6CC2FE28A276F9AD839FEB4866C99F7.cache.html b/common/static/js/capa/jsmolcalc/C6CC2FE28A276F9AD839FEB4866C99F7.cache.html new file mode 100644 index 0000000000..145a186d11 --- /dev/null +++ b/common/static/js/capa/jsmolcalc/C6CC2FE28A276F9AD839FEB4866C99F7.cache.html @@ -0,0 +1,2900 @@ + + + + + + + diff --git a/common/static/js/capa/jsmolcalc/FE94467421A960F46BE7208756BA8AB4.cache.html b/common/static/js/capa/jsmolcalc/FE94467421A960F46BE7208756BA8AB4.cache.html new file mode 100644 index 0000000000..3a5592bf72 --- /dev/null +++ b/common/static/js/capa/jsmolcalc/FE94467421A960F46BE7208756BA8AB4.cache.html @@ -0,0 +1,3028 @@ + + + + + + + diff --git a/common/static/js/capa/jsmolcalc/clear.cache.gif b/common/static/js/capa/jsmolcalc/clear.cache.gif new file mode 100644 index 0000000000000000000000000000000000000000..e565824aafafe632011b281cba976baf8b3ba89a GIT binary patch literal 43 qcmZ?wbhEHbWMp7uXkcLY4+e@qSs1y10y+#p0Fq%~V)9{Rum%7ZWeN!Z literal 0 HcmV?d00001 diff --git a/common/static/js/capa/jsmolcalc/gwt/clean/clean.css b/common/static/js/capa/jsmolcalc/gwt/clean/clean.css new file mode 100644 index 0000000000..aa02d5385d --- /dev/null +++ b/common/static/js/capa/jsmolcalc/gwt/clean/clean.css @@ -0,0 +1,1264 @@ +/** + * The file contains styles for GWT widgets in the Clean theme. + * + * In order to maintain cross-browser compatibility, the following syntax is + * used to create IE6 specific style rules: + * .gwt-Widget { + * property: rule applies to all browsers + * -property: rule applies only to IE6 (overrides previous rule) + * } + * * html .gwt-Widget { + * property: rule applies to all versions of IE + * } + */ + +body, table td, select, button { + font-family: Arial Unicode MS, Arial, sans-serif; + font-size: small; +} +pre { + font-family: "courier new", courier; + font-size: small; +} +body { + color: black; + margin: 10px; + border: 0px; + padding: 0px; + background: #fff; + direction: ltr; +} +a, a:visited { + color: #0066cc; + text-decoration:none; +} + +a:hover { + color: #0066cc; + text-decoration:underline; +} + +select { + background: white; +} + +/** + * The reference theme can be used to determine when this style sheet has + * loaded. Create a hidden div element with absolute position, assign the style + * name below, and attach it to the DOM. Use a timer to detect when the + * element's height and width are set to 5px. + */ +.gwt-Reference-clean { + height: 5px; + width: 5px; + zoom: 1; +} + +.gwt-Button { + margin: 0; + padding: 5px 7px; + text-decoration: none; + cursor: pointer; + cursor: hand; + font-size:small; + background: url("images/hborder.png") repeat-x 0px -2077px; + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + border-radius: 3px; + -moz-border-radius: 3px; +} +.gwt-Button:active { + border: 1px inset #ccc; +} +.gwt-Button:hover { + border-color: #939393; +} +.gwt-Button[disabled] { + cursor: default; + color: #888; +} +.gwt-Button[disabled]:hover { + border: 1px outset #ccc; +} + +.gwt-CheckBox { +} +.gwt-CheckBox-disabled { + color: #888; +} + +.gwt-DecoratorPanel { +} +.gwt-DecoratorPanel .topCenter { + border-top: 1px solid #bbb; + line-height: 0px; +} +.gwt-DecoratorPanel .bottomCenter { + border-bottom: 1px solid #bbb; + line-height: 0px; +} +.gwt-DecoratorPanel .topCenterInner, +.gwt-DecoratorPanel .bottomCenterInner { + height: 1px; + line-height: 0px; + font-size: 1px; +} +.gwt-DecoratorPanel .middleLeft { + border-left: 1px solid #bbb; +} +.gwt-DecoratorPanel .middleRight { + border-right: 1px solid #bbb; +} +.gwt-DecoratorPanel .middleLeftInner, +.gwt-DecoratorPanel .middleRightInner { + width: 1px; + line-height: 1px; +} +.gwt-DecoratorPanel .topLeftInner, +.gwt-DecoratorPanel .topRightInner, +.gwt-DecoratorPanel .bottomLeftInner, +.gwt-DecoratorPanel .bottomRightInner { + width: 5px; + height: 5px; + zoom: 1; + font-size: 1px; + overflow: hidden; +} +.gwt-DecoratorPanel .topLeft { + line-height: 0px; + background: url(images/circles.png) no-repeat 0px -6px; + -background: url(images/circles_ie6.png) no-repeat 0px -6px; +} +.gwt-DecoratorPanel .topRight { + line-height: 0px; + background: url(images/circles.png) no-repeat -5px -6px; + -background: url(images/circles_ie6.png) no-repeat -5px -6px; +} +.gwt-DecoratorPanel .bottomLeft { + line-height: 0px; + background: url(images/circles.png) no-repeat 0px -11px; + -background: url(images/circles_ie6.png) no-repeat 0px -11px; +} +.gwt-DecoratorPanel .bottomRight { + line-height: 0px; + background: url(images/circles.png) no-repeat -5px -11px; + -background: url(images/circles_ie6.png) no-repeat -5px -11px; +} +* html .gwt-DecoratorPanel .topLeftInner, +* html .gwt-DecoratorPanel .topRightInner, +* html .gwt-DecoratorPanel .bottomLeftInner, +* html .gwt-DecoratorPanel .bottomRightInner { + width: 5px; + height: 5px; + overflow: hidden; +} + +.gwt-DialogBox .Caption { + background: #F1F1F1; + padding: 4px 8px 4px 4px; + cursor: default; + font-family: Arial Unicode MS, Arial, sans-serif; + font-weight: bold; + border-bottom: 1px solid #bbbbbb; + border-top: 1px solid #D2D2D2; +} +.gwt-DialogBox .dialogContent { +} +.gwt-DialogBox .dialogMiddleCenter { + padding: 3px; + background: white; +} +.gwt-DialogBox .dialogBottomCenter { + background: url(images/hborder.png) repeat-x 0px -2945px; + -background: url(images/hborder_ie6.png) repeat-x 0px -2144px; +} +.gwt-DialogBox .dialogMiddleLeft { + background: url(images/vborder.png) repeat-y -31px 0px; +} +.gwt-DialogBox .dialogMiddleRight { + background: url(images/vborder.png) repeat-y -32px 0px; + -background: url(images/vborder_ie6.png) repeat-y -32px 0px; +} +.gwt-DialogBox .dialogTopLeftInner { + width: 10px; + height: 8px; + zoom: 1; +} +.gwt-DialogBox .dialogTopRightInner { + width: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogBottomLeftInner { + width: 10px; + height: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogBottomRightInner { + width: 12px; + height: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogTopLeft { + background: url(images/circles.png) no-repeat -20px 0px; + -background: url(images/circles_ie6.png) no-repeat -20px 0px; +} +.gwt-DialogBox .dialogTopRight { + background: url(images/circles.png) no-repeat -28px 0px; + -background: url(images/circles_ie6.png) no-repeat -28px 0px; +} +.gwt-DialogBox .dialogBottomLeft { + background: url(images/circles.png) no-repeat 0px -36px; + -background: url(images/circles_ie6.png) no-repeat 0px -36px; +} +.gwt-DialogBox .dialogBottomRight { + background: url(images/circles.png) no-repeat -8px -36px; + -background: url(images/circles_ie6.png) no-repeat -8px -36px; +} +* html .gwt-DialogBox .dialogTopLeftInner { + width: 10px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogTopRightInner { + width: 12px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogBottomLeftInner { + width: 10px; + height: 12px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogBottomRightInner { + width: 12px; + height: 12px; + overflow: hidden; +} + +.gwt-DisclosurePanel { +} +.gwt-DisclosurePanel-open { +} +.gwt-DisclosurePanel-closed { +} +.gwt-DisclosurePanel .header, +.gwt-DisclosurePanel .header a, +.gwt-DisclosurePanel .header td { + text-decoration: none; /* Remove underline from header */ + color: black; + cursor: pointer; + cursor: hand; +} +.gwt-DisclosurePanel .content { + border-left: 3px solid #e7e7e7; + padding: 4px 0px 4px 8px; + margin-left: 6px; +} + +.gwt-FileUpload { +} + +.gwt-Frame { + border-top: 2px solid #666; + border-left: 2px solid #666; + border-right: 2px solid #bbb; + border-bottom: 2px solid #bbb; +} + +.gwt-HorizontalSplitPanel { +} +.gwt-HorizontalSplitPanel .hsplitter { + cursor: move; + border: 0px; + background: #e7e7e7; + line-height: 0px; +} +.gwt-VerticalSplitPanel { +} +.gwt-VerticalSplitPanel .vsplitter { + cursor: move; + border: 0px; + background: #e7e7e7; + line-height: 0px; +} + +.gwt-HTML { + padding: 0 0px; +} + +.gwt-Hyperlink { + cursor: pointer; +} + +.gwt-Image { +} + +.gwt-Label { +} + +.gwt-ListBox { +} + +.gwt-MenuBar { + cursor: default; +} +.gwt-MenuBar .gwt-MenuItem { + cursor: default; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-MenuBar .gwt-MenuItem-selected { + background: #E3E8F3; +} +.gwt-MenuBar-horizontal { + background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px; + border: 1px solid #e0e0e0; +} +.gwt-MenuBar-horizontal .gwt-MenuItem { + padding: 5px 10px; + vertical-align: bottom; + color: #000; + font-weight: bold; +} +.gwt-MenuBar-horizontal .gwt-MenuItemSeparator { + width: 1px; + padding: 0px; + margin: 0px; + border: 0px; + border-left: 1px solid #ccc; + background: white; +} +.gwt-MenuBar-horizontal .gwt-MenuItemSeparator .menuSeparatorInner { + width: 1px; + height: 1px; + background: white; +} +.gwt-MenuBar-vertical { + margin-top: 0px; + margin-left: 0px; + background: white; +} +.gwt-MenuBar-vertical table { + border-collapse: collapse; +} +.gwt-MenuBar-vertical .gwt-MenuItem { + padding: 2px 40px 2px 1px; +} +.gwt-MenuBar-vertical .gwt-MenuItemSeparator { + padding: 2px 0px; +} +.gwt-MenuBar-vertical .gwt-MenuItemSeparator .menuSeparatorInner { + height: 1px; + padding: 0px; + border: 0px; + border-top: 1px solid #ccc; + overflow: hidden; +} +.gwt-MenuBar-vertical .subMenuIcon { + padding-right: 4px; +} +.gwt-MenuBar-vertical .subMenuIcon-selected { + background: #E3E8F3; +} +.gwt-MenuBarPopup { + margin: 0px 0px 0px 3px; +} +.gwt-MenuBarPopup .menuPopupTopCenter { + background: url(images/hborder.png) 0px -12px repeat-x; +} +.gwt-MenuBarPopup .menuPopupBottomCenter { + background: url(images/hborder.png) 0px -13px repeat-x; + -background: url(images/hborder_ie6.png) 0px -13px repeat-x; +} +.gwt-MenuBarPopup .menuPopupMiddleLeft { + background: url(images/vborder.png) -12px 0px repeat-y; + -background: url(images/vborder_ie6.png) -12px 0px repeat-y; +} +.gwt-MenuBarPopup .menuPopupMiddleRight { + background: url(images/vborder.png) -13px 0px repeat-y; + -background: url(images/vborder_ie6.png) -13px 0px repeat-y; +} +.gwt-MenuBarPopup .menuPopupTopLeftInner { + width: 5px; + height: 5px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupTopRightInner { + width: 8px; + height: 5px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupBottomLeftInner { + width: 5px; + height: 8px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupBottomRightInner { + width: 8px; + height: 8px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupTopLeft { + background: url(images/corner.png) no-repeat 0px -36px; + -background: url(images/corner_ie6.png) no-repeat 0px -36px; +} +.gwt-MenuBarPopup .menuPopupTopRight { + background: url(images/corner.png) no-repeat -5px -36px; + -background: url(images/corner_ie6.png) no-repeat -5px -36px; +} +.gwt-MenuBarPopup .menuPopupBottomLeft { + background: url(images/corner.png) no-repeat 0px -41px; + -background: url(images/corner_ie6.png) no-repeat 0px -41px; +} +.gwt-MenuBarPopup .menuPopupBottomRight { + background: url(images/corner.png) no-repeat -5px -41px; + -background: url(images/corner_ie6.png) no-repeat -5px -41px; +} +* html .gwt-MenuBarPopup .menuPopupTopLeftInner { + width: 5px; + height: 5px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupTopRightInner { + width: 8px; + height: 5px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupBottomLeftInner { + width: 5px; + height: 8px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupBottomRightInner { + width: 8px; + height: 8px; + overflow: hidden; +} + +.gwt-PasswordTextBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; +} +.gwt-PasswordTextBox-readonly { + color: #888; +} + +.gwt-PopupPanel { + border: 3px solid #e7e7e7; + padding: 3px; + background: white; +} + +.gwt-DecoratedPopupPanel .popupContent { +} +.gwt-DecoratedPopupPanel .popupMiddleCenter { + padding: 3px; + background: #f1f1f1; +} +.gwt-DecoratedPopupPanel .popupTopCenter { + background: url(images/hborder.png) 0px -2937px repeat-x; +} +.gwt-DecoratedPopupPanel .popupBottomCenter { + background: url(images/hborder.png) repeat-x 0px -2938px; + -background: url(images/hborder_ie6.png) repeat-x 0px -2138px; +} +.gwt-DecoratedPopupPanel .popupMiddleLeft { + background: url(images/vborder.png) -21px 0px repeat-y; +} +.gwt-DecoratedPopupPanel .popupMiddleRight { + background: url(images/vborder.png) repeat-y -24px 0px; + -background: url(images/vborder_ie6.png) repeat-y -24px 0px; +} +.gwt-DecoratedPopupPanel .popupTopLeftInner { + width: 6px; + height: 5px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupTopRightInner { + width: 6px; + height: 5px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupBottomLeftInner { + width: 6px; + height: 6px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupBottomRightInner { + width: 6px; + height: 6px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupTopLeft { + background: url(images/circles.png) no-repeat 0px -16px; + -background: url(images/circles_ie6.png) no-repeat 0px -16px; +} +.gwt-DecoratedPopupPanel .popupTopRight { + background: url(images/circles.png) no-repeat -6px -16px; + -background: url(images/circles_ie6.png) no-repeat -6px -16px; +} +.gwt-DecoratedPopupPanel .popupBottomLeft { + background: url(images/circles.png) no-repeat 0px -21px; + -background: url(images/circles_ie6.png) no-repeat 0px -21px; +} +.gwt-DecoratedPopupPanel .popupBottomRight { + background: url(images/circles.png) no-repeat -6px -21px; + -background: url(images/circles_ie6.png) no-repeat -6px -21px; +} +* html .gwt-DecoratedPopupPanel .popupTopLeftInner { + width: 6px; + height: 5px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupTopRightInner { + width: 6px; + height: 5px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupBottomLeftInner { + width: 6px; + height: 6px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupBottomRightInner { + width: 6px; + height: 6px; + overflow: hidden; +} + +.gwt-PopupPanelGlass { + background-color: #000; + opacity: 0.3; + filter: alpha(opacity=30); +} + +.gwt-PushButton-up, +.gwt-PushButton-up-hovering, +.gwt-PushButton-up-disabled, +.gwt-PushButton-down, +.gwt-PushButton-down-hovering, +.gwt-PushButton-down-disabled { + margin: 0; + text-decoration: none; + background: url("images/hborder.png") repeat-x 0px -27px; + border-radius: 2px; + -moz-border-radius: 2px; +} +.gwt-PushButton-up, +.gwt-PushButton-up-hovering, +.gwt-PushButton-up-disabled { + padding: 3px 5px 3px 5px; +} +.gwt-PushButton-up { + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-up-hovering { + border: 1px solid; + border-color: #939393; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-up-disabled { + border: 1px solid #bbb; + cursor: default; + opacity: .5; + filter: alpha(opacity=45); + zoom: 1; +} +.gwt-PushButton-down, +.gwt-PushButton-down-hovering, +.gwt-PushButton-down-disabled { + padding: 4px 4px 2px 6px; + outline:none; +} +.gwt-PushButton-down { + border: 1px inset #666; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-down-hovering { + border: 1px solid #939393; + border-top: 1px solid #333333; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-down-disabled { + border: 1px outset #ccc; + cursor: default; + opacity: 0.5; + filter: alpha(opacity=45); + zoom: 1; +} + +.gwt-RadioButton { +} +.gwt-RadioButton-disabled { + color: #888; +} + +.gwt-RichTextArea { +} +.hasRichTextToolbar { + border: 0px; +} +.gwt-RichTextToolbar { + background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px; + border-bottom: 1px solid #BBBBBB; + padding: 3px; + margin: 0px; +} +.gwt-RichTextToolbar .gwt-PushButton-up { + padding: 0px 1px 0px 0px; + margin-right: 4px; + margin-bottom: 4px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-up-hovering { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-down { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-down-hovering { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-up { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; +} +.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-down { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} + +.gwt-StackPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-StackPanel .gwt-StackPanelItem { + cursor: pointer; + cursor: hand; + font-weight: bold; + font-size: 1.3em; + padding: 3px; + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-StackPanel .gwt-StackPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 2px 10px 5px; +} + +.gwt-DecoratedStackPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .gwt-StackPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 2px 10px 5px; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem { + cursor: pointer; + cursor: hand; +} +.gwt-DecoratedStackPanel .stackItemTopLeft, +.gwt-DecoratedStackPanel .stackItemTopRight { + height: 6px; + width: 6px; + zoom: 1; +} +.gwt-DecoratedStackPanel .stackItemTopLeft { + border-left: 1px solid #bbbbbb; + background: #d3def6 url(images/corner.png) no-repeat 0px -49px; + -background: #d3def6 url(images/corner_ie6.png) no-repeat 0px -49px; +} +.gwt-DecoratedStackPanel .stackItemTopRight { + border-right: 1px solid #bbbbbb; + background: #d3def6 url(images/corner.png) no-repeat -6px -49px; + -background: #d3def6 url(images/corner_ie6.png) no-repeat -6px -49px; +} +.gwt-DecoratedStackPanel .stackItemTopLeftInner, +.gwt-DecoratedStackPanel .stackItemTopRightInner { + width: 1px; + height: 1px; +} +* html .gwt-DecoratedStackPanel .stackItemTopLeftInner, +* html .gwt-DecoratedStackPanel .stackItemTopRightInner { + width: 6px; + height: 6px; + overflow: hidden; +} +.gwt-DecoratedStackPanel .stackItemTopCenter { + background: url(images/hborder.png) 0px -21px repeat-x; +} +.gwt-DecoratedStackPanel .stackItemMiddleLeft { + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; + border-left: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .stackItemMiddleLeftInner, +.gwt-DecoratedStackPanel .stackItemMiddleRightInner { + width: 1px; + height: 1px; +} +.gwt-DecoratedStackPanel .stackItemMiddleRight { + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; + border-right: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .stackItemMiddleCenter { + font-weight: bold; + font-size: 1.3em; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRight, +.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeft { + border: 0px; + background-color: white; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeft, +.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRight { + background-color: white; +} + +.gwt-SuggestBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; + font-family: Arial Unicode MS, Arial, sans-serif; +} + +.gwt-SuggestBoxPopup { +} + +.gwt-SuggestBoxPopup .item { + padding: 2px 6px; + color: #000; + cursor: default; + font-size: 110%; +} +.gwt-SuggestBoxPopup .item-selected { + background: #D5E2FF; +} +.gwt-SuggestBoxPopup .suggestPopupContent { + background: white; +} +.gwt-SuggestBoxPopup .suggestPopupTopCenter { + border-top: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupBottomCenter { + border-bottom: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupTopCenterInner, +.gwt-SuggestBoxPopup .suggestPopupBottomCenterInner { + height: 1px; + line-height: 1px; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleLeft { + border-left: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleRight { + border-right: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleLeftInner, +.gwt-SuggestBoxPopup .suggestPopupMiddleRightInner { + width: 1px; + line-height: 1px; +} +.gwt-SuggestBoxPopup .suggestPopupTopLeftInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupTopRightInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupBottomLeftInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupBottomRightInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupTopLeft { + background: url(images/circles.png) no-repeat 0px -6px; + -background: url(images/circles_ie6.png) no-repeat 0px -6px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupTopRight { + background: url(images/circles.png) no-repeat -5px -6px; + -background: url(images/circles_ie6.png) no-repeat -5px -6px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupBottomLeft { + background: url(images/circles.png) no-repeat 0px -11px; + -background: url(images/circles_ie6.png) no-repeat 0px -11px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupBottomRight { + background: url(images/circles.png) no-repeat -5px -11px; + -background: url(images/circles_ie6.png) no-repeat -5px -11px; + width:5px; + height:5px; +} +* html .gwt-SuggestBoxPopup .suggestPopupTopLeftInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupTopRightInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupBottomLeftInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupBottomRightInner { + width: 0px; + height: 0px; + overflow: hidden; +} + +.gwt-TabBar { + background: #ccc; + padding-top: 6px; +} +.gwt-TabBar .gwt-TabBarFirst { + width: 5px; /* first tab distance from the left */ +} +.gwt-TabBar .gwt-TabBarRest { +} +.gwt-TabBar .gwt-TabBarItem { + margin-left: 4px; + padding: 4px 8px 4px 8px; + cursor: pointer; + cursor: hand; + color: white; + font-weight: normal; + text-align: center; + background: #8E8E8E; + -moz-border-radius: 3px 3px 0px 0px; + border-radius: 3px 3px 0px 0px; +} +.gwt-TabBar .gwt-TabBarItem-selected { + cursor: default; + background: white; + color: #333; + font-weight: bold; +} +.gwt-TabBar .gwt-TabBarItem-disabled { + cursor: default; + color: #999999; +} +.gwt-TabPanel { +} +.gwt-TabPanelBottom { + border-color: #ccc; + border-style: solid; + border-width: 0px 1px 1px; + overflow: hidden; + padding: 6px; +} +.gwt-DecoratedTabBar { + background: #ccc; + padding-top: 6px; +} +.gwt-DecoratedTabBar .gwt-TabBarFirst { + width: 5px; /* first tab distance from the left */ +} +.gwt-DecoratedTabBar .gwt-TabBarRest { +} +.gwt-DecoratedTabBar .gwt-TabBarItem { + border-collapse: collapse; + margin-left: 4px; +} +.gwt-DecoratedTabBar .tabTopCenter { + padding: 0px; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .tabTopLeft, +.gwt-DecoratedTabBar .tabTopRight { + padding: 0px; + zoom: 1; +} +.gwt-DecoratedTabBar .tabTopLeftInner, +.gwt-DecoratedTabBar .tabTopRightInner { + width: 3px; + height: 3px; +} +.gwt-DecoratedTabBar .tabTopLeft { + background: url(images/circles.png) no-repeat 0px 0px; + -background: url(images/circles_ie6.png) no-repeat 0px 0px; +} +.gwt-DecoratedTabBar .tabTopRight { + background: url(images/circles.png) no-repeat -3px 0px; + -background: url(images/circles_ie6.png) no-repeat -3px 0px; +} +* html .gwt-DecoratedTabBar .tabTopLeftInner, +* html .gwt-DecoratedTabBar .tabTopRightInner { + width: 3px; + height: 3px; + overflow: hidden; +} +.gwt-DecoratedTabBar .tabMiddleLeft, +.gwt-DecoratedTabBar .tabMiddleRight { + width: 3px; + padding: 0px; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .tabMiddleLeftInner, +.gwt-DecoratedTabBar .tabMiddleRightInner { + width: 1px; + height: 1px; +} +.gwt-DecoratedTabBar .tabMiddleCenter { + padding: 0px 5px 4px 5px; + cursor: pointer; + cursor: hand; + color: #fff; + font-weight: normal; + text-align: center; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter { + background:#fff; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft { + background: url(images/circles.png) no-repeat -6px 0px; + -background: url(images/circles_ie6.png) no-repeat -6px 0px; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight { + background: url(images/circles.png) no-repeat -9px 0px; + -background: url(images/circles_ie6.png) no-repeat -9px 0px; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft, +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight { + background: #fff; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleCenter { + cursor: default; + background: #fff; + color:#333; + font-weight:bold; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-disabled .tabMiddleCenter { + cursor: default; + color: #999999; +} + +.gwt-TextArea { + padding: 4px; + border: 1px solid #ccc; + border-top: 1px solid #666; + font-size: 100%; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-TextArea-readonly { + color: #888; +} + +.gwt-TextBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: small; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-TextBox-readonly { + color: #888; +} +.gwt-ToggleButton-up, +.gwt-ToggleButton-up-hovering, +.gwt-ToggleButton-up-disabled, +.gwt-ToggleButton-down, +.gwt-ToggleButton-down-hovering, +.gwt-ToggleButton-down-disabled { + margin: 0; + text-decoration: none; + background: url("images/hborder.png") repeat-x 0px -27px; + -moz-border-radius: 2px; + border-radius: 2px; +} +.gwt-ToggleButton-up, +.gwt-ToggleButton-up-hovering, +.gwt-ToggleButton-up-disabled { + padding: 3px 5px 3px 5px; +} +.gwt-ToggleButton-up { + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-up-hovering { + border: 1px solid; + border-color: #939393; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-up-disabled { + border: 1px solid #bbb; + cursor: default; + opacity: .5; + zoom: 1; + filter: alpha(opacity=45); +} +.gwt-ToggleButton-down, +.gwt-ToggleButton-down-hovering, +.gwt-ToggleButton-down-disabled { + padding: 4px 4px 2px 6px; +} +.gwt-ToggleButton-down { + background-position: 0 -513px; + border: 1px inset #666; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-down-hovering { + background-position: 0 -513px; + border: 1px inset; + border-color: #9cf #69e #69e #7af; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-down-disabled { + background-position: 0 -513px; + border: 1px inset #ccc; + cursor: default; + opacity: .5; + zoom: 1; + filter: alpha(opacity=45); +} + +.gwt-Tree .gwt-TreeItem { + padding: 1px 0px; + margin: 0px; + white-space: nowrap; + cursor: hand; + cursor: pointer; +} +.gwt-Tree .gwt-TreeItem-selected { + background: #ebeff9; +} +.gwt-TreeItem .gwt-RadioButton input, +.gwt-TreeItem .gwt-CheckBox input { + margin-left: 0px; +} +* html .gwt-TreeItem .gwt-RadioButton input, +* html .gwt-TreeItem .gwt-CheckBox input { + margin-left: -4px; +} + +.gwt-DateBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; +} +.gwt-DateBox input { + width: 8em; +} +.dateBoxFormatError { + background: #ffcccc; +} +.dateBoxPopup { +} + +.gwt-DatePicker { + border: 1px solid #ccc; + border-top:1px solid #999; + cursor: default; +} +.gwt-DatePicker td, +.datePickerMonthSelector td:focus { + outline: none; +} +.datePickerDays { + width: 100%; + background: white; +} +.datePickerDay, +.datePickerWeekdayLabel, +.datePickerWeekendLabel { + font-size: 85%; + text-align: center; + padding: 4px; + outline: none; + font-weight:bold; + color:#333; + border-right: 1px solid #EDEDED; + border-bottom: 1px solid #EDEDED; +} +.datePickerWeekdayLabel, +.datePickerWeekendLabel { + background: #fff; + padding: 0px 4px 2px; + cursor: default; + color:#666; + font-size:70%; + font-weight:normal; +} +.datePickerDay { + padding: 4px 7px; + cursor: hand; + cursor: pointer; +} +.datePickerDayIsWeekend { + background: #f7f7f7; +} +.datePickerDayIsFiller { + color: #999; + font-weight:normal; +} +.datePickerDayIsValue { + background: #d7dfe8; +} +.datePickerDayIsDisabled { + color: #AAAAAA; + font-style: italic; +} +.datePickerDayIsHighlighted { + background: #F0E68C; +} +.datePickerDayIsValueAndHighlighted { + background: #d7dfe8; +} +.datePickerDayIsToday { + padding: 3px; + color: #fff; + background: url(images/hborder.png) repeat-x 0px -2607px; +} + +.datePickerMonthSelector { + width: 100%; + padding: 1px 0 5px 0; + background: #fff; +} +td.datePickerMonth { + text-align: center; + vertical-align: middle; + white-space: nowrap; + font-size: 100%; + font-weight: bold; + color: #333; +} +.datePickerPreviousButton, +.datePickerNextButton { + font-size: 120%; + line-height: 1em; + color: #3a6aad; + cursor: hand; + cursor: pointer; + font-weight: bold; + padding: 0px 4px; + outline: none; +} + +.gwt-StackLayoutPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader { + cursor: pointer; + cursor: hand; + font-weight: bold; + font-size: 1.3em; + padding: 3px; + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader-hovering { + background: #d3def6; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 2px 10px 5px; +} + +.gwt-TabLayoutPanel { +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTabs { + background: #ccc; + padding-top: 6px; + padding-left: 5px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelContentContainer { + border-color: #ccc; + border-style: solid; + border-width: 0px 1px 1px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelContent { + overflow: hidden; + padding: 6px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab { + margin-left: 4px; + padding: 4px 8px 4px 8px; + cursor: pointer; + cursor: hand; + color: white; + font-weight: normal; + text-align: center; + background: #8E8E8E; + -moz-border-radius: 3px 3px 0px 0px; + border-radius: 3px 3px 0px 0px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab-selected { + cursor: default; + background: white; + color: #333; + font-weight: bold; +} + +.gwt-SplitLayoutPanel-HDragger { + background: #e7e7e7 url(images/thumb_vertical.png) center center no-repeat; + cursor: col-resize; +} + +.gwt-SplitLayoutPanel-VDragger { + background: #e7e7e7 url(images/thumb_horz.png) center center no-repeat; + cursor: row-resize; +} \ No newline at end of file diff --git a/common/static/js/capa/jsmolcalc/gwt/clean/clean_rtl.css b/common/static/js/capa/jsmolcalc/gwt/clean/clean_rtl.css new file mode 100644 index 0000000000..7e2c695ccf --- /dev/null +++ b/common/static/js/capa/jsmolcalc/gwt/clean/clean_rtl.css @@ -0,0 +1,1265 @@ +/** + * The file contains styles for GWT widgets in the Clean theme, in RTL mode. + * + * In order to maintain cross-browser compatibility, the following syntax is + * used to create IE6 specific style rules: + * .gwt-Widget { + * property: rule applies to all browsers + * -property: rule applies only to IE6 (overrides previous rule) + * } + * * html .gwt-Widget { + * property: rule applies to all versions of IE + * } + */ + +body, table td, select, button { + font-family: Arial Unicode MS, Arial, sans-serif; + font-size: small; +} +pre { + font-family: "courier new", courier; + font-size: small; +} +body { + color: black; + margin: 10px; + border: 0px; + padding: 0px; + background: #fff; + direction: rtl; +} +a, a:visited { + color: #0066cc; + text-decoration:none; +} + +a:hover { + color: #0066cc; + text-decoration:underline; +} + +select { + background: white; +} + +/** + * The reference theme can be used to determine when this style sheet has + * loaded. Create a hidden div element with absolute position, assign the style + * name below, and attach it to the DOM. Use a timer to detect when the + * element's height and width are set to 5px. + */ +.gwt-Reference-clean-rtl { + height: 5px; + width: 5px; + zoom: 1; +} + +.gwt-Button { + margin: 0; + padding: 5px 7px; + text-decoration: none; + cursor: pointer; + cursor: hand; + font-size:small; + background: url("images/hborder.png") repeat-x 0px -2077px; + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + border-radius: 3px; + -moz-border-radius: 3px; +} +.gwt-Button:active { + border: 1px inset #ccc; +} +.gwt-Button:hover { + border-color: #939393; +} +.gwt-Button[disabled] { + cursor: default; + color: #888; +} +.gwt-Button[disabled]:hover { + border: 1px outset #ccc; +} + +.gwt-CheckBox { +} +.gwt-CheckBox-disabled { + color: #888; +} + +.gwt-DecoratorPanel { +} +.gwt-DecoratorPanel .topCenter { + border-top: 1px solid #bbb; + line-height: 0px; +} +.gwt-DecoratorPanel .bottomCenter { + border-bottom: 1px solid #bbb; + line-height: 0px; +} +.gwt-DecoratorPanel .topCenterInner, +.gwt-DecoratorPanel .bottomCenterInner { + height: 1px; + line-height: 0px; + font-size: 1px; +} +.gwt-DecoratorPanel .middleLeft { + border-left: 1px solid #bbb; +} +.gwt-DecoratorPanel .middleRight { + border-right: 1px solid #bbb; +} +.gwt-DecoratorPanel .middleLeftInner, +.gwt-DecoratorPanel .middleRightInner { + width: 1px; + line-height: 1px; +} +.gwt-DecoratorPanel .topLeftInner, +.gwt-DecoratorPanel .topRightInner, +.gwt-DecoratorPanel .bottomLeftInner, +.gwt-DecoratorPanel .bottomRightInner { + width: 5px; + height: 5px; + zoom: 1; + font-size: 1px; + overflow: hidden; +} +.gwt-DecoratorPanel .topLeft { + line-height: 0px; + background: url(images/circles.png) no-repeat 0px -6px; + -background: url(images/circles_ie6.png) no-repeat 0px -6px; +} +.gwt-DecoratorPanel .topRight { + line-height: 0px; + background: url(images/circles.png) no-repeat -5px -6px; + -background: url(images/circles_ie6.png) no-repeat -5px -6px; +} +.gwt-DecoratorPanel .bottomLeft { + line-height: 0px; + background: url(images/circles.png) no-repeat 0px -11px; + -background: url(images/circles_ie6.png) no-repeat 0px -11px; +} +.gwt-DecoratorPanel .bottomRight { + line-height: 0px; + background: url(images/circles.png) no-repeat -5px -11px; + -background: url(images/circles_ie6.png) no-repeat -5px -11px; +} +* html .gwt-DecoratorPanel .topLeftInner, +* html .gwt-DecoratorPanel .topRightInner, +* html .gwt-DecoratorPanel .bottomLeftInner, +* html .gwt-DecoratorPanel .bottomRightInner { + width: 5px; + height: 5px; + overflow: hidden; +} + +.gwt-DialogBox .Caption { + background: #F1F1F1; + padding: 4px 4px 4px 8px; + cursor: default; + font-family: Arial Unicode MS, Arial, sans-serif; + font-weight: bold; + border-bottom: 1px solid #bbbbbb; + border-top: 1px solid #D2D2D2; +} +.gwt-DialogBox .dialogContent { +} +.gwt-DialogBox .dialogMiddleCenter { + padding: 3px; + background: white; +} +.gwt-DialogBox .dialogBottomCenter { + background: url(images/hborder.png) repeat-x 0px -2945px; + -background: url(images/hborder_ie6.png) repeat-x 0px -2144px; +} +.gwt-DialogBox .dialogMiddleLeft { + background: url(images/vborder.png) repeat-y -31px 0px; +} +.gwt-DialogBox .dialogMiddleRight { + background: url(images/vborder.png) repeat-y -32px 0px; + -background: url(images/vborder_ie6.png) repeat-y -32px 0px; +} +.gwt-DialogBox .dialogTopLeftInner { + width: 10px; + height: 8px; + zoom: 1; +} +.gwt-DialogBox .dialogTopRightInner { + width: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogBottomLeftInner { + width: 10px; + height: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogBottomRightInner { + width: 12px; + height: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogTopLeft { + background: url(images/circles.png) no-repeat -20px 0px; + -background: url(images/circles_ie6.png) no-repeat -20px 0px; +} +.gwt-DialogBox .dialogTopRight { + background: url(images/circles.png) no-repeat -28px 0px; + -background: url(images/circles_ie6.png) no-repeat -28px 0px; +} +.gwt-DialogBox .dialogBottomLeft { + background: url(images/circles.png) no-repeat 0px -36px; + -background: url(images/circles_ie6.png) no-repeat 0px -36px; +} +.gwt-DialogBox .dialogBottomRight { + background: url(images/circles.png) no-repeat -8px -36px; + -background: url(images/circles_ie6.png) no-repeat -8px -36px; +} +* html .gwt-DialogBox .dialogTopLeftInner { + width: 10px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogTopRightInner { + width: 12px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogBottomLeftInner { + width: 10px; + height: 12px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogBottomRightInner { + width: 12px; + height: 12px; + overflow: hidden; +} + +.gwt-DisclosurePanel { +} +.gwt-DisclosurePanel-open { +} +.gwt-DisclosurePanel-closed { +} +.gwt-DisclosurePanel .header, +.gwt-DisclosurePanel .header a, +.gwt-DisclosurePanel .header td { + text-decoration: none; /* Remove underline from header */ + color: black; + cursor: pointer; + cursor: hand; +} +.gwt-DisclosurePanel .content { + border-right: 3px solid #e7e7e7; + padding: 4px 8px 4px 0px; + margin-right: 6px; +} + +.gwt-FileUpload { +} + +.gwt-Frame { + border-top: 2px solid #666; + border-left: 2px solid #666; + border-right: 2px solid #bbb; + border-bottom: 2px solid #bbb; +} + +.gwt-HorizontalSplitPanel { +} +.gwt-HorizontalSplitPanel .hsplitter { + cursor: move; + border: 0px; + background: #e7e7e7; + line-height: 0px; +} +.gwt-VerticalSplitPanel { +} +.gwt-VerticalSplitPanel .vsplitter { + cursor: move; + border: 0px; + background: #e7e7e7; + line-height: 0px; +} + +.gwt-HTML { + padding: 0 0px; +} + +.gwt-Hyperlink { + cursor: pointer; +} + +.gwt-Image { +} + +.gwt-Label { +} + +.gwt-ListBox { +} + +.gwt-MenuBar { + cursor: default; +} +.gwt-MenuBar .gwt-MenuItem { + cursor: default; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-MenuBar .gwt-MenuItem-selected { + background: #E3E8F3; +} +.gwt-MenuBar-horizontal { + background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px; + border: 1px solid #e0e0e0; +} +.gwt-MenuBar-horizontal .gwt-MenuItem { + padding: 5px 10px; + vertical-align: bottom; + color: #000; + font-weight: bold; +} +.gwt-MenuBar-horizontal .gwt-MenuItemSeparator { + width: 1px; + padding: 0px; + margin: 0px; + border: 0px; + border-right: 1px solid #ccc; + background: white; +} +.gwt-MenuBar-horizontal .gwt-MenuItemSeparator .menuSeparatorInner { + width: 1px; + height: 1px; + background: white; +} +.gwt-MenuBar-vertical { + margin-top: 0px; + margin-right: 0px; + background: white; +} +.gwt-MenuBar-vertical table { + border-collapse: collapse; +} +.gwt-MenuBar-vertical .gwt-MenuItem { + padding: 2px 1px 2px 40px; +} +.gwt-MenuBar-vertical .gwt-MenuItemSeparator { + padding: 2px 0px; +} +.gwt-MenuBar-vertical .gwt-MenuItemSeparator .menuSeparatorInner { + height: 1px; + padding: 0px; + border: 0px; + border-top: 1px solid #ccc; + overflow: hidden; +} +.gwt-MenuBar-vertical .subMenuIcon { + padding-left: 4px; +} +.gwt-MenuBar-vertical .subMenuIcon-selected { + background: #E3E8F3; +} +.gwt-MenuBarPopup { + margin: 0px 3px 0px 0px; +} +.gwt-MenuBarPopup .menuPopupTopCenter { + background: url(images/hborder.png) 0px -12px repeat-x; +} +.gwt-MenuBarPopup .menuPopupBottomCenter { + background: url(images/hborder.png) 0px -13px repeat-x; + -background: url(images/hborder_ie6.png) 0px -13px repeat-x; +} +.gwt-MenuBarPopup .menuPopupMiddleLeft { + background: url(images/vborder.png) -12px 0px repeat-y; + -background: url(images/vborder_ie6.png) -12px 0px repeat-y; +} +.gwt-MenuBarPopup .menuPopupMiddleRight { + background: url(images/vborder.png) -13px 0px repeat-y; + -background: url(images/vborder_ie6.png) -13px 0px repeat-y; +} +.gwt-MenuBarPopup .menuPopupTopLeftInner { + width: 5px; + height: 5px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupTopRightInner { + width: 8px; + height: 5px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupBottomLeftInner { + width: 5px; + height: 8px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupBottomRightInner { + width: 8px; + height: 8px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupTopLeft { + background: url(images/corner.png) no-repeat 0px -36px; + -background: url(images/corner_ie6.png) no-repeat 0px -36px; +} +.gwt-MenuBarPopup .menuPopupTopRight { + background: url(images/corner.png) no-repeat -5px -36px; + -background: url(images/corner_ie6.png) no-repeat -5px -36px; +} +.gwt-MenuBarPopup .menuPopupBottomLeft { + background: url(images/corner.png) no-repeat 0px -41px; + -background: url(images/corner_ie6.png) no-repeat 0px -41px; +} +.gwt-MenuBarPopup .menuPopupBottomRight { + background: url(images/corner.png) no-repeat -5px -41px; + -background: url(images/corner_ie6.png) no-repeat -5px -41px; +} +* html .gwt-MenuBarPopup .menuPopupTopLeftInner { + width: 5px; + height: 5px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupTopRightInner { + width: 8px; + height: 5px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupBottomLeftInner { + width: 5px; + height: 8px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupBottomRightInner { + width: 8px; + height: 8px; + overflow: hidden; +} + +.gwt-PasswordTextBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; +} +.gwt-PasswordTextBox-readonly { + color: #888; +} + +.gwt-PopupPanel { + border: 3px solid #e7e7e7; + padding: 3px; + background: white; +} + +.gwt-DecoratedPopupPanel .popupContent { +} +.gwt-DecoratedPopupPanel .popupMiddleCenter { + padding: 3px; + background: #f1f1f1; +} +.gwt-DecoratedPopupPanel .popupTopCenter { + background: url(images/hborder.png) 0px -2937px repeat-x; +} +.gwt-DecoratedPopupPanel .popupBottomCenter { + background: url(images/hborder.png) repeat-x 0px -2938px; + -background: url(images/hborder_ie6.png) repeat-x 0px -2138px; +} +.gwt-DecoratedPopupPanel .popupMiddleLeft { + background: url(images/vborder.png) -21px 0px repeat-y; +} +.gwt-DecoratedPopupPanel .popupMiddleRight { + background: url(images/vborder.png) repeat-y -24px 0px; + -background: url(images/vborder_ie6.png) repeat-y -24px 0px; +} +.gwt-DecoratedPopupPanel .popupTopLeftInner { + width: 6px; + height: 5px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupTopRightInner { + width: 6px; + height: 5px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupBottomLeftInner { + width: 6px; + height: 6px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupBottomRightInner { + width: 6px; + height: 6px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupTopLeft { + background: url(images/circles.png) no-repeat 0px -16px; + -background: url(images/circles_ie6.png) no-repeat 0px -16px; +} +.gwt-DecoratedPopupPanel .popupTopRight { + background: url(images/circles.png) no-repeat -6px -16px; + -background: url(images/circles_ie6.png) no-repeat -6px -16px; +} +.gwt-DecoratedPopupPanel .popupBottomLeft { + background: url(images/circles.png) no-repeat 0px -21px; + -background: url(images/circles_ie6.png) no-repeat 0px -21px; +} +.gwt-DecoratedPopupPanel .popupBottomRight { + background: url(images/circles.png) no-repeat -6px -21px; + -background: url(images/circles_ie6.png) no-repeat -6px -21px; +} +* html .gwt-DecoratedPopupPanel .popupTopLeftInner { + width: 6px; + height: 5px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupTopRightInner { + width: 6px; + height: 5px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupBottomLeftInner { + width: 6px; + height: 6px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupBottomRightInner { + width: 6px; + height: 6px; + overflow: hidden; +} + +.gwt-PopupPanelGlass { + background-color: #000; + opacity: 0.3; + filter: alpha(opacity=30); +} + +.gwt-PushButton-up, +.gwt-PushButton-up-hovering, +.gwt-PushButton-up-disabled, +.gwt-PushButton-down, +.gwt-PushButton-down-hovering, +.gwt-PushButton-down-disabled { + margin: 0; + text-decoration: none; + background: url("images/hborder.png") repeat-x 0px -27px; + border-radius: 2px; + -moz-border-radius: 2px; +} +.gwt-PushButton-up, +.gwt-PushButton-up-hovering, +.gwt-PushButton-up-disabled { + padding: 3px 5px 3px 5px; +} +.gwt-PushButton-up { + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-up-hovering { + border: 1px solid; + border-color: #939393; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-up-disabled { + border: 1px solid #bbb; + cursor: default; + opacity: .5; + filter: alpha(opacity=45); + zoom: 1; +} +.gwt-PushButton-down, +.gwt-PushButton-down-hovering, +.gwt-PushButton-down-disabled { + padding: 4px 6px 2px 4px; + outline:none; +} +.gwt-PushButton-down { + border: 1px inset #666; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-down-hovering { + border: 1px solid #939393; + border-top: 1px solid #333333; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-down-disabled { + border: 1px outset #ccc; + cursor: default; + opacity: 0.5; + filter: alpha(opacity=45); + zoom: 1; +} + +.gwt-RadioButton { +} +.gwt-RadioButton-disabled { + color: #888; +} + +.gwt-RichTextArea { +} +.hasRichTextToolbar { + border: 0px; +} +.gwt-RichTextToolbar { + background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px; + border-bottom: 1px solid #BBBBBB; + padding: 3px; + margin: 0px; +} +.gwt-RichTextToolbar .gwt-PushButton-up { + padding: 0px 0px 0px 1px; + margin-left: 4px; + margin-bottom: 4px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-up-hovering { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-down { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-down-hovering { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-up { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; +} +.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-down { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} + +.gwt-StackPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-StackPanel .gwt-StackPanelItem { + cursor: pointer; + cursor: hand; + font-weight: bold; + font-size: 1.3em; + padding: 3px; + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-StackPanel .gwt-StackPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 2px 10px 5px; +} + +.gwt-DecoratedStackPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .gwt-StackPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 5px 10px 2px; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem { + cursor: pointer; + cursor: hand; +} +.gwt-DecoratedStackPanel .stackItemTopLeft, +.gwt-DecoratedStackPanel .stackItemTopRight { + height: 6px; + width: 6px; + zoom: 1; +} +.gwt-DecoratedStackPanel .stackItemTopLeft { + border-left: 1px solid #bbbbbb; + background: #d3def6 url(images/corner.png) no-repeat 0px -49px; + -background: #d3def6 url(images/corner_ie6.png) no-repeat 0px -49px; +} +.gwt-DecoratedStackPanel .stackItemTopRight { + border-right: 1px solid #bbbbbb; + background: #d3def6 url(images/corner.png) no-repeat -6px -49px; + -background: #d3def6 url(images/corner_ie6.png) no-repeat -6px -49px; +} +.gwt-DecoratedStackPanel .stackItemTopLeftInner, +.gwt-DecoratedStackPanel .stackItemTopRightInner { + width: 1px; + height: 1px; +} +* html .gwt-DecoratedStackPanel .stackItemTopLeftInner, +* html .gwt-DecoratedStackPanel .stackItemTopRightInner { + width: 6px; + height: 6px; + overflow: hidden; +} +.gwt-DecoratedStackPanel .stackItemTopCenter { + background: url(images/hborder.png) 0px -21px repeat-x; +} +.gwt-DecoratedStackPanel .stackItemMiddleLeft { + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; + border-left: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .stackItemMiddleLeftInner, +.gwt-DecoratedStackPanel .stackItemMiddleRightInner { + width: 1px; + height: 1px; +} +.gwt-DecoratedStackPanel .stackItemMiddleRight { + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; + border-right: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .stackItemMiddleCenter { + font-weight: bold; + font-size: 1.3em; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRight, +.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeft { + border: 0px; + background-color: white; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeft, +.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRight { + background-color: white; +} + +.gwt-SuggestBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; + font-family: Arial Unicode MS, Arial, sans-serif; +} + +.gwt-SuggestBoxPopup { +} + +.gwt-SuggestBoxPopup .item { + padding: 2px 6px; + color: #000; + cursor: default; + font-size: 110%; +} +.gwt-SuggestBoxPopup .item-selected { + background: #D5E2FF; +} +.gwt-SuggestBoxPopup .suggestPopupContent { + background: white; +} +.gwt-SuggestBoxPopup .suggestPopupTopCenter { + border-top: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupBottomCenter { + border-bottom: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupTopCenterInner, +.gwt-SuggestBoxPopup .suggestPopupBottomCenterInner { + height: 1px; + line-height: 1px; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleLeft { + border-left: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleRight { + border-right: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleLeftInner, +.gwt-SuggestBoxPopup .suggestPopupMiddleRightInner { + width: 1px; + line-height: 1px; +} +.gwt-SuggestBoxPopup .suggestPopupTopLeftInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupTopRightInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupBottomLeftInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupBottomRightInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupTopLeft { + background: url(images/circles.png) no-repeat 0px -6px; + -background: url(images/circles_ie6.png) no-repeat 0px -6px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupTopRight { + background: url(images/circles.png) no-repeat -5px -6px; + -background: url(images/circles_ie6.png) no-repeat -5px -6px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupBottomLeft { + background: url(images/circles.png) no-repeat 0px -11px; + -background: url(images/circles_ie6.png) no-repeat 0px -11px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupBottomRight { + background: url(images/circles.png) no-repeat -5px -11px; + -background: url(images/circles_ie6.png) no-repeat -5px -11px; + width:5px; + height:5px; +} +* html .gwt-SuggestBoxPopup .suggestPopupTopLeftInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupTopRightInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupBottomLeftInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupBottomRightInner { + width: 0px; + height: 0px; + overflow: hidden; +} + +.gwt-TabBar { + background: #ccc; + padding-top: 6px; +} +.gwt-TabBar .gwt-TabBarFirst { + width: 5px; /* first tab distance from the left */ +} +.gwt-TabBar .gwt-TabBarRest { +} +.gwt-TabBar .gwt-TabBarItem { + margin-right: 4px; + padding: 4px 8px 4px 8px; + cursor: pointer; + cursor: hand; + color: white; + font-weight: normal; + text-align: center; + background: #8E8E8E; + -moz-border-radius: 3px 3px 0px 0px; + border-radius: 3px 3px 0px 0px; +} +.gwt-TabBar .gwt-TabBarItem-selected { + cursor: default; + background: white; + color: #333; + font-weight: bold; +} +.gwt-TabBar .gwt-TabBarItem-disabled { + cursor: default; + color: #999999; +} +.gwt-TabPanel { +} +.gwt-TabPanelBottom { + border-color: #ccc; + border-style: solid; + border-width: 0px 1px 1px; + overflow: hidden; + padding: 6px; +} +.gwt-DecoratedTabBar { + background: #ccc; + padding-top: 6px; +} +.gwt-DecoratedTabBar .gwt-TabBarFirst { + width: 5px; /* first tab distance from the left */ +} +.gwt-DecoratedTabBar .gwt-TabBarRest { +} +.gwt-DecoratedTabBar .gwt-TabBarItem { + border-collapse: collapse; + margin-right: 4px; +} +.gwt-DecoratedTabBar .tabTopCenter { + padding: 0px; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .tabTopLeft, +.gwt-DecoratedTabBar .tabTopRight { + padding: 0px; + zoom: 1; +} +.gwt-DecoratedTabBar .tabTopLeftInner, +.gwt-DecoratedTabBar .tabTopRightInner { + width: 3px; + height: 3px; +} +.gwt-DecoratedTabBar .tabTopLeft { + background: url(images/circles.png) no-repeat 0px 0px; + -background: url(images/circles_ie6.png) no-repeat 0px 0px; +} +.gwt-DecoratedTabBar .tabTopRight { + background: url(images/circles.png) no-repeat -3px 0px; + -background: url(images/circles_ie6.png) no-repeat -3px 0px; +} +* html .gwt-DecoratedTabBar .tabTopLeftInner, +* html .gwt-DecoratedTabBar .tabTopRightInner { + width: 3px; + height: 3px; + overflow: hidden; +} +.gwt-DecoratedTabBar .tabMiddleLeft, +.gwt-DecoratedTabBar .tabMiddleRight { + width: 3px; + padding: 0px; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .tabMiddleLeftInner, +.gwt-DecoratedTabBar .tabMiddleRightInner { + width: 1px; + height: 1px; +} +.gwt-DecoratedTabBar .tabMiddleCenter { + padding: 0px 5px 4px 5px; + cursor: pointer; + cursor: hand; + color: #fff; + font-weight: normal; + text-align: center; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter { + background:#fff; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft { + background: url(images/circles.png) no-repeat -6px 0px; + -background: url(images/circles_ie6.png) no-repeat -6px 0px; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight { + background: url(images/circles.png) no-repeat -9px 0px; + -background: url(images/circles_ie6.png) no-repeat -9px 0px; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft, +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight { + background: #fff; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleCenter { + cursor: default; + background: #fff; + color:#333; + font-weight:bold; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-disabled .tabMiddleCenter { + cursor: default; + color: #999999; +} + +.gwt-TextArea { + padding: 4px; + border: 1px solid #ccc; + border-top: 1px solid #666; + font-size: 100%; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-TextArea-readonly { + color: #888; +} + +.gwt-TextBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: small; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-TextBox-readonly { + color: #888; +} +.gwt-ToggleButton-up, +.gwt-ToggleButton-up-hovering, +.gwt-ToggleButton-up-disabled, +.gwt-ToggleButton-down, +.gwt-ToggleButton-down-hovering, +.gwt-ToggleButton-down-disabled { + margin: 0; + text-decoration: none; + background: url("images/hborder.png") repeat-x 0px -27px; + -moz-border-radius: 2px; + border-radius: 2px; +} +.gwt-ToggleButton-up, +.gwt-ToggleButton-up-hovering, +.gwt-ToggleButton-up-disabled { + padding: 3px 5px 3px 5px; +} +.gwt-ToggleButton-up { + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-up-hovering { + border: 1px solid; + border-color: #939393; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-up-disabled { + border: 1px solid #bbb; + cursor: default; + opacity: .5; + zoom: 1; + filter: alpha(opacity=45); +} +.gwt-ToggleButton-down, +.gwt-ToggleButton-down-hovering, +.gwt-ToggleButton-down-disabled { + padding: 4px 6px 2px 4px; +} +.gwt-ToggleButton-down { + background-position: 0 -513px; + border: 1px inset #666; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-down-hovering { + background-position: 0 -513px; + border: 1px inset; + border-color: #9cf #69e #69e #7af; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-down-disabled { + background-position: 0 -513px; + border: 1px inset #ccc; + cursor: default; + opacity: .5; + zoom: 1; + filter: alpha(opacity=45); +} + +.gwt-Tree .gwt-TreeItem { + padding: 1px 0px; + margin: 0px; + white-space: nowrap; + cursor: hand; + cursor: pointer; + zoom: 1; +} +.gwt-Tree .gwt-TreeItem-selected { + background: #ebeff9; +} +.gwt-TreeItem .gwt-RadioButton input, +.gwt-TreeItem .gwt-CheckBox input { + margin-right: 0px; +} +* html .gwt-TreeItem .gwt-RadioButton input, +* html .gwt-TreeItem .gwt-CheckBox input { + margin-right: -4px; +} + +.gwt-DateBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; +} +.gwt-DateBox input { + width: 8em; +} +.dateBoxFormatError { + background: #ffcccc; +} +.dateBoxPopup { +} + +.gwt-DatePicker { + border: 1px solid #ccc; + border-top:1px solid #999; + cursor: default; +} +.gwt-DatePicker td, +.datePickerMonthSelector td:focus { + outline: none; +} +.datePickerDays { + width: 100%; + background: white; +} +.datePickerDay, +.datePickerWeekdayLabel, +.datePickerWeekendLabel { + font-size: 85%; + text-align: center; + padding: 4px; + outline: none; + font-weight:bold; + color:#333; + border-right: 1px solid #EDEDED; + border-bottom: 1px solid #EDEDED; +} +.datePickerWeekdayLabel, +.datePickerWeekendLabel { + background: #fff; + padding: 0px 4px 2px; + cursor: default; + color:#666; + font-size:70%; + font-weight:normal; +} +.datePickerDay { + padding: 4px 7px; + cursor: hand; + cursor: pointer; +} +.datePickerDayIsWeekend { + background: #f7f7f7; +} +.datePickerDayIsFiller { + color: #999; + font-weight:normal; +} +.datePickerDayIsValue { + background: #d7dfe8; +} +.datePickerDayIsDisabled { + color: #AAAAAA; + font-style: italic; +} +.datePickerDayIsHighlighted { + background: #F0E68C; +} +.datePickerDayIsValueAndHighlighted { + background: #d7dfe8; +} +.datePickerDayIsToday { + padding: 3px; + color: #fff; + background: url(images/hborder.png) repeat-x 0px -2607px; +} + +.datePickerMonthSelector { + width: 100%; + padding: 1px 0 5px 0; + background: #fff; +} +td.datePickerMonth { + text-align: center; + vertical-align: middle; + white-space: nowrap; + font-size: 100%; + font-weight: bold; + color: #333; +} +.datePickerPreviousButton, +.datePickerNextButton { + font-size: 120%; + line-height: 1em; + color: #3a6aad; + cursor: hand; + cursor: pointer; + font-weight: bold; + padding: 0px 4px; + outline: none; +} + +.gwt-StackLayoutPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader { + cursor: pointer; + cursor: hand; + font-weight: bold; + font-size: 1.3em; + padding: 3px; + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader-hovering { + background: #d3def6; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 5px 10px 2px; +} + +.gwt-TabLayoutPanel { +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTabs { + background: #ccc; + padding-top: 6px; + padding-right: 5px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelContentContainer { + border-color: #ccc; + border-style: solid; + border-width: 0px 1px 1px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelContent { + overflow: hidden; + padding: 6px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab { + margin-right: 4px; + padding: 4px 8px 4px 8px; + cursor: pointer; + cursor: hand; + color: white; + font-weight: normal; + text-align: center; + background: #8E8E8E; + -moz-border-radius: 3px 3px 0px 0px; + border-radius: 3px 3px 0px 0px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab-selected { + cursor: default; + background: white; + color: #333; + font-weight: bold; +} + +.gwt-SplitLayoutPanel-HDragger { + background: #e7e7e7 url(images/thumb_vertical.png) center center no-repeat; + cursor: col-resize; +} + +.gwt-SplitLayoutPanel-VDragger { + background: #e7e7e7 url(images/thumb_horz.png) center center no-repeat; + cursor: row-resize; +} \ No newline at end of file diff --git a/common/static/js/capa/jsmolcalc/gwt/clean/images/circles.png b/common/static/js/capa/jsmolcalc/gwt/clean/images/circles.png new file mode 100644 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cWRFj~4K)iens@HC5~GEg#T+?beuhsJ<p-viElyZ|Kd7absSQs#3kn)kZ_F;jAlH3b5eanOe>JWUEa?CpL7api_`(**4}C zsiUKVcs#Du7Szzo#$)gvRp{D*0Q%b;Bxa5)bZtOEbxvDf1c$>>)VN~5bX-)u@U5YU z`uh5cnkFYFt21=v$h$M8JNpk8)rwyey4U(?3Hra)x@xVHlAv%nEQ#HXTxOj}dM}(5 zXtm~`NF;)yC^vvBK&!aC4m=Ep!=HUKwS(!Rswm1B5CB5H4+0LC%MHNR)@Ez+&qvLQ zqQp?=9UVj7oI;`nV@b8U$7lcC@X*DQ z>emGz`M{v?8lI!pGP5ZJw0_y!U>Fpvz#lZbj>?tcb@UGgBT0GyAom*p0000EMUMH{Tt)^YzrjulMdhy7%DGg(u%Wef{#r~0e*ORdfA{X)+txWagA6SR@(X5gcy=QV#7XjYcVXyYmGuB}I14-?iy0WWg+Z8+ zVb&Z8pdfpRr>`sfO-2DeWd?=She578b~+rKoHwFvIpv^3&S znZ$cbsf~tw4yym-^Sy57)jqp;M6*THt?XH_{{o%buOAdeR%h&a+GARJeNx~5sz*!B z*IZS&m*YLZq-ye8N6o%VGd7f4+A4bP0l+XkK Dn$5EQ literal 0 HcmV?d00001 diff --git a/common/static/js/capa/jsmolcalc/gwt/clean/images/hborder.png b/common/static/js/capa/jsmolcalc/gwt/clean/images/hborder.png new file mode 100644 index 0000000000000000000000000000000000000000..ec58ae6126a0f189b14bcaaf06a8cfebaaacffe3 GIT binary patch literal 1995 zcmeAS@N?(olHy`uVBq!ia0vp^3JeU~eH?5+R#0}_1R%v&9OUlAuG#z(zf~Y@3)nH$zj{tZ?T}AQI}UD_Z!QlhHIBqU%X_w^@j6H36riJ=Veu(aH`0@ z{vD#sKtGHKFy+^W4+fP??N0^R)?^+~3$BFxN$}SZ#?unXDvYLo{sbL9U(d|>8Gn}6?2TL8@bvWd_ZOwE zl%^oHsy!aynkVH^c-Kl zYk4Uo^1h92qL4+~OO{XZC!=<-)P6eubx?+0;ek&-eppOu*p)k5ZiaNg_uBLGnu1PU zH+c{&QeZc~Js9X{fxE2BFKh1OwsRNOSZcFec!xjJKjxB|9djP!R^J49%G1@)Wt~$( F697DM5(oeQ literal 0 HcmV?d00001 diff --git a/common/static/js/capa/jsmolcalc/gwt/clean/images/hborder_ie6.png b/common/static/js/capa/jsmolcalc/gwt/clean/images/hborder_ie6.png new file mode 100644 index 0000000000000000000000000000000000000000..2268f88a76174ada5393bf042902f7743a9e8e76 GIT binary patch literal 706 zcmeAS@N?(olHy`uVBq!ia0vp^3JeS!xg5+u){)-3!a$0#ILO_JVcj{Imq1QkfKQ04 zu2-3XZ?#EiyG6_-o1}Tx+3Os$*VyK5axL2GT(aAv@_=Xc(MbnC?A^0>>fw(wkA6II zP$Gv;^uHOH4=FyJ}PrluJ{Qcgu@6Vn+ zd-CeX^S3|WzkmPs!}pILKYsf1^V|1tKYsrC_51Jt|NsBmSR4hqgtNdSvY3H^TL^?1 zFWs&C0~BO0@$_|Nzs)4cXKd=dt5E^y`cs}Rjv*Dd-rjZ3yJNuM5V-97Ba6<*Cfj%1 z{ofS%gh9T8jV1lhzhAlO=GyPOtdKtl@HvnJcz#XAlqc0%j4oJ4}!Na7l@et z5HPKf@7*p)v^g+^HX;S`ZyD~m^5!j;d|)+;aor--1Flyd*f0SVG#qC9DOW1V$j?2; zm7U3NvFZU&lTGdyD`a}rFIGtPKEGHY*&BYbLbliZBF}{8ISfT=;S4+F;#|BN(gU0C r9Qo&B?7;WQBI=PAAM=yXNyb0851P%0GLA5i0$J|q>gTe~DWM4fBnA0p literal 0 HcmV?d00001 diff --git a/common/static/js/capa/jsmolcalc/gwt/clean/images/thumb_horz.png b/common/static/js/capa/jsmolcalc/gwt/clean/images/thumb_horz.png new file mode 100644 index 0000000000000000000000000000000000000000..b43e683e1fc8ff563a0e90c465ed6bf0c12c3924 GIT binary patch literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)I!VDxgys+>CQq09po*^6@9Je3(KLBzi0(?ST zjg5`}|Nozxn;Q@i(ACxD=;&BeQxhK_e#- zgOR?Wfxe;P-5zNcpaKz37sn8enaK&J;l&98A|fIQ4VxK+%@|MTrwIH2$}@Pn`njxg HN@xNALh?UZ literal 0 HcmV?d00001 diff --git a/common/static/js/capa/jsmolcalc/gwt/clean/images/thumb_vertical.png b/common/static/js/capa/jsmolcalc/gwt/clean/images/thumb_vertical.png new file mode 100644 index 0000000000000000000000000000000000000000..bd57f594ac98980f6eda313abba3f4ed1bed2ae6 GIT binary patch literal 231 zcmeAS@N?(olHy`uVBq!ia0vp^EI`c8!VDzudVhQjq?n7HJVQ7*IBq}me*ol41o(uw z8XFt`|NlQXH#Z<4psTCP(b2J{rY1f<{zP2lbf6l}0*}aI1_o{+5N5n|x9$&6P^QE+ zq9iy!t)x7$D3!r6B|j-u!7Z~WwLHHlyI8?F*tBr#V>6&SQII<4qSVBa%=|oskj&gv z1|xk#1ARloyFJn%*U5UiIEHY{OcoGG5D-lj5K9vfPZtnM5)e)n5M*TF)?*Z3_i%|1 PP$7e-tDnm{r-UW|-D^M6 literal 0 HcmV?d00001 diff --git a/common/static/js/capa/jsmolcalc/gwt/clean/images/vborder.png b/common/static/js/capa/jsmolcalc/gwt/clean/images/vborder.png new file mode 100644 index 0000000000000000000000000000000000000000..6840d11a1227e163a012e526e821babed6736814 GIT binary patch literal 298 zcmeAS@N?(olHy`uVBq!ia0vp^x~AHRJ0^8f$;XVMF7fGRl)JR*x37`TN%nDNrx zx<5cc_7YEDSN7XXl6<<>70#1?0EJXNT^vI+&L5zMQp3{0%&`0Ne@8vu$Q+;s22WQ%mvv4FO#qf+N16Zt literal 0 HcmV?d00001 diff --git a/common/static/js/capa/jsmolcalc/hosted.html b/common/static/js/capa/jsmolcalc/hosted.html new file mode 100644 index 0000000000..48b87f39b5 --- /dev/null +++ b/common/static/js/capa/jsmolcalc/hosted.html @@ -0,0 +1,365 @@ + + + +This html file is for Development Mode support. + diff --git a/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js b/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js new file mode 100644 index 0000000000..4f38a87161 --- /dev/null +++ b/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js @@ -0,0 +1,360 @@ +function jsmolcalc(){ + var $wnd_0 = window, $doc_0 = document, $stats = $wnd_0.__gwtStatsEvent?function(a){ + return $wnd_0.__gwtStatsEvent(a); + } + :null, $sessionId_0 = $wnd_0.__gwtStatsSessionId?$wnd_0.__gwtStatsSessionId:null, scriptsDone, loadDone, bodyDone, base = '', metaProps = {}, values = [], providers = [], answers = [], softPermutationId = 0, onLoadErrorFunc, propertyErrorFunc; + $stats && $stats({moduleName:'jsmolcalc', sessionId:$sessionId_0, subSystem:'startup', evtGroup:'bootstrap', millis:(new Date).getTime(), type:'begin'}); + if (!$wnd_0.__gwt_stylesLoaded) { + $wnd_0.__gwt_stylesLoaded = {}; + } + if (!$wnd_0.__gwt_scriptsLoaded) { + $wnd_0.__gwt_scriptsLoaded = {}; + } + function isHostedMode(){ + var result = false; + try { + var query = $wnd_0.location.search; + return (query.indexOf('gwt.codesvr=') != -1 || (query.indexOf('gwt.hosted=') != -1 || $wnd_0.external && $wnd_0.external.gwtOnLoad)) && query.indexOf('gwt.hybrid') == -1; + } + catch (e) { + } + isHostedMode = function(){ + return result; + } + ; + return result; + } + + function maybeStartModule(){ + if (scriptsDone && loadDone) { + var iframe = $doc_0.getElementById('jsmolcalc'); + var frameWnd = iframe.contentWindow; + if (isHostedMode()) { + frameWnd.__gwt_getProperty = function(name_0){ + return computePropValue(name_0); + } + ; + } + jsmolcalc = null; + frameWnd.gwtOnLoad(onLoadErrorFunc, 'jsmolcalc', base, softPermutationId); + $stats && $stats({moduleName:'jsmolcalc', sessionId:$sessionId_0, subSystem:'startup', evtGroup:'moduleStartup', millis:(new Date).getTime(), type:'end'}); + } + } + + function computeScriptBase(){ + function getDirectoryOfFile(path){ + var hashIndex = path.lastIndexOf('#'); + if (hashIndex == -1) { + hashIndex = path.length; + } + var queryIndex = path.indexOf('?'); + if (queryIndex == -1) { + queryIndex = path.length; + } + var slashIndex = path.lastIndexOf('/', Math.min(queryIndex, hashIndex)); + return slashIndex >= 0?path.substring(0, slashIndex + 1):''; + } + + function ensureAbsoluteUrl(url){ + if (url.match(/^\w+:\/\//)) { + } + else { + var img = $doc_0.createElement('img'); + img.src = url + 'clear.cache.gif'; + url = getDirectoryOfFile(img.src); + } + return url; + } + + function tryMetaTag(){ + var metaVal = __gwt_getMetaProperty('baseUrl'); + if (metaVal != null) { + return metaVal; + } + return ''; + } + + function tryNocacheJsTag(){ + var scriptTags = $doc_0.getElementsByTagName('script'); + for (var i = 0; i < scriptTags.length; ++i) { + if (scriptTags[i].src.indexOf('jsmolcalc.nocache.js') != -1) { + return getDirectoryOfFile(scriptTags[i].src); + } + } + return ''; + } + + function tryMarkerScript(){ + var thisScript; + if (typeof isBodyLoaded == 'undefined' || !isBodyLoaded()) { + var markerId = '__gwt_marker_jsmolcalc'; + var markerScript; + $doc_0.write(' - - - - - - -

      Edit A Molecule

      -

      The molecule Dopamine is shown below. Dopamine is a neurotransmitter.

      - - - - - Applet failed to run. No Java plug-in was found. - - -
      - - -

      Edit the molecule to complete each one of the following the tasks. Click the check button to check your answer for that. Click submit when you are done.

      -
        - - diff --git a/common/lib/capa/capa/templates/editamolecule.html b/common/lib/capa/capa/templates/editamolecule.html index b5b7fd3f8e..b32de66241 100644 --- a/common/lib/capa/capa/templates/editamolecule.html +++ b/common/lib/capa/capa/templates/editamolecule.html @@ -13,12 +13,13 @@ % endif - + Applet failed to run. No Java plug-in was found. +

        diff --git a/common/static/applets/capa/edit-a-molecule.jar b/common/static/applets/capa/editamolecule/JME.jar similarity index 100% rename from common/static/applets/capa/edit-a-molecule.jar rename to common/static/applets/capa/editamolecule/JME.jar diff --git a/common/static/css/capa/edit-a-molecule.css b/common/static/css/capa/edit-a-molecule.css deleted file mode 100644 index b641b80408..0000000000 --- a/common/static/css/capa/edit-a-molecule.css +++ /dev/null @@ -1,38 +0,0 @@ -/** Add css rules here for your application. */ - - -/** Example rules used by the template application (remove for your app) */ -h1 { - font-size: 2em; - font-weight: bold; - color: #777777; - margin: 40px 0px 70px; -} - -.calculateButton { - display: block; - font-size: 16pt; -} - -.newMoleculeButton { - display: block; - font-size: 16pt; -} - -/** Most GWT widgets already have a style name defined */ -.gwt-DialogBox { - width: 400px; -} - -.dialogVPanel { - margin: 5px; -} - -.serverResponseLabelError { - color: red; -} - -/** Set ids using widget.getElement().setId("idOfElement") */ -#closeButton { - margin: 15px 6px 6px; -} diff --git a/common/static/js/capa/edit-a-molecule.js b/common/static/js/capa/editamolecule.js similarity index 100% rename from common/static/js/capa/edit-a-molecule.js rename to common/static/js/capa/editamolecule.js From 11db1190e62ce17917fadbc5c38c84d4b5ef8b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s=20Rocha?= Date: Wed, 9 Jan 2013 11:50:42 -0500 Subject: [PATCH 183/347] WIP Save edit-a-molecule state in input field Also add reset button and fix run condition from the GWT loader in Firefox --- .../capa/capa/templates/editamolecule.html | 7 +- common/static/js/capa/editamolecule.js | 118 +++++++++++++----- 2 files changed, 90 insertions(+), 35 deletions(-) diff --git a/common/lib/capa/capa/templates/editamolecule.html b/common/lib/capa/capa/templates/editamolecule.html index b32de66241..2ad47d3a87 100644 --- a/common/lib/capa/capa/templates/editamolecule.html +++ b/common/lib/capa/capa/templates/editamolecule.html @@ -15,7 +15,7 @@ - + Applet failed to run. No Java plug-in was found. @@ -34,8 +34,11 @@ % endif

        +
        + +

        % if status in ['unsubmitted', 'correct', 'incorrect', 'incomplete']:
        -% endif + % endif
        diff --git a/common/static/js/capa/editamolecule.js b/common/static/js/capa/editamolecule.js index 2e91f6b91d..3ca0078848 100644 --- a/common/static/js/capa/editamolecule.js +++ b/common/static/js/capa/editamolecule.js @@ -1,32 +1,81 @@ (function () { - var timeout = 1000; + var timeout = 100; - function initializeApplet(applet) { - console.log("Initializing " + applet); - waitForApplet(applet); + var applets = $('.editamoleculeinput object'); + var input_field = $('.editamoleculeinput input'); + var reset_button = $('.editamoleculeinput button.reset'); + + console.log('EDIT A MOLECULE'); + + waitForJSMolCalc(); + + // FIXME: [rocha] jsmolcalc and jsmol.API should be initialized + // automatically by the GWT script loader. However, it is not + // working correcly when including them inside the + // courseware. + function waitForJSMolCalc() { + if (typeof(jsmolcalc) != "undefined" && jsmolcalc) + { + // FIXME: [rocha] this should be called automatically by + // GWT at the end of the loader. However it is not. + jsmolcalc.onInjectionDone('jsmolcalc'); + } + + if (typeof(jsmol) != "undefined") { + // ready, initialize applets, + applets.each(function(i, el) { initializeApplet(el); }); + } else if (timeout > 30 * 1000) { + console.error("JSMolCalc did not load on time."); + } else { + console.log("Waiting for JSMolCalc..."); + setTimeout(function() { + waitForJSMolCalc(); }, timeout); + } } - function waitForApplet(applet) { + function initializeApplet(applet) { + console.log("Initializing applet..." ); + waitForApplet(applet, configureApplet); + } + + function waitForApplet(applet, callback) { if (applet.isActive && applet.isActive()) { console.log("Applet is ready."); - requestAppletData(applet); + callback(applet); } else if (timeout > 30 * 1000) { console.error("Applet did not load on time."); } else { console.log("Waiting for applet..."); - setTimeout(function() { waitForApplet(applet); }, timeout); + setTimeout(function() { + waitForApplet(applet, callback); }, timeout); } } + function configureApplet(applet) { + var value = input_field.val(); + + if (value) { + console.log('Loading previous mol data...'); + var data = JSON.parse(value)["mol"]; + loadAppletData(applet, data); + } else { + requestAppletData(applet); + } + + reset_button.on('click', function() { requestAppletData(applet); }); + + // FIXME: [rocha] This is a hack to capture the click on the check + // button and update the hidden field with the applet values + var check_button = $(applet).parents('.problem').find('input.check'); + check_button.on('click', function() { updateInput(applet); }); + } + function requestAppletData(applet) { - var file = $(applet).find('param[name=file]').attr('value'); + var molFile = $(applet).find('param[name=molfile]').attr('value'); - console.log("Getting file url..."); - console.log(file); - - console.log("Loading mol data..."); + console.log("Loading mol data from " + molFile + " ..."); jQuery.ajax({ - url: file, + url: molFile, dataType: "text", success: function(data) { console.log("Done."); @@ -40,13 +89,7 @@ function loadAppletData(applet, data) { applet.readMolFile(data); - updateAppletInfo(applet); - } - - function updateAppletInfo(applet) { - var info = getAppletInfo(applet); - console.log(info.toString()); - return info; + updateInput(applet); } function getAppletInfo(applet) { @@ -57,22 +100,31 @@ return jsmol.API.getInfo(mol, smiles, jme); } - console.log('EDIT A MOLECULE'); + function updateInput(applet) { + var mol = applet.molFile(); + var smiles = applet.smiles(); + var jme = applet.jmeFile(); - // FIXME: [rocha] This should be called automatically by the GWT - // script loader, but for some reason it is not. - jsmolcalc.onInjectionDone('jsmolcalc'); + var info = formatInfo(jsmol.API.getInfo(mol, smiles, jme).toString()); + var value = { mol: mol, info: info }; - // FIXME: [rocha] This is a hack to capture the click on the check - // button and update the hidden field with the applet values - var check = $('.editamoleculeinput').parents('.problem').find('input.check'); - check.on('click', function() {console.log("CLICK");}); + console.log("Molecule info:"); + console.log(info); - // TODO: [rocha] add function to update hidden field - // TODO: [rocha] load state from hidden field if available + input_field.val(JSON.stringify(value)); - // initialize applet - var applets = $('.editamoleculeinput object'); - applets.each(function(i, el) { initializeApplet(el); }); + return value; + } + + function formatInfo(info) { + var results = []; + // create a te + var fragment = $('
        ').append(info); + fragment.find('font').each(function () { + results.push($(this).html()); + }); + + return results; + } }).call(this); From a52bf81846199913a0d539338e4674f94821b0fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s=20Rocha?= Date: Wed, 9 Jan 2013 15:42:53 -0500 Subject: [PATCH 184/347] WIP Support multiple edit-a-molecule applets --- common/static/js/capa/editamolecule.js | 96 +++++++++++++------------- 1 file changed, 49 insertions(+), 47 deletions(-) diff --git a/common/static/js/capa/editamolecule.js b/common/static/js/capa/editamolecule.js index 3ca0078848..42242195bd 100644 --- a/common/static/js/capa/editamolecule.js +++ b/common/static/js/capa/editamolecule.js @@ -1,12 +1,6 @@ (function () { var timeout = 100; - var applets = $('.editamoleculeinput object'); - var input_field = $('.editamoleculeinput input'); - var reset_button = $('.editamoleculeinput button.reset'); - - console.log('EDIT A MOLECULE'); - waitForJSMolCalc(); // FIXME: [rocha] jsmolcalc and jsmol.API should be initialized @@ -22,64 +16,80 @@ } if (typeof(jsmol) != "undefined") { - // ready, initialize applets, - applets.each(function(i, el) { initializeApplet(el); }); - } else if (timeout > 30 * 1000) { - console.error("JSMolCalc did not load on time."); + // ready, initialize applets + initializeApplets(); } else { - console.log("Waiting for JSMolCalc..."); - setTimeout(function() { - waitForJSMolCalc(); }, timeout); + setTimeout(function() { waitForJSMolCalc(); }, timeout); } } - function initializeApplet(applet) { - console.log("Initializing applet..." ); - waitForApplet(applet, configureApplet); + function initializeApplets() { + var applets = $('.editamoleculeinput object'); + applets.each(function(i, element) { + var applet = $(element); + if (!applet.hasClass('initialized')) { + applet.addClass("initialized"); + waitForApplet(applet, configureApplet); + } + }); } function waitForApplet(applet, callback) { - if (applet.isActive && applet.isActive()) { - console.log("Applet is ready."); + if (applet[0].isActive && applet[0].isActive()) { callback(applet); - } else if (timeout > 30 * 1000) { - console.error("Applet did not load on time."); } else { - console.log("Waiting for applet..."); setTimeout(function() { waitForApplet(applet, callback); }, timeout); } } function configureApplet(applet) { + // Traverse up the DOM tree and get the other relevant elements + var parent = applet.parent(); + var input_field = parent.find('input[type=hidden]'); + var reset_button = parent.find('button.reset'); + + console.log(input_field.toArray()); + console.log(input_field.toArray().length); + + // Load initial data var value = input_field.val(); + value = false; if (value) { - console.log('Loading previous mol data...'); + console.log('loading old'); var data = JSON.parse(value)["mol"]; - loadAppletData(applet, data); + console.log(data); + loadAppletData(applet, data, input_field); } else { - requestAppletData(applet); + console.log('loading preset'); + requestAppletData(applet, input_field); } - reset_button.on('click', function() { requestAppletData(applet); }); + reset_button.on('click', function() { + console.log('reseting'); + requestAppletData(applet, input_field); + }); // FIXME: [rocha] This is a hack to capture the click on the check // button and update the hidden field with the applet values - var check_button = $(applet).parents('.problem').find('input.check'); - check_button.on('click', function() { updateInput(applet); }); + var problem = applet.parents('.problem'); + var check_button = problem.find('input.check'); + check_button.on('click', function() { + console.log('check'); + updateInput(applet, input_field); + }); } - function requestAppletData(applet) { - var molFile = $(applet).find('param[name=molfile]').attr('value'); + function requestAppletData(applet, input_field) { + var molFile = applet.find('param[name=molfile]').attr('value'); - console.log("Loading mol data from " + molFile + " ..."); jQuery.ajax({ url: molFile, dataType: "text", success: function(data) { console.log("Done."); - loadAppletData(applet, data); + loadAppletData(applet, data, input_field); }, error: function() { console.error("Cannot load mol data."); @@ -87,23 +97,15 @@ }); } - function loadAppletData(applet, data) { - applet.readMolFile(data); - updateInput(applet); + function loadAppletData(applet, data, input_field) { + applet[0].readMolFile(data); + updateInput(applet, input_field); } - function getAppletInfo(applet) { - var mol = applet.molFile(); - var smiles = applet.smiles(); - var jme = applet.jmeFile(); - - return jsmol.API.getInfo(mol, smiles, jme); - } - - function updateInput(applet) { - var mol = applet.molFile(); - var smiles = applet.smiles(); - var jme = applet.jmeFile(); + function updateInput(applet, input_field) { + var mol = applet[0].molFile(); + var smiles = applet[0].smiles(); + var jme = applet[0].jmeFile(); var info = formatInfo(jsmol.API.getInfo(mol, smiles, jme).toString()); var value = { mol: mol, info: info }; @@ -118,7 +120,7 @@ function formatInfo(info) { var results = []; - // create a te + var fragment = $('
        ').append(info); fragment.find('font').each(function () { results.push($(this).html()); From bc3f373edfec61b98a74e998ed5533062fa012bb Mon Sep 17 00:00:00 2001 From: jmclaus Date: Wed, 9 Jan 2013 15:14:25 -0500 Subject: [PATCH 185/347] Added design protein 2D --- common/lib/capa/capa/inputtypes.py | 36 ++++++++++++++++ common/lib/capa/capa/responsetypes.py | 5 ++- .../capa/templates/designprotein2dinput.html | 39 ++++++++++++++++++ common/static/applets/capa/Protex.jar | Bin 0 -> 212767 bytes common/static/js/capa/design-protein-2d.js | 27 ++++++++++++ 5 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 common/lib/capa/capa/templates/designprotein2dinput.html create mode 100644 common/static/applets/capa/Protex.jar create mode 100644 common/static/js/capa/design-protein-2d.js diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index 91eace9fe3..cbd27135f3 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -863,3 +863,39 @@ class EditAMoleculeInput(InputTypeBase): return context registry.register(EditAMoleculeInput) + +#----------------------------------------------------------------------------- + +class DesignProtein2dInput(InputTypeBase): + """ + An input type for design of a protein in 2D. Integrates with the Protex java applet. + + Example: + + + """ + + template = "designprotein2dinput.html" + tags = ['designprotein2dinput'] + + @classmethod + def get_attributes(cls): + """ + Note: width, hight, and target_shape are required. + """ + return [Attribute('width'), + Attribute('height'), + Attribute('target_shape') + ] + + def _extra_context(self): + """ + """ + context = { + 'applet_loader': '/static/js/capa/design-protein-2d.js', + } + + return context + +registry.register(DesignProtein2dInput) + diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index b25f429ffa..4aae384f72 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -188,7 +188,7 @@ class LoncapaResponse(object): # problem author can make this span display:inline if self.xml.get('inline',''): tree.set('class','inline') - + for item in self.xml: # call provided procedure to do the rendering item_xhtml = renderer(item) @@ -875,7 +875,8 @@ def sympy_check2(): allowed_inputfields = ['textline', 'textbox', 'crystallography', 'chemicalequationinput', 'vsepr_input', - 'drag_and_drop_input', 'editamoleculeinput'] + 'drag_and_drop_input', 'editamoleculeinput', + 'designprotein2dinput'] def setup_response(self): xml = self.xml diff --git a/common/lib/capa/capa/templates/designprotein2dinput.html b/common/lib/capa/capa/templates/designprotein2dinput.html new file mode 100644 index 0000000000..7b1c6b6f41 --- /dev/null +++ b/common/lib/capa/capa/templates/designprotein2dinput.html @@ -0,0 +1,39 @@ +
        +
        + + % if status == 'unsubmitted': +
        + % elif status == 'correct': +
        + % elif status == 'incorrect': +
        + % elif status == 'incomplete': +
        + % endif + + + + + + Applet failed to run. No Java plug-in was found. + + + + +

        + % if status == 'unsubmitted': + unanswered + % elif status == 'correct': + correct + % elif status == 'incorrect': + incorrect + % elif status == 'incomplete': + incomplete + % endif +

        + +

        + % if status in ['unsubmitted', 'correct', 'incorrect', 'incomplete']: +
        +% endif +
        diff --git a/common/static/applets/capa/Protex.jar b/common/static/applets/capa/Protex.jar new file mode 100644 index 0000000000000000000000000000000000000000..2c6a819ec5d1159715b3aa9c9822626b15303515 GIT binary patch literal 212767 zcmZsC1CS=&mTlRtuWZ}4ZQHilRn=X#ZQHhO+v-A>?Rx!Y?#$eO-ph!Skr}xnhsS43a$%`|5O#lHY{tF5Pbp98b;ire< z@fRNQcL4s5|Axv5$xDfgsi@M+iQmgjP0Gs9(a*!n&{5A!%{D4CF0t$#J5PzAIMGVV z&Pb{OMF5l0Jw$o6XGJQb$|$S2W>X8DPd~sNL{GaV!cDo#Maj9s!}~_l!PBC#;=;l> zE2Ht=Cp@xxwfms5+`DGGphQMi17ITVWRz(hK>7d-7z`NyJy9T_qyM!g$iEYHbarqx z^JMt1)%?F8xc>oJn%O%3Hxdfy`0wjrK(8gH!GM53V1a-z{|6~#Vr432FJftAWlwKn zYvkhMrvAePRSocMXW-=+{}3)XoFXZwOsI^UPZ!Hi3nm=d0-=-CAeG{}>B?c>(o9GF zBHH_lbB5BO@0P8|&2$8D&%zmZw!Kqs!2Esms{6<6>*q}SN%F`2uE9@G%z;*5R;p7< zt&(ax(ott`eluCx@(yId$bhkijvDgF3MI)I)70iHJi*KWdasJiajofv<$|7K^T><< zbdk-vaGJ{mxpQ;=Kd_k%C!WF9M>hq9s{AkA3 zj*9xK-*Z)VXX5^*cGm9N(j+pOUX!$R=~{fL&QcU;L2z;mv}SUZRe6gGPa`cV6350G;b{GJR9 zj&MRfzpO0bJjDoq83KXAY~c7nA95lzs_W*#Zg=4T)*z8bq)0(I)mRkW6!+M&)R8DH zTTnx4G`pB&Wgk2GfJM{J;r$!oV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nY5oW~<%%B?}o#H#iF6{@@!vQ4Z z|220pck_t1gKn)Oup)l_BF_GS^mbJ_ct^keTUjFw2o)r#=lF?vqkIox=-`3zvT`~g zVNp6GQQUW6&8@&%L!ftw-_2CMw}<(w{|(w&Xdf{VdyKQwKbzRQ5ENSgzqKtCvJ7tc k>qY5ye8_*+eIj-am-V!Wf%Fi_MerjBQrruE5DJk016tk12mk;8 literal 0 HcmV?d00001 diff --git a/common/static/js/capa/design-protein-2d.js b/common/static/js/capa/design-protein-2d.js new file mode 100644 index 0000000000..e4e37995d3 --- /dev/null +++ b/common/static/js/capa/design-protein-2d.js @@ -0,0 +1,27 @@ +(function () { + var timeout = 1000; + + function initializeApplet(applet) { + console.log("Initializing " + applet); + waitForApplet(applet); + } + + function waitForApplet(applet) { + if (applet.isActive && applet.isActive()) { + console.log("Applet is ready."); + var answerStr = applet.checkAnswer(); + console.log(answerStr); + var input = $('.designprotein2dinput input'); + console.log(input); + input.val(answerStr); + } else if (timeout > 30 * 1000) { + console.error("Applet did not load on time."); + } else { + console.log("Waiting for applet..."); + setTimeout(function() { waitForApplet(applet); }, timeout); + } + } + + var applets = $('.designprotein2dinput object'); + applets.each(function(i, el) { initializeApplet(el); }); +}).call(this); From 752a455257e47dcbdd8358d7921f250f94832190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s=20Rocha?= Date: Wed, 9 Jan 2013 18:46:36 -0500 Subject: [PATCH 186/347] Fixed design-a-protein input type to save the value of output --- common/static/js/capa/design-protein-2d.js | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/common/static/js/capa/design-protein-2d.js b/common/static/js/capa/design-protein-2d.js index e4e37995d3..66a6338e53 100644 --- a/common/static/js/capa/design-protein-2d.js +++ b/common/static/js/capa/design-protein-2d.js @@ -9,19 +9,26 @@ function waitForApplet(applet) { if (applet.isActive && applet.isActive()) { console.log("Applet is ready."); - var answerStr = applet.checkAnswer(); - console.log(answerStr); - var input = $('.designprotein2dinput input'); - console.log(input); - input.val(answerStr); - } else if (timeout > 30 * 1000) { - console.error("Applet did not load on time."); + + // FIXME: [rocha] This is a hack to capture the click on the check + // button and update the hidden field with the applet values + var input_field = $('.designprotein2dinput input'); + + var problem = $(applet).parents('.problem'); + var check_button = problem.find('input.check'); + check_button.on('click', function() { + var answerStr = applet.checkAnswer(); + console.log(answerStr); + input_field.val(answerStr); + }); + } else { console.log("Waiting for applet..."); setTimeout(function() { waitForApplet(applet); }, timeout); } } - + var applets = $('.designprotein2dinput object'); applets.each(function(i, el) { initializeApplet(el); }); + }).call(this); From d74b21e4448db4cff638735ce89674e1e5640257 Mon Sep 17 00:00:00 2001 From: jmclaus Date: Wed, 9 Jan 2013 16:53:50 -0500 Subject: [PATCH 187/347] Added edit a gene --- common/lib/capa/capa/inputtypes.py | 35 ++++++++++++++++ common/lib/capa/capa/responsetypes.py | 2 +- .../capa/capa/templates/editageneinput.html | 39 ++++++++++++++++++ common/static/applets/capa/genex.jar | Bin 0 -> 227154 bytes common/static/js/capa/edit-a-gene.js | 27 ++++++++++++ 5 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 common/lib/capa/capa/templates/editageneinput.html create mode 100644 common/static/applets/capa/genex.jar create mode 100644 common/static/js/capa/edit-a-gene.js diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index cbd27135f3..dea66e7b71 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -899,3 +899,38 @@ class DesignProtein2dInput(InputTypeBase): registry.register(DesignProtein2dInput) +#----------------------------------------------------------------------------- + +class EditAGeneInput(InputTypeBase): + """ + An input type for editing a gene. Integrates with the genex java applet. + + Example: + + + """ + + template = "editageneinput.html" + tags = ['editageneinput'] + + @classmethod + def get_attributes(cls): + """ + Note: width, hight, and dna_sequencee are required. + """ + return [Attribute('width'), + Attribute('height'), + Attribute('dna_sequence') + ] + + def _extra_context(self): + """ + """ + context = { + 'applet_loader': '/static/js/capa/edit-a-gene.js', + } + + return context + +registry.register(EditAGeneInput) + diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index 4aae384f72..7cc590e07f 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -876,7 +876,7 @@ def sympy_check2(): allowed_inputfields = ['textline', 'textbox', 'crystallography', 'chemicalequationinput', 'vsepr_input', 'drag_and_drop_input', 'editamoleculeinput', - 'designprotein2dinput'] + 'designprotein2dinput', 'editageneinput'] def setup_response(self): xml = self.xml diff --git a/common/lib/capa/capa/templates/editageneinput.html b/common/lib/capa/capa/templates/editageneinput.html new file mode 100644 index 0000000000..8dd4fa89d1 --- /dev/null +++ b/common/lib/capa/capa/templates/editageneinput.html @@ -0,0 +1,39 @@ +

        +
        + + % if status == 'unsubmitted': +
        + % elif status == 'correct': +
        + % elif status == 'incorrect': +
        + % elif status == 'incomplete': +
        + % endif + + + + + + Applet failed to run. No Java plug-in was found. + + + + +

        + % if status == 'unsubmitted': + unanswered + % elif status == 'correct': + correct + % elif status == 'incorrect': + incorrect + % elif status == 'incomplete': + incomplete + % endif +

        + +

        + % if status in ['unsubmitted', 'correct', 'incorrect', 'incomplete']: +
        +% endif +
        diff --git a/common/static/applets/capa/genex.jar b/common/static/applets/capa/genex.jar new file mode 100644 index 0000000000000000000000000000000000000000..75f784b59245d45c5ea1657d08468f41844c6000 GIT binary patch literal 227154 zcmZU)b8s(F(=8m^wsm6Lwr$&XPVD5wwrxAV*tTsuC&_o-``+ih_tw`{J=1@z+Ow;A zs&~&?J&H1*U@$=cWlJ_Yg8wV{-xp{gFd#WGRUtYld2xpC2_PWF{|$u#TKos)c81erDysBy;*WAuld>{&^z-mCbks9bvrWp3ODucG&Ql^NPPCG; zGm>gRQNZNW&v0HH+0n|VGRi8hIn*_1F>p_`u1Rn)ZgMfQXsmd!FwV;8ypM^`tX>_y zs4S1JIW8#C(KTpWq)%HakIFQj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_Iso?|2gBYaz7G2* z-en6y>Aiu&3bdXYAT0pzAmd4{EB}p2_JOZK0%%P&Kx+awDJ;!(Okf*lVER#$ z?Qh&sfB=0LC@*+R zybr8G{^-Tb{uya20{MUo=uf<%flWeppdz?|iU6Nuiq-y|r{we}mVv#@y*a>59sxXX z=abO;h4s%k{@oxt{}yc)ohOSHpNfN(|$WOd-KVq@?d74T%REtRjr-~xx2 z%>dJp0YK{SP6vGE_=#Kn2D^+pKyT*^a{AA1{IW`*^O|^Sfhy?)xZn+W%l>yJpy4;> zUvdmYw}k>5ASoE-xmxNCr{ADzBHDi}wXf^R*SmoEX4$X85`c-TA5Qa6#Q?BB*2lnc z^;#v+IBo#B6nK3wW&Z}d?3YDd&CIUr2QO{MKqc^i7szS_0AB`oXQF~%VE@kE0Jc;5 zHje|0;;xS?j!vDPfk1tx06*Z7DzWBwo`kcBkpl>LW*BHB=GSCJml~qe$sbSyH46je z5P;)xsvq=Aj~ssepZrU+ zD%fAQZg#11X7z>`B+v;=1BL~UHW$Dm()B7|Z_etIG=40=wJ#SF$-tE3@BE!~**kq( zIry*fbzJDy8Y$p9vw(8owG-3*JMKr`3oNjiSYNMTBdY={0pNx0l2`p_xBqt{;M#xj zAIvdW2v(pr@PR_JffZPO>vtZ|CI8@2{y*xnHM?OI03}aXyQ*%__Mh?B7ys&}^WQbj z@vFqV`Lm{fPG4SD(Vw=UzZx&E?m7JP23Q1tyTP?P5MRB))lF4@-XMYaFE_Z}Bv<#& z`w6_D{7>K?cGA15@YNl~e)462^{O9@3*6*?+F$JI4X*CC^z#PM41c-7^%l9hbH`8M zV_E}SN4Ae@vH9<|Abca{sO)FPUF?Lim&Q=_2tN)SRP>f z{KF1cvDX{*>MJQfVJPCi!T#d~m8%L~eN*5kvsdzZ=6Btofb0zdA{6+y4`d)RN 30 * 1000) { + console.error("Applet did not load on time."); + } else { + console.log("Waiting for applet..."); + setTimeout(function() { waitForApplet(applet); }, timeout); + } + } + + var applets = $('.editageneinput object'); + applets.each(function(i, el) { initializeApplet(el); }); +}).call(this); From ab9bd4b805a00ad292242bdc9b6b037fa4829cf3 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Tue, 5 Feb 2013 14:41:11 -0500 Subject: [PATCH 188/347] Have errors go through jsmolcalc's getInfo --- common/static/js/capa/editamolecule.js | 4 +- ...6BC62FA9B71FB5EB318145F5D37E84.cache.html} | 1289 +++++++--------- ...8C0B0171166372F064D287492CBD1E.cache.html} | 1289 +++++++--------- ...3483CC355E7BFB7BE2F45092922897.cache.html} | 1288 +++++++--------- ...8BF09B489084CBFD0BF2CB8A77BFAC.cache.html} | 1292 +++++++---------- ...EDF03FE9C26D69E2C7DB17E15CF0ED.cache.html} | 1288 +++++++--------- ...283183F9546F019176F75A8E25B0F0.cache.html} | 1289 +++++++--------- .../js/capa/jsmolcalc/jsmolcalc.nocache.js | 12 +- 8 files changed, 3155 insertions(+), 4596 deletions(-) rename common/static/js/capa/jsmolcalc/{787A0D27E3B86B1358ECC872176CB896.cache.html => 2F6BC62FA9B71FB5EB318145F5D37E84.cache.html} (69%) rename common/static/js/capa/jsmolcalc/{2264BD6A2D261E441E8A63207DEF3E41.cache.html => 468C0B0171166372F064D287492CBD1E.cache.html} (69%) rename common/static/js/capa/jsmolcalc/{62AEDCE3B4B02EAB0CE4B5E294387270.cache.html => C43483CC355E7BFB7BE2F45092922897.cache.html} (69%) rename common/static/js/capa/jsmolcalc/{FE94467421A960F46BE7208756BA8AB4.cache.html => E38BF09B489084CBFD0BF2CB8A77BFAC.cache.html} (69%) rename common/static/js/capa/jsmolcalc/{280D82581672593B003FDD949FD05A1A.cache.html => E8EDF03FE9C26D69E2C7DB17E15CF0ED.cache.html} (69%) rename common/static/js/capa/jsmolcalc/{C6CC2FE28A276F9AD839FEB4866C99F7.cache.html => F8283183F9546F019176F75A8E25B0F0.cache.html} (69%) diff --git a/common/static/js/capa/editamolecule.js b/common/static/js/capa/editamolecule.js index 42242195bd..f4c051fefe 100644 --- a/common/static/js/capa/editamolecule.js +++ b/common/static/js/capa/editamolecule.js @@ -107,11 +107,13 @@ var smiles = applet[0].smiles(); var jme = applet[0].jmeFile(); - var info = formatInfo(jsmol.API.getInfo(mol, smiles, jme).toString()); + var info = jsmol.API.getInfo(mol, smiles, jme).toString(); + var err = jsmol.API.getErrors(mol, smiles, jme).toString(); var value = { mol: mol, info: info }; console.log("Molecule info:"); console.log(info); + console.log(err); input_field.val(JSON.stringify(value)); diff --git a/common/static/js/capa/jsmolcalc/787A0D27E3B86B1358ECC872176CB896.cache.html b/common/static/js/capa/jsmolcalc/2F6BC62FA9B71FB5EB318145F5D37E84.cache.html similarity index 69% rename from common/static/js/capa/jsmolcalc/787A0D27E3B86B1358ECC872176CB896.cache.html rename to common/static/js/capa/jsmolcalc/2F6BC62FA9B71FB5EB318145F5D37E84.cache.html index af4a2ecb7d..c141070d9b 100644 --- a/common/static/js/capa/jsmolcalc/787A0D27E3B86B1358ECC872176CB896.cache.html +++ b/common/static/js/capa/jsmolcalc/2F6BC62FA9B71FB5EB318145F5D37E84.cache.html @@ -4,14 +4,14 @@ var $gwt_version = "2.5.0"; var $wnd = parent; var $doc = $wnd.document; var $moduleName, $moduleBase; -var $strongName = '787A0D27E3B86B1358ECC872176CB896'; +var $strongName = '2F6BC62FA9B71FB5EB318145F5D37E84'; var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null, $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null; $stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'}); - + + - diff --git a/common/static/js/capa/jsmolcalc/2264BD6A2D261E441E8A63207DEF3E41.cache.html b/common/static/js/capa/jsmolcalc/468C0B0171166372F064D287492CBD1E.cache.html similarity index 69% rename from common/static/js/capa/jsmolcalc/2264BD6A2D261E441E8A63207DEF3E41.cache.html rename to common/static/js/capa/jsmolcalc/468C0B0171166372F064D287492CBD1E.cache.html index 82c128524e..7c2b151277 100644 --- a/common/static/js/capa/jsmolcalc/2264BD6A2D261E441E8A63207DEF3E41.cache.html +++ b/common/static/js/capa/jsmolcalc/468C0B0171166372F064D287492CBD1E.cache.html @@ -4,14 +4,14 @@ var $gwt_version = "2.5.0"; var $wnd = parent; var $doc = $wnd.document; var $moduleName, $moduleBase; -var $strongName = '2264BD6A2D261E441E8A63207DEF3E41'; +var $strongName = '468C0B0171166372F064D287492CBD1E'; var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null, $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null; $stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'}); - + + - diff --git a/common/static/js/capa/jsmolcalc/62AEDCE3B4B02EAB0CE4B5E294387270.cache.html b/common/static/js/capa/jsmolcalc/C43483CC355E7BFB7BE2F45092922897.cache.html similarity index 69% rename from common/static/js/capa/jsmolcalc/62AEDCE3B4B02EAB0CE4B5E294387270.cache.html rename to common/static/js/capa/jsmolcalc/C43483CC355E7BFB7BE2F45092922897.cache.html index f564a4d509..dbd7f2dd35 100644 --- a/common/static/js/capa/jsmolcalc/62AEDCE3B4B02EAB0CE4B5E294387270.cache.html +++ b/common/static/js/capa/jsmolcalc/C43483CC355E7BFB7BE2F45092922897.cache.html @@ -4,14 +4,14 @@ var $gwt_version = "2.5.0"; var $wnd = parent; var $doc = $wnd.document; var $moduleName, $moduleBase; -var $strongName = '62AEDCE3B4B02EAB0CE4B5E294387270'; +var $strongName = 'C43483CC355E7BFB7BE2F45092922897'; var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null, $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null; $stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'}); - + + - diff --git a/common/static/js/capa/jsmolcalc/FE94467421A960F46BE7208756BA8AB4.cache.html b/common/static/js/capa/jsmolcalc/E38BF09B489084CBFD0BF2CB8A77BFAC.cache.html similarity index 69% rename from common/static/js/capa/jsmolcalc/FE94467421A960F46BE7208756BA8AB4.cache.html rename to common/static/js/capa/jsmolcalc/E38BF09B489084CBFD0BF2CB8A77BFAC.cache.html index 3a5592bf72..b8cf726023 100644 --- a/common/static/js/capa/jsmolcalc/FE94467421A960F46BE7208756BA8AB4.cache.html +++ b/common/static/js/capa/jsmolcalc/E38BF09B489084CBFD0BF2CB8A77BFAC.cache.html @@ -4,14 +4,14 @@ var $gwt_version = "2.5.0"; var $wnd = parent; var $doc = $wnd.document; var $moduleName, $moduleBase; -var $strongName = 'FE94467421A960F46BE7208756BA8AB4'; +var $strongName = 'E38BF09B489084CBFD0BF2CB8A77BFAC'; var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null, $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null; $stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'}); - + - + + - diff --git a/common/static/js/capa/jsmolcalc/280D82581672593B003FDD949FD05A1A.cache.html b/common/static/js/capa/jsmolcalc/E8EDF03FE9C26D69E2C7DB17E15CF0ED.cache.html similarity index 69% rename from common/static/js/capa/jsmolcalc/280D82581672593B003FDD949FD05A1A.cache.html rename to common/static/js/capa/jsmolcalc/E8EDF03FE9C26D69E2C7DB17E15CF0ED.cache.html index 991e0e490b..5255e0e552 100644 --- a/common/static/js/capa/jsmolcalc/280D82581672593B003FDD949FD05A1A.cache.html +++ b/common/static/js/capa/jsmolcalc/E8EDF03FE9C26D69E2C7DB17E15CF0ED.cache.html @@ -4,14 +4,14 @@ var $gwt_version = "2.5.0"; var $wnd = parent; var $doc = $wnd.document; var $moduleName, $moduleBase; -var $strongName = '280D82581672593B003FDD949FD05A1A'; +var $strongName = 'E8EDF03FE9C26D69E2C7DB17E15CF0ED'; var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null, $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null; $stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'}); - + + - diff --git a/common/static/js/capa/jsmolcalc/C6CC2FE28A276F9AD839FEB4866C99F7.cache.html b/common/static/js/capa/jsmolcalc/F8283183F9546F019176F75A8E25B0F0.cache.html similarity index 69% rename from common/static/js/capa/jsmolcalc/C6CC2FE28A276F9AD839FEB4866C99F7.cache.html rename to common/static/js/capa/jsmolcalc/F8283183F9546F019176F75A8E25B0F0.cache.html index 145a186d11..b4b1d177df 100644 --- a/common/static/js/capa/jsmolcalc/C6CC2FE28A276F9AD839FEB4866C99F7.cache.html +++ b/common/static/js/capa/jsmolcalc/F8283183F9546F019176F75A8E25B0F0.cache.html @@ -4,14 +4,14 @@ var $gwt_version = "2.5.0"; var $wnd = parent; var $doc = $wnd.document; var $moduleName, $moduleBase; -var $strongName = 'C6CC2FE28A276F9AD839FEB4866C99F7'; +var $strongName = 'F8283183F9546F019176F75A8E25B0F0'; var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null, $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null; $stats && $stats({moduleName:'jsmolcalc',sessionId:$sessionId,subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'}); - + + - diff --git a/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js b/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js index 4f38a87161..3bdee52fb1 100644 --- a/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js +++ b/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js @@ -299,12 +299,12 @@ function jsmolcalc(){ $stats && $stats({moduleName:'jsmolcalc', sessionId:$sessionId_0, subSystem:'startup', evtGroup:'bootstrap', millis:(new Date).getTime(), type:'selectingPermutation'}); if (!isHostedMode()) { try { - unflattenKeylistIntoAnswers(['ie8'], '2264BD6A2D261E441E8A63207DEF3E41'); - unflattenKeylistIntoAnswers(['opera'], '280D82581672593B003FDD949FD05A1A'); - unflattenKeylistIntoAnswers(['gecko1_8'], '62AEDCE3B4B02EAB0CE4B5E294387270'); - unflattenKeylistIntoAnswers(['ie6'], '787A0D27E3B86B1358ECC872176CB896'); - unflattenKeylistIntoAnswers(['ie9'], 'C6CC2FE28A276F9AD839FEB4866C99F7'); - unflattenKeylistIntoAnswers(['safari'], 'FE94467421A960F46BE7208756BA8AB4'); + unflattenKeylistIntoAnswers(['ie6'], '2F6BC62FA9B71FB5EB318145F5D37E84'); + unflattenKeylistIntoAnswers(['ie8'], '468C0B0171166372F064D287492CBD1E'); + unflattenKeylistIntoAnswers(['gecko1_8'], 'C43483CC355E7BFB7BE2F45092922897'); + unflattenKeylistIntoAnswers(['safari'], 'E38BF09B489084CBFD0BF2CB8A77BFAC'); + unflattenKeylistIntoAnswers(['opera'], 'E8EDF03FE9C26D69E2C7DB17E15CF0ED'); + unflattenKeylistIntoAnswers(['ie9'], 'F8283183F9546F019176F75A8E25B0F0'); strongName = answers[computePropValue('user.agent')]; var idx = strongName.indexOf(':'); if (idx != -1) { From 9bc25ff372f8c3e0194426214551bb5ecf1e16ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s=20Rocha?= Date: Wed, 23 Jan 2013 13:18:43 -0500 Subject: [PATCH 189/347] Replace editamolecule input type applet with GWT version --- .../capa/capa/templates/editamolecule.html | 41 +- .../static/applets/capa/editamolecule/JME.jar | Bin 38760 -> 0 bytes common/static/js/capa/editamolecule.js | 96 +- ...611409F263B5178342FE86F2A15096A.cache.html | 432 ++++++ ...96B3EA649BF55AAB5739A9E6278DBB1.cache.html | 436 ++++++ ...5B43920D2446B7876A6D007C7823913.cache.html | 421 ++++++ ...3B7F92654E7A93271CE0440D9179625.cache.html | 423 ++++++ ...C3F6C30BBCDFBDD8EAE31273C273251.cache.html | 437 ++++++ ...4ADD17684A99693FE9C9A04B1CAF23B.cache.html | 425 ++++++ .../static/js/capa/jsme/gwt/clean/clean.css | 1264 ++++++++++++++++ .../js/capa/jsme/gwt/clean/clean_rtl.css | 1265 +++++++++++++++++ .../js/capa/jsme/gwt/clean/images/circles.png | Bin 0 -> 1492 bytes .../jsme/gwt/clean/images/circles_ie6.png | Bin 0 -> 432 bytes .../js/capa/jsme/gwt/clean/images/corner.png | Bin 0 -> 1140 bytes .../capa/jsme/gwt/clean/images/corner_ie6.png | Bin 0 -> 412 bytes .../js/capa/jsme/gwt/clean/images/hborder.png | Bin 0 -> 1995 bytes .../jsme/gwt/clean/images/hborder_ie6.png | Bin 0 -> 706 bytes .../capa/jsme/gwt/clean/images/thumb_horz.png | Bin 0 -> 222 bytes .../jsme/gwt/clean/images/thumb_vertical.png | Bin 0 -> 231 bytes .../js/capa/jsme/gwt/clean/images/vborder.png | Bin 0 -> 298 bytes .../jsme/gwt/clean/images/vborder_ie6.png | Bin 0 -> 189 bytes .../js/capa/jsme/jsme_export.nocache.js | 343 +++++ 22 files changed, 5513 insertions(+), 70 deletions(-) delete mode 100644 common/static/applets/capa/editamolecule/JME.jar create mode 100644 common/static/js/capa/jsme/0611409F263B5178342FE86F2A15096A.cache.html create mode 100644 common/static/js/capa/jsme/396B3EA649BF55AAB5739A9E6278DBB1.cache.html create mode 100644 common/static/js/capa/jsme/55B43920D2446B7876A6D007C7823913.cache.html create mode 100644 common/static/js/capa/jsme/A3B7F92654E7A93271CE0440D9179625.cache.html create mode 100644 common/static/js/capa/jsme/AC3F6C30BBCDFBDD8EAE31273C273251.cache.html create mode 100644 common/static/js/capa/jsme/B4ADD17684A99693FE9C9A04B1CAF23B.cache.html create mode 100644 common/static/js/capa/jsme/gwt/clean/clean.css create mode 100644 common/static/js/capa/jsme/gwt/clean/clean_rtl.css create mode 100644 common/static/js/capa/jsme/gwt/clean/images/circles.png create mode 100644 common/static/js/capa/jsme/gwt/clean/images/circles_ie6.png create mode 100644 common/static/js/capa/jsme/gwt/clean/images/corner.png create mode 100644 common/static/js/capa/jsme/gwt/clean/images/corner_ie6.png create mode 100644 common/static/js/capa/jsme/gwt/clean/images/hborder.png create mode 100644 common/static/js/capa/jsme/gwt/clean/images/hborder_ie6.png create mode 100644 common/static/js/capa/jsme/gwt/clean/images/thumb_horz.png create mode 100644 common/static/js/capa/jsme/gwt/clean/images/thumb_vertical.png create mode 100644 common/static/js/capa/jsme/gwt/clean/images/vborder.png create mode 100644 common/static/js/capa/jsme/gwt/clean/images/vborder_ie6.png create mode 100644 common/static/js/capa/jsme/jsme_export.nocache.js diff --git a/common/lib/capa/capa/templates/editamolecule.html b/common/lib/capa/capa/templates/editamolecule.html index 2ad47d3a87..57fb86874b 100644 --- a/common/lib/capa/capa/templates/editamolecule.html +++ b/common/lib/capa/capa/templates/editamolecule.html @@ -1,27 +1,29 @@

        -
        -
        +
        +
        +
        - % if status == 'unsubmitted': -
        - % elif status == 'correct': -
        - % elif status == 'incorrect': -
        - % elif status == 'incomplete': -
        - % endif + % if status == 'unsubmitted': +
        + % elif status == 'correct': +
        + % elif status == 'incorrect': +
        + % elif status == 'incomplete': +
        + % endif - - - - - Applet failed to run. No Java plug-in was found. - +
        +
        +
        + + +

        +

        % if status == 'unsubmitted': unanswered @@ -33,11 +35,6 @@ incomplete % endif

        - -
        - - -

        % if status in ['unsubmitted', 'correct', 'incorrect', 'incomplete']:
        % endif diff --git a/common/static/applets/capa/editamolecule/JME.jar b/common/static/applets/capa/editamolecule/JME.jar deleted file mode 100644 index d571682d7ef0ba18b26bbb38e444e5a8294cfbda..0000000000000000000000000000000000000000 GIT binary pat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q7#`-;4Ge za9SFrc=Rxtenv3UZ$;2<40m4MS=jjkfHaX&wzKqr_spb@SW6}t8uJ$`olI}RQ)aBK z+F%nELo@YkjYJ6X19{a<*?Jl_`7}y2=JBlOeUE% z;m7OhR1`>zipDIix0#^L9&fXmU^uXT6H|Fvv!09caBOi3@Lq^}0FFW#CKOGySnT;v zJBA)oQRUfs9592XuveThC1S-I_{-O2$?)Gpi$3F5zt(P!bfVF7E>)jh&M#W@oi*}~ zqw(sA93R#Q8ptuU*D6D)_naKSckdQ(o}AQ)({=ua&C?R#%55^kOx_{F#bz$OZ)AKcT$4@z=heAB$JI(4jlk!ENV@S_C z(U9-7tLJ-&OfjU#Kr948(<6#uAd0bg3#jwObGoE9g;IXm7j9b;s{HZlUCi;JMvZUU zFAS#i80rCHN&G7m$_@*m+7)O=JUMR$#lgilbq~J$;JdOq+`E=fPdZ5K>}s4dtpcJG|nK1j>(fyQ(A zCT6dm&_0MR`Rmx>y*>dktYrb^!zc!pw#d@jR_JdGl9>UFS3%&9QL5h<1Q~@C>2DPB zKL!#g|IOfGBcc7n<^4U;P}Gy<1ZgU9KaBt1($FTKU_-=pzYo%X6-pwqe@ZoEH9<;> zx_Vq1N`Ef?8v_05Yk~c*J1iqIgqOwNEaIPKzn}R}HWKk#e?%?+zb!ESto*&;pJ?ni uTlv4i74e_k<$u=x`4#_N>kyBG^l$X0t%i=kd`L(bh+&6}gmjYiJNqw6PmKZq diff --git a/common/static/js/capa/editamolecule.js b/common/static/js/capa/editamolecule.js index f4c051fefe..c5f38c2ded 100644 --- a/common/static/js/capa/editamolecule.js +++ b/common/static/js/capa/editamolecule.js @@ -1,88 +1,88 @@ (function () { var timeout = 100; - waitForJSMolCalc(); + // Simple "lock" to prevent applets from being initialized more than once + if (typeof(_editamolecule_lock) == 'undefined' || _editamolecule_lock == false) { + _editamolecule_lock = true; + waitForGWT(); + } else { + return; + } - // FIXME: [rocha] jsmolcalc and jsmol.API should be initialized - // automatically by the GWT script loader. However, it is not - // working correcly when including them inside the - // courseware. - function waitForJSMolCalc() { + // FIXME: [rocha] jsme and jsmolcalc are not initialized automatically by + // the GWT script loader. To fix this, wait for the scripts to load, initialize + // them manually and wait until they are ready + function waitForGWT() { if (typeof(jsmolcalc) != "undefined" && jsmolcalc) { - // FIXME: [rocha] this should be called automatically by - // GWT at the end of the loader. However it is not. jsmolcalc.onInjectionDone('jsmolcalc'); } - if (typeof(jsmol) != "undefined") { + if (typeof(jsme_export) != "undefined" && jsme_export) + { + // dummy function called by jsme_export + window.jsmeOnLoad = function() {}; + jsme_export.onInjectionDone('jsme_export'); + } + + // jsmol is defined my jsmolcalc and JavaScriptApplet is defined by jsme + if (typeof(jsmol) != 'undefined' && typeof(JavaScriptApplet) != 'undefined') { // ready, initialize applets initializeApplets(); + _editamolecule_lock = false; // release lock, for reloading } else { - setTimeout(function() { waitForJSMolCalc(); }, timeout); + setTimeout(waitForGWT, timeout); } } function initializeApplets() { - var applets = $('.editamoleculeinput object'); + var applets = $('.editamoleculeinput div.applet'); applets.each(function(i, element) { - var applet = $(element); - if (!applet.hasClass('initialized')) { - applet.addClass("initialized"); - waitForApplet(applet, configureApplet); + if (!$(element).hasClass('loaded')) { + var applet = new JavaScriptApplet.JSME( + element.id, + $(element).width(), + $(element).height(), + { + "options" : "query, hydrogens" + }); + $(element).addClass('loaded'); + configureApplet(element, applet); } }); } - function waitForApplet(applet, callback) { - if (applet[0].isActive && applet[0].isActive()) { - callback(applet); - } else { - setTimeout(function() { - waitForApplet(applet, callback); }, timeout); - } - } - - function configureApplet(applet) { + function configureApplet(element, applet) { // Traverse up the DOM tree and get the other relevant elements - var parent = applet.parent(); + var parent = $(element).parent(); var input_field = parent.find('input[type=hidden]'); var reset_button = parent.find('button.reset'); - console.log(input_field.toArray()); - console.log(input_field.toArray().length); + // Applet options + applet.setAntialias(true); // Load initial data var value = input_field.val(); - - value = false; if (value) { - console.log('loading old'); var data = JSON.parse(value)["mol"]; - console.log(data); loadAppletData(applet, data, input_field); } else { - console.log('loading preset'); - requestAppletData(applet, input_field); + requestAppletData(element, applet, input_field); } reset_button.on('click', function() { - console.log('reseting'); - requestAppletData(applet, input_field); + requestAppletData(element, applet, input_field); }); - // FIXME: [rocha] This is a hack to capture the click on the check - // button and update the hidden field with the applet values - var problem = applet.parents('.problem'); - var check_button = problem.find('input.check'); - check_button.on('click', function() { - console.log('check'); + // Update the input element everytime the is an interaction + // with the applet (click, drag, etc) + $(element).on('mouseup', function() { updateInput(applet, input_field); }); } - function requestAppletData(applet, input_field) { - var molFile = applet.find('param[name=molfile]').attr('value'); + function requestAppletData(element, applet, input_field) { + var molFile = $(element).data('molfile-src'); jQuery.ajax({ url: molFile, @@ -98,14 +98,14 @@ } function loadAppletData(applet, data, input_field) { - applet[0].readMolFile(data); + applet.readMolFile(data); updateInput(applet, input_field); } function updateInput(applet, input_field) { - var mol = applet[0].molFile(); - var smiles = applet[0].smiles(); - var jme = applet[0].jmeFile(); + var mol = applet.molFile(); + var smiles = applet.smiles(); + var jme = applet.jmeFile(); var info = jsmol.API.getInfo(mol, smiles, jme).toString(); var err = jsmol.API.getErrors(mol, smiles, jme).toString(); diff --git a/common/static/js/capa/jsme/0611409F263B5178342FE86F2A15096A.cache.html b/common/static/js/capa/jsme/0611409F263B5178342FE86F2A15096A.cache.html new file mode 100644 index 0000000000..79803e7229 --- /dev/null +++ b/common/static/js/capa/jsme/0611409F263B5178342FE86F2A15096A.cache.html @@ -0,0 +1,432 @@ + \ No newline at end of file diff --git a/common/static/js/capa/jsme/396B3EA649BF55AAB5739A9E6278DBB1.cache.html b/common/static/js/capa/jsme/396B3EA649BF55AAB5739A9E6278DBB1.cache.html new file mode 100644 index 0000000000..62220c6e9e --- /dev/null +++ b/common/static/js/capa/jsme/396B3EA649BF55AAB5739A9E6278DBB1.cache.html @@ -0,0 +1,436 @@ + \ No newline at end of file diff --git a/common/static/js/capa/jsme/55B43920D2446B7876A6D007C7823913.cache.html b/common/static/js/capa/jsme/55B43920D2446B7876A6D007C7823913.cache.html new file mode 100644 index 0000000000..6cc5e58218 --- /dev/null +++ b/common/static/js/capa/jsme/55B43920D2446B7876A6D007C7823913.cache.html @@ -0,0 +1,421 @@ + \ No newline at end of file diff --git a/common/static/js/capa/jsme/A3B7F92654E7A93271CE0440D9179625.cache.html b/common/static/js/capa/jsme/A3B7F92654E7A93271CE0440D9179625.cache.html new file mode 100644 index 0000000000..f6a66a17a1 --- /dev/null +++ b/common/static/js/capa/jsme/A3B7F92654E7A93271CE0440D9179625.cache.html @@ -0,0 +1,423 @@ + \ No newline at end of file diff --git a/common/static/js/capa/jsme/AC3F6C30BBCDFBDD8EAE31273C273251.cache.html b/common/static/js/capa/jsme/AC3F6C30BBCDFBDD8EAE31273C273251.cache.html new file mode 100644 index 0000000000..a9e5bde4bb --- /dev/null +++ b/common/static/js/capa/jsme/AC3F6C30BBCDFBDD8EAE31273C273251.cache.html @@ -0,0 +1,437 @@ + \ No newline at end of file diff --git a/common/static/js/capa/jsme/B4ADD17684A99693FE9C9A04B1CAF23B.cache.html b/common/static/js/capa/jsme/B4ADD17684A99693FE9C9A04B1CAF23B.cache.html new file mode 100644 index 0000000000..b40332db57 --- /dev/null +++ b/common/static/js/capa/jsme/B4ADD17684A99693FE9C9A04B1CAF23B.cache.html @@ -0,0 +1,425 @@ + \ No newline at end of file diff --git a/common/static/js/capa/jsme/gwt/clean/clean.css b/common/static/js/capa/jsme/gwt/clean/clean.css new file mode 100644 index 0000000000..aa02d5385d --- /dev/null +++ b/common/static/js/capa/jsme/gwt/clean/clean.css @@ -0,0 +1,1264 @@ +/** + * The file contains styles for GWT widgets in the Clean theme. + * + * In order to maintain cross-browser compatibility, the following syntax is + * used to create IE6 specific style rules: + * .gwt-Widget { + * property: rule applies to all browsers + * -property: rule applies only to IE6 (overrides previous rule) + * } + * * html .gwt-Widget { + * property: rule applies to all versions of IE + * } + */ + +body, table td, select, button { + font-family: Arial Unicode MS, Arial, sans-serif; + font-size: small; +} +pre { + font-family: "courier new", courier; + font-size: small; +} +body { + color: black; + margin: 10px; + border: 0px; + padding: 0px; + background: #fff; + direction: ltr; +} +a, a:visited { + color: #0066cc; + text-decoration:none; +} + +a:hover { + color: #0066cc; + text-decoration:underline; +} + +select { + background: white; +} + +/** + * The reference theme can be used to determine when this style sheet has + * loaded. Create a hidden div element with absolute position, assign the style + * name below, and attach it to the DOM. Use a timer to detect when the + * element's height and width are set to 5px. + */ +.gwt-Reference-clean { + height: 5px; + width: 5px; + zoom: 1; +} + +.gwt-Button { + margin: 0; + padding: 5px 7px; + text-decoration: none; + cursor: pointer; + cursor: hand; + font-size:small; + background: url("images/hborder.png") repeat-x 0px -2077px; + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + border-radius: 3px; + -moz-border-radius: 3px; +} +.gwt-Button:active { + border: 1px inset #ccc; +} +.gwt-Button:hover { + border-color: #939393; +} +.gwt-Button[disabled] { + cursor: default; + color: #888; +} +.gwt-Button[disabled]:hover { + border: 1px outset #ccc; +} + +.gwt-CheckBox { +} +.gwt-CheckBox-disabled { + color: #888; +} + +.gwt-DecoratorPanel { +} +.gwt-DecoratorPanel .topCenter { + border-top: 1px solid #bbb; + line-height: 0px; +} +.gwt-DecoratorPanel .bottomCenter { + border-bottom: 1px solid #bbb; + line-height: 0px; +} +.gwt-DecoratorPanel .topCenterInner, +.gwt-DecoratorPanel .bottomCenterInner { + height: 1px; + line-height: 0px; + font-size: 1px; +} +.gwt-DecoratorPanel .middleLeft { + border-left: 1px solid #bbb; +} +.gwt-DecoratorPanel .middleRight { + border-right: 1px solid #bbb; +} +.gwt-DecoratorPanel .middleLeftInner, +.gwt-DecoratorPanel .middleRightInner { + width: 1px; + line-height: 1px; +} +.gwt-DecoratorPanel .topLeftInner, +.gwt-DecoratorPanel .topRightInner, +.gwt-DecoratorPanel .bottomLeftInner, +.gwt-DecoratorPanel .bottomRightInner { + width: 5px; + height: 5px; + zoom: 1; + font-size: 1px; + overflow: hidden; +} +.gwt-DecoratorPanel .topLeft { + line-height: 0px; + background: url(images/circles.png) no-repeat 0px -6px; + -background: url(images/circles_ie6.png) no-repeat 0px -6px; +} +.gwt-DecoratorPanel .topRight { + line-height: 0px; + background: url(images/circles.png) no-repeat -5px -6px; + -background: url(images/circles_ie6.png) no-repeat -5px -6px; +} +.gwt-DecoratorPanel .bottomLeft { + line-height: 0px; + background: url(images/circles.png) no-repeat 0px -11px; + -background: url(images/circles_ie6.png) no-repeat 0px -11px; +} +.gwt-DecoratorPanel .bottomRight { + line-height: 0px; + background: url(images/circles.png) no-repeat -5px -11px; + -background: url(images/circles_ie6.png) no-repeat -5px -11px; +} +* html .gwt-DecoratorPanel .topLeftInner, +* html .gwt-DecoratorPanel .topRightInner, +* html .gwt-DecoratorPanel .bottomLeftInner, +* html .gwt-DecoratorPanel .bottomRightInner { + width: 5px; + height: 5px; + overflow: hidden; +} + +.gwt-DialogBox .Caption { + background: #F1F1F1; + padding: 4px 8px 4px 4px; + cursor: default; + font-family: Arial Unicode MS, Arial, sans-serif; + font-weight: bold; + border-bottom: 1px solid #bbbbbb; + border-top: 1px solid #D2D2D2; +} +.gwt-DialogBox .dialogContent { +} +.gwt-DialogBox .dialogMiddleCenter { + padding: 3px; + background: white; +} +.gwt-DialogBox .dialogBottomCenter { + background: url(images/hborder.png) repeat-x 0px -2945px; + -background: url(images/hborder_ie6.png) repeat-x 0px -2144px; +} +.gwt-DialogBox .dialogMiddleLeft { + background: url(images/vborder.png) repeat-y -31px 0px; +} +.gwt-DialogBox .dialogMiddleRight { + background: url(images/vborder.png) repeat-y -32px 0px; + -background: url(images/vborder_ie6.png) repeat-y -32px 0px; +} +.gwt-DialogBox .dialogTopLeftInner { + width: 10px; + height: 8px; + zoom: 1; +} +.gwt-DialogBox .dialogTopRightInner { + width: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogBottomLeftInner { + width: 10px; + height: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogBottomRightInner { + width: 12px; + height: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogTopLeft { + background: url(images/circles.png) no-repeat -20px 0px; + -background: url(images/circles_ie6.png) no-repeat -20px 0px; +} +.gwt-DialogBox .dialogTopRight { + background: url(images/circles.png) no-repeat -28px 0px; + -background: url(images/circles_ie6.png) no-repeat -28px 0px; +} +.gwt-DialogBox .dialogBottomLeft { + background: url(images/circles.png) no-repeat 0px -36px; + -background: url(images/circles_ie6.png) no-repeat 0px -36px; +} +.gwt-DialogBox .dialogBottomRight { + background: url(images/circles.png) no-repeat -8px -36px; + -background: url(images/circles_ie6.png) no-repeat -8px -36px; +} +* html .gwt-DialogBox .dialogTopLeftInner { + width: 10px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogTopRightInner { + width: 12px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogBottomLeftInner { + width: 10px; + height: 12px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogBottomRightInner { + width: 12px; + height: 12px; + overflow: hidden; +} + +.gwt-DisclosurePanel { +} +.gwt-DisclosurePanel-open { +} +.gwt-DisclosurePanel-closed { +} +.gwt-DisclosurePanel .header, +.gwt-DisclosurePanel .header a, +.gwt-DisclosurePanel .header td { + text-decoration: none; /* Remove underline from header */ + color: black; + cursor: pointer; + cursor: hand; +} +.gwt-DisclosurePanel .content { + border-left: 3px solid #e7e7e7; + padding: 4px 0px 4px 8px; + margin-left: 6px; +} + +.gwt-FileUpload { +} + +.gwt-Frame { + border-top: 2px solid #666; + border-left: 2px solid #666; + border-right: 2px solid #bbb; + border-bottom: 2px solid #bbb; +} + +.gwt-HorizontalSplitPanel { +} +.gwt-HorizontalSplitPanel .hsplitter { + cursor: move; + border: 0px; + background: #e7e7e7; + line-height: 0px; +} +.gwt-VerticalSplitPanel { +} +.gwt-VerticalSplitPanel .vsplitter { + cursor: move; + border: 0px; + background: #e7e7e7; + line-height: 0px; +} + +.gwt-HTML { + padding: 0 0px; +} + +.gwt-Hyperlink { + cursor: pointer; +} + +.gwt-Image { +} + +.gwt-Label { +} + +.gwt-ListBox { +} + +.gwt-MenuBar { + cursor: default; +} +.gwt-MenuBar .gwt-MenuItem { + cursor: default; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-MenuBar .gwt-MenuItem-selected { + background: #E3E8F3; +} +.gwt-MenuBar-horizontal { + background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px; + border: 1px solid #e0e0e0; +} +.gwt-MenuBar-horizontal .gwt-MenuItem { + padding: 5px 10px; + vertical-align: bottom; + color: #000; + font-weight: bold; +} +.gwt-MenuBar-horizontal .gwt-MenuItemSeparator { + width: 1px; + padding: 0px; + margin: 0px; + border: 0px; + border-left: 1px solid #ccc; + background: white; +} +.gwt-MenuBar-horizontal .gwt-MenuItemSeparator .menuSeparatorInner { + width: 1px; + height: 1px; + background: white; +} +.gwt-MenuBar-vertical { + margin-top: 0px; + margin-left: 0px; + background: white; +} +.gwt-MenuBar-vertical table { + border-collapse: collapse; +} +.gwt-MenuBar-vertical .gwt-MenuItem { + padding: 2px 40px 2px 1px; +} +.gwt-MenuBar-vertical .gwt-MenuItemSeparator { + padding: 2px 0px; +} +.gwt-MenuBar-vertical .gwt-MenuItemSeparator .menuSeparatorInner { + height: 1px; + padding: 0px; + border: 0px; + border-top: 1px solid #ccc; + overflow: hidden; +} +.gwt-MenuBar-vertical .subMenuIcon { + padding-right: 4px; +} +.gwt-MenuBar-vertical .subMenuIcon-selected { + background: #E3E8F3; +} +.gwt-MenuBarPopup { + margin: 0px 0px 0px 3px; +} +.gwt-MenuBarPopup .menuPopupTopCenter { + background: url(images/hborder.png) 0px -12px repeat-x; +} +.gwt-MenuBarPopup .menuPopupBottomCenter { + background: url(images/hborder.png) 0px -13px repeat-x; + -background: url(images/hborder_ie6.png) 0px -13px repeat-x; +} +.gwt-MenuBarPopup .menuPopupMiddleLeft { + background: url(images/vborder.png) -12px 0px repeat-y; + -background: url(images/vborder_ie6.png) -12px 0px repeat-y; +} +.gwt-MenuBarPopup .menuPopupMiddleRight { + background: url(images/vborder.png) -13px 0px repeat-y; + -background: url(images/vborder_ie6.png) -13px 0px repeat-y; +} +.gwt-MenuBarPopup .menuPopupTopLeftInner { + width: 5px; + height: 5px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupTopRightInner { + width: 8px; + height: 5px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupBottomLeftInner { + width: 5px; + height: 8px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupBottomRightInner { + width: 8px; + height: 8px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupTopLeft { + background: url(images/corner.png) no-repeat 0px -36px; + -background: url(images/corner_ie6.png) no-repeat 0px -36px; +} +.gwt-MenuBarPopup .menuPopupTopRight { + background: url(images/corner.png) no-repeat -5px -36px; + -background: url(images/corner_ie6.png) no-repeat -5px -36px; +} +.gwt-MenuBarPopup .menuPopupBottomLeft { + background: url(images/corner.png) no-repeat 0px -41px; + -background: url(images/corner_ie6.png) no-repeat 0px -41px; +} +.gwt-MenuBarPopup .menuPopupBottomRight { + background: url(images/corner.png) no-repeat -5px -41px; + -background: url(images/corner_ie6.png) no-repeat -5px -41px; +} +* html .gwt-MenuBarPopup .menuPopupTopLeftInner { + width: 5px; + height: 5px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupTopRightInner { + width: 8px; + height: 5px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupBottomLeftInner { + width: 5px; + height: 8px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupBottomRightInner { + width: 8px; + height: 8px; + overflow: hidden; +} + +.gwt-PasswordTextBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; +} +.gwt-PasswordTextBox-readonly { + color: #888; +} + +.gwt-PopupPanel { + border: 3px solid #e7e7e7; + padding: 3px; + background: white; +} + +.gwt-DecoratedPopupPanel .popupContent { +} +.gwt-DecoratedPopupPanel .popupMiddleCenter { + padding: 3px; + background: #f1f1f1; +} +.gwt-DecoratedPopupPanel .popupTopCenter { + background: url(images/hborder.png) 0px -2937px repeat-x; +} +.gwt-DecoratedPopupPanel .popupBottomCenter { + background: url(images/hborder.png) repeat-x 0px -2938px; + -background: url(images/hborder_ie6.png) repeat-x 0px -2138px; +} +.gwt-DecoratedPopupPanel .popupMiddleLeft { + background: url(images/vborder.png) -21px 0px repeat-y; +} +.gwt-DecoratedPopupPanel .popupMiddleRight { + background: url(images/vborder.png) repeat-y -24px 0px; + -background: url(images/vborder_ie6.png) repeat-y -24px 0px; +} +.gwt-DecoratedPopupPanel .popupTopLeftInner { + width: 6px; + height: 5px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupTopRightInner { + width: 6px; + height: 5px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupBottomLeftInner { + width: 6px; + height: 6px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupBottomRightInner { + width: 6px; + height: 6px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupTopLeft { + background: url(images/circles.png) no-repeat 0px -16px; + -background: url(images/circles_ie6.png) no-repeat 0px -16px; +} +.gwt-DecoratedPopupPanel .popupTopRight { + background: url(images/circles.png) no-repeat -6px -16px; + -background: url(images/circles_ie6.png) no-repeat -6px -16px; +} +.gwt-DecoratedPopupPanel .popupBottomLeft { + background: url(images/circles.png) no-repeat 0px -21px; + -background: url(images/circles_ie6.png) no-repeat 0px -21px; +} +.gwt-DecoratedPopupPanel .popupBottomRight { + background: url(images/circles.png) no-repeat -6px -21px; + -background: url(images/circles_ie6.png) no-repeat -6px -21px; +} +* html .gwt-DecoratedPopupPanel .popupTopLeftInner { + width: 6px; + height: 5px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupTopRightInner { + width: 6px; + height: 5px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupBottomLeftInner { + width: 6px; + height: 6px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupBottomRightInner { + width: 6px; + height: 6px; + overflow: hidden; +} + +.gwt-PopupPanelGlass { + background-color: #000; + opacity: 0.3; + filter: alpha(opacity=30); +} + +.gwt-PushButton-up, +.gwt-PushButton-up-hovering, +.gwt-PushButton-up-disabled, +.gwt-PushButton-down, +.gwt-PushButton-down-hovering, +.gwt-PushButton-down-disabled { + margin: 0; + text-decoration: none; + background: url("images/hborder.png") repeat-x 0px -27px; + border-radius: 2px; + -moz-border-radius: 2px; +} +.gwt-PushButton-up, +.gwt-PushButton-up-hovering, +.gwt-PushButton-up-disabled { + padding: 3px 5px 3px 5px; +} +.gwt-PushButton-up { + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-up-hovering { + border: 1px solid; + border-color: #939393; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-up-disabled { + border: 1px solid #bbb; + cursor: default; + opacity: .5; + filter: alpha(opacity=45); + zoom: 1; +} +.gwt-PushButton-down, +.gwt-PushButton-down-hovering, +.gwt-PushButton-down-disabled { + padding: 4px 4px 2px 6px; + outline:none; +} +.gwt-PushButton-down { + border: 1px inset #666; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-down-hovering { + border: 1px solid #939393; + border-top: 1px solid #333333; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-down-disabled { + border: 1px outset #ccc; + cursor: default; + opacity: 0.5; + filter: alpha(opacity=45); + zoom: 1; +} + +.gwt-RadioButton { +} +.gwt-RadioButton-disabled { + color: #888; +} + +.gwt-RichTextArea { +} +.hasRichTextToolbar { + border: 0px; +} +.gwt-RichTextToolbar { + background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px; + border-bottom: 1px solid #BBBBBB; + padding: 3px; + margin: 0px; +} +.gwt-RichTextToolbar .gwt-PushButton-up { + padding: 0px 1px 0px 0px; + margin-right: 4px; + margin-bottom: 4px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-up-hovering { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-down { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-down-hovering { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-up { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; +} +.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-down { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering { + margin-right: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} + +.gwt-StackPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-StackPanel .gwt-StackPanelItem { + cursor: pointer; + cursor: hand; + font-weight: bold; + font-size: 1.3em; + padding: 3px; + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-StackPanel .gwt-StackPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 2px 10px 5px; +} + +.gwt-DecoratedStackPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .gwt-StackPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 2px 10px 5px; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem { + cursor: pointer; + cursor: hand; +} +.gwt-DecoratedStackPanel .stackItemTopLeft, +.gwt-DecoratedStackPanel .stackItemTopRight { + height: 6px; + width: 6px; + zoom: 1; +} +.gwt-DecoratedStackPanel .stackItemTopLeft { + border-left: 1px solid #bbbbbb; + background: #d3def6 url(images/corner.png) no-repeat 0px -49px; + -background: #d3def6 url(images/corner_ie6.png) no-repeat 0px -49px; +} +.gwt-DecoratedStackPanel .stackItemTopRight { + border-right: 1px solid #bbbbbb; + background: #d3def6 url(images/corner.png) no-repeat -6px -49px; + -background: #d3def6 url(images/corner_ie6.png) no-repeat -6px -49px; +} +.gwt-DecoratedStackPanel .stackItemTopLeftInner, +.gwt-DecoratedStackPanel .stackItemTopRightInner { + width: 1px; + height: 1px; +} +* html .gwt-DecoratedStackPanel .stackItemTopLeftInner, +* html .gwt-DecoratedStackPanel .stackItemTopRightInner { + width: 6px; + height: 6px; + overflow: hidden; +} +.gwt-DecoratedStackPanel .stackItemTopCenter { + background: url(images/hborder.png) 0px -21px repeat-x; +} +.gwt-DecoratedStackPanel .stackItemMiddleLeft { + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; + border-left: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .stackItemMiddleLeftInner, +.gwt-DecoratedStackPanel .stackItemMiddleRightInner { + width: 1px; + height: 1px; +} +.gwt-DecoratedStackPanel .stackItemMiddleRight { + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; + border-right: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .stackItemMiddleCenter { + font-weight: bold; + font-size: 1.3em; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRight, +.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeft { + border: 0px; + background-color: white; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeft, +.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRight { + background-color: white; +} + +.gwt-SuggestBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; + font-family: Arial Unicode MS, Arial, sans-serif; +} + +.gwt-SuggestBoxPopup { +} + +.gwt-SuggestBoxPopup .item { + padding: 2px 6px; + color: #000; + cursor: default; + font-size: 110%; +} +.gwt-SuggestBoxPopup .item-selected { + background: #D5E2FF; +} +.gwt-SuggestBoxPopup .suggestPopupContent { + background: white; +} +.gwt-SuggestBoxPopup .suggestPopupTopCenter { + border-top: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupBottomCenter { + border-bottom: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupTopCenterInner, +.gwt-SuggestBoxPopup .suggestPopupBottomCenterInner { + height: 1px; + line-height: 1px; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleLeft { + border-left: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleRight { + border-right: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleLeftInner, +.gwt-SuggestBoxPopup .suggestPopupMiddleRightInner { + width: 1px; + line-height: 1px; +} +.gwt-SuggestBoxPopup .suggestPopupTopLeftInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupTopRightInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupBottomLeftInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupBottomRightInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupTopLeft { + background: url(images/circles.png) no-repeat 0px -6px; + -background: url(images/circles_ie6.png) no-repeat 0px -6px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupTopRight { + background: url(images/circles.png) no-repeat -5px -6px; + -background: url(images/circles_ie6.png) no-repeat -5px -6px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupBottomLeft { + background: url(images/circles.png) no-repeat 0px -11px; + -background: url(images/circles_ie6.png) no-repeat 0px -11px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupBottomRight { + background: url(images/circles.png) no-repeat -5px -11px; + -background: url(images/circles_ie6.png) no-repeat -5px -11px; + width:5px; + height:5px; +} +* html .gwt-SuggestBoxPopup .suggestPopupTopLeftInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupTopRightInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupBottomLeftInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupBottomRightInner { + width: 0px; + height: 0px; + overflow: hidden; +} + +.gwt-TabBar { + background: #ccc; + padding-top: 6px; +} +.gwt-TabBar .gwt-TabBarFirst { + width: 5px; /* first tab distance from the left */ +} +.gwt-TabBar .gwt-TabBarRest { +} +.gwt-TabBar .gwt-TabBarItem { + margin-left: 4px; + padding: 4px 8px 4px 8px; + cursor: pointer; + cursor: hand; + color: white; + font-weight: normal; + text-align: center; + background: #8E8E8E; + -moz-border-radius: 3px 3px 0px 0px; + border-radius: 3px 3px 0px 0px; +} +.gwt-TabBar .gwt-TabBarItem-selected { + cursor: default; + background: white; + color: #333; + font-weight: bold; +} +.gwt-TabBar .gwt-TabBarItem-disabled { + cursor: default; + color: #999999; +} +.gwt-TabPanel { +} +.gwt-TabPanelBottom { + border-color: #ccc; + border-style: solid; + border-width: 0px 1px 1px; + overflow: hidden; + padding: 6px; +} +.gwt-DecoratedTabBar { + background: #ccc; + padding-top: 6px; +} +.gwt-DecoratedTabBar .gwt-TabBarFirst { + width: 5px; /* first tab distance from the left */ +} +.gwt-DecoratedTabBar .gwt-TabBarRest { +} +.gwt-DecoratedTabBar .gwt-TabBarItem { + border-collapse: collapse; + margin-left: 4px; +} +.gwt-DecoratedTabBar .tabTopCenter { + padding: 0px; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .tabTopLeft, +.gwt-DecoratedTabBar .tabTopRight { + padding: 0px; + zoom: 1; +} +.gwt-DecoratedTabBar .tabTopLeftInner, +.gwt-DecoratedTabBar .tabTopRightInner { + width: 3px; + height: 3px; +} +.gwt-DecoratedTabBar .tabTopLeft { + background: url(images/circles.png) no-repeat 0px 0px; + -background: url(images/circles_ie6.png) no-repeat 0px 0px; +} +.gwt-DecoratedTabBar .tabTopRight { + background: url(images/circles.png) no-repeat -3px 0px; + -background: url(images/circles_ie6.png) no-repeat -3px 0px; +} +* html .gwt-DecoratedTabBar .tabTopLeftInner, +* html .gwt-DecoratedTabBar .tabTopRightInner { + width: 3px; + height: 3px; + overflow: hidden; +} +.gwt-DecoratedTabBar .tabMiddleLeft, +.gwt-DecoratedTabBar .tabMiddleRight { + width: 3px; + padding: 0px; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .tabMiddleLeftInner, +.gwt-DecoratedTabBar .tabMiddleRightInner { + width: 1px; + height: 1px; +} +.gwt-DecoratedTabBar .tabMiddleCenter { + padding: 0px 5px 4px 5px; + cursor: pointer; + cursor: hand; + color: #fff; + font-weight: normal; + text-align: center; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter { + background:#fff; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft { + background: url(images/circles.png) no-repeat -6px 0px; + -background: url(images/circles_ie6.png) no-repeat -6px 0px; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight { + background: url(images/circles.png) no-repeat -9px 0px; + -background: url(images/circles_ie6.png) no-repeat -9px 0px; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft, +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight { + background: #fff; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleCenter { + cursor: default; + background: #fff; + color:#333; + font-weight:bold; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-disabled .tabMiddleCenter { + cursor: default; + color: #999999; +} + +.gwt-TextArea { + padding: 4px; + border: 1px solid #ccc; + border-top: 1px solid #666; + font-size: 100%; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-TextArea-readonly { + color: #888; +} + +.gwt-TextBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: small; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-TextBox-readonly { + color: #888; +} +.gwt-ToggleButton-up, +.gwt-ToggleButton-up-hovering, +.gwt-ToggleButton-up-disabled, +.gwt-ToggleButton-down, +.gwt-ToggleButton-down-hovering, +.gwt-ToggleButton-down-disabled { + margin: 0; + text-decoration: none; + background: url("images/hborder.png") repeat-x 0px -27px; + -moz-border-radius: 2px; + border-radius: 2px; +} +.gwt-ToggleButton-up, +.gwt-ToggleButton-up-hovering, +.gwt-ToggleButton-up-disabled { + padding: 3px 5px 3px 5px; +} +.gwt-ToggleButton-up { + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-up-hovering { + border: 1px solid; + border-color: #939393; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-up-disabled { + border: 1px solid #bbb; + cursor: default; + opacity: .5; + zoom: 1; + filter: alpha(opacity=45); +} +.gwt-ToggleButton-down, +.gwt-ToggleButton-down-hovering, +.gwt-ToggleButton-down-disabled { + padding: 4px 4px 2px 6px; +} +.gwt-ToggleButton-down { + background-position: 0 -513px; + border: 1px inset #666; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-down-hovering { + background-position: 0 -513px; + border: 1px inset; + border-color: #9cf #69e #69e #7af; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-down-disabled { + background-position: 0 -513px; + border: 1px inset #ccc; + cursor: default; + opacity: .5; + zoom: 1; + filter: alpha(opacity=45); +} + +.gwt-Tree .gwt-TreeItem { + padding: 1px 0px; + margin: 0px; + white-space: nowrap; + cursor: hand; + cursor: pointer; +} +.gwt-Tree .gwt-TreeItem-selected { + background: #ebeff9; +} +.gwt-TreeItem .gwt-RadioButton input, +.gwt-TreeItem .gwt-CheckBox input { + margin-left: 0px; +} +* html .gwt-TreeItem .gwt-RadioButton input, +* html .gwt-TreeItem .gwt-CheckBox input { + margin-left: -4px; +} + +.gwt-DateBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; +} +.gwt-DateBox input { + width: 8em; +} +.dateBoxFormatError { + background: #ffcccc; +} +.dateBoxPopup { +} + +.gwt-DatePicker { + border: 1px solid #ccc; + border-top:1px solid #999; + cursor: default; +} +.gwt-DatePicker td, +.datePickerMonthSelector td:focus { + outline: none; +} +.datePickerDays { + width: 100%; + background: white; +} +.datePickerDay, +.datePickerWeekdayLabel, +.datePickerWeekendLabel { + font-size: 85%; + text-align: center; + padding: 4px; + outline: none; + font-weight:bold; + color:#333; + border-right: 1px solid #EDEDED; + border-bottom: 1px solid #EDEDED; +} +.datePickerWeekdayLabel, +.datePickerWeekendLabel { + background: #fff; + padding: 0px 4px 2px; + cursor: default; + color:#666; + font-size:70%; + font-weight:normal; +} +.datePickerDay { + padding: 4px 7px; + cursor: hand; + cursor: pointer; +} +.datePickerDayIsWeekend { + background: #f7f7f7; +} +.datePickerDayIsFiller { + color: #999; + font-weight:normal; +} +.datePickerDayIsValue { + background: #d7dfe8; +} +.datePickerDayIsDisabled { + color: #AAAAAA; + font-style: italic; +} +.datePickerDayIsHighlighted { + background: #F0E68C; +} +.datePickerDayIsValueAndHighlighted { + background: #d7dfe8; +} +.datePickerDayIsToday { + padding: 3px; + color: #fff; + background: url(images/hborder.png) repeat-x 0px -2607px; +} + +.datePickerMonthSelector { + width: 100%; + padding: 1px 0 5px 0; + background: #fff; +} +td.datePickerMonth { + text-align: center; + vertical-align: middle; + white-space: nowrap; + font-size: 100%; + font-weight: bold; + color: #333; +} +.datePickerPreviousButton, +.datePickerNextButton { + font-size: 120%; + line-height: 1em; + color: #3a6aad; + cursor: hand; + cursor: pointer; + font-weight: bold; + padding: 0px 4px; + outline: none; +} + +.gwt-StackLayoutPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader { + cursor: pointer; + cursor: hand; + font-weight: bold; + font-size: 1.3em; + padding: 3px; + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader-hovering { + background: #d3def6; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 2px 10px 5px; +} + +.gwt-TabLayoutPanel { +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTabs { + background: #ccc; + padding-top: 6px; + padding-left: 5px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelContentContainer { + border-color: #ccc; + border-style: solid; + border-width: 0px 1px 1px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelContent { + overflow: hidden; + padding: 6px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab { + margin-left: 4px; + padding: 4px 8px 4px 8px; + cursor: pointer; + cursor: hand; + color: white; + font-weight: normal; + text-align: center; + background: #8E8E8E; + -moz-border-radius: 3px 3px 0px 0px; + border-radius: 3px 3px 0px 0px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab-selected { + cursor: default; + background: white; + color: #333; + font-weight: bold; +} + +.gwt-SplitLayoutPanel-HDragger { + background: #e7e7e7 url(images/thumb_vertical.png) center center no-repeat; + cursor: col-resize; +} + +.gwt-SplitLayoutPanel-VDragger { + background: #e7e7e7 url(images/thumb_horz.png) center center no-repeat; + cursor: row-resize; +} \ No newline at end of file diff --git a/common/static/js/capa/jsme/gwt/clean/clean_rtl.css b/common/static/js/capa/jsme/gwt/clean/clean_rtl.css new file mode 100644 index 0000000000..7e2c695ccf --- /dev/null +++ b/common/static/js/capa/jsme/gwt/clean/clean_rtl.css @@ -0,0 +1,1265 @@ +/** + * The file contains styles for GWT widgets in the Clean theme, in RTL mode. + * + * In order to maintain cross-browser compatibility, the following syntax is + * used to create IE6 specific style rules: + * .gwt-Widget { + * property: rule applies to all browsers + * -property: rule applies only to IE6 (overrides previous rule) + * } + * * html .gwt-Widget { + * property: rule applies to all versions of IE + * } + */ + +body, table td, select, button { + font-family: Arial Unicode MS, Arial, sans-serif; + font-size: small; +} +pre { + font-family: "courier new", courier; + font-size: small; +} +body { + color: black; + margin: 10px; + border: 0px; + padding: 0px; + background: #fff; + direction: rtl; +} +a, a:visited { + color: #0066cc; + text-decoration:none; +} + +a:hover { + color: #0066cc; + text-decoration:underline; +} + +select { + background: white; +} + +/** + * The reference theme can be used to determine when this style sheet has + * loaded. Create a hidden div element with absolute position, assign the style + * name below, and attach it to the DOM. Use a timer to detect when the + * element's height and width are set to 5px. + */ +.gwt-Reference-clean-rtl { + height: 5px; + width: 5px; + zoom: 1; +} + +.gwt-Button { + margin: 0; + padding: 5px 7px; + text-decoration: none; + cursor: pointer; + cursor: hand; + font-size:small; + background: url("images/hborder.png") repeat-x 0px -2077px; + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + border-radius: 3px; + -moz-border-radius: 3px; +} +.gwt-Button:active { + border: 1px inset #ccc; +} +.gwt-Button:hover { + border-color: #939393; +} +.gwt-Button[disabled] { + cursor: default; + color: #888; +} +.gwt-Button[disabled]:hover { + border: 1px outset #ccc; +} + +.gwt-CheckBox { +} +.gwt-CheckBox-disabled { + color: #888; +} + +.gwt-DecoratorPanel { +} +.gwt-DecoratorPanel .topCenter { + border-top: 1px solid #bbb; + line-height: 0px; +} +.gwt-DecoratorPanel .bottomCenter { + border-bottom: 1px solid #bbb; + line-height: 0px; +} +.gwt-DecoratorPanel .topCenterInner, +.gwt-DecoratorPanel .bottomCenterInner { + height: 1px; + line-height: 0px; + font-size: 1px; +} +.gwt-DecoratorPanel .middleLeft { + border-left: 1px solid #bbb; +} +.gwt-DecoratorPanel .middleRight { + border-right: 1px solid #bbb; +} +.gwt-DecoratorPanel .middleLeftInner, +.gwt-DecoratorPanel .middleRightInner { + width: 1px; + line-height: 1px; +} +.gwt-DecoratorPanel .topLeftInner, +.gwt-DecoratorPanel .topRightInner, +.gwt-DecoratorPanel .bottomLeftInner, +.gwt-DecoratorPanel .bottomRightInner { + width: 5px; + height: 5px; + zoom: 1; + font-size: 1px; + overflow: hidden; +} +.gwt-DecoratorPanel .topLeft { + line-height: 0px; + background: url(images/circles.png) no-repeat 0px -6px; + -background: url(images/circles_ie6.png) no-repeat 0px -6px; +} +.gwt-DecoratorPanel .topRight { + line-height: 0px; + background: url(images/circles.png) no-repeat -5px -6px; + -background: url(images/circles_ie6.png) no-repeat -5px -6px; +} +.gwt-DecoratorPanel .bottomLeft { + line-height: 0px; + background: url(images/circles.png) no-repeat 0px -11px; + -background: url(images/circles_ie6.png) no-repeat 0px -11px; +} +.gwt-DecoratorPanel .bottomRight { + line-height: 0px; + background: url(images/circles.png) no-repeat -5px -11px; + -background: url(images/circles_ie6.png) no-repeat -5px -11px; +} +* html .gwt-DecoratorPanel .topLeftInner, +* html .gwt-DecoratorPanel .topRightInner, +* html .gwt-DecoratorPanel .bottomLeftInner, +* html .gwt-DecoratorPanel .bottomRightInner { + width: 5px; + height: 5px; + overflow: hidden; +} + +.gwt-DialogBox .Caption { + background: #F1F1F1; + padding: 4px 4px 4px 8px; + cursor: default; + font-family: Arial Unicode MS, Arial, sans-serif; + font-weight: bold; + border-bottom: 1px solid #bbbbbb; + border-top: 1px solid #D2D2D2; +} +.gwt-DialogBox .dialogContent { +} +.gwt-DialogBox .dialogMiddleCenter { + padding: 3px; + background: white; +} +.gwt-DialogBox .dialogBottomCenter { + background: url(images/hborder.png) repeat-x 0px -2945px; + -background: url(images/hborder_ie6.png) repeat-x 0px -2144px; +} +.gwt-DialogBox .dialogMiddleLeft { + background: url(images/vborder.png) repeat-y -31px 0px; +} +.gwt-DialogBox .dialogMiddleRight { + background: url(images/vborder.png) repeat-y -32px 0px; + -background: url(images/vborder_ie6.png) repeat-y -32px 0px; +} +.gwt-DialogBox .dialogTopLeftInner { + width: 10px; + height: 8px; + zoom: 1; +} +.gwt-DialogBox .dialogTopRightInner { + width: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogBottomLeftInner { + width: 10px; + height: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogBottomRightInner { + width: 12px; + height: 12px; + zoom: 1; +} +.gwt-DialogBox .dialogTopLeft { + background: url(images/circles.png) no-repeat -20px 0px; + -background: url(images/circles_ie6.png) no-repeat -20px 0px; +} +.gwt-DialogBox .dialogTopRight { + background: url(images/circles.png) no-repeat -28px 0px; + -background: url(images/circles_ie6.png) no-repeat -28px 0px; +} +.gwt-DialogBox .dialogBottomLeft { + background: url(images/circles.png) no-repeat 0px -36px; + -background: url(images/circles_ie6.png) no-repeat 0px -36px; +} +.gwt-DialogBox .dialogBottomRight { + background: url(images/circles.png) no-repeat -8px -36px; + -background: url(images/circles_ie6.png) no-repeat -8px -36px; +} +* html .gwt-DialogBox .dialogTopLeftInner { + width: 10px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogTopRightInner { + width: 12px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogBottomLeftInner { + width: 10px; + height: 12px; + overflow: hidden; +} +* html .gwt-DialogBox .dialogBottomRightInner { + width: 12px; + height: 12px; + overflow: hidden; +} + +.gwt-DisclosurePanel { +} +.gwt-DisclosurePanel-open { +} +.gwt-DisclosurePanel-closed { +} +.gwt-DisclosurePanel .header, +.gwt-DisclosurePanel .header a, +.gwt-DisclosurePanel .header td { + text-decoration: none; /* Remove underline from header */ + color: black; + cursor: pointer; + cursor: hand; +} +.gwt-DisclosurePanel .content { + border-right: 3px solid #e7e7e7; + padding: 4px 8px 4px 0px; + margin-right: 6px; +} + +.gwt-FileUpload { +} + +.gwt-Frame { + border-top: 2px solid #666; + border-left: 2px solid #666; + border-right: 2px solid #bbb; + border-bottom: 2px solid #bbb; +} + +.gwt-HorizontalSplitPanel { +} +.gwt-HorizontalSplitPanel .hsplitter { + cursor: move; + border: 0px; + background: #e7e7e7; + line-height: 0px; +} +.gwt-VerticalSplitPanel { +} +.gwt-VerticalSplitPanel .vsplitter { + cursor: move; + border: 0px; + background: #e7e7e7; + line-height: 0px; +} + +.gwt-HTML { + padding: 0 0px; +} + +.gwt-Hyperlink { + cursor: pointer; +} + +.gwt-Image { +} + +.gwt-Label { +} + +.gwt-ListBox { +} + +.gwt-MenuBar { + cursor: default; +} +.gwt-MenuBar .gwt-MenuItem { + cursor: default; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-MenuBar .gwt-MenuItem-selected { + background: #E3E8F3; +} +.gwt-MenuBar-horizontal { + background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px; + border: 1px solid #e0e0e0; +} +.gwt-MenuBar-horizontal .gwt-MenuItem { + padding: 5px 10px; + vertical-align: bottom; + color: #000; + font-weight: bold; +} +.gwt-MenuBar-horizontal .gwt-MenuItemSeparator { + width: 1px; + padding: 0px; + margin: 0px; + border: 0px; + border-right: 1px solid #ccc; + background: white; +} +.gwt-MenuBar-horizontal .gwt-MenuItemSeparator .menuSeparatorInner { + width: 1px; + height: 1px; + background: white; +} +.gwt-MenuBar-vertical { + margin-top: 0px; + margin-right: 0px; + background: white; +} +.gwt-MenuBar-vertical table { + border-collapse: collapse; +} +.gwt-MenuBar-vertical .gwt-MenuItem { + padding: 2px 1px 2px 40px; +} +.gwt-MenuBar-vertical .gwt-MenuItemSeparator { + padding: 2px 0px; +} +.gwt-MenuBar-vertical .gwt-MenuItemSeparator .menuSeparatorInner { + height: 1px; + padding: 0px; + border: 0px; + border-top: 1px solid #ccc; + overflow: hidden; +} +.gwt-MenuBar-vertical .subMenuIcon { + padding-left: 4px; +} +.gwt-MenuBar-vertical .subMenuIcon-selected { + background: #E3E8F3; +} +.gwt-MenuBarPopup { + margin: 0px 3px 0px 0px; +} +.gwt-MenuBarPopup .menuPopupTopCenter { + background: url(images/hborder.png) 0px -12px repeat-x; +} +.gwt-MenuBarPopup .menuPopupBottomCenter { + background: url(images/hborder.png) 0px -13px repeat-x; + -background: url(images/hborder_ie6.png) 0px -13px repeat-x; +} +.gwt-MenuBarPopup .menuPopupMiddleLeft { + background: url(images/vborder.png) -12px 0px repeat-y; + -background: url(images/vborder_ie6.png) -12px 0px repeat-y; +} +.gwt-MenuBarPopup .menuPopupMiddleRight { + background: url(images/vborder.png) -13px 0px repeat-y; + -background: url(images/vborder_ie6.png) -13px 0px repeat-y; +} +.gwt-MenuBarPopup .menuPopupTopLeftInner { + width: 5px; + height: 5px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupTopRightInner { + width: 8px; + height: 5px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupBottomLeftInner { + width: 5px; + height: 8px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupBottomRightInner { + width: 8px; + height: 8px; + zoom: 1; +} +.gwt-MenuBarPopup .menuPopupTopLeft { + background: url(images/corner.png) no-repeat 0px -36px; + -background: url(images/corner_ie6.png) no-repeat 0px -36px; +} +.gwt-MenuBarPopup .menuPopupTopRight { + background: url(images/corner.png) no-repeat -5px -36px; + -background: url(images/corner_ie6.png) no-repeat -5px -36px; +} +.gwt-MenuBarPopup .menuPopupBottomLeft { + background: url(images/corner.png) no-repeat 0px -41px; + -background: url(images/corner_ie6.png) no-repeat 0px -41px; +} +.gwt-MenuBarPopup .menuPopupBottomRight { + background: url(images/corner.png) no-repeat -5px -41px; + -background: url(images/corner_ie6.png) no-repeat -5px -41px; +} +* html .gwt-MenuBarPopup .menuPopupTopLeftInner { + width: 5px; + height: 5px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupTopRightInner { + width: 8px; + height: 5px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupBottomLeftInner { + width: 5px; + height: 8px; + overflow: hidden; +} +* html .gwt-MenuBarPopup .menuPopupBottomRightInner { + width: 8px; + height: 8px; + overflow: hidden; +} + +.gwt-PasswordTextBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; +} +.gwt-PasswordTextBox-readonly { + color: #888; +} + +.gwt-PopupPanel { + border: 3px solid #e7e7e7; + padding: 3px; + background: white; +} + +.gwt-DecoratedPopupPanel .popupContent { +} +.gwt-DecoratedPopupPanel .popupMiddleCenter { + padding: 3px; + background: #f1f1f1; +} +.gwt-DecoratedPopupPanel .popupTopCenter { + background: url(images/hborder.png) 0px -2937px repeat-x; +} +.gwt-DecoratedPopupPanel .popupBottomCenter { + background: url(images/hborder.png) repeat-x 0px -2938px; + -background: url(images/hborder_ie6.png) repeat-x 0px -2138px; +} +.gwt-DecoratedPopupPanel .popupMiddleLeft { + background: url(images/vborder.png) -21px 0px repeat-y; +} +.gwt-DecoratedPopupPanel .popupMiddleRight { + background: url(images/vborder.png) repeat-y -24px 0px; + -background: url(images/vborder_ie6.png) repeat-y -24px 0px; +} +.gwt-DecoratedPopupPanel .popupTopLeftInner { + width: 6px; + height: 5px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupTopRightInner { + width: 6px; + height: 5px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupBottomLeftInner { + width: 6px; + height: 6px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupBottomRightInner { + width: 6px; + height: 6px; + zoom: 1; +} +.gwt-DecoratedPopupPanel .popupTopLeft { + background: url(images/circles.png) no-repeat 0px -16px; + -background: url(images/circles_ie6.png) no-repeat 0px -16px; +} +.gwt-DecoratedPopupPanel .popupTopRight { + background: url(images/circles.png) no-repeat -6px -16px; + -background: url(images/circles_ie6.png) no-repeat -6px -16px; +} +.gwt-DecoratedPopupPanel .popupBottomLeft { + background: url(images/circles.png) no-repeat 0px -21px; + -background: url(images/circles_ie6.png) no-repeat 0px -21px; +} +.gwt-DecoratedPopupPanel .popupBottomRight { + background: url(images/circles.png) no-repeat -6px -21px; + -background: url(images/circles_ie6.png) no-repeat -6px -21px; +} +* html .gwt-DecoratedPopupPanel .popupTopLeftInner { + width: 6px; + height: 5px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupTopRightInner { + width: 6px; + height: 5px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupBottomLeftInner { + width: 6px; + height: 6px; + overflow: hidden; +} +* html .gwt-DecoratedPopupPanel .popupBottomRightInner { + width: 6px; + height: 6px; + overflow: hidden; +} + +.gwt-PopupPanelGlass { + background-color: #000; + opacity: 0.3; + filter: alpha(opacity=30); +} + +.gwt-PushButton-up, +.gwt-PushButton-up-hovering, +.gwt-PushButton-up-disabled, +.gwt-PushButton-down, +.gwt-PushButton-down-hovering, +.gwt-PushButton-down-disabled { + margin: 0; + text-decoration: none; + background: url("images/hborder.png") repeat-x 0px -27px; + border-radius: 2px; + -moz-border-radius: 2px; +} +.gwt-PushButton-up, +.gwt-PushButton-up-hovering, +.gwt-PushButton-up-disabled { + padding: 3px 5px 3px 5px; +} +.gwt-PushButton-up { + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-up-hovering { + border: 1px solid; + border-color: #939393; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-up-disabled { + border: 1px solid #bbb; + cursor: default; + opacity: .5; + filter: alpha(opacity=45); + zoom: 1; +} +.gwt-PushButton-down, +.gwt-PushButton-down-hovering, +.gwt-PushButton-down-disabled { + padding: 4px 6px 2px 4px; + outline:none; +} +.gwt-PushButton-down { + border: 1px inset #666; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-down-hovering { + border: 1px solid #939393; + border-top: 1px solid #333333; + cursor: pointer; + cursor: hand; +} +.gwt-PushButton-down-disabled { + border: 1px outset #ccc; + cursor: default; + opacity: 0.5; + filter: alpha(opacity=45); + zoom: 1; +} + +.gwt-RadioButton { +} +.gwt-RadioButton-disabled { + color: #888; +} + +.gwt-RichTextArea { +} +.hasRichTextToolbar { + border: 0px; +} +.gwt-RichTextToolbar { + background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px; + border-bottom: 1px solid #BBBBBB; + padding: 3px; + margin: 0px; +} +.gwt-RichTextToolbar .gwt-PushButton-up { + padding: 0px 0px 0px 1px; + margin-left: 4px; + margin-bottom: 4px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-up-hovering { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-down { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-PushButton-down-hovering { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-up { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; +} +.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 0px 0px 1px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-down { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} +.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering { + margin-left: 4px; + margin-bottom: 4px; + padding: 0px 1px 0px 0px; + border-width: 1px; +} + +.gwt-StackPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-StackPanel .gwt-StackPanelItem { + cursor: pointer; + cursor: hand; + font-weight: bold; + font-size: 1.3em; + padding: 3px; + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-StackPanel .gwt-StackPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 2px 10px 5px; +} + +.gwt-DecoratedStackPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .gwt-StackPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 5px 10px 2px; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem { + cursor: pointer; + cursor: hand; +} +.gwt-DecoratedStackPanel .stackItemTopLeft, +.gwt-DecoratedStackPanel .stackItemTopRight { + height: 6px; + width: 6px; + zoom: 1; +} +.gwt-DecoratedStackPanel .stackItemTopLeft { + border-left: 1px solid #bbbbbb; + background: #d3def6 url(images/corner.png) no-repeat 0px -49px; + -background: #d3def6 url(images/corner_ie6.png) no-repeat 0px -49px; +} +.gwt-DecoratedStackPanel .stackItemTopRight { + border-right: 1px solid #bbbbbb; + background: #d3def6 url(images/corner.png) no-repeat -6px -49px; + -background: #d3def6 url(images/corner_ie6.png) no-repeat -6px -49px; +} +.gwt-DecoratedStackPanel .stackItemTopLeftInner, +.gwt-DecoratedStackPanel .stackItemTopRightInner { + width: 1px; + height: 1px; +} +* html .gwt-DecoratedStackPanel .stackItemTopLeftInner, +* html .gwt-DecoratedStackPanel .stackItemTopRightInner { + width: 6px; + height: 6px; + overflow: hidden; +} +.gwt-DecoratedStackPanel .stackItemTopCenter { + background: url(images/hborder.png) 0px -21px repeat-x; +} +.gwt-DecoratedStackPanel .stackItemMiddleLeft { + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; + border-left: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .stackItemMiddleLeftInner, +.gwt-DecoratedStackPanel .stackItemMiddleRightInner { + width: 1px; + height: 1px; +} +.gwt-DecoratedStackPanel .stackItemMiddleRight { + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; + border-right: 1px solid #bbbbbb; +} +.gwt-DecoratedStackPanel .stackItemMiddleCenter { + font-weight: bold; + font-size: 1.3em; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopRight, +.gwt-DecoratedStackPanel .gwt-StackPanelItem-first .stackItemTopLeft { + border: 0px; + background-color: white; +} +.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopLeft, +.gwt-DecoratedStackPanel .gwt-StackPanelItem-below-selected .stackItemTopRight { + background-color: white; +} + +.gwt-SuggestBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; + font-family: Arial Unicode MS, Arial, sans-serif; +} + +.gwt-SuggestBoxPopup { +} + +.gwt-SuggestBoxPopup .item { + padding: 2px 6px; + color: #000; + cursor: default; + font-size: 110%; +} +.gwt-SuggestBoxPopup .item-selected { + background: #D5E2FF; +} +.gwt-SuggestBoxPopup .suggestPopupContent { + background: white; +} +.gwt-SuggestBoxPopup .suggestPopupTopCenter { + border-top: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupBottomCenter { + border-bottom: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupTopCenterInner, +.gwt-SuggestBoxPopup .suggestPopupBottomCenterInner { + height: 1px; + line-height: 1px; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleLeft { + border-left: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleRight { + border-right: 1px solid #bbb; +} +.gwt-SuggestBoxPopup .suggestPopupMiddleLeftInner, +.gwt-SuggestBoxPopup .suggestPopupMiddleRightInner { + width: 1px; + line-height: 1px; +} +.gwt-SuggestBoxPopup .suggestPopupTopLeftInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupTopRightInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupBottomLeftInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupBottomRightInner { + width: 0px; + height: 0px; + zoom: 1; +} +.gwt-SuggestBoxPopup .suggestPopupTopLeft { + background: url(images/circles.png) no-repeat 0px -6px; + -background: url(images/circles_ie6.png) no-repeat 0px -6px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupTopRight { + background: url(images/circles.png) no-repeat -5px -6px; + -background: url(images/circles_ie6.png) no-repeat -5px -6px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupBottomLeft { + background: url(images/circles.png) no-repeat 0px -11px; + -background: url(images/circles_ie6.png) no-repeat 0px -11px; + width:5px; + height:5px; +} +.gwt-SuggestBoxPopup .suggestPopupBottomRight { + background: url(images/circles.png) no-repeat -5px -11px; + -background: url(images/circles_ie6.png) no-repeat -5px -11px; + width:5px; + height:5px; +} +* html .gwt-SuggestBoxPopup .suggestPopupTopLeftInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupTopRightInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupBottomLeftInner { + width: 0px; + height: 0px; + overflow: hidden; +} +* html .gwt-SuggestBoxPopup .suggestPopupBottomRightInner { + width: 0px; + height: 0px; + overflow: hidden; +} + +.gwt-TabBar { + background: #ccc; + padding-top: 6px; +} +.gwt-TabBar .gwt-TabBarFirst { + width: 5px; /* first tab distance from the left */ +} +.gwt-TabBar .gwt-TabBarRest { +} +.gwt-TabBar .gwt-TabBarItem { + margin-right: 4px; + padding: 4px 8px 4px 8px; + cursor: pointer; + cursor: hand; + color: white; + font-weight: normal; + text-align: center; + background: #8E8E8E; + -moz-border-radius: 3px 3px 0px 0px; + border-radius: 3px 3px 0px 0px; +} +.gwt-TabBar .gwt-TabBarItem-selected { + cursor: default; + background: white; + color: #333; + font-weight: bold; +} +.gwt-TabBar .gwt-TabBarItem-disabled { + cursor: default; + color: #999999; +} +.gwt-TabPanel { +} +.gwt-TabPanelBottom { + border-color: #ccc; + border-style: solid; + border-width: 0px 1px 1px; + overflow: hidden; + padding: 6px; +} +.gwt-DecoratedTabBar { + background: #ccc; + padding-top: 6px; +} +.gwt-DecoratedTabBar .gwt-TabBarFirst { + width: 5px; /* first tab distance from the left */ +} +.gwt-DecoratedTabBar .gwt-TabBarRest { +} +.gwt-DecoratedTabBar .gwt-TabBarItem { + border-collapse: collapse; + margin-right: 4px; +} +.gwt-DecoratedTabBar .tabTopCenter { + padding: 0px; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .tabTopLeft, +.gwt-DecoratedTabBar .tabTopRight { + padding: 0px; + zoom: 1; +} +.gwt-DecoratedTabBar .tabTopLeftInner, +.gwt-DecoratedTabBar .tabTopRightInner { + width: 3px; + height: 3px; +} +.gwt-DecoratedTabBar .tabTopLeft { + background: url(images/circles.png) no-repeat 0px 0px; + -background: url(images/circles_ie6.png) no-repeat 0px 0px; +} +.gwt-DecoratedTabBar .tabTopRight { + background: url(images/circles.png) no-repeat -3px 0px; + -background: url(images/circles_ie6.png) no-repeat -3px 0px; +} +* html .gwt-DecoratedTabBar .tabTopLeftInner, +* html .gwt-DecoratedTabBar .tabTopRightInner { + width: 3px; + height: 3px; + overflow: hidden; +} +.gwt-DecoratedTabBar .tabMiddleLeft, +.gwt-DecoratedTabBar .tabMiddleRight { + width: 3px; + padding: 0px; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .tabMiddleLeftInner, +.gwt-DecoratedTabBar .tabMiddleRightInner { + width: 1px; + height: 1px; +} +.gwt-DecoratedTabBar .tabMiddleCenter { + padding: 0px 5px 4px 5px; + cursor: pointer; + cursor: hand; + color: #fff; + font-weight: normal; + text-align: center; + background: #8E8E8E; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter { + background:#fff; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft { + background: url(images/circles.png) no-repeat -6px 0px; + -background: url(images/circles_ie6.png) no-repeat -6px 0px; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight { + background: url(images/circles.png) no-repeat -9px 0px; + -background: url(images/circles_ie6.png) no-repeat -9px 0px; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft, +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight { + background: #fff; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleCenter { + cursor: default; + background: #fff; + color:#333; + font-weight:bold; +} +.gwt-DecoratedTabBar .gwt-TabBarItem-disabled .tabMiddleCenter { + cursor: default; + color: #999999; +} + +.gwt-TextArea { + padding: 4px; + border: 1px solid #ccc; + border-top: 1px solid #666; + font-size: 100%; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-TextArea-readonly { + color: #888; +} + +.gwt-TextBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: small; + font-family: Arial Unicode MS, Arial, sans-serif; +} +.gwt-TextBox-readonly { + color: #888; +} +.gwt-ToggleButton-up, +.gwt-ToggleButton-up-hovering, +.gwt-ToggleButton-up-disabled, +.gwt-ToggleButton-down, +.gwt-ToggleButton-down-hovering, +.gwt-ToggleButton-down-disabled { + margin: 0; + text-decoration: none; + background: url("images/hborder.png") repeat-x 0px -27px; + -moz-border-radius: 2px; + border-radius: 2px; +} +.gwt-ToggleButton-up, +.gwt-ToggleButton-up-hovering, +.gwt-ToggleButton-up-disabled { + padding: 3px 5px 3px 5px; +} +.gwt-ToggleButton-up { + border:1px solid #bbb; + border-bottom: 1px solid #a0a0a0; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-up-hovering { + border: 1px solid; + border-color: #939393; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-up-disabled { + border: 1px solid #bbb; + cursor: default; + opacity: .5; + zoom: 1; + filter: alpha(opacity=45); +} +.gwt-ToggleButton-down, +.gwt-ToggleButton-down-hovering, +.gwt-ToggleButton-down-disabled { + padding: 4px 6px 2px 4px; +} +.gwt-ToggleButton-down { + background-position: 0 -513px; + border: 1px inset #666; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-down-hovering { + background-position: 0 -513px; + border: 1px inset; + border-color: #9cf #69e #69e #7af; + cursor: pointer; + cursor: hand; +} +.gwt-ToggleButton-down-disabled { + background-position: 0 -513px; + border: 1px inset #ccc; + cursor: default; + opacity: .5; + zoom: 1; + filter: alpha(opacity=45); +} + +.gwt-Tree .gwt-TreeItem { + padding: 1px 0px; + margin: 0px; + white-space: nowrap; + cursor: hand; + cursor: pointer; + zoom: 1; +} +.gwt-Tree .gwt-TreeItem-selected { + background: #ebeff9; +} +.gwt-TreeItem .gwt-RadioButton input, +.gwt-TreeItem .gwt-CheckBox input { + margin-right: 0px; +} +* html .gwt-TreeItem .gwt-RadioButton input, +* html .gwt-TreeItem .gwt-CheckBox input { + margin-right: -4px; +} + +.gwt-DateBox { + padding: 5px 4px; + border: 1px solid #ccc; + border-top: 1px solid #999; + font-size: 100%; +} +.gwt-DateBox input { + width: 8em; +} +.dateBoxFormatError { + background: #ffcccc; +} +.dateBoxPopup { +} + +.gwt-DatePicker { + border: 1px solid #ccc; + border-top:1px solid #999; + cursor: default; +} +.gwt-DatePicker td, +.datePickerMonthSelector td:focus { + outline: none; +} +.datePickerDays { + width: 100%; + background: white; +} +.datePickerDay, +.datePickerWeekdayLabel, +.datePickerWeekendLabel { + font-size: 85%; + text-align: center; + padding: 4px; + outline: none; + font-weight:bold; + color:#333; + border-right: 1px solid #EDEDED; + border-bottom: 1px solid #EDEDED; +} +.datePickerWeekdayLabel, +.datePickerWeekendLabel { + background: #fff; + padding: 0px 4px 2px; + cursor: default; + color:#666; + font-size:70%; + font-weight:normal; +} +.datePickerDay { + padding: 4px 7px; + cursor: hand; + cursor: pointer; +} +.datePickerDayIsWeekend { + background: #f7f7f7; +} +.datePickerDayIsFiller { + color: #999; + font-weight:normal; +} +.datePickerDayIsValue { + background: #d7dfe8; +} +.datePickerDayIsDisabled { + color: #AAAAAA; + font-style: italic; +} +.datePickerDayIsHighlighted { + background: #F0E68C; +} +.datePickerDayIsValueAndHighlighted { + background: #d7dfe8; +} +.datePickerDayIsToday { + padding: 3px; + color: #fff; + background: url(images/hborder.png) repeat-x 0px -2607px; +} + +.datePickerMonthSelector { + width: 100%; + padding: 1px 0 5px 0; + background: #fff; +} +td.datePickerMonth { + text-align: center; + vertical-align: middle; + white-space: nowrap; + font-size: 100%; + font-weight: bold; + color: #333; +} +.datePickerPreviousButton, +.datePickerNextButton { + font-size: 120%; + line-height: 1em; + color: #3a6aad; + cursor: hand; + cursor: pointer; + font-weight: bold; + padding: 0px 4px; + outline: none; +} + +.gwt-StackLayoutPanel { + border-bottom: 1px solid #bbbbbb; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader { + cursor: pointer; + cursor: hand; + font-weight: bold; + font-size: 1.3em; + padding: 3px; + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: #d3def6 url(images/hborder.png) repeat-x 0px -989px; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader-hovering { + background: #d3def6; +} +.gwt-StackLayoutPanel .gwt-StackLayoutPanelContent { + border: 1px solid #bbbbbb; + border-bottom: 0px; + background: white; + padding: 2px 5px 10px 2px; +} + +.gwt-TabLayoutPanel { +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTabs { + background: #ccc; + padding-top: 6px; + padding-right: 5px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelContentContainer { + border-color: #ccc; + border-style: solid; + border-width: 0px 1px 1px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelContent { + overflow: hidden; + padding: 6px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab { + margin-right: 4px; + padding: 4px 8px 4px 8px; + cursor: pointer; + cursor: hand; + color: white; + font-weight: normal; + text-align: center; + background: #8E8E8E; + -moz-border-radius: 3px 3px 0px 0px; + border-radius: 3px 3px 0px 0px; +} +.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab-selected { + cursor: default; + background: white; + color: #333; + font-weight: bold; +} + +.gwt-SplitLayoutPanel-HDragger { + background: #e7e7e7 url(images/thumb_vertical.png) center center no-repeat; + cursor: col-resize; +} + +.gwt-SplitLayoutPanel-VDragger { + background: #e7e7e7 url(images/thumb_horz.png) center center no-repeat; + cursor: row-resize; +} \ No newline at end of file diff --git a/common/static/js/capa/jsme/gwt/clean/images/circles.png b/common/static/js/capa/jsme/gwt/clean/images/circles.png new file mode 100644 index 0000000000000000000000000000000000000000..2a84b9c32066c484aaa8ad28c0e6f3ff77cd072c GIT binary patch literal 1492 zcma)+`#%$U7{|X88wz10cUnRdAspqj?QpPamZRm8$fegvvmrtvCMTTIQPK>fv#`~a z+%L0Qa%)2)YKaO{3bRCXIXnNsc|EVs^Lf3W-<}^npG$b0r<$t1DgZ#u+soZo?$&Ze zC`09Y@oJ@~+#vD3o*2Lp8orl<3fU_l9st$3{{+d*Qwx+IVF})cJYZslEm}6tRNbY| z04SaGc1Qc2efjC;K&-YWyt~t(Y&j*|AiQ7@s%Yk)ONHN!dpr3%;88J>d$!|7(tbwcu$Ml~RGr9qU&HYxzf{UR7_H4OyAz_x5^IO*J!(CRFPK?;a;Q zm8|H6BT597wY3`8o~fm{^ZQ{MA(;LpwZ@qy{OSM)hsM{Wpy3<4#4GuCf~m`(>foUzdLS{cj1aCbZ?Ot zf;>BDhR0sw%rybTZ}%9WEOzm=j3*f5ExQRQbc|EUry~TPD*`)=*9Km56iw84`ikr2_@#$gu%9f}2T5Fu z=fx9uq~)8#f=J(d!}HVVTnIu5K*4leOQg6lajHkt@Yi#C0M8!rZwNHnd87Ys*!{7b z;JU$fiwbBoZKnR6%gde~Whe|*!Ls%{;!%O;)%;O4nOt^~HscuP6fOQT%i{t2n@@LW zJa~azTVFpR{zCl7_>@>;FN(lFQ3G7Bml56`yD#Q?fjm5ABZ)s;7{tXWkV zK_Zb3it6`Xa?eB*_U_p&J`-FS^|G|3rN!0kANY+saL_N2HK~}nAHL@EmcwEJ)Y8{) zwr^^*VAWXVUxa#M$Dt!|C29fbvYx?gk#%;v5xeq{teqxFHkhGdlvlYL1G4A}(Fr7@ zw5F!!6rj$vo(j$0Ob*@x9uE%>4**w6rmMELw#dQ3Vbn!ZIZjH_ac>)kN{&4h3Xhi; z7h6KeZxxpzj>7W&KfAxLucRjgH_arMEvAJubAsAZSLT`V65)4axN+D4oY(A8rF$kQ zb(D4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M%?&G*0&?m58 z92bCHU|$@KW!=5y1NyJs8cWRFj~4K)iens@HC5~GEg#T+?beuhsJ<p-viElyZ|Kd7absSQs#3kn)kZ_F;jAlH3b5eanOe>JWUEa?CpL7api_`(**4}C zsiUKVcs#Du7Szzo#$)gvRp{D*0Q%b;Bxa5)bZtOEbxvDf1c$>>)VN~5bX-)u@U5YU z`uh5cnkFYFt21=v$h$M8JNpk8)rwyey4U(?3Hra)x@xVHlAv%nEQ#HXTxOj}dM}(5 zXtm~`NF;)yC^vvBK&!aC4m=Ep!=HUKwS(!Rswm1B5CB5H4+0LC%MHNR)@Ez+&qvLQ zqQp?=9UVj7oI;`nV@b8U$7lcC@X*DQ z>emGz`M{v?8lI!pGP5ZJw0_y!U>Fpvz#lZbj>?tcb@UGgBT0GyAom*p0000EMUMH{Tt)^YzrjulMdhy7%DGg(u%Wef{#r~0e*ORdfA{X)+txWagA6SR@(X5gcy=QV#7XjYcVXyYmGuB}I14-?iy0WWg+Z8+ zVb&Z8pdfpRr>`sfO-2DeWd?=She578b~+rKoHwFvIpv^3&S znZ$cbsf~tw4yym-^Sy57)jqp;M6*THt?XH_{{o%buOAdeR%h&a+GARJeNx~5sz*!B z*IZS&m*YLZq-ye8N6o%VGd7f4+A4bP0l+XkK Dn$5EQ literal 0 HcmV?d00001 diff --git a/common/static/js/capa/jsme/gwt/clean/images/hborder.png b/common/static/js/capa/jsme/gwt/clean/images/hborder.png new file mode 100644 index 0000000000000000000000000000000000000000..ec58ae6126a0f189b14bcaaf06a8cfebaaacffe3 GIT binary patch literal 1995 zcmeAS@N?(olHy`uVBq!ia0vp^3JeU~eH?5+R#0}_1R%v&9OUlAuG#z(zf~Y@3)nH$zj{tZ?T}AQI}UD_Z!QlhHIBqU%X_w^@j6H36riJ=Veu(aH`0@ z{vD#sKtGHKFy+^W4+fP??N0^R)?^+~3$BFxN$}SZ#?unXDvYLo{sbL9U(d|>8Gn}6?2TL8@bvWd_ZOwE zl%^oHsy!aynkVH^c-Kl zYk4Uo^1h92qL4+~OO{XZC!=<-)P6eubx?+0;ek&-eppOu*p)k5ZiaNg_uBLGnu1PU zH+c{&QeZc~Js9X{fxE2BFKh1OwsRNOSZcFec!xjJKjxB|9djP!R^J49%G1@)Wt~$( F697DM5(oeQ literal 0 HcmV?d00001 diff --git a/common/static/js/capa/jsme/gwt/clean/images/hborder_ie6.png b/common/static/js/capa/jsme/gwt/clean/images/hborder_ie6.png new file mode 100644 index 0000000000000000000000000000000000000000..2268f88a76174ada5393bf042902f7743a9e8e76 GIT binary patch literal 706 zcmeAS@N?(olHy`uVBq!ia0vp^3JeS!xg5+u){)-3!a$0#ILO_JVcj{Imq1QkfKQ04 zu2-3XZ?#EiyG6_-o1}Tx+3Os$*VyK5axL2GT(aAv@_=Xc(MbnC?A^0>>fw(wkA6II zP$Gv;^uHOH4=FyJ}PrluJ{Qcgu@6Vn+ zd-CeX^S3|WzkmPs!}pILKYsf1^V|1tKYsrC_51Jt|NsBmSR4hqgtNdSvY3H^TL^?1 zFWs&C0~BO0@$_|Nzs)4cXKd=dt5E^y`cs}Rjv*Dd-rjZ3yJNuM5V-97Ba6<*Cfj%1 z{ofS%gh9T8jV1lhzhAlO=GyPOtdKtl@HvnJcz#XAlqc0%j4oJ4}!Na7l@et z5HPKf@7*p)v^g+^HX;S`ZyD~m^5!j;d|)+;aor--1Flyd*f0SVG#qC9DOW1V$j?2; zm7U3NvFZU&lTGdyD`a}rFIGtPKEGHY*&BYbLbliZBF}{8ISfT=;S4+F;#|BN(gU0C r9Qo&B?7;WQBI=PAAM=yXNyb0851P%0GLA5i0$J|q>gTe~DWM4fBnA0p literal 0 HcmV?d00001 diff --git a/common/static/js/capa/jsme/gwt/clean/images/thumb_horz.png b/common/static/js/capa/jsme/gwt/clean/images/thumb_horz.png new file mode 100644 index 0000000000000000000000000000000000000000..b43e683e1fc8ff563a0e90c465ed6bf0c12c3924 GIT binary patch literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)I!VDxgys+>CQq09po*^6@9Je3(KLBzi0(?ST zjg5`}|Nozxn;Q@i(ACxD=;&BeQxhK_e#- zgOR?Wfxe;P-5zNcpaKz37sn8enaK&J;l&98A|fIQ4VxK+%@|MTrwIH2$}@Pn`njxg HN@xNALh?UZ literal 0 HcmV?d00001 diff --git a/common/static/js/capa/jsme/gwt/clean/images/thumb_vertical.png b/common/static/js/capa/jsme/gwt/clean/images/thumb_vertical.png new file mode 100644 index 0000000000000000000000000000000000000000..bd57f594ac98980f6eda313abba3f4ed1bed2ae6 GIT binary patch literal 231 zcmeAS@N?(olHy`uVBq!ia0vp^EI`c8!VDzudVhQjq?n7HJVQ7*IBq}me*ol41o(uw z8XFt`|NlQXH#Z<4psTCP(b2J{rY1f<{zP2lbf6l}0*}aI1_o{+5N5n|x9$&6P^QE+ zq9iy!t)x7$D3!r6B|j-u!7Z~WwLHHlyI8?F*tBr#V>6&SQII<4qSVBa%=|oskj&gv z1|xk#1ARloyFJn%*U5UiIEHY{OcoGG5D-lj5K9vfPZtnM5)e)n5M*TF)?*Z3_i%|1 PP$7e-tDnm{r-UW|-D^M6 literal 0 HcmV?d00001 diff --git a/common/static/js/capa/jsme/gwt/clean/images/vborder.png b/common/static/js/capa/jsme/gwt/clean/images/vborder.png new file mode 100644 index 0000000000000000000000000000000000000000..6840d11a1227e163a012e526e821babed6736814 GIT binary patch literal 298 zcmeAS@N?(olHy`uVBq!ia0vp^x~AHRJ0^8f$;XVMF7fGRl)JR*x37`TN%nDNrx zx<5cc_7YEDSN7XXl6<<>70#1?0EJXNT^vI+&L5zMQp3{0%&`0Ne@8vu$Q+;s22WQ%mvv4FO#qf+N16Zt literal 0 HcmV?d00001 diff --git a/common/static/js/capa/jsme/jsme_export.nocache.js b/common/static/js/capa/jsme/jsme_export.nocache.js new file mode 100644 index 0000000000..7046ccdbfd --- /dev/null +++ b/common/static/js/capa/jsme/jsme_export.nocache.js @@ -0,0 +1,343 @@ +function jsme_export() { + var P = '', xb = '" for "gwt:onLoadErrorFn"', vb = '" for "gwt:onPropertyErrorFn"', ib = '"><\/script>', Z = '#', _b = '.cache.html', _ = '/', lb = '//', Tb = '0611409F263B5178342FE86F2A15096A', Vb = '396B3EA649BF55AAB5739A9E6278DBB1', Wb = '55B43920D2446B7876A6D007C7823913', $b = ':', Ub = ':1', pb = '::', hc = ' + + + + + diff --git a/common/static/js/capa/jsmolcalc/312E72C8D4B790C916449F33EDABBFE3.cache.html b/common/static/js/capa/jsmolcalc/312E72C8D4B790C916449F33EDABBFE3.cache.html new file mode 100644 index 0000000000..1a0a156629 --- /dev/null +++ b/common/static/js/capa/jsmolcalc/312E72C8D4B790C916449F33EDABBFE3.cache.html @@ -0,0 +1,2659 @@ + + + + + + + diff --git a/common/static/js/capa/jsmolcalc/38E881215DD233AEE60236A5F07A6EFB.cache.html b/common/static/js/capa/jsmolcalc/38E881215DD233AEE60236A5F07A6EFB.cache.html new file mode 100644 index 0000000000..742d01c649 --- /dev/null +++ b/common/static/js/capa/jsmolcalc/38E881215DD233AEE60236A5F07A6EFB.cache.html @@ -0,0 +1,2659 @@ + + + + + + + diff --git a/common/static/js/capa/jsmolcalc/54670F2F197D551F9025F17D20D5419E.cache.html b/common/static/js/capa/jsmolcalc/54670F2F197D551F9025F17D20D5419E.cache.html new file mode 100644 index 0000000000..4f18e1c5fa --- /dev/null +++ b/common/static/js/capa/jsmolcalc/54670F2F197D551F9025F17D20D5419E.cache.html @@ -0,0 +1,2788 @@ + + + + + + + diff --git a/common/static/js/capa/jsmolcalc/E160974BF5B466293C4DEE2B43671396.cache.html b/common/static/js/capa/jsmolcalc/E160974BF5B466293C4DEE2B43671396.cache.html new file mode 100644 index 0000000000..f8ec78aa40 --- /dev/null +++ b/common/static/js/capa/jsmolcalc/E160974BF5B466293C4DEE2B43671396.cache.html @@ -0,0 +1,2659 @@ + + + + + + + diff --git a/common/static/js/capa/jsmolcalc/E9A1CFF73C3BB29B1FEC4755F49EF92F.cache.html b/common/static/js/capa/jsmolcalc/E9A1CFF73C3BB29B1FEC4755F49EF92F.cache.html new file mode 100644 index 0000000000..fe106dec65 --- /dev/null +++ b/common/static/js/capa/jsmolcalc/E9A1CFF73C3BB29B1FEC4755F49EF92F.cache.html @@ -0,0 +1,2631 @@ + + + + + + + diff --git a/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js b/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js index 3bdee52fb1..aaa6f3d7af 100644 --- a/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js +++ b/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js @@ -299,12 +299,12 @@ function jsmolcalc(){ $stats && $stats({moduleName:'jsmolcalc', sessionId:$sessionId_0, subSystem:'startup', evtGroup:'bootstrap', millis:(new Date).getTime(), type:'selectingPermutation'}); if (!isHostedMode()) { try { - unflattenKeylistIntoAnswers(['ie6'], '2F6BC62FA9B71FB5EB318145F5D37E84'); - unflattenKeylistIntoAnswers(['ie8'], '468C0B0171166372F064D287492CBD1E'); - unflattenKeylistIntoAnswers(['gecko1_8'], 'C43483CC355E7BFB7BE2F45092922897'); - unflattenKeylistIntoAnswers(['safari'], 'E38BF09B489084CBFD0BF2CB8A77BFAC'); - unflattenKeylistIntoAnswers(['opera'], 'E8EDF03FE9C26D69E2C7DB17E15CF0ED'); - unflattenKeylistIntoAnswers(['ie9'], 'F8283183F9546F019176F75A8E25B0F0'); + unflattenKeylistIntoAnswers(['gecko1_8'], '1AEAC78BFB6BD40D743A1FCE21F4ED55'); + unflattenKeylistIntoAnswers(['ie6'], '312E72C8D4B790C916449F33EDABBFE3'); + unflattenKeylistIntoAnswers(['ie8'], '38E881215DD233AEE60236A5F07A6EFB'); + unflattenKeylistIntoAnswers(['safari'], '54670F2F197D551F9025F17D20D5419E'); + unflattenKeylistIntoAnswers(['ie9'], 'E160974BF5B466293C4DEE2B43671396'); + unflattenKeylistIntoAnswers(['opera'], 'E9A1CFF73C3BB29B1FEC4755F49EF92F'); strongName = answers[computePropValue('user.agent')]; var idx = strongName.indexOf(':'); if (idx != -1) { From 05e25dadcf2afda51b06c6551d91d61a3ad08cf7 Mon Sep 17 00:00:00 2001 From: Julian Arni Date: Wed, 30 Jan 2013 13:34:16 -0500 Subject: [PATCH 191/347] Added validation warnings --- common/static/js/capa/editamolecule.js | 45 ++++++++++++++++++++------ 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/common/static/js/capa/editamolecule.js b/common/static/js/capa/editamolecule.js index c5f38c2ded..21bb5b1e4b 100644 --- a/common/static/js/capa/editamolecule.js +++ b/common/static/js/capa/editamolecule.js @@ -58,6 +58,12 @@ var input_field = parent.find('input[type=hidden]'); var reset_button = parent.find('button.reset'); + // Add div for error messages + + $('

        ').appendTo(parent); + // Applet options applet.setAntialias(true); @@ -72,12 +78,16 @@ reset_button.on('click', function() { requestAppletData(element, applet, input_field); + + // Make sure remaining error messages are cleared + var errordiv = $(element).parent().find('.errormsgs')[0]; + errordiv.style.visibility = 'hidden'; }); // Update the input element everytime the is an interaction // with the applet (click, drag, etc) $(element).on('mouseup', function() { - updateInput(applet, input_field); + updateInput(applet, input_field, element); }); } @@ -102,31 +112,46 @@ updateInput(applet, input_field); } - function updateInput(applet, input_field) { + function updateInput(applet, input_field, element) { var mol = applet.molFile(); var smiles = applet.smiles(); var jme = applet.jmeFile(); - var info = jsmol.API.getInfo(mol, smiles, jme).toString(); - var err = jsmol.API.getErrors(mol, smiles, jme).toString(); + var info = formatInfo(jsmol.API.getInfo(mol, smiles, jme).toString(), + input_field, element); var value = { mol: mol, info: info }; console.log("Molecule info:"); console.log(info); - console.log(err); input_field.val(JSON.stringify(value)); return value; } - function formatInfo(info) { + function formatInfo(info, input_field, element) { var results = []; + var errordiv = $(element).parent().find('.errormsgs')[0]; + console.log(errordiv); - var fragment = $('
        ').append(info); - fragment.find('font').each(function () { - results.push($(this).html()); - }); + if (info.search("It is not possible") == -1) { + errordiv.innerHTML = ''; + errordiv.style.visibility = 'hidden'; + var fragment = $('
        ').append(info); + fragment.find('font').each(function () { + results.push($(this).html()); + }); + } + else { + console.log("err"); + + // remove Brian's html tags + var tags = /<((\/)?\w{1,7})>/g; + var errmsg = info.replace(tags, ' '); + console.log(errmsg); + errordiv.innerHTML = errmsg; + errordiv.style.visibility = 'visible'; + } return results; } From adb77ea699d918da598a4b371605a65d797d07c9 Mon Sep 17 00:00:00 2001 From: John Hess Date: Wed, 30 Jan 2013 21:32:50 -0500 Subject: [PATCH 192/347] hack to fix validation issues --- common/static/js/capa/editamolecule.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/common/static/js/capa/editamolecule.js b/common/static/js/capa/editamolecule.js index 21bb5b1e4b..97cbc4d719 100644 --- a/common/static/js/capa/editamolecule.js +++ b/common/static/js/capa/editamolecule.js @@ -131,9 +131,19 @@ function formatInfo(info, input_field, element) { var results = []; + console.log("element parent is"+$(element).parent()) var errordiv = $(element).parent().find('.errormsgs')[0]; console.log(errordiv); - + + if (!errordiv) { + // This is a bit hackish, but works. + // There are situations where formatInfo is called but no div yet exists + // to my knowledge (blame John Hess) this is always followed by a call to + // this function once the div does exist + console.log("There is no errordiv loaded yet. trying again soon"); + return [] + } + if (info.search("It is not possible") == -1) { errordiv.innerHTML = ''; errordiv.style.visibility = 'hidden'; From 222c01b20bb1e1140f901fef626ebdd964051695 Mon Sep 17 00:00:00 2001 From: Julian Arni Date: Mon, 4 Feb 2013 23:56:49 -0500 Subject: [PATCH 193/347] Removed console logs --- common/static/js/capa/editamolecule.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/common/static/js/capa/editamolecule.js b/common/static/js/capa/editamolecule.js index 97cbc4d719..d83a7633cd 100644 --- a/common/static/js/capa/editamolecule.js +++ b/common/static/js/capa/editamolecule.js @@ -98,7 +98,7 @@ url: molFile, dataType: "text", success: function(data) { - console.log("Done."); + //console.log("Done."); loadAppletData(applet, data, input_field); }, error: function() { @@ -121,8 +121,8 @@ input_field, element); var value = { mol: mol, info: info }; - console.log("Molecule info:"); - console.log(info); + //console.log("Molecule info:"); + //console.log(info); input_field.val(JSON.stringify(value)); @@ -131,16 +131,16 @@ function formatInfo(info, input_field, element) { var results = []; - console.log("element parent is"+$(element).parent()) + //console.log("element parent is"+$(element).parent()) var errordiv = $(element).parent().find('.errormsgs')[0]; - console.log(errordiv); + //console.log(errordiv); if (!errordiv) { // This is a bit hackish, but works. // There are situations where formatInfo is called but no div yet exists // to my knowledge (blame John Hess) this is always followed by a call to // this function once the div does exist - console.log("There is no errordiv loaded yet. trying again soon"); + //console.log("There is no errordiv loaded yet. trying again soon"); return [] } @@ -153,12 +153,12 @@ }); } else { - console.log("err"); + //console.log("err"); // remove Brian's html tags var tags = /<((\/)?\w{1,7})>/g; var errmsg = info.replace(tags, ' '); - console.log(errmsg); + //console.log(errmsg); errordiv.innerHTML = errmsg; errordiv.style.visibility = 'visible'; } From 219c51f898a58c185840e8445acd03dc1fdc7197 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Tue, 5 Feb 2013 22:24:20 -0500 Subject: [PATCH 194/347] Fix placeholder email in signup form --- lms/templates/signup_modal.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/templates/signup_modal.html b/lms/templates/signup_modal.html index 22a4a93499..01bc17bd65 100644 --- a/lms/templates/signup_modal.html +++ b/lms/templates/signup_modal.html @@ -21,7 +21,7 @@
        % if has_extauth_info is UNDEFINED: - + From c7a133470d42bf9aa11d682a729450ffbe233231 Mon Sep 17 00:00:00 2001 From: Kevin Chugh Date: Tue, 5 Feb 2013 22:43:09 -0500 Subject: [PATCH 195/347] inline discussions working --- .../discussion/discussion_module_view.coffee | 9 ++++--- .../discussion_thread_view_inline.coffee | 5 +++- .../django_comment_client/forum/views.py | 24 ++++++++++++++----- .../mustache/_inline_discussion.mustache | 1 - .../mustache/_inline_thread.mustache | 1 - .../mustache/_inline_thread_cohorted.mustache | 22 +++++++++++++++++ 6 files changed, 48 insertions(+), 14 deletions(-) create mode 100644 lms/templates/discussion/mustache/_inline_thread_cohorted.mustache diff --git a/common/static/coffee/src/discussion/discussion_module_view.coffee b/common/static/coffee/src/discussion/discussion_module_view.coffee index 6fce4c66cb..077210bc4f 100644 --- a/common/static/coffee/src/discussion/discussion_module_view.coffee +++ b/common/static/coffee/src/discussion/discussion_module_view.coffee @@ -74,13 +74,12 @@ if Backbone? @discussion = new Discussion() @discussion.reset(response.discussion_data, {silent: false}) - #rather than have two different templates to get around (or take advantage of?) - #mustache's logic free templates, we added a 'group string' to each thread for inline - #discussions for the use case where a commentable is cohorted, but a global - #thread is posted by a TA + #use same discussion template but different thread templated + #determined in the coffeescript based on whether or not there's a + #group id $discussion = $(Mustache.render $("script#_inline_discussion").html(), {'threads':response.discussion_data, 'discussionId': discussionId, 'allow_anonymous_to_peers': allow_anonymous_to_peers, 'allow_anonymous': allow_anonymous}) - + if @$('section.discussion').length @$('section.discussion').replaceWith($discussion) else diff --git a/common/static/coffee/src/discussion/views/discussion_thread_view_inline.coffee b/common/static/coffee/src/discussion/views/discussion_thread_view_inline.coffee index 7dab9ae342..e648955d08 100644 --- a/common/static/coffee/src/discussion/views/discussion_thread_view_inline.coffee +++ b/common/static/coffee/src/discussion/views/discussion_thread_view_inline.coffee @@ -16,7 +16,10 @@ if Backbone? @$delegateElement = @$local render: -> - @template = DiscussionUtil.getTemplate("_inline_thread") + if @model.has('group_id') + @template = DiscussionUtil.getTemplate("_inline_thread_cohorted") + else + @template = DiscussionUtil.getTemplate("_inline_thread") if not @model.has('abbreviatedBody') @abbreviateBody() diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 6de453e1ee..269bdfcd5e 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -61,7 +61,8 @@ def get_threads(request, course_id, discussion_id=None, per_page=THREADS_PER_PAG #if the course-user is cohorted, then add the group id - group_id = get_cohort_id(user, course_id) + group_id = get_cohort_id(request.user, course_id) + if group_id: default_query_params["group_id"] = group_id @@ -73,11 +74,12 @@ def get_threads(request, course_id, discussion_id=None, per_page=THREADS_PER_PAG threads, page, num_pages = cc.Thread.search(query_params) + #now add the group name if the thread has a group id for thread in threads: if thread.get('group_id'): thread['group_name'] = get_cohort_by_id(course_id, thread.get('group_id')).name - thread['group_string'] = "This post visible only to Group ${group_name}." + thread['group_string'] = "This post visible only to Group %s." % (thread['group_name']) else: thread['group_name'] = "" thread['group_string'] = "This post visible to everyone." @@ -111,6 +113,9 @@ def inline_discussion(request, course_id, discussion_id): allow_anonymous = course.metadata.get("allow_anonymous", True) allow_anonymous_to_peers = course.metadata.get("allow_anonymous_to_peers", False) + #since inline is all one commentable, only show or allow the choice of cohorts + #if the commentable is cohorted, otherwise everything is not cohorted + #and no one has the option of choosing a cohort is_cohorted = is_course_cohorted(course_id) and is_commentable_cohorted(course_id, discussion_id) cohorts_list = list() @@ -118,17 +123,24 @@ def inline_discussion(request, course_id, discussion_id): if is_cohorted: #if you're a mod, send all cohorts and let you pick - if cached_has_permission(request.user, "see_all_cohorts", course_id) or True: + if cached_has_permission(request.user, "see_all_cohorts", course_id): cohorts = get_course_cohorts(course_id) for c in cohorts: cohorts_list.append({'name':c.name, 'id':c.id}) else: #otherwise, just make a dictionary of two - user_cohort = get_cohort_id(user, course_id) + user_cohort = get_cohort(user, course_id) + if user_cohort: + user_cohort_name = user_cohort.name + user_cohort_id = user_cohort.id + else: + user_cohort_name = user_cohort_id = None + + cohorts_list.append({'name':'All Groups','id':None}) if user_cohort: - cohorts_list.append({'name':user_cohort.name, 'id':user_cohort.id}) + cohorts_list.append({'name':user_cohort_name, 'id':user_cohort_id}) else: cohorts_list = None @@ -297,7 +309,7 @@ def single_thread(request, course_id, discussion_id, thread_id): 'roles': saxutils.escape(json.dumps(utils.get_role_ids(course_id)), escapedict), 'thread_pages': query_params['num_pages'], 'is_course_cohorted': is_course_cohorted(course_id), - 'is_moderator': cached_has_permission(request.user, "see_all_cohorts", course_id) or True, + 'is_moderator': cached_has_permission(request.user, "see_all_cohorts", course_id), 'cohorts': cohorts, 'user_cohort': get_cohort_id(request.user, course_id), 'cohorted_commentables': cohorted_commentables diff --git a/lms/templates/discussion/mustache/_inline_discussion.mustache b/lms/templates/discussion/mustache/_inline_discussion.mustache index c9252bd9f3..6c57fa9dfe 100644 --- a/lms/templates/discussion/mustache/_inline_discussion.mustache +++ b/lms/templates/discussion/mustache/_inline_discussion.mustache @@ -34,7 +34,6 @@
        {{#threads}} -
        {{group_string}}
        {{/threads}} diff --git a/lms/templates/discussion/mustache/_inline_thread.mustache b/lms/templates/discussion/mustache/_inline_thread.mustache index 150625bfae..b52d3924e7 100644 --- a/lms/templates/discussion/mustache/_inline_thread.mustache +++ b/lms/templates/discussion/mustache/_inline_thread.mustache @@ -1,5 +1,4 @@
        -
          diff --git a/lms/templates/discussion/mustache/_inline_thread_cohorted.mustache b/lms/templates/discussion/mustache/_inline_thread_cohorted.mustache new file mode 100644 index 0000000000..9223dfd388 --- /dev/null +++ b/lms/templates/discussion/mustache/_inline_thread_cohorted.mustache @@ -0,0 +1,22 @@ + \ No newline at end of file From 0936f448fc97acfdc1e73b30e942e26c86c37c3d Mon Sep 17 00:00:00 2001 From: ichuang Date: Tue, 5 Feb 2013 13:26:49 +0000 Subject: [PATCH 196/347] add disable_progress_graph key to course metadata --- lms/templates/courseware/progress.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lms/templates/courseware/progress.html b/lms/templates/courseware/progress.html index fb163d112d..9b52ff2069 100644 --- a/lms/templates/courseware/progress.html +++ b/lms/templates/courseware/progress.html @@ -32,7 +32,9 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph",

          Course Progress

        -
        + %if not course.metadata.get('disable_progress_graph',False): +
        + %endif
          %for chapter in courseware_summary: From 6a7e30e3318bd91d25db9801c71ea8013923ca4e Mon Sep 17 00:00:00 2001 From: ichuang Date: Wed, 6 Feb 2013 04:01:28 +0000 Subject: [PATCH 197/347] add doc about disable_progress_graph --- doc/xml-format.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/xml-format.md b/doc/xml-format.md index b93f3bbeab..c59db690a1 100644 --- a/doc/xml-format.md +++ b/doc/xml-format.md @@ -268,6 +268,7 @@ Supported fields at the course level: * "start" -- specify the start date for the course. Format-by-example: "2012-09-05T12:00". * "advertised_start" -- specify what you want displayed as the start date of the course in the course listing and course about pages. This can be useful if you want to let people in early before the formal start. Format-by-example: "2012-09-05T12:00". +* "disable_policy_graph" -- set to true (or "Yes"), if the policy graph should be disabled (ie not shown). * "enrollment_start", "enrollment_end" -- when can students enroll? (if not specified, can enroll anytime). Same format as "start". * "end" -- specify the end date for the course. Format-by-example: "2012-11-05T12:00". * "end_of_course_survey_url" -- a url for an end of course survey -- shown after course is over, next to certificate download links. From 31b8f0ce7f0e1777854c452566e24a7c3eae5941 Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Tue, 5 Feb 2013 23:27:52 -0500 Subject: [PATCH 198/347] Have errors go through jsmolcalc's getInfo --- ...AEAC78BFB6BD40D743A1FCE21F4ED55.cache.html | 2638 ---------------- ...12E72C8D4B790C916449F33EDABBFE3.cache.html | 2659 ---------------- ...8E881215DD233AEE60236A5F07A6EFB.cache.html | 2659 ---------------- ...4670F2F197D551F9025F17D20D5419E.cache.html | 2788 ----------------- ...160974BF5B466293C4DEE2B43671396.cache.html | 2659 ---------------- ...9A1CFF73C3BB29B1FEC4755F49EF92F.cache.html | 2631 ---------------- .../js/capa/jsmolcalc/jsmolcalc.nocache.js | 12 +- 7 files changed, 6 insertions(+), 16040 deletions(-) delete mode 100644 common/static/js/capa/jsmolcalc/1AEAC78BFB6BD40D743A1FCE21F4ED55.cache.html delete mode 100644 common/static/js/capa/jsmolcalc/312E72C8D4B790C916449F33EDABBFE3.cache.html delete mode 100644 common/static/js/capa/jsmolcalc/38E881215DD233AEE60236A5F07A6EFB.cache.html delete mode 100644 common/static/js/capa/jsmolcalc/54670F2F197D551F9025F17D20D5419E.cache.html delete mode 100644 common/static/js/capa/jsmolcalc/E160974BF5B466293C4DEE2B43671396.cache.html delete mode 100644 common/static/js/capa/jsmolcalc/E9A1CFF73C3BB29B1FEC4755F49EF92F.cache.html diff --git a/common/static/js/capa/jsmolcalc/1AEAC78BFB6BD40D743A1FCE21F4ED55.cache.html b/common/static/js/capa/jsmolcalc/1AEAC78BFB6BD40D743A1FCE21F4ED55.cache.html deleted file mode 100644 index 86912014ca..0000000000 --- a/common/static/js/capa/jsmolcalc/1AEAC78BFB6BD40D743A1FCE21F4ED55.cache.html +++ /dev/null @@ -1,2638 +0,0 @@ - - - - - - - diff --git a/common/static/js/capa/jsmolcalc/312E72C8D4B790C916449F33EDABBFE3.cache.html b/common/static/js/capa/jsmolcalc/312E72C8D4B790C916449F33EDABBFE3.cache.html deleted file mode 100644 index 1a0a156629..0000000000 --- a/common/static/js/capa/jsmolcalc/312E72C8D4B790C916449F33EDABBFE3.cache.html +++ /dev/null @@ -1,2659 +0,0 @@ - - - - - - - diff --git a/common/static/js/capa/jsmolcalc/38E881215DD233AEE60236A5F07A6EFB.cache.html b/common/static/js/capa/jsmolcalc/38E881215DD233AEE60236A5F07A6EFB.cache.html deleted file mode 100644 index 742d01c649..0000000000 --- a/common/static/js/capa/jsmolcalc/38E881215DD233AEE60236A5F07A6EFB.cache.html +++ /dev/null @@ -1,2659 +0,0 @@ - - - - - - - diff --git a/common/static/js/capa/jsmolcalc/54670F2F197D551F9025F17D20D5419E.cache.html b/common/static/js/capa/jsmolcalc/54670F2F197D551F9025F17D20D5419E.cache.html deleted file mode 100644 index 4f18e1c5fa..0000000000 --- a/common/static/js/capa/jsmolcalc/54670F2F197D551F9025F17D20D5419E.cache.html +++ /dev/null @@ -1,2788 +0,0 @@ - - - - - - - diff --git a/common/static/js/capa/jsmolcalc/E160974BF5B466293C4DEE2B43671396.cache.html b/common/static/js/capa/jsmolcalc/E160974BF5B466293C4DEE2B43671396.cache.html deleted file mode 100644 index f8ec78aa40..0000000000 --- a/common/static/js/capa/jsmolcalc/E160974BF5B466293C4DEE2B43671396.cache.html +++ /dev/null @@ -1,2659 +0,0 @@ - - - - - - - diff --git a/common/static/js/capa/jsmolcalc/E9A1CFF73C3BB29B1FEC4755F49EF92F.cache.html b/common/static/js/capa/jsmolcalc/E9A1CFF73C3BB29B1FEC4755F49EF92F.cache.html deleted file mode 100644 index fe106dec65..0000000000 --- a/common/static/js/capa/jsmolcalc/E9A1CFF73C3BB29B1FEC4755F49EF92F.cache.html +++ /dev/null @@ -1,2631 +0,0 @@ - - - - - - - diff --git a/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js b/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js index aaa6f3d7af..3bdee52fb1 100644 --- a/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js +++ b/common/static/js/capa/jsmolcalc/jsmolcalc.nocache.js @@ -299,12 +299,12 @@ function jsmolcalc(){ $stats && $stats({moduleName:'jsmolcalc', sessionId:$sessionId_0, subSystem:'startup', evtGroup:'bootstrap', millis:(new Date).getTime(), type:'selectingPermutation'}); if (!isHostedMode()) { try { - unflattenKeylistIntoAnswers(['gecko1_8'], '1AEAC78BFB6BD40D743A1FCE21F4ED55'); - unflattenKeylistIntoAnswers(['ie6'], '312E72C8D4B790C916449F33EDABBFE3'); - unflattenKeylistIntoAnswers(['ie8'], '38E881215DD233AEE60236A5F07A6EFB'); - unflattenKeylistIntoAnswers(['safari'], '54670F2F197D551F9025F17D20D5419E'); - unflattenKeylistIntoAnswers(['ie9'], 'E160974BF5B466293C4DEE2B43671396'); - unflattenKeylistIntoAnswers(['opera'], 'E9A1CFF73C3BB29B1FEC4755F49EF92F'); + unflattenKeylistIntoAnswers(['ie6'], '2F6BC62FA9B71FB5EB318145F5D37E84'); + unflattenKeylistIntoAnswers(['ie8'], '468C0B0171166372F064D287492CBD1E'); + unflattenKeylistIntoAnswers(['gecko1_8'], 'C43483CC355E7BFB7BE2F45092922897'); + unflattenKeylistIntoAnswers(['safari'], 'E38BF09B489084CBFD0BF2CB8A77BFAC'); + unflattenKeylistIntoAnswers(['opera'], 'E8EDF03FE9C26D69E2C7DB17E15CF0ED'); + unflattenKeylistIntoAnswers(['ie9'], 'F8283183F9546F019176F75A8E25B0F0'); strongName = answers[computePropValue('user.agent')]; var idx = strongName.indexOf(':'); if (idx != -1) { From f9304a88cb486024224670c0f0c470f01af95f73 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Wed, 6 Feb 2013 09:15:24 -0500 Subject: [PATCH 199/347] Remove unneeded error type. --- common/lib/xmodule/xmodule/combined_open_ended_module.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index 7ecca35107..ed2e25ef01 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -54,10 +54,6 @@ HUMAN_TASK_TYPE = { 'openended' : "External Grader", } -class IncorrectMaxScoreError(Exception): - def __init__(self, msg): - self.msg = msg - class CombinedOpenEndedModule(XModule): """ This is a module that encapsulates all open ended grading (self assessment, peer assessment, etc). From 96eb16cd729ce65df69b3f70d4b8d95341d8a650 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Wed, 6 Feb 2013 10:08:20 -0500 Subject: [PATCH 200/347] Make local dev work by trying checking staticfiles_storage for both the course_prefixed and non-course_prefixed urls --- common/djangoapps/static_replace/__init__.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/common/djangoapps/static_replace/__init__.py b/common/djangoapps/static_replace/__init__.py index cfef798bdf..4833f5ef96 100644 --- a/common/djangoapps/static_replace/__init__.py +++ b/common/djangoapps/static_replace/__init__.py @@ -76,18 +76,19 @@ def replace_static_urls(text, data_directory, course_namespace=None): # course_namespace is not None, then use studio style urls if course_namespace is not None and not isinstance(modulestore(), XMLModuleStore): url = StaticContent.convert_legacy_static_url(rest, course_namespace) - # If we're in debug mode, and the file as requested exists, then don't change the links - elif (settings.DEBUG and finders.find(rest, True)): - return original - # Otherwise, look the file up in staticfiles_storage without the data directory + # Otherwise, look the file up in staticfiles_storage, and append the data directory if needed else: + course_path = "/".join((data_directory, rest)) try: - url = staticfiles_storage.url(rest) + if staticfiles_storage.exists(rest): + url = staticfiles_storage.url(rest) + else: + url = staticfiles_storage.url(course_path) # And if that fails, assume that it's course content, and add manually data directory except Exception as err: log.warning("staticfiles_storage couldn't find path {0}: {1}".format( rest, str(err))) - url = "".join([prefix, data_directory, '/', rest]) + url = "".join([prefix, course_path]) return "".join([quote, url, quote]) From 2302b40022384b37a82c59824f9c313920d7a6cb Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Wed, 6 Feb 2013 10:33:36 -0500 Subject: [PATCH 201/347] Fix static_replace tests --- .../test/test_static_replace.py | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/common/djangoapps/static_replace/test/test_static_replace.py b/common/djangoapps/static_replace/test/test_static_replace.py index e08c66c59f..63fc3eaa6a 100644 --- a/common/djangoapps/static_replace/test/test_static_replace.py +++ b/common/djangoapps/static_replace/test/test_static_replace.py @@ -24,15 +24,24 @@ def test_multi_replace(): ) -@patch('static_replace.finders') -@patch('static_replace.settings') -def test_debug_no_modify(mock_settings, mock_finders): - mock_settings.DEBUG = True - mock_finders.find.return_value = True +@patch('static_replace.staticfiles_storage') +def test_storage_url_exists(mock_storage): + mock_storage.exists.return_value = True + mock_storage.url.return_value = '/static/file.png' - assert_equals(STATIC_SOURCE, replace_static_urls(STATIC_SOURCE, DATA_DIRECTORY)) + assert_equals('"/static/file.png"', replace_static_urls(STATIC_SOURCE, DATA_DIRECTORY)) + mock_storage.exists.called_once_with('file.png') + mock_storage.url.called_once_with('data_dir/file.png') - mock_finders.find.assert_called_once_with('file.png', True) + +@patch('static_replace.staticfiles_storage') +def test_storage_url_not_exists(mock_storage): + mock_storage.exists.return_value = False + mock_storage.url.return_value = '/static/data_dir/file.png' + + assert_equals('"/static/data_dir/file.png"', replace_static_urls(STATIC_SOURCE, DATA_DIRECTORY)) + mock_storage.exists.called_once_with('file.png') + mock_storage.url.called_once_with('file.png') @patch('static_replace.StaticContent') @@ -58,7 +67,10 @@ def test_mongo_filestore(mock_modulestore, mock_static_content): @patch('static_replace.staticfiles_storage') def test_data_dir_fallback(mock_storage, mock_modulestore, mock_settings): mock_modulestore.return_value = Mock(XMLModuleStore) - mock_settings.DEBUG = False mock_storage.url.side_effect = Exception + mock_storage.exists.return_value = True + assert_equals('"/static/data_dir/file.png"', replace_static_urls(STATIC_SOURCE, DATA_DIRECTORY)) + + mock_storage.exists.return_value = False assert_equals('"/static/data_dir/file.png"', replace_static_urls(STATIC_SOURCE, DATA_DIRECTORY)) From b63c3c5a676242e6a9c42cc2ca094136d72143a0 Mon Sep 17 00:00:00 2001 From: Jay Zoldak Date: Fri, 1 Feb 2013 17:09:37 -0500 Subject: [PATCH 202/347] Change modulestore name and subclass TestCase --- .../contentstore/tests/factories.py | 46 ++++++++- .../contentstore/tests/test_contentstore.py | 94 +++++++++++++++++++ cms/envs/test.py | 7 +- 3 files changed, 143 insertions(+), 4 deletions(-) create mode 100644 cms/djangoapps/contentstore/tests/test_contentstore.py diff --git a/cms/djangoapps/contentstore/tests/factories.py b/cms/djangoapps/contentstore/tests/factories.py index cb9f451d38..e9a535f372 100644 --- a/cms/djangoapps/contentstore/tests/factories.py +++ b/cms/djangoapps/contentstore/tests/factories.py @@ -1,10 +1,52 @@ from factory import Factory -from xmodule.modulestore import Location -from xmodule.modulestore.django import modulestore +from datetime import datetime from time import gmtime from uuid import uuid4 +from student.models import (User, UserProfile, Registration, + CourseEnrollmentAllowed) +from django.contrib.auth.models import Group +from xmodule.modulestore import Location +from xmodule.modulestore.django import modulestore from xmodule.timeparse import stringify_time +class UserProfileFactory(Factory): + FACTORY_FOR = UserProfile + + user = None + name = 'Robot Studio' + courseware = 'course.xml' + +class RegistrationFactory(Factory): + FACTORY_FOR = Registration + + user = None + activation_key = uuid4().hex + +class UserFactory(Factory): + FACTORY_FOR = User + + username = 'robot' + email = 'robot@edx.org' + password = 'test' + first_name = 'Robot' + last_name = 'Tester' + is_staff = False + is_active = True + is_superuser = False + last_login = datetime.now() + date_joined = datetime.now() + +class GroupFactory(Factory): + FACTORY_FOR = Group + + name = 'test_group' + +class CourseEnrollmentAllowedFactory(Factory): + FACTORY_FOR = CourseEnrollmentAllowed + + email = 'test@edx.org' + course_id = 'edX/test/2012_Fall' + def XMODULE_COURSE_CREATION(class_to_create, **kwargs): return XModuleCourseFactory._create(class_to_create, **kwargs) diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py new file mode 100644 index 0000000000..cc37d201a1 --- /dev/null +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -0,0 +1,94 @@ +import json +import shutil +from django.test import TestCase +from django.test.client import Client +from override_settings import override_settings +from django.conf import settings +from django.core.urlresolvers import reverse +from path import path +import json +from fs.osfs import OSFS +import copy +from mock import Mock + +import xmodule.modulestore.django +from factories import * + +# Subclass TestCase and use to initialize the contentstore +class CmsTestCase(TestCase): + + def _pre_setup(self): + super(CmsTestCase, self)._pre_setup() + # Flush and initialize the module store + # It needs the templates because it creates new records + # by cloning from the template. + # Note that if your test module gets in some weird state + # (though it shouldn't), do this manually + # from the bash shell to drop it: + # $ mongo test_xmodule --eval "db.dropDatabase()" + xmodule.modulestore.django._MODULESTORES = {} + xmodule.modulestore.django.modulestore().collection.drop() + xmodule.templates.update_templates() + + def _post_teardown(self): + # Make sure you flush out the test modulestore after the end + # of the last test because otherwise on the next run + # cms/djangoapps/contentstore/__init__.py + # update_templates() will try to update the templates + # via upsert and it sometimes seems to be messing things up. + xmodule.modulestore.django._MODULESTORES = {} + xmodule.modulestore.django.modulestore().collection.drop() + super(CmsTestCase, self)._post_teardown() + +def parse_json(response): + """Parse response, which is assumed to be json""" + return json.loads(response.content) + +TEST_DATA_MODULESTORE = copy.deepcopy(settings.MODULESTORE) +TEST_DATA_MODULESTORE['default']['OPTIONS']['fs_root'] = path('common/test/data') +TEST_DATA_MODULESTORE['direct']['OPTIONS']['fs_root'] = path('common/test/data') + +@override_settings(MODULESTORE=TEST_DATA_MODULESTORE) +class NewContentStoreTest(CmsTestCase): + + def setUp(self): + # super(NewContentStoreTest, self).setUp() + uname = 'testuser' + email = 'test+courses@edx.org' + password = 'foo' + + # Create the use so we can log them in. + self.user = User.objects.create_user(uname, email, password) + + # Note that we do not actually need to do anything + # for registration if we directly mark them active. + self.user.is_active = True + # Staff has access to view all courses + self.user.is_staff = True + self.user.save() + + # user = UserFactory(username=uname, email=email, password=password, + # is_staff=True, is_active=True) + # user.is_authenticated= Mock(return_value=True) + + + self.client = Client() + self.client.login(username=uname, password=password) + + self.course_data = { + 'template': 'i4x://edx/templates/course/Empty', + 'org': 'MITx', + 'number': '999', + 'display_name': 'Robot Super Course', + } + + def tearDown(self): + # super(NewContentStoreTest, self).tearDown() + pass + + def test_create_course(self): + """Test new course creation - happy path""" + resp = self.client.post(reverse('create_new_course'), self.course_data) + self.assertEqual(resp.status_code, 200) + data = parse_json(resp) + self.assertEqual(data['id'], 'i4x://MITx/999/course/Robot_Super_Course') diff --git a/cms/envs/test.py b/cms/envs/test.py index d9a2597cbb..436aa2189e 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -10,7 +10,7 @@ sessions. Assumes structure: from .common import * import os from path import path - +from time import time # Nose Test Runner INSTALLED_APPS += ('django_nose',) @@ -39,11 +39,14 @@ STATICFILES_DIRS += [ if os.path.isdir(COMMON_TEST_DATA_ROOT / course_dir) ] +# Use the current seconds since epoch to differentiate +# the mongo collections on jenkins. +sec_since_epoch = '%s' % int(time()*100) modulestore_options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'host': 'localhost', 'db': 'test_xmodule', - 'collection': 'modulestore', + 'collection': 'modulestore_%s' % sec_since_epoch, 'fs_root': GITHUB_REPO_ROOT, 'render_template': 'mitxmako.shortcuts.render_to_string', } From b329b0ea42447cfb23a082a0860bfabdb46155af Mon Sep 17 00:00:00 2001 From: Jay Zoldak Date: Sat, 2 Feb 2013 15:53:30 -0500 Subject: [PATCH 203/347] Remove toy dbs from CMS test settings.py file as they are not used. --- cms/envs/test.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/cms/envs/test.py b/cms/envs/test.py index 436aa2189e..c22965d748 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -75,17 +75,6 @@ DATABASES = { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ENV_ROOT / "db" / "cms.db", }, - - # The following are for testing purposes... - 'edX/toy/2012_Fall': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': ENV_ROOT / "db" / "course1.db", - }, - - 'edx/full/6.002_Spring_2012': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': ENV_ROOT / "db" / "course2.db", - } } LMS_BASE = "localhost:8000" From 2c5a7ccdf701aca7890b9b8cbf8fde1669912d1a Mon Sep 17 00:00:00 2001 From: Jay Zoldak Date: Sat, 2 Feb 2013 16:39:46 -0500 Subject: [PATCH 204/347] Rearrange factories and clean up imports --- .../contentstore/tests/factories.py | 115 ----------------- cms/djangoapps/contentstore/tests/tests.py | 33 ++--- .../xmodule/modulestore/tests/factories.py | 117 ++++++++++++++++++ 3 files changed, 135 insertions(+), 130 deletions(-) create mode 100644 common/lib/xmodule/xmodule/modulestore/tests/factories.py diff --git a/cms/djangoapps/contentstore/tests/factories.py b/cms/djangoapps/contentstore/tests/factories.py index e9a535f372..f9c505d68f 100644 --- a/cms/djangoapps/contentstore/tests/factories.py +++ b/cms/djangoapps/contentstore/tests/factories.py @@ -1,13 +1,9 @@ from factory import Factory from datetime import datetime -from time import gmtime from uuid import uuid4 from student.models import (User, UserProfile, Registration, CourseEnrollmentAllowed) from django.contrib.auth.models import Group -from xmodule.modulestore import Location -from xmodule.modulestore.django import modulestore -from xmodule.timeparse import stringify_time class UserProfileFactory(Factory): FACTORY_FOR = UserProfile @@ -46,114 +42,3 @@ class CourseEnrollmentAllowedFactory(Factory): email = 'test@edx.org' course_id = 'edX/test/2012_Fall' - - -def XMODULE_COURSE_CREATION(class_to_create, **kwargs): - return XModuleCourseFactory._create(class_to_create, **kwargs) - -def XMODULE_ITEM_CREATION(class_to_create, **kwargs): - return XModuleItemFactory._create(class_to_create, **kwargs) - -class XModuleCourseFactory(Factory): - """ - Factory for XModule courses. - """ - - ABSTRACT_FACTORY = True - _creation_function = (XMODULE_COURSE_CREATION,) - - @classmethod - def _create(cls, target_class, *args, **kwargs): - - template = Location('i4x', 'edx', 'templates', 'course', 'Empty') - org = kwargs.get('org') - number = kwargs.get('number') - display_name = kwargs.get('display_name') - location = Location('i4x', org, number, - 'course', Location.clean(display_name)) - - store = modulestore('direct') - - # Write the data to the mongo datastore - new_course = store.clone_item(template, location) - - # This metadata code was copied from cms/djangoapps/contentstore/views.py - if display_name is not None: - new_course.metadata['display_name'] = display_name - - new_course.metadata['data_dir'] = uuid4().hex - new_course.metadata['start'] = stringify_time(gmtime()) - new_course.tabs = [{"type": "courseware"}, - {"type": "course_info", "name": "Course Info"}, - {"type": "discussion", "name": "Discussion"}, - {"type": "wiki", "name": "Wiki"}, - {"type": "progress", "name": "Progress"}] - - # Update the data in the mongo datastore - store.update_metadata(new_course.location.url(), new_course.own_metadata) - - return new_course - -class Course: - pass - -class CourseFactory(XModuleCourseFactory): - FACTORY_FOR = Course - - template = 'i4x://edx/templates/course/Empty' - org = 'MITx' - number = '999' - display_name = 'Robot Super Course' - -class XModuleItemFactory(Factory): - """ - Factory for XModule items. - """ - - ABSTRACT_FACTORY = True - _creation_function = (XMODULE_ITEM_CREATION,) - - @classmethod - def _create(cls, target_class, *args, **kwargs): - """ - kwargs must include parent_location, template. Can contain display_name - target_class is ignored - """ - - DETACHED_CATEGORIES = ['about', 'static_tab', 'course_info'] - - parent_location = Location(kwargs.get('parent_location')) - template = Location(kwargs.get('template')) - display_name = kwargs.get('display_name') - - store = modulestore('direct') - - # This code was based off that in cms/djangoapps/contentstore/views.py - parent = store.get_item(parent_location) - dest_location = parent_location._replace(category=template.category, name=uuid4().hex) - - new_item = store.clone_item(template, dest_location) - - # TODO: This needs to be deleted when we have proper storage for static content - new_item.metadata['data_dir'] = parent.metadata['data_dir'] - - # replace the display name with an optional parameter passed in from the caller - if display_name is not None: - new_item.metadata['display_name'] = display_name - - store.update_metadata(new_item.location.url(), new_item.own_metadata) - - if new_item.location.category not in DETACHED_CATEGORIES: - store.update_children(parent_location, parent.definition.get('children', []) + [new_item.location.url()]) - - return new_item - -class Item: - pass - -class ItemFactory(XModuleItemFactory): - FACTORY_FOR = Item - - parent_location = 'i4x://MITx/999/course/Robot_Super_Course' - template = 'i4x://edx/templates/chapter/Empty' - display_name = 'Section One' \ No newline at end of file diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py index 085ecebff1..0727cb68dd 100644 --- a/cms/djangoapps/contentstore/tests/tests.py +++ b/cms/djangoapps/contentstore/tests/tests.py @@ -9,23 +9,26 @@ from path import path from tempfile import mkdtemp import json from fs.osfs import OSFS - +import copy from student.models import Registration from django.contrib.auth.models import User -import xmodule.modulestore.django -from xmodule.modulestore.xml_importer import import_from_xml -import copy -from factories import * +from cms.djangoapps.contentstore.utils import get_modulestore +from xmodule.modulestore import Location from xmodule.modulestore.store_utilities import clone_course from xmodule.modulestore.store_utilities import delete_course -from xmodule.modulestore.django import modulestore +from xmodule.modulestore.django import modulestore, _MODULESTORES from xmodule.contentstore.django import contentstore -from xmodule.course_module import CourseDescriptor +from xmodule.templates import update_templates from xmodule.modulestore.xml_exporter import export_to_xml -from cms.djangoapps.contentstore.utils import get_modulestore +from xmodule.modulestore.xml_importer import import_from_xml + from xmodule.capa_module import CapaDescriptor +from xmodule.course_module import CourseDescriptor +from xmodule.seq_module import SequenceDescriptor + +from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory def parse_json(response): """Parse response, which is assumed to be json""" @@ -217,9 +220,9 @@ class ContentStoreTest(TestCase): # (though it shouldn't), do this manually # from the bash shell to drop it: # $ mongo test_xmodule --eval "db.dropDatabase()" - xmodule.modulestore.django._MODULESTORES = {} - xmodule.modulestore.django.modulestore().collection.drop() - xmodule.templates.update_templates() + _MODULESTORES = {} + modulestore().collection.drop() + update_templates() self.client = Client() self.client.login(username=uname, password=password) @@ -237,8 +240,8 @@ class ContentStoreTest(TestCase): # cms/djangoapps/contentstore/__init__.py # update_templates() will try to update the templates # via upsert and it sometimes seems to be messing things up. - xmodule.modulestore.django._MODULESTORES = {} - xmodule.modulestore.django.modulestore().collection.drop() + _MODULESTORES = {} + modulestore().collection.drop() def test_create_course(self): """Test new course creation - happy path""" @@ -288,12 +291,12 @@ class ContentStoreTest(TestCase): def test_course_factory(self): course = CourseFactory.create() - self.assertIsInstance(course, xmodule.course_module.CourseDescriptor) + self.assertIsInstance(course, CourseDescriptor) def test_item_factory(self): course = CourseFactory.create() item = ItemFactory.create(parent_location=course.location) - self.assertIsInstance(item, xmodule.seq_module.SequenceDescriptor) + self.assertIsInstance(item, SequenceDescriptor) def test_course_index_view_with_course(self): """Test viewing the index page with an existing course""" diff --git a/common/lib/xmodule/xmodule/modulestore/tests/factories.py b/common/lib/xmodule/xmodule/modulestore/tests/factories.py new file mode 100644 index 0000000000..987dbca09b --- /dev/null +++ b/common/lib/xmodule/xmodule/modulestore/tests/factories.py @@ -0,0 +1,117 @@ +from factory import Factory +# from datetime import datetime +from time import gmtime +from uuid import uuid4 +from xmodule.modulestore import Location +from xmodule.modulestore.django import modulestore +from xmodule.timeparse import stringify_time + +def XMODULE_COURSE_CREATION(class_to_create, **kwargs): + return XModuleCourseFactory._create(class_to_create, **kwargs) + +def XMODULE_ITEM_CREATION(class_to_create, **kwargs): + return XModuleItemFactory._create(class_to_create, **kwargs) + +class XModuleCourseFactory(Factory): + """ + Factory for XModule courses. + """ + + ABSTRACT_FACTORY = True + _creation_function = (XMODULE_COURSE_CREATION,) + + @classmethod + def _create(cls, target_class, *args, **kwargs): + + template = Location('i4x', 'edx', 'templates', 'course', 'Empty') + org = kwargs.get('org') + number = kwargs.get('number') + display_name = kwargs.get('display_name') + location = Location('i4x', org, number, + 'course', Location.clean(display_name)) + + store = modulestore('direct') + + # Write the data to the mongo datastore + new_course = store.clone_item(template, location) + + # This metadata code was copied from cms/djangoapps/contentstore/views.py + if display_name is not None: + new_course.metadata['display_name'] = display_name + + new_course.metadata['data_dir'] = uuid4().hex + new_course.metadata['start'] = stringify_time(gmtime()) + new_course.tabs = [{"type": "courseware"}, + {"type": "course_info", "name": "Course Info"}, + {"type": "discussion", "name": "Discussion"}, + {"type": "wiki", "name": "Wiki"}, + {"type": "progress", "name": "Progress"}] + + # Update the data in the mongo datastore + store.update_metadata(new_course.location.url(), new_course.own_metadata) + + return new_course + +class Course: + pass + +class CourseFactory(XModuleCourseFactory): + FACTORY_FOR = Course + + template = 'i4x://edx/templates/course/Empty' + org = 'MITx' + number = '999' + display_name = 'Robot Super Course' + +class XModuleItemFactory(Factory): + """ + Factory for XModule items. + """ + + ABSTRACT_FACTORY = True + _creation_function = (XMODULE_ITEM_CREATION,) + + @classmethod + def _create(cls, target_class, *args, **kwargs): + """ + kwargs must include parent_location, template. Can contain display_name + target_class is ignored + """ + + DETACHED_CATEGORIES = ['about', 'static_tab', 'course_info'] + + parent_location = Location(kwargs.get('parent_location')) + template = Location(kwargs.get('template')) + display_name = kwargs.get('display_name') + + store = modulestore('direct') + + # This code was based off that in cms/djangoapps/contentstore/views.py + parent = store.get_item(parent_location) + dest_location = parent_location._replace(category=template.category, name=uuid4().hex) + + new_item = store.clone_item(template, dest_location) + + # TODO: This needs to be deleted when we have proper storage for static content + new_item.metadata['data_dir'] = parent.metadata['data_dir'] + + # replace the display name with an optional parameter passed in from the caller + if display_name is not None: + new_item.metadata['display_name'] = display_name + + store.update_metadata(new_item.location.url(), new_item.own_metadata) + + if new_item.location.category not in DETACHED_CATEGORIES: + store.update_children(parent_location, parent.definition.get('children', []) + [new_item.location.url()]) + + return new_item + +class Item: + pass + +class ItemFactory(XModuleItemFactory): + FACTORY_FOR = Item + + parent_location = 'i4x://MITx/999/course/Robot_Super_Course' + template = 'i4x://edx/templates/chapter/Empty' + display_name = 'Section One' \ No newline at end of file From 5a6b03920806fa83575238930cd9eb7bdc2a2abe Mon Sep 17 00:00:00 2001 From: Jay Zoldak Date: Sat, 2 Feb 2013 22:29:40 -0500 Subject: [PATCH 205/347] Reorganize the CmsTestCase subclass --- cms/djangoapps/contentstore/tests/tests.py | 23 ++-------------- cms/djangoapps/contentstore/tests/utils.py | 32 ++++++++++++++++++++++ 2 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 cms/djangoapps/contentstore/tests/utils.py diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py index 0727cb68dd..f41492a56e 100644 --- a/cms/djangoapps/contentstore/tests/tests.py +++ b/cms/djangoapps/contentstore/tests/tests.py @@ -29,6 +29,7 @@ from xmodule.course_module import CourseDescriptor from xmodule.seq_module import SequenceDescriptor from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory +from .utils import CmsTestCase def parse_json(response): """Parse response, which is assumed to be json""" @@ -196,7 +197,7 @@ TEST_DATA_MODULESTORE['default']['OPTIONS']['fs_root'] = path('common/test/data' TEST_DATA_MODULESTORE['direct']['OPTIONS']['fs_root'] = path('common/test/data') @override_settings(MODULESTORE=TEST_DATA_MODULESTORE) -class ContentStoreTest(TestCase): +class ContentStoreTest(CmsTestCase): def setUp(self): uname = 'testuser' @@ -213,17 +214,6 @@ class ContentStoreTest(TestCase): self.user.is_staff = True self.user.save() - # Flush and initialize the module store - # It needs the templates because it creates new records - # by cloning from the template. - # Note that if your test module gets in some weird state - # (though it shouldn't), do this manually - # from the bash shell to drop it: - # $ mongo test_xmodule --eval "db.dropDatabase()" - _MODULESTORES = {} - modulestore().collection.drop() - update_templates() - self.client = Client() self.client.login(username=uname, password=password) @@ -234,15 +224,6 @@ class ContentStoreTest(TestCase): 'display_name': 'Robot Super Course', } - def tearDown(self): - # Make sure you flush out the test modulestore after the end - # of the last test because otherwise on the next run - # cms/djangoapps/contentstore/__init__.py - # update_templates() will try to update the templates - # via upsert and it sometimes seems to be messing things up. - _MODULESTORES = {} - modulestore().collection.drop() - def test_create_course(self): """Test new course creation - happy path""" resp = self.client.post(reverse('create_new_course'), self.course_data) diff --git a/cms/djangoapps/contentstore/tests/utils.py b/cms/djangoapps/contentstore/tests/utils.py new file mode 100644 index 0000000000..c800ee936c --- /dev/null +++ b/cms/djangoapps/contentstore/tests/utils.py @@ -0,0 +1,32 @@ +from django.test import TestCase +from xmodule.modulestore.django import modulestore, _MODULESTORES +from xmodule.templates import update_templates + +# Subclass TestCase and use to initialize the contentstore +class CmsTestCase(TestCase): + """ Subclass for any test case that uses the mongodb + module store. This clears it out before running the TestCase + and reinitilizes it with the templates afterwards. """ + + def _pre_setup(self): + super(CmsTestCase, self)._pre_setup() + # Flush and initialize the module store + # It needs the templates because it creates new records + # by cloning from the template. + # Note that if your test module gets in some weird state + # (though it shouldn't), do this manually + # from the bash shell to drop it: + # $ mongo test_xmodule --eval "db.dropDatabase()" + _MODULESTORES = {} + modulestore().collection.drop() + update_templates() + + def _post_teardown(self): + # Make sure you flush out the test modulestore after the end + # of the last test because otherwise on the next run + # cms/djangoapps/contentstore/__init__.py + # update_templates() will try to update the templates + # via upsert and it sometimes seems to be messing things up. + _MODULESTORES = {} + modulestore().collection.drop() + super(CmsTestCase, self)._post_teardown() \ No newline at end of file From 3324615270cee928055148a64b579dbb06e43129 Mon Sep 17 00:00:00 2001 From: Jay Zoldak Date: Mon, 4 Feb 2013 08:26:21 -0500 Subject: [PATCH 206/347] Reorganize test cases --- .../contentstore/tests/test_contentstore.py | 334 +++++++++++++++--- cms/djangoapps/contentstore/tests/tests.py | 333 ----------------- 2 files changed, 293 insertions(+), 374 deletions(-) diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index cc37d201a1..a417418410 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -13,46 +13,16 @@ from mock import Mock import xmodule.modulestore.django from factories import * - -# Subclass TestCase and use to initialize the contentstore -class CmsTestCase(TestCase): - - def _pre_setup(self): - super(CmsTestCase, self)._pre_setup() - # Flush and initialize the module store - # It needs the templates because it creates new records - # by cloning from the template. - # Note that if your test module gets in some weird state - # (though it shouldn't), do this manually - # from the bash shell to drop it: - # $ mongo test_xmodule --eval "db.dropDatabase()" - xmodule.modulestore.django._MODULESTORES = {} - xmodule.modulestore.django.modulestore().collection.drop() - xmodule.templates.update_templates() - - def _post_teardown(self): - # Make sure you flush out the test modulestore after the end - # of the last test because otherwise on the next run - # cms/djangoapps/contentstore/__init__.py - # update_templates() will try to update the templates - # via upsert and it sometimes seems to be messing things up. - xmodule.modulestore.django._MODULESTORES = {} - xmodule.modulestore.django.modulestore().collection.drop() - super(CmsTestCase, self)._post_teardown() - -def parse_json(response): - """Parse response, which is assumed to be json""" - return json.loads(response.content) +from utils import CmsTestCase TEST_DATA_MODULESTORE = copy.deepcopy(settings.MODULESTORE) TEST_DATA_MODULESTORE['default']['OPTIONS']['fs_root'] = path('common/test/data') TEST_DATA_MODULESTORE['direct']['OPTIONS']['fs_root'] = path('common/test/data') @override_settings(MODULESTORE=TEST_DATA_MODULESTORE) -class NewContentStoreTest(CmsTestCase): +class ContentStoreTest(CmsTestCase): def setUp(self): - # super(NewContentStoreTest, self).setUp() uname = 'testuser' email = 'test+courses@edx.org' password = 'foo' @@ -67,11 +37,6 @@ class NewContentStoreTest(CmsTestCase): self.user.is_staff = True self.user.save() - # user = UserFactory(username=uname, email=email, password=password, - # is_staff=True, is_active=True) - # user.is_authenticated= Mock(return_value=True) - - self.client = Client() self.client.login(username=uname, password=password) @@ -82,13 +47,300 @@ class NewContentStoreTest(CmsTestCase): 'display_name': 'Robot Super Course', } - def tearDown(self): - # super(NewContentStoreTest, self).tearDown() - pass - def test_create_course(self): """Test new course creation - happy path""" resp = self.client.post(reverse('create_new_course'), self.course_data) self.assertEqual(resp.status_code, 200) data = parse_json(resp) self.assertEqual(data['id'], 'i4x://MITx/999/course/Robot_Super_Course') + + def test_create_course_duplicate_course(self): + """Test new course creation - error path""" + resp = self.client.post(reverse('create_new_course'), self.course_data) + resp = self.client.post(reverse('create_new_course'), self.course_data) + data = parse_json(resp) + self.assertEqual(resp.status_code, 200) + self.assertEqual(data['ErrMsg'], 'There is already a course defined with this name.') + + def test_create_course_duplicate_number(self): + """Test new course creation - error path""" + resp = self.client.post(reverse('create_new_course'), self.course_data) + self.course_data['display_name'] = 'Robot Super Course Two' + + resp = self.client.post(reverse('create_new_course'), self.course_data) + data = parse_json(resp) + + self.assertEqual(resp.status_code, 200) + self.assertEqual(data['ErrMsg'], + 'There is already a course defined with the same organization and course number.') + + def test_create_course_with_bad_organization(self): + """Test new course creation - error path for bad organization name""" + self.course_data['org'] = 'University of California, Berkeley' + resp = self.client.post(reverse('create_new_course'), self.course_data) + data = parse_json(resp) + + self.assertEqual(resp.status_code, 200) + self.assertEqual(data['ErrMsg'], + "Unable to create course 'Robot Super Course'.\n\nInvalid characters in 'University of California, Berkeley'.") + + def test_course_index_view_with_no_courses(self): + """Test viewing the index page with no courses""" + # Create a course so there is something to view + resp = self.client.get(reverse('index')) + self.assertContains(resp, + '

          My Courses

          ', + status_code=200, + html=True) + + def test_course_factory(self): + course = CourseFactory.create() + self.assertIsInstance(course, CourseDescriptor) + + def test_item_factory(self): + course = CourseFactory.create() + item = ItemFactory.create(parent_location=course.location) + self.assertIsInstance(item, SequenceDescriptor) + + def test_course_index_view_with_course(self): + """Test viewing the index page with an existing course""" + CourseFactory.create(display_name='Robot Super Educational Course') + resp = self.client.get(reverse('index')) + self.assertContains(resp, + 'Robot Super Educational Course', + status_code=200, + html=True) + + def test_course_overview_view_with_course(self): + """Test viewing the course overview page with an existing course""" + CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') + + data = { + 'org': 'MITx', + 'course': '999', + 'name': Location.clean('Robot Super Course'), + } + + resp = self.client.get(reverse('course_index', kwargs=data)) + self.assertContains(resp, + '
          Robot Super Course', + status_code=200, + html=True) + + def test_clone_item(self): + """Test cloning an item. E.g. creating a new section""" + CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') + + section_data = { + 'parent_location' : 'i4x://MITx/999/course/Robot_Super_Course', + 'template' : 'i4x://edx/templates/chapter/Empty', + 'display_name': 'Section One', + } + + resp = self.client.post(reverse('clone_item'), section_data) + + self.assertEqual(resp.status_code, 200) + data = parse_json(resp) + self.assertRegexpMatches(data['id'], + '^i4x:\/\/MITx\/999\/chapter\/([0-9]|[a-f]){32}$') + + def check_edit_unit(self, test_course_name): + import_from_xml(modulestore(), 'common/test/data/', [test_course_name]) + + for descriptor in modulestore().get_items(Location(None, None, 'vertical', None, None)): + print "Checking ", descriptor.location.url() + print descriptor.__class__, descriptor.location + resp = self.client.get(reverse('edit_unit', kwargs={'location': descriptor.location.url()})) + self.assertEqual(resp.status_code, 200) + + def test_edit_unit_toy(self): + self.check_edit_unit('toy') + + def test_edit_unit_full(self): + self.check_edit_unit('full') + + def test_static_tab_reordering(self): + import_from_xml(modulestore(), 'common/test/data/', ['full']) + + ms = modulestore('direct') + course = ms.get_item(Location(['i4x','edX','full','course','6.002_Spring_2012', None])) + + # reverse the ordering + reverse_tabs = [] + for tab in course.tabs: + if tab['type'] == 'static_tab': + reverse_tabs.insert(0, 'i4x://edX/full/static_tab/{0}'.format(tab['url_slug'])) + + resp = self.client.post(reverse('reorder_static_tabs'), json.dumps({'tabs':reverse_tabs}), "application/json") + + course = ms.get_item(Location(['i4x','edX','full','course','6.002_Spring_2012', None])) + + # compare to make sure that the tabs information is in the expected order after the server call + course_tabs = [] + for tab in course.tabs: + if tab['type'] == 'static_tab': + course_tabs.append('i4x://edX/full/static_tab/{0}'.format(tab['url_slug'])) + + self.assertEqual(reverse_tabs, course_tabs) + + + + + def test_about_overrides(self): + ''' + This test case verifies that a course can use specialized override for about data, e.g. /about/Fall_2012/effort.html + while there is a base definition in /about/effort.html + ''' + import_from_xml(modulestore(), 'common/test/data/', ['full']) + ms = modulestore('direct') + effort = ms.get_item(Location(['i4x','edX','full','about','effort', None])) + self.assertEqual(effort.definition['data'],'6 hours') + + # this one should be in a non-override folder + effort = ms.get_item(Location(['i4x','edX','full','about','end_date', None])) + self.assertEqual(effort.definition['data'],'TBD') + + def test_remove_hide_progress_tab(self): + import_from_xml(modulestore(), 'common/test/data/', ['full']) + + ms = modulestore('direct') + cs = contentstore() + + source_location = CourseDescriptor.id_to_location('edX/full/6.002_Spring_2012') + course = ms.get_item(source_location) + self.assertNotIn('hide_progress_tab', course.metadata) + + + def test_clone_course(self): + import_from_xml(modulestore(), 'common/test/data/', ['full']) + + resp = self.client.post(reverse('create_new_course'), self.course_data) + self.assertEqual(resp.status_code, 200) + data = parse_json(resp) + self.assertEqual(data['id'], 'i4x://MITx/999/course/Robot_Super_Course') + + ms = modulestore('direct') + cs = contentstore() + + source_location = CourseDescriptor.id_to_location('edX/full/6.002_Spring_2012') + dest_location = CourseDescriptor.id_to_location('MITx/999/Robot_Super_Course') + + clone_course(ms, cs, source_location, dest_location) + + # now loop through all the units in the course and verify that the clone can render them, which + # means the objects are at least present + items = ms.get_items(Location(['i4x','edX', 'full', 'vertical', None])) + self.assertGreater(len(items), 0) + clone_items = ms.get_items(Location(['i4x', 'MITx','999','vertical', None])) + self.assertGreater(len(clone_items), 0) + for descriptor in items: + new_loc = descriptor.location._replace(org = 'MITx', course='999') + print "Checking {0} should now also be at {1}".format(descriptor.location.url(), new_loc.url()) + resp = self.client.get(reverse('edit_unit', kwargs={'location': new_loc.url()})) + self.assertEqual(resp.status_code, 200) + + def test_delete_course(self): + import_from_xml(modulestore(), 'common/test/data/', ['full']) + + ms = modulestore('direct') + cs = contentstore() + + location = CourseDescriptor.id_to_location('edX/full/6.002_Spring_2012') + + delete_course(ms, cs, location) + + items = ms.get_items(Location(['i4x','edX', 'full', 'vertical', None])) + self.assertEqual(len(items), 0) + + def verify_content_existence(self, modulestore, root_dir, location, dirname, category_name, filename_suffix=''): + fs = OSFS(root_dir / 'test_export') + self.assertTrue(fs.exists(dirname)) + + query_loc = Location('i4x', location.org, location.course, category_name, None) + items = modulestore.get_items(query_loc) + + for item in items: + fs = OSFS(root_dir / ('test_export/' + dirname)) + self.assertTrue(fs.exists(item.location.name + filename_suffix)) + + def test_export_course(self): + ms = modulestore('direct') + cs = contentstore() + + import_from_xml(ms, 'common/test/data/', ['full']) + location = CourseDescriptor.id_to_location('edX/full/6.002_Spring_2012') + + root_dir = path(mkdtemp()) + + print 'Exporting to tempdir = {0}'.format(root_dir) + + # export out to a tempdir + export_to_xml(ms, cs, location, root_dir, 'test_export') + + # check for static tabs + self.verify_content_existence(ms, root_dir, location, 'tabs', 'static_tab', '.html') + + # check for custom_tags + self.verify_content_existence(ms, root_dir, location, 'info', 'course_info', '.html') + + # check for custom_tags + self.verify_content_existence(ms, root_dir, location, 'custom_tags', 'custom_tag_template') + + + # remove old course + delete_course(ms, cs, location) + + # reimport + import_from_xml(ms, root_dir, ['test_export']) + + items = ms.get_items(Location(['i4x','edX', 'full', 'vertical', None])) + self.assertGreater(len(items), 0) + for descriptor in items: + print "Checking {0}....".format(descriptor.location.url()) + resp = self.client.get(reverse('edit_unit', kwargs={'location': descriptor.location.url()})) + self.assertEqual(resp.status_code, 200) + + shutil.rmtree(root_dir) + + + def test_course_handouts_rewrites(self): + ms = modulestore('direct') + cs = contentstore() + + # import a test course + import_from_xml(ms, 'common/test/data/', ['full']) + + handout_location= Location(['i4x', 'edX', 'full', 'course_info', 'handouts']) + + # get module info + resp = self.client.get(reverse('module_info', kwargs={'module_location': handout_location})) + + # make sure we got a successful response + self.assertEqual(resp.status_code, 200) + + # check that /static/ has been converted to the full path + # note, we know the link it should be because that's what in the 'full' course in the test data + self.assertContains(resp, '/c4x/edX/full/asset/handouts_schematic_tutorial.pdf') + + + def test_capa_module(self): + """Test that a problem treats markdown specially.""" + CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') + + problem_data = { + 'parent_location' : 'i4x://MITx/999/course/Robot_Super_Course', + 'template' : 'i4x://edx/templates/problem/Empty' + } + + resp = self.client.post(reverse('clone_item'), problem_data) + + self.assertEqual(resp.status_code, 200) + payload = parse_json(resp) + problem_loc = payload['id'] + problem = get_modulestore(problem_loc).get_item(problem_loc) + # should be a CapaDescriptor + self.assertIsInstance(problem, CapaDescriptor, "New problem is not a CapaDescriptor") + context = problem.get_context() + self.assertIn('markdown', context, "markdown is missing from context") + self.assertIn('markdown', problem.metadata, "markdown is missing from metadata") + self.assertNotIn('markdown', problem.editable_metadata_fields, "Markdown slipped into the editable metadata fields") diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py index f41492a56e..8c8ee07264 100644 --- a/cms/djangoapps/contentstore/tests/tests.py +++ b/cms/djangoapps/contentstore/tests/tests.py @@ -191,336 +191,3 @@ class AuthTestCase(ContentStoreTestCase): self.assertEqual(resp.status_code, 302) # Logged in should work. - -TEST_DATA_MODULESTORE = copy.deepcopy(settings.MODULESTORE) -TEST_DATA_MODULESTORE['default']['OPTIONS']['fs_root'] = path('common/test/data') -TEST_DATA_MODULESTORE['direct']['OPTIONS']['fs_root'] = path('common/test/data') - -@override_settings(MODULESTORE=TEST_DATA_MODULESTORE) -class ContentStoreTest(CmsTestCase): - - def setUp(self): - uname = 'testuser' - email = 'test+courses@edx.org' - password = 'foo' - - # Create the use so we can log them in. - self.user = User.objects.create_user(uname, email, password) - - # Note that we do not actually need to do anything - # for registration if we directly mark them active. - self.user.is_active = True - # Staff has access to view all courses - self.user.is_staff = True - self.user.save() - - self.client = Client() - self.client.login(username=uname, password=password) - - self.course_data = { - 'template': 'i4x://edx/templates/course/Empty', - 'org': 'MITx', - 'number': '999', - 'display_name': 'Robot Super Course', - } - - def test_create_course(self): - """Test new course creation - happy path""" - resp = self.client.post(reverse('create_new_course'), self.course_data) - self.assertEqual(resp.status_code, 200) - data = parse_json(resp) - self.assertEqual(data['id'], 'i4x://MITx/999/course/Robot_Super_Course') - - def test_create_course_duplicate_course(self): - """Test new course creation - error path""" - resp = self.client.post(reverse('create_new_course'), self.course_data) - resp = self.client.post(reverse('create_new_course'), self.course_data) - data = parse_json(resp) - self.assertEqual(resp.status_code, 200) - self.assertEqual(data['ErrMsg'], 'There is already a course defined with this name.') - - def test_create_course_duplicate_number(self): - """Test new course creation - error path""" - resp = self.client.post(reverse('create_new_course'), self.course_data) - self.course_data['display_name'] = 'Robot Super Course Two' - - resp = self.client.post(reverse('create_new_course'), self.course_data) - data = parse_json(resp) - - self.assertEqual(resp.status_code, 200) - self.assertEqual(data['ErrMsg'], - 'There is already a course defined with the same organization and course number.') - - def test_create_course_with_bad_organization(self): - """Test new course creation - error path for bad organization name""" - self.course_data['org'] = 'University of California, Berkeley' - resp = self.client.post(reverse('create_new_course'), self.course_data) - data = parse_json(resp) - - self.assertEqual(resp.status_code, 200) - self.assertEqual(data['ErrMsg'], - "Unable to create course 'Robot Super Course'.\n\nInvalid characters in 'University of California, Berkeley'.") - - def test_course_index_view_with_no_courses(self): - """Test viewing the index page with no courses""" - # Create a course so there is something to view - resp = self.client.get(reverse('index')) - self.assertContains(resp, - '

          My Courses

          ', - status_code=200, - html=True) - - def test_course_factory(self): - course = CourseFactory.create() - self.assertIsInstance(course, CourseDescriptor) - - def test_item_factory(self): - course = CourseFactory.create() - item = ItemFactory.create(parent_location=course.location) - self.assertIsInstance(item, SequenceDescriptor) - - def test_course_index_view_with_course(self): - """Test viewing the index page with an existing course""" - CourseFactory.create(display_name='Robot Super Educational Course') - resp = self.client.get(reverse('index')) - self.assertContains(resp, - 'Robot Super Educational Course', - status_code=200, - html=True) - - def test_course_overview_view_with_course(self): - """Test viewing the course overview page with an existing course""" - CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') - - data = { - 'org': 'MITx', - 'course': '999', - 'name': Location.clean('Robot Super Course'), - } - - resp = self.client.get(reverse('course_index', kwargs=data)) - self.assertContains(resp, - 'Robot Super Course', - status_code=200, - html=True) - - def test_clone_item(self): - """Test cloning an item. E.g. creating a new section""" - CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') - - section_data = { - 'parent_location' : 'i4x://MITx/999/course/Robot_Super_Course', - 'template' : 'i4x://edx/templates/chapter/Empty', - 'display_name': 'Section One', - } - - resp = self.client.post(reverse('clone_item'), section_data) - - self.assertEqual(resp.status_code, 200) - data = parse_json(resp) - self.assertRegexpMatches(data['id'], - '^i4x:\/\/MITx\/999\/chapter\/([0-9]|[a-f]){32}$') - - def check_edit_unit(self, test_course_name): - import_from_xml(modulestore(), 'common/test/data/', [test_course_name]) - - for descriptor in modulestore().get_items(Location(None, None, 'vertical', None, None)): - print "Checking ", descriptor.location.url() - print descriptor.__class__, descriptor.location - resp = self.client.get(reverse('edit_unit', kwargs={'location': descriptor.location.url()})) - self.assertEqual(resp.status_code, 200) - - def test_edit_unit_toy(self): - self.check_edit_unit('toy') - - def test_edit_unit_full(self): - self.check_edit_unit('full') - - def test_static_tab_reordering(self): - import_from_xml(modulestore(), 'common/test/data/', ['full']) - - ms = modulestore('direct') - course = ms.get_item(Location(['i4x','edX','full','course','6.002_Spring_2012', None])) - - # reverse the ordering - reverse_tabs = [] - for tab in course.tabs: - if tab['type'] == 'static_tab': - reverse_tabs.insert(0, 'i4x://edX/full/static_tab/{0}'.format(tab['url_slug'])) - - resp = self.client.post(reverse('reorder_static_tabs'), json.dumps({'tabs':reverse_tabs}), "application/json") - - course = ms.get_item(Location(['i4x','edX','full','course','6.002_Spring_2012', None])) - - # compare to make sure that the tabs information is in the expected order after the server call - course_tabs = [] - for tab in course.tabs: - if tab['type'] == 'static_tab': - course_tabs.append('i4x://edX/full/static_tab/{0}'.format(tab['url_slug'])) - - self.assertEqual(reverse_tabs, course_tabs) - - - - - def test_about_overrides(self): - ''' - This test case verifies that a course can use specialized override for about data, e.g. /about/Fall_2012/effort.html - while there is a base definition in /about/effort.html - ''' - import_from_xml(modulestore(), 'common/test/data/', ['full']) - ms = modulestore('direct') - effort = ms.get_item(Location(['i4x','edX','full','about','effort', None])) - self.assertEqual(effort.definition['data'],'6 hours') - - # this one should be in a non-override folder - effort = ms.get_item(Location(['i4x','edX','full','about','end_date', None])) - self.assertEqual(effort.definition['data'],'TBD') - - def test_remove_hide_progress_tab(self): - import_from_xml(modulestore(), 'common/test/data/', ['full']) - - ms = modulestore('direct') - cs = contentstore() - - source_location = CourseDescriptor.id_to_location('edX/full/6.002_Spring_2012') - course = ms.get_item(source_location) - self.assertNotIn('hide_progress_tab', course.metadata) - - - def test_clone_course(self): - import_from_xml(modulestore(), 'common/test/data/', ['full']) - - resp = self.client.post(reverse('create_new_course'), self.course_data) - self.assertEqual(resp.status_code, 200) - data = parse_json(resp) - self.assertEqual(data['id'], 'i4x://MITx/999/course/Robot_Super_Course') - - ms = modulestore('direct') - cs = contentstore() - - source_location = CourseDescriptor.id_to_location('edX/full/6.002_Spring_2012') - dest_location = CourseDescriptor.id_to_location('MITx/999/Robot_Super_Course') - - clone_course(ms, cs, source_location, dest_location) - - # now loop through all the units in the course and verify that the clone can render them, which - # means the objects are at least present - items = ms.get_items(Location(['i4x','edX', 'full', 'vertical', None])) - self.assertGreater(len(items), 0) - clone_items = ms.get_items(Location(['i4x', 'MITx','999','vertical', None])) - self.assertGreater(len(clone_items), 0) - for descriptor in items: - new_loc = descriptor.location._replace(org = 'MITx', course='999') - print "Checking {0} should now also be at {1}".format(descriptor.location.url(), new_loc.url()) - resp = self.client.get(reverse('edit_unit', kwargs={'location': new_loc.url()})) - self.assertEqual(resp.status_code, 200) - - def test_delete_course(self): - import_from_xml(modulestore(), 'common/test/data/', ['full']) - - ms = modulestore('direct') - cs = contentstore() - - location = CourseDescriptor.id_to_location('edX/full/6.002_Spring_2012') - - delete_course(ms, cs, location) - - items = ms.get_items(Location(['i4x','edX', 'full', 'vertical', None])) - self.assertEqual(len(items), 0) - - def verify_content_existence(self, modulestore, root_dir, location, dirname, category_name, filename_suffix=''): - fs = OSFS(root_dir / 'test_export') - self.assertTrue(fs.exists(dirname)) - - query_loc = Location('i4x', location.org, location.course, category_name, None) - items = modulestore.get_items(query_loc) - - for item in items: - fs = OSFS(root_dir / ('test_export/' + dirname)) - self.assertTrue(fs.exists(item.location.name + filename_suffix)) - - def test_export_course(self): - ms = modulestore('direct') - cs = contentstore() - - import_from_xml(ms, 'common/test/data/', ['full']) - location = CourseDescriptor.id_to_location('edX/full/6.002_Spring_2012') - - root_dir = path(mkdtemp()) - - print 'Exporting to tempdir = {0}'.format(root_dir) - - # export out to a tempdir - export_to_xml(ms, cs, location, root_dir, 'test_export') - - # check for static tabs - self.verify_content_existence(ms, root_dir, location, 'tabs', 'static_tab', '.html') - - # check for custom_tags - self.verify_content_existence(ms, root_dir, location, 'info', 'course_info', '.html') - - # check for custom_tags - self.verify_content_existence(ms, root_dir, location, 'custom_tags', 'custom_tag_template') - - - # remove old course - delete_course(ms, cs, location) - - # reimport - import_from_xml(ms, root_dir, ['test_export']) - - items = ms.get_items(Location(['i4x','edX', 'full', 'vertical', None])) - self.assertGreater(len(items), 0) - for descriptor in items: - print "Checking {0}....".format(descriptor.location.url()) - resp = self.client.get(reverse('edit_unit', kwargs={'location': descriptor.location.url()})) - self.assertEqual(resp.status_code, 200) - - shutil.rmtree(root_dir) - - - def test_course_handouts_rewrites(self): - ms = modulestore('direct') - cs = contentstore() - - # import a test course - import_from_xml(ms, 'common/test/data/', ['full']) - - handout_location= Location(['i4x', 'edX', 'full', 'course_info', 'handouts']) - - # get module info - resp = self.client.get(reverse('module_info', kwargs={'module_location': handout_location})) - - # make sure we got a successful response - self.assertEqual(resp.status_code, 200) - - # check that /static/ has been converted to the full path - # note, we know the link it should be because that's what in the 'full' course in the test data - self.assertContains(resp, '/c4x/edX/full/asset/handouts_schematic_tutorial.pdf') - - def test_missing_static_content(self): - resp = self.client.get("/c4x/asd/asd/asd/asd") - self.assertEqual(resp.status_code, 404) - - def test_capa_module(self): - """Test that a problem treats markdown specially.""" - CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') - - problem_data = { - 'parent_location' : 'i4x://MITx/999/course/Robot_Super_Course', - 'template' : 'i4x://edx/templates/problem/Empty' - } - - resp = self.client.post(reverse('clone_item'), problem_data) - - self.assertEqual(resp.status_code, 200) - payload = parse_json(resp) - problem_loc = payload['id'] - problem = get_modulestore(problem_loc).get_item(problem_loc) - # should be a CapaDescriptor - self.assertIsInstance(problem, CapaDescriptor, "New problem is not a CapaDescriptor") - context = problem.get_context() - self.assertIn('markdown', context, "markdown is missing from context") - self.assertIn('markdown', problem.metadata, "markdown is missing from metadata") - self.assertNotIn('markdown', problem.editable_metadata_fields, "Markdown slipped into the editable metadata fields") \ No newline at end of file From fde6d1ba1ca9c1f6005bacf032f3e0fd7fac8f89 Mon Sep 17 00:00:00 2001 From: Jay Zoldak Date: Mon, 4 Feb 2013 10:57:20 -0500 Subject: [PATCH 207/347] Refactor tests for cms contentstore. --- .../contentstore/tests/test_contentstore.py | 284 +++++++++++------- .../tests/test_course_settings.py | 71 ++--- cms/djangoapps/contentstore/tests/tests.py | 19 +- cms/djangoapps/contentstore/tests/utils.py | 40 ++- cms/djangoapps/contentstore/views.py | 12 +- .../xmodule/modulestore/tests/factories.py | 7 +- 6 files changed, 242 insertions(+), 191 deletions(-) diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index a417418410..ce7d9e757c 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -1,27 +1,46 @@ import json import shutil -from django.test import TestCase from django.test.client import Client from override_settings import override_settings from django.conf import settings from django.core.urlresolvers import reverse from path import path +from tempfile import mkdtemp import json from fs.osfs import OSFS import copy from mock import Mock -import xmodule.modulestore.django -from factories import * -from utils import CmsTestCase +from student.models import Registration +from django.contrib.auth.models import User +from cms.djangoapps.contentstore.utils import get_modulestore + +from utils import ModuleStoreTestCase, parse_json +from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory + +from xmodule.modulestore import Location +from xmodule.modulestore.store_utilities import clone_course +from xmodule.modulestore.store_utilities import delete_course +from xmodule.modulestore.django import modulestore, _MODULESTORES +from xmodule.contentstore.django import contentstore +from xmodule.templates import update_templates +from xmodule.modulestore.xml_exporter import export_to_xml +from xmodule.modulestore.xml_importer import import_from_xml + +from xmodule.capa_module import CapaDescriptor +from xmodule.course_module import CourseDescriptor +from xmodule.seq_module import SequenceDescriptor TEST_DATA_MODULESTORE = copy.deepcopy(settings.MODULESTORE) TEST_DATA_MODULESTORE['default']['OPTIONS']['fs_root'] = path('common/test/data') TEST_DATA_MODULESTORE['direct']['OPTIONS']['fs_root'] = path('common/test/data') @override_settings(MODULESTORE=TEST_DATA_MODULESTORE) -class ContentStoreTest(CmsTestCase): - +class ContentStoreToyCourseTest(ModuleStoreTestCase): + """ + Tests that rely on the toy courses. + TODO: refactor using CourseFactory so they do not. + """ def setUp(self): uname = 'testuser' email = 'test+courses@edx.org' @@ -40,109 +59,6 @@ class ContentStoreTest(CmsTestCase): self.client = Client() self.client.login(username=uname, password=password) - self.course_data = { - 'template': 'i4x://edx/templates/course/Empty', - 'org': 'MITx', - 'number': '999', - 'display_name': 'Robot Super Course', - } - - def test_create_course(self): - """Test new course creation - happy path""" - resp = self.client.post(reverse('create_new_course'), self.course_data) - self.assertEqual(resp.status_code, 200) - data = parse_json(resp) - self.assertEqual(data['id'], 'i4x://MITx/999/course/Robot_Super_Course') - - def test_create_course_duplicate_course(self): - """Test new course creation - error path""" - resp = self.client.post(reverse('create_new_course'), self.course_data) - resp = self.client.post(reverse('create_new_course'), self.course_data) - data = parse_json(resp) - self.assertEqual(resp.status_code, 200) - self.assertEqual(data['ErrMsg'], 'There is already a course defined with this name.') - - def test_create_course_duplicate_number(self): - """Test new course creation - error path""" - resp = self.client.post(reverse('create_new_course'), self.course_data) - self.course_data['display_name'] = 'Robot Super Course Two' - - resp = self.client.post(reverse('create_new_course'), self.course_data) - data = parse_json(resp) - - self.assertEqual(resp.status_code, 200) - self.assertEqual(data['ErrMsg'], - 'There is already a course defined with the same organization and course number.') - - def test_create_course_with_bad_organization(self): - """Test new course creation - error path for bad organization name""" - self.course_data['org'] = 'University of California, Berkeley' - resp = self.client.post(reverse('create_new_course'), self.course_data) - data = parse_json(resp) - - self.assertEqual(resp.status_code, 200) - self.assertEqual(data['ErrMsg'], - "Unable to create course 'Robot Super Course'.\n\nInvalid characters in 'University of California, Berkeley'.") - - def test_course_index_view_with_no_courses(self): - """Test viewing the index page with no courses""" - # Create a course so there is something to view - resp = self.client.get(reverse('index')) - self.assertContains(resp, - '

          My Courses

          ', - status_code=200, - html=True) - - def test_course_factory(self): - course = CourseFactory.create() - self.assertIsInstance(course, CourseDescriptor) - - def test_item_factory(self): - course = CourseFactory.create() - item = ItemFactory.create(parent_location=course.location) - self.assertIsInstance(item, SequenceDescriptor) - - def test_course_index_view_with_course(self): - """Test viewing the index page with an existing course""" - CourseFactory.create(display_name='Robot Super Educational Course') - resp = self.client.get(reverse('index')) - self.assertContains(resp, - 'Robot Super Educational Course', - status_code=200, - html=True) - - def test_course_overview_view_with_course(self): - """Test viewing the course overview page with an existing course""" - CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') - - data = { - 'org': 'MITx', - 'course': '999', - 'name': Location.clean('Robot Super Course'), - } - - resp = self.client.get(reverse('course_index', kwargs=data)) - self.assertContains(resp, - 'Robot Super Course', - status_code=200, - html=True) - - def test_clone_item(self): - """Test cloning an item. E.g. creating a new section""" - CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') - - section_data = { - 'parent_location' : 'i4x://MITx/999/course/Robot_Super_Course', - 'template' : 'i4x://edx/templates/chapter/Empty', - 'display_name': 'Section One', - } - - resp = self.client.post(reverse('clone_item'), section_data) - - self.assertEqual(resp.status_code, 200) - data = parse_json(resp) - self.assertRegexpMatches(data['id'], - '^i4x:\/\/MITx\/999\/chapter\/([0-9]|[a-f]){32}$') def check_edit_unit(self, test_course_name): import_from_xml(modulestore(), 'common/test/data/', [test_course_name]) @@ -183,9 +99,6 @@ class ContentStoreTest(CmsTestCase): self.assertEqual(reverse_tabs, course_tabs) - - - def test_about_overrides(self): ''' This test case verifies that a course can use specialized override for about data, e.g. /about/Fall_2012/effort.html @@ -210,11 +123,18 @@ class ContentStoreTest(CmsTestCase): course = ms.get_item(source_location) self.assertNotIn('hide_progress_tab', course.metadata) - def test_clone_course(self): + + course_data = { + 'template': 'i4x://edx/templates/course/Empty', + 'org': 'MITx', + 'number': '999', + 'display_name': 'Robot Super Course', + } + import_from_xml(modulestore(), 'common/test/data/', ['full']) - resp = self.client.post(reverse('create_new_course'), self.course_data) + resp = self.client.post(reverse('create_new_course'), course_data) self.assertEqual(resp.status_code, 200) data = parse_json(resp) self.assertEqual(data['id'], 'i4x://MITx/999/course/Robot_Super_Course') @@ -302,7 +222,6 @@ class ContentStoreTest(CmsTestCase): shutil.rmtree(root_dir) - def test_course_handouts_rewrites(self): ms = modulestore('direct') cs = contentstore() @@ -323,6 +242,141 @@ class ContentStoreTest(CmsTestCase): self.assertContains(resp, '/c4x/edX/full/asset/handouts_schematic_tutorial.pdf') +class ContentStoreTest(ModuleStoreTestCase): + """ + Tests for the CMS ContentStore application. + """ + def setUp(self): + """ + These tests need a user in the DB so that the django Test Client + can log them in. + They inherit from the ModuleStoreTestCase class so that the mongodb collection + will be cleared out before each test case execution and deleted + afterwards. + """ + uname = 'testuser' + email = 'test+courses@edx.org' + password = 'foo' + + # Create the use so we can log them in. + self.user = User.objects.create_user(uname, email, password) + + # Note that we do not actually need to do anything + # for registration if we directly mark them active. + self.user.is_active = True + # Staff has access to view all courses + self.user.is_staff = True + self.user.save() + + self.client = Client() + self.client.login(username=uname, password=password) + + self.course_data = { + 'template': 'i4x://edx/templates/course/Empty', + 'org': 'MITx', + 'number': '999', + 'display_name': 'Robot Super Course', + } + + def test_create_course(self): + """Test new course creation - happy path""" + resp = self.client.post(reverse('create_new_course'), self.course_data) + self.assertEqual(resp.status_code, 200) + data = parse_json(resp) + self.assertEqual(data['id'], 'i4x://MITx/999/course/Robot_Super_Course') + + def test_create_course_duplicate_course(self): + """Test new course creation - error path""" + resp = self.client.post(reverse('create_new_course'), self.course_data) + resp = self.client.post(reverse('create_new_course'), self.course_data) + data = parse_json(resp) + self.assertEqual(resp.status_code, 200) + self.assertEqual(data['ErrMsg'], 'There is already a course defined with this name.') + + def test_create_course_duplicate_number(self): + """Test new course creation - error path""" + resp = self.client.post(reverse('create_new_course'), self.course_data) + self.course_data['display_name'] = 'Robot Super Course Two' + + resp = self.client.post(reverse('create_new_course'), self.course_data) + data = parse_json(resp) + + self.assertEqual(resp.status_code, 200) + self.assertEqual(data['ErrMsg'], + 'There is already a course defined with the same organization and course number.') + + def test_create_course_with_bad_organization(self): + """Test new course creation - error path for bad organization name""" + self.course_data['org'] = 'University of California, Berkeley' + resp = self.client.post(reverse('create_new_course'), self.course_data) + data = parse_json(resp) + + self.assertEqual(resp.status_code, 200) + self.assertEqual(data['ErrMsg'], + "Unable to create course 'Robot Super Course'.\n\nInvalid characters in 'University of California, Berkeley'.") + + def test_course_index_view_with_no_courses(self): + """Test viewing the index page with no courses""" + # Create a course so there is something to view + resp = self.client.get(reverse('index')) + self.assertContains(resp, + '

          My Courses

          ', + status_code=200, + html=True) + + def test_course_factory(self): + """Test that the course factory works correctly.""" + course = CourseFactory.create() + self.assertIsInstance(course, CourseDescriptor) + + def test_item_factory(self): + """Test that the item factory works correctly.""" + course = CourseFactory.create() + item = ItemFactory.create(parent_location=course.location) + self.assertIsInstance(item, SequenceDescriptor) + + def test_course_index_view_with_course(self): + """Test viewing the index page with an existing course""" + CourseFactory.create(display_name='Robot Super Educational Course') + resp = self.client.get(reverse('index')) + self.assertContains(resp, + 'Robot Super Educational Course', + status_code=200, + html=True) + + def test_course_overview_view_with_course(self): + """Test viewing the course overview page with an existing course""" + CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') + + data = { + 'org': 'MITx', + 'course': '999', + 'name': Location.clean('Robot Super Course'), + } + + resp = self.client.get(reverse('course_index', kwargs=data)) + self.assertContains(resp, + 'Robot Super Course', + status_code=200, + html=True) + + def test_clone_item(self): + """Test cloning an item. E.g. creating a new section""" + CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') + + section_data = { + 'parent_location' : 'i4x://MITx/999/course/Robot_Super_Course', + 'template' : 'i4x://edx/templates/chapter/Empty', + 'display_name': 'Section One', + } + + resp = self.client.post(reverse('clone_item'), section_data) + + self.assertEqual(resp.status_code, 200) + data = parse_json(resp) + self.assertRegexpMatches(data['id'], + '^i4x:\/\/MITx\/999\/chapter\/([0-9]|[a-f]){32}$') + def test_capa_module(self): """Test that a problem treats markdown specially.""" CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') diff --git a/cms/djangoapps/contentstore/tests/test_course_settings.py b/cms/djangoapps/contentstore/tests/test_course_settings.py index 74eff6e9cc..0191a97f6c 100644 --- a/cms/djangoapps/contentstore/tests/test_course_settings.py +++ b/cms/djangoapps/contentstore/tests/test_course_settings.py @@ -1,21 +1,27 @@ -from django.test.testcases import TestCase import datetime import time +import json +import calendar +import copy +from util import converters +from util.converters import jsdate_to_time + +from django.test.testcases import TestCase from django.contrib.auth.models import User -import xmodule from django.test.client import Client from django.core.urlresolvers import reverse -from xmodule.modulestore import Location -from cms.djangoapps.models.settings.course_details import CourseDetails,\ - CourseSettingsEncoder -import json -from util import converters -import calendar -from util.converters import jsdate_to_time from django.utils.timezone import UTC + +import xmodule +from xmodule.modulestore import Location +from cms.djangoapps.models.settings.course_details import (CourseDetails, + CourseSettingsEncoder) from cms.djangoapps.models.settings.course_grading import CourseGradingModel from cms.djangoapps.contentstore.utils import get_modulestore -import copy + +from utils import ModuleStoreTestCase +from xmodule.modulestore.tests.factories import CourseFactory + # YYYY-MM-DDThh:mm:ss.s+/-HH:MM class ConvertersTestCase(TestCase): @@ -36,8 +42,15 @@ class ConvertersTestCase(TestCase): self.compare_dates(converters.jsdate_to_time("2013-01-01T00:00:00"), converters.jsdate_to_time("2012-12-31T23:59:59"), datetime.timedelta(seconds=1)) -class CourseTestCase(TestCase): +class CourseTestCase(ModuleStoreTestCase): def setUp(self): + """ + These tests need a user in the DB so that the django Test Client + can log them in. + They inherit from the ModuleStoreTestCase class so that the mongodb collection + will be cleared out before each test case execution and deleted + afterwards. + """ uname = 'testuser' email = 'test+courses@edx.org' password = 'foo' @@ -52,36 +65,15 @@ class CourseTestCase(TestCase): self.user.is_staff = True self.user.save() - # Flush and initialize the module store - # It needs the templates because it creates new records - # by cloning from the template. - # Note that if your test module gets in some weird state - # (though it shouldn't), do this manually - # from the bash shell to drop it: - # $ mongo test_xmodule --eval "db.dropDatabase()" - xmodule.modulestore.django._MODULESTORES = {} - xmodule.modulestore.django.modulestore().collection.drop() - xmodule.templates.update_templates() - self.client = Client() self.client.login(username=uname, password=password) - self.course_data = { - 'template': 'i4x://edx/templates/course/Empty', - 'org': 'MITx', - 'number': '999', - 'display_name': 'Robot Super Course', - } - self.course_location = Location('i4x', 'MITx', '999', 'course', 'Robot_Super_Course') - self.create_course() - - def tearDown(self): - xmodule.modulestore.django._MODULESTORES = {} - xmodule.modulestore.django.modulestore().collection.drop() - - def create_course(self): - """Create new course""" - self.client.post(reverse('create_new_course'), self.course_data) + t='i4x://edx/templates/course/Empty' + o='MITx' + n='999' + dn='Robot Super Course' + self.course_location = Location('i4x', o, n, 'course', 'Robot_Super_Course') + CourseFactory.create(template=t, org=o, number=n, display_name=dn) class CourseDetailsTestCase(CourseTestCase): def test_virgin_fetch(self): @@ -145,7 +137,6 @@ class CourseDetailsViewTest(CourseTestCase): return datetime.isoformat("T") else: return None - def test_update_and_fetch(self): details = CourseDetails.fetch(self.course_location) @@ -271,5 +262,3 @@ class CourseGradingTest(CourseTestCase): test_grader.graders[1]['drop_count'] = test_grader.graders[1].get('drop_count') + 1 altered_grader = CourseGradingModel.update_grader_from_json(test_grader.course_location, test_grader.graders[1]) self.assertDictEqual(test_grader.graders[1], altered_grader, "drop_count[1] + 2") - - diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py index 8c8ee07264..1f09aee578 100644 --- a/cms/djangoapps/contentstore/tests/tests.py +++ b/cms/djangoapps/contentstore/tests/tests.py @@ -11,8 +11,6 @@ import json from fs.osfs import OSFS import copy -from student.models import Registration -from django.contrib.auth.models import User from cms.djangoapps.contentstore.utils import get_modulestore from xmodule.modulestore import Location @@ -29,22 +27,7 @@ from xmodule.course_module import CourseDescriptor from xmodule.seq_module import SequenceDescriptor from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory -from .utils import CmsTestCase - -def parse_json(response): - """Parse response, which is assumed to be json""" - return json.loads(response.content) - - -def user(email): - """look up a user by email""" - return User.objects.get(email=email) - - -def registration(email): - """look up registration object by email""" - return Registration.objects.get(user__email=email) - +from utils import ModuleStoreTestCase, parse_json, user, registration class ContentStoreTestCase(TestCase): def _login(self, email, pw): diff --git a/cms/djangoapps/contentstore/tests/utils.py b/cms/djangoapps/contentstore/tests/utils.py index c800ee936c..bcf0471820 100644 --- a/cms/djangoapps/contentstore/tests/utils.py +++ b/cms/djangoapps/contentstore/tests/utils.py @@ -1,15 +1,20 @@ from django.test import TestCase -from xmodule.modulestore.django import modulestore, _MODULESTORES +import json + +from student.models import Registration +from django.contrib.auth.models import User + +import xmodule.modulestore.django from xmodule.templates import update_templates # Subclass TestCase and use to initialize the contentstore -class CmsTestCase(TestCase): +class ModuleStoreTestCase(TestCase): """ Subclass for any test case that uses the mongodb module store. This clears it out before running the TestCase and reinitilizes it with the templates afterwards. """ def _pre_setup(self): - super(CmsTestCase, self)._pre_setup() + super(ModuleStoreTestCase, self)._pre_setup() # Flush and initialize the module store # It needs the templates because it creates new records # by cloning from the template. @@ -17,16 +22,27 @@ class CmsTestCase(TestCase): # (though it shouldn't), do this manually # from the bash shell to drop it: # $ mongo test_xmodule --eval "db.dropDatabase()" - _MODULESTORES = {} - modulestore().collection.drop() + xmodule.modulestore.django._MODULESTORES = {} + xmodule.modulestore.django.modulestore().collection.drop() update_templates() def _post_teardown(self): # Make sure you flush out the test modulestore after the end - # of the last test because otherwise on the next run - # cms/djangoapps/contentstore/__init__.py - # update_templates() will try to update the templates - # via upsert and it sometimes seems to be messing things up. - _MODULESTORES = {} - modulestore().collection.drop() - super(CmsTestCase, self)._post_teardown() \ No newline at end of file + # of the last test so the collection will be deleted. + # Otherwise there will be lingering collections leftover + # from executing the tests. + xmodule.modulestore.django._MODULESTORES = {} + xmodule.modulestore.django.modulestore().collection.drop() + super(ModuleStoreTestCase, self)._post_teardown() + +def parse_json(response): + """Parse response, which is assumed to be json""" + return json.loads(response.content) + +def user(email): + """look up a user by email""" + return User.objects.get(email=email) + +def registration(email): + """look up registration object by email""" + return Registration.objects.get(user__email=email) diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index 7ebb2648ec..fb63cb34ed 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -1240,6 +1240,11 @@ def edge(request): @login_required @expect_json def create_new_course(request): + # This logic is repeated in xmodule/modulestore/tests/factories.py + # so if you change anything here, you need to also change it there. + # TODO: write a test that creates two courses, one with the factory and + # the other with this method, then compare them to make sure they are + # equivalent. template = Location(request.POST['template']) org = request.POST.get('org') number = request.POST.get('number') @@ -1289,8 +1294,11 @@ def initialize_course_tabs(course): # at least a list populated with the minimal times # @TODO: I don't like the fact that the presentation tier is away of these data related constraints, let's find a better # place for this. Also rather than using a simple list of dictionaries a nice class model would be helpful here - course.tabs = [{"type": "courseware"}, - {"type": "course_info", "name": "Course Info"}, + + # This logic is repeated in xmodule/modulestore/tests/factories.py + # so if you change anything here, you need to also change it there. + course.tabs = [{"type": "courseware"}, + {"type": "course_info", "name": "Course Info"}, {"type": "discussion", "name": "Discussion"}, {"type": "wiki", "name": "Wiki"}, {"type": "progress", "name": "Progress"}] diff --git a/common/lib/xmodule/xmodule/modulestore/tests/factories.py b/common/lib/xmodule/xmodule/modulestore/tests/factories.py index 987dbca09b..b4264b30c9 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/factories.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/factories.py @@ -1,5 +1,4 @@ from factory import Factory -# from datetime import datetime from time import gmtime from uuid import uuid4 from xmodule.modulestore import Location @@ -22,7 +21,8 @@ class XModuleCourseFactory(Factory): @classmethod def _create(cls, target_class, *args, **kwargs): - + # This logic was taken from the create_new_course method in + # cms/djangoapps/contentstore/views.py template = Location('i4x', 'edx', 'templates', 'course', 'Empty') org = kwargs.get('org') number = kwargs.get('number') @@ -41,6 +41,7 @@ class XModuleCourseFactory(Factory): new_course.metadata['data_dir'] = uuid4().hex new_course.metadata['start'] = stringify_time(gmtime()) + new_course.tabs = [{"type": "courseware"}, {"type": "course_info", "name": "Course Info"}, {"type": "discussion", "name": "Discussion"}, @@ -114,4 +115,4 @@ class ItemFactory(XModuleItemFactory): parent_location = 'i4x://MITx/999/course/Robot_Super_Course' template = 'i4x://edx/templates/chapter/Empty' - display_name = 'Section One' \ No newline at end of file + display_name = 'Section One' From abf4ad36f48f664d0a3f64afe4b5d59127bd2b28 Mon Sep 17 00:00:00 2001 From: Jay Zoldak Date: Mon, 4 Feb 2013 17:01:38 -0500 Subject: [PATCH 208/347] Move modulestore unique naming in tests from the settings.py file into the ModuleStoreTestCase class. --- .../contentstore/tests/test_core_caching.py | 6 +---- .../tests/test_course_settings.py | 2 +- .../contentstore/tests/test_utils.py | 2 +- cms/djangoapps/contentstore/tests/tests.py | 3 +-- cms/djangoapps/contentstore/tests/utils.py | 27 ++++++++++++++----- cms/envs/test.py | 6 +---- 6 files changed, 26 insertions(+), 20 deletions(-) diff --git a/cms/djangoapps/contentstore/tests/test_core_caching.py b/cms/djangoapps/contentstore/tests/test_core_caching.py index 0cb4a4930c..ed41e5cc64 100644 --- a/cms/djangoapps/contentstore/tests/test_core_caching.py +++ b/cms/djangoapps/contentstore/tests/test_core_caching.py @@ -1,7 +1,7 @@ -from django.test.testcases import TestCase from cache_toolbox.core import get_cached_content, set_cached_content, del_cached_content from xmodule.modulestore import Location from xmodule.contentstore.content import StaticContent +from django.test import TestCase class Content: def __init__(self, location, content): @@ -32,7 +32,3 @@ class CachingTestCase(TestCase): 'should not be stored in cache with unicodeLocation') self.assertEqual(None, get_cached_content(self.nonUnicodeLocation), 'should not be stored in cache with nonUnicodeLocation') - - - - diff --git a/cms/djangoapps/contentstore/tests/test_course_settings.py b/cms/djangoapps/contentstore/tests/test_course_settings.py index 0191a97f6c..f47733b32c 100644 --- a/cms/djangoapps/contentstore/tests/test_course_settings.py +++ b/cms/djangoapps/contentstore/tests/test_course_settings.py @@ -6,7 +6,6 @@ import copy from util import converters from util.converters import jsdate_to_time -from django.test.testcases import TestCase from django.contrib.auth.models import User from django.test.client import Client from django.core.urlresolvers import reverse @@ -19,6 +18,7 @@ from cms.djangoapps.models.settings.course_details import (CourseDetails, from cms.djangoapps.models.settings.course_grading import CourseGradingModel from cms.djangoapps.contentstore.utils import get_modulestore +from django.test import TestCase from utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory diff --git a/cms/djangoapps/contentstore/tests/test_utils.py b/cms/djangoapps/contentstore/tests/test_utils.py index 13f6189cc5..6811d64c12 100644 --- a/cms/djangoapps/contentstore/tests/test_utils.py +++ b/cms/djangoapps/contentstore/tests/test_utils.py @@ -1,6 +1,6 @@ -from django.test.testcases import TestCase from cms.djangoapps.contentstore import utils import mock +from django.test import TestCase class LMSLinksTestCase(TestCase): def about_page_test(self): diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py index 1f09aee578..df2e4dcc79 100644 --- a/cms/djangoapps/contentstore/tests/tests.py +++ b/cms/djangoapps/contentstore/tests/tests.py @@ -1,6 +1,5 @@ import json import shutil -from django.test import TestCase from django.test.client import Client from override_settings import override_settings from django.conf import settings @@ -29,7 +28,7 @@ from xmodule.seq_module import SequenceDescriptor from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from utils import ModuleStoreTestCase, parse_json, user, registration -class ContentStoreTestCase(TestCase): +class ContentStoreTestCase(ModuleStoreTestCase): def _login(self, email, pw): """Login. View should always return 200. The success/fail is in the returned json""" diff --git a/cms/djangoapps/contentstore/tests/utils.py b/cms/djangoapps/contentstore/tests/utils.py index bcf0471820..7ed2b33e63 100644 --- a/cms/djangoapps/contentstore/tests/utils.py +++ b/cms/djangoapps/contentstore/tests/utils.py @@ -1,5 +1,9 @@ -from django.test import TestCase import json +import copy +from time import time +from django.test import TestCase +from override_settings import override_settings +from django.conf import settings from student.models import Registration from django.contrib.auth.models import User @@ -7,14 +11,23 @@ from django.contrib.auth.models import User import xmodule.modulestore.django from xmodule.templates import update_templates -# Subclass TestCase and use to initialize the contentstore class ModuleStoreTestCase(TestCase): """ Subclass for any test case that uses the mongodb module store. This clears it out before running the TestCase and reinitilizes it with the templates afterwards. """ def _pre_setup(self): - super(ModuleStoreTestCase, self)._pre_setup() + super(ModuleStoreTestCase, self)._pre_setup() + + # Use the current seconds since epoch to differentiate + # the mongo collections on jenkins. + sec_since_epoch = '%s' % int(time()*100) + self.orig_MODULESTORE = copy.deepcopy(settings.MODULESTORE) + self.test_MODULESTORE = self.orig_MODULESTORE + self.test_MODULESTORE['default']['OPTIONS']['collection'] = 'modulestore_%s' % sec_since_epoch + self.test_MODULESTORE['direct']['OPTIONS']['collection'] = 'modulestore_%s' % sec_since_epoch + settings.MODULESTORE = self.test_MODULESTORE + # Flush and initialize the module store # It needs the templates because it creates new records # by cloning from the template. @@ -27,12 +40,14 @@ class ModuleStoreTestCase(TestCase): update_templates() def _post_teardown(self): - # Make sure you flush out the test modulestore after the end - # of the last test so the collection will be deleted. - # Otherwise there will be lingering collections leftover + # Make sure you flush out the modulestore. + # Drop the collection at the end of the test, + # otherwise there will be lingering collections leftover # from executing the tests. xmodule.modulestore.django._MODULESTORES = {} xmodule.modulestore.django.modulestore().collection.drop() + settings.MODULESTORE = self.orig_MODULESTORE + super(ModuleStoreTestCase, self)._post_teardown() def parse_json(response): diff --git a/cms/envs/test.py b/cms/envs/test.py index c22965d748..74c3e349a4 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -10,7 +10,6 @@ sessions. Assumes structure: from .common import * import os from path import path -from time import time # Nose Test Runner INSTALLED_APPS += ('django_nose',) @@ -39,14 +38,11 @@ STATICFILES_DIRS += [ if os.path.isdir(COMMON_TEST_DATA_ROOT / course_dir) ] -# Use the current seconds since epoch to differentiate -# the mongo collections on jenkins. -sec_since_epoch = '%s' % int(time()*100) modulestore_options = { 'default_class': 'xmodule.raw_module.RawDescriptor', 'host': 'localhost', 'db': 'test_xmodule', - 'collection': 'modulestore_%s' % sec_since_epoch, + 'collection': 'modulestore', 'fs_root': GITHUB_REPO_ROOT, 'render_template': 'mitxmako.shortcuts.render_to_string', } From 72023cb5d2f45a85f406225a64ce2b57d95e6b19 Mon Sep 17 00:00:00 2001 From: Jay Zoldak Date: Mon, 4 Feb 2013 17:15:54 -0500 Subject: [PATCH 209/347] Improve docstring wording for ModuleStoreTestCase class. --- cms/djangoapps/contentstore/tests/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cms/djangoapps/contentstore/tests/utils.py b/cms/djangoapps/contentstore/tests/utils.py index 7ed2b33e63..7fa5b76685 100644 --- a/cms/djangoapps/contentstore/tests/utils.py +++ b/cms/djangoapps/contentstore/tests/utils.py @@ -13,8 +13,9 @@ from xmodule.templates import update_templates class ModuleStoreTestCase(TestCase): """ Subclass for any test case that uses the mongodb - module store. This clears it out before running the TestCase - and reinitilizes it with the templates afterwards. """ + module store. This populates a uniquely named modulestore + collection with templates before running the TestCase + and drops it they are finished. """ def _pre_setup(self): super(ModuleStoreTestCase, self)._pre_setup() @@ -36,7 +37,6 @@ class ModuleStoreTestCase(TestCase): # from the bash shell to drop it: # $ mongo test_xmodule --eval "db.dropDatabase()" xmodule.modulestore.django._MODULESTORES = {} - xmodule.modulestore.django.modulestore().collection.drop() update_templates() def _post_teardown(self): From 0b650122fb97139206e798f39a2daf7340fb769b Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Tue, 5 Feb 2013 07:39:53 -0500 Subject: [PATCH 210/347] Config changes to make pep8 autofixes easier --- .pep8 | 2 ++ rakefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .pep8 diff --git a/.pep8 b/.pep8 new file mode 100644 index 0000000000..25d0edbcb4 --- /dev/null +++ b/.pep8 @@ -0,0 +1,2 @@ +[pep8] +ignore=E501 \ No newline at end of file diff --git a/rakefile b/rakefile index bf80b4a87a..05652edbba 100644 --- a/rakefile +++ b/rakefile @@ -134,7 +134,7 @@ end desc "Run pep8 on all #{system} code" task "pep8_#{system}" => report_dir do - sh("pep8 --ignore=E501 #{system}/djangoapps #{system}/lib | tee #{report_dir}/pep8.report") + sh("pep8 #{system} | tee #{report_dir}/pep8.report") end task :pep8 => "pep8_#{system}" From 7fc4081495d7e825447c5889a52a3ef3293f754a Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Tue, 5 Feb 2013 11:17:40 -0500 Subject: [PATCH 211/347] Make pylint work on bare .py files from rake --- rakefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rakefile b/rakefile index 05652edbba..5647b5b13a 100644 --- a/rakefile +++ b/rakefile @@ -147,6 +147,11 @@ end pythonpath_prefix = "PYTHONPATH=#{File.dirname(app)}" end app = File.basename(app) + if app =~ /.py$/ + app = app.gsub('.py', '') + elsif app =~ /.pyc$/ + next + end sh("#{pythonpath_prefix} pylint --rcfile=.pylintrc -f parseable #{app} | tee #{report_dir}/#{app}.pylint.report") end end From cfae1cdf62fb74307b88bd091cd4ba927af6b1fc Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Wed, 6 Feb 2013 11:13:50 -0500 Subject: [PATCH 212/347] Pep8 autofixes --- cms/__init__.py | 1 - cms/djangoapps/auth/authz.py | 21 +- .../contentstore/course_info_model.py | 49 +++-- .../contentstore/features/common.py | 35 +++- .../contentstore/features/courses.py | 20 +- .../contentstore/features/factories.py | 5 +- .../contentstore/features/section.py | 26 ++- .../contentstore/features/signup.py | 6 +- .../features/studio-overview-togglesection.py | 31 ++- .../contentstore/features/subsection.py | 16 +- .../contentstore/management/commands/clone.py | 1 + .../management/commands/delete_course.py | 4 +- .../management/commands/prompt.py | 3 +- .../contentstore/module_info_model.py | 4 +- .../contentstore/tests/factories.py | 5 + .../contentstore/tests/test_contentstore.py | 65 +++--- .../contentstore/tests/test_core_caching.py | 2 + .../tests/test_course_settings.py | 87 ++++---- .../contentstore/tests/test_course_updates.py | 29 +-- .../contentstore/tests/test_utils.py | 5 +- cms/djangoapps/contentstore/tests/tests.py | 1 + cms/djangoapps/contentstore/tests/utils.py | 8 +- cms/djangoapps/contentstore/utils.py | 11 +- cms/djangoapps/contentstore/views.py | 131 +++++++----- .../models/settings/course_details.py | 50 ++--- .../models/settings/course_grading.py | 134 ++++++------ cms/envs/acceptance.py | 6 +- cms/envs/common.py | 6 +- cms/envs/dev.py | 4 +- cms/envs/dev_ike.py | 6 +- cms/envs/test.py | 8 +- cms/manage.py | 2 +- cms/urls.py | 4 +- common/djangoapps/cache_toolbox/core.py | 4 + common/djangoapps/contentserver/middleware.py | 2 +- common/djangoapps/course_groups/cohorts.py | 7 +- common/djangoapps/course_groups/models.py | 3 +- .../djangoapps/course_groups/tests/tests.py | 7 +- common/djangoapps/course_groups/views.py | 3 + common/djangoapps/external_auth/admin.py | 3 +- common/djangoapps/external_auth/models.py | 14 +- .../tests/test_openid_provider.py | 68 +++--- common/djangoapps/external_auth/views.py | 16 +- common/djangoapps/mitxmako/makoloader.py | 26 +-- common/djangoapps/mitxmako/template.py | 12 +- .../mitxmako/templatetag_helpers.py | 19 +- common/djangoapps/static_replace/__init__.py | 1 + .../test/test_static_replace.py | 1 + common/djangoapps/status/__init__.py | 1 - common/djangoapps/status/status.py | 1 + .../management/commands/6002exportusers.py | 2 +- .../management/commands/add_to_group.py | 1 + .../commands/create_random_users.py | 2 + .../management/commands/pearson_dump.py | 33 ++- .../management/commands/pearson_export_cdd.py | 6 +- .../commands/pearson_import_conf_zip.py | 1 - .../commands/pearson_make_tc_registration.py | 63 +++--- .../commands/pearson_make_tc_user.py | 54 ++--- .../management/commands/pearson_transfer.py | 20 +- .../management/commands/tests/test_pearson.py | 193 +++++++++--------- .../migrations/0020_add_test_center_user.py | 2 +- .../student/migrations/0021_remove_askbot.py | 2 +- ...ed__add_unique_courseenrollmentallowed_.py | 2 +- .../0023_add_test_center_registration.py | 2 +- .../migrations/0024_add_allow_certificate.py | 2 +- common/djangoapps/student/models.py | 32 +-- common/djangoapps/student/tests.py | 3 +- common/djangoapps/student/views.py | 57 ++++-- .../track/migrations/0001_initial.py | 2 +- ...t__chg_field_trackinglog_event_type__ch.py | 2 +- common/djangoapps/track/models.py | 17 +- common/djangoapps/track/views.py | 18 +- common/djangoapps/util/cache.py | 1 - common/djangoapps/util/converters.py | 9 +- common/djangoapps/util/json_request.py | 2 +- common/djangoapps/util/views.py | 1 + common/djangoapps/xmodule_modifiers.py | 26 +-- common/lib/capa/capa/calc.py | 4 +- common/lib/capa/capa/capa_problem.py | 6 +- common/lib/capa/capa/chem/__init__.py | 1 - common/lib/capa/capa/chem/chemcalc.py | 24 +-- common/lib/capa/capa/correctmap.py | 4 +- common/lib/capa/capa/customrender.py | 4 +- common/lib/capa/capa/inputtypes.py | 23 ++- common/lib/capa/capa/responsetypes.py | 8 +- common/lib/capa/capa/tests/__init__.py | 5 +- .../lib/capa/capa/tests/test_customrender.py | 10 +- common/lib/capa/capa/tests/test_inputtypes.py | 17 +- .../lib/capa/capa/tests/test_responsetypes.py | 17 +- common/lib/capa/capa/util.py | 7 +- common/lib/capa/capa/xqueue_interface.py | 13 +- common/lib/supertrace.py | 5 +- common/lib/xmodule/setup.py | 2 +- common/lib/xmodule/xmodule/abtest_module.py | 6 +- common/lib/xmodule/xmodule/capa_module.py | 16 +- .../xmodule/combined_open_ended_module.py | 8 +- .../xmodule/combined_open_ended_rubric.py | 18 +- .../lib/xmodule/xmodule/conditional_module.py | 19 +- .../xmodule/xmodule/contentstore/content.py | 43 ++-- .../xmodule/xmodule/contentstore/django.py | 1 + .../lib/xmodule/xmodule/contentstore/mongo.py | 43 ++-- common/lib/xmodule/xmodule/course_module.py | 69 +++---- .../lib/xmodule/xmodule/discussion_module.py | 2 + common/lib/xmodule/xmodule/errortracker.py | 3 + common/lib/xmodule/xmodule/graders.py | 35 ++-- .../xmodule/xmodule/grading_service_module.py | 6 +- common/lib/xmodule/xmodule/html_checker.py | 1 + common/lib/xmodule/xmodule/html_module.py | 4 +- common/lib/xmodule/xmodule/mako_module.py | 3 +- .../xmodule/xmodule/modulestore/__init__.py | 2 +- .../lib/xmodule/xmodule/modulestore/draft.py | 2 +- .../lib/xmodule/xmodule/modulestore/mongo.py | 4 +- .../lib/xmodule/xmodule/modulestore/search.py | 4 +- .../xmodule/modulestore/store_utilities.py | 32 +-- .../xmodule/modulestore/tests/__init__.py | 2 - .../xmodule/modulestore/tests/factories.py | 18 +- .../modulestore/tests/test_location.py | 8 +- .../modulestore/tests/test_modulestore.py | 2 +- .../xmodule/modulestore/tests/test_mongo.py | 1 - .../xmodule/modulestore/tests/test_xml.py | 3 +- common/lib/xmodule/xmodule/modulestore/xml.py | 14 +- .../xmodule/modulestore/xml_exporter.py | 7 +- .../xmodule/modulestore/xml_importer.py | 80 ++++---- .../xmodule/open_ended_image_submission.py | 7 +- .../lib/xmodule/xmodule/open_ended_module.py | 5 +- common/lib/xmodule/xmodule/openendedchild.py | 10 +- .../xmodule/xmodule/peer_grading_module.py | 32 +-- .../xmodule/xmodule/peer_grading_service.py | 26 ++- .../lib/xmodule/xmodule/randomize_module.py | 4 +- common/lib/xmodule/xmodule/raw_module.py | 3 +- .../xmodule/xmodule/self_assessment_module.py | 1 + common/lib/xmodule/xmodule/seq_module.py | 7 +- common/lib/xmodule/xmodule/stringify.py | 1 + common/lib/xmodule/xmodule/template_module.py | 2 +- common/lib/xmodule/xmodule/tests/__init__.py | 5 +- .../xmodule/xmodule/tests/test_capa_module.py | 8 +- .../xmodule/tests/test_combined_open_ended.py | 45 ++-- .../xmodule/xmodule/tests/test_conditional.py | 15 +- .../lib/xmodule/xmodule/tests/test_content.py | 4 +- .../lib/xmodule/xmodule/tests/test_export.py | 7 +- .../lib/xmodule/xmodule/tests/test_graders.py | 2 +- .../lib/xmodule/xmodule/tests/test_import.py | 5 +- .../xmodule/xmodule/tests/test_progress.py | 1 + .../xmodule/tests/test_randomize_module.py | 1 - .../xmodule/tests/test_self_assessment.py | 4 +- .../xmodule/xmodule/tests/test_stringify.py | 2 + common/lib/xmodule/xmodule/timeparse.py | 2 + common/lib/xmodule/xmodule/util/decorators.py | 10 +- common/lib/xmodule/xmodule/vertical_module.py | 2 +- common/lib/xmodule/xmodule/video_module.py | 2 +- common/lib/xmodule/xmodule/x_module.py | 8 +- common/lib/xmodule/xmodule/xml_module.py | 32 +-- .../docs/source/conf.py | 3 +- common/xml_cleanup.py | 12 +- ...el_field_generatedcertificate_name__add.py | 2 +- ...icate_graded_download_url__del_field_ge.py | 2 +- ...icate_enabled__add_field_generatedcerti.py | 2 +- ...icate_certificate_id__add_field_generat.py | 2 +- ...icate_name__add_field_generatedcertific.py | 2 +- ...field_generatedcertificate_error_reason.py | 2 +- .../migrations/0014_adding_whitelist.py | 2 +- lms/djangoapps/certificates/models.py | 2 + lms/djangoapps/certificates/queue.py | 2 +- lms/djangoapps/course_wiki/course_nav.py | 62 +++--- lms/djangoapps/course_wiki/editors.py | 9 +- .../plugins/markdownedx/__init__.py | 2 +- .../plugins/markdownedx/mdx_mathjax.py | 1 - .../plugins/markdownedx/wiki_plugin.py | 6 +- lms/djangoapps/course_wiki/tests/__init__.py | 1 - lms/djangoapps/course_wiki/tests/tests.py | 100 +++++---- lms/djangoapps/course_wiki/views.py | 34 +-- lms/djangoapps/courseware/access.py | 6 +- lms/djangoapps/courseware/admin.py | 1 - lms/djangoapps/courseware/courses.py | 7 +- lms/djangoapps/courseware/features/courses.py | 20 +- .../courseware/features/courseware.py | 3 +- .../courseware/features/courseware_common.py | 9 +- .../courseware/features/openended.py | 21 +- .../courseware/features/smart-accordion.py | 15 +- lms/djangoapps/courseware/grades.py | 54 ++--- .../management/commands/clean_xml.py | 1 + .../management/commands/metadata_to_json.py | 3 + ..._add_unique_offlinecomputedgrade_user_c.py | 2 +- lms/djangoapps/courseware/models.py | 4 +- lms/djangoapps/courseware/module_render.py | 40 ++-- lms/djangoapps/courseware/tabs.py | 25 ++- lms/djangoapps/courseware/tests/__init__.py | 1 - lms/djangoapps/courseware/tests/factories.py | 5 + .../courseware/tests/test_access.py | 11 +- lms/djangoapps/courseware/tests/tests.py | 52 ++--- lms/djangoapps/courseware/views.py | 26 ++- lms/djangoapps/dashboard/views.py | 10 +- .../django_comment_client/base/urls.py | 2 +- .../django_comment_client/base/views.py | 52 +++-- .../django_comment_client/forum/views.py | 35 ++-- .../django_comment_client/helpers.py | 5 + .../commands/assign_roles_for_course.py | 1 + .../commands/create_roles_for_existing.py | 1 + .../commands/seed_permissions_roles.py | 2 +- .../django_comment_client/middleware.py | 3 +- .../migrations/0001_initial.py | 2 +- .../django_comment_client/models.py | 4 +- .../django_comment_client/mustache_helpers.py | 7 +- .../django_comment_client/permissions.py | 10 +- .../django_comment_client/settings.py | 2 +- .../tests/test_helpers.py | 3 +- .../tests/test_middleware.py | 33 +-- .../tests/test_mustache_helpers.py | 32 +-- .../django_comment_client/tests/test_utils.py | 18 +- lms/djangoapps/django_comment_client/utils.py | 43 +++- .../management/commands/compute_grades.py | 11 +- .../management/commands/dump_grades.py | 24 +-- .../instructor/offline_gradecalc.py | 20 +- lms/djangoapps/instructor/tests.py | 33 ++- lms/djangoapps/instructor/views.py | 132 ++++++------ .../licenses/migrations/0001_initial.py | 2 +- .../management/commands/create_groups.py | 14 +- .../management/commands/create_user.py | 68 +++--- .../commands/manage_course_groups.py | 39 ++-- lms/djangoapps/lms_migration/migrate.py | 52 ++--- .../controller_query_service.py | 36 ++-- .../open_ended_notifications.py | 50 +++-- .../open_ended_grading/open_ended_util.py | 5 +- .../open_ended_grading/staff_grading.py | 1 - .../staff_grading_service.py | 9 +- lms/djangoapps/open_ended_grading/tests.py | 13 +- lms/djangoapps/open_ended_grading/views.py | 54 ++--- lms/djangoapps/portal/features/common.py | 20 +- lms/djangoapps/portal/features/factories.py | 3 + lms/djangoapps/portal/features/homepage.py | 1 + lms/djangoapps/portal/features/login.py | 10 +- .../portal/features/registration.py | 3 + lms/djangoapps/portal/features/signup.py | 5 +- .../management/commands/init_psychometrics.py | 26 +-- lms/djangoapps/psychometrics/models.py | 6 +- lms/djangoapps/psychometrics/psychoanalyze.py | 12 +- lms/djangoapps/simplewiki/mdx_mathjax.py | 1 - lms/djangoapps/simplewiki/views.py | 1 + lms/djangoapps/static_template_view/views.py | 1 - lms/djangoapps/staticbook/views.py | 6 +- lms/djangoapps/terrain/__init__.py | 2 +- lms/djangoapps/terrain/browser.py | 7 +- lms/djangoapps/terrain/factories.py | 23 ++- lms/djangoapps/terrain/steps.py | 40 +++- lms/envs/acceptance.py | 6 +- lms/envs/common.py | 52 ++--- lms/envs/content.py | 6 +- lms/envs/dev.py | 2 +- lms/envs/dev_edx4edx.py | 10 +- lms/envs/dev_ike.py | 16 +- lms/envs/dev_int.py | 6 +- lms/envs/devgroups/courses.py | 25 +-- lms/envs/devgroups/portal.py | 1 - lms/envs/devplus.py | 10 +- lms/envs/edx4edx_aws.py | 14 +- lms/envs/static.py | 4 +- lms/envs/test.py | 4 +- lms/envs/test_ike.py | 6 +- lms/lib/comment_client/comment.py | 3 + lms/lib/comment_client/comment_client.py | 8 + lms/lib/comment_client/commentable.py | 1 + lms/lib/comment_client/legacy.py | 52 ++++- lms/lib/comment_client/models.py | 11 +- lms/lib/comment_client/thread.py | 3 +- lms/lib/comment_client/user.py | 6 + lms/lib/comment_client/utils.py | 9 +- lms/lib/dogfood/check.py | 2 - lms/lib/loncapa/loncapa_check.py | 2 - lms/lib/symmath/symmath_check.py | 8 +- lms/static/admin/js/compress.py | 1 + lms/urls.py | 16 +- 271 files changed, 2395 insertions(+), 1826 deletions(-) diff --git a/cms/__init__.py b/cms/__init__.py index 8b13789179..e69de29bb2 100644 --- a/cms/__init__.py +++ b/cms/__init__.py @@ -1 +0,0 @@ - diff --git a/cms/djangoapps/auth/authz.py b/cms/djangoapps/auth/authz.py index 22bbc4bc1c..281e3f46b2 100644 --- a/cms/djangoapps/auth/authz.py +++ b/cms/djangoapps/auth/authz.py @@ -18,6 +18,8 @@ STAFF_ROLE_NAME = 'staff' # we're just making a Django group for each location/role combo # to do this we're just creating a Group name which is a formatted string # of those two variables + + def get_course_groupname_for_role(location, role): loc = Location(location) # hack: check for existence of a group name in the legacy LMS format _ @@ -25,11 +27,12 @@ def get_course_groupname_for_role(location, role): # more information groupname = '{0}_{1}'.format(role, loc.course) - if len(Group.objects.filter(name = groupname)) == 0: - groupname = '{0}_{1}'.format(role,loc.course_id) + if len(Group.objects.filter(name=groupname)) == 0: + groupname = '{0}_{1}'.format(role, loc.course_id) return groupname + def get_users_in_course_group_by_role(location, role): groupname = get_course_groupname_for_role(location, role) (group, created) = Group.objects.get_or_create(name=groupname) @@ -39,6 +42,8 @@ def get_users_in_course_group_by_role(location, role): ''' Create all permission groups for a new course and subscribe the caller into those roles ''' + + def create_all_course_groups(creator, location): create_new_course_group(creator, location, INSTRUCTOR_ROLE_NAME) create_new_course_group(creator, location, STAFF_ROLE_NAME) @@ -46,7 +51,7 @@ def create_all_course_groups(creator, location): def create_new_course_group(creator, location, role): groupname = get_course_groupname_for_role(location, role) - (group, created) =Group.objects.get_or_create(name=groupname) + (group, created) = Group.objects.get_or_create(name=groupname) if created: group.save() @@ -59,6 +64,8 @@ def create_new_course_group(creator, location, role): This is to be called only by either a command line code path or through a app which has already asserted permissions ''' + + def _delete_course_group(location): # remove all memberships instructors = Group.objects.get(name=get_course_groupname_for_role(location, INSTRUCTOR_ROLE_NAME)) @@ -75,6 +82,8 @@ def _delete_course_group(location): This is to be called only by either a command line code path or through an app which has already asserted permissions to do this action ''' + + def _copy_course_group(source, dest): instructors = Group.objects.get(name=get_course_groupname_for_role(source, INSTRUCTOR_ROLE_NAME)) new_instructors_group = Group.objects.get(name=get_course_groupname_for_role(dest, INSTRUCTOR_ROLE_NAME)) @@ -86,7 +95,7 @@ def _copy_course_group(source, dest): new_staff_group = Group.objects.get(name=get_course_groupname_for_role(dest, STAFF_ROLE_NAME)) for user in staff.user_set.all(): user.groups.add(new_staff_group) - user.save() + user.save() def add_user_to_course_group(caller, user, location, role): @@ -133,8 +142,6 @@ def remove_user_from_course_group(caller, user, location, role): def is_user_in_course_group_role(user, location, role): if user.is_active and user.is_authenticated: # all "is_staff" flagged accounts belong to all groups - return user.is_staff or user.groups.filter(name=get_course_groupname_for_role(location,role)).count() > 0 + return user.is_staff or user.groups.filter(name=get_course_groupname_for_role(location, role)).count() > 0 return False - - diff --git a/cms/djangoapps/contentstore/course_info_model.py b/cms/djangoapps/contentstore/course_info_model.py index 6995df06a8..153d13dd13 100644 --- a/cms/djangoapps/contentstore/course_info_model.py +++ b/cms/djangoapps/contentstore/course_info_model.py @@ -8,6 +8,8 @@ import logging ## TODO store as array of { date, content } and override course_info_module.definition_from_xml ## This should be in a class which inherits from XmlDescriptor + + def get_course_updates(location): """ Retrieve the relevant course_info updates and unpack into the model which the client expects: @@ -21,13 +23,13 @@ def get_course_updates(location): # current db rep: {"_id" : locationjson, "definition" : { "data" : "
            [
          1. date

            content
          2. ]
          "} "metadata" : ignored} location_base = course_updates.location.url() - + # purely to handle free formed updates not done via editor. Actually kills them, but at least doesn't break. try: course_html_parsed = html.fromstring(course_updates.definition['data']) except: course_html_parsed = html.fromstring("
            ") - + # Confirm that root is
              , iterate over
            1. , pull out

              subs and then rest of val course_upd_collection = [] if course_html_parsed.tag == 'ol': @@ -40,25 +42,26 @@ def get_course_updates(location): content = update[0].tail else: content = "\n".join([html.tostring(ele) for ele in update[1:]]) - + # make the id on the client be 1..len w/ 1 being the oldest and len being the newest - course_upd_collection.append({"id" : location_base + "/" + str(len(course_html_parsed) - idx), - "date" : update.findtext("h2"), - "content" : content}) - + course_upd_collection.append({"id": location_base + "/" + str(len(course_html_parsed) - idx), + "date": update.findtext("h2"), + "content": content}) + return course_upd_collection + def update_course_updates(location, update, passed_id=None): """ Either add or update the given course update. It will add it if the passed_id is absent or None. It will update it if it has an passed_id which has a valid value. Until updates have distinct values, the passed_id is the location url + an index - into the html structure. + into the html structure. """ try: course_updates = modulestore('direct').get_item(location) except ItemNotFoundError: return HttpResponseBadRequest - + # purely to handle free formed updates not done via editor. Actually kills them, but at least doesn't break. try: course_html_parsed = html.fromstring(course_updates.definition['data']) @@ -67,7 +70,7 @@ def update_course_updates(location, update, passed_id=None): # No try/catch b/c failure generates an error back to client new_html_parsed = html.fromstring('
            2. ' + update['date'] + '

              ' + update['content'] + '
            3. ') - + # Confirm that root is
                , iterate over
              1. , pull out

                subs and then rest of val if course_html_parsed.tag == 'ol': # ??? Should this use the id in the json or in the url or does it matter? @@ -80,14 +83,15 @@ def update_course_updates(location, update, passed_id=None): idx = len(course_html_parsed) passed_id = course_updates.location.url() + "/" + str(idx) - + # update db record course_updates.definition['data'] = html.tostring(course_html_parsed) modulestore('direct').update_item(location, course_updates.definition['data']) - - return {"id" : passed_id, - "date" : update['date'], - "content" :update['content']} + + return {"id": passed_id, + "date": update['date'], + "content": update['content']} + def delete_course_update(location, update, passed_id): """ @@ -96,19 +100,19 @@ def delete_course_update(location, update, passed_id): """ if not passed_id: return HttpResponseBadRequest - + try: course_updates = modulestore('direct').get_item(location) except ItemNotFoundError: return HttpResponseBadRequest - + # TODO use delete_blank_text parser throughout and cache as a static var in a class # purely to handle free formed updates not done via editor. Actually kills them, but at least doesn't break. try: course_html_parsed = html.fromstring(course_updates.definition['data']) except: course_html_parsed = html.fromstring("
                  ") - + if course_html_parsed.tag == 'ol': # ??? Should this use the id in the json or in the url or does it matter? idx = get_idx(passed_id) @@ -120,10 +124,11 @@ def delete_course_update(location, update, passed_id): # update db record course_updates.definition['data'] = html.tostring(course_html_parsed) store = modulestore('direct') - store.update_item(location, course_updates.definition['data']) - + store.update_item(location, course_updates.definition['data']) + return get_course_updates(location) - + + def get_idx(passed_id): """ From the url w/ idx appended, get the idx. @@ -131,4 +136,4 @@ def get_idx(passed_id): # TODO compile this regex into a class static and reuse for each call idx_matcher = re.search(r'.*/(\d+)$', passed_id) if idx_matcher: - return int(idx_matcher.group(1)) \ No newline at end of file + return int(idx_matcher.group(1)) diff --git a/cms/djangoapps/contentstore/features/common.py b/cms/djangoapps/contentstore/features/common.py index d910d73085..f868b598a8 100644 --- a/cms/djangoapps/contentstore/features/common.py +++ b/cms/djangoapps/contentstore/features/common.py @@ -12,6 +12,8 @@ from logging import getLogger logger = getLogger(__name__) ########### STEP HELPERS ############## + + @step('I (?:visit|access|open) the Studio homepage$') def i_visit_the_studio_homepage(step): # To make this go to port 8001, put @@ -20,32 +22,37 @@ def i_visit_the_studio_homepage(step): world.browser.visit(django_url('/')) assert world.browser.is_element_present_by_css('body.no-header', 10) + @step('I am logged into Studio$') def i_am_logged_into_studio(step): log_into_studio() + @step('I confirm the alert$') def i_confirm_with_ok(step): world.browser.get_alert().accept() + @step(u'I press the "([^"]*)" delete icon$') def i_press_the_category_delete_icon(step, category): if category == 'section': css = 'a.delete-button.delete-section-button span.delete-icon' elif category == 'subsection': - css='a.delete-button.delete-subsection-button span.delete-icon' + css = 'a.delete-button.delete-subsection-button span.delete-icon' else: assert False, 'Invalid category: %s' % category css_click(css) ####### HELPER FUNCTIONS ############## + + def create_studio_user( uname='robot', email='robot+studio@edx.org', password='test', - is_staff=False): + is_staff=False): studio_user = UserFactory.build( - username=uname, + username=uname, email=email, password=password, is_staff=is_staff) @@ -58,6 +65,7 @@ def create_studio_user( user_profile = UserProfileFactory(user=studio_user) + def flush_xmodule_store(): # Flush and initialize the module store # It needs the templates because it creates new records @@ -70,26 +78,32 @@ def flush_xmodule_store(): xmodule.modulestore.django.modulestore().collection.drop() xmodule.templates.update_templates() -def assert_css_with_text(css,text): + +def assert_css_with_text(css, text): assert_true(world.browser.is_element_present_by_css(css, 5)) assert_equal(world.browser.find_by_css(css).text, text) + def css_click(css): world.browser.find_by_css(css).first.click() + def css_fill(css, value): world.browser.find_by_css(css).first.fill(value) + def clear_courses(): flush_xmodule_store() + def fill_in_course_info( name='Robot Super Course', org='MITx', num='101'): - css_fill('.new-course-name',name) - css_fill('.new-course-org',org) - css_fill('.new-course-number',num) + css_fill('.new-course-name', name) + css_fill('.new-course-org', org) + css_fill('.new-course-number', num) + def log_into_studio( uname='robot', @@ -108,24 +122,27 @@ def log_into_studio( assert_true(world.browser.is_element_present_by_css('.new-course-button', 5)) + def create_a_course(): css_click('a.new-course-button') fill_in_course_info() css_click('input.new-course-save') assert_true(world.browser.is_element_present_by_css('a#courseware-tab', 5)) + def add_section(name='My Section'): link_css = 'a.new-courseware-section-button' css_click(link_css) name_css = '.new-section-name' save_css = '.new-section-name-save' - css_fill(name_css,name) + css_fill(name_css, name) css_click(save_css) + def add_subsection(name='Subsection One'): css = 'a.new-subsection-item' css_click(css) name_css = 'input.new-subsection-name-input' save_css = 'input.new-subsection-name-save' css_fill(name_css, name) - css_click(save_css) \ No newline at end of file + css_click(save_css) diff --git a/cms/djangoapps/contentstore/features/courses.py b/cms/djangoapps/contentstore/features/courses.py index 2c1cf6281a..d2d038a928 100644 --- a/cms/djangoapps/contentstore/features/courses.py +++ b/cms/djangoapps/contentstore/features/courses.py @@ -2,49 +2,61 @@ from lettuce import world, step from common import * ############### ACTIONS #################### + + @step('There are no courses$') def no_courses(step): clear_courses() + @step('I click the New Course button$') def i_click_new_course(step): css_click('.new-course-button') + @step('I fill in the new course information$') def i_fill_in_a_new_course_information(step): fill_in_course_info() + @step('I create a new course$') def i_create_a_course(step): create_a_course() + @step('I click the course link in My Courses$') def i_click_the_course_link_in_my_courses(step): course_css = 'span.class-name' css_click(course_css) ############ ASSERTIONS ################### + + @step('the Courseware page has loaded in Studio$') def courseware_page_has_loaded_in_studio(step): courseware_css = 'a#courseware-tab' assert world.browser.is_element_present_by_css(courseware_css) + @step('I see the course listed in My Courses$') def i_see_the_course_in_my_courses(step): course_css = 'span.class-name' - assert_css_with_text(course_css,'Robot Super Course') + assert_css_with_text(course_css, 'Robot Super Course') + @step('the course is loaded$') def course_is_loaded(step): class_css = 'a.class-name' - assert_css_with_text(class_css,'Robot Super Course') + assert_css_with_text(class_css, 'Robot Super Course') + @step('I am on the "([^"]*)" tab$') def i_am_on_tab(step, tab_name): header_css = 'div.inner-wrapper h1' - assert_css_with_text(header_css,tab_name) + assert_css_with_text(header_css, tab_name) + @step('I see a link for adding a new section$') def i_see_new_section_link(step): link_css = 'a.new-courseware-section-button' - assert_css_with_text(link_css,'New Section') + assert_css_with_text(link_css, 'New Section') diff --git a/cms/djangoapps/contentstore/features/factories.py b/cms/djangoapps/contentstore/features/factories.py index 389f2bac49..087ceaaa2d 100644 --- a/cms/djangoapps/contentstore/features/factories.py +++ b/cms/djangoapps/contentstore/features/factories.py @@ -3,6 +3,7 @@ from student.models import User, UserProfile, Registration from datetime import datetime import uuid + class UserProfileFactory(factory.Factory): FACTORY_FOR = UserProfile @@ -10,12 +11,14 @@ class UserProfileFactory(factory.Factory): name = 'Robot Studio' courseware = 'course.xml' + class RegistrationFactory(factory.Factory): FACTORY_FOR = Registration user = None activation_key = uuid.uuid4().hex + class UserFactory(factory.Factory): FACTORY_FOR = User @@ -28,4 +31,4 @@ class UserFactory(factory.Factory): is_active = True is_superuser = False last_login = datetime.now() - date_joined = datetime.now() \ No newline at end of file + date_joined = datetime.now() diff --git a/cms/djangoapps/contentstore/features/section.py b/cms/djangoapps/contentstore/features/section.py index 8ac30e2170..3bcaeab6c4 100644 --- a/cms/djangoapps/contentstore/features/section.py +++ b/cms/djangoapps/contentstore/features/section.py @@ -2,54 +2,65 @@ from lettuce import world, step from common import * ############### ACTIONS #################### + + @step('I have opened a new course in Studio$') def i_have_opened_a_new_course(step): clear_courses() log_into_studio() create_a_course() + @step('I click the new section link$') def i_click_new_section_link(step): link_css = 'a.new-courseware-section-button' css_click(link_css) + @step('I enter the section name and click save$') def i_save_section_name(step): name_css = '.new-section-name' save_css = '.new-section-name-save' - css_fill(name_css,'My Section') + css_fill(name_css, 'My Section') css_click(save_css) + @step('I have added a new section$') def i_have_added_new_section(step): add_section() - + + @step('I click the Edit link for the release date$') def i_click_the_edit_link_for_the_release_date(step): button_css = 'div.section-published-date a.edit-button' css_click(button_css) + @step('I save a new section release date$') def i_save_a_new_section_release_date(step): date_css = 'input.start-date.date.hasDatepicker' time_css = 'input.start-time.time.ui-timepicker-input' - css_fill(date_css,'12/25/2013') + css_fill(date_css, '12/25/2013') # click here to make the calendar go away css_click(time_css) - css_fill(time_css,'12:00am') + css_fill(time_css, '12:00am') css_click('a.save-button') ############ ASSERTIONS ################### + + @step('I see my section on the Courseware page$') def i_see_my_section_on_the_courseware_page(step): section_css = 'span.section-name-span' - assert_css_with_text(section_css,'My Section') + assert_css_with_text(section_css, 'My Section') + @step('the section does not exist$') def section_does_not_exist(step): css = 'span.section-name-span' assert world.browser.is_element_not_present_by_css(css) + @step('I see a release date for my section$') def i_see_a_release_date_for_my_section(step): import re @@ -63,18 +74,21 @@ def i_see_a_release_date_for_my_section(step): date_regex = '[01][0-9]\/[0-3][0-9]\/[12][0-9][0-9][0-9]' time_regex = '[0-2][0-9]:[0-5][0-9]' match_string = '%s %s at %s' % (msg, date_regex, time_regex) - assert re.match(match_string,status_text) + assert re.match(match_string, status_text) + @step('I see a link to create a new subsection$') def i_see_a_link_to_create_a_new_subsection(step): css = 'a.new-subsection-item' assert world.browser.is_element_present_by_css(css) + @step('the section release date picker is not visible$') def the_section_release_date_picker_not_visible(step): css = 'div.edit-subsection-publish-settings' assert False, world.browser.find_by_css(css).visible + @step('the section release date is updated$') def the_section_release_date_is_updated(step): css = 'span.published-status' diff --git a/cms/djangoapps/contentstore/features/signup.py b/cms/djangoapps/contentstore/features/signup.py index 7794511f94..e105b674f7 100644 --- a/cms/djangoapps/contentstore/features/signup.py +++ b/cms/djangoapps/contentstore/features/signup.py @@ -1,5 +1,6 @@ from lettuce import world, step + @step('I fill in the registration form$') def i_fill_in_the_registration_form(step): register_form = world.browser.find_by_css('form#register_form') @@ -9,15 +10,18 @@ def i_fill_in_the_registration_form(step): register_form.find_by_name('name').fill('Robot Studio') register_form.find_by_name('terms_of_service').check() + @step('I press the "([^"]*)" button on the registration form$') def i_press_the_button_on_the_registration_form(step, button): register_form = world.browser.find_by_css('form#register_form') register_form.find_by_value(button).click() + @step('I should see be on the studio home page$') def i_should_see_be_on_the_studio_home_page(step): assert world.browser.find_by_css('div.inner-wrapper') + @step(u'I should see the message "([^"]*)"$') def i_should_see_the_message(step, msg): - assert world.browser.is_text_present(msg, 5) \ No newline at end of file + assert world.browser.is_text_present(msg, 5) diff --git a/cms/djangoapps/contentstore/features/studio-overview-togglesection.py b/cms/djangoapps/contentstore/features/studio-overview-togglesection.py index 010678c0e8..00aa39455d 100644 --- a/cms/djangoapps/contentstore/features/studio-overview-togglesection.py +++ b/cms/djangoapps/contentstore/features/studio-overview-togglesection.py @@ -6,11 +6,13 @@ from nose.tools import assert_true, assert_false, assert_equal from logging import getLogger logger = getLogger(__name__) + @step(u'I have a course with no sections$') def have_a_course(step): clear_courses() course = CourseFactory.create() + @step(u'I have a course with 1 section$') def have_a_course_with_1_section(step): clear_courses() @@ -18,8 +20,9 @@ def have_a_course_with_1_section(step): section = ItemFactory.create(parent_location=course.location) subsection1 = ItemFactory.create( parent_location=section.location, - template = 'i4x://edx/templates/sequential/Empty', - display_name = 'Subsection One',) + template='i4x://edx/templates/sequential/Empty', + display_name='Subsection One',) + @step(u'I have a course with multiple sections$') def have_a_course_with_two_sections(step): @@ -28,19 +31,20 @@ def have_a_course_with_two_sections(step): section = ItemFactory.create(parent_location=course.location) subsection1 = ItemFactory.create( parent_location=section.location, - template = 'i4x://edx/templates/sequential/Empty', - display_name = 'Subsection One',) + template='i4x://edx/templates/sequential/Empty', + display_name='Subsection One',) section2 = ItemFactory.create( parent_location=course.location, display_name='Section Two',) subsection2 = ItemFactory.create( parent_location=section2.location, - template = 'i4x://edx/templates/sequential/Empty', - display_name = 'Subsection Alpha',) + template='i4x://edx/templates/sequential/Empty', + display_name='Subsection Alpha',) subsection3 = ItemFactory.create( parent_location=section2.location, - template = 'i4x://edx/templates/sequential/Empty', - display_name = 'Subsection Beta',) + template='i4x://edx/templates/sequential/Empty', + display_name='Subsection Beta',) + @step(u'I navigate to the course overview page$') def navigate_to_the_course_overview_page(step): @@ -48,15 +52,18 @@ def navigate_to_the_course_overview_page(step): course_locator = '.class-name' css_click(course_locator) + @step(u'I navigate to the courseware page of a course with multiple sections') def nav_to_the_courseware_page_of_a_course_with_multiple_sections(step): step.given('I have a course with multiple sections') step.given('I navigate to the course overview page') + @step(u'I add a section') def i_add_a_section(step): add_section(name='My New Section That I Just Added') + @step(u'I click the "([^"]*)" link$') def i_click_the_text_span(step, text): span_locator = '.toggle-button-sections span' @@ -65,16 +72,19 @@ def i_click_the_text_span(step, text): assert_equal(world.browser.find_by_css(span_locator).value, text) css_click(span_locator) + @step(u'I collapse the first section$') def i_collapse_a_section(step): collapse_locator = 'section.courseware-section a.collapse' css_click(collapse_locator) + @step(u'I expand the first section$') def i_expand_a_section(step): expand_locator = 'section.courseware-section a.expand' css_click(expand_locator) + @step(u'I see the "([^"]*)" link$') def i_see_the_span_with_text(step, text): span_locator = '.toggle-button-sections span' @@ -82,6 +92,7 @@ def i_see_the_span_with_text(step, text): assert_equal(world.browser.find_by_css(span_locator).value, text) assert_true(world.browser.find_by_css(span_locator).visible) + @step(u'I do not see the "([^"]*)" link$') def i_do_not_see_the_span_with_text(step, text): # Note that the span will exist on the page but not be visible @@ -89,6 +100,7 @@ def i_do_not_see_the_span_with_text(step, text): assert_true(world.browser.is_element_present_by_css(span_locator)) assert_false(world.browser.find_by_css(span_locator).visible) + @step(u'all sections are expanded$') def all_sections_are_expanded(step): subsection_locator = 'div.subsection-list' @@ -96,9 +108,10 @@ def all_sections_are_expanded(step): for s in subsections: assert_true(s.visible) + @step(u'all sections are collapsed$') def all_sections_are_expanded(step): subsection_locator = 'div.subsection-list' subsections = world.browser.find_by_css(subsection_locator) for s in subsections: - assert_false(s.visible) \ No newline at end of file + assert_false(s.visible) diff --git a/cms/djangoapps/contentstore/features/subsection.py b/cms/djangoapps/contentstore/features/subsection.py index ea614d3feb..e2041b8dbf 100644 --- a/cms/djangoapps/contentstore/features/subsection.py +++ b/cms/djangoapps/contentstore/features/subsection.py @@ -2,6 +2,8 @@ from lettuce import world, step from common import * ############### ACTIONS #################### + + @step('I have opened a new course section in Studio$') def i_have_opened_a_new_course_section(step): clear_courses() @@ -9,31 +11,37 @@ def i_have_opened_a_new_course_section(step): create_a_course() add_section() + @step('I click the New Subsection link') def i_click_the_new_subsection_link(step): css = 'a.new-subsection-item' css_click(css) + @step('I enter the subsection name and click save$') def i_save_subsection_name(step): name_css = 'input.new-subsection-name-input' save_css = 'input.new-subsection-name-save' - css_fill(name_css,'Subsection One') + css_fill(name_css, 'Subsection One') css_click(save_css) + @step('I have added a new subsection$') def i_have_added_a_new_subsection(step): add_subsection() ############ ASSERTIONS ################### + + @step('I see my subsection on the Courseware page$') def i_see_my_subsection_on_the_courseware_page(step): css = 'span.subsection-name' - assert world.browser.is_element_present_by_css(css) + assert world.browser.is_element_present_by_css(css) css = 'span.subsection-name-value' - assert_css_with_text(css,'Subsection One') + assert_css_with_text(css, 'Subsection One') + @step('the subsection does not exist$') def the_subsection_does_not_exist(step): css = 'span.subsection-name' - assert world.browser.is_element_not_present_by_css(css) \ No newline at end of file + assert world.browser.is_element_not_present_by_css(css) diff --git a/cms/djangoapps/contentstore/management/commands/clone.py b/cms/djangoapps/contentstore/management/commands/clone.py index 2357cd1dbd..abf04f3da3 100644 --- a/cms/djangoapps/contentstore/management/commands/clone.py +++ b/cms/djangoapps/contentstore/management/commands/clone.py @@ -14,6 +14,7 @@ from auth.authz import _copy_course_group # To run from command line: rake cms:clone SOURCE_LOC=MITx/111/Foo1 DEST_LOC=MITx/135/Foo3 # + class Command(BaseCommand): help = \ '''Clone a MongoDB backed course to another location''' diff --git a/cms/djangoapps/contentstore/management/commands/delete_course.py b/cms/djangoapps/contentstore/management/commands/delete_course.py index 0313f7faed..bb38e72d44 100644 --- a/cms/djangoapps/contentstore/management/commands/delete_course.py +++ b/cms/djangoapps/contentstore/management/commands/delete_course.py @@ -15,6 +15,7 @@ from auth.authz import _delete_course_group # To run from command line: rake cms:delete_course LOC=MITx/111/Foo1 # + class Command(BaseCommand): help = \ '''Delete a MongoDB backed course''' @@ -35,6 +36,3 @@ class Command(BaseCommand): print 'removing User permissions from course....' # in the django layer, we need to remove all the user permissions groups associated with this course _delete_course_group(loc) - - - diff --git a/cms/djangoapps/contentstore/management/commands/prompt.py b/cms/djangoapps/contentstore/management/commands/prompt.py index 9c8fd81d45..211c48406c 100644 --- a/cms/djangoapps/contentstore/management/commands/prompt.py +++ b/cms/djangoapps/contentstore/management/commands/prompt.py @@ -1,5 +1,6 @@ import sys + def query_yes_no(question, default="yes"): """Ask a yes/no question via raw_input() and return their answer. @@ -30,4 +31,4 @@ def query_yes_no(question, default="yes"): return valid[choice] else: sys.stdout.write("Please respond with 'yes' or 'no' "\ - "(or 'y' or 'n').\n") \ No newline at end of file + "(or 'y' or 'n').\n") diff --git a/cms/djangoapps/contentstore/module_info_model.py b/cms/djangoapps/contentstore/module_info_model.py index 3b783c8815..796184baa0 100644 --- a/cms/djangoapps/contentstore/module_info_model.py +++ b/cms/djangoapps/contentstore/module_info_model.py @@ -7,7 +7,8 @@ from lxml import etree import re from django.http import HttpResponseBadRequest, Http404 -def get_module_info(store, location, parent_location = None, rewrite_static_links = False): + +def get_module_info(store, location, parent_location=None, rewrite_static_links=False): try: if location.revision is None: module = store.get_item(location) @@ -36,6 +37,7 @@ def get_module_info(store, location, parent_location = None, rewrite_static_link 'metadata': module.metadata } + def set_module_info(store, location, post_data): module = None isNew = False diff --git a/cms/djangoapps/contentstore/tests/factories.py b/cms/djangoapps/contentstore/tests/factories.py index f9c505d68f..d15610f11c 100644 --- a/cms/djangoapps/contentstore/tests/factories.py +++ b/cms/djangoapps/contentstore/tests/factories.py @@ -5,6 +5,7 @@ from student.models import (User, UserProfile, Registration, CourseEnrollmentAllowed) from django.contrib.auth.models import Group + class UserProfileFactory(Factory): FACTORY_FOR = UserProfile @@ -12,12 +13,14 @@ class UserProfileFactory(Factory): name = 'Robot Studio' courseware = 'course.xml' + class RegistrationFactory(Factory): FACTORY_FOR = Registration user = None activation_key = uuid4().hex + class UserFactory(Factory): FACTORY_FOR = User @@ -32,11 +35,13 @@ class UserFactory(Factory): last_login = datetime.now() date_joined = datetime.now() + class GroupFactory(Factory): FACTORY_FOR = Group name = 'test_group' + class CourseEnrollmentAllowedFactory(Factory): FACTORY_FOR = CourseEnrollmentAllowed diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index ce7d9e757c..72ae3821cc 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -35,6 +35,7 @@ TEST_DATA_MODULESTORE = copy.deepcopy(settings.MODULESTORE) TEST_DATA_MODULESTORE['default']['OPTIONS']['fs_root'] = path('common/test/data') TEST_DATA_MODULESTORE['direct']['OPTIONS']['fs_root'] = path('common/test/data') + @override_settings(MODULESTORE=TEST_DATA_MODULESTORE) class ContentStoreToyCourseTest(ModuleStoreTestCase): """ @@ -77,20 +78,20 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): def test_static_tab_reordering(self): import_from_xml(modulestore(), 'common/test/data/', ['full']) - + ms = modulestore('direct') - course = ms.get_item(Location(['i4x','edX','full','course','6.002_Spring_2012', None])) + course = ms.get_item(Location(['i4x', 'edX', 'full', 'course', '6.002_Spring_2012', None])) # reverse the ordering reverse_tabs = [] for tab in course.tabs: if tab['type'] == 'static_tab': reverse_tabs.insert(0, 'i4x://edX/full/static_tab/{0}'.format(tab['url_slug'])) - - resp = self.client.post(reverse('reorder_static_tabs'), json.dumps({'tabs':reverse_tabs}), "application/json") - course = ms.get_item(Location(['i4x','edX','full','course','6.002_Spring_2012', None])) - + resp = self.client.post(reverse('reorder_static_tabs'), json.dumps({'tabs': reverse_tabs}), "application/json") + + course = ms.get_item(Location(['i4x', 'edX', 'full', 'course', '6.002_Spring_2012', None])) + # compare to make sure that the tabs information is in the expected order after the server call course_tabs = [] for tab in course.tabs: @@ -101,17 +102,17 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): def test_about_overrides(self): ''' - This test case verifies that a course can use specialized override for about data, e.g. /about/Fall_2012/effort.html + This test case verifies that a course can use specialized override for about data, e.g. /about/Fall_2012/effort.html while there is a base definition in /about/effort.html ''' import_from_xml(modulestore(), 'common/test/data/', ['full']) ms = modulestore('direct') - effort = ms.get_item(Location(['i4x','edX','full','about','effort', None])) - self.assertEqual(effort.definition['data'],'6 hours') + effort = ms.get_item(Location(['i4x', 'edX', 'full', 'about', 'effort', None])) + self.assertEqual(effort.definition['data'], '6 hours') # this one should be in a non-override folder - effort = ms.get_item(Location(['i4x','edX','full','about','end_date', None])) - self.assertEqual(effort.definition['data'],'TBD') + effort = ms.get_item(Location(['i4x', 'edX', 'full', 'about', 'end_date', None])) + self.assertEqual(effort.definition['data'], 'TBD') def test_remove_hide_progress_tab(self): import_from_xml(modulestore(), 'common/test/data/', ['full']) @@ -147,14 +148,14 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): clone_course(ms, cs, source_location, dest_location) - # now loop through all the units in the course and verify that the clone can render them, which + # now loop through all the units in the course and verify that the clone can render them, which # means the objects are at least present - items = ms.get_items(Location(['i4x','edX', 'full', 'vertical', None])) + items = ms.get_items(Location(['i4x', 'edX', 'full', 'vertical', None])) self.assertGreater(len(items), 0) - clone_items = ms.get_items(Location(['i4x', 'MITx','999','vertical', None])) + clone_items = ms.get_items(Location(['i4x', 'MITx', '999', 'vertical', None])) self.assertGreater(len(clone_items), 0) for descriptor in items: - new_loc = descriptor.location._replace(org = 'MITx', course='999') + new_loc = descriptor.location._replace(org='MITx', course='999') print "Checking {0} should now also be at {1}".format(descriptor.location.url(), new_loc.url()) resp = self.client.get(reverse('edit_unit', kwargs={'location': new_loc.url()})) self.assertEqual(resp.status_code, 200) @@ -169,7 +170,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): delete_course(ms, cs, location) - items = ms.get_items(Location(['i4x','edX', 'full', 'vertical', None])) + items = ms.get_items(Location(['i4x', 'edX', 'full', 'vertical', None])) self.assertEqual(len(items), 0) def verify_content_existence(self, modulestore, root_dir, location, dirname, category_name, filename_suffix=''): @@ -185,7 +186,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): def test_export_course(self): ms = modulestore('direct') - cs = contentstore() + cs = contentstore() import_from_xml(ms, 'common/test/data/', ['full']) location = CourseDescriptor.id_to_location('edX/full/6.002_Spring_2012') @@ -205,7 +206,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): # check for custom_tags self.verify_content_existence(ms, root_dir, location, 'custom_tags', 'custom_tag_template') - + # remove old course delete_course(ms, cs, location) @@ -213,23 +214,23 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): # reimport import_from_xml(ms, root_dir, ['test_export']) - items = ms.get_items(Location(['i4x','edX', 'full', 'vertical', None])) + items = ms.get_items(Location(['i4x', 'edX', 'full', 'vertical', None])) self.assertGreater(len(items), 0) for descriptor in items: print "Checking {0}....".format(descriptor.location.url()) resp = self.client.get(reverse('edit_unit', kwargs={'location': descriptor.location.url()})) self.assertEqual(resp.status_code, 200) - shutil.rmtree(root_dir) + shutil.rmtree(root_dir) def test_course_handouts_rewrites(self): ms = modulestore('direct') - cs = contentstore() + cs = contentstore() # import a test course - import_from_xml(ms, 'common/test/data/', ['full']) + import_from_xml(ms, 'common/test/data/', ['full']) - handout_location= Location(['i4x', 'edX', 'full', 'course_info', 'handouts']) + handout_location = Location(['i4x', 'edX', 'full', 'course_info', 'handouts']) # get module info resp = self.client.get(reverse('module_info', kwargs={'module_location': handout_location})) @@ -239,7 +240,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): # check that /static/ has been converted to the full path # note, we know the link it should be because that's what in the 'full' course in the test data - self.assertContains(resp, '/c4x/edX/full/asset/handouts_schematic_tutorial.pdf') + self.assertContains(resp, '/c4x/edX/full/asset/handouts_schematic_tutorial.pdf') class ContentStoreTest(ModuleStoreTestCase): @@ -302,7 +303,7 @@ class ContentStoreTest(ModuleStoreTestCase): data = parse_json(resp) self.assertEqual(resp.status_code, 200) - self.assertEqual(data['ErrMsg'], + self.assertEqual(data['ErrMsg'], 'There is already a course defined with the same organization and course number.') def test_create_course_with_bad_organization(self): @@ -319,7 +320,7 @@ class ContentStoreTest(ModuleStoreTestCase): """Test viewing the index page with no courses""" # Create a course so there is something to view resp = self.client.get(reverse('index')) - self.assertContains(resp, + self.assertContains(resp, '

                  My Courses

                  ', status_code=200, html=True) @@ -355,7 +356,7 @@ class ContentStoreTest(ModuleStoreTestCase): } resp = self.client.get(reverse('course_index', kwargs=data)) - self.assertContains(resp, + self.assertContains(resp, 'Robot Super Course', status_code=200, html=True) @@ -365,8 +366,8 @@ class ContentStoreTest(ModuleStoreTestCase): CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') section_data = { - 'parent_location' : 'i4x://MITx/999/course/Robot_Super_Course', - 'template' : 'i4x://edx/templates/chapter/Empty', + 'parent_location': 'i4x://MITx/999/course/Robot_Super_Course', + 'template': 'i4x://edx/templates/chapter/Empty', 'display_name': 'Section One', } @@ -374,7 +375,7 @@ class ContentStoreTest(ModuleStoreTestCase): self.assertEqual(resp.status_code, 200) data = parse_json(resp) - self.assertRegexpMatches(data['id'], + self.assertRegexpMatches(data['id'], '^i4x:\/\/MITx\/999\/chapter\/([0-9]|[a-f]){32}$') def test_capa_module(self): @@ -382,8 +383,8 @@ class ContentStoreTest(ModuleStoreTestCase): CourseFactory.create(org='MITx', course='999', display_name='Robot Super Course') problem_data = { - 'parent_location' : 'i4x://MITx/999/course/Robot_Super_Course', - 'template' : 'i4x://edx/templates/problem/Empty' + 'parent_location': 'i4x://MITx/999/course/Robot_Super_Course', + 'template': 'i4x://edx/templates/problem/Empty' } resp = self.client.post(reverse('clone_item'), problem_data) diff --git a/cms/djangoapps/contentstore/tests/test_core_caching.py b/cms/djangoapps/contentstore/tests/test_core_caching.py index ed41e5cc64..676627a045 100644 --- a/cms/djangoapps/contentstore/tests/test_core_caching.py +++ b/cms/djangoapps/contentstore/tests/test_core_caching.py @@ -3,6 +3,7 @@ from xmodule.modulestore import Location from xmodule.contentstore.content import StaticContent from django.test import TestCase + class Content: def __init__(self, location, content): self.location = location @@ -11,6 +12,7 @@ class Content: def get_id(self): return StaticContent.get_id_from_location(self.location) + class CachingTestCase(TestCase): # Tests for https://edx.lighthouseapp.com/projects/102637/tickets/112-updating-asset-does-not-refresh-the-cached-copy unicodeLocation = Location(u'c4x', u'mitX', u'800', u'thumbnail', u'monsters.jpg') diff --git a/cms/djangoapps/contentstore/tests/test_course_settings.py b/cms/djangoapps/contentstore/tests/test_course_settings.py index f47733b32c..84e79b9670 100644 --- a/cms/djangoapps/contentstore/tests/test_course_settings.py +++ b/cms/djangoapps/contentstore/tests/test_course_settings.py @@ -27,21 +27,21 @@ from xmodule.modulestore.tests.factories import CourseFactory class ConvertersTestCase(TestCase): @staticmethod def struct_to_datetime(struct_time): - return datetime.datetime(struct_time.tm_year, struct_time.tm_mon, struct_time.tm_mday, struct_time.tm_hour, - struct_time.tm_min, struct_time.tm_sec, tzinfo = UTC()) - + return datetime.datetime(struct_time.tm_year, struct_time.tm_mon, struct_time.tm_mday, struct_time.tm_hour, + struct_time.tm_min, struct_time.tm_sec, tzinfo=UTC()) + def compare_dates(self, date1, date2, expected_delta): dt1 = ConvertersTestCase.struct_to_datetime(date1) dt2 = ConvertersTestCase.struct_to_datetime(date2) self.assertEqual(dt1 - dt2, expected_delta, str(date1) + "-" + str(date2) + "!=" + str(expected_delta)) - + def test_iso_to_struct(self): self.compare_dates(converters.jsdate_to_time("2013-01-01"), converters.jsdate_to_time("2012-12-31"), datetime.timedelta(days=1)) self.compare_dates(converters.jsdate_to_time("2013-01-01T00"), converters.jsdate_to_time("2012-12-31T23"), datetime.timedelta(hours=1)) self.compare_dates(converters.jsdate_to_time("2013-01-01T00:00"), converters.jsdate_to_time("2012-12-31T23:59"), datetime.timedelta(minutes=1)) self.compare_dates(converters.jsdate_to_time("2013-01-01T00:00:00"), converters.jsdate_to_time("2012-12-31T23:59:59"), datetime.timedelta(seconds=1)) - - + + class CourseTestCase(ModuleStoreTestCase): def setUp(self): """ @@ -68,13 +68,14 @@ class CourseTestCase(ModuleStoreTestCase): self.client = Client() self.client.login(username=uname, password=password) - t='i4x://edx/templates/course/Empty' - o='MITx' - n='999' - dn='Robot Super Course' + t = 'i4x://edx/templates/course/Empty' + o = 'MITx' + n = '999' + dn = 'Robot Super Course' self.course_location = Location('i4x', o, n, 'course', 'Robot_Super_Course') CourseFactory.create(template=t, org=o, number=n, display_name=dn) + class CourseDetailsTestCase(CourseTestCase): def test_virgin_fetch(self): details = CourseDetails.fetch(self.course_location) @@ -86,7 +87,7 @@ class CourseDetailsTestCase(CourseTestCase): self.assertEqual(details.overview, "", "overview somehow initialized" + details.overview) self.assertIsNone(details.intro_video, "intro_video somehow initialized" + str(details.intro_video)) self.assertIsNone(details.effort, "effort somehow initialized" + str(details.effort)) - + def test_encoder(self): details = CourseDetails.fetch(self.course_location) jsondetails = json.dumps(details, cls=CourseSettingsEncoder) @@ -100,7 +101,7 @@ class CourseDetailsTestCase(CourseTestCase): self.assertEqual(jsondetails['overview'], "", "overview somehow initialized") self.assertIsNone(jsondetails['intro_video'], "intro_video somehow initialized") self.assertIsNone(jsondetails['effort'], "effort somehow initialized") - + def test_update_and_fetch(self): ## NOTE: I couldn't figure out how to validly test time setting w/ all the conversions jsondetails = CourseDetails.fetch(self.course_location) @@ -118,6 +119,7 @@ class CourseDetailsTestCase(CourseTestCase): self.assertEqual(CourseDetails.update_from_json(jsondetails.__dict__).effort, jsondetails.effort, "After set effort") + class CourseDetailsViewTest(CourseTestCase): def alter_field(self, url, details, field, val): setattr(details, field, val) @@ -128,36 +130,36 @@ class CourseDetailsViewTest(CourseTestCase): payload['end_date'] = CourseDetailsViewTest.convert_datetime_to_iso(details.end_date) payload['enrollment_start'] = CourseDetailsViewTest.convert_datetime_to_iso(details.enrollment_start) payload['enrollment_end'] = CourseDetailsViewTest.convert_datetime_to_iso(details.enrollment_end) - resp = self.client.post(url, json.dumps(payload), "application/json") + resp = self.client.post(url, json.dumps(payload), "application/json") self.compare_details_with_encoding(json.loads(resp.content), details.__dict__, field + str(val)) - + @staticmethod def convert_datetime_to_iso(datetime): if datetime is not None: return datetime.isoformat("T") else: return None - + def test_update_and_fetch(self): details = CourseDetails.fetch(self.course_location) - - resp = self.client.get(reverse('course_settings', kwargs={'org' : self.course_location.org, 'course' : self.course_location.course, - 'name' : self.course_location.name })) + + resp = self.client.get(reverse('course_settings', kwargs={'org': self.course_location.org, 'course': self.course_location.course, + 'name': self.course_location.name})) self.assertContains(resp, '
                1. Course Details
                2. ', status_code=200, html=True) - # resp s/b json from here on - url = reverse('course_settings', kwargs={'org' : self.course_location.org, 'course' : self.course_location.course, - 'name' : self.course_location.name, 'section' : 'details' }) + # resp s/b json from here on + url = reverse('course_settings', kwargs={'org': self.course_location.org, 'course': self.course_location.course, + 'name': self.course_location.name, 'section': 'details'}) resp = self.client.get(url) self.compare_details_with_encoding(json.loads(resp.content), details.__dict__, "virgin get") utc = UTC() - self.alter_field(url, details, 'start_date', datetime.datetime(2012,11,12,1,30, tzinfo=utc)) - self.alter_field(url, details, 'start_date', datetime.datetime(2012,11,1,13,30, tzinfo=utc)) - self.alter_field(url, details, 'end_date', datetime.datetime(2013,2,12,1,30, tzinfo=utc)) - self.alter_field(url, details, 'enrollment_start', datetime.datetime(2012,10,12,1,30, tzinfo=utc)) + self.alter_field(url, details, 'start_date', datetime.datetime(2012, 11, 12, 1, 30, tzinfo=utc)) + self.alter_field(url, details, 'start_date', datetime.datetime(2012, 11, 1, 13, 30, tzinfo=utc)) + self.alter_field(url, details, 'end_date', datetime.datetime(2013, 2, 12, 1, 30, tzinfo=utc)) + self.alter_field(url, details, 'enrollment_start', datetime.datetime(2012, 10, 12, 1, 30, tzinfo=utc)) - self.alter_field(url, details, 'enrollment_end', datetime.datetime(2012,11,15,1,30, tzinfo=utc)) + self.alter_field(url, details, 'enrollment_end', datetime.datetime(2012, 11, 15, 1, 30, tzinfo=utc)) self.alter_field(url, details, 'overview', "Overview") self.alter_field(url, details, 'intro_video', "intro_video") self.alter_field(url, details, 'effort', "effort") @@ -170,7 +172,7 @@ class CourseDetailsViewTest(CourseTestCase): self.assertEqual(details['overview'], encoded['overview'], context + " overviews not ==") self.assertEqual(details['intro_video'], encoded.get('intro_video', None), context + " intro_video not ==") self.assertEqual(details['effort'], encoded['effort'], context + " efforts not ==") - + def compare_date_fields(self, details, encoded, context, field): if details[field] is not None: if field in encoded and encoded[field] is not None: @@ -182,14 +184,15 @@ class CourseDetailsViewTest(CourseTestCase): else: details_encoded = jsdate_to_time(details[field]) dt2 = ConvertersTestCase.struct_to_datetime(details_encoded) - + expected_delta = datetime.timedelta(0) self.assertEqual(dt1 - dt2, expected_delta, str(dt1) + "!=" + str(dt2) + " at " + context) else: self.fail(field + " missing from encoded but in details at " + context) elif field in encoded and encoded[field] is not None: self.fail(field + " included in encoding but missing from details at " + context) - + + class CourseGradingTest(CourseTestCase): def test_initial_grader(self): descriptor = get_modulestore(self.course_location).get_item(self.course_location) @@ -209,56 +212,56 @@ class CourseGradingTest(CourseTestCase): self.assertEqual(self.course_location, test_grader.course_location, "Course locations") self.assertIsNotNone(test_grader.graders, "No graders") self.assertIsNotNone(test_grader.grade_cutoffs, "No cutoffs") - + for i, grader in enumerate(test_grader.graders): subgrader = CourseGradingModel.fetch_grader(self.course_location, i) self.assertDictEqual(grader, subgrader, str(i) + "th graders not equal") - + subgrader = CourseGradingModel.fetch_grader(self.course_location.list(), 0) self.assertDictEqual(test_grader.graders[0], subgrader, "failed with location as list") - + def test_fetch_cutoffs(self): test_grader = CourseGradingModel.fetch_cutoffs(self.course_location) # ??? should this check that it's at least a dict? (expected is { "pass" : 0.5 } I think) self.assertIsNotNone(test_grader, "No cutoffs via fetch") - + test_grader = CourseGradingModel.fetch_cutoffs(self.course_location.url()) self.assertIsNotNone(test_grader, "No cutoffs via fetch with url") - + def test_fetch_grace(self): test_grader = CourseGradingModel.fetch_grace_period(self.course_location) # almost a worthless test self.assertIn('grace_period', test_grader, "No grace via fetch") - + test_grader = CourseGradingModel.fetch_grace_period(self.course_location.url()) self.assertIn('grace_period', test_grader, "No cutoffs via fetch with url") - + def test_update_from_json(self): test_grader = CourseGradingModel.fetch(self.course_location) altered_grader = CourseGradingModel.update_from_json(test_grader.__dict__) self.assertDictEqual(test_grader.__dict__, altered_grader.__dict__, "Noop update") - + test_grader.graders[0]['weight'] = test_grader.graders[0].get('weight') * 2 altered_grader = CourseGradingModel.update_from_json(test_grader.__dict__) self.assertDictEqual(test_grader.__dict__, altered_grader.__dict__, "Weight[0] * 2") - + test_grader.grade_cutoffs['D'] = 0.3 altered_grader = CourseGradingModel.update_from_json(test_grader.__dict__) self.assertDictEqual(test_grader.__dict__, altered_grader.__dict__, "cutoff add D") - + test_grader.grace_period = {'hours' : '4'} altered_grader = CourseGradingModel.update_from_json(test_grader.__dict__) self.assertDictEqual(test_grader.__dict__, altered_grader.__dict__, "4 hour grace period") - + def test_update_grader_from_json(self): test_grader = CourseGradingModel.fetch(self.course_location) altered_grader = CourseGradingModel.update_grader_from_json(test_grader.course_location, test_grader.graders[1]) self.assertDictEqual(test_grader.graders[1], altered_grader, "Noop update") - + test_grader.graders[1]['min_count'] = test_grader.graders[1].get('min_count') + 2 altered_grader = CourseGradingModel.update_grader_from_json(test_grader.course_location, test_grader.graders[1]) self.assertDictEqual(test_grader.graders[1], altered_grader, "min_count[1] + 2") - + test_grader.graders[1]['drop_count'] = test_grader.graders[1].get('drop_count') + 1 altered_grader = CourseGradingModel.update_grader_from_json(test_grader.course_location, test_grader.graders[1]) self.assertDictEqual(test_grader.graders[1], altered_grader, "drop_count[1] + 2") diff --git a/cms/djangoapps/contentstore/tests/test_course_updates.py b/cms/djangoapps/contentstore/tests/test_course_updates.py index 96e4468b31..c57f1322f5 100644 --- a/cms/djangoapps/contentstore/tests/test_course_updates.py +++ b/cms/djangoapps/contentstore/tests/test_course_updates.py @@ -2,29 +2,30 @@ from cms.djangoapps.contentstore.tests.test_course_settings import CourseTestCas from django.core.urlresolvers import reverse import json + class CourseUpdateTest(CourseTestCase): def test_course_update(self): # first get the update to force the creation - url = reverse('course_info', kwargs={'org' : self.course_location.org, 'course' : self.course_location.course, - 'name' : self.course_location.name }) + url = reverse('course_info', kwargs={'org': self.course_location.org, 'course': self.course_location.course, + 'name': self.course_location.name}) self.client.get(url) content = '' - payload = { 'content' : content, - 'date' : 'January 8, 2013'} - url = reverse('course_info', kwargs={'org' : self.course_location.org, 'course' : self.course_location.course, - 'provided_id' : ''}) - + payload = {'content': content, + 'date': 'January 8, 2013'} + url = reverse('course_info', kwargs={'org': self.course_location.org, 'course': self.course_location.course, + 'provided_id': ''}) + resp = self.client.post(url, json.dumps(payload), "application/json") - - payload= json.loads(resp.content) - + + payload = json.loads(resp.content) + self.assertHTMLEqual(content, payload['content'], "single iframe") - - url = reverse('course_info', kwargs={'org' : self.course_location.org, 'course' : self.course_location.course, - 'provided_id' : payload['id']}) + + url = reverse('course_info', kwargs={'org': self.course_location.org, 'course': self.course_location.course, + 'provided_id': payload['id']}) content += '
                  div

                  p

                  ' payload['content'] = content resp = self.client.post(url, json.dumps(payload), "application/json") - + self.assertHTMLEqual(content, json.loads(resp.content)['content'], "iframe w/ div") diff --git a/cms/djangoapps/contentstore/tests/test_utils.py b/cms/djangoapps/contentstore/tests/test_utils.py index 6811d64c12..09e3b045f9 100644 --- a/cms/djangoapps/contentstore/tests/test_utils.py +++ b/cms/djangoapps/contentstore/tests/test_utils.py @@ -2,15 +2,16 @@ from cms.djangoapps.contentstore import utils import mock from django.test import TestCase + class LMSLinksTestCase(TestCase): def about_page_test(self): - location = 'i4x','mitX','101','course', 'test' + location = 'i4x', 'mitX', '101', 'course', 'test' utils.get_course_id = mock.Mock(return_value="mitX/101/test") link = utils.get_lms_link_for_about_page(location) self.assertEquals(link, "//localhost:8000/courses/mitX/101/test/about") def ls_link_test(self): - location = 'i4x','mitX','101','vertical', 'contacting_us' + location = 'i4x', 'mitX', '101', 'vertical', 'contacting_us' utils.get_course_id = mock.Mock(return_value="mitX/101/test") link = utils.get_lms_link_for_item(location, False) self.assertEquals(link, "//localhost:8000/courses/mitX/101/test/jump_to/i4x://mitX/101/vertical/contacting_us") diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py index df2e4dcc79..9af5b09276 100644 --- a/cms/djangoapps/contentstore/tests/tests.py +++ b/cms/djangoapps/contentstore/tests/tests.py @@ -28,6 +28,7 @@ from xmodule.seq_module import SequenceDescriptor from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from utils import ModuleStoreTestCase, parse_json, user, registration + class ContentStoreTestCase(ModuleStoreTestCase): def _login(self, email, pw): """Login. View should always return 200. The success/fail is in the diff --git a/cms/djangoapps/contentstore/tests/utils.py b/cms/djangoapps/contentstore/tests/utils.py index 7fa5b76685..4e3510463f 100644 --- a/cms/djangoapps/contentstore/tests/utils.py +++ b/cms/djangoapps/contentstore/tests/utils.py @@ -11,8 +11,9 @@ from django.contrib.auth.models import User import xmodule.modulestore.django from xmodule.templates import update_templates + class ModuleStoreTestCase(TestCase): - """ Subclass for any test case that uses the mongodb + """ Subclass for any test case that uses the mongodb module store. This populates a uniquely named modulestore collection with templates before running the TestCase and drops it they are finished. """ @@ -22,7 +23,7 @@ class ModuleStoreTestCase(TestCase): # Use the current seconds since epoch to differentiate # the mongo collections on jenkins. - sec_since_epoch = '%s' % int(time()*100) + sec_since_epoch = '%s' % int(time() * 100) self.orig_MODULESTORE = copy.deepcopy(settings.MODULESTORE) self.test_MODULESTORE = self.orig_MODULESTORE self.test_MODULESTORE['default']['OPTIONS']['collection'] = 'modulestore_%s' % sec_since_epoch @@ -50,14 +51,17 @@ class ModuleStoreTestCase(TestCase): super(ModuleStoreTestCase, self)._post_teardown() + def parse_json(response): """Parse response, which is assumed to be json""" return json.loads(response.content) + def user(email): """look up a user by email""" return User.objects.get(email=email) + def registration(email): """look up registration object by email""" return Registration.objects.get(user__email=email) diff --git a/cms/djangoapps/contentstore/utils.py b/cms/djangoapps/contentstore/utils.py index da2993e463..b14dd8b353 100644 --- a/cms/djangoapps/contentstore/utils.py +++ b/cms/djangoapps/contentstore/utils.py @@ -5,18 +5,20 @@ from xmodule.modulestore.exceptions import ItemNotFoundError DIRECT_ONLY_CATEGORIES = ['course', 'chapter', 'sequential', 'about', 'static_tab', 'course_info'] + def get_modulestore(location): """ Returns the correct modulestore to use for modifying the specified location """ if not isinstance(location, Location): location = Location(location) - + if location.category in DIRECT_ONLY_CATEGORIES: return modulestore('direct') else: return modulestore() + def get_course_location_for_item(location): ''' cdodge: for a given Xmodule, return the course that it belongs to @@ -46,6 +48,7 @@ def get_course_location_for_item(location): return location + def get_course_for_item(location): ''' cdodge: for a given Xmodule, return the course that it belongs to @@ -85,6 +88,7 @@ def get_lms_link_for_item(location, preview=False): return lms_link + def get_lms_link_for_about_page(location): """ Returns the url to the course about page from the location tuple. @@ -99,6 +103,7 @@ def get_lms_link_for_about_page(location): return lms_link + def get_course_id(location): """ Returns the course_id from a given the location tuple. @@ -106,6 +111,7 @@ def get_course_id(location): # TODO: These will need to be changed to point to the particular instance of this problem in the particular course return modulestore().get_containing_courses(Location(location))[0].id + class UnitState(object): draft = 'draft' private = 'private' @@ -135,6 +141,7 @@ def compute_unit_state(unit): def get_date_display(date): return date.strftime("%d %B, %Y at %I:%M %p") + def update_item(location, value): """ If value is None, delete the db entry. Otherwise, update it using the correct modulestore. @@ -142,4 +149,4 @@ def update_item(location, value): if value is None: get_modulestore(location).delete_item(location) else: - get_modulestore(location).update_item(location, value) \ No newline at end of file + get_modulestore(location).update_item(location, value) diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index fb63cb34ed..137e71b24a 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -81,6 +81,7 @@ def signup(request): csrf_token = csrf(request)['csrf_token'] return render_to_response('signup.html', {'csrf': csrf_token}) + @ssl_login_shortcut @ensure_csrf_cookie def login_page(request): @@ -114,7 +115,7 @@ def index(request): courses = filter(course_filter, courses) return render_to_response('index.html', { - 'new_course_template' : Location('i4x', 'edx', 'templates', 'course', 'Empty'), + 'new_course_template': Location('i4x', 'edx', 'templates', 'course', 'Empty'), 'courses': [(course.metadata.get('display_name'), reverse('course_index', args=[ course.location.org, @@ -159,10 +160,10 @@ def course_index(request, org, course, name): if not has_access(request.user, location): raise PermissionDenied() - upload_asset_callback_url = reverse('upload_asset', kwargs = { - 'org' : org, - 'course' : course, - 'coursename' : name + upload_asset_callback_url = reverse('upload_asset', kwargs={ + 'org': org, + 'course': course, + 'coursename': name }) course = modulestore().get_item(location) @@ -213,7 +214,7 @@ def edit_subsection(request, location): # remove all metadata from the generic dictionary that is presented in a more normalized UI - policy_metadata = dict((key,value) for key, value in item.metadata.iteritems() + policy_metadata = dict((key, value) for key, value in item.metadata.iteritems() if key not in ['display_name', 'start', 'due', 'format'] and key not in item.system_metadata_fields) can_view_live = False @@ -233,9 +234,9 @@ def edit_subsection(request, location): 'course_graders': json.dumps(CourseGradingModel.fetch(course.location).graders), 'parent_location': course.location, 'parent_item': parent, - 'policy_metadata' : policy_metadata, - 'subsection_units' : subsection_units, - 'can_view_live' : can_view_live + 'policy_metadata': policy_metadata, + 'subsection_units': subsection_units, + 'can_view_live': can_view_live }) @@ -294,7 +295,7 @@ def edit_unit(request, location): # so let's generate the link url here # need to figure out where this item is in the list of children as the preview will need this - index =1 + index = 1 for child in containing_subsection.get_children(): if child.location == item.location: break @@ -348,6 +349,7 @@ def preview_component(request, location): 'editor': wrap_xmodule(component.get_html, component, 'xmodule_edit.html')(), }) + @expect_json @login_required @ensure_csrf_cookie @@ -362,7 +364,7 @@ def assignment_type_update(request, org, course, category, name): if request.method == 'GET': return HttpResponse(json.dumps(CourseGradingModel.get_section_grader_type(location)), mimetype="application/json") - elif request.method == 'POST': # post or put, doesn't matter. + elif request.method == 'POST': # post or put, doesn't matter. return HttpResponse(json.dumps(CourseGradingModel.update_section_grader_type(location, request.POST)), mimetype="application/json") @@ -527,7 +529,7 @@ def load_preview_module(request, preview_id, descriptor, instance_state, shared_ module.get_html = replace_static_urls( module.get_html, module.metadata.get('data_dir', module.location.course), - course_namespace = Location([module.location.tag, module.location.org, module.location.course, None, None]) + course_namespace=Location([module.location.tag, module.location.org, module.location.course, None, None]) ) save_preview_state(request, preview_id, descriptor.location.url(), module.get_instance_state(), module.get_shared_state()) @@ -588,7 +590,7 @@ def delete_item(request): # semantics of delete_item whereby the store is draft aware. Right now calling # delete_item on a vertical tries to delete the draft version leaving the # requested delete to never occur - if item.location.revision is None and item.location.category=='vertical' and delete_all_versions: + if item.location.revision is None and item.location.category == 'vertical' and delete_all_versions: modulestore('direct').delete_item(item.location) return HttpResponse() @@ -664,6 +666,7 @@ def create_draft(request): return HttpResponse() + @login_required @expect_json def publish_draft(request): @@ -693,6 +696,7 @@ def unpublish_unit(request): return HttpResponse() + @login_required @expect_json def clone_item(request): @@ -725,6 +729,8 @@ def clone_item(request): #@login_required #@ensure_csrf_cookie + + def upload_asset(request, org, course, coursename): ''' cdodge: this method allows for POST uploading of files into the course asset library, which will @@ -775,11 +781,11 @@ def upload_asset(request, org, course, coursename): # readback the saved content - we need the database timestamp readback = contentstore().find(content.location) - response_payload = {'displayname' : content.name, - 'uploadDate' : get_date_display(readback.last_modified_at), - 'url' : StaticContent.get_url_path_from_location(content.location), - 'thumb_url' : StaticContent.get_url_path_from_location(thumbnail_location) if thumbnail_content is not None else None, - 'msg' : 'Upload completed' + response_payload = {'displayname': content.name, + 'uploadDate': get_date_display(readback.last_modified_at), + 'url': StaticContent.get_url_path_from_location(content.location), + 'thumb_url': StaticContent.get_url_path_from_location(thumbnail_location) if thumbnail_content is not None else None, + 'msg': 'Upload completed' } response = HttpResponse(json.dumps(response_payload)) @@ -789,6 +795,8 @@ def upload_asset(request, org, course, coursename): ''' This view will return all CMS users who are editors for the specified course ''' + + @login_required @ensure_csrf_cookie def manage_users(request, location): @@ -803,16 +811,16 @@ def manage_users(request, location): 'active_tab': 'users', 'context_course': course_module, 'staff': get_users_in_course_group_by_role(location, STAFF_ROLE_NAME), - 'add_user_postback_url' : reverse('add_user', args=[location]).rstrip('/'), - 'remove_user_postback_url' : reverse('remove_user', args=[location]).rstrip('/'), - 'allow_actions' : has_access(request.user, location, role=INSTRUCTOR_ROLE_NAME), - 'request_user_id' : request.user.id + 'add_user_postback_url': reverse('add_user', args=[location]).rstrip('/'), + 'remove_user_postback_url': reverse('remove_user', args=[location]).rstrip('/'), + 'allow_actions': has_access(request.user, location, role=INSTRUCTOR_ROLE_NAME), + 'request_user_id': request.user.id }) -def create_json_response(errmsg = None): +def create_json_response(errmsg=None): if errmsg is not None: - resp = HttpResponse(json.dumps({'Status': 'Failed', 'ErrMsg' : errmsg})) + resp = HttpResponse(json.dumps({'Status': 'Failed', 'ErrMsg': errmsg})) else: resp = HttpResponse(json.dumps({'Status': 'OK'})) @@ -822,13 +830,15 @@ def create_json_response(errmsg = None): This POST-back view will add a user - specified by email - to the list of editors for the specified course ''' + + @expect_json @login_required @ensure_csrf_cookie def add_user(request, location): email = request.POST["email"] - if email=='': + if email == '': return create_json_response('Please specify an email address.') # check that logged in user has admin permissions to this course @@ -854,6 +864,8 @@ def add_user(request, location): This POST-back view will remove a user - specified by email - from the list of editors for the specified course ''' + + @expect_json @login_required @ensure_csrf_cookie @@ -881,6 +893,7 @@ def remove_user(request, location): def landing(request, org, course, coursename): return render_to_response('temp-course-landing.html', {}) + @login_required @ensure_csrf_cookie def static_pages(request, org, course, coursename): @@ -921,7 +934,7 @@ def reorder_static_tabs(request): return HttpResponseBadRequest() # load all reference tabs, return BadRequest if we can't find any of them - tab_items =[] + tab_items = [] for tab in tabs: item = modulestore('direct').get_item(Location(tab)) if item is None: @@ -935,8 +948,8 @@ def reorder_static_tabs(request): for tab in course.tabs: if tab['type'] == 'static_tab': reordered_tabs.append({'type': 'static_tab', - 'name' : tab_items[static_tab_idx].metadata.get('display_name'), - 'url_slug' : tab_items[static_tab_idx].location.name}) + 'name': tab_items[static_tab_idx].metadata.get('display_name'), + 'url_slug': tab_items[static_tab_idx].location.name}) static_tab_idx += 1 else: reordered_tabs.append(tab) @@ -980,10 +993,11 @@ def edit_tabs(request, org, course, coursename): return render_to_response('edit-tabs.html', { 'active_tab': 'pages', - 'context_course':course_item, + 'context_course': course_item, 'components': components }) + def not_found(request): return render_to_response('error.html', {'error': '404'}) @@ -1014,11 +1028,12 @@ def course_info(request, org, course, name, provided_id=None): return render_to_response('course_info.html', { 'active_tab': 'courseinfo-tab', 'context_course': course_module, - 'url_base' : "/" + org + "/" + course + "/", - 'course_updates' : json.dumps(get_course_updates(location)), + 'url_base': "/" + org + "/" + course + "/", + 'course_updates': json.dumps(get_course_updates(location)), 'handouts_location': Location(['i4x', org, course, 'course_info', 'handouts']).url() }) + @expect_json @login_required @ensure_csrf_cookie @@ -1075,8 +1090,8 @@ def module_info(request, module_location): else: real_method = request.method - rewrite_static_links = request.GET.get('rewrite_url_links','True') in ['True', 'true'] - logging.debug('rewrite_static_links = {0} {1}'.format(request.GET.get('rewrite_url_links','False'), rewrite_static_links)) + rewrite_static_links = request.GET.get('rewrite_url_links', 'True') in ['True', 'true'] + logging.debug('rewrite_static_links = {0} {1}'.format(request.GET.get('rewrite_url_links', 'False'), rewrite_static_links)) # check that logged in user has permissions to this item if not has_access(request.user, location): @@ -1089,6 +1104,7 @@ def module_info(request, module_location): else: return HttpResponseBadRequest() + @login_required @ensure_csrf_cookie def get_course_settings(request, org, course, name): @@ -1109,9 +1125,10 @@ def get_course_settings(request, org, course, name): return render_to_response('settings.html', { 'active_tab': 'settings', 'context_course': course_module, - 'course_details' : json.dumps(course_details, cls=CourseSettingsEncoder) + 'course_details': json.dumps(course_details, cls=CourseSettingsEncoder) }) + @expect_json @login_required @ensure_csrf_cookie @@ -1137,12 +1154,13 @@ def course_settings_updates(request, org, course, name, section): if request.method == 'GET': # Cannot just do a get w/o knowing the course name :-( - return HttpResponse(json.dumps(manager.fetch(Location(['i4x', org, course, 'course',name])), cls=CourseSettingsEncoder), + return HttpResponse(json.dumps(manager.fetch(Location(['i4x', org, course, 'course', name])), cls=CourseSettingsEncoder), mimetype="application/json") - elif request.method == 'POST': # post or put, doesn't matter. + elif request.method == 'POST': # post or put, doesn't matter. return HttpResponse(json.dumps(manager.update_from_json(request.POST), cls=CourseSettingsEncoder), mimetype="application/json") + @expect_json @login_required @ensure_csrf_cookie @@ -1167,14 +1185,14 @@ def course_grader_updates(request, org, course, name, grader_index=None): if real_method == 'GET': # Cannot just do a get w/o knowing the course name :-( - return HttpResponse(json.dumps(CourseGradingModel.fetch_grader(Location(['i4x', org, course, 'course',name]), grader_index)), + return HttpResponse(json.dumps(CourseGradingModel.fetch_grader(Location(['i4x', org, course, 'course', name]), grader_index)), mimetype="application/json") elif real_method == "DELETE": # ??? Shoudl this return anything? Perhaps success fail? - CourseGradingModel.delete_grader(Location(['i4x', org, course, 'course',name]), grader_index) + CourseGradingModel.delete_grader(Location(['i4x', org, course, 'course', name]), grader_index) return HttpResponse() - elif request.method == 'POST': # post or put, doesn't matter. - return HttpResponse(json.dumps(CourseGradingModel.update_grader_from_json(Location(['i4x', org, course, 'course',name]), request.POST)), + elif request.method == 'POST': # post or put, doesn't matter. + return HttpResponse(json.dumps(CourseGradingModel.update_grader_from_json(Location(['i4x', org, course, 'course', name]), request.POST)), mimetype="application/json") @@ -1193,10 +1211,10 @@ def asset_index(request, org, course, name): raise PermissionDenied() - upload_asset_callback_url = reverse('upload_asset', kwargs = { - 'org' : org, - 'course' : course, - 'coursename' : name + upload_asset_callback_url = reverse('upload_asset', kwargs={ + 'org': org, + 'course': course, + 'coursename': name }) course_module = modulestore().get_item(location) @@ -1237,13 +1255,14 @@ def asset_index(request, org, course, name): def edge(request): return render_to_response('university_profiles/edge.html', {}) + @login_required @expect_json def create_new_course(request): # This logic is repeated in xmodule/modulestore/tests/factories.py # so if you change anything here, you need to also change it there. # TODO: write a test that creates two courses, one with the factory and - # the other with this method, then compare them to make sure they are + # the other with this method, then compare them to make sure they are # equivalent. template = Location(request.POST['template']) org = request.POST.get('org') @@ -1288,6 +1307,7 @@ def create_new_course(request): return HttpResponse(json.dumps({'id': new_course.location.url()})) + def initialize_course_tabs(course): # set up the default tabs # I've added this because when we add static tabs, the LMS either expects a None for the tabs list or @@ -1297,7 +1317,7 @@ def initialize_course_tabs(course): # This logic is repeated in xmodule/modulestore/tests/factories.py # so if you change anything here, you need to also change it there. - course.tabs = [{"type": "courseware"}, + course.tabs = [{"type": "courseware"}, {"type": "course_info", "name": "Course Info"}, {"type": "discussion", "name": "Discussion"}, {"type": "wiki", "name": "Wiki"}, @@ -1305,6 +1325,7 @@ def initialize_course_tabs(course): modulestore('direct').update_metadata(course.location.url(), course.own_metadata) + @ensure_csrf_cookie @login_required def import_course(request, org, course, name): @@ -1343,7 +1364,7 @@ def import_course(request, org, course, name): # find the 'course.xml' file - for r,d,f in os.walk(course_dir): + for r, d, f in os.walk(course_dir): for files in f: if files == 'course.xml': break @@ -1357,10 +1378,10 @@ def import_course(request, org, course, name): if r != course_dir: for fname in os.listdir(r): - shutil.move(r/fname, course_dir) + shutil.move(r / fname, course_dir) module_store, course_items = import_from_xml(modulestore('direct'), settings.GITHUB_REPO_ROOT, - [course_subdir], load_error_modules=False, static_content_store=contentstore(), target_location_namespace = Location(location)) + [course_subdir], load_error_modules=False, static_content_store=contentstore(), target_location_namespace=Location(location)) # we can blow this away when we're done importing. shutil.rmtree(course_dir) @@ -1376,12 +1397,13 @@ def import_course(request, org, course, name): return render_to_response('import.html', { 'context_course': course_module, 'active_tab': 'import', - 'successful_import_redirect_url' : reverse('course_index', args=[ + 'successful_import_redirect_url': reverse('course_index', args=[ course_module.location.org, course_module.location.course, course_module.location.name]) }) + @ensure_csrf_cookie @login_required def generate_export_course(request, org, course, name): @@ -1391,7 +1413,7 @@ def generate_export_course(request, org, course, name): raise PermissionDenied() loc = Location(location) - export_file = NamedTemporaryFile(prefix=name+'.', suffix=".tar.gz") + export_file = NamedTemporaryFile(prefix=name + '.', suffix=".tar.gz") root_dir = path(mkdtemp()) @@ -1404,11 +1426,11 @@ def generate_export_course(request, org, course, name): logging.debug('tar file being generated at {0}'.format(export_file.name)) tf = tarfile.open(name=export_file.name, mode='w:gz') - tf.add(root_dir/name, arcname=name) + tf.add(root_dir / name, arcname=name) tf.close() # remove temp dir - shutil.rmtree(root_dir/name) + shutil.rmtree(root_dir / name) wrapper = FileWrapper(export_file) response = HttpResponse(wrapper, content_type='application/x-tgz') @@ -1430,9 +1452,10 @@ def export_course(request, org, course, name): return render_to_response('export.html', { 'context_course': course_module, 'active_tab': 'export', - 'successful_import_redirect_url' : '' + 'successful_import_redirect_url': '' }) + def event(request): ''' A noop to swallow the analytics call so that cms methods don't spook and poor developers looking at diff --git a/cms/djangoapps/models/settings/course_details.py b/cms/djangoapps/models/settings/course_details.py index d01e784d74..b27f4e3804 100644 --- a/cms/djangoapps/models/settings/course_details.py +++ b/cms/djangoapps/models/settings/course_details.py @@ -31,16 +31,16 @@ class CourseDetails(object): """ if not isinstance(course_location, Location): course_location = Location(course_location) - + course = cls(course_location) - + descriptor = get_modulestore(course_location).get_item(course_location) - + course.start_date = descriptor.start course.end_date = descriptor.end course.enrollment_start = descriptor.enrollment_start course.enrollment_end = descriptor.enrollment_end - + temploc = course_location._replace(category='about', name='syllabus') try: course.syllabus = get_modulestore(temploc).get_item(temploc).definition['data'] @@ -52,32 +52,32 @@ class CourseDetails(object): course.overview = get_modulestore(temploc).get_item(temploc).definition['data'] except ItemNotFoundError: pass - + temploc = temploc._replace(name='effort') try: course.effort = get_modulestore(temploc).get_item(temploc).definition['data'] except ItemNotFoundError: pass - + temploc = temploc._replace(name='video') try: raw_video = get_modulestore(temploc).get_item(temploc).definition['data'] - course.intro_video = CourseDetails.parse_video_tag(raw_video) + course.intro_video = CourseDetails.parse_video_tag(raw_video) except ItemNotFoundError: pass - + return course - + @classmethod def update_from_json(cls, jsondict): """ Decode the json into CourseDetails and save any changed attrs to the db """ - ## TODO make it an error for this to be undefined & for it to not be retrievable from modulestore + ## TODO make it an error for this to be undefined & for it to not be retrievable from modulestore course_location = jsondict['course_location'] ## Will probably want to cache the inflight courses because every blur generates an update descriptor = get_modulestore(course_location).get_item(course_location) - + dirty = False if 'start_date' in jsondict: @@ -87,7 +87,7 @@ class CourseDetails(object): if converted != descriptor.start: dirty = True descriptor.start = converted - + if 'end_date' in jsondict: converted = jsdate_to_time(jsondict['end_date']) else: @@ -96,7 +96,7 @@ class CourseDetails(object): if converted != descriptor.end: dirty = True descriptor.end = converted - + if 'enrollment_start' in jsondict: converted = jsdate_to_time(jsondict['enrollment_start']) else: @@ -105,7 +105,7 @@ class CourseDetails(object): if converted != descriptor.enrollment_start: dirty = True descriptor.enrollment_start = converted - + if 'enrollment_end' in jsondict: converted = jsdate_to_time(jsondict['enrollment_end']) else: @@ -114,10 +114,10 @@ class CourseDetails(object): if converted != descriptor.enrollment_end: dirty = True descriptor.enrollment_end = converted - + if dirty: get_modulestore(course_location).update_metadata(course_location, descriptor.metadata) - + # NOTE: below auto writes to the db w/o verifying that any of the fields actually changed # to make faster, could compare against db or could have client send over a list of which fields changed. temploc = Location(course_location)._replace(category='about', name='syllabus') @@ -125,19 +125,19 @@ class CourseDetails(object): temploc = temploc._replace(name='overview') update_item(temploc, jsondict['overview']) - + temploc = temploc._replace(name='effort') update_item(temploc, jsondict['effort']) - + temploc = temploc._replace(name='video') recomposed_video_tag = CourseDetails.recompose_video_tag(jsondict['intro_video']) update_item(temploc, recomposed_video_tag) - - + + # Could just generate and return a course obj w/o doing any db reads, but I put the reads in as a means to confirm # it persisted correctly return CourseDetails.fetch(course_location) - + @staticmethod def parse_video_tag(raw_video): """ @@ -147,17 +147,17 @@ class CourseDetails(object): """ if not raw_video: return None - + keystring_matcher = re.search('(?<=embed/)[a-zA-Z0-9_-]+', raw_video) if keystring_matcher is None: keystring_matcher = re.search('' return result - + # TODO move to a more general util? Is there a better way to do the isinstance model check? class CourseSettingsEncoder(json.JSONEncoder): diff --git a/cms/djangoapps/models/settings/course_grading.py b/cms/djangoapps/models/settings/course_grading.py index 9cfa18c8c9..f4c6fd3d7c 100644 --- a/cms/djangoapps/models/settings/course_grading.py +++ b/cms/djangoapps/models/settings/course_grading.py @@ -6,55 +6,55 @@ from util import converters class CourseGradingModel(object): """ - Basically a DAO and Model combo for CRUD operations pertaining to grading policy. + Basically a DAO and Model combo for CRUD operations pertaining to grading policy. """ def __init__(self, course_descriptor): self.course_location = course_descriptor.location - self.graders = [CourseGradingModel.jsonize_grader(i, grader) for i, grader in enumerate(course_descriptor.raw_grader)] # weights transformed to ints [0..100] + self.graders = [CourseGradingModel.jsonize_grader(i, grader) for i, grader in enumerate(course_descriptor.raw_grader)] # weights transformed to ints [0..100] self.grade_cutoffs = course_descriptor.grade_cutoffs self.grace_period = CourseGradingModel.convert_set_grace_period(course_descriptor) - - @classmethod + + @classmethod def fetch(cls, course_location): """ Fetch the course details for the given course from persistence and return a CourseDetails model. """ if not isinstance(course_location, Location): course_location = Location(course_location) - + descriptor = get_modulestore(course_location).get_item(course_location) model = cls(descriptor) return model - + @staticmethod def fetch_grader(course_location, index): """ - Fetch the course's nth grader + Fetch the course's nth grader Returns an empty dict if there's no such grader. """ if not isinstance(course_location, Location): course_location = Location(course_location) - + descriptor = get_modulestore(course_location).get_item(course_location) # # ??? it would be good if these had the course_location in them so that they stand alone sufficiently # # but that would require not using CourseDescriptor's field directly. Opinions? - index = int(index) - if len(descriptor.raw_grader) > index: + index = int(index) + if len(descriptor.raw_grader) > index: return CourseGradingModel.jsonize_grader(index, descriptor.raw_grader[index]) - + # return empty model else: return { - "id" : index, - "type" : "", - "min_count" : 0, - "drop_count" : 0, - "short_label" : None, - "weight" : 0 + "id": index, + "type": "", + "min_count": 0, + "drop_count": 0, + "short_label": None, + "weight": 0 } - + @staticmethod def fetch_cutoffs(course_location): """ @@ -62,7 +62,7 @@ class CourseGradingModel(object): """ if not isinstance(course_location, Location): course_location = Location(course_location) - + descriptor = get_modulestore(course_location).get_item(course_location) return descriptor.grade_cutoffs @@ -73,10 +73,10 @@ class CourseGradingModel(object): """ if not isinstance(course_location, Location): course_location = Location(course_location) - + descriptor = get_modulestore(course_location).get_item(course_location) - return {'grace_period' : CourseGradingModel.convert_set_grace_period(descriptor) } - + return {'grace_period': CourseGradingModel.convert_set_grace_period(descriptor)} + @staticmethod def update_from_json(jsondict): """ @@ -85,32 +85,32 @@ class CourseGradingModel(object): """ course_location = jsondict['course_location'] descriptor = get_modulestore(course_location).get_item(course_location) - + graders_parsed = [CourseGradingModel.parse_grader(jsonele) for jsonele in jsondict['graders']] - + descriptor.raw_grader = graders_parsed descriptor.grade_cutoffs = jsondict['grade_cutoffs'] - + get_modulestore(course_location).update_item(course_location, descriptor.definition['data']) CourseGradingModel.update_grace_period_from_json(course_location, jsondict['grace_period']) - + return CourseGradingModel.fetch(course_location) - - + + @staticmethod def update_grader_from_json(course_location, grader): """ - Create or update the grader of the given type (string key) for the given course. Returns the modified + Create or update the grader of the given type (string key) for the given course. Returns the modified grader which is a full model on the client but not on the server (just a dict) """ if not isinstance(course_location, Location): course_location = Location(course_location) - + descriptor = get_modulestore(course_location).get_item(course_location) # # ??? it would be good if these had the course_location in them so that they stand alone sufficiently # # but that would require not using CourseDescriptor's field directly. Opinions? - # parse removes the id; so, grab it before parse + # parse removes the id; so, grab it before parse index = int(grader.get('id', len(descriptor.raw_grader))) grader = CourseGradingModel.parse_grader(grader) @@ -118,11 +118,11 @@ class CourseGradingModel(object): descriptor.raw_grader[index] = grader else: descriptor.raw_grader.append(grader) - + get_modulestore(course_location).update_item(course_location, descriptor.definition['data']) - + return CourseGradingModel.jsonize_grader(index, descriptor.raw_grader[index]) - + @staticmethod def update_cutoffs_from_json(course_location, cutoffs): """ @@ -131,18 +131,18 @@ class CourseGradingModel(object): """ if not isinstance(course_location, Location): course_location = Location(course_location) - + descriptor = get_modulestore(course_location).get_item(course_location) descriptor.grade_cutoffs = cutoffs get_modulestore(course_location).update_item(course_location, descriptor.definition['data']) - + return cutoffs - - + + @staticmethod def update_grace_period_from_json(course_location, graceperiodjson): """ - Update the course's default grace period. Incoming dict is {hours: h, minutes: m} possibly as a + Update the course's default grace period. Incoming dict is {hours: h, minutes: m} possibly as a grace_period entry in an enclosing dict. It is also safe to call this method with a value of None for graceperiodjson. """ @@ -160,7 +160,7 @@ class CourseGradingModel(object): descriptor = get_modulestore(course_location).get_item(course_location) descriptor.metadata['graceperiod'] = grace_rep get_modulestore(course_location).update_metadata(course_location, descriptor.metadata) - + @staticmethod def delete_grader(course_location, index): """ @@ -168,16 +168,16 @@ class CourseGradingModel(object): """ if not isinstance(course_location, Location): course_location = Location(course_location) - + descriptor = get_modulestore(course_location).get_item(course_location) - index = int(index) + index = int(index) if index < len(descriptor.raw_grader): del descriptor.raw_grader[index] # force propagation to definition descriptor.raw_grader = descriptor.raw_grader get_modulestore(course_location).update_item(course_location, descriptor.definition['data']) - - # NOTE cannot delete cutoffs. May be useful to reset + + # NOTE cannot delete cutoffs. May be useful to reset @staticmethod def delete_cutoffs(course_location, cutoffs): """ @@ -185,13 +185,13 @@ class CourseGradingModel(object): """ if not isinstance(course_location, Location): course_location = Location(course_location) - + descriptor = get_modulestore(course_location).get_item(course_location) descriptor.grade_cutoffs = descriptor.defaut_grading_policy['GRADE_CUTOFFS'] get_modulestore(course_location).update_item(course_location, descriptor.definition['data']) - + return descriptor.grade_cutoffs - + @staticmethod def delete_grace_period(course_location): """ @@ -199,28 +199,28 @@ class CourseGradingModel(object): """ if not isinstance(course_location, Location): course_location = Location(course_location) - + descriptor = get_modulestore(course_location).get_item(course_location) if 'graceperiod' in descriptor.metadata: del descriptor.metadata['graceperiod'] get_modulestore(course_location).update_metadata(course_location, descriptor.metadata) - + @staticmethod def get_section_grader_type(location): if not isinstance(location, Location): location = Location(location) - + descriptor = get_modulestore(location).get_item(location) return { - "graderType" : descriptor.metadata.get('format', u"Not Graded"), - "location" : location, - "id" : 99 # just an arbitrary value to + "graderType": descriptor.metadata.get('format', u"Not Graded"), + "location": location, + "id": 99 # just an arbitrary value to } - + @staticmethod def update_section_grader_type(location, jsondict): if not isinstance(location, Location): location = Location(location) - + descriptor = get_modulestore(location).get_item(location) if 'graderType' in jsondict and jsondict['graderType'] != u"Not Graded": descriptor.metadata['format'] = jsondict.get('graderType') @@ -228,10 +228,10 @@ class CourseGradingModel(object): else: if 'format' in descriptor.metadata: del descriptor.metadata['format'] if 'graded' in descriptor.metadata: del descriptor.metadata['graded'] - - get_modulestore(location).update_metadata(location, descriptor.metadata) - - + + get_modulestore(location).update_metadata(location, descriptor.metadata) + + @staticmethod def convert_set_grace_period(descriptor): # 5 hours 59 minutes 59 seconds => converted to iso format @@ -245,13 +245,13 @@ class CourseGradingModel(object): def parse_grader(json_grader): # manual to clear out kruft result = { - "type" : json_grader["type"], - "min_count" : int(json_grader.get('min_count', 0)), - "drop_count" : int(json_grader.get('drop_count', 0)), - "short_label" : json_grader.get('short_label', None), - "weight" : float(json_grader.get('weight', 0)) / 100.0 + "type": json_grader["type"], + "min_count": int(json_grader.get('min_count', 0)), + "drop_count": int(json_grader.get('drop_count', 0)), + "short_label": json_grader.get('short_label', None), + "weight": float(json_grader.get('weight', 0)) / 100.0 } - + return result @staticmethod @@ -260,6 +260,6 @@ class CourseGradingModel(object): if grader['weight']: grader['weight'] *= 100 if not 'short_label' in grader: - grader['short_label'] = "" - + grader['short_label'] = "" + return grader diff --git a/cms/envs/acceptance.py b/cms/envs/acceptance.py index 5bc9b53fc4..26a8adc92c 100644 --- a/cms/envs/acceptance.py +++ b/cms/envs/acceptance.py @@ -1,5 +1,5 @@ """ -This config file extends the test environment configuration +This config file extends the test environment configuration so that we can run the lettuce acceptance tests. """ from .test import * @@ -21,14 +21,14 @@ DATA_DIR = COURSES_ROOT # } # } -# Set this up so that rake lms[acceptance] and running the +# Set this up so that rake lms[acceptance] and running the # harvest command both use the same (test) database # which they can flush without messing up your dev db DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ENV_ROOT / "db" / "test_mitx.db", - 'TEST_NAME': ENV_ROOT / "db" / "test_mitx.db", + 'TEST_NAME': ENV_ROOT / "db" / "test_mitx.db", } } diff --git a/cms/envs/common.py b/cms/envs/common.py index 3ea532d70d..ef7a4f43fa 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -33,8 +33,8 @@ MITX_FEATURES = { 'USE_DJANGO_PIPELINE': True, 'GITHUB_PUSH': False, 'ENABLE_DISCUSSION_SERVICE': False, - 'AUTH_USE_MIT_CERTIFICATES' : False, - 'STUB_VIDEO_FOR_TESTING': False, # do not display video when running automated acceptance tests + 'AUTH_USE_MIT_CERTIFICATES': False, + 'STUB_VIDEO_FOR_TESTING': False, # do not display video when running automated acceptance tests } ENABLE_JASMINE = False @@ -229,7 +229,7 @@ PIPELINE_JS = { 'source_filenames': sorted( rooted_glob(COMMON_ROOT / 'static/', 'coffee/src/**/*.coffee') + rooted_glob(PROJECT_ROOT / 'static/', 'coffee/src/**/*.coffee') - ) + [ 'js/hesitate.js', 'js/base.js'], + ) + ['js/hesitate.js', 'js/base.js'], 'output_filename': 'js/cms-application.js', }, 'module-js': { diff --git a/cms/envs/dev.py b/cms/envs/dev.py index e29ee62e20..3dee93a398 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -12,7 +12,7 @@ TEMPLATE_DEBUG = DEBUG LOGGING = get_logger_config(ENV_ROOT / "log", logging_env="dev", tracking_filename="tracking.log", - dev_env = True, + dev_env=True, debug=True) modulestore_options = { @@ -41,7 +41,7 @@ CONTENTSTORE = { 'ENGINE': 'xmodule.contentstore.mongo.MongoContentStore', 'OPTIONS': { 'host': 'localhost', - 'db' : 'xcontent', + 'db': 'xcontent', } } diff --git a/cms/envs/dev_ike.py b/cms/envs/dev_ike.py index 5fb120854b..1ebf219d44 100644 --- a/cms/envs/dev_ike.py +++ b/cms/envs/dev_ike.py @@ -9,8 +9,6 @@ import socket MITX_FEATURES['AUTH_USE_MIT_CERTIFICATES'] = True -MITX_FEATURES['USE_DJANGO_PIPELINE']=False # don't recompile scss - -SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https') # django 1.4 for nginx ssl proxy - +MITX_FEATURES['USE_DJANGO_PIPELINE'] = False # don't recompile scss +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https') # django 1.4 for nginx ssl proxy diff --git a/cms/envs/test.py b/cms/envs/test.py index 74c3e349a4..7f39e6818b 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -19,7 +19,7 @@ TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' TEST_ROOT = path('test_root') # Makes the tests run much faster... -SOUTH_TESTS_MIGRATE = False # To disable migrations and use syncdb instead +SOUTH_TESTS_MIGRATE = False # To disable migrations and use syncdb instead # Want static files in the same dir for running on jenkins. STATIC_ROOT = TEST_ROOT / "staticfiles" @@ -62,7 +62,7 @@ CONTENTSTORE = { 'ENGINE': 'xmodule.contentstore.mongo.MongoContentStore', 'OPTIONS': { 'host': 'localhost', - 'db' : 'xcontent', + 'db': 'xcontent', } } @@ -76,7 +76,7 @@ DATABASES = { LMS_BASE = "localhost:8000" CACHES = { - # This is the cache used for most things. Askbot will not work without a + # This is the cache used for most things. Askbot will not work without a # functioning cache -- it relies on caching to load its settings in places. # In staging/prod envs, the sessions also live here. 'default': { @@ -103,4 +103,4 @@ CACHES = { PASSWORD_HASHERS = ( 'django.contrib.auth.hashers.SHA1PasswordHasher', 'django.contrib.auth.hashers.MD5PasswordHasher', -) \ No newline at end of file +) diff --git a/cms/manage.py b/cms/manage.py index f8773c0641..723fa59da1 100644 --- a/cms/manage.py +++ b/cms/manage.py @@ -2,7 +2,7 @@ from django.core.management import execute_manager import imp try: - imp.find_module('settings') # Assumed to be in the same directory. + imp.find_module('settings') # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. " diff --git a/cms/urls.py b/cms/urls.py index c928e74d19..ad4dd87d74 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -48,7 +48,7 @@ urlpatterns = ('', url(r'^(?P[^/]+)/(?P[^/]+)/(?P[^/]+)/(?P[^/]+)/gradeas.*$', 'contentstore.views.assignment_type_update', name='assignment_type_update'), - url(r'^pages/(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)$', 'contentstore.views.static_pages', + url(r'^pages/(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)$', 'contentstore.views.static_pages', name='static_pages'), url(r'^edit_static/(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)$', 'contentstore.views.edit_static', name='edit_static'), url(r'^edit_tabs/(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)$', 'contentstore.views.edit_tabs', name='edit_tabs'), @@ -56,7 +56,7 @@ urlpatterns = ('', # this is a generic method to return the data/metadata associated with a xmodule url(r'^module_info/(?P.*)$', 'contentstore.views.module_info', name='module_info'), - + # temporary landing page for a course url(r'^edge/(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)$', 'contentstore.views.landing', name='landing'), diff --git a/common/djangoapps/cache_toolbox/core.py b/common/djangoapps/cache_toolbox/core.py index 3bd184bc2c..a9c7002aa6 100644 --- a/common/djangoapps/cache_toolbox/core.py +++ b/common/djangoapps/cache_toolbox/core.py @@ -14,6 +14,7 @@ from django.db import DEFAULT_DB_ALIAS from . import app_settings from xmodule.contentstore.content import StaticContent + def get_instance(model, instance_or_pk, timeout=None, using=None): """ Returns the ``model`` instance with a primary key of ``instance_or_pk``. @@ -108,11 +109,14 @@ def instance_key(model, instance_or_pk): getattr(instance_or_pk, 'pk', instance_or_pk), ) + def set_cached_content(content): cache.set(str(content.location), content) + def get_cached_content(location): return cache.get(str(location)) + def del_cached_content(location): cache.delete(str(location)) diff --git a/common/djangoapps/contentserver/middleware.py b/common/djangoapps/contentserver/middleware.py index 1d139bcaa0..c5e887801e 100644 --- a/common/djangoapps/contentserver/middleware.py +++ b/common/djangoapps/contentserver/middleware.py @@ -12,7 +12,7 @@ from xmodule.exceptions import NotFoundError class StaticContentServer(object): def process_request(self, request): # look to see if the request is prefixed with 'c4x' tag - if request.path.startswith('/' + XASSET_LOCATION_TAG +'/'): + if request.path.startswith('/' + XASSET_LOCATION_TAG + '/'): loc = StaticContent.get_location_from_path(request.path) # first look in our cache so we don't have to round-trip to the DB content = get_cached_content(loc) diff --git a/common/djangoapps/course_groups/cohorts.py b/common/djangoapps/course_groups/cohorts.py index f84e18b214..155f82e0c7 100644 --- a/common/djangoapps/course_groups/cohorts.py +++ b/common/djangoapps/course_groups/cohorts.py @@ -13,6 +13,7 @@ from .models import CourseUserGroup log = logging.getLogger(__name__) + def is_course_cohorted(course_id): """ Given a course id, return a boolean for whether or not the course is @@ -115,6 +116,7 @@ def get_course_cohorts(course_id): ### Helpers for cohort management views + def get_cohort_by_name(course_id, name): """ Return the CourseUserGroup object for the given cohort. Raises DoesNotExist @@ -124,6 +126,7 @@ def get_cohort_by_name(course_id, name): group_type=CourseUserGroup.COHORT, name=name) + def get_cohort_by_id(course_id, cohort_id): """ Return the CourseUserGroup object for the given cohort. Raises DoesNotExist @@ -133,6 +136,7 @@ def get_cohort_by_id(course_id, cohort_id): group_type=CourseUserGroup.COHORT, id=cohort_id) + def add_cohort(course_id, name): """ Add a cohort to a course. Raises ValueError if a cohort of the same name already @@ -148,12 +152,14 @@ def add_cohort(course_id, name): group_type=CourseUserGroup.COHORT, name=name) + class CohortConflict(Exception): """ Raised when user to be added is already in another cohort in same course. """ pass + def add_user_to_cohort(cohort, username_or_email): """ Look up the given user, and if successful, add them to the specified cohort. @@ -211,4 +217,3 @@ def delete_empty_cohort(course_id, name): name, course_id)) cohort.delete() - diff --git a/common/djangoapps/course_groups/models.py b/common/djangoapps/course_groups/models.py index 957d230d92..8bab17493b 100644 --- a/common/djangoapps/course_groups/models.py +++ b/common/djangoapps/course_groups/models.py @@ -5,6 +5,7 @@ from django.db import models log = logging.getLogger(__name__) + class CourseUserGroup(models.Model): """ This model represents groups of users in a course. Groups may have different types, @@ -30,5 +31,3 @@ class CourseUserGroup(models.Model): COHORT = 'cohort' GROUP_TYPE_CHOICES = ((COHORT, 'Cohort'),) group_type = models.CharField(max_length=20, choices=GROUP_TYPE_CHOICES) - - diff --git a/common/djangoapps/course_groups/tests/tests.py b/common/djangoapps/course_groups/tests/tests.py index 86f0be0791..0fbf863fee 100644 --- a/common/djangoapps/course_groups/tests/tests.py +++ b/common/djangoapps/course_groups/tests/tests.py @@ -12,7 +12,8 @@ from xmodule.modulestore.django import modulestore, _MODULESTORES # NOTE: running this with the lms.envs.test config works without # manually overriding the modulestore. However, running with -# cms.envs.test doesn't. +# cms.envs.test doesn't. + def xml_store_config(data_dir): return { @@ -28,6 +29,7 @@ def xml_store_config(data_dir): TEST_DATA_DIR = settings.COMMON_TEST_DATA_ROOT TEST_DATA_XML_MODULESTORE = xml_store_config(TEST_DATA_DIR) + @override_settings(MODULESTORE=TEST_DATA_XML_MODULESTORE) class TestCohorts(django.test.TestCase): @@ -184,6 +186,3 @@ class TestCohorts(django.test.TestCase): self.assertTrue( is_commentable_cohorted(course.id, to_id("Feedback")), "Feedback was listed as cohorted. Should be.") - - - diff --git a/common/djangoapps/course_groups/views.py b/common/djangoapps/course_groups/views.py index d591c44356..6d5ac43fb0 100644 --- a/common/djangoapps/course_groups/views.py +++ b/common/djangoapps/course_groups/views.py @@ -22,6 +22,7 @@ import track.views log = logging.getLogger(__name__) + def json_http_response(data): """ Return an HttpResponse with the data json-serialized and the right content @@ -29,6 +30,7 @@ def json_http_response(data): """ return HttpResponse(json.dumps(data), content_type="application/json") + def split_by_comma_and_whitespace(s): """ Split a string both by commas and whitespice. Returns a list. @@ -177,6 +179,7 @@ def add_users_to_cohort(request, course_id, cohort_id): 'conflict': conflict, 'unknown': unknown}) + @ensure_csrf_cookie @require_POST def remove_user_from_cohort(request, course_id, cohort_id): diff --git a/common/djangoapps/external_auth/admin.py b/common/djangoapps/external_auth/admin.py index e93325bcb2..1ee18dadc1 100644 --- a/common/djangoapps/external_auth/admin.py +++ b/common/djangoapps/external_auth/admin.py @@ -5,8 +5,9 @@ django admin pages for courseware model from external_auth.models import * from django.contrib import admin + class ExternalAuthMapAdmin(admin.ModelAdmin): - search_fields = ['external_id','user__username'] + search_fields = ['external_id', 'user__username'] date_hierarchy = 'dtcreated' admin.site.register(ExternalAuthMap, ExternalAuthMapAdmin) diff --git a/common/djangoapps/external_auth/models.py b/common/djangoapps/external_auth/models.py index e43b306bbb..6c2f38d8b3 100644 --- a/common/djangoapps/external_auth/models.py +++ b/common/djangoapps/external_auth/models.py @@ -12,20 +12,20 @@ file and check it in at the same time as your model changes. To do that, from django.db import models from django.contrib.auth.models import User + class ExternalAuthMap(models.Model): class Meta: unique_together = (('external_id', 'external_domain'), ) external_id = models.CharField(max_length=255, db_index=True) external_domain = models.CharField(max_length=255, db_index=True) - external_credentials = models.TextField(blank=True) # JSON dictionary + external_credentials = models.TextField(blank=True) # JSON dictionary external_email = models.CharField(max_length=255, db_index=True) - external_name = models.CharField(blank=True,max_length=255, db_index=True) + external_name = models.CharField(blank=True, max_length=255, db_index=True) user = models.OneToOneField(User, unique=True, db_index=True, null=True) - internal_password = models.CharField(blank=True, max_length=31) # randomly generated - dtcreated = models.DateTimeField('creation date',auto_now_add=True) - dtsignup = models.DateTimeField('signup date',null=True) # set after signup - + internal_password = models.CharField(blank=True, max_length=31) # randomly generated + dtcreated = models.DateTimeField('creation date', auto_now_add=True) + dtsignup = models.DateTimeField('signup date', null=True) # set after signup + def __unicode__(self): s = "[%s] = (%s / %s)" % (self.external_id, self.external_name, self.external_email) return s - diff --git a/common/djangoapps/external_auth/tests/test_openid_provider.py b/common/djangoapps/external_auth/tests/test_openid_provider.py index 9c522f88b4..570dfbf9ee 100644 --- a/common/djangoapps/external_auth/tests/test_openid_provider.py +++ b/common/djangoapps/external_auth/tests/test_openid_provider.py @@ -13,9 +13,10 @@ from django.test import TestCase, LiveServerTestCase from django.core.urlresolvers import reverse from django.test.client import RequestFactory + class MyFetcher(HTTPFetcher): """A fetcher that uses server-internal calls for performing HTTP - requests. + requests. """ def __init__(self, client): @@ -42,7 +43,7 @@ class MyFetcher(HTTPFetcher): if headers and 'Accept' in headers: data['CONTENT_TYPE'] = headers['Accept'] response = self.client.get(url, data) - + # Translate the test client response to the fetcher's HTTP response abstraction content = response.content final_url = url @@ -60,6 +61,7 @@ class MyFetcher(HTTPFetcher): status=status, ) + class OpenIdProviderTest(TestCase): # def setUp(self): @@ -78,7 +80,7 @@ class OpenIdProviderTest(TestCase): provider_url = reverse('openid-provider-xrds') factory = RequestFactory() request = factory.request() - abs_provider_url = request.build_absolute_uri(location = provider_url) + abs_provider_url = request.build_absolute_uri(location=provider_url) # In order for this absolute URL to work (i.e. to get xrds, then authentication) # in the test environment, we either need a live server that works with the default @@ -86,10 +88,10 @@ class OpenIdProviderTest(TestCase): # Here we do the latter: fetcher = MyFetcher(self.client) openid.fetchers.setDefaultFetcher(fetcher, wrap_exceptions=False) - + # now we can begin the login process by invoking a local openid client, # with a pointer to the (also-local) openid provider: - with self.settings(OPENID_SSO_SERVER_URL = abs_provider_url): + with self.settings(OPENID_SSO_SERVER_URL=abs_provider_url): url = reverse('openid-login') resp = self.client.post(url) code = 200 @@ -107,7 +109,7 @@ class OpenIdProviderTest(TestCase): provider_url = reverse('openid-provider-login') factory = RequestFactory() request = factory.request() - abs_provider_url = request.build_absolute_uri(location = provider_url) + abs_provider_url = request.build_absolute_uri(location=provider_url) # In order for this absolute URL to work (i.e. to get xrds, then authentication) # in the test environment, we either need a live server that works with the default @@ -115,10 +117,10 @@ class OpenIdProviderTest(TestCase): # Here we do the latter: fetcher = MyFetcher(self.client) openid.fetchers.setDefaultFetcher(fetcher, wrap_exceptions=False) - + # now we can begin the login process by invoking a local openid client, # with a pointer to the (also-local) openid provider: - with self.settings(OPENID_SSO_SERVER_URL = abs_provider_url): + with self.settings(OPENID_SSO_SERVER_URL=abs_provider_url): url = reverse('openid-login') resp = self.client.post(url) code = 200 @@ -143,43 +145,43 @@ class OpenIdProviderTest(TestCase): self.assertContains(resp, '', html=True) # this should work on the server: self.assertContains(resp, '', html=True) - + # not included here are elements that will vary from run to run: # # - - + + def testOpenIdSetup(self): if not settings.MITX_FEATURES.get('AUTH_USE_OPENID_PROVIDER'): return url = reverse('openid-provider-login') post_args = { - "openid.mode" : "checkid_setup", - "openid.return_to" : "http://testserver/openid/complete/?janrain_nonce=2013-01-23T06%3A20%3A17ZaN7j6H", - "openid.assoc_handle" : "{HMAC-SHA1}{50ff8120}{rh87+Q==}", - "openid.claimed_id" : "http://specs.openid.net/auth/2.0/identifier_select", - "openid.ns" : "http://specs.openid.net/auth/2.0", - "openid.realm" : "http://testserver/", - "openid.identity" : "http://specs.openid.net/auth/2.0/identifier_select", - "openid.ns.ax" : "http://openid.net/srv/ax/1.0", - "openid.ax.mode" : "fetch_request", - "openid.ax.required" : "email,fullname,old_email,firstname,old_nickname,lastname,old_fullname,nickname", - "openid.ax.type.fullname" : "http://axschema.org/namePerson", - "openid.ax.type.lastname" : "http://axschema.org/namePerson/last", - "openid.ax.type.firstname" : "http://axschema.org/namePerson/first", - "openid.ax.type.nickname" : "http://axschema.org/namePerson/friendly", - "openid.ax.type.email" : "http://axschema.org/contact/email", - "openid.ax.type.old_email" : "http://schema.openid.net/contact/email", - "openid.ax.type.old_nickname" : "http://schema.openid.net/namePerson/friendly", - "openid.ax.type.old_fullname" : "http://schema.openid.net/namePerson", + "openid.mode": "checkid_setup", + "openid.return_to": "http://testserver/openid/complete/?janrain_nonce=2013-01-23T06%3A20%3A17ZaN7j6H", + "openid.assoc_handle": "{HMAC-SHA1}{50ff8120}{rh87+Q==}", + "openid.claimed_id": "http://specs.openid.net/auth/2.0/identifier_select", + "openid.ns": "http://specs.openid.net/auth/2.0", + "openid.realm": "http://testserver/", + "openid.identity": "http://specs.openid.net/auth/2.0/identifier_select", + "openid.ns.ax": "http://openid.net/srv/ax/1.0", + "openid.ax.mode": "fetch_request", + "openid.ax.required": "email,fullname,old_email,firstname,old_nickname,lastname,old_fullname,nickname", + "openid.ax.type.fullname": "http://axschema.org/namePerson", + "openid.ax.type.lastname": "http://axschema.org/namePerson/last", + "openid.ax.type.firstname": "http://axschema.org/namePerson/first", + "openid.ax.type.nickname": "http://axschema.org/namePerson/friendly", + "openid.ax.type.email": "http://axschema.org/contact/email", + "openid.ax.type.old_email": "http://schema.openid.net/contact/email", + "openid.ax.type.old_nickname": "http://schema.openid.net/namePerson/friendly", + "openid.ax.type.old_fullname": "http://schema.openid.net/namePerson", } resp = self.client.post(url, post_args) code = 200 self.assertEqual(resp.status_code, code, "got code {0} for url '{1}'. Expected code {2}" .format(resp.status_code, url, code)) - - + + # In order for this absolute URL to work (i.e. to get xrds, then authentication) # in the test environment, we either need a live server that works with the default # fetcher (i.e. urlopen2), or a test server that is reached through a custom fetcher. @@ -196,11 +198,11 @@ class OpenIdProviderLiveServerTest(LiveServerTestCase): provider_url = reverse('openid-provider-xrds') factory = RequestFactory() request = factory.request() - abs_provider_url = request.build_absolute_uri(location = provider_url) + abs_provider_url = request.build_absolute_uri(location=provider_url) # now we can begin the login process by invoking a local openid client, # with a pointer to the (also-local) openid provider: - with self.settings(OPENID_SSO_SERVER_URL = abs_provider_url): + with self.settings(OPENID_SSO_SERVER_URL=abs_provider_url): url = reverse('openid-login') resp = self.client.post(url) code = 200 diff --git a/common/djangoapps/external_auth/views.py b/common/djangoapps/external_auth/views.py index d557b33e9c..effae923b3 100644 --- a/common/djangoapps/external_auth/views.py +++ b/common/djangoapps/external_auth/views.py @@ -215,7 +215,7 @@ def ssl_dn_extract_info(dn): else: return None return (user, email, fullname) - + def ssl_get_cert_from_request(request): """ @@ -460,7 +460,7 @@ def provider_login(request): openid_request.answer(False), {}) # checkid_setup, so display login page - # (by falling through to the provider_login at the + # (by falling through to the provider_login at the # bottom of this method). elif openid_request.mode == 'checkid_setup': if openid_request.idSelect(): @@ -482,7 +482,7 @@ def provider_login(request): # handle login redirection: these are also sent to this view function, # but are distinguished by lacking the openid mode. We also know that - # they are posts, because they come from the popup + # they are posts, because they come from the popup elif request.method == 'POST' and 'openid_setup' in request.session: # get OpenID request from session openid_setup = request.session['openid_setup'] @@ -495,7 +495,7 @@ def provider_login(request): return default_render_failure(request, "Invalid OpenID trust root") # check if user with given email exists - # Failure is redirected to this method (by using the original URL), + # Failure is redirected to this method (by using the original URL), # which will bring up the login dialog. email = request.POST.get('email', None) try: @@ -542,17 +542,17 @@ def provider_login(request): # missing fields is up to the Consumer. The proper change # should only return the username, however this will likely # break the CS50 client. Temporarily we will be returning - # username filling in for fullname in addition to username + # username filling in for fullname in addition to username # as sreg nickname. - - # Note too that this is hardcoded, and not really responding to + + # Note too that this is hardcoded, and not really responding to # the extensions that were registered in the first place. results = { 'nickname': user.username, 'email': user.email, 'fullname': user.username } - + # the request succeeded: return provider_respond(server, openid_request, response, results) diff --git a/common/djangoapps/mitxmako/makoloader.py b/common/djangoapps/mitxmako/makoloader.py index 1379027e07..29184299b6 100644 --- a/common/djangoapps/mitxmako/makoloader.py +++ b/common/djangoapps/mitxmako/makoloader.py @@ -12,34 +12,35 @@ import mitxmako.middleware log = logging.getLogger(__name__) + class MakoLoader(object): """ This is a Django loader object which will load the template as a Mako template if the first line is "## mako". It is based off BaseLoader in django.template.loader. """ - + is_usable = False def __init__(self, base_loader): # base_loader is an instance of a BaseLoader subclass self.base_loader = base_loader - + module_directory = getattr(settings, 'MAKO_MODULE_DIR', None) - + if module_directory is None: log.warning("For more caching of mako templates, set the MAKO_MODULE_DIR in settings!") module_directory = tempfile.mkdtemp() - + self.module_directory = module_directory - - + + def __call__(self, template_name, template_dirs=None): return self.load_template(template_name, template_dirs) def load_template(self, template_name, template_dirs=None): source, file_path = self.load_template_source(template_name, template_dirs) - + if source.startswith("## mako\n"): # This is a mako template template = Template(filename=file_path, module_directory=self.module_directory, uri=template_name) @@ -56,23 +57,24 @@ class MakoLoader(object): # This allows for correct identification (later) of the actual template that does # not exist. return source, file_path - + def load_template_source(self, template_name, template_dirs=None): # Just having this makes the template load as an instance, instead of a class. return self.base_loader.load_template_source(template_name, template_dirs) def reset(self): self.base_loader.reset() - + class MakoFilesystemLoader(MakoLoader): is_usable = True - + def __init__(self): MakoLoader.__init__(self, FilesystemLoader()) - + + class MakoAppDirectoriesLoader(MakoLoader): is_usable = True - + def __init__(self): MakoLoader.__init__(self, AppDirectoriesLoader()) diff --git a/common/djangoapps/mitxmako/template.py b/common/djangoapps/mitxmako/template.py index 947dc8c1a4..6ef8058c7c 100644 --- a/common/djangoapps/mitxmako/template.py +++ b/common/djangoapps/mitxmako/template.py @@ -20,13 +20,15 @@ from mitxmako import middleware django_variables = ['lookup', 'output_encoding', 'encoding_errors'] # TODO: We should make this a Django Template subclass that simply has the MakoTemplate inside of it? (Intead of inheriting from MakoTemplate) + + class Template(MakoTemplate): """ This bridges the gap between a Mako template and a djano template. It can be rendered like it is a django template because the arguments are transformed in a way that MakoTemplate can understand. """ - + def __init__(self, *args, **kwargs): """Overrides base __init__ to provide django variable overrides""" if not kwargs.get('no_django', False): @@ -34,8 +36,8 @@ class Template(MakoTemplate): overrides['lookup'] = overrides['lookup']['main'] kwargs.update(overrides) super(Template, self).__init__(*args, **kwargs) - - + + def render(self, context_instance): """ This takes a render call with a context (from Django) and translates @@ -43,7 +45,7 @@ class Template(MakoTemplate): """ # collapse context_instance to a single dictionary for mako context_dictionary = {} - + # In various testing contexts, there might not be a current request context. if middleware.requestcontext is not None: for d in middleware.requestcontext: @@ -53,5 +55,5 @@ class Template(MakoTemplate): context_dictionary['settings'] = settings context_dictionary['MITX_ROOT_URL'] = settings.MITX_ROOT_URL context_dictionary['django_context'] = context_instance - + return super(Template, self).render_unicode(**context_dictionary) diff --git a/common/djangoapps/mitxmako/templatetag_helpers.py b/common/djangoapps/mitxmako/templatetag_helpers.py index e254625d3d..cd871a0fc5 100644 --- a/common/djangoapps/mitxmako/templatetag_helpers.py +++ b/common/djangoapps/mitxmako/templatetag_helpers.py @@ -2,14 +2,15 @@ from django.template import loader from django.template.base import Template, Context from django.template.loader import get_template, select_template + def django_template_include(file_name, mako_context): """ This can be used within a mako template to include a django template in the way that a django-style {% include %} does. Pass it context which can be the mako context ('context') or a dictionary. """ - - dictionary = dict( mako_context ) + + dictionary = dict(mako_context) return loader.render_to_string(file_name, dictionary=dictionary) @@ -18,7 +19,7 @@ def render_inclusion(func, file_name, takes_context, django_context, *args, **kw This allows a mako template to call a template tag function (written for django templates) that is an "inclusion tag". These functions are decorated with @register.inclusion_tag. - + -func: This is the function that is registered as an inclusion tag. You must import it directly using a python import statement. -file_name: This is the filename of the template, passed into the @@ -29,10 +30,10 @@ def render_inclusion(func, file_name, takes_context, django_context, *args, **kw a copy of the django context is available as 'django_context'. -*args and **kwargs are the arguments to func. """ - + if takes_context: args = [django_context] + list(args) - + _dict = func(*args, **kwargs) if isinstance(file_name, Template): t = file_name @@ -40,14 +41,12 @@ def render_inclusion(func, file_name, takes_context, django_context, *args, **kw t = select_template(file_name) else: t = get_template(file_name) - + nodelist = t.nodelist - + new_context = Context(_dict) csrf_token = django_context.get('csrf_token', None) if csrf_token is not None: new_context['csrf_token'] = csrf_token - - return nodelist.render(new_context) - + return nodelist.render(new_context) diff --git a/common/djangoapps/static_replace/__init__.py b/common/djangoapps/static_replace/__init__.py index cfef798bdf..6bd8125580 100644 --- a/common/djangoapps/static_replace/__init__.py +++ b/common/djangoapps/static_replace/__init__.py @@ -21,6 +21,7 @@ def _url_replace_regex(prefix): (?P=quote) # the first matching closing quote """.format(prefix=prefix) + def try_staticfiles_lookup(path): """ Try to lookup a path in staticfiles_storage. If it fails, return diff --git a/common/djangoapps/static_replace/test/test_static_replace.py b/common/djangoapps/static_replace/test/test_static_replace.py index e08c66c59f..50c0fbd246 100644 --- a/common/djangoapps/static_replace/test/test_static_replace.py +++ b/common/djangoapps/static_replace/test/test_static_replace.py @@ -53,6 +53,7 @@ def test_mongo_filestore(mock_modulestore, mock_static_content): mock_static_content.convert_legacy_static_url.assert_called_once_with('file.png', NAMESPACE) + @patch('static_replace.settings') @patch('static_replace.modulestore') @patch('static_replace.staticfiles_storage') diff --git a/common/djangoapps/status/__init__.py b/common/djangoapps/status/__init__.py index 8b13789179..e69de29bb2 100644 --- a/common/djangoapps/status/__init__.py +++ b/common/djangoapps/status/__init__.py @@ -1 +0,0 @@ - diff --git a/common/djangoapps/status/status.py b/common/djangoapps/status/status.py index c06a70f5a1..deacd9c631 100644 --- a/common/djangoapps/status/status.py +++ b/common/djangoapps/status/status.py @@ -10,6 +10,7 @@ import sys log = logging.getLogger(__name__) + def get_site_status_msg(course_id): """ Look for a file settings.STATUS_MESSAGE_PATH. If found, read it, diff --git a/common/djangoapps/student/management/commands/6002exportusers.py b/common/djangoapps/student/management/commands/6002exportusers.py index fcf565fb83..31d8092d3f 100644 --- a/common/djangoapps/student/management/commands/6002exportusers.py +++ b/common/djangoapps/student/management/commands/6002exportusers.py @@ -57,7 +57,7 @@ from student.userprofile. ''' d[key] = item return d - extracted = [{'up':extract_dict(up_keys, t[0]), 'u':extract_dict(user_keys, t[1])} for t in user_tuples] + extracted = [{'up': extract_dict(up_keys, t[0]), 'u':extract_dict(user_keys, t[1])} for t in user_tuples] fp = open('transfer_users.txt', 'w') json.dump(extracted, fp) fp.close() diff --git a/common/djangoapps/student/management/commands/add_to_group.py b/common/djangoapps/student/management/commands/add_to_group.py index 209d25da85..bdbb4027f7 100644 --- a/common/djangoapps/student/management/commands/add_to_group.py +++ b/common/djangoapps/student/management/commands/add_to_group.py @@ -3,6 +3,7 @@ from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User, Group + class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--list', diff --git a/common/djangoapps/student/management/commands/create_random_users.py b/common/djangoapps/student/management/commands/create_random_users.py index c6cf452a43..70374d02f2 100644 --- a/common/djangoapps/student/management/commands/create_random_users.py +++ b/common/djangoapps/student/management/commands/create_random_users.py @@ -8,6 +8,7 @@ from student.models import UserProfile, CourseEnrollment from student.views import _do_create_account, get_random_post_override + def create(n, course_id): """Create n users, enrolling them in course_id if it's not None""" for i in range(n): @@ -15,6 +16,7 @@ def create(n, course_id): if course_id is not None: CourseEnrollment.objects.create(user=user, course_id=course_id) + class Command(BaseCommand): help = """Create N new users, with random parameters. diff --git a/common/djangoapps/student/management/commands/pearson_dump.py b/common/djangoapps/student/management/commands/pearson_dump.py index 228508efb1..2aade8cf5f 100644 --- a/common/djangoapps/student/management/commands/pearson_dump.py +++ b/common/djangoapps/student/management/commands/pearson_dump.py @@ -36,7 +36,7 @@ class Command(BaseCommand): outputfile = datetime.utcnow().strftime("pearson-dump-%Y%m%d-%H%M%S.json") else: outputfile = args[0] - + # construct the query object to dump: registrations = TestCenterRegistration.objects.all() if 'course_id' in options and options['course_id']: @@ -44,24 +44,24 @@ class Command(BaseCommand): if 'exam_series_code' in options and options['exam_series_code']: registrations = registrations.filter(exam_series_code=options['exam_series_code']) - # collect output: + # collect output: output = [] for registration in registrations: if 'accommodation_pending' in options and options['accommodation_pending'] and not registration.accommodation_is_pending: continue - record = {'username' : registration.testcenter_user.user.username, - 'email' : registration.testcenter_user.email, - 'first_name' : registration.testcenter_user.first_name, - 'last_name' : registration.testcenter_user.last_name, - 'client_candidate_id' : registration.client_candidate_id, - 'client_authorization_id' : registration.client_authorization_id, - 'course_id' : registration.course_id, - 'exam_series_code' : registration.exam_series_code, - 'accommodation_request' : registration.accommodation_request, - 'accommodation_code' : registration.accommodation_code, - 'registration_status' : registration.registration_status(), - 'demographics_status' : registration.demographics_status(), - 'accommodation_status' : registration.accommodation_status(), + record = {'username': registration.testcenter_user.user.username, + 'email': registration.testcenter_user.email, + 'first_name': registration.testcenter_user.first_name, + 'last_name': registration.testcenter_user.last_name, + 'client_candidate_id': registration.client_candidate_id, + 'client_authorization_id': registration.client_authorization_id, + 'course_id': registration.course_id, + 'exam_series_code': registration.exam_series_code, + 'accommodation_request': registration.accommodation_request, + 'accommodation_code': registration.accommodation_code, + 'registration_status': registration.registration_status(), + 'demographics_status': registration.demographics_status(), + 'accommodation_status': registration.accommodation_status(), } if len(registration.upload_error_message) > 0: record['registration_error'] = registration.upload_error_message @@ -71,8 +71,7 @@ class Command(BaseCommand): record['needs_uploading'] = True output.append(record) - + # dump output: with open(outputfile, 'w') as outfile: dump(output, outfile, indent=2) - diff --git a/common/djangoapps/student/management/commands/pearson_export_cdd.py b/common/djangoapps/student/management/commands/pearson_export_cdd.py index 463eec6b70..bad98b9d25 100644 --- a/common/djangoapps/student/management/commands/pearson_export_cdd.py +++ b/common/djangoapps/student/management/commands/pearson_export_cdd.py @@ -39,7 +39,7 @@ class Command(BaseCommand): ("LastUpdate", "user_updated_at"), # in UTC, so same as what we store ]) - # define defaults, even thought 'store_true' shouldn't need them. + # define defaults, even thought 'store_true' shouldn't need them. # (call_command will set None as default value for all options that don't have one, # so one cannot rely on presence/absence of flags in that world.) option_list = BaseCommand.option_list + ( @@ -56,7 +56,7 @@ class Command(BaseCommand): ) def handle(self, **options): - # update time should use UTC in order to be comparable to the user_updated_at + # update time should use UTC in order to be comparable to the user_updated_at # field uploaded_at = datetime.utcnow() @@ -100,7 +100,7 @@ class Command(BaseCommand): extrasaction='ignore') writer.writeheader() for tcu in TestCenterUser.objects.order_by('id'): - if tcu.needs_uploading: # or dump_all + if tcu.needs_uploading: # or dump_all record = dict((csv_field, ensure_encoding(getattr(tcu, model_field))) for csv_field, model_field in Command.CSV_TO_MODEL_FIELDS.items()) diff --git a/common/djangoapps/student/management/commands/pearson_import_conf_zip.py b/common/djangoapps/student/management/commands/pearson_import_conf_zip.py index d94c3ba863..d0b2938df0 100644 --- a/common/djangoapps/student/management/commands/pearson_import_conf_zip.py +++ b/common/djangoapps/student/management/commands/pearson_import_conf_zip.py @@ -116,4 +116,3 @@ class Command(BaseCommand): tcuser.save() except TestCenterUser.DoesNotExist: Command.datadog_error(" Failed to find record for client_candidate_id {}".format(client_candidate_id), vcdcfile.name) - diff --git a/common/djangoapps/student/management/commands/pearson_make_tc_registration.py b/common/djangoapps/student/management/commands/pearson_make_tc_registration.py index b59241240d..b10cf143a0 100644 --- a/common/djangoapps/student/management/commands/pearson_make_tc_registration.py +++ b/common/djangoapps/student/management/commands/pearson_make_tc_registration.py @@ -9,6 +9,7 @@ from student.views import course_from_id from xmodule.course_module import CourseDescriptor from xmodule.modulestore.exceptions import ItemNotFoundError + class Command(BaseCommand): option_list = BaseCommand.option_list + ( # registration info: @@ -16,23 +17,23 @@ class Command(BaseCommand): '--accommodation_request', action='store', dest='accommodation_request', - ), + ), make_option( '--accommodation_code', action='store', dest='accommodation_code', - ), + ), make_option( '--client_authorization_id', action='store', dest='client_authorization_id', - ), - # exam info: + ), + # exam info: make_option( '--exam_series_code', action='store', dest='exam_series_code', - ), + ), make_option( '--eligibility_appointment_date_first', action='store', @@ -51,32 +52,32 @@ class Command(BaseCommand): action='store', dest='authorization_id', help='ID we receive from Pearson for a particular authorization' - ), + ), make_option( '--upload_status', action='store', dest='upload_status', help='status value assigned by Pearson' - ), + ), make_option( '--upload_error_message', action='store', dest='upload_error_message', help='error message provided by Pearson on a failure.' - ), + ), # control values: make_option( '--ignore_registration_dates', action='store_true', dest='ignore_registration_dates', help='find exam info for course based on exam_series_code, even if the exam is not active.' - ), + ), make_option( '--create_dummy_exam', action='store_true', dest='create_dummy_exam', help='create dummy exam info for course, even if course exists' - ), + ), ) args = "" help = "Create or modify a TestCenterRegistration entry for a given Student" @@ -103,7 +104,7 @@ class Command(BaseCommand): testcenter_user = TestCenterUser.objects.get(user=student) except TestCenterUser.DoesNotExist: raise CommandError("User \"{}\" does not have an existing demographics record".format(username)) - + # get an "exam" object. Check to see if a course_id was specified, and use information from that: exam = None create_dummy_exam = 'create_dummy_exam' in our_options and our_options['create_dummy_exam'] @@ -115,14 +116,14 @@ class Command(BaseCommand): exam = examlist[0] if len(examlist) > 0 else None else: exam = course.current_test_center_exam - except ItemNotFoundError: + except ItemNotFoundError: pass else: - # otherwise use explicit values (so we don't have to define a course): + # otherwise use explicit values (so we don't have to define a course): exam_name = "Dummy Placeholder Name" - exam_info = { 'Exam_Series_Code': our_options['exam_series_code'], - 'First_Eligible_Appointment_Date' : our_options['eligibility_appointment_date_first'], - 'Last_Eligible_Appointment_Date' : our_options['eligibility_appointment_date_last'], + exam_info = {'Exam_Series_Code': our_options['exam_series_code'], + 'First_Eligible_Appointment_Date': our_options['eligibility_appointment_date_first'], + 'Last_Eligible_Appointment_Date': our_options['eligibility_appointment_date_last'], } exam = CourseDescriptor.TestCenterExam(course_id, exam_name, exam_info) # update option values for date_first and date_last to use YYYY-MM-DD format @@ -134,15 +135,15 @@ class Command(BaseCommand): raise CommandError("Exam for course_id {} does not exist".format(course_id)) exam_code = exam.exam_series_code - - UPDATE_FIELDS = ( 'accommodation_request', + + UPDATE_FIELDS = ('accommodation_request', 'accommodation_code', 'client_authorization_id', 'exam_series_code', 'eligibility_appointment_date_first', 'eligibility_appointment_date_last', ) - + # create and save the registration: needs_updating = False registrations = get_testcenter_registration(student, course_id, exam_code) @@ -152,29 +153,29 @@ class Command(BaseCommand): if fieldname in our_options and registration.__getattribute__(fieldname) != our_options[fieldname]: needs_updating = True; else: - accommodation_request = our_options.get('accommodation_request','') + accommodation_request = our_options.get('accommodation_request', '') registration = TestCenterRegistration.create(testcenter_user, exam, accommodation_request) needs_updating = True - + if needs_updating: # first update the record with the new values, if any: for fieldname in UPDATE_FIELDS: - if fieldname in our_options and fieldname not in TestCenterRegistrationForm.Meta.fields: + if fieldname in our_options and fieldname not in TestCenterRegistrationForm.Meta.fields: registration.__setattr__(fieldname, our_options[fieldname]) - - # the registration form normally populates the data dict with + + # the registration form normally populates the data dict with # the accommodation request (if any). But here we want to # specify only those values that might change, so update the dict with existing # values. form_options = dict(our_options) for propname in TestCenterRegistrationForm.Meta.fields: - if propname not in form_options: + if propname not in form_options: form_options[propname] = registration.__getattribute__(propname) form = TestCenterRegistrationForm(instance=registration, data=form_options) if form.is_valid(): form.update_and_save() - print "Updated registration information for user's registration: username \"{}\" course \"{}\", examcode \"{}\"".format(student.username, course_id, exam_code) + print "Updated registration information for user's registration: username \"{}\" course \"{}\", examcode \"{}\"".format(student.username, course_id, exam_code) else: if (len(form.errors) > 0): print "Field Form errors encountered:" @@ -185,24 +186,22 @@ class Command(BaseCommand): print "Non-field Form errors encountered:" for nonfielderror in form.non_field_errors: print "Non-field Form Error: %s" % nonfielderror - + else: print "No changes necessary to make to existing user's registration." - + # override internal values: change_internal = False if 'exam_series_code' in our_options: exam_code = our_options['exam_series_code'] registration = get_testcenter_registration(student, course_id, exam_code)[0] - for internal_field in [ 'upload_error_message', 'upload_status', 'authorization_id']: + for internal_field in ['upload_error_message', 'upload_status', 'authorization_id']: if internal_field in our_options: registration.__setattr__(internal_field, our_options[internal_field]) change_internal = True - + if change_internal: print "Updated confirmation information in existing user's registration." registration.save() else: print "No changes necessary to make to confirmation information in existing user's registration." - - diff --git a/common/djangoapps/student/management/commands/pearson_make_tc_user.py b/common/djangoapps/student/management/commands/pearson_make_tc_user.py index 87e0b4dadd..10ef0bd067 100644 --- a/common/djangoapps/student/management/commands/pearson_make_tc_user.py +++ b/common/djangoapps/student/management/commands/pearson_make_tc_user.py @@ -5,60 +5,61 @@ from django.core.management.base import BaseCommand, CommandError from student.models import TestCenterUser, TestCenterUserForm + class Command(BaseCommand): option_list = BaseCommand.option_list + ( - # demographics: + # demographics: make_option( '--first_name', action='store', dest='first_name', - ), + ), make_option( '--middle_name', action='store', dest='middle_name', - ), + ), make_option( '--last_name', action='store', dest='last_name', - ), + ), make_option( '--suffix', action='store', dest='suffix', - ), + ), make_option( '--salutation', action='store', dest='salutation', - ), + ), make_option( '--address_1', action='store', dest='address_1', - ), + ), make_option( '--address_2', action='store', dest='address_2', - ), + ), make_option( '--address_3', action='store', dest='address_3', - ), + ), make_option( '--city', action='store', dest='city', - ), + ), make_option( '--state', action='store', dest='state', help='Two letter code (e.g. MA)' - ), + ), make_option( '--postal_code', action='store', @@ -75,12 +76,12 @@ class Command(BaseCommand): action='store', dest='phone', help='Pretty free-form (parens, spaces, dashes), but no country code' - ), + ), make_option( '--extension', action='store', dest='extension', - ), + ), make_option( '--phone_country_code', action='store', @@ -92,7 +93,7 @@ class Command(BaseCommand): action='store', dest='fax', help='Pretty free-form (parens, spaces, dashes), but no country code' - ), + ), make_option( '--fax_country_code', action='store', @@ -103,26 +104,26 @@ class Command(BaseCommand): '--company_name', action='store', dest='company_name', - ), + ), # internal values: make_option( '--client_candidate_id', action='store', dest='client_candidate_id', help='ID we assign a user to identify them to Pearson' - ), + ), make_option( '--upload_status', action='store', dest='upload_status', help='status value assigned by Pearson' - ), + ), make_option( '--upload_error_message', action='store', dest='upload_error_message', help='error message provided by Pearson on a failure.' - ), + ), ) args = "" help = "Create or modify a TestCenterUser entry for a given Student" @@ -142,20 +143,20 @@ class Command(BaseCommand): student = User.objects.get(username=username) try: testcenter_user = TestCenterUser.objects.get(user=student) - needs_updating = testcenter_user.needs_update(our_options) + needs_updating = testcenter_user.needs_update(our_options) except TestCenterUser.DoesNotExist: # do additional initialization here: testcenter_user = TestCenterUser.create(student) needs_updating = True - + if needs_updating: - # the registration form normally populates the data dict with + # the registration form normally populates the data dict with # all values from the testcenter_user. But here we only want to # specify those values that change, so update the dict with existing # values. form_options = dict(our_options) for propname in TestCenterUser.user_provided_fields(): - if propname not in form_options: + if propname not in form_options: form_options[propname] = testcenter_user.__getattribute__(propname) form = TestCenterUserForm(instance=testcenter_user, data=form_options) if form.is_valid(): @@ -170,21 +171,20 @@ class Command(BaseCommand): errorlist.append("Non-field Form errors encountered:") for nonfielderror in form.non_field_errors: errorlist.append("Non-field Form Error: {}".format(nonfielderror)) - raise CommandError("\n".join(errorlist)) + raise CommandError("\n".join(errorlist)) else: print "No changes necessary to make to existing user's demographics." - + # override internal values: change_internal = False testcenter_user = TestCenterUser.objects.get(user=student) - for internal_field in [ 'upload_error_message', 'upload_status', 'client_candidate_id']: + for internal_field in ['upload_error_message', 'upload_status', 'client_candidate_id']: if internal_field in our_options: testcenter_user.__setattr__(internal_field, our_options[internal_field]) change_internal = True - + if change_internal: testcenter_user.save() print "Updated confirmation information in existing user's demographics." else: print "No changes necessary to make to confirmation information in existing user's demographics." - diff --git a/common/djangoapps/student/management/commands/pearson_transfer.py b/common/djangoapps/student/management/commands/pearson_transfer.py index 6811e1833d..5eded6484a 100644 --- a/common/djangoapps/student/management/commands/pearson_transfer.py +++ b/common/djangoapps/student/management/commands/pearson_transfer.py @@ -46,10 +46,10 @@ class Command(BaseCommand): if not hasattr(settings, value): raise CommandError('No entry in the AWS settings' '(env/auth.json) for {0}'.format(value)) - + # check additional required settings for import and export: if options['mode'] in ('export', 'both'): - for value in ['LOCAL_EXPORT','SFTP_EXPORT']: + for value in ['LOCAL_EXPORT', 'SFTP_EXPORT']: if value not in settings.PEARSON: raise CommandError('No entry in the PEARSON settings' '(env/auth.json) for {0}'.format(value)) @@ -57,9 +57,9 @@ class Command(BaseCommand): source_dir = settings.PEARSON['LOCAL_EXPORT'] if not os.path.isdir(source_dir): os.makedirs(source_dir) - + if options['mode'] in ('import', 'both'): - for value in ['LOCAL_IMPORT','SFTP_IMPORT']: + for value in ['LOCAL_IMPORT', 'SFTP_IMPORT']: if value not in settings.PEARSON: raise CommandError('No entry in the PEARSON settings' '(env/auth.json) for {0}'.format(value)) @@ -76,7 +76,7 @@ class Command(BaseCommand): t.connect(username=settings.PEARSON['SFTP_USERNAME'], password=settings.PEARSON['SFTP_PASSWORD']) sftp = paramiko.SFTPClient.from_transport(t) - + if mode == 'export': try: sftp.chdir(files_to) @@ -92,7 +92,7 @@ class Command(BaseCommand): except IOError: raise CommandError('SFTP source path does not exist: {}'.format(files_from)) for filename in sftp.listdir('.'): - # skip subdirectories + # skip subdirectories if not S_ISDIR(sftp.stat(filename).st_mode): sftp.get(filename, files_to + '/' + filename) # delete files from sftp server once they are successfully pulled off: @@ -112,7 +112,7 @@ class Command(BaseCommand): try: for filename in os.listdir(files_from): source_file = os.path.join(files_from, filename) - # use mode as name of directory into which to write files + # use mode as name of directory into which to write files dest_file = os.path.join(mode, filename) upload_file_to_s3(bucket, source_file, dest_file) if deleteAfterCopy: @@ -135,17 +135,17 @@ class Command(BaseCommand): k.set_contents_from_filename(source_file) def export_pearson(): - options = { 'dest-from-settings' : True } + options = {'dest-from-settings': True} call_command('pearson_export_cdd', **options) call_command('pearson_export_ead', **options) mode = 'export' - sftp(settings.PEARSON['LOCAL_EXPORT'], settings.PEARSON['SFTP_EXPORT'], mode, deleteAfterCopy = False) + sftp(settings.PEARSON['LOCAL_EXPORT'], settings.PEARSON['SFTP_EXPORT'], mode, deleteAfterCopy=False) s3(settings.PEARSON['LOCAL_EXPORT'], settings.PEARSON['S3_BUCKET'], mode, deleteAfterCopy=True) def import_pearson(): mode = 'import' try: - sftp(settings.PEARSON['SFTP_IMPORT'], settings.PEARSON['LOCAL_IMPORT'], mode, deleteAfterCopy = True) + sftp(settings.PEARSON['SFTP_IMPORT'], settings.PEARSON['LOCAL_IMPORT'], mode, deleteAfterCopy=True) s3(settings.PEARSON['LOCAL_IMPORT'], settings.PEARSON['S3_BUCKET'], mode, deleteAfterCopy=False) except Exception as e: dog_http_api.event('Pearson Import failure', str(e)) diff --git a/common/djangoapps/student/management/commands/tests/test_pearson.py b/common/djangoapps/student/management/commands/tests/test_pearson.py index 2f4878a09d..12969405de 100644 --- a/common/djangoapps/student/management/commands/tests/test_pearson.py +++ b/common/djangoapps/student/management/commands/tests/test_pearson.py @@ -17,30 +17,31 @@ from student.models import User, TestCenterRegistration, TestCenterUser, get_tes log = logging.getLogger(__name__) + def create_tc_user(username): user = User.objects.create_user(username, '{}@edx.org'.format(username), 'fakepass') options = { - 'first_name' : 'TestFirst', - 'last_name' : 'TestLast', - 'address_1' : 'Test Address', - 'city' : 'TestCity', - 'state' : 'Alberta', - 'postal_code' : 'A0B 1C2', - 'country' : 'CAN', - 'phone' : '252-1866', - 'phone_country_code' : '1', + 'first_name': 'TestFirst', + 'last_name': 'TestLast', + 'address_1': 'Test Address', + 'city': 'TestCity', + 'state': 'Alberta', + 'postal_code': 'A0B 1C2', + 'country': 'CAN', + 'phone': '252-1866', + 'phone_country_code': '1', } call_command('pearson_make_tc_user', username, **options) return TestCenterUser.objects.get(user=user) - - -def create_tc_registration(username, course_id = 'org1/course1/term1', exam_code = 'exam1', accommodation_code = None): - - options = { 'exam_series_code' : exam_code, - 'eligibility_appointment_date_first' : '2013-01-01T00:00', - 'eligibility_appointment_date_last' : '2013-12-31T23:59', - 'accommodation_code' : accommodation_code, - 'create_dummy_exam' : True, + + +def create_tc_registration(username, course_id='org1/course1/term1', exam_code='exam1', accommodation_code=None): + + options = {'exam_series_code': exam_code, + 'eligibility_appointment_date_first': '2013-01-01T00:00', + 'eligibility_appointment_date_last': '2013-12-31T23:59', + 'accommodation_code': accommodation_code, + 'create_dummy_exam': True, } call_command('pearson_make_tc_registration', username, course_id, **options) @@ -48,21 +49,23 @@ def create_tc_registration(username, course_id = 'org1/course1/term1', exam_code registrations = get_testcenter_registration(user, course_id, exam_code) return registrations[0] + def create_multiple_registrations(prefix='test'): username1 = '{}_multiple1'.format(prefix) create_tc_user(username1) create_tc_registration(username1) - create_tc_registration(username1, course_id = 'org1/course2/term1') - create_tc_registration(username1, exam_code = 'exam2') + create_tc_registration(username1, course_id='org1/course2/term1') + create_tc_registration(username1, exam_code='exam2') username2 = '{}_multiple2'.format(prefix) create_tc_user(username2) create_tc_registration(username2) username3 = '{}_multiple3'.format(prefix) create_tc_user(username3) - create_tc_registration(username3, course_id = 'org1/course2/term1') + create_tc_registration(username3, course_id='org1/course2/term1') username4 = '{}_multiple4'.format(prefix) create_tc_user(username4) - create_tc_registration(username4, exam_code = 'exam2') + create_tc_registration(username4, exam_code='exam2') + def get_command_error_text(*args, **options): stderr_string = None @@ -75,21 +78,22 @@ def get_command_error_text(*args, **options): # But these are actually translated into nice messages, # and sys.exit(1) is then called. For testing, we # want to catch what sys.exit throws, and get the - # relevant text either from stdout or stderr. + # relevant text either from stdout or stderr. if (why1.message > 0): stderr_string = sys.stderr.getvalue() else: raise why1 except Exception, why: raise why - + finally: sys.stderr = old_stderr - + if stderr_string is None: - raise Exception("Expected call to {} to fail, but it succeeded!".format(args[0])) + raise Exception("Expected call to {} to fail, but it succeeded!".format(args[0])) return stderr_string - + + def get_error_string_for_management_call(*args, **options): stdout_string = None old_stdout = sys.stdout @@ -103,7 +107,7 @@ def get_error_string_for_management_call(*args, **options): # But these are actually translated into nice messages, # and sys.exit(1) is then called. For testing, we # want to catch what sys.exit throws, and get the - # relevant text either from stdout or stderr. + # relevant text either from stdout or stderr. if (why1.message == 1): stdout_string = sys.stdout.getvalue() stderr_string = sys.stderr.getvalue() @@ -111,15 +115,15 @@ def get_error_string_for_management_call(*args, **options): raise why1 except Exception, why: raise why - + finally: sys.stdout = old_stdout sys.stderr = old_stderr - + if stdout_string is None: - raise Exception("Expected call to {} to fail, but it succeeded!".format(args[0])) + raise Exception("Expected call to {} to fail, but it succeeded!".format(args[0])) return stdout_string, stderr_string - + def get_file_info(dirpath): filelist = os.listdir(dirpath) @@ -132,43 +136,45 @@ def get_file_info(dirpath): numlines = len(filecontents) return filepath, numlines else: - raise Exception("Expected to find a single file in {}, but found {}".format(dirpath,filelist)) - + raise Exception("Expected to find a single file in {}, but found {}".format(dirpath, filelist)) + + class PearsonTestCase(TestCase): ''' Base class for tests running Pearson-related commands ''' import_dir = mkdtemp(prefix="import") export_dir = mkdtemp(prefix="export") - + def assertErrorContains(self, error_message, expected): self.assertTrue(error_message.find(expected) >= 0, 'error message "{}" did not contain "{}"'.format(error_message, expected)) - + def tearDown(self): def delete_temp_dir(dirname): if os.path.exists(dirname): for filename in os.listdir(dirname): os.remove(os.path.join(dirname, filename)) os.rmdir(dirname) - + # clean up after any test data was dumped to temp directory delete_temp_dir(self.import_dir) delete_temp_dir(self.export_dir) - + # and clean up the database: # TestCenterUser.objects.all().delete() # TestCenterRegistration.objects.all().delete() + class PearsonCommandTestCase(PearsonTestCase): def test_missing_demographic_fields(self): - # We won't bother to test all details of form validation here. + # We won't bother to test all details of form validation here. # It is enough to show that it works here, but deal with test cases for the form # validation in the student tests, not these management tests. username = 'baduser' User.objects.create_user(username, '{}@edx.org'.format(username), 'fakepass') options = {} - error_string = get_command_error_text('pearson_make_tc_user', username, **options) + error_string = get_command_error_text('pearson_make_tc_user', username, **options) self.assertTrue(error_string.find('Field Form errors encountered:') >= 0) self.assertTrue(error_string.find('Field Form Error: city') >= 0) self.assertTrue(error_string.find('Field Form Error: first_name') >= 0) @@ -178,11 +184,11 @@ class PearsonCommandTestCase(PearsonTestCase): self.assertTrue(error_string.find('Field Form Error: phone') >= 0) self.assertTrue(error_string.find('Field Form Error: address_1') >= 0) self.assertErrorContains(error_string, 'Field Form Error: address_1') - + def test_create_good_testcenter_user(self): testcenter_user = create_tc_user("test_good_user") self.assertIsNotNone(testcenter_user) - + def test_create_good_testcenter_registration(self): username = 'test_good_registration' create_tc_user(username) @@ -192,21 +198,21 @@ class PearsonCommandTestCase(PearsonTestCase): def test_cdd_missing_option(self): error_string = get_command_error_text('pearson_export_cdd', **{}) self.assertErrorContains(error_string, 'Error: --destination or --dest-from-settings must be used') - + def test_ead_missing_option(self): error_string = get_command_error_text('pearson_export_ead', **{}) self.assertErrorContains(error_string, 'Error: --destination or --dest-from-settings must be used') def test_export_single_cdd(self): # before we generate any tc_users, we expect there to be nothing to output: - options = { 'dest-from-settings' : True } - with self.settings(PEARSON={ 'LOCAL_EXPORT' : self.export_dir }): + options = {'dest-from-settings': True} + with self.settings(PEARSON={'LOCAL_EXPORT': self.export_dir}): call_command('pearson_export_cdd', **options) (filepath, numlines) = get_file_info(self.export_dir) self.assertEquals(numlines, 1, "Expect cdd file to have no non-header lines") os.remove(filepath) - # generating a tc_user should result in a line in the output + # generating a tc_user should result in a line in the output username = 'test_single_cdd' create_tc_user(username) call_command('pearson_export_cdd', **options) @@ -221,23 +227,23 @@ class PearsonCommandTestCase(PearsonTestCase): os.remove(filepath) # if we modify the record, then it should be output again: - user_options = { 'first_name' : 'NewTestFirst', } + user_options = {'first_name': 'NewTestFirst', } call_command('pearson_make_tc_user', username, **user_options) call_command('pearson_export_cdd', **options) (filepath, numlines) = get_file_info(self.export_dir) self.assertEquals(numlines, 2, "Expect cdd file to have one non-header line") os.remove(filepath) - + def test_export_single_ead(self): # before we generate any registrations, we expect there to be nothing to output: - options = { 'dest-from-settings' : True } - with self.settings(PEARSON={ 'LOCAL_EXPORT' : self.export_dir }): + options = {'dest-from-settings': True} + with self.settings(PEARSON={'LOCAL_EXPORT': self.export_dir}): call_command('pearson_export_ead', **options) (filepath, numlines) = get_file_info(self.export_dir) self.assertEquals(numlines, 1, "Expect ead file to have no non-header lines") os.remove(filepath) - # generating a registration should result in a line in the output + # generating a registration should result in a line in the output username = 'test_single_ead' create_tc_user(username) create_tc_registration(username) @@ -251,7 +257,7 @@ class PearsonCommandTestCase(PearsonTestCase): (filepath, numlines) = get_file_info(self.export_dir) self.assertEquals(numlines, 1, "Expect ead file to have no non-header lines") os.remove(filepath) - + # if we modify the record, then it should be output again: create_tc_registration(username, accommodation_code='EQPMNT') call_command('pearson_export_ead', **options) @@ -261,8 +267,8 @@ class PearsonCommandTestCase(PearsonTestCase): def test_export_multiple(self): create_multiple_registrations("export") - with self.settings(PEARSON={ 'LOCAL_EXPORT' : self.export_dir }): - options = { 'dest-from-settings' : True } + with self.settings(PEARSON={'LOCAL_EXPORT': self.export_dir}): + options = {'dest-from-settings': True} call_command('pearson_export_cdd', **options) (filepath, numlines) = get_file_info(self.export_dir) self.assertEquals(numlines, 5, "Expect cdd file to have four non-header lines: total was {}".format(numlines)) @@ -294,6 +300,7 @@ S3_BUCKET = 'edx-pearson-archive' AWS_ACCESS_KEY_ID = 'put yours here' AWS_SECRET_ACCESS_KEY = 'put yours here' + class PearsonTransferTestCase(PearsonTestCase): ''' Class for tests running Pearson transfers @@ -302,14 +309,14 @@ class PearsonTransferTestCase(PearsonTestCase): def test_transfer_config(self): with self.settings(DATADOG_API='FAKE_KEY'): # TODO: why is this failing with the wrong error message?! - stderrmsg = get_command_error_text('pearson_transfer', **{'mode' : 'garbage'}) + stderrmsg = get_command_error_text('pearson_transfer', **{'mode': 'garbage'}) self.assertErrorContains(stderrmsg, 'Error: No PEARSON entries') with self.settings(DATADOG_API='FAKE_KEY'): stderrmsg = get_command_error_text('pearson_transfer') self.assertErrorContains(stderrmsg, 'Error: No PEARSON entries') with self.settings(DATADOG_API='FAKE_KEY', - PEARSON={'LOCAL_EXPORT' : self.export_dir, - 'LOCAL_IMPORT' : self.import_dir }): + PEARSON={'LOCAL_EXPORT': self.export_dir, + 'LOCAL_IMPORT': self.import_dir}): stderrmsg = get_command_error_text('pearson_transfer') self.assertErrorContains(stderrmsg, 'Error: No entry in the PEARSON settings') @@ -317,16 +324,16 @@ class PearsonTransferTestCase(PearsonTestCase): raise SkipTest() create_multiple_registrations('export_missing_dest') with self.settings(DATADOG_API='FAKE_KEY', - PEARSON={'LOCAL_EXPORT' : self.export_dir, - 'SFTP_EXPORT' : 'this/does/not/exist', - 'SFTP_HOSTNAME' : SFTP_HOSTNAME, - 'SFTP_USERNAME' : SFTP_USERNAME, - 'SFTP_PASSWORD' : SFTP_PASSWORD, - 'S3_BUCKET' : S3_BUCKET, + PEARSON={'LOCAL_EXPORT': self.export_dir, + 'SFTP_EXPORT': 'this/does/not/exist', + 'SFTP_HOSTNAME': SFTP_HOSTNAME, + 'SFTP_USERNAME': SFTP_USERNAME, + 'SFTP_PASSWORD': SFTP_PASSWORD, + 'S3_BUCKET': S3_BUCKET, }, - AWS_ACCESS_KEY_ID = AWS_ACCESS_KEY_ID, - AWS_SECRET_ACCESS_KEY = AWS_SECRET_ACCESS_KEY): - options = { 'mode' : 'export'} + AWS_ACCESS_KEY_ID=AWS_ACCESS_KEY_ID, + AWS_SECRET_ACCESS_KEY=AWS_SECRET_ACCESS_KEY): + options = {'mode': 'export'} stderrmsg = get_command_error_text('pearson_transfer', **options) self.assertErrorContains(stderrmsg, 'Error: SFTP destination path does not exist') @@ -334,16 +341,16 @@ class PearsonTransferTestCase(PearsonTestCase): raise SkipTest() create_multiple_registrations("transfer_export") with self.settings(DATADOG_API='FAKE_KEY', - PEARSON={'LOCAL_EXPORT' : self.export_dir, - 'SFTP_EXPORT' : 'results/topvue', - 'SFTP_HOSTNAME' : SFTP_HOSTNAME, - 'SFTP_USERNAME' : SFTP_USERNAME, - 'SFTP_PASSWORD' : SFTP_PASSWORD, - 'S3_BUCKET' : S3_BUCKET, + PEARSON={'LOCAL_EXPORT': self.export_dir, + 'SFTP_EXPORT': 'results/topvue', + 'SFTP_HOSTNAME': SFTP_HOSTNAME, + 'SFTP_USERNAME': SFTP_USERNAME, + 'SFTP_PASSWORD': SFTP_PASSWORD, + 'S3_BUCKET': S3_BUCKET, }, - AWS_ACCESS_KEY_ID = AWS_ACCESS_KEY_ID, - AWS_SECRET_ACCESS_KEY = AWS_SECRET_ACCESS_KEY): - options = { 'mode' : 'export'} + AWS_ACCESS_KEY_ID=AWS_ACCESS_KEY_ID, + AWS_SECRET_ACCESS_KEY=AWS_SECRET_ACCESS_KEY): + options = {'mode': 'export'} # call_command('pearson_transfer', **options) # # confirm that the export directory is still empty: # self.assertEqual(len(os.listdir(self.export_dir)), 0, "expected export directory to be empty") @@ -352,16 +359,16 @@ class PearsonTransferTestCase(PearsonTestCase): raise SkipTest() create_multiple_registrations('import_missing_src') with self.settings(DATADOG_API='FAKE_KEY', - PEARSON={'LOCAL_IMPORT' : self.import_dir, - 'SFTP_IMPORT' : 'this/does/not/exist', - 'SFTP_HOSTNAME' : SFTP_HOSTNAME, - 'SFTP_USERNAME' : SFTP_USERNAME, - 'SFTP_PASSWORD' : SFTP_PASSWORD, - 'S3_BUCKET' : S3_BUCKET, + PEARSON={'LOCAL_IMPORT': self.import_dir, + 'SFTP_IMPORT': 'this/does/not/exist', + 'SFTP_HOSTNAME': SFTP_HOSTNAME, + 'SFTP_USERNAME': SFTP_USERNAME, + 'SFTP_PASSWORD': SFTP_PASSWORD, + 'S3_BUCKET': S3_BUCKET, }, - AWS_ACCESS_KEY_ID = AWS_ACCESS_KEY_ID, - AWS_SECRET_ACCESS_KEY = AWS_SECRET_ACCESS_KEY): - options = { 'mode' : 'import'} + AWS_ACCESS_KEY_ID=AWS_ACCESS_KEY_ID, + AWS_SECRET_ACCESS_KEY=AWS_SECRET_ACCESS_KEY): + options = {'mode': 'import'} stderrmsg = get_command_error_text('pearson_transfer', **options) self.assertErrorContains(stderrmsg, 'Error: SFTP source path does not exist') @@ -369,15 +376,15 @@ class PearsonTransferTestCase(PearsonTestCase): raise SkipTest() create_multiple_registrations('import_missing_src') with self.settings(DATADOG_API='FAKE_KEY', - PEARSON={'LOCAL_IMPORT' : self.import_dir, - 'SFTP_IMPORT' : 'results', - 'SFTP_HOSTNAME' : SFTP_HOSTNAME, - 'SFTP_USERNAME' : SFTP_USERNAME, - 'SFTP_PASSWORD' : SFTP_PASSWORD, - 'S3_BUCKET' : S3_BUCKET, + PEARSON={'LOCAL_IMPORT': self.import_dir, + 'SFTP_IMPORT': 'results', + 'SFTP_HOSTNAME': SFTP_HOSTNAME, + 'SFTP_USERNAME': SFTP_USERNAME, + 'SFTP_PASSWORD': SFTP_PASSWORD, + 'S3_BUCKET': S3_BUCKET, }, - AWS_ACCESS_KEY_ID = AWS_ACCESS_KEY_ID, - AWS_SECRET_ACCESS_KEY = AWS_SECRET_ACCESS_KEY): - options = { 'mode' : 'import'} + AWS_ACCESS_KEY_ID=AWS_ACCESS_KEY_ID, + AWS_SECRET_ACCESS_KEY=AWS_SECRET_ACCESS_KEY): + options = {'mode': 'import'} call_command('pearson_transfer', **options) self.assertEqual(len(os.listdir(self.import_dir)), 0, "expected import directory to be empty") diff --git a/common/djangoapps/student/migrations/0020_add_test_center_user.py b/common/djangoapps/student/migrations/0020_add_test_center_user.py index e308e2d7e0..6c0bf5c4ee 100644 --- a/common/djangoapps/student/migrations/0020_add_test_center_user.py +++ b/common/djangoapps/student/migrations/0020_add_test_center_user.py @@ -185,4 +185,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0021_remove_askbot.py b/common/djangoapps/student/migrations/0021_remove_askbot.py index 83ad6791f2..8f76e5078c 100644 --- a/common/djangoapps/student/migrations/0021_remove_askbot.py +++ b/common/djangoapps/student/migrations/0021_remove_askbot.py @@ -36,7 +36,7 @@ class Migration(SchemaMigration): for column in ASKBOT_AUTH_USER_COLUMNS: db.delete_column('auth_user', column) except Exception as ex: - print "Couldn't remove askbot because of {0} -- it was probably never here to begin with.".format(ex) + print "Couldn't remove askbot because of {0} -- it was probably never here to begin with.".format(ex) def backwards(self, orm): raise RuntimeError("Cannot reverse this migration: there's no going back to Askbot.") diff --git a/common/djangoapps/student/migrations/0022_auto__add_courseenrollmentallowed__add_unique_courseenrollmentallowed_.py b/common/djangoapps/student/migrations/0022_auto__add_courseenrollmentallowed__add_unique_courseenrollmentallowed_.py index f7e2571685..769ad6737d 100644 --- a/common/djangoapps/student/migrations/0022_auto__add_courseenrollmentallowed__add_unique_courseenrollmentallowed_.py +++ b/common/djangoapps/student/migrations/0022_auto__add_courseenrollmentallowed__add_unique_courseenrollmentallowed_.py @@ -152,4 +152,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0023_add_test_center_registration.py b/common/djangoapps/student/migrations/0023_add_test_center_registration.py index c5af38dd37..4c7de6dcd9 100644 --- a/common/djangoapps/student/migrations/0023_add_test_center_registration.py +++ b/common/djangoapps/student/migrations/0023_add_test_center_registration.py @@ -238,4 +238,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/migrations/0024_add_allow_certificate.py b/common/djangoapps/student/migrations/0024_add_allow_certificate.py index fb3a97cd4b..56eccf8d70 100644 --- a/common/djangoapps/student/migrations/0024_add_allow_certificate.py +++ b/common/djangoapps/student/migrations/0024_add_allow_certificate.py @@ -169,4 +169,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['student'] \ No newline at end of file + complete_apps = ['student'] diff --git a/common/djangoapps/student/models.py b/common/djangoapps/student/models.py index 71d2177bd4..54bdd77297 100644 --- a/common/djangoapps/student/models.py +++ b/common/djangoapps/student/models.py @@ -107,6 +107,7 @@ class UserProfile(models.Model): TEST_CENTER_STATUS_ACCEPTED = "Accepted" TEST_CENTER_STATUS_ERROR = "Error" + class TestCenterUser(models.Model): """This is our representation of the User for in-person testing, and specifically for Pearson at this point. A few things to note: @@ -190,7 +191,7 @@ class TestCenterUser(models.Model): @staticmethod def user_provided_fields(): - return [ 'first_name', 'middle_name', 'last_name', 'suffix', 'salutation', + return ['first_name', 'middle_name', 'last_name', 'suffix', 'salutation', 'address_1', 'address_2', 'address_3', 'city', 'state', 'postal_code', 'country', 'phone', 'extension', 'phone_country_code', 'fax', 'fax_country_code', 'company_name'] @@ -208,7 +209,7 @@ class TestCenterUser(models.Model): @staticmethod def _generate_edx_id(prefix): NUM_DIGITS = 12 - return u"{}{:012}".format(prefix, randint(1, 10**NUM_DIGITS-1)) + return u"{}{:012}".format(prefix, randint(1, 10 ** NUM_DIGITS - 1)) @staticmethod def _generate_candidate_id(): @@ -237,10 +238,11 @@ class TestCenterUser(models.Model): def is_pending(self): return not self.is_accepted and not self.is_rejected + class TestCenterUserForm(ModelForm): class Meta: model = TestCenterUser - fields = ( 'first_name', 'middle_name', 'last_name', 'suffix', 'salutation', + fields = ('first_name', 'middle_name', 'last_name', 'suffix', 'salutation', 'address_1', 'address_2', 'address_3', 'city', 'state', 'postal_code', 'country', 'phone', 'extension', 'phone_country_code', 'fax', 'fax_country_code', 'company_name') @@ -313,7 +315,8 @@ ACCOMMODATION_CODES = ( ('SRSGNR', 'Separate Room and Sign Language Interpreter'), ) -ACCOMMODATION_CODE_DICT = { code : name for (code, name) in ACCOMMODATION_CODES } +ACCOMMODATION_CODE_DICT = {code: name for (code, name) in ACCOMMODATION_CODES} + class TestCenterRegistration(models.Model): """ @@ -389,10 +392,10 @@ class TestCenterRegistration(models.Model): elif self.uploaded_at is None: return 'Add' elif self.registration_is_rejected: - # Assume that if the registration was rejected before, - # it is more likely this is the (first) correction + # Assume that if the registration was rejected before, + # it is more likely this is the (first) correction # than a second correction in flight before the first was - # processed. + # processed. return 'Add' else: # TODO: decide what to send when we have uploaded an initial version, @@ -417,7 +420,7 @@ class TestCenterRegistration(models.Model): @classmethod def create(cls, testcenter_user, exam, accommodation_request): - registration = cls(testcenter_user = testcenter_user) + registration = cls(testcenter_user=testcenter_user) registration.course_id = exam.course_id registration.accommodation_request = accommodation_request.strip() registration.exam_series_code = exam.exam_series_code @@ -501,7 +504,7 @@ class TestCenterRegistration(models.Model): return self.accommodation_code.split('*') def get_accommodation_names(self): - return [ ACCOMMODATION_CODE_DICT.get(code, "Unknown code " + code) for code in self.get_accommodation_codes() ] + return [ACCOMMODATION_CODE_DICT.get(code, "Unknown code " + code) for code in self.get_accommodation_codes()] @property def registration_signup_url(self): @@ -512,7 +515,7 @@ class TestCenterRegistration(models.Model): return "Accepted" elif self.demographics_is_rejected: return "Rejected" - else: + else: return "Pending" def accommodation_status(self): @@ -522,7 +525,7 @@ class TestCenterRegistration(models.Model): return "Accepted" elif self.accommodation_is_rejected: return "Rejected" - else: + else: return "Pending" def registration_status(self): @@ -532,12 +535,12 @@ class TestCenterRegistration(models.Model): return "Rejected" else: return "Pending" - + class TestCenterRegistrationForm(ModelForm): class Meta: model = TestCenterRegistration - fields = ( 'accommodation_request', 'accommodation_code' ) + fields = ('accommodation_request', 'accommodation_code') def clean_accommodation_request(self): code = self.cleaned_data['accommodation_request'] @@ -576,6 +579,7 @@ def get_testcenter_registration(user, course_id, exam_series_code): # Correct this (https://nose.readthedocs.org/en/latest/finding_tests.html) get_testcenter_registration.__test__ = False + def unique_id_for_user(user): """ Return a unique id for a user, suitable for inserting into @@ -666,6 +670,7 @@ class CourseEnrollmentAllowed(models.Model): #### Helper methods for use from python manage.py shell and other classes. + def get_user_by_username_or_email(username_or_email): """ Return a User object, looking up by email if username_or_email contains a @@ -767,4 +772,3 @@ def update_user_information(sender, instance, created, **kwargs): log = logging.getLogger("mitx.discussion") log.error(unicode(e)) log.error("update user info to discussion failed for user with id: " + str(instance.id)) - diff --git a/common/djangoapps/student/tests.py b/common/djangoapps/student/tests.py index 8ce407bcd1..6a2d75e3d8 100644 --- a/common/djangoapps/student/tests.py +++ b/common/djangoapps/student/tests.py @@ -17,6 +17,7 @@ COURSE_2 = 'edx/full/6.002_Spring_2012' log = logging.getLogger(__name__) + class CourseEndingTest(TestCase): """Test things related to course endings: certificates, surveys, etc""" @@ -40,7 +41,7 @@ class CourseEndingTest(TestCase): {'status': 'processing', 'show_disabled_download_button': False, 'show_download_url': False, - 'show_survey_button': False,}) + 'show_survey_button': False, }) cert_status = {'status': 'unavailable'} self.assertEqual(_cert_info(user, course, cert_status), diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index b583599e97..bf279e7b08 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -50,6 +50,7 @@ from statsd import statsd log = logging.getLogger("mitx.student") Article = namedtuple('Article', 'title url author image deck publication publish_date') + def csrf_token(context): ''' A csrf token that can be included in a form. ''' @@ -73,8 +74,8 @@ def index(request, extra_context={}, user=None): ''' # The course selection work is done in courseware.courses. - domain = settings.MITX_FEATURES.get('FORCE_UNIVERSITY_DOMAIN') # normally False - if domain==False: # do explicit check, because domain=None is valid + domain = settings.MITX_FEATURES.get('FORCE_UNIVERSITY_DOMAIN') # normally False + if domain == False: # do explicit check, because domain=None is valid domain = request.META.get('HTTP_HOST') courses = get_courses(None, domain=domain) @@ -97,6 +98,7 @@ import re day_pattern = re.compile('\s\d+,\s') multimonth_pattern = re.compile('\s?\-\s?\S+\s') + def get_date_for_press(publish_date): import datetime # strip off extra months, and just use the first: @@ -107,6 +109,7 @@ def get_date_for_press(publish_date): date = datetime.datetime.strptime(date, "%B, %Y") return date + def press(request): json_articles = cache.get("student_press_json_articles") if json_articles == None: @@ -148,6 +151,7 @@ def cert_info(user, course): return _cert_info(user, course, certificate_status_for_student(user, course.id)) + def _cert_info(user, course, cert_status): """ Implements the logic for cert_info -- split out for testing. @@ -175,7 +179,7 @@ def _cert_info(user, course, cert_status): d = {'status': status, 'show_download_url': status == 'ready', - 'show_disabled_download_button': status == 'generating',} + 'show_disabled_download_button': status == 'generating', } if (status in ('generating', 'ready', 'notpassing', 'restricted') and course.end_of_course_survey_url is not None): @@ -204,6 +208,7 @@ def _cert_info(user, course, cert_status): return d + @login_required @ensure_csrf_cookie def dashboard(request): @@ -237,9 +242,9 @@ def dashboard(request): show_courseware_links_for = frozenset(course.id for course in courses if has_access(request.user, course, 'load')) - cert_statuses = { course.id: cert_info(request.user, course) for course in courses} + cert_statuses = {course.id: cert_info(request.user, course) for course in courses} - exam_registrations = { course.id: exam_registration_info(request.user, course) for course in courses} + exam_registrations = {course.id: exam_registration_info(request.user, course) for course in courses} # Get the 3 most recent news top_news = _get_news(top=3) @@ -248,7 +253,7 @@ def dashboard(request): 'message': message, 'staff_access': staff_access, 'errored_courses': errored_courses, - 'show_courseware_links_for' : show_courseware_links_for, + 'show_courseware_links_for': show_courseware_links_for, 'cert_statuses': cert_statuses, 'news': top_news, 'exam_registrations': exam_registrations, @@ -312,7 +317,7 @@ def change_enrollment(request): 'error': 'enrollment in {} not allowed at this time' .format(course.display_name)} - org, course_num, run=course_id.split("/") + org, course_num, run = course_id.split("/") statsd.increment("common.student.enrollment", tags=["org:{0}".format(org), "course:{0}".format(course_num), @@ -326,7 +331,7 @@ def change_enrollment(request): enrollment = CourseEnrollment.objects.get(user=user, course_id=course_id) enrollment.delete() - org, course_num, run=course_id.split("/") + org, course_num, run = course_id.split("/") statsd.increment("common.student.unenrollment", tags=["org:{0}".format(org), "course:{0}".format(course_num), @@ -345,7 +350,7 @@ def change_enrollment(request): def accounts_login(request, error=""): - return render_to_response('accounts_login.html', { 'error': error }) + return render_to_response('accounts_login.html', {'error': error}) @@ -424,6 +429,7 @@ def change_setting(request): return HttpResponse(json.dumps({'success': True, 'location': up.location, })) + def _do_create_account(post_vars): """ Given cleaned post variables, create the User and UserProfile objects, as well as the @@ -551,7 +557,7 @@ def create_account(request, post_override=None): # Ok, looks like everything is legit. Create the account. ret = _do_create_account(post_vars) - if isinstance(ret,HttpResponse): # if there was an error then return that + if isinstance(ret, HttpResponse): # if there was an error then return that return ret (user, profile, registration) = ret @@ -591,7 +597,7 @@ def create_account(request, post_override=None): eamap.user = login_user eamap.dtsignup = datetime.datetime.now() eamap.save() - log.debug('Updated ExternalAuthMap for %s to be %s' % (post_vars['username'],eamap)) + log.debug('Updated ExternalAuthMap for %s to be %s' % (post_vars['username'], eamap)) if settings.MITX_FEATURES.get('BYPASS_ACTIVATION_EMAIL_FOR_EXTAUTH'): log.debug('bypassing activation email') @@ -603,6 +609,7 @@ def create_account(request, post_override=None): js = {'success': True} return HttpResponse(json.dumps(js), mimetype="application/json") + def exam_registration_info(user, course): """ Returns a Registration object if the user is currently registered for a current exam of the course. Returns None if the user is not registered, or if there is no @@ -620,6 +627,7 @@ def exam_registration_info(user, course): registration = None return registration + @login_required @ensure_csrf_cookie def begin_exam_registration(request, course_id): @@ -663,6 +671,7 @@ def begin_exam_registration(request, course_id): return render_to_response('test_center_register.html', context) + @ensure_csrf_cookie def create_exam_registration(request, post_override=None): ''' @@ -725,7 +734,7 @@ def create_exam_registration(request, post_override=None): # this registration screen. else: - accommodation_request = post_vars.get('accommodation_request','') + accommodation_request = post_vars.get('accommodation_request', '') registration = TestCenterRegistration.create(testcenter_user, exam, accommodation_request) needs_saving = True log.info("User {0} enrolled in course {1} creating new exam registration".format(user.username, course_id)) @@ -834,16 +843,17 @@ def password_reset(request): form = PasswordResetForm(request.POST) if form.is_valid(): - form.save(use_https = request.is_secure(), - from_email = settings.DEFAULT_FROM_EMAIL, - request = request, - domain_override = request.get_host()) - return HttpResponse(json.dumps({'success':True, + form.save(use_https=request.is_secure(), + from_email=settings.DEFAULT_FROM_EMAIL, + request=request, + domain_override=request.get_host()) + return HttpResponse(json.dumps({'success': True, 'value': render_to_string('registration/password_reset_done.html', {})})) else: return HttpResponse(json.dumps({'success': False, 'error': 'Invalid e-mail'})) + @ensure_csrf_cookie def reactivation_email(request): ''' Send an e-mail to reactivate a deactivated account, or to @@ -856,6 +866,7 @@ def reactivation_email(request): 'error': 'No inactive user with this e-mail exists'})) return reactivation_email_for_user(user) + def reactivation_email_for_user(user): reg = Registration.objects.get(user=user) @@ -996,11 +1007,11 @@ def pending_name_changes(request): changes = list(PendingNameChange.objects.all()) js = {'students': [{'new_name': c.new_name, - 'rationale':c.rationale, - 'old_name':UserProfile.objects.get(user=c.user).name, - 'email':c.user.email, - 'uid':c.user.id, - 'cid':c.id} for c in changes]} + 'rationale': c.rationale, + 'old_name': UserProfile.objects.get(user=c.user).name, + 'email': c.user.email, + 'uid': c.user.id, + 'cid': c.id} for c in changes]} return render_to_response('name_changes.html', js) @@ -1057,6 +1068,8 @@ def accept_name_change(request): # TODO: This is a giant kludge to give Pearson something to test against ASAP. # Will need to get replaced by something that actually ties into TestCenterUser + + @csrf_exempt def test_center_login(request): if not settings.MITX_FEATURES.get('ENABLE_PEARSON_HACK_TEST'): diff --git a/common/djangoapps/track/migrations/0001_initial.py b/common/djangoapps/track/migrations/0001_initial.py index 0546203cf8..6ec146dd10 100644 --- a/common/djangoapps/track/migrations/0001_initial.py +++ b/common/djangoapps/track/migrations/0001_initial.py @@ -45,4 +45,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['track'] \ No newline at end of file + complete_apps = ['track'] diff --git a/common/djangoapps/track/migrations/0002_auto__add_field_trackinglog_host__chg_field_trackinglog_event_type__ch.py b/common/djangoapps/track/migrations/0002_auto__add_field_trackinglog_host__chg_field_trackinglog_event_type__ch.py index 4c73aa3bfd..0bb0cde42e 100644 --- a/common/djangoapps/track/migrations/0002_auto__add_field_trackinglog_host__chg_field_trackinglog_event_type__ch.py +++ b/common/djangoapps/track/migrations/0002_auto__add_field_trackinglog_host__chg_field_trackinglog_event_type__ch.py @@ -48,4 +48,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['track'] \ No newline at end of file + complete_apps = ['track'] diff --git a/common/djangoapps/track/models.py b/common/djangoapps/track/models.py index dfdf7a0558..b6a16706c1 100644 --- a/common/djangoapps/track/models.py +++ b/common/djangoapps/track/models.py @@ -2,21 +2,20 @@ from django.db import models from django.db import models + class TrackingLog(models.Model): - dtcreated = models.DateTimeField('creation date',auto_now_add=True) - username = models.CharField(max_length=32,blank=True) - ip = models.CharField(max_length=32,blank=True) + dtcreated = models.DateTimeField('creation date', auto_now_add=True) + username = models.CharField(max_length=32, blank=True) + ip = models.CharField(max_length=32, blank=True) event_source = models.CharField(max_length=32) - event_type = models.CharField(max_length=512,blank=True) + event_type = models.CharField(max_length=512, blank=True) event = models.TextField(blank=True) - agent = models.CharField(max_length=256,blank=True) - page = models.CharField(max_length=512,blank=True,null=True) + agent = models.CharField(max_length=256, blank=True) + page = models.CharField(max_length=512, blank=True, null=True) time = models.DateTimeField('event time') - host = models.CharField(max_length=64,blank=True) + host = models.CharField(max_length=64, blank=True) def __unicode__(self): s = "[%s] %s@%s: %s | %s | %s | %s" % (self.time, self.username, self.ip, self.event_source, self.event_type, self.page, self.event) return s - - diff --git a/common/djangoapps/track/views.py b/common/djangoapps/track/views.py index 54bd476799..ae3a1dcb3e 100644 --- a/common/djangoapps/track/views.py +++ b/common/djangoapps/track/views.py @@ -17,19 +17,21 @@ from track.models import TrackingLog log = logging.getLogger("tracking") -LOGFIELDS = ['username','ip','event_source','event_type','event','agent','page','time','host'] +LOGFIELDS = ['username', 'ip', 'event_source', 'event_type', 'event', 'agent', 'page', 'time', 'host'] + def log_event(event): event_str = json.dumps(event) log.info(event_str[:settings.TRACK_MAX_EVENT]) if settings.MITX_FEATURES.get('ENABLE_SQL_TRACKING_LOGS'): event['time'] = dateutil.parser.parse(event['time']) - tldat = TrackingLog(**dict( (x,event[x]) for x in LOGFIELDS )) + tldat = TrackingLog(**dict((x, event[x]) for x in LOGFIELDS)) try: tldat.save() except Exception as err: log.exception(err) + def user_track(request): try: # TODO: Do the same for many of the optional META parameters username = request.user.username @@ -87,13 +89,14 @@ def server_track(request, event_type, event, page=None): "host": request.META['SERVER_NAME'], } - if event_type.startswith("/event_logs") and request.user.is_staff: # don't log + if event_type.startswith("/event_logs") and request.user.is_staff: # don't log return log_event(event) + @login_required @ensure_csrf_cookie -def view_tracking_log(request,args=''): +def view_tracking_log(request, args=''): if not request.user.is_staff: return redirect('/') nlen = 100 @@ -104,16 +107,15 @@ def view_tracking_log(request,args=''): nlen = int(arg) if arg.startswith('username='): username = arg[9:] - + record_instances = TrackingLog.objects.all().order_by('-time') if username: record_instances = record_instances.filter(username=username) record_instances = record_instances[0:nlen] - + # fix dtstamp fmt = '%a %d-%b-%y %H:%M:%S' # "%Y-%m-%d %H:%M:%S %Z%z" for rinst in record_instances: rinst.dtstr = rinst.time.replace(tzinfo=pytz.utc).astimezone(pytz.timezone('US/Eastern')).strftime(fmt) - return render_to_response('tracking_log.html',{'records':record_instances}) - + return render_to_response('tracking_log.html', {'records': record_instances}) diff --git a/common/djangoapps/util/cache.py b/common/djangoapps/util/cache.py index 89b5dffd5e..8ab1b06acd 100644 --- a/common/djangoapps/util/cache.py +++ b/common/djangoapps/util/cache.py @@ -58,4 +58,3 @@ def cache_if_anonymous(view_func): return view_func(request, *args, **kwargs) return _decorated - diff --git a/common/djangoapps/util/converters.py b/common/djangoapps/util/converters.py index 7f96dc6c30..900371a0dd 100644 --- a/common/djangoapps/util/converters.py +++ b/common/djangoapps/util/converters.py @@ -1,7 +1,9 @@ -import time, datetime +import time +import datetime import re import calendar + def time_to_date(time_obj): """ Convert a time.time_struct to a true universal time (can pass to js Date constructor) @@ -9,6 +11,7 @@ def time_to_date(time_obj): # TODO change to using the isoformat() function on datetime. js date can parse those return calendar.timegm(time_obj) * 1000 + def jsdate_to_time(field): """ Convert a universal time (iso format) or msec since epoch to a time obj @@ -16,9 +19,9 @@ def jsdate_to_time(field): if field is None: return field elif isinstance(field, basestring): # iso format but ignores time zone assuming it's Z - d=datetime.datetime(*map(int, re.split('[^\d]', field)[:6])) # stop after seconds. Debatable + d = datetime.datetime(*map(int, re.split('[^\d]', field)[:6])) # stop after seconds. Debatable return d.utctimetuple() elif isinstance(field, int) or isinstance(field, float): return time.gmtime(field / 1000) elif isinstance(field, time.struct_time): - return field \ No newline at end of file + return field diff --git a/common/djangoapps/util/json_request.py b/common/djangoapps/util/json_request.py index 4beff7bdc8..840a8282f9 100644 --- a/common/djangoapps/util/json_request.py +++ b/common/djangoapps/util/json_request.py @@ -13,7 +13,7 @@ def expect_json(view_function): def expect_json_with_cloned_request(request, *args, **kwargs): # cdodge: fix postback errors in CMS. The POST 'content-type' header can include additional information # e.g. 'charset', so we can't do a direct string compare - if request.META.get('CONTENT_TYPE','').lower().startswith("application/json"): + if request.META.get('CONTENT_TYPE', '').lower().startswith("application/json"): cloned_request = copy.copy(request) cloned_request.POST = cloned_request.POST.copy() cloned_request.POST.update(json.loads(request.body)) diff --git a/common/djangoapps/util/views.py b/common/djangoapps/util/views.py index 0ccdd03301..cece37757b 100644 --- a/common/djangoapps/util/views.py +++ b/common/djangoapps/util/views.py @@ -93,6 +93,7 @@ def accepts(request, media_type): accept = parse_accept_header(request.META.get("HTTP_ACCEPT", "")) return media_type in [t for (t, p, q) in accept] + def debug_request(request): """Return a pretty printed version of the request""" diff --git a/common/djangoapps/xmodule_modifiers.py b/common/djangoapps/xmodule_modifiers.py index b171b402ee..7b19c27553 100644 --- a/common/djangoapps/xmodule_modifiers.py +++ b/common/djangoapps/xmodule_modifiers.py @@ -12,6 +12,7 @@ from xmodule.vertical_module import VerticalModule log = logging.getLogger("mitx.xmodule_modifiers") + def wrap_xmodule(get_html, module, template, context=None): """ Wraps the results of get_html in a standard
                  with identifying @@ -32,7 +33,7 @@ def wrap_xmodule(get_html, module, template, context=None): def _get_html(): context.update({ 'content': get_html(), - 'display_name' : module.metadata.get('display_name') if module.metadata is not None else None, + 'display_name': module.metadata.get('display_name') if module.metadata is not None else None, 'class_': module.__class__.__name__, 'module_name': module.js_module_name }) @@ -52,6 +53,7 @@ def replace_course_urls(get_html, course_id): return static_replace.replace_course_urls(get_html(), course_id) return _get_html + def replace_static_urls(get_html, data_dir, course_namespace=None): """ Updates the supplied module with a new get_html function that wraps @@ -64,6 +66,7 @@ def replace_static_urls(get_html, data_dir, course_namespace=None): return static_replace.replace_static_urls(get_html(), data_dir, course_namespace) return _get_html + def grade_histogram(module_id): ''' Print out a histogram of grades on a given problem. Part of staff member debug info. @@ -98,7 +101,7 @@ def add_histogram(get_html, module, user): @wraps(get_html) def _get_html(): - if type(module) in [SequenceModule, VerticalModule]: # TODO: make this more general, eg use an XModule attribute instead + if type(module) in [SequenceModule, VerticalModule]: # TODO: make this more general, eg use an XModule attribute instead return get_html() module_id = module.id @@ -114,35 +117,35 @@ def add_histogram(get_html, module, user): # doesn't like symlinks) filepath = filename data_dir = osfs.root_path.rsplit('/')[-1] - giturl = module.metadata.get('giturl','https://github.com/MITx') - edit_link = "%s/%s/tree/master/%s" % (giturl,data_dir,filepath) + giturl = module.metadata.get('giturl', 'https://github.com/MITx') + edit_link = "%s/%s/tree/master/%s" % (giturl, data_dir, filepath) else: edit_link = False # Need to define all the variables that are about to be used giturl = "" data_dir = "" - source_file = module.metadata.get('source_file','') # source used to generate the problem XML, eg latex or word + source_file = module.metadata.get('source_file', '') # source used to generate the problem XML, eg latex or word # useful to indicate to staff if problem has been released or not # TODO (ichuang): use _has_access_descriptor.can_load in lms.courseware.access, instead of now>mstart comparison here now = time.gmtime() is_released = "unknown" - mstart = getattr(module.descriptor,'start') + mstart = getattr(module.descriptor, 'start') if mstart is not None: is_released = "Yes!" if (now > mstart) else "Not yet" staff_context = {'definition': module.definition.get('data'), 'metadata': json.dumps(module.metadata, indent=4), 'location': module.location, - 'xqa_key': module.metadata.get('xqa_key',''), - 'source_file' : source_file, - 'source_url': '%s/%s/tree/master/%s' % (giturl,data_dir,source_file), + 'xqa_key': module.metadata.get('xqa_key', ''), + 'source_file': source_file, + 'source_url': '%s/%s/tree/master/%s' % (giturl, data_dir, source_file), 'category': str(module.__class__.__name__), # Template uses element_id in js function names, so can't allow dashes - 'element_id': module.location.html_id().replace('-','_'), + 'element_id': module.location.html_id().replace('-', '_'), 'edit_link': edit_link, 'user': user, - 'xqa_server' : settings.MITX_FEATURES.get('USE_XQA_SERVER','http://xqa:server@content-qa.mitx.mit.edu/xqa'), + 'xqa_server': settings.MITX_FEATURES.get('USE_XQA_SERVER', 'http://xqa:server@content-qa.mitx.mit.edu/xqa'), 'histogram': json.dumps(histogram), 'render_histogram': render_histogram, 'module_content': get_html(), @@ -151,4 +154,3 @@ def add_histogram(get_html, module, user): return render_to_string("staff_problem_info.html", staff_context) return _get_html - diff --git a/common/lib/capa/capa/calc.py b/common/lib/capa/capa/calc.py index 40ac14308e..0f062d17d5 100644 --- a/common/lib/capa/capa/calc.py +++ b/common/lib/capa/capa/calc.py @@ -121,9 +121,9 @@ def evaluator(variables, functions, string, cs=False): # confusing. They may also conflict with variables if we ever allow e.g. # 5R instead of 5*R suffixes = {'%': 0.01, 'k': 1e3, 'M': 1e6, 'G': 1e9, - 'T': 1e12,# 'P':1e15,'E':1e18,'Z':1e21,'Y':1e24, + 'T': 1e12, # 'P':1e15,'E':1e18,'Z':1e21,'Y':1e24, 'c': 1e-2, 'm': 1e-3, 'u': 1e-6, - 'n': 1e-9, 'p': 1e-12}# ,'f':1e-15,'a':1e-18,'z':1e-21,'y':1e-24} + 'n': 1e-9, 'p': 1e-12} # ,'f':1e-15,'a':1e-18,'z':1e-21,'y':1e-24} def super_float(text): ''' Like float, but with si extensions. 1k goes to 1000''' diff --git a/common/lib/capa/capa/capa_problem.py b/common/lib/capa/capa/capa_problem.py index 4b0faa91a1..9b8bbd7288 100644 --- a/common/lib/capa/capa/capa_problem.py +++ b/common/lib/capa/capa/capa_problem.py @@ -75,7 +75,7 @@ global_context = {'random': random, 'draganddrop': verifiers.draganddrop} # These should be removed from HTML output, including all subelements -html_problem_semantics = ["codeparam", "responseparam", "answer", "script", "hintgroup", "openendedparam","openendedrubric"] +html_problem_semantics = ["codeparam", "responseparam", "answer", "script", "hintgroup", "openendedparam", "openendedrubric"] log = logging.getLogger('mitx.' + __name__) @@ -453,7 +453,7 @@ class LoncapaProblem(object): exec code in context, context except Exception as err: log.exception("Error while execing script code: " + code) - msg = "Error while executing script code: %s" % str(err).replace('<','<') + msg = "Error while executing script code: %s" % str(err).replace('<', '<') raise responsetypes.LoncapaProblemError(msg) finally: sys.path = original_path @@ -502,7 +502,7 @@ class LoncapaProblem(object): 'id': problemtree.get('id'), 'feedback': {'message': msg, 'hint': hint, - 'hintmode': hintmode,}} + 'hintmode': hintmode, }} input_type_cls = inputtypes.registry.get_class_for_tag(problemtree.tag) the_input = input_type_cls(self.system, problemtree, state) diff --git a/common/lib/capa/capa/chem/__init__.py b/common/lib/capa/capa/chem/__init__.py index 8b13789179..e69de29bb2 100644 --- a/common/lib/capa/capa/chem/__init__.py +++ b/common/lib/capa/capa/chem/__init__.py @@ -1 +0,0 @@ - diff --git a/common/lib/capa/capa/chem/chemcalc.py b/common/lib/capa/capa/chem/chemcalc.py index 389e688cf4..5b80005044 100644 --- a/common/lib/capa/capa/chem/chemcalc.py +++ b/common/lib/capa/capa/chem/chemcalc.py @@ -17,17 +17,17 @@ from nltk.tree import Tree ARROWS = ('<->', '->') ## Defines a simple pyparsing tokenizer for chemical equations -elements = ['Ac','Ag','Al','Am','Ar','As','At','Au','B','Ba','Be', - 'Bh','Bi','Bk','Br','C','Ca','Cd','Ce','Cf','Cl','Cm', - 'Cn','Co','Cr','Cs','Cu','Db','Ds','Dy','Er','Es','Eu', - 'F','Fe','Fl','Fm','Fr','Ga','Gd','Ge','H','He','Hf', - 'Hg','Ho','Hs','I','In','Ir','K','Kr','La','Li','Lr', - 'Lu','Lv','Md','Mg','Mn','Mo','Mt','N','Na','Nb','Nd', - 'Ne','Ni','No','Np','O','Os','P','Pa','Pb','Pd','Pm', - 'Po','Pr','Pt','Pu','Ra','Rb','Re','Rf','Rg','Rh','Rn', - 'Ru','S','Sb','Sc','Se','Sg','Si','Sm','Sn','Sr','Ta', - 'Tb','Tc','Te','Th','Ti','Tl','Tm','U','Uuo','Uup', - 'Uus','Uut','V','W','Xe','Y','Yb','Zn','Zr'] +elements = ['Ac', 'Ag', 'Al', 'Am', 'Ar', 'As', 'At', 'Au', 'B', 'Ba', 'Be', + 'Bh', 'Bi', 'Bk', 'Br', 'C', 'Ca', 'Cd', 'Ce', 'Cf', 'Cl', 'Cm', + 'Cn', 'Co', 'Cr', 'Cs', 'Cu', 'Db', 'Ds', 'Dy', 'Er', 'Es', 'Eu', + 'F', 'Fe', 'Fl', 'Fm', 'Fr', 'Ga', 'Gd', 'Ge', 'H', 'He', 'Hf', + 'Hg', 'Ho', 'Hs', 'I', 'In', 'Ir', 'K', 'Kr', 'La', 'Li', 'Lr', + 'Lu', 'Lv', 'Md', 'Mg', 'Mn', 'Mo', 'Mt', 'N', 'Na', 'Nb', 'Nd', + 'Ne', 'Ni', 'No', 'Np', 'O', 'Os', 'P', 'Pa', 'Pb', 'Pd', 'Pm', + 'Po', 'Pr', 'Pt', 'Pu', 'Ra', 'Rb', 'Re', 'Rf', 'Rg', 'Rh', 'Rn', + 'Ru', 'S', 'Sb', 'Sc', 'Se', 'Sg', 'Si', 'Sm', 'Sn', 'Sr', 'Ta', + 'Tb', 'Tc', 'Te', 'Th', 'Ti', 'Tl', 'Tm', 'U', 'Uuo', 'Uup', + 'Uus', 'Uut', 'V', 'W', 'Xe', 'Y', 'Yb', 'Zn', 'Zr'] digits = map(str, range(10)) symbols = list("[](){}^+-/") phases = ["(s)", "(l)", "(g)", "(aq)"] @@ -252,7 +252,7 @@ def _get_final_tree(s): ''' tokenized = tokenizer.parseString(s) parsed = parser.parse(tokenized) - merged = _merge_children(parsed, {'S','group'}) + merged = _merge_children(parsed, {'S', 'group'}) final = _clean_parse_tree(merged) return final diff --git a/common/lib/capa/capa/correctmap.py b/common/lib/capa/capa/correctmap.py index c7386219b1..a78b10d07a 100644 --- a/common/lib/capa/capa/correctmap.py +++ b/common/lib/capa/capa/correctmap.py @@ -3,6 +3,7 @@ # # Used by responsetypes and capa_problem + class CorrectMap(object): """ Stores map between answer_id and response evaluation result for each question @@ -152,6 +153,3 @@ class CorrectMap(object): if not isinstance(other_cmap, CorrectMap): raise Exception('CorrectMap.update called with invalid argument %s' % other_cmap) self.cmap.update(other_cmap.get_dict()) - - - diff --git a/common/lib/capa/capa/customrender.py b/common/lib/capa/capa/customrender.py index ef1044e8b1..a925a5970d 100644 --- a/common/lib/capa/capa/customrender.py +++ b/common/lib/capa/capa/customrender.py @@ -22,6 +22,8 @@ log = logging.getLogger('mitx.' + __name__) registry = TagRegistry() #----------------------------------------------------------------------------- + + class MathRenderer(object): tags = ['math'] @@ -77,6 +79,7 @@ registry.register(MathRenderer) #----------------------------------------------------------------------------- + class SolutionRenderer(object): ''' A solution is just a ... which is given an ID, that is used for displaying an @@ -97,4 +100,3 @@ class SolutionRenderer(object): return etree.XML(html) registry.register(SolutionRenderer) - diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index 0b0e86ce66..83c79a7247 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -54,6 +54,7 @@ log = logging.getLogger('mitx.' + __name__) registry = TagRegistry() + class Attribute(object): """ Allows specifying required and optional attributes for input types. @@ -413,7 +414,7 @@ class JavascriptInput(InputTypeBase): return [Attribute('params', None), Attribute('problem_state', None), Attribute('display_class', None), - Attribute('display_file', None),] + Attribute('display_file', None), ] def setup(self): @@ -477,12 +478,13 @@ class TextLine(InputTypeBase): def _extra_context(self): return {'do_math': self.do_math, - 'preprocessor': self.preprocessor,} + 'preprocessor': self.preprocessor, } registry.register(TextLine) #----------------------------------------------------------------------------- + class FileSubmission(InputTypeBase): """ Upload some files (e.g. for programming assignments) @@ -508,7 +510,7 @@ class FileSubmission(InputTypeBase): Convert the list of allowed files to a convenient format. """ return [Attribute('allowed_files', '[]', transform=cls.parse_files), - Attribute('required_files', '[]', transform=cls.parse_files),] + Attribute('required_files', '[]', transform=cls.parse_files), ] def setup(self): """ @@ -524,7 +526,7 @@ class FileSubmission(InputTypeBase): self.msg = FileSubmission.submitted_msg def _extra_context(self): - return {'queue_len': self.queue_len,} + return {'queue_len': self.queue_len, } return context registry.register(FileSubmission) @@ -582,7 +584,7 @@ class CodeInput(InputTypeBase): def _extra_context(self): """Defined queue_len, add it """ - return {'queue_len': self.queue_len,} + return {'queue_len': self.queue_len, } registry.register(CodeInput) @@ -606,7 +608,7 @@ class Schematic(InputTypeBase): Attribute('parts', None), Attribute('analyses', None), Attribute('initial_value', None), - Attribute('submit_analyses', None),] + Attribute('submit_analyses', None), ] return context @@ -614,6 +616,7 @@ registry.register(Schematic) #----------------------------------------------------------------------------- + class ImageInput(InputTypeBase): """ Clickable image as an input field. Element should specify the image source, height, @@ -635,7 +638,7 @@ class ImageInput(InputTypeBase): """ return [Attribute('src'), Attribute('height'), - Attribute('width'),] + Attribute('width'), ] def setup(self): @@ -660,6 +663,7 @@ registry.register(ImageInput) #----------------------------------------------------------------------------- + class Crystallography(InputTypeBase): """ An input for crystallography -- user selects 3 points on the axes, and we get a plane. @@ -728,18 +732,19 @@ class ChemicalEquationInput(InputTypeBase): """ Can set size of text field. """ - return [Attribute('size', '20'),] + return [Attribute('size', '20'), ] def _extra_context(self): """ TODO (vshnayder): Get rid of this once we have a standard way of requiring js to be loaded. """ - return {'previewer': '/static/js/capa/chemical_equation_preview.js',} + return {'previewer': '/static/js/capa/chemical_equation_preview.js', } registry.register(ChemicalEquationInput) #----------------------------------------------------------------------------- + class DragAndDropInput(InputTypeBase): """ Input for drag and drop problems. Allows student to drag and drop images and diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index 5f0e1639b2..adf5eda416 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -186,9 +186,9 @@ class LoncapaResponse(object): tree = etree.Element('span') # problem author can make this span display:inline - if self.xml.get('inline',''): - tree.set('class','inline') - + if self.xml.get('inline', ''): + tree.set('class', 'inline') + for item in self.xml: # call provided procedure to do the rendering item_xhtml = renderer(item) @@ -1294,7 +1294,7 @@ class CodeResponse(LoncapaResponse): # State associated with the queueing request queuestate = {'key': queuekey, - 'time': qtime,} + 'time': qtime, } cmap = CorrectMap() if error: diff --git a/common/lib/capa/capa/tests/__init__.py b/common/lib/capa/capa/tests/__init__.py index b06975f6ce..89cb5a5ee9 100644 --- a/common/lib/capa/capa/tests/__init__.py +++ b/common/lib/capa/capa/tests/__init__.py @@ -8,6 +8,7 @@ import xml.sax.saxutils as saxutils TEST_DIR = os.path.dirname(os.path.realpath(__file__)) + def tst_render_template(template, context): """ A test version of render to template. Renders to the repr of the context, completely ignoring @@ -25,7 +26,7 @@ test_system = Mock( user=Mock(), filestore=fs.osfs.OSFS(os.path.join(TEST_DIR, "test_files")), debug=True, - xqueue={'interface':None, 'callback_url':'/', 'default_queuename': 'testqueue', 'waittime': 10}, + xqueue={'interface': None, 'callback_url': '/', 'default_queuename': 'testqueue', 'waittime': 10}, node_path=os.environ.get("NODE_PATH", "/usr/local/lib/node_modules"), - anonymous_student_id = 'student' + anonymous_student_id='student' ) diff --git a/common/lib/capa/capa/tests/test_customrender.py b/common/lib/capa/capa/tests/test_customrender.py index 7208ab2941..eece275b05 100644 --- a/common/lib/capa/capa/tests/test_customrender.py +++ b/common/lib/capa/capa/tests/test_customrender.py @@ -8,6 +8,7 @@ from capa import customrender # just a handy shortcut lookup_tag = customrender.registry.get_class_for_tag + def extract_context(xml): """ Given an xml element corresponding to the output of test_system.render_template, get back the @@ -15,9 +16,11 @@ def extract_context(xml): """ return eval(xml.text) + def quote_attr(s): return saxutils.quoteattr(s)[1:-1] # don't want the outer quotes + class HelperTest(unittest.TestCase): ''' Make sure that our helper function works! @@ -50,7 +53,7 @@ class SolutionRenderTest(unittest.TestCase): # our test_system "renders" templates to a div with the repr of the context xml = renderer.get_html() context = extract_context(xml) - self.assertEqual(context, {'id' : 'solution_12'}) + self.assertEqual(context, {'id': 'solution_12'}) class MathRenderTest(unittest.TestCase): @@ -65,12 +68,11 @@ class MathRenderTest(unittest.TestCase): renderer = lookup_tag('math')(test_system, element) self.assertEqual(renderer.mathstr, mathjax_out) - + def test_parsing(self): self.check_parse('$abc$', '[mathjaxinline]abc[/mathjaxinline]') self.check_parse('$abc', '$abc') self.check_parse(r'$\displaystyle 2+2$', '[mathjax] 2+2[/mathjax]') - + # NOTE: not testing get_html yet because I don't understand why it's doing what it's doing. - diff --git a/common/lib/capa/capa/tests/test_inputtypes.py b/common/lib/capa/capa/tests/test_inputtypes.py index 6c282baf95..4a5ea5c429 100644 --- a/common/lib/capa/capa/tests/test_inputtypes.py +++ b/common/lib/capa/capa/tests/test_inputtypes.py @@ -31,6 +31,7 @@ lookup_tag = inputtypes.registry.get_class_for_tag def quote_attr(s): return saxutils.quoteattr(s)[1:-1] # don't want the outer quotes + class OptionInputTest(unittest.TestCase): ''' Make sure option inputs work @@ -100,7 +101,7 @@ class ChoiceGroupTest(unittest.TestCase): 'input_type': expected_input_type, 'choices': [('foil1', 'This is foil One.'), ('foil2', 'This is foil Two.'), - ('foil3', 'This is foil Three.'),], + ('foil3', 'This is foil Three.'), ], 'name_array_suffix': expected_suffix, # what is this for?? } @@ -137,7 +138,7 @@ class JavascriptInputTest(unittest.TestCase): element = etree.fromstring(xml_str) - state = {'value': '3',} + state = {'value': '3', } the_input = lookup_tag('javascriptinput')(test_system, element, state) context = the_input._get_render_context() @@ -149,7 +150,7 @@ class JavascriptInputTest(unittest.TestCase): 'params': params, 'display_file': display_file, 'display_class': display_class, - 'problem_state': problem_state,} + 'problem_state': problem_state, } self.assertEqual(context, expected) @@ -165,7 +166,7 @@ class TextLineTest(unittest.TestCase): element = etree.fromstring(xml_str) - state = {'value': 'BumbleBee',} + state = {'value': 'BumbleBee', } the_input = lookup_tag('textline')(test_system, element, state) context = the_input._get_render_context() @@ -193,7 +194,7 @@ class TextLineTest(unittest.TestCase): element = etree.fromstring(xml_str) - state = {'value': 'BumbleBee',} + state = {'value': 'BumbleBee', } the_input = lookup_tag('textline')(test_system, element, state) context = the_input._get_render_context() @@ -231,7 +232,7 @@ class FileSubmissionTest(unittest.TestCase): state = {'value': 'BumbleBee.py', 'status': 'incomplete', - 'feedback' : {'message': '3'}, } + 'feedback': {'message': '3'}, } input_class = lookup_tag('filesubmission') the_input = input_class(test_system, element, state) @@ -275,7 +276,7 @@ class CodeInputTest(unittest.TestCase): state = {'value': 'print "good evening"', 'status': 'incomplete', - 'feedback' : {'message': '3'}, } + 'feedback': {'message': '3'}, } input_class = lookup_tag('codeinput') the_input = input_class(test_system, element, state) @@ -488,7 +489,7 @@ class ChemicalEquationTest(unittest.TestCase): element = etree.fromstring(xml_str) - state = {'value': 'H2OYeah',} + state = {'value': 'H2OYeah', } the_input = lookup_tag('chemicalequationinput')(test_system, element, state) context = the_input._get_render_context() diff --git a/common/lib/capa/capa/tests/test_responsetypes.py b/common/lib/capa/capa/tests/test_responsetypes.py index 9eecef3986..18da338b91 100644 --- a/common/lib/capa/capa/tests/test_responsetypes.py +++ b/common/lib/capa/capa/tests/test_responsetypes.py @@ -16,6 +16,7 @@ from capa.correctmap import CorrectMap from capa.util import convert_files_to_filenames from capa.xqueue_interface import dateformat + class MultiChoiceTest(unittest.TestCase): def test_MC_grade(self): multichoice_file = os.path.dirname(__file__) + "/test_files/multichoice.xml" @@ -295,16 +296,16 @@ class CodeResponseTest(unittest.TestCase): old_cmap = CorrectMap() for i, answer_id in enumerate(answer_ids): queuekey = 1000 + i - queuestate = CodeResponseTest.make_queuestate(1000+i, datetime.now()) + queuestate = CodeResponseTest.make_queuestate(1000 + i, datetime.now()) old_cmap.update(CorrectMap(answer_id=answer_ids[i], queuestate=queuestate)) # Message format common to external graders - grader_msg = 'MESSAGE' # Must be valid XML - correct_score_msg = json.dumps({'correct':True, 'score':1, 'msg': grader_msg}) - incorrect_score_msg = json.dumps({'correct':False, 'score':0, 'msg': grader_msg}) + grader_msg = 'MESSAGE' # Must be valid XML + correct_score_msg = json.dumps({'correct': True, 'score': 1, 'msg': grader_msg}) + incorrect_score_msg = json.dumps({'correct': False, 'score': 0, 'msg': grader_msg}) xserver_msgs = {'correct': correct_score_msg, - 'incorrect': incorrect_score_msg,} + 'incorrect': incorrect_score_msg, } # Incorrect queuekey, state should not be updated for correctness in ['correct', 'incorrect']: @@ -325,7 +326,7 @@ class CodeResponseTest(unittest.TestCase): new_cmap = CorrectMap() new_cmap.update(old_cmap) - npoints = 1 if correctness=='correct' else 0 + npoints = 1 if correctness == 'correct' else 0 new_cmap.set(answer_id=answer_id, npoints=npoints, correctness=correctness, msg=grader_msg, queuestate=None) test_lcp.update_score(xserver_msgs[correctness], queuekey=1000 + i) @@ -361,7 +362,7 @@ class CodeResponseTest(unittest.TestCase): for i, answer_id in enumerate(answer_ids): queuekey = 1000 + i latest_timestamp = datetime.now() - queuestate = CodeResponseTest.make_queuestate(1000+i, latest_timestamp) + queuestate = CodeResponseTest.make_queuestate(1000 + i, latest_timestamp) cmap.update(CorrectMap(answer_id=answer_id, queuestate=queuestate)) test_lcp.correct_map.update(cmap) @@ -412,6 +413,7 @@ class ChoiceResponseTest(unittest.TestCase): self.assertEquals(test_lcp.grade_answers(test_answers).get_correctness('1_3_1'), 'incorrect') self.assertEquals(test_lcp.grade_answers(test_answers).get_correctness('1_4_1'), 'correct') + class JavascriptResponseTest(unittest.TestCase): def test_jr_grade(self): @@ -424,4 +426,3 @@ class JavascriptResponseTest(unittest.TestCase): self.assertEquals(test_lcp.grade_answers(incorrect_answers).get_correctness('1_2_1'), 'incorrect') self.assertEquals(test_lcp.grade_answers(correct_answers).get_correctness('1_2_1'), 'correct') - diff --git a/common/lib/capa/capa/util.py b/common/lib/capa/capa/util.py index 0df58c216f..a0f25c4947 100644 --- a/common/lib/capa/capa/util.py +++ b/common/lib/capa/capa/util.py @@ -51,15 +51,17 @@ def convert_files_to_filenames(answers): new_answers = dict() for answer_id in answers.keys(): answer = answers[answer_id] - if is_list_of_files(answer): # Files are stored as a list, even if one file + if is_list_of_files(answer): # Files are stored as a list, even if one file new_answers[answer_id] = [f.name for f in answer] else: new_answers[answer_id] = answers[answer_id] return new_answers + def is_list_of_files(files): return isinstance(files, list) and all(is_file(f) for f in files) + def is_file(file_to_test): ''' Duck typing to check if 'file_to_test' is a File object @@ -79,11 +81,10 @@ def find_with_default(node, path, default): Returns: node.find(path).text if the find succeeds, default otherwise. - + """ v = node.find(path) if v is not None: return v.text else: return default - diff --git a/common/lib/capa/capa/xqueue_interface.py b/common/lib/capa/capa/xqueue_interface.py index 798867955b..8dbe2c84aa 100644 --- a/common/lib/capa/capa/xqueue_interface.py +++ b/common/lib/capa/capa/xqueue_interface.py @@ -10,6 +10,7 @@ import requests log = logging.getLogger('mitx.' + __name__) dateformat = '%Y%m%d%H%M%S' + def make_hashkey(seed): ''' Generate a string key by hashing @@ -29,9 +30,9 @@ def make_xheader(lms_callback_url, lms_key, queue_name): 'queue_name': designate a specific queue within xqueue server, e.g. 'MITx-6.00x' (string) } """ - return json.dumps({ 'lms_callback_url': lms_callback_url, + return json.dumps({'lms_callback_url': lms_callback_url, 'lms_key': lms_key, - 'queue_name': queue_name }) + 'queue_name': queue_name}) def parse_xreply(xreply): @@ -96,18 +97,18 @@ class XQueueInterface(object): def _login(self): - payload = { 'username': self.auth['username'], - 'password': self.auth['password'] } + payload = {'username': self.auth['username'], + 'password': self.auth['password']} return self._http_post(self.url + '/xqueue/login/', payload) def _send_to_queue(self, header, body, files_to_upload): payload = {'xqueue_header': header, - 'xqueue_body' : body} + 'xqueue_body': body} files = {} if files_to_upload is not None: for f in files_to_upload: - files.update({ f.name: f }) + files.update({f.name: f}) return self._http_post(self.url + '/xqueue/submit/', payload, files=files) diff --git a/common/lib/supertrace.py b/common/lib/supertrace.py index e17cd7a8ba..83dfa12031 100644 --- a/common/lib/supertrace.py +++ b/common/lib/supertrace.py @@ -3,7 +3,8 @@ A handy util to print a django-debug-screen-like stack trace with values of local variables. """ -import sys, traceback +import sys +import traceback from django.utils.encoding import smart_unicode @@ -48,5 +49,3 @@ def supertrace(max_len=160): print s except: print "" - - diff --git a/common/lib/xmodule/setup.py b/common/lib/xmodule/setup.py index 817af9c10d..3bc8bc5143 100644 --- a/common/lib/xmodule/setup.py +++ b/common/lib/xmodule/setup.py @@ -30,7 +30,7 @@ setup( "peergrading = xmodule.peer_grading_module:PeerGradingDescriptor", "problem = xmodule.capa_module:CapaDescriptor", "problemset = xmodule.seq_module:SequenceDescriptor", - "randomize = xmodule.randomize_module:RandomizeDescriptor", + "randomize = xmodule.randomize_module:RandomizeDescriptor", "section = xmodule.backcompat_module:SemanticSectionDescriptor", "sequential = xmodule.seq_module:SequenceDescriptor", "slides = xmodule.backcompat_module:TranslateCustomTagDescriptor", diff --git a/common/lib/xmodule/xmodule/abtest_module.py b/common/lib/xmodule/xmodule/abtest_module.py index 12456bc7d7..537d864127 100644 --- a/common/lib/xmodule/xmodule/abtest_module.py +++ b/common/lib/xmodule/xmodule/abtest_module.py @@ -51,7 +51,7 @@ class ABTestModule(XModule): def get_shared_state(self): return json.dumps({'group': self.group}) - + def get_child_descriptors(self): active_locations = set(self.definition['data']['group_content'][self.group]) return [desc for desc in self.descriptor.get_children() if desc.location.url() in active_locations] @@ -171,7 +171,7 @@ class ABTestDescriptor(RawDescriptor, XmlDescriptor): group_elem.append(etree.fromstring(child.export_to_xml(resource_fs))) return xml_object - - + + def has_dynamic_children(self): return True diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index d3c8786f66..d806ec7913 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -29,6 +29,7 @@ TIMEDELTA_REGEX = re.compile(r'^((?P\d+?) day(?:s?))?(\s)?((?P\d+?) # Generated this many different variants of problems with rerandomize=per_student NUM_RANDOMIZATION_BINS = 20 + def randomization_bin(seed, problem_id): """ Pick a randomization bin for the problem given the user's seed and a problem id. @@ -43,6 +44,7 @@ def randomization_bin(seed, problem_id): # get the first few digits of the hash, convert to an int, then mod. return int(h.hexdigest()[:7], 16) % NUM_RANDOMIZATION_BINS + def only_one(lst, default="", process=lambda x: x): """ If lst is empty, returns default @@ -283,7 +285,7 @@ class CapaModule(XModule): # Next, generate a fresh LoncapaProblem self.lcp = LoncapaProblem(self.definition['data'], self.location.html_id(), - state=None, # Tabula rasa + state=None, # Tabula rasa seed=self.seed, system=self.system) # Prepend a scary warning to the student @@ -302,7 +304,7 @@ class CapaModule(XModule): html = warning try: html += self.lcp.get_html() - except Exception, err: # Couldn't do it. Give up + except Exception, err: # Couldn't do it. Give up log.exception(err) raise @@ -315,7 +317,7 @@ class CapaModule(XModule): # check button is context-specific. # Put a "Check" button if unlimited attempts or still some left - if self.max_attempts is None or self.attempts < self.max_attempts-1: + if self.max_attempts is None or self.attempts < self.max_attempts - 1: check_button = "Check" else: # Will be final check so let user know that @@ -561,9 +563,9 @@ class CapaModule(XModule): current_time = datetime.datetime.now() prev_submit_time = self.lcp.get_recentmost_queuetime() waittime_between_requests = self.system.xqueue['waittime'] - if (current_time-prev_submit_time).total_seconds() < waittime_between_requests: + if (current_time - prev_submit_time).total_seconds() < waittime_between_requests: msg = 'You must wait at least %d seconds between submissions' % waittime_between_requests - return {'success': msg, 'html': ''} # Prompts a modal dialog in ajax callback + return {'success': msg, 'html': ''} # Prompts a modal dialog in ajax callback try: old_state = self.lcp.get_state() @@ -596,7 +598,7 @@ class CapaModule(XModule): event_info['attempts'] = self.attempts self.system.track_function('save_problem_check', event_info) - if hasattr(self.system,'psychometrics_handler'): # update PsychometricsData using callback + if hasattr(self.system, 'psychometrics_handler'): # update PsychometricsData using callback self.system.psychometrics_handler(self.get_instance_state()) # render problem into HTML @@ -707,7 +709,7 @@ class CapaDescriptor(RawDescriptor): @property def editable_metadata_fields(self): """Remove metadata from the editable fields since it has its own editor""" - subset = super(CapaDescriptor,self).editable_metadata_fields + subset = super(CapaDescriptor, self).editable_metadata_fields if 'markdown' in subset: subset.remove('markdown') return subset diff --git a/common/lib/xmodule/xmodule/combined_open_ended_module.py b/common/lib/xmodule/xmodule/combined_open_ended_module.py index 14a59c9004..112a7a68f8 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_module.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_module.py @@ -50,14 +50,16 @@ ACCEPT_FILE_UPLOAD = False TRUE_DICT = ["True", True, "TRUE", "true"] HUMAN_TASK_TYPE = { - 'selfassessment' : "Self Assessment", - 'openended' : "External Grader", + 'selfassessment': "Self Assessment", + 'openended': "External Grader", } + class IncorrectMaxScoreError(Exception): def __init__(self, msg): self.msg = msg + class CombinedOpenEndedModule(XModule): """ This is a module that encapsulates all open ended grading (self assessment, peer assessment, etc). @@ -700,4 +702,4 @@ class CombinedOpenEndedDescriptor(XmlDescriptor, EditingDescriptor): for child in ['task']: add_child(child) - return elt \ No newline at end of file + return elt diff --git a/common/lib/xmodule/xmodule/combined_open_ended_rubric.py b/common/lib/xmodule/xmodule/combined_open_ended_rubric.py index 6d4a3eebdf..9a213299cd 100644 --- a/common/lib/xmodule/xmodule/combined_open_ended_rubric.py +++ b/common/lib/xmodule/xmodule/combined_open_ended_rubric.py @@ -1,12 +1,14 @@ import logging from lxml import etree -log=logging.getLogger(__name__) +log = logging.getLogger(__name__) + class RubricParsingError(Exception): def __init__(self, msg): self.msg = msg + class CombinedOpenEndedRubric(object): def __init__ (self, system, view_only = False): @@ -27,8 +29,8 @@ class CombinedOpenEndedRubric(object): success = False try: rubric_categories = self.extract_categories(rubric_xml) - html = self.system.render_template('open_ended_rubric.html', - {'categories' : rubric_categories, + html = self.system.render_template('open_ended_rubric.html', + {'categories': rubric_categories, 'has_score': self.has_score, 'view_only': self.view_only}) success = True @@ -60,8 +62,8 @@ class CombinedOpenEndedRubric(object): options: [{text: "Option 1 Name", points: 0}, {text:"Option 2 Name", points: 5}] }, { category: "Category 2 Name", - options: [{text: "Option 1 Name", points: 0}, - {text: "Option 2 Name", points: 1}, + options: [{text: "Option 1 Name", points: 0}, + {text: "Option 2 Name", points: 1}, {text: "Option 3 Name", points: 2]}] ''' @@ -77,7 +79,7 @@ class CombinedOpenEndedRubric(object): def extract_category(self, category): - ''' + ''' construct an individual category {category: "Category 1 Name", options: [{text: "Option 1 text", points: 1}, @@ -110,7 +112,7 @@ class CombinedOpenEndedRubric(object): autonumbering = True # parse options for option in optionsxml: - if option.tag != 'option': + if option.tag != 'option': raise RubricParsingError("[extract_category]: expected option tag, got {0} instead".format(option.tag)) else: pointstr = option.get("points") @@ -127,7 +129,7 @@ class CombinedOpenEndedRubric(object): cur_points = cur_points + 1 else: raise Exception("[extract_category]: missing points attribute. Cannot continue to auto-create points values after a points value is explicitly defined.") - + selected = score == points optiontext = option.text options.append({'text': option.text, 'points': points, 'selected': selected}) diff --git a/common/lib/xmodule/xmodule/conditional_module.py b/common/lib/xmodule/xmodule/conditional_module.py index e20681e614..bcdf0f4738 100644 --- a/common/lib/xmodule/xmodule/conditional_module.py +++ b/common/lib/xmodule/xmodule/conditional_module.py @@ -9,12 +9,13 @@ from pkg_resources import resource_string log = logging.getLogger('mitx.' + __name__) + class ConditionalModule(XModule): ''' Blocks child module from showing unless certain conditions are met. Example: - + @@ -37,13 +38,13 @@ class ConditionalModule(XModule): def __init__(self, system, location, definition, descriptor, instance_state=None, shared_state=None, **kwargs): """ In addition to the normal XModule init, provide: - + self.condition = string describing condition required """ XModule.__init__(self, system, location, definition, descriptor, instance_state, shared_state, **kwargs) self.contents = None - self.condition = self.metadata.get('condition','') + self.condition = self.metadata.get('condition', '') #log.debug('conditional module required=%s' % self.required_modules_list) def _get_required_modules(self): @@ -56,7 +57,7 @@ class ConditionalModule(XModule): def is_condition_satisfied(self): self._get_required_modules() - if self.condition=='require_completed': + if self.condition == 'require_completed': # all required modules must be completed, as determined by # the modules .is_completed() method for module in self.required_modules: @@ -70,7 +71,7 @@ class ConditionalModule(XModule): else: log.debug('conditional module: %s IS completed' % module) return True - elif self.condition=='require_attempted': + elif self.condition == 'require_attempted': # all required modules must be attempted, as determined by # the modules .is_attempted() method for module in self.required_modules: @@ -111,9 +112,10 @@ class ConditionalModule(XModule): # for now, just deal with one child html = self.contents[0] - + return json.dumps({'html': html}) + class ConditionalDescriptor(SequenceDescriptor): module_class = ConditionalModule @@ -125,7 +127,7 @@ class ConditionalDescriptor(SequenceDescriptor): def __init__(self, *args, **kwargs): super(ConditionalDescriptor, self).__init__(*args, **kwargs) - required_module_list = [tuple(x.split('/',1)) for x in self.metadata.get('required','').split('&')] + required_module_list = [tuple(x.split('/', 1)) for x in self.metadata.get('required', '').split('&')] self.required_module_locations = [] for (tag, name) in required_module_list: loc = self.location.dict() @@ -133,9 +135,8 @@ class ConditionalDescriptor(SequenceDescriptor): loc['name'] = name self.required_module_locations.append(Location(loc)) log.debug('ConditionalDescriptor required_module_locations=%s' % self.required_module_locations) - + def get_required_module_descriptors(self): """Returns a list of XModuleDescritpor instances upon which this module depends, but are not children of this module""" return [self.system.load_item(loc) for loc in self.required_module_locations] - diff --git a/common/lib/xmodule/xmodule/contentstore/content.py b/common/lib/xmodule/xmodule/contentstore/content.py index 5b10acc0ef..be33401bc8 100644 --- a/common/lib/xmodule/xmodule/contentstore/content.py +++ b/common/lib/xmodule/xmodule/contentstore/content.py @@ -11,15 +11,16 @@ from xmodule.modulestore import Location from .django import contentstore from PIL import Image + class StaticContent(object): def __init__(self, loc, name, content_type, data, last_modified_at=None, thumbnail_location=None, import_path=None): self.location = loc - self.name = name #a display string which can be edited, and thus not part of the location which needs to be fixed + self.name = name # a display string which can be edited, and thus not part of the location which needs to be fixed self.content_type = content_type self.data = data self.last_modified_at = last_modified_at self.thumbnail_location = Location(thumbnail_location) if thumbnail_location is not None else None - # optional information about where this file was imported from. This is needed to support import/export + # optional information about where this file was imported from. This is needed to support import/export # cycles self.import_path = import_path @@ -29,7 +30,7 @@ class StaticContent(object): @staticmethod def generate_thumbnail_name(original_name): - return ('{0}'+XASSET_THUMBNAIL_TAIL_NAME).format(os.path.splitext(original_name)[0]) + return ('{0}' + XASSET_THUMBNAIL_TAIL_NAME).format(os.path.splitext(original_name)[0]) @staticmethod def compute_location(org, course, name, revision=None, is_thumbnail=False): @@ -41,7 +42,7 @@ class StaticContent(object): def get_url_path(self): return StaticContent.get_url_path_from_location(self.location) - + @staticmethod def get_url_path_from_location(location): if location is not None: @@ -56,15 +57,15 @@ class StaticContent(object): @staticmethod def get_id_from_location(location): - return { 'tag':location.tag, 'org' : location.org, 'course' : location.course, - 'category' : location.category, 'name' : location.name, - 'revision' : location.revision} + return {'tag': location.tag, 'org': location.org, 'course': location.course, + 'category': location.category, 'name': location.name, + 'revision': location.revision} @staticmethod def get_location_from_path(path): # remove leading / character if it is there one if path.startswith('/'): path = path[1:] - + return Location(path.split('/')) @staticmethod @@ -77,7 +78,7 @@ class StaticContent(object): return StaticContent.get_url_path_from_location(loc) - + class ContentStore(object): ''' @@ -95,14 +96,14 @@ class ContentStore(object): [ - {u'displayname': u'profile.jpg', u'chunkSize': 262144, u'length': 85374, - u'uploadDate': datetime.datetime(2012, 10, 3, 5, 41, 54, 183000), u'contentType': u'image/jpeg', - u'_id': {u'category': u'asset', u'name': u'profile.jpg', u'course': u'6.002x', u'tag': u'c4x', - u'org': u'MITx', u'revision': None}, u'md5': u'36dc53519d4b735eb6beba51cd686a0e'}, + {u'displayname': u'profile.jpg', u'chunkSize': 262144, u'length': 85374, + u'uploadDate': datetime.datetime(2012, 10, 3, 5, 41, 54, 183000), u'contentType': u'image/jpeg', + u'_id': {u'category': u'asset', u'name': u'profile.jpg', u'course': u'6.002x', u'tag': u'c4x', + u'org': u'MITx', u'revision': None}, u'md5': u'36dc53519d4b735eb6beba51cd686a0e'}, - {u'displayname': u'profile.thumbnail.jpg', u'chunkSize': 262144, u'length': 4073, - u'uploadDate': datetime.datetime(2012, 10, 3, 5, 41, 54, 196000), u'contentType': u'image/jpeg', - u'_id': {u'category': u'asset', u'name': u'profile.thumbnail.jpg', u'course': u'6.002x', u'tag': u'c4x', + {u'displayname': u'profile.thumbnail.jpg', u'chunkSize': 262144, u'length': 4073, + u'uploadDate': datetime.datetime(2012, 10, 3, 5, 41, 54, 196000), u'contentType': u'image/jpeg', + u'_id': {u'category': u'asset', u'name': u'profile.thumbnail.jpg', u'course': u'6.002x', u'tag': u'c4x', u'org': u'MITx', u'revision': None}, u'md5': u'ff1532598830e3feac91c2449eaa60d6'}, .... @@ -117,7 +118,7 @@ class ContentStore(object): thumbnail_name = StaticContent.generate_thumbnail_name(content.location.name) thumbnail_file_location = StaticContent.compute_location(content.location.org, content.location.course, - thumbnail_name, is_thumbnail = True) + thumbnail_name, is_thumbnail=True) # if we're uploading an image, then let's generate a thumbnail so that we can # serve it up when needed without having to rescale on the fly @@ -129,7 +130,7 @@ class ContentStore(object): # @todo: move the thumbnail size to a configuration setting?!? im = Image.open(StringIO.StringIO(content.data)) - # I've seen some exceptions from the PIL library when trying to save palletted + # I've seen some exceptions from the PIL library when trying to save palletted # PNG files to JPEG. Per the google-universe, they suggest converting to RGB first. im = im.convert('RGB') size = 128, 128 @@ -139,7 +140,7 @@ class ContentStore(object): thumbnail_file.seek(0) # store this thumbnail as any other piece of content - thumbnail_content = StaticContent(thumbnail_file_location, thumbnail_name, + thumbnail_content = StaticContent(thumbnail_file_location, thumbnail_name, 'image/jpeg', thumbnail_file) contentstore().save(thumbnail_content) @@ -149,7 +150,3 @@ class ContentStore(object): logging.exception("Failed to generate thumbnail for {0}. Exception: {1}".format(content.location, str(e))) return thumbnail_content, thumbnail_file_location - - - - diff --git a/common/lib/xmodule/xmodule/contentstore/django.py b/common/lib/xmodule/xmodule/contentstore/django.py index d8b3084135..ec0397a348 100644 --- a/common/lib/xmodule/xmodule/contentstore/django.py +++ b/common/lib/xmodule/xmodule/contentstore/django.py @@ -6,6 +6,7 @@ from django.conf import settings _CONTENTSTORE = None + def load_function(path): """ Load a function by name. diff --git a/common/lib/xmodule/xmodule/contentstore/mongo.py b/common/lib/xmodule/xmodule/contentstore/mongo.py index 01f189a9e4..68cc6d73d3 100644 --- a/common/lib/xmodule/xmodule/contentstore/mongo.py +++ b/common/lib/xmodule/xmodule/contentstore/mongo.py @@ -17,14 +17,14 @@ import os class MongoContentStore(ContentStore): def __init__(self, host, db, port=27017, user=None, password=None, **kwargs): - logging.debug( 'Using MongoDB for static content serving at host={0} db={1}'.format(host,db)) + logging.debug('Using MongoDB for static content serving at host={0} db={1}'.format(host, db)) _db = Connection(host=host, port=port, **kwargs)[db] if user is not None and password is not None: _db.authenticate(user, password) self.fs = gridfs.GridFS(_db) - self.fs_files = _db["fs.files"] # the underlying collection GridFS uses + self.fs_files = _db["fs.files"] # the underlying collection GridFS uses def save(self, content): @@ -33,24 +33,24 @@ class MongoContentStore(ContentStore): # Seems like with the GridFS we can't update existing ID's we have to do a delete/add pair self.delete(id) - with self.fs.new_file(_id = id, filename=content.get_url_path(), content_type=content.content_type, + with self.fs.new_file(_id=id, filename=content.get_url_path(), content_type=content.content_type, displayname=content.name, thumbnail_location=content.thumbnail_location, import_path=content.import_path) as fp: fp.write(content.data) - + return content - + def delete(self, id): - if self.fs.exists({"_id" : id}): + if self.fs.exists({"_id": id}): self.fs.delete(id) def find(self, location): id = StaticContent.get_id_from_location(location) try: with self.fs.get(id) as fp: - return StaticContent(location, fp.displayname, fp.content_type, fp.read(), - fp.uploadDate, thumbnail_location = fp.thumbnail_location if hasattr(fp, 'thumbnail_location') else None, - import_path = fp.import_path if hasattr(fp, 'import_path') else None) + return StaticContent(location, fp.displayname, fp.content_type, fp.read(), + fp.uploadDate, thumbnail_location=fp.thumbnail_location if hasattr(fp, 'thumbnail_location') else None, + import_path=fp.import_path if hasattr(fp, 'import_path') else None) except NoFile: raise NotFoundError() @@ -76,25 +76,25 @@ class MongoContentStore(ContentStore): self.export(asset_location, output_directory) def get_all_content_thumbnails_for_course(self, location): - return self._get_all_content_for_course(location, get_thumbnails = True) + return self._get_all_content_for_course(location, get_thumbnails=True) def get_all_content_for_course(self, location): - return self._get_all_content_for_course(location, get_thumbnails = False) + return self._get_all_content_for_course(location, get_thumbnails=False) - def _get_all_content_for_course(self, location, get_thumbnails = False): + def _get_all_content_for_course(self, location, get_thumbnails=False): ''' Returns a list of all static assets for a course. The return format is a list of dictionary elements. Example: [ - {u'displayname': u'profile.jpg', u'chunkSize': 262144, u'length': 85374, - u'uploadDate': datetime.datetime(2012, 10, 3, 5, 41, 54, 183000), u'contentType': u'image/jpeg', - u'_id': {u'category': u'asset', u'name': u'profile.jpg', u'course': u'6.002x', u'tag': u'c4x', - u'org': u'MITx', u'revision': None}, u'md5': u'36dc53519d4b735eb6beba51cd686a0e'}, + {u'displayname': u'profile.jpg', u'chunkSize': 262144, u'length': 85374, + u'uploadDate': datetime.datetime(2012, 10, 3, 5, 41, 54, 183000), u'contentType': u'image/jpeg', + u'_id': {u'category': u'asset', u'name': u'profile.jpg', u'course': u'6.002x', u'tag': u'c4x', + u'org': u'MITx', u'revision': None}, u'md5': u'36dc53519d4b735eb6beba51cd686a0e'}, - {u'displayname': u'profile.thumbnail.jpg', u'chunkSize': 262144, u'length': 4073, - u'uploadDate': datetime.datetime(2012, 10, 3, 5, 41, 54, 196000), u'contentType': u'image/jpeg', - u'_id': {u'category': u'asset', u'name': u'profile.thumbnail.jpg', u'course': u'6.002x', u'tag': u'c4x', + {u'displayname': u'profile.thumbnail.jpg', u'chunkSize': 262144, u'length': 4073, + u'uploadDate': datetime.datetime(2012, 10, 3, 5, 41, 54, 196000), u'contentType': u'image/jpeg', + u'_id': {u'category': u'asset', u'name': u'profile.thumbnail.jpg', u'course': u'6.002x', u'tag': u'c4x', u'org': u'MITx', u'revision': None}, u'md5': u'ff1532598830e3feac91c2449eaa60d6'}, .... @@ -102,10 +102,7 @@ class MongoContentStore(ContentStore): ] ''' course_filter = Location(XASSET_LOCATION_TAG, category="asset" if not get_thumbnails else "thumbnail", - course=location.course,org=location.org) + course=location.course, org=location.org) # 'borrow' the function 'location_to_query' from the Mongo modulestore implementation items = self.fs_files.find(location_to_query(course_filter)) return list(items) - - - diff --git a/common/lib/xmodule/xmodule/course_module.py b/common/lib/xmodule/xmodule/course_module.py index 6e3e2cfa39..750c8615a0 100644 --- a/common/lib/xmodule/xmodule/course_module.py +++ b/common/lib/xmodule/xmodule/course_module.py @@ -147,37 +147,37 @@ class CourseDescriptor(SequenceDescriptor): """ Return a dict which is a copy of the default grading policy """ - default = {"GRADER" : [ + default = {"GRADER": [ { - "type" : "Homework", - "min_count" : 12, - "drop_count" : 2, - "short_label" : "HW", - "weight" : 0.15 + "type": "Homework", + "min_count": 12, + "drop_count": 2, + "short_label": "HW", + "weight": 0.15 }, { - "type" : "Lab", - "min_count" : 12, - "drop_count" : 2, - "weight" : 0.15 + "type": "Lab", + "min_count": 12, + "drop_count": 2, + "weight": 0.15 }, { - "type" : "Midterm Exam", - "short_label" : "Midterm", - "min_count" : 1, - "drop_count" : 0, - "weight" : 0.3 + "type": "Midterm Exam", + "short_label": "Midterm", + "min_count": 1, + "drop_count": 0, + "weight": 0.3 }, { - "type" : "Final Exam", - "short_label" : "Final", - "min_count" : 1, - "drop_count" : 0, - "weight" : 0.4 + "type": "Final Exam", + "short_label": "Final", + "min_count": 1, + "drop_count": 0, + "weight": 0.4 } ], - "GRADE_CUTOFFS" : { - "Pass" : 0.5 + "GRADE_CUTOFFS": { + "Pass": 0.5 }} return copy.deepcopy(default) @@ -230,8 +230,8 @@ class CourseDescriptor(SequenceDescriptor): # bleh, have to parse the XML here to just pull out the url_name attribute # I don't think it's stored anywhere in the instance. - course_file = StringIO(xml_data.encode('ascii','ignore')) - xml_obj = etree.parse(course_file,parser=edx_xml_parser).getroot() + course_file = StringIO(xml_data.encode('ascii', 'ignore')) + xml_obj = etree.parse(course_file, parser=edx_xml_parser).getroot() policy_dir = None url_name = xml_obj.get('url_name', xml_obj.get('slug')) @@ -329,7 +329,7 @@ class CourseDescriptor(SequenceDescriptor): def raw_grader(self, value): # NOTE WELL: this change will not update the processed graders. If we need that, this needs to call grader_from_conf self._grading_policy['RAW_GRADER'] = value - self.definition['data'].setdefault('grading_policy',{})['GRADER'] = value + self.definition['data'].setdefault('grading_policy', {})['GRADER'] = value @property def grade_cutoffs(self): @@ -338,7 +338,7 @@ class CourseDescriptor(SequenceDescriptor): @grade_cutoffs.setter def grade_cutoffs(self, value): self._grading_policy['GRADE_CUTOFFS'] = value - self.definition['data'].setdefault('grading_policy',{})['GRADE_CUTOFFS'] = value + self.definition['data'].setdefault('grading_policy', {})['GRADE_CUTOFFS'] = value @property @@ -377,7 +377,7 @@ class CourseDescriptor(SequenceDescriptor): Return list of topic ids defined in course policy. """ topics = self.metadata.get("discussion_topics", {}) - return [d["id"] for d in topics.values()] + return [d["id"] for d in topics.values()] @property @@ -436,10 +436,10 @@ class CourseDescriptor(SequenceDescriptor): scale = 300.0 # about a year if announcement: days = (now - announcement).days - score = -exp(-days/scale) + score = -exp(-days / scale) else: days = (now - start).days - score = exp(days/scale) + score = exp(days / scale) return score def _sorting_dates(self): @@ -501,16 +501,16 @@ class CourseDescriptor(SequenceDescriptor): xmoduledescriptors.append(s) # The xmoduledescriptors included here are only the ones that have scores. - section_description = { 'section_descriptor' : s, 'xmoduledescriptors' : filter(lambda child: child.has_score, xmoduledescriptors) } + section_description = {'section_descriptor': s, 'xmoduledescriptors': filter(lambda child: child.has_score, xmoduledescriptors)} section_format = s.metadata.get('format', "") - graded_sections[ section_format ] = graded_sections.get( section_format, [] ) + [section_description] + graded_sections[section_format] = graded_sections.get(section_format, []) + [section_description] all_descriptors.extend(xmoduledescriptors) all_descriptors.append(s) - return { 'graded_sections' : graded_sections, - 'all_descriptors' : all_descriptors,} + return {'graded_sections': graded_sections, + 'all_descriptors': all_descriptors, } @staticmethod @@ -636,7 +636,7 @@ class CourseDescriptor(SequenceDescriptor): # *end* of the same day, not the same time. It's going to be used as the # end of the exam overall, so we don't want the exam to disappear too soon. # It's also used optionally as the registration end date, so time matters there too. - self.last_eligible_appointment_date = self._try_parse_time('Last_Eligible_Appointment_Date') # or self.first_eligible_appointment_date + self.last_eligible_appointment_date = self._try_parse_time('Last_Eligible_Appointment_Date') # or self.first_eligible_appointment_date if self.last_eligible_appointment_date is None: raise ValueError("Last appointment date must be specified") self.registration_start_date = self._try_parse_time('Registration_Start_Date') or time.gmtime(0) @@ -715,4 +715,3 @@ class CourseDescriptor(SequenceDescriptor): @property def org(self): return self.location.org - diff --git a/common/lib/xmodule/xmodule/discussion_module.py b/common/lib/xmodule/xmodule/discussion_module.py index 57d7780d95..6ddfcbe6c0 100644 --- a/common/lib/xmodule/xmodule/discussion_module.py +++ b/common/lib/xmodule/xmodule/discussion_module.py @@ -6,6 +6,7 @@ from xmodule.raw_module import RawDescriptor import json + class DiscussionModule(XModule): js = {'coffee': [resource_string(__name__, 'js/src/time.coffee'), @@ -30,6 +31,7 @@ class DiscussionModule(XModule): self.title = xml_data.attrib['for'] self.discussion_category = xml_data.attrib['discussion_category'] + class DiscussionDescriptor(RawDescriptor): module_class = DiscussionModule template_dir_name = "discussion" diff --git a/common/lib/xmodule/xmodule/errortracker.py b/common/lib/xmodule/xmodule/errortracker.py index 6accc8b8a7..80e6d288f8 100644 --- a/common/lib/xmodule/xmodule/errortracker.py +++ b/common/lib/xmodule/xmodule/errortracker.py @@ -8,12 +8,14 @@ log = logging.getLogger(__name__) ErrorLog = namedtuple('ErrorLog', 'tracker errors') + def exc_info_to_str(exc_info): """Given some exception info, convert it into a string using the traceback.format_exception() function. """ return ''.join(traceback.format_exception(*exc_info)) + def in_exception_handler(): '''Is there an active exception?''' return sys.exc_info() != (None, None, None) @@ -44,6 +46,7 @@ def make_error_tracker(): return ErrorLog(error_tracker, errors) + def null_error_tracker(msg): '''A dummy error tracker that just ignores the messages''' pass diff --git a/common/lib/xmodule/xmodule/graders.py b/common/lib/xmodule/xmodule/graders.py index 3e6d61eb00..35318f4f1e 100644 --- a/common/lib/xmodule/xmodule/graders.py +++ b/common/lib/xmodule/xmodule/graders.py @@ -49,6 +49,7 @@ def invalid_args(func, argdict): if keywords: return set() # All accepted return set(argdict) - set(args) + def grader_from_conf(conf): """ This creates a CourseGrader from a configuration (such as in course_settings.py). @@ -80,7 +81,7 @@ def grader_from_conf(conf): subgrader_class = SingleSectionGrader else: raise ValueError("Configuration has no appropriate grader class.") - + bad_args = invalid_args(subgrader_class.__init__, subgraderconf) # See note above concerning 'name'. if bad_args.issuperset({name}): @@ -90,7 +91,7 @@ def grader_from_conf(conf): log.warning("Invalid arguments for a subgrader: %s", bad_args) for key in bad_args: del subgraderconf[key] - + subgrader = subgrader_class(**subgraderconf) subgraders.append((subgrader, subgrader.category, weight)) @@ -210,13 +211,13 @@ class SingleSectionGrader(CourseGrader): break if foundScore or generate_random_scores: - if generate_random_scores: # for debugging! - earned = random.randint(2,15) + if generate_random_scores: # for debugging! + earned = random.randint(2, 15) possible = random.randint(earned, 15) - else: # We found the score + else: # We found the score earned = foundScore.earned possible = foundScore.possible - + percent = earned / float(possible) detail = "{name} - {percent:.0%} ({earned:.3n}/{possible:.3n})".format(name=self.name, percent=percent, @@ -245,7 +246,7 @@ class AssignmentFormatGrader(CourseGrader): min_count defines how many assignments are expected throughout the course. Placeholder scores (of 0) will be inserted if the number of matching sections in the course is < min_count. If there number of matching sections in the course is > min_count, min_count will be ignored. - + show_only_average is to suppress the display of each assignment in this grader and instead only show the total score of this grader in the breakdown. @@ -257,7 +258,7 @@ class AssignmentFormatGrader(CourseGrader): short_label is similar to section_type, but shorter. For example, for Homework it would be "HW". - + starting_index is the first number that will appear. For example, starting_index=3 and min_count = 2 would produce the labels "Assignment 3", "Assignment 4" @@ -296,16 +297,16 @@ class AssignmentFormatGrader(CourseGrader): breakdown = [] for i in range(max(self.min_count, len(scores))): if i < len(scores) or generate_random_scores: - if generate_random_scores: # for debugging! - earned = random.randint(2,15) - possible = random.randint(earned, 15) + if generate_random_scores: # for debugging! + earned = random.randint(2, 15) + possible = random.randint(earned, 15) section_name = "Generated" - + else: earned = scores[i].earned possible = scores[i].possible section_name = scores[i].section - + percentage = earned / float(possible) summary = "{section_type} {index} - {name} - {percent:.0%} ({earned:.3n}/{possible:.3n})".format(index=i + self.starting_index, section_type=self.section_type, @@ -318,7 +319,7 @@ class AssignmentFormatGrader(CourseGrader): summary = "{section_type} {index} Unreleased - 0% (?/?)".format(index=i + self.starting_index, section_type=self.section_type) short_label = "{short_label} {index:02d}".format(index=i + self.starting_index, short_label=self.short_label) - + breakdown.append({'percent': percentage, 'label': short_label, 'detail': summary, 'category': self.category}) total_percent, dropped_indices = totalWithDrops(breakdown, self.drop_count) @@ -328,13 +329,13 @@ class AssignmentFormatGrader(CourseGrader): total_detail = "{section_type} Average = {percent:.0%}".format(percent=total_percent, section_type=self.section_type) total_label = "{short_label} Avg".format(short_label=self.short_label) - + if self.show_only_average: breakdown = [] - + if not self.hide_average: breakdown.append({'percent': total_percent, 'label': total_label, 'detail': total_detail, 'category': self.category, 'prominent': True}) - + return {'percent': total_percent, 'section_breakdown': breakdown, #No grade_breakdown here diff --git a/common/lib/xmodule/xmodule/grading_service_module.py b/common/lib/xmodule/xmodule/grading_service_module.py index 7c18731f53..a442f39f34 100644 --- a/common/lib/xmodule/xmodule/grading_service_module.py +++ b/common/lib/xmodule/xmodule/grading_service_module.py @@ -10,9 +10,11 @@ from lxml import etree log = logging.getLogger(__name__) + class GradingServiceError(Exception): pass + class GradingService(object): """ Interface to staff grading backend. @@ -35,7 +37,7 @@ class GradingService(object): """ response = self.session.post(self.login_url, {'username': self.username, - 'password': self.password,}) + 'password': self.password, }) response.raise_for_status() @@ -124,4 +126,4 @@ class GradingService(object): except ValueError: log.exception("Error parsing response: {0}".format(response)) return {'success': False, - 'error': "Error displaying submission"} \ No newline at end of file + 'error': "Error displaying submission"} diff --git a/common/lib/xmodule/xmodule/html_checker.py b/common/lib/xmodule/xmodule/html_checker.py index 5e6b417d28..b30e5163a2 100644 --- a/common/lib/xmodule/xmodule/html_checker.py +++ b/common/lib/xmodule/xmodule/html_checker.py @@ -1,5 +1,6 @@ from lxml import etree + def check_html(html): ''' Check whether the passed in html string can be parsed by lxml. diff --git a/common/lib/xmodule/xmodule/html_module.py b/common/lib/xmodule/xmodule/html_module.py index 612e78ce35..af1ce0ad80 100644 --- a/common/lib/xmodule/xmodule/html_module.py +++ b/common/lib/xmodule/xmodule/html_module.py @@ -133,7 +133,7 @@ class HtmlDescriptor(XmlDescriptor, EditingDescriptor): # TODO (ichuang): remove this after migration # for Fall 2012 LMS migration: keep filename (and unmangled filename) - definition['filename'] = [ filepath, filename ] + definition['filename'] = [filepath, filename] return definition @@ -180,6 +180,7 @@ class AboutDescriptor(HtmlDescriptor): """ template_dir_name = "about" + class StaticTabDescriptor(HtmlDescriptor): """ These pieces of course content are treated as HtmlModules but we need to overload where the templates are located @@ -187,6 +188,7 @@ class StaticTabDescriptor(HtmlDescriptor): """ template_dir_name = "statictab" + class CourseInfoDescriptor(HtmlDescriptor): """ These pieces of course content are treated as HtmlModules but we need to overload where the templates are located diff --git a/common/lib/xmodule/xmodule/mako_module.py b/common/lib/xmodule/xmodule/mako_module.py index f5f2fae23b..dab5d5e85b 100644 --- a/common/lib/xmodule/xmodule/mako_module.py +++ b/common/lib/xmodule/xmodule/mako_module.py @@ -34,7 +34,7 @@ class MakoModuleDescriptor(XModuleDescriptor): """ return {'module': self, 'metadata': self.metadata, - 'editable_metadata_fields' : self.editable_metadata_fields + 'editable_metadata_fields': self.editable_metadata_fields } def get_html(self): @@ -46,4 +46,3 @@ class MakoModuleDescriptor(XModuleDescriptor): def editable_metadata_fields(self): subset = [name for name in self.metadata.keys() if name not in self.system_metadata_fields] return subset - diff --git a/common/lib/xmodule/xmodule/modulestore/__init__.py b/common/lib/xmodule/xmodule/modulestore/__init__.py index 38915adcb4..a9df6c3504 100644 --- a/common/lib/xmodule/xmodule/modulestore/__init__.py +++ b/common/lib/xmodule/xmodule/modulestore/__init__.py @@ -365,7 +365,7 @@ class ModuleStore(object): raise NotImplementedError def get_parent_locations(self, location, course_id): - '''Find all locations that are the parents of this location in this + '''Find all locations that are the parents of this location in this course. Needed for path_to_location(). returns an iterable of things that can be passed to Location. diff --git a/common/lib/xmodule/xmodule/modulestore/draft.py b/common/lib/xmodule/xmodule/modulestore/draft.py index ef2a848cac..81f4da2780 100644 --- a/common/lib/xmodule/xmodule/modulestore/draft.py +++ b/common/lib/xmodule/xmodule/modulestore/draft.py @@ -67,7 +67,7 @@ class DraftModuleStore(ModuleStoreBase): TODO (vshnayder): this may want to live outside the modulestore eventually """ - # cdodge: we're forcing depth=0 here as the Draft store is not handling caching well + # cdodge: we're forcing depth=0 here as the Draft store is not handling caching well try: return wrap_draft(super(DraftModuleStore, self).get_instance(course_id, as_draft(location), depth=0)) except ItemNotFoundError: diff --git a/common/lib/xmodule/xmodule/modulestore/mongo.py b/common/lib/xmodule/xmodule/modulestore/mongo.py index 3b92876673..f4db62ac31 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo.py @@ -304,7 +304,7 @@ class MongoModuleStore(ModuleStoreBase): if location.category == 'static_tab': course = self.get_course_for_item(item.location) existing_tabs = course.tabs or [] - existing_tabs.append({'type':'static_tab', 'name' : item.metadata.get('display_name'), 'url_slug' : item.location.name}) + existing_tabs.append({'type': 'static_tab', 'name': item.metadata.get('display_name'), 'url_slug': item.location.name}) course.tabs = existing_tabs self.update_metadata(course.location, course.metadata) @@ -423,7 +423,7 @@ class MongoModuleStore(ModuleStoreBase): def get_parent_locations(self, location, course_id): - '''Find all locations that are the parents of this location in this + '''Find all locations that are the parents of this location in this course. Needed for path_to_location(). ''' location = Location.ensure_fully_specified(location) diff --git a/common/lib/xmodule/xmodule/modulestore/search.py b/common/lib/xmodule/xmodule/modulestore/search.py index e53df84bb6..b56b612592 100644 --- a/common/lib/xmodule/xmodule/modulestore/search.py +++ b/common/lib/xmodule/xmodule/modulestore/search.py @@ -104,14 +104,14 @@ def path_to_location(modulestore, course_id, location): # module nested in more than one positional module will work. if n > 3: position_list = [] - for path_index in range(2, n-1): + for path_index in range(2, n - 1): category = path[path_index].category if category == 'sequential' or category == 'videosequence': section_desc = modulestore.get_instance(course_id, path[path_index]) child_locs = [c.location for c in section_desc.get_children()] # positions are 1-indexed, and should be strings to be consistent with # url parsing. - position_list.append(str(child_locs.index(path[path_index+1]) + 1)) + position_list.append(str(child_locs.index(path[path_index + 1]) + 1)) position = "_".join(position_list) return (course_id, chapter, section, position) diff --git a/common/lib/xmodule/xmodule/modulestore/store_utilities.py b/common/lib/xmodule/xmodule/modulestore/store_utilities.py index af346dbb7e..192b012bef 100644 --- a/common/lib/xmodule/xmodule/modulestore/store_utilities.py +++ b/common/lib/xmodule/xmodule/modulestore/store_utilities.py @@ -3,6 +3,7 @@ from xmodule.contentstore.content import StaticContent from xmodule.modulestore import Location from xmodule.modulestore.mongo import MongoModuleStore + def clone_course(modulestore, contentstore, source_location, dest_location, delete_original=False): # first check to see if the modulestore is Mongo backed if not isinstance(modulestore, MongoModuleStore): @@ -13,7 +14,7 @@ def clone_course(modulestore, contentstore, source_location, dest_location, dele if not modulestore.has_item(dest_location): raise Exception("An empty course at {0} must have already been created. Aborting...".format(dest_location)) - # verify that the dest_location really is an empty course, which means only one + # verify that the dest_location really is an empty course, which means only one dest_modules = modulestore.get_items([dest_location.tag, dest_location.org, dest_location.course, None, None, None]) if len(dest_modules) != 1: @@ -31,12 +32,12 @@ def clone_course(modulestore, contentstore, source_location, dest_location, dele original_loc = Location(module.location) if original_loc.category != 'course': - module.location = module.location._replace(tag = dest_location.tag, org = dest_location.org, - course = dest_location.course) + module.location = module.location._replace(tag=dest_location.tag, org=dest_location.org, + course=dest_location.course) else: # on the course module we also have to update the module name - module.location = module.location._replace(tag = dest_location.tag, org = dest_location.org, - course = dest_location.course, name=dest_location.name) + module.location = module.location._replace(tag=dest_location.tag, org=dest_location.org, + course=dest_location.course, name=dest_location.name) print "Cloning module {0} to {1}....".format(original_loc, module.location) @@ -48,8 +49,8 @@ def clone_course(modulestore, contentstore, source_location, dest_location, dele new_children = [] for child_loc_url in module.definition['children']: child_loc = Location(child_loc_url) - child_loc = child_loc._replace(tag = dest_location.tag, org = dest_location.org, - course = dest_location.course) + child_loc = child_loc._replace(tag=dest_location.tag, org=dest_location.org, + course=dest_location.course) new_children = new_children + [child_loc.url()] modulestore.update_children(module.location, new_children) @@ -63,8 +64,8 @@ def clone_course(modulestore, contentstore, source_location, dest_location, dele for thumb in thumbs: thumb_loc = Location(thumb["_id"]) content = contentstore.find(thumb_loc) - content.location = content.location._replace(org = dest_location.org, - course = dest_location.course) + content.location = content.location._replace(org=dest_location.org, + course=dest_location.course) print "Cloning thumbnail {0} to {1}".format(thumb_loc, content.location) @@ -76,13 +77,13 @@ def clone_course(modulestore, contentstore, source_location, dest_location, dele for asset in assets: asset_loc = Location(asset["_id"]) content = contentstore.find(asset_loc) - content.location = content.location._replace(org = dest_location.org, - course = dest_location.course) + content.location = content.location._replace(org=dest_location.org, + course=dest_location.course) # be sure to update the pointer to the thumbnail if content.thumbnail_location is not None: - content.thumbnail_location = content.thumbnail_location._replace(org = dest_location.org, - course = dest_location.course) + content.thumbnail_location = content.thumbnail_location._replace(org=dest_location.org, + course=dest_location.course) print "Cloning asset {0} to {1}".format(asset_loc, content.location) @@ -90,6 +91,7 @@ def clone_course(modulestore, contentstore, source_location, dest_location, dele return True + def delete_course(modulestore, contentstore, source_location): # first check to see if the modulestore is Mongo backed if not isinstance(modulestore, MongoModuleStore): @@ -119,7 +121,7 @@ def delete_course(modulestore, contentstore, source_location): modules = modulestore.get_items([source_location.tag, source_location.org, source_location.course, None, None, None]) for module in modules: - if module.category != 'course': # save deleting the course module for last + if module.category != 'course': # save deleting the course module for last print "Deleting {0}...".format(module.location) modulestore.delete_item(module.location) @@ -127,4 +129,4 @@ def delete_course(modulestore, contentstore, source_location): print "Deleting {0}...".format(source_location) modulestore.delete_item(source_location) - return True \ No newline at end of file + return True diff --git a/common/lib/xmodule/xmodule/modulestore/tests/__init__.py b/common/lib/xmodule/xmodule/modulestore/tests/__init__.py index 126f0136e2..2759f2540c 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/__init__.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/__init__.py @@ -8,5 +8,3 @@ for i in range(5): TEST_DIR = TEST_DIR / 'test' DATA_DIR = TEST_DIR / 'data' - - diff --git a/common/lib/xmodule/xmodule/modulestore/tests/factories.py b/common/lib/xmodule/xmodule/modulestore/tests/factories.py index b4264b30c9..1259da2690 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/factories.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/factories.py @@ -5,12 +5,15 @@ from xmodule.modulestore import Location from xmodule.modulestore.django import modulestore from xmodule.timeparse import stringify_time -def XMODULE_COURSE_CREATION(class_to_create, **kwargs): + +def XMODULE_COURSE_CREATION(class_to_create, **kwargs): return XModuleCourseFactory._create(class_to_create, **kwargs) + def XMODULE_ITEM_CREATION(class_to_create, **kwargs): return XModuleItemFactory._create(class_to_create, **kwargs) + class XModuleCourseFactory(Factory): """ Factory for XModule courses. @@ -27,7 +30,7 @@ class XModuleCourseFactory(Factory): org = kwargs.get('org') number = kwargs.get('number') display_name = kwargs.get('display_name') - location = Location('i4x', org, number, + location = Location('i4x', org, number, 'course', Location.clean(display_name)) store = modulestore('direct') @@ -42,20 +45,22 @@ class XModuleCourseFactory(Factory): new_course.metadata['data_dir'] = uuid4().hex new_course.metadata['start'] = stringify_time(gmtime()) - new_course.tabs = [{"type": "courseware"}, + new_course.tabs = [{"type": "courseware"}, {"type": "course_info", "name": "Course Info"}, {"type": "discussion", "name": "Discussion"}, {"type": "wiki", "name": "Wiki"}, {"type": "progress", "name": "Progress"}] # Update the data in the mongo datastore - store.update_metadata(new_course.location.url(), new_course.own_metadata) + store.update_metadata(new_course.location.url(), new_course.own_metadata) return new_course + class Course: pass + class CourseFactory(XModuleCourseFactory): FACTORY_FOR = Course @@ -64,6 +69,7 @@ class CourseFactory(XModuleCourseFactory): number = '999' display_name = 'Robot Super Course' + class XModuleItemFactory(Factory): """ Factory for XModule items. @@ -80,7 +86,7 @@ class XModuleItemFactory(Factory): """ DETACHED_CATEGORIES = ['about', 'static_tab', 'course_info'] - + parent_location = Location(kwargs.get('parent_location')) template = Location(kwargs.get('template')) display_name = kwargs.get('display_name') @@ -107,9 +113,11 @@ class XModuleItemFactory(Factory): return new_item + class Item: pass + class ItemFactory(XModuleItemFactory): FACTORY_FOR = Item diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_location.py b/common/lib/xmodule/xmodule/modulestore/tests/test_location.py index afe5e47d10..0772951884 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_location.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_location.py @@ -61,6 +61,7 @@ invalid = ("foo", ["foo"], ["foo", "bar"], invalid_dict, invalid_dict2) + def test_is_valid(): for v in valid: assert_equals(Location.is_valid(v), True) @@ -68,6 +69,7 @@ def test_is_valid(): for v in invalid: assert_equals(Location.is_valid(v), False) + def test_dict(): assert_equals("tag://org/course/category/name", Location(input_dict).url()) assert_equals(dict(revision=None, **input_dict), Location(input_dict).dict()) @@ -76,6 +78,7 @@ def test_dict(): assert_equals("tag://org/course/category/name@revision", Location(input_dict).url()) assert_equals(input_dict, Location(input_dict).dict()) + def test_list(): assert_equals("tag://org/course/category/name", Location(input_list).url()) assert_equals(input_list + [None], Location(input_list).list()) @@ -115,17 +118,18 @@ def test_equality(): ) # All the cleaning functions should do the same thing with these -general_pairs = [ ('',''), +general_pairs = [('', ''), (' ', '_'), ('abc,', 'abc_'), ('ab fg!@//\\aj', 'ab_fg_aj'), (u"ab\xA9", "ab_"), # no unicode allowed for now ] + def test_clean(): pairs = general_pairs + [ ('a:b', 'a_b'), # no colons in non-name components - ('a-b', 'a-b'), # dashes ok + ('a-b', 'a-b'), # dashes ok ('a.b', 'a.b'), # dot ok ] for input, output in pairs: diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py index 64816581ce..94ea622907 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py @@ -3,6 +3,7 @@ from nose.tools import assert_equals, assert_raises, assert_not_equals, with_set from xmodule.modulestore.exceptions import ItemNotFoundError, NoPathToItem from xmodule.modulestore.search import path_to_location + def check_path_to_location(modulestore): '''Make sure that path_to_location works: should be passed a modulestore with the toy and simple courses loaded.''' @@ -22,4 +23,3 @@ def check_path_to_location(modulestore): ) for location in not_found: assert_raises(ItemNotFoundError, path_to_location, modulestore, course_id, location) - diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py index 4c593e391e..6f6f47ba85 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py @@ -102,4 +102,3 @@ class TestMongoModuleStore(object): def test_path_to_location(self): '''Make sure that path_to_location works''' check_path_to_location(self.store) - diff --git a/common/lib/xmodule/xmodule/modulestore/tests/test_xml.py b/common/lib/xmodule/xmodule/modulestore/tests/test_xml.py index c4446bebb5..321d98967b 100644 --- a/common/lib/xmodule/xmodule/modulestore/tests/test_xml.py +++ b/common/lib/xmodule/xmodule/modulestore/tests/test_xml.py @@ -5,6 +5,7 @@ from xmodule.modulestore.xml_importer import import_from_xml from .test_modulestore import check_path_to_location from . import DATA_DIR + class TestXMLModuleStore(object): def test_path_to_location(self): """Make sure that path_to_location works properly""" @@ -12,5 +13,5 @@ class TestXMLModuleStore(object): print "Starting import" modulestore = XMLModuleStore(DATA_DIR, course_dirs=['toy', 'simple']) print "finished import" - + check_path_to_location(modulestore) diff --git a/common/lib/xmodule/xmodule/modulestore/xml.py b/common/lib/xmodule/xmodule/modulestore/xml.py index 17d6f04932..8446162f26 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml.py +++ b/common/lib/xmodule/xmodule/modulestore/xml.py @@ -363,7 +363,7 @@ class XMLModuleStore(ModuleStoreBase): # been imported into the cms from xml course_file = StringIO(clean_out_mako_templating(course_file.read())) - course_data = etree.parse(course_file,parser=edx_xml_parser).getroot() + course_data = etree.parse(course_file, parser=edx_xml_parser).getroot() org = course_data.get('org') @@ -437,7 +437,7 @@ class XMLModuleStore(ModuleStoreBase): self.load_extra_content(system, course_descriptor, 'course_info', self.data_dir / course_dir / 'info', course_dir, url_name) # now import all static tabs which are expected to be stored in - # in /tabs or /tabs/ + # in /tabs or /tabs/ self.load_extra_content(system, course_descriptor, 'static_tab', self.data_dir / course_dir / 'tabs', course_dir, url_name) self.load_extra_content(system, course_descriptor, 'custom_tag_template', self.data_dir / course_dir / 'custom_tags', course_dir, url_name) @@ -454,12 +454,12 @@ class XMLModuleStore(ModuleStoreBase): # then look in a override folder based on the course run if os.path.isdir(base_dir / url_name): - self._load_extra_content(system, course_descriptor, category, base_dir / url_name, course_dir) + self._load_extra_content(system, course_descriptor, category, base_dir / url_name, course_dir) def _load_extra_content(self, system, course_descriptor, category, path, course_dir): - for filepath in glob.glob(path/ '*'): + for filepath in glob.glob(path / '*'): if not os.path.isdir(filepath): with open(filepath) as f: try: @@ -467,7 +467,7 @@ class XMLModuleStore(ModuleStoreBase): # tabs are referenced in policy.json through a 'slug' which is just the filename without the .html suffix slug = os.path.splitext(os.path.basename(filepath))[0] loc = Location('i4x', course_descriptor.location.org, course_descriptor.location.course, category, slug) - module = HtmlDescriptor(system, definition={'data' : html}, **{'location' : loc}) + module = HtmlDescriptor(system, definition={'data': html}, **{'location': loc}) # VS[compat]: # Hack because we need to pull in the 'display_name' for static tabs (because we need to edit them) # from the course policy @@ -555,7 +555,7 @@ class XMLModuleStore(ModuleStoreBase): Return a dictionary of course_dir -> [(msg, exception_str)], for each course_dir where course loading failed. """ - return dict( (k, self.errored_courses[k].errors) for k in self.errored_courses) + return dict((k, self.errored_courses[k].errors) for k in self.errored_courses) def update_item(self, location, data): """ @@ -590,7 +590,7 @@ class XMLModuleStore(ModuleStoreBase): raise NotImplementedError("XMLModuleStores are read-only") def get_parent_locations(self, location, course_id): - '''Find all locations that are the parents of this location in this + '''Find all locations that are the parents of this location in this course. Needed for path_to_location(). returns an iterable of things that can be passed to Location. This may diff --git a/common/lib/xmodule/xmodule/modulestore/xml_exporter.py b/common/lib/xmodule/xmodule/modulestore/xml_exporter.py index 3522b45718..bdbd5a6133 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml_exporter.py +++ b/common/lib/xmodule/xmodule/modulestore/xml_exporter.py @@ -3,6 +3,7 @@ from xmodule.modulestore import Location from xmodule.modulestore.django import modulestore from fs.osfs import OSFS + def export_to_xml(modulestore, contentstore, course_location, root_dir, course_dir): course = modulestore.get_item(course_location) @@ -27,7 +28,7 @@ def export_to_xml(modulestore, contentstore, course_location, root_dir, course_d export_extra_content(export_fs, modulestore, course_location, 'course_info', 'info', '.html') -def export_extra_content(export_fs, modulestore, course_location, category_type, dirname, file_suffix = ''): +def export_extra_content(export_fs, modulestore, course_location, category_type, dirname, file_suffix=''): query_loc = Location('i4x', course_location.org, course_location.course, category_type, None) items = modulestore.get_items(query_loc) @@ -36,7 +37,3 @@ def export_extra_content(export_fs, modulestore, course_location, category_type, for item in items: with item_dir.open(item.location.name + file_suffix, 'w') as item_file: item_file.write(item.definition['data'].encode('utf8')) - - - - \ No newline at end of file diff --git a/common/lib/xmodule/xmodule/modulestore/xml_importer.py b/common/lib/xmodule/xmodule/modulestore/xml_importer.py index 7658d699d4..0b77900ae9 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml_importer.py +++ b/common/lib/xmodule/xmodule/modulestore/xml_importer.py @@ -11,9 +11,10 @@ from xmodule.contentstore.content import StaticContent, XASSET_SRCREF_PREFIX log = logging.getLogger(__name__) -def import_static_content(modules, course_loc, course_data_path, static_content_store, target_location_namespace, - subpath = 'static', verbose=False): - + +def import_static_content(modules, course_loc, course_data_path, static_content_store, target_location_namespace, + subpath='static', verbose=False): + remap_dict = {} # now import all static assets @@ -36,7 +37,7 @@ def import_static_content(modules, course_loc, course_data_path, static_content_ with open(content_path, 'rb') as f: data = f.read() - content = StaticContent(content_loc, filename, mime_type, data, import_path = fullname_with_subpath) + content = StaticContent(content_loc, filename, mime_type, data, import_path=fullname_with_subpath) # first let's save a thumbnail so we can get back a thumbnail location (thumbnail_content, thumbnail_location) = static_content_store.generate_thumbnail(content) @@ -50,11 +51,12 @@ def import_static_content(modules, course_loc, course_data_path, static_content_ #store the remapping information which will be needed to subsitute in the module data remap_dict[fullname_with_subpath] = content_loc.name except: - raise + raise return remap_dict -def verify_content_links(module, base_dir, static_content_store, link, remap_dict = None): + +def verify_content_links(module, base_dir, static_content_store, link, remap_dict=None): if link.startswith('/static/'): # yes, then parse out the name path = link[len('/static/'):] @@ -70,7 +72,7 @@ def verify_content_links(module, base_dir, static_content_store, link, remap_dic with open(static_pathname, 'rb') as f: data = f.read() - content = StaticContent(content_loc, filename, mime_type, data, import_path = path) + content = StaticContent(content_loc, filename, mime_type, data, import_path=path) # first let's save a thumbnail so we can get back a thumbnail location (thumbnail_content, thumbnail_location) = static_content_store.generate_thumbnail(content) @@ -79,20 +81,21 @@ def verify_content_links(module, base_dir, static_content_store, link, remap_dic content.thumbnail_location = thumbnail_location #then commit the content - static_content_store.save(content) + static_content_store.save(content) - new_link = StaticContent.get_url_path_from_location(content_loc) + new_link = StaticContent.get_url_path_from_location(content_loc) if remap_dict is not None: remap_dict[link] = new_link - return new_link + return new_link except Exception, e: logging.exception('Skipping failed content load from {0}. Exception: {1}'.format(path, e)) return link -def import_from_xml(store, data_dir, course_dirs=None, + +def import_from_xml(store, data_dir, course_dirs=None, default_class='xmodule.raw_module.RawDescriptor', load_error_modules=True, static_content_store=None, target_location_namespace=None, verbose=False): """ @@ -108,7 +111,7 @@ def import_from_xml(store, data_dir, course_dirs=None, the policy.json. so we need to keep the original url_name during import """ - + module_store = XMLModuleStore( data_dir, default_class=default_class, @@ -137,12 +140,12 @@ def import_from_xml(store, data_dir, course_dirs=None, module = remap_namespace(module, target_location_namespace) - # cdodge: more hacks (what else). Seems like we have a problem when importing a course (like 6.002) which - # does not have any tabs defined in the policy file. The import goes fine and then displays fine in LMS, - # but if someone tries to add a new tab in the CMS, then the LMS barfs because it expects that - + # cdodge: more hacks (what else). Seems like we have a problem when importing a course (like 6.002) which + # does not have any tabs defined in the policy file. The import goes fine and then displays fine in LMS, + # but if someone tries to add a new tab in the CMS, then the LMS barfs because it expects that - # if there is *any* tabs - then there at least needs to be some predefined ones if module.tabs is None or len(module.tabs) == 0: - module.tabs = [{"type": "courseware"}, + module.tabs = [{"type": "courseware"}, {"type": "course_info", "name": "Course Info"}, {"type": "discussion", "name": "Discussion"}, {"type": "wiki", "name": "Wiki"}] # note, add 'progress' when we can support it on Edge @@ -159,13 +162,13 @@ def import_from_xml(store, data_dir, course_dirs=None, course_items.append(module) - + # then import all the static content if static_content_store is not None: _namespace_rename = target_location_namespace if target_location_namespace is not None else course_location - + # first pass to find everything in /static/ - import_static_content(module_store.modules[course_id], course_location, course_data_path, static_content_store, + import_static_content(module_store.modules[course_id], course_location, course_data_path, static_content_store, _namespace_rename, subpath='static', verbose=verbose) # finally loop through all the modules @@ -188,18 +191,18 @@ def import_from_xml(store, data_dir, course_dirs=None, # cdodge: now go through any link references to '/static/' and make sure we've imported # it as a StaticContent asset - try: + try: remap_dict = {} # use the rewrite_links as a utility means to enumerate through all links # in the module data. We use that to load that reference into our asset store # IMPORTANT: There appears to be a bug in lxml.rewrite_link which makes us not be able to # do the rewrites natively in that code. - # For example, what I'm seeing is -> + # For example, what I'm seeing is -> # Note the dropped element closing tag. This causes the LMS to fail when rendering modules - that's # no good, so we have to do this kludge if isinstance(module_data, str) or isinstance(module_data, unicode): # some module 'data' fields are non strings which blows up the link traversal code - lxml_rewrite_links(module_data, lambda link: verify_content_links(module, course_data_path, + lxml_rewrite_links(module_data, lambda link: verify_content_links(module, course_data_path, static_content_store, link, remap_dict)) for key in remap_dict.keys(): @@ -219,17 +222,18 @@ def import_from_xml(store, data_dir, course_dirs=None, return module_store, course_items + def remap_namespace(module, target_location_namespace): if target_location_namespace is None: return module - + # This looks a bit wonky as we need to also change the 'name' of the imported course to be what # the caller passed in if module.location.category != 'course': - module.location = module.location._replace(tag=target_location_namespace.tag, org=target_location_namespace.org, + module.location = module.location._replace(tag=target_location_namespace.tag, org=target_location_namespace.org, course=target_location_namespace.course) else: - module.location = module.location._replace(tag=target_location_namespace.tag, org=target_location_namespace.org, + module.location = module.location._replace(tag=target_location_namespace.tag, org=target_location_namespace.org, course=target_location_namespace.course, name=target_location_namespace.name) # then remap children pointers since they too will be re-namespaced @@ -238,15 +242,16 @@ def remap_namespace(module, target_location_namespace): new_locs = [] for child in children_locs: child_loc = Location(child) - new_child_loc = child_loc._replace(tag=target_location_namespace.tag, org=target_location_namespace.org, + new_child_loc = child_loc._replace(tag=target_location_namespace.tag, org=target_location_namespace.org, course=target_location_namespace.course) new_locs.append(new_child_loc.url()) - module.definition['children'] = new_locs + module.definition['children'] = new_locs return module + def validate_category_hierarchy(module_store, course_id, parent_category, expected_child_category): err_cnt = 0 @@ -265,7 +270,8 @@ def validate_category_hierarchy(module_store, course_id, parent_category, expect return err_cnt -def validate_data_source_path_existence(path, is_err = True, extra_msg = None): + +def validate_data_source_path_existence(path, is_err=True, extra_msg=None): _cnt = 0 if not os.path.exists(path): print ("{0}: Expected folder at {1}. {2}".format('ERROR' if is_err == True else 'WARNING', path, extra_msg if @@ -273,18 +279,19 @@ def validate_data_source_path_existence(path, is_err = True, extra_msg = None): _cnt = 1 return _cnt + def validate_data_source_paths(data_dir, course_dir): # check that there is a '/static/' directory course_path = data_dir / course_dir err_cnt = 0 warn_cnt = 0 err_cnt += validate_data_source_path_existence(course_path / 'static') - warn_cnt += validate_data_source_path_existence(course_path / 'static/subs', is_err = False, - extra_msg = 'Video captions (if they are used) will not work unless they are static/subs.') + warn_cnt += validate_data_source_path_existence(course_path / 'static/subs', is_err=False, + extra_msg='Video captions (if they are used) will not work unless they are static/subs.') return err_cnt, warn_cnt -def perform_xlint(data_dir, course_dirs, +def perform_xlint(data_dir, course_dirs, default_class='xmodule.raw_module.RawDescriptor', load_error_modules=True): err_cnt = 0 @@ -308,9 +315,9 @@ def perform_xlint(data_dir, course_dirs, for err_log_entry in err_log.errors: msg = err_log_entry[0] if msg.startswith('ERROR:'): - err_cnt+=1 + err_cnt += 1 else: - warn_cnt+=1 + warn_cnt += 1 # then count outright all courses that failed to load at all for err_log in module_store.errored_courses.itervalues(): @@ -318,9 +325,9 @@ def perform_xlint(data_dir, course_dirs, msg = err_log_entry[0] print msg if msg.startswith('ERROR:'): - err_cnt+=1 + err_cnt += 1 else: - warn_cnt+=1 + warn_cnt += 1 for course_id in module_store.modules.keys(): # constrain that courses only have 'chapter' children @@ -345,6 +352,3 @@ def perform_xlint(data_dir, course_dirs, print "This course can be imported, but some errors may occur during the run of the course. It is recommend that you fix your courseware before importing" else: print "This course can be imported successfully." - - - diff --git a/common/lib/xmodule/xmodule/open_ended_image_submission.py b/common/lib/xmodule/xmodule/open_ended_image_submission.py index 8fa4d721d3..10b1a20a7c 100644 --- a/common/lib/xmodule/xmodule/open_ended_image_submission.py +++ b/common/lib/xmodule/xmodule/open_ended_image_submission.py @@ -51,6 +51,7 @@ MAX_COLORS_TO_COUNT = 16 #Maximum number of colors allowed in an uploaded image MAX_COLORS = 400 + class ImageProperties(object): """ Class to check properties of an image and to validate if they are allowed. @@ -187,6 +188,7 @@ class URLProperties(object): return success return success + def run_url_tests(url_string): """ Creates a URLProperties object and runs all tests @@ -244,7 +246,7 @@ def upload_to_s3(file_to_upload, keyname): #k.set_metadata("Content-Type", 'images/png') k.set_acl("public-read") - public_url = k.generate_url(60 * 60 * 24 * 365) # URL timeout in seconds. + public_url = k.generate_url(60 * 60 * 24 * 365) # URL timeout in seconds. return True, public_url except: @@ -260,6 +262,3 @@ def get_from_s3(s3_public_url): r = requests.get(s3_public_url, timeout=2) data = r.text return data - - - diff --git a/common/lib/xmodule/xmodule/open_ended_module.py b/common/lib/xmodule/xmodule/open_ended_module.py index 94d45d96e3..072a7153fb 100644 --- a/common/lib/xmodule/xmodule/open_ended_module.py +++ b/common/lib/xmodule/xmodule/open_ended_module.py @@ -38,6 +38,7 @@ from combined_open_ended_rubric import CombinedOpenEndedRubric log = logging.getLogger("mitx.courseware") + class OpenEndedModule(openendedchild.OpenEndedChild): """ The open ended module supports all external open ended grader problems. @@ -300,7 +301,7 @@ class OpenEndedModule(openendedchild.OpenEndedChild): # We want to display available feedback in a particular order. # This dictionary specifies which goes first--lower first. - priorities = {# These go at the start of the feedback + priorities = { # These go at the start of the feedback 'spelling': 0, 'grammar': 1, # needs to be after all the other feedback @@ -674,5 +675,3 @@ class OpenEndedDescriptor(XmlDescriptor, EditingDescriptor): add_child(child) return elt - - diff --git a/common/lib/xmodule/xmodule/openendedchild.py b/common/lib/xmodule/xmodule/openendedchild.py index 7151ac0723..a56937270b 100644 --- a/common/lib/xmodule/xmodule/openendedchild.py +++ b/common/lib/xmodule/xmodule/openendedchild.py @@ -38,6 +38,7 @@ MAX_ATTEMPTS = 1 # Overriden by max_score specified in xml. MAX_SCORE = 1 + class OpenEndedChild(object): """ States: @@ -375,18 +376,13 @@ class OpenEndedChild(object): """ success = False links = re.findall(r'(https?://\S+)', string) - if len(links)>0: + if len(links) > 0: for link in links: success = open_ended_image_submission.run_url_tests(link) if not success: string = re.sub(link, '', string) else: - string = re.sub(link, self.generate_image_tag_from_url(link,link), string) + string = re.sub(link, self.generate_image_tag_from_url(link, link), string) success = True return success, string - - - - - diff --git a/common/lib/xmodule/xmodule/peer_grading_module.py b/common/lib/xmodule/xmodule/peer_grading_module.py index e853160f4a..20f71f3b3c 100644 --- a/common/lib/xmodule/xmodule/peer_grading_module.py +++ b/common/lib/xmodule/xmodule/peer_grading_module.py @@ -43,6 +43,7 @@ TRUE_DICT = [True, "True", "true", "TRUE"] MAX_SCORE = 1 IS_GRADED = True + class PeerGradingModule(XModule): _VERSION = 1 @@ -80,7 +81,7 @@ class PeerGradingModule(XModule): self.is_graded = (self.is_graded in TRUE_DICT) self.link_to_location = self.metadata.get('link_to_location', USE_FOR_SINGLE_LOCATION) - if self.use_for_single_location ==True: + if self.use_for_single_location == True: #This will raise an exception if the location is invalid link_to_location_object = Location(self.link_to_location) @@ -116,7 +117,7 @@ class PeerGradingModule(XModule): if not self.use_for_single_location: return self.peer_grading() else: - return self.peer_grading_problem({'location' : self.link_to_location})['html'] + return self.peer_grading_problem({'location': self.link_to_location})['html'] def handle_ajax(self, dispatch, get): """ @@ -128,8 +129,8 @@ class PeerGradingModule(XModule): 'show_calibration_essay': self.show_calibration_essay, 'is_student_calibrated': self.is_student_calibrated, 'save_grade': self.save_grade, - 'save_calibration_essay' : self.save_calibration_essay, - 'problem' : self.peer_grading_problem, + 'save_calibration_essay': self.save_calibration_essay, + 'problem': self.peer_grading_problem, } if dispatch not in handlers: @@ -175,11 +176,11 @@ class PeerGradingModule(XModule): return None count_graded = response['count_graded'] count_required = response['count_required'] - if count_required>0 and count_graded>=count_required: + if count_required > 0 and count_graded >= count_required: self.student_data_for_location = response score_dict = { - 'score': int(count_graded>=count_required), + 'score': int(count_graded >= count_required), 'total': self.max_grade, } @@ -399,7 +400,7 @@ class PeerGradingModule(XModule): log.exception("Error saving calibration grade, location: {0}, submission_id: {1}, submission_key: {2}, grader_id: {3}".format(location, submission_id, submission_key, grader_id)) return self._err_response('Could not connect to grading service') - def peer_grading(self, get = None): + def peer_grading(self, get=None): ''' Show a peer grading interface ''' @@ -434,19 +435,19 @@ class PeerGradingModule(XModule): 'error_text': error_text, # Checked above 'staff_access': False, - 'use_single_location' : self.use_for_single_location, + 'use_single_location': self.use_for_single_location, }) return html - def peer_grading_problem(self, get = None): + def peer_grading_problem(self, get=None): ''' Show individual problem interface ''' - if get == None or get.get('location')==None: + if get == None or get.get('location') == None: if not self.use_for_single_location: #This is an error case, because it must be set to use a single location to be called without get parameters - return {'html' : "", 'success' : False} + return {'html': "", 'success': False} problem_location = self.link_to_location elif get.get('location') is not None: @@ -460,10 +461,10 @@ class PeerGradingModule(XModule): 'ajax_url': ajax_url, # Checked above 'staff_access': False, - 'use_single_location' : self.use_for_single_location, + 'use_single_location': self.use_for_single_location, }) - return {'html' : html, 'success' : True} + return {'html': html, 'success': True} def get_instance_state(self): """ @@ -473,11 +474,12 @@ class PeerGradingModule(XModule): """ state = { - 'student_data_for_location' : self.student_data_for_location, + 'student_data_for_location': self.student_data_for_location, } return json.dumps(state) + class PeerGradingDescriptor(XmlDescriptor, EditingDescriptor): """ Module for adding combined open ended questions @@ -534,4 +536,4 @@ class PeerGradingDescriptor(XmlDescriptor, EditingDescriptor): for child in ['task']: add_child(child) - return elt \ No newline at end of file + return elt diff --git a/common/lib/xmodule/xmodule/peer_grading_service.py b/common/lib/xmodule/xmodule/peer_grading_service.py index 6b30f4e043..8c50b6ff0a 100644 --- a/common/lib/xmodule/xmodule/peer_grading_service.py +++ b/common/lib/xmodule/xmodule/peer_grading_service.py @@ -14,11 +14,13 @@ from combined_open_ended_rubric import CombinedOpenEndedRubric, RubricParsingErr from lxml import etree from grading_service_module import GradingService, GradingServiceError -log=logging.getLogger(__name__) +log = logging.getLogger(__name__) + class GradingServiceError(Exception): pass + class PeerGradingService(GradingService): """ Interface with the grading controller for peer grading @@ -47,23 +49,23 @@ class PeerGradingService(GradingService): return self.try_to_decode(self._render_rubric(response)) def save_grade(self, location, grader_id, submission_id, score, feedback, submission_key, rubric_scores, submission_flagged): - data = {'grader_id' : grader_id, - 'submission_id' : submission_id, - 'score' : score, - 'feedback' : feedback, + data = {'grader_id': grader_id, + 'submission_id': submission_id, + 'score': score, + 'feedback': feedback, 'submission_key': submission_key, 'location': location, 'rubric_scores': rubric_scores, 'rubric_scores_complete': True, - 'submission_flagged' : submission_flagged} + 'submission_flagged': submission_flagged} return self.try_to_decode(self.post(self.save_grade_url, data)) def is_student_calibrated(self, problem_location, grader_id): - params = {'problem_id' : problem_location, 'student_id': grader_id} + params = {'problem_id': problem_location, 'student_id': grader_id} return self.try_to_decode(self.get(self.is_student_calibrated_url, params)) def show_calibration_essay(self, problem_location, grader_id): - params = {'problem_id' : problem_location, 'student_id': grader_id} + params = {'problem_id': problem_location, 'student_id': grader_id} response = self.get(self.show_calibration_essay_url, params) return self.try_to_decode(self._render_rubric(response)) @@ -100,10 +102,12 @@ class PeerGradingService(GradingService): This is a mock peer grading service that can be used for unit tests without making actual service calls to the grading controller """ + + class MockPeerGradingService(object): def get_next_submission(self, problem_location, grader_id): return json.dumps({'success': True, - 'submission_id':1, + 'submission_id': 1, 'submission_key': "", 'student_response': 'fake student response', 'prompt': 'fake submission prompt', @@ -119,7 +123,7 @@ class MockPeerGradingService(object): def show_calibration_essay(self, problem_location, grader_id): return json.dumps({'success': True, - 'submission_id':1, + 'submission_id': 1, 'submission_key': '', 'student_response': 'fake student response', 'prompt': 'fake submission prompt', @@ -140,6 +144,8 @@ class MockPeerGradingService(object): ]}) _service = None + + def peer_grading_service(system): """ Return a peer grading service instance--if settings.MOCK_PEER_GRADING is True, diff --git a/common/lib/xmodule/xmodule/randomize_module.py b/common/lib/xmodule/xmodule/randomize_module.py index f88cdc5efb..b336789193 100644 --- a/common/lib/xmodule/xmodule/randomize_module.py +++ b/common/lib/xmodule/xmodule/randomize_module.py @@ -12,6 +12,7 @@ from pkg_resources import resource_string log = logging.getLogger('mitx.' + __name__) + class RandomizeModule(XModule): """ Chooses a random child module. Chooses the same one every time for each student. @@ -96,7 +97,7 @@ class RandomizeModule(XModule): def get_icon_class(self): return self.child.get_icon_class() if self.child else 'other' - + class RandomizeDescriptor(SequenceDescriptor): # the editing interface can be the same as for sequences -- just a container module_class = RandomizeModule @@ -118,4 +119,3 @@ class RandomizeDescriptor(SequenceDescriptor): makes it use module.get_child_descriptors(). """ return True - diff --git a/common/lib/xmodule/xmodule/raw_module.py b/common/lib/xmodule/xmodule/raw_module.py index efdd2e7ba0..4a2bfbceaf 100644 --- a/common/lib/xmodule/xmodule/raw_module.py +++ b/common/lib/xmodule/xmodule/raw_module.py @@ -6,6 +6,7 @@ import sys log = logging.getLogger(__name__) + class RawDescriptor(XmlDescriptor, XMLEditingDescriptor): """ Module that provides a raw editing view of its data and children. It @@ -13,7 +14,7 @@ class RawDescriptor(XmlDescriptor, XMLEditingDescriptor): """ @classmethod def definition_from_xml(cls, xml_object, system): - return {'data': etree.tostring(xml_object, pretty_print=True,encoding='unicode')} + return {'data': etree.tostring(xml_object, pretty_print=True, encoding='unicode')} def definition_to_xml(self, resource_fs): try: diff --git a/common/lib/xmodule/xmodule/self_assessment_module.py b/common/lib/xmodule/xmodule/self_assessment_module.py index 38a60e11f5..07cc68a83a 100644 --- a/common/lib/xmodule/xmodule/self_assessment_module.py +++ b/common/lib/xmodule/xmodule/self_assessment_module.py @@ -25,6 +25,7 @@ from combined_open_ended_rubric import CombinedOpenEndedRubric log = logging.getLogger("mitx.courseware") + class SelfAssessmentModule(openendedchild.OpenEndedChild): """ A Self Assessment module that allows students to write open-ended responses, diff --git a/common/lib/xmodule/xmodule/seq_module.py b/common/lib/xmodule/xmodule/seq_module.py index 6dd92cc8fa..36011744f5 100644 --- a/common/lib/xmodule/xmodule/seq_module.py +++ b/common/lib/xmodule/xmodule/seq_module.py @@ -88,8 +88,8 @@ class SequenceModule(XModule): 'type': child.get_icon_class(), 'id': child.id, } - if childinfo['title']=='': - childinfo['title'] = child.metadata.get('display_name','') + if childinfo['title'] == '': + childinfo['title'] = child.metadata.get('display_name', '') contents.append(childinfo) params = {'items': contents, @@ -116,7 +116,7 @@ class SequenceDescriptor(MakoModuleDescriptor, XmlDescriptor): mako_template = 'widgets/sequence-edit.html' module_class = SequenceModule - stores_state = True # For remembering where in the sequence the student is + stores_state = True # For remembering where in the sequence the student is js = {'coffee': [resource_string(__name__, 'js/src/sequence/edit.coffee')]} js_module_name = "SequenceDescriptor" @@ -140,4 +140,3 @@ class SequenceDescriptor(MakoModuleDescriptor, XmlDescriptor): xml_object.append( etree.fromstring(child.export_to_xml(resource_fs))) return xml_object - diff --git a/common/lib/xmodule/xmodule/stringify.py b/common/lib/xmodule/xmodule/stringify.py index dab8ff0425..5a640e91b1 100644 --- a/common/lib/xmodule/xmodule/stringify.py +++ b/common/lib/xmodule/xmodule/stringify.py @@ -1,6 +1,7 @@ from itertools import chain from lxml import etree + def stringify_children(node): ''' Return all contents of an xml tree, without the outside tags. diff --git a/common/lib/xmodule/xmodule/template_module.py b/common/lib/xmodule/xmodule/template_module.py index d7e7ece897..5f376945eb 100644 --- a/common/lib/xmodule/xmodule/template_module.py +++ b/common/lib/xmodule/xmodule/template_module.py @@ -5,6 +5,7 @@ from mako.template import Template from xmodule.modulestore.django import modulestore import logging + class CustomTagModule(XModule): """ This module supports tags of the form @@ -81,4 +82,3 @@ class CustomTagDescriptor(RawDescriptor): to export them in a file with yet another layer of indirection. """ return False - diff --git a/common/lib/xmodule/xmodule/tests/__init__.py b/common/lib/xmodule/xmodule/tests/__init__.py index 1f323834a9..04e7ee19b1 100644 --- a/common/lib/xmodule/xmodule/tests/__init__.py +++ b/common/lib/xmodule/xmodule/tests/__init__.py @@ -29,9 +29,9 @@ test_system = ModuleSystem( user=Mock(is_staff=False), filestore=Mock(), debug=True, - xqueue={'interface':None, 'callback_url':'/', 'default_queuename': 'testqueue', 'waittime': 10}, + xqueue={'interface': None, 'callback_url': '/', 'default_queuename': 'testqueue', 'waittime': 10}, node_path=os.environ.get("NODE_PATH", "/usr/local/lib/node_modules"), - anonymous_student_id = 'student' + anonymous_student_id='student' ) @@ -85,4 +85,3 @@ class ModelsTest(unittest.TestCase): except: exception_happened = True self.assertTrue(exception_happened) - diff --git a/common/lib/xmodule/xmodule/tests/test_capa_module.py b/common/lib/xmodule/xmodule/tests/test_capa_module.py index e8f639e3c9..a22fcdb5f6 100644 --- a/common/lib/xmodule/xmodule/tests/test_capa_module.py +++ b/common/lib/xmodule/xmodule/tests/test_capa_module.py @@ -10,6 +10,7 @@ from lxml import etree from . import test_system + class CapaFactory(object): """ A helper class to create problem modules with various parameters for testing. @@ -58,7 +59,7 @@ class CapaFactory(object): attempts: also added to instance state. Will be converted to an int. """ - definition = {'data': CapaFactory.sample_problem_xml,} + definition = {'data': CapaFactory.sample_problem_xml, } location = Location(["i4x", "edX", "capa_test", "problem", "SampleProblem{0}".format(CapaFactory.next_num())]) metadata = {} @@ -208,8 +209,3 @@ class CapaModuleTest(unittest.TestCase): due=self.yesterday_str, graceperiod=self.two_day_delta_str) self.assertFalse(still_in_grace.answer_available()) - - - - - diff --git a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py index c89f5ee848..690eb7e39e 100644 --- a/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py +++ b/common/lib/xmodule/xmodule/tests/test_combined_open_ended.py @@ -20,6 +20,7 @@ OpenEndedModule """ + class OpenEndedChildTest(unittest.TestCase): location = Location(["i4x", "edX", "sa_test", "selfassessment", "SampleQuestion"]) @@ -38,17 +39,17 @@ class OpenEndedChildTest(unittest.TestCase): 'max_attempts': 20, 'prompt': prompt, 'rubric': rubric, - 'max_score': max_score, + 'max_score': max_score, 'display_name': 'Name', - 'accept_file_upload' : False, + 'accept_file_upload': False, } definition = Mock() descriptor = Mock() def setUp(self): - self.openendedchild = OpenEndedChild(test_system, self.location, + self.openendedchild = OpenEndedChild(test_system, self.location, self.definition, self.descriptor, self.static_data, self.metadata) - + def test_latest_answer_empty(self): answer = self.openendedchild.latest_answer() @@ -115,12 +116,12 @@ class OpenEndedChildTest(unittest.TestCase): self.assertEqual(score['score'], new_score) self.assertEqual(score['total'], self.static_data['max_score']) - + def test_reset(self): self.openendedchild.reset(test_system) state = json.loads(self.openendedchild.get_instance_state()) self.assertEqual(state['state'], OpenEndedChild.INITIAL) - + def test_is_last_response_correct(self): new_answer = "New Answer" @@ -134,6 +135,7 @@ class OpenEndedChildTest(unittest.TestCase): self.assertEqual(self.openendedchild.is_last_response_correct(), 'incorrect') + class OpenEndedModuleTest(unittest.TestCase): location = Location(["i4x", "edX", "sa_test", "selfassessment", "SampleQuestion"]) @@ -152,7 +154,7 @@ class OpenEndedModuleTest(unittest.TestCase): 'max_attempts': 20, 'prompt': prompt, 'rubric': rubric, - 'max_score': max_score, + 'max_score': max_score, 'display_name': 'Name', 'accept_file_upload': False, } @@ -170,9 +172,9 @@ class OpenEndedModuleTest(unittest.TestCase): def setUp(self): test_system.location = self.location self.mock_xqueue = MagicMock() - self.mock_xqueue.send_to_queue.return_value=(None, "Message") - test_system.xqueue = {'interface':self.mock_xqueue, 'callback_url':'/', 'default_queuename': 'testqueue', 'waittime': 1} - self.openendedmodule = OpenEndedModule(test_system, self.location, + self.mock_xqueue.send_to_queue.return_value = (None, "Message") + test_system.xqueue = {'interface': self.mock_xqueue, 'callback_url': '/', 'default_queuename': 'testqueue', 'waittime': 1} + self.openendedmodule = OpenEndedModule(test_system, self.location, self.definition, self.descriptor, self.static_data, self.metadata) def test_message_post(self): @@ -194,8 +196,8 @@ class OpenEndedModuleTest(unittest.TestCase): result = self.openendedmodule.message_post(get, test_system) self.assertTrue(result['success']) # make sure it's actually sending something we want to the queue - self.mock_xqueue.send_to_queue.assert_called_with(body = json.dumps(contents), header=ANY) - + self.mock_xqueue.send_to_queue.assert_called_with(body=json.dumps(contents), header=ANY) + state = json.loads(self.openendedmodule.get_instance_state()) self.assertIsNotNone(state['state'], OpenEndedModule.DONE) @@ -205,21 +207,21 @@ class OpenEndedModuleTest(unittest.TestCase): student_info = {'anonymous_student_id': test_system.anonymous_student_id, 'submission_time': qtime} contents = self.openendedmodule.payload.copy() - contents.update({ + contents.update({ 'student_info': json.dumps(student_info), - 'student_response': submission, + 'student_response': submission, 'max_score': self.max_score }) result = self.openendedmodule.send_to_grader(submission, test_system) self.assertTrue(result) - self.mock_xqueue.send_to_queue.assert_called_with(body = json.dumps(contents), header=ANY) + self.mock_xqueue.send_to_queue.assert_called_with(body=json.dumps(contents), header=ANY) def update_score_single(self): self.openendedmodule.new_history_entry("New Entry") - score_msg = { + score_msg = { 'correct': True, 'score': 4, - 'msg' : 'Grader Message', + 'msg': 'Grader Message', 'feedback': "Grader Feedback" } get = {'queuekey': "abcd", @@ -232,10 +234,10 @@ class OpenEndedModuleTest(unittest.TestCase): "success": True, "feedback": "Grader Feedback" } - score_msg = { + score_msg = { 'correct': True, 'score': 4, - 'msg' : 'Grader Message', + 'msg': 'Grader Message', 'feedback': json.dumps(feedback), 'grader_type': 'IN', 'grader_id': '1', @@ -261,6 +263,7 @@ class OpenEndedModuleTest(unittest.TestCase): score = self.openendedmodule.latest_score() self.assertEqual(score, 4) + class CombinedOpenEndedModuleTest(unittest.TestCase): location = Location(["i4x", "edX", "open_ended", "combinedopenended", "SampleQuestion"]) @@ -280,7 +283,7 @@ class CombinedOpenEndedModuleTest(unittest.TestCase): 'max_attempts': 20, 'prompt': prompt, 'rubric': rubric, - 'max_score': max_score, + 'max_score': max_score, 'display_name': 'Name' }) @@ -335,5 +338,3 @@ class CombinedOpenEndedModuleTest(unittest.TestCase): changed = self.combinedoe.update_task_states() self.assertTrue(changed) - - diff --git a/common/lib/xmodule/xmodule/tests/test_conditional.py b/common/lib/xmodule/xmodule/tests/test_conditional.py index f889ec7111..1b463eccaf 100644 --- a/common/lib/xmodule/xmodule/tests/test_conditional.py +++ b/common/lib/xmodule/xmodule/tests/test_conditional.py @@ -17,10 +17,11 @@ from xmodule.modulestore.exceptions import ItemNotFoundError from .test_export import DATA_DIR ORG = 'test_org' -COURSE = 'conditional' # name of directory with course data +COURSE = 'conditional' # name of directory with course data from . import test_system + class DummySystem(ImportSystem): @patch('xmodule.modulestore.xml.OSFS', lambda dir: MemoryFS()) @@ -82,11 +83,11 @@ class ConditionalModuleTest(unittest.TestCase): location = descriptor descriptor = self.modulestore.get_instance(course.id, location, depth=None) location = descriptor.location - instance_state = instance_states.get(location.category,None) + instance_state = instance_states.get(location.category, None) print "inner_get_module, location.category=%s, inst_state=%s" % (location.category, instance_state) return descriptor.xmodule_constructor(test_system)(instance_state, shared_state) - location = Location(["i4x", "edX", "cond_test", "conditional","condone"]) + location = Location(["i4x", "edX", "cond_test", "conditional", "condone"]) module = inner_get_module(location) def replace_urls(text, staticfiles_prefix=None, replace_prefix='/static/', course_namespace=None): @@ -105,15 +106,13 @@ class ConditionalModuleTest(unittest.TestCase): gdi = module.get_display_items() print "gdi=", gdi - ajax = json.loads(module.handle_ajax('','')) + ajax = json.loads(module.handle_ajax('', '')) self.assertTrue('xmodule.conditional_module' in ajax['html']) print "ajax: ", ajax # now change state of the capa problem to make it completed - instance_states['problem'] = json.dumps({'attempts':1}) + instance_states['problem'] = json.dumps({'attempts': 1}) - ajax = json.loads(module.handle_ajax('','')) + ajax = json.loads(module.handle_ajax('', '')) self.assertTrue('This is a secret' in ajax['html']) print "post-attempt ajax: ", ajax - - diff --git a/common/lib/xmodule/xmodule/tests/test_content.py b/common/lib/xmodule/xmodule/tests/test_content.py index 6bd10f22f7..1bcd2f4ebe 100644 --- a/common/lib/xmodule/xmodule/tests/test_content.py +++ b/common/lib/xmodule/xmodule/tests/test_content.py @@ -3,11 +3,13 @@ from xmodule.contentstore.content import StaticContent from xmodule.contentstore.content import ContentStore from xmodule.modulestore import Location + class Content: def __init__(self, location, content_type): self.location = location self.content_type = content_type + class ContentTest(unittest.TestCase): def test_thumbnail_none(self): # We had a bug where a thumbnail location of None was getting transformed into a Location tuple, with @@ -22,4 +24,4 @@ class ContentTest(unittest.TestCase): content = Content(Location(u'c4x', u'mitX', u'800', u'asset', u'monsters.jpg'), None) (thumbnail_content, thumbnail_file_location) = contentStore.generate_thumbnail(content) self.assertIsNone(thumbnail_content) - self.assertEqual(Location(u'c4x', u'mitX', u'800', u'thumbnail', u'monsters.jpg'), thumbnail_file_location) \ No newline at end of file + self.assertEqual(Location(u'c4x', u'mitX', u'800', u'thumbnail', u'monsters.jpg'), thumbnail_file_location) diff --git a/common/lib/xmodule/xmodule/tests/test_export.py b/common/lib/xmodule/xmodule/tests/test_export.py index f92d58db03..da1b04bd94 100644 --- a/common/lib/xmodule/xmodule/tests/test_export.py +++ b/common/lib/xmodule/xmodule/tests/test_export.py @@ -27,6 +27,7 @@ def strip_metadata(descriptor, key): for d in descriptor.get_children(): strip_metadata(d, key) + def strip_filenames(descriptor): """ Recursively strips 'filename' from all children's definitions. @@ -119,12 +120,12 @@ class RoundTripTestCase(unittest.TestCase): def test_selfassessment_roundtrip(self): #Test selfassessment xmodule to see if it exports correctly - self.check_export_roundtrip(DATA_DIR,"self_assessment") + self.check_export_roundtrip(DATA_DIR, "self_assessment") def test_graphicslidertool_roundtrip(self): #Test graphicslidertool xmodule to see if it exports correctly - self.check_export_roundtrip(DATA_DIR,"graphic_slider_tool") + self.check_export_roundtrip(DATA_DIR, "graphic_slider_tool") def test_exam_registration_roundtrip(self): # Test exam_registration xmodule to see if it exports correctly - self.check_export_roundtrip(DATA_DIR,"test_exam_registration") + self.check_export_roundtrip(DATA_DIR, "test_exam_registration") diff --git a/common/lib/xmodule/xmodule/tests/test_graders.py b/common/lib/xmodule/xmodule/tests/test_graders.py index fa0e94d2d5..27416b1d5c 100644 --- a/common/lib/xmodule/xmodule/tests/test_graders.py +++ b/common/lib/xmodule/xmodule/tests/test_graders.py @@ -4,6 +4,7 @@ import unittest from xmodule import graders from xmodule.graders import Score, aggregate_scores + class GradesheetTest(unittest.TestCase): def test_weighted_grading(self): @@ -217,4 +218,3 @@ class GraderTest(unittest.TestCase): #TODO: How do we test failure cases? The parser only logs an error when #it can't parse something. Maybe it should throw exceptions? - diff --git a/common/lib/xmodule/xmodule/tests/test_import.py b/common/lib/xmodule/xmodule/tests/test_import.py index 7cd91223e3..42072ffe4d 100644 --- a/common/lib/xmodule/xmodule/tests/test_import.py +++ b/common/lib/xmodule/xmodule/tests/test_import.py @@ -61,6 +61,7 @@ class BaseCourseTestCase(unittest.TestCase): self.assertEquals(len(courses), 1) return courses[0] + class ImportTestCase(BaseCourseTestCase): def test_fallback(self): @@ -323,7 +324,7 @@ class ImportTestCase(BaseCourseTestCase): self.assertEqual(len(sections), 4) - for i in (2,3): + for i in (2, 3): video = sections[i] # Name should be 'video_{hash}' print "video {0} url_name: {1}".format(i, video.url_name) @@ -379,5 +380,3 @@ class ImportTestCase(BaseCourseTestCase): # and finally... course.metadata['cohort_config'] = {'cohorted': True} self.assertTrue(course.is_cohorted) - - diff --git a/common/lib/xmodule/xmodule/tests/test_progress.py b/common/lib/xmodule/xmodule/tests/test_progress.py index cb011cdc2b..0114ba4ad3 100644 --- a/common/lib/xmodule/xmodule/tests/test_progress.py +++ b/common/lib/xmodule/xmodule/tests/test_progress.py @@ -7,6 +7,7 @@ from xmodule import x_module from . import test_system + class ProgressTest(unittest.TestCase): ''' Test that basic Progress objects work. A Progress represents a fraction between 0 and 1. diff --git a/common/lib/xmodule/xmodule/tests/test_randomize_module.py b/common/lib/xmodule/xmodule/tests/test_randomize_module.py index 6353245f1a..456fd379a5 100644 --- a/common/lib/xmodule/xmodule/tests/test_randomize_module.py +++ b/common/lib/xmodule/xmodule/tests/test_randomize_module.py @@ -52,4 +52,3 @@ class RandomizeModuleTestCase(unittest.TestCase): # TODO: add tests that create a module and check. Passing state is a good way to # check that child access works... - diff --git a/common/lib/xmodule/xmodule/tests/test_self_assessment.py b/common/lib/xmodule/xmodule/tests/test_self_assessment.py index c5fb82e412..78dbb082ac 100644 --- a/common/lib/xmodule/xmodule/tests/test_self_assessment.py +++ b/common/lib/xmodule/xmodule/tests/test_self_assessment.py @@ -8,6 +8,7 @@ from lxml import etree from . import test_system + class SelfAssessmentTest(unittest.TestCase): rubric = ''' @@ -44,7 +45,7 @@ class SelfAssessmentTest(unittest.TestCase): 'prompt': self.prompt, 'max_score': 1, 'display_name': "Name", - 'accept_file_upload' : False, + 'accept_file_upload': False, } self.module = SelfAssessmentModule(test_system, self.location, @@ -74,4 +75,3 @@ class SelfAssessmentTest(unittest.TestCase): self.module.save_answer({'student_answer': 'answer 4'}, test_system) self.module.save_assessment({'assessment': '1'}, test_system) self.assertEqual(self.module.state, self.module.DONE) - diff --git a/common/lib/xmodule/xmodule/tests/test_stringify.py b/common/lib/xmodule/xmodule/tests/test_stringify.py index 29e99bef56..e44b93b0b8 100644 --- a/common/lib/xmodule/xmodule/tests/test_stringify.py +++ b/common/lib/xmodule/xmodule/tests/test_stringify.py @@ -2,6 +2,7 @@ from nose.tools import assert_equals, assert_true, assert_false from lxml import etree from xmodule.stringify import stringify_children + def test_stringify(): text = 'Hi
                  there Bruce!
                  ' html = '''{0}'''.format(text) @@ -9,6 +10,7 @@ def test_stringify(): out = stringify_children(xml) assert_equals(out, text) + def test_stringify_again(): html = """A voltage source is non-linear!
                  diff --git a/common/lib/xmodule/xmodule/timeparse.py b/common/lib/xmodule/xmodule/timeparse.py index 36c0f725e5..1c3a780ad8 100644 --- a/common/lib/xmodule/xmodule/timeparse.py +++ b/common/lib/xmodule/xmodule/timeparse.py @@ -5,6 +5,7 @@ import time TIME_FORMAT = "%Y-%m-%dT%H:%M" + def parse_time(time_str): """ Takes a time string in TIME_FORMAT @@ -15,6 +16,7 @@ def parse_time(time_str): """ return time.strptime(time_str, TIME_FORMAT) + def stringify_time(time_struct): """ Convert a time struct to a string diff --git a/common/lib/xmodule/xmodule/util/decorators.py b/common/lib/xmodule/xmodule/util/decorators.py index 81ab747a3e..0b9b301244 100644 --- a/common/lib/xmodule/xmodule/util/decorators.py +++ b/common/lib/xmodule/xmodule/util/decorators.py @@ -4,8 +4,8 @@ def lazyproperty(fn): """ Use this decorator for lazy generation of properties that are expensive to compute. From http://stackoverflow.com/a/3013910/86828 - - + + Example: class Test(object): @@ -13,7 +13,7 @@ def lazyproperty(fn): def a(self): print 'generating "a"' return range(5) - + Interactive Session: >>> t = Test() >>> t.__dict__ @@ -26,11 +26,11 @@ def lazyproperty(fn): >>> t.a [0, 1, 2, 3, 4] """ - + attr_name = '_lazy_' + fn.__name__ @property def _lazyprop(self): if not hasattr(self, attr_name): setattr(self, attr_name, fn(self)) return getattr(self, attr_name) - return _lazyprop \ No newline at end of file + return _lazyprop diff --git a/common/lib/xmodule/xmodule/vertical_module.py b/common/lib/xmodule/xmodule/vertical_module.py index 14105b41d0..5827ea96a9 100644 --- a/common/lib/xmodule/xmodule/vertical_module.py +++ b/common/lib/xmodule/xmodule/vertical_module.py @@ -47,6 +47,6 @@ class VerticalDescriptor(SequenceDescriptor): js = {'coffee': [resource_string(__name__, 'js/src/vertical/edit.coffee')]} js_module_name = "VerticalDescriptor" - + # TODO (victor): Does this need its own definition_to_xml method? Otherwise it looks # like verticals will get exported as sequentials... diff --git a/common/lib/xmodule/xmodule/video_module.py b/common/lib/xmodule/xmodule/video_module.py index f21cd37a37..6d9715cfd6 100644 --- a/common/lib/xmodule/xmodule/video_module.py +++ b/common/lib/xmodule/xmodule/video_module.py @@ -121,7 +121,7 @@ class VideoModule(XModule): return self.youtube def get_html(self): - if isinstance(modulestore(), XMLModuleStore) : + if isinstance(modulestore(), XMLModuleStore): # VS[compat] # cdodge: filesystem static content support. caption_asset_path = "/static/{0}/subs/".format(self.metadata['data_dir']) diff --git a/common/lib/xmodule/xmodule/x_module.py b/common/lib/xmodule/xmodule/x_module.py index 0e4e8e0f00..87c085b19a 100644 --- a/common/lib/xmodule/xmodule/x_module.py +++ b/common/lib/xmodule/xmodule/x_module.py @@ -109,16 +109,16 @@ class HTMLSnippet(object): All of these will be loaded onto the page in the CMS """ # cdodge: We've moved the xmodule.coffee script from an outside directory into the xmodule area of common - # this means we need to make sure that all xmodules include this dependency which had been previously implicitly + # this means we need to make sure that all xmodules include this dependency which had been previously implicitly # fulfilled in a different area of code js = cls.js - + if js is None: js = {} if 'coffee' not in js: js['coffee'] = [] - + js['coffee'].append(resource_string(__name__, 'js/src/xmodule.coffee')) return js @@ -538,7 +538,7 @@ class XModuleDescriptor(Plugin, HTMLSnippet, ResourceTemplates): def start(self, value): if isinstance(value, time.struct_time): self.metadata['start'] = stringify_time(value) - + @property def days_early_for_beta(self): """ diff --git a/common/lib/xmodule/xmodule/xml_module.py b/common/lib/xmodule/xmodule/xml_module.py index ed2f6ce921..64c3aabbcc 100644 --- a/common/lib/xmodule/xmodule/xml_module.py +++ b/common/lib/xmodule/xmodule/xml_module.py @@ -16,6 +16,7 @@ edx_xml_parser = etree.XMLParser(dtd_validation=False, load_dtd=False, remove_comments=True, remove_blank_text=True, encoding='utf-8') + def name_to_pathname(name): """ Convert a location name for use in a path: replace ':' with '/'. @@ -23,6 +24,7 @@ def name_to_pathname(name): """ return name.replace(':', '/') + def is_pointer_tag(xml_obj): """ Check if xml_obj is a pointer tag: . @@ -46,6 +48,7 @@ def is_pointer_tag(xml_obj): return len(xml_obj) == 0 and actual_attr == expected_attr and not has_text + def get_metadata_from_xml(xml_object, remove=True): meta = xml_object.find('meta') if meta is None: @@ -58,6 +61,7 @@ def get_metadata_from_xml(xml_object, remove=True): _AttrMapBase = namedtuple('_AttrMap', 'from_xml to_xml') + class AttrMap(_AttrMapBase): """ A class that specifies two functions: @@ -93,16 +97,16 @@ class XmlDescriptor(XModuleDescriptor): metadata_attributes = ('format', 'graceperiod', 'showanswer', 'rerandomize', 'start', 'due', 'graded', 'display_name', 'url_name', 'hide_from_toc', 'ispublic', # if True, then course is listed for all users; see - 'xqa_key', # for xqaa server access - # information about testcenter exams is a dict (of dicts), not a string, - # so it cannot be easily exportable as a course element's attribute. + 'xqa_key', # for xqaa server access + # information about testcenter exams is a dict (of dicts), not a string, + # so it cannot be easily exportable as a course element's attribute. 'testcenter_info', # VS[compat] Remove once unused. 'name', 'slug') - metadata_to_strip = ('data_dir', + metadata_to_strip = ('data_dir', # cdodge: @TODO: We need to figure out a way to export out 'tabs' and 'grading_policy' which is on the course - 'tabs', 'grading_policy', 'is_draft', 'published_by', 'published_date', + 'tabs', 'grading_policy', 'is_draft', 'published_by', 'published_date', 'discussion_blackouts', 'testcenter_info', # VS[compat] -- remove the below attrs once everything is in the CMS 'course', 'org', 'url_name', 'filename') @@ -117,7 +121,7 @@ class XmlDescriptor(XModuleDescriptor): bool_map = AttrMap(to_bool, from_bool) to_int = lambda val: int(val) - from_int = lambda val: str(val) + from_int = lambda val: str(val) int_map = AttrMap(to_int, from_int) xml_attribute_map = { # type conversion: want True/False in python, "true"/"false" in xml @@ -125,7 +129,7 @@ class XmlDescriptor(XModuleDescriptor): 'hide_progress_tab': bool_map, 'allow_anonymous': bool_map, 'allow_anonymous_to_peers': bool_map, - 'weight':int_map + 'weight': int_map } @@ -133,8 +137,8 @@ class XmlDescriptor(XModuleDescriptor): # importing 2012 courses. # A set of metadata key conversions that we want to make metadata_translations = { - 'slug' : 'url_name', - 'name' : 'display_name', + 'slug': 'url_name', + 'name': 'display_name', } @classmethod @@ -230,7 +234,7 @@ class XmlDescriptor(XModuleDescriptor): # TODO (ichuang): remove this after migration # for Fall 2012 LMS migration: keep filename (and unmangled filename) - definition['filename'] = [ filepath, filename ] + definition['filename'] = [filepath, filename] return definition @@ -291,9 +295,9 @@ class XmlDescriptor(XModuleDescriptor): filepath = cls._format_filepath(xml_object.tag, name_to_pathname(url_name)) definition_xml = cls.load_file(filepath, system.resources_fs, location) else: - definition_xml = xml_object # this is just a pointer, not the real definition content + definition_xml = xml_object # this is just a pointer, not the real definition content - definition = cls.load_definition(definition_xml, system, location) # note this removes metadata + definition = cls.load_definition(definition_xml, system, location) # note this removes metadata # VS[compat] -- make Ike's github preview links work in both old and # new file layouts if is_pointer_tag(xml_object): @@ -303,13 +307,13 @@ class XmlDescriptor(XModuleDescriptor): metadata = cls.load_metadata(definition_xml) # move definition metadata into dict - dmdata = definition.get('definition_metadata','') + dmdata = definition.get('definition_metadata', '') if dmdata: metadata['definition_metadata_raw'] = dmdata try: metadata.update(json.loads(dmdata)) except Exception as err: - log.debug('Error %s in loading metadata %s' % (err,dmdata)) + log.debug('Error %s in loading metadata %s' % (err, dmdata)) metadata['definition_metadata_err'] = str(err) # Set/override any metadata specified by policy diff --git a/common/static/js/vendor/mathjax-MathJax-c9db6ac/docs/source/conf.py b/common/static/js/vendor/mathjax-MathJax-c9db6ac/docs/source/conf.py index f0a8013eed..819bff31aa 100644 --- a/common/static/js/vendor/mathjax-MathJax-c9db6ac/docs/source/conf.py +++ b/common/static/js/vendor/mathjax-MathJax-c9db6ac/docs/source/conf.py @@ -11,7 +11,8 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +import sys +import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the diff --git a/common/xml_cleanup.py b/common/xml_cleanup.py index 15890fb99e..5f2b527063 100755 --- a/common/xml_cleanup.py +++ b/common/xml_cleanup.py @@ -8,12 +8,16 @@ In particular, the remove-meta option is only intended to be used after pulling using the metadata_to_json management command. """ -import os, fnmatch, re, sys +import os +import fnmatch +import re +import sys from lxml import etree from collections import defaultdict INVALID_CHARS = re.compile(r"[^\w.-]") + def clean(value): """ Return value, made into a form legal for locations @@ -24,6 +28,7 @@ def clean(value): # category -> set of url_names for that category that we've already seen used_names = defaultdict(set) + def clean_unique(category, name): cleaned = clean(name) if cleaned not in used_names[category]: @@ -38,6 +43,7 @@ def clean_unique(category, name): used_names[category].add(cleaned) return cleaned + def cleanup(filepath, remove_meta): # Keys that are exported to the policy file, and so # can be removed from the xml afterward @@ -70,7 +76,7 @@ def cleanup(filepath, remove_meta): print "WARNING: {0} has both slug and url_name".format(node) if ('url_name' in attrs and 'filename' in attrs and - len(attrs)==2 and attrs['url_name'] == attrs['filename']): + len(attrs) == 2 and attrs['url_name'] == attrs['filename']): # This is a pointer tag in disguise. Get rid of the filename. print 'turning {0}.{1} into a pointer tag'.format(node.tag, attrs['url_name']) del attrs['filename'] @@ -108,5 +114,3 @@ def main(args): if __name__ == '__main__': main(sys.argv[1:]) - - diff --git a/lms/djangoapps/certificates/migrations/0008_auto__del_revokedcertificate__del_field_generatedcertificate_name__add.py b/lms/djangoapps/certificates/migrations/0008_auto__del_revokedcertificate__del_field_generatedcertificate_name__add.py index cbec7214c0..872804d286 100644 --- a/lms/djangoapps/certificates/migrations/0008_auto__del_revokedcertificate__del_field_generatedcertificate_name__add.py +++ b/lms/djangoapps/certificates/migrations/0008_auto__del_revokedcertificate__del_field_generatedcertificate_name__add.py @@ -160,4 +160,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['certificates'] \ No newline at end of file + complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0009_auto__del_field_generatedcertificate_graded_download_url__del_field_ge.py b/lms/djangoapps/certificates/migrations/0009_auto__del_field_generatedcertificate_graded_download_url__del_field_ge.py index 40637452cc..2ff1434314 100644 --- a/lms/djangoapps/certificates/migrations/0009_auto__del_field_generatedcertificate_graded_download_url__del_field_ge.py +++ b/lms/djangoapps/certificates/migrations/0009_auto__del_field_generatedcertificate_graded_download_url__del_field_ge.py @@ -92,4 +92,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['certificates'] \ No newline at end of file + complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0010_auto__del_field_generatedcertificate_enabled__add_field_generatedcerti.py b/lms/djangoapps/certificates/migrations/0010_auto__del_field_generatedcertificate_enabled__add_field_generatedcerti.py index 5970c96f6b..a41e58cc3b 100644 --- a/lms/djangoapps/certificates/migrations/0010_auto__del_field_generatedcertificate_enabled__add_field_generatedcerti.py +++ b/lms/djangoapps/certificates/migrations/0010_auto__del_field_generatedcertificate_enabled__add_field_generatedcerti.py @@ -78,4 +78,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['certificates'] \ No newline at end of file + complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0011_auto__del_field_generatedcertificate_certificate_id__add_field_generat.py b/lms/djangoapps/certificates/migrations/0011_auto__del_field_generatedcertificate_certificate_id__add_field_generat.py index 36d6e5d4f3..155839a82f 100644 --- a/lms/djangoapps/certificates/migrations/0011_auto__del_field_generatedcertificate_certificate_id__add_field_generat.py +++ b/lms/djangoapps/certificates/migrations/0011_auto__del_field_generatedcertificate_certificate_id__add_field_generat.py @@ -87,4 +87,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['certificates'] \ No newline at end of file + complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0012_auto__add_field_generatedcertificate_name__add_field_generatedcertific.py b/lms/djangoapps/certificates/migrations/0012_auto__add_field_generatedcertificate_name__add_field_generatedcertific.py index 4195860ca5..9261654ec8 100644 --- a/lms/djangoapps/certificates/migrations/0012_auto__add_field_generatedcertificate_name__add_field_generatedcertific.py +++ b/lms/djangoapps/certificates/migrations/0012_auto__add_field_generatedcertificate_name__add_field_generatedcertific.py @@ -90,4 +90,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['certificates'] \ No newline at end of file + complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0013_auto__add_field_generatedcertificate_error_reason.py b/lms/djangoapps/certificates/migrations/0013_auto__add_field_generatedcertificate_error_reason.py index 7f31e6ebd9..6031c8055b 100644 --- a/lms/djangoapps/certificates/migrations/0013_auto__add_field_generatedcertificate_error_reason.py +++ b/lms/djangoapps/certificates/migrations/0013_auto__add_field_generatedcertificate_error_reason.py @@ -75,4 +75,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['certificates'] \ No newline at end of file + complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/migrations/0014_adding_whitelist.py b/lms/djangoapps/certificates/migrations/0014_adding_whitelist.py index 1bd4d994cf..0aafea4067 100644 --- a/lms/djangoapps/certificates/migrations/0014_adding_whitelist.py +++ b/lms/djangoapps/certificates/migrations/0014_adding_whitelist.py @@ -86,4 +86,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['certificates'] \ No newline at end of file + complete_apps = ['certificates'] diff --git a/lms/djangoapps/certificates/models.py b/lms/djangoapps/certificates/models.py index 0e68e3cfe7..dc438b805a 100644 --- a/lms/djangoapps/certificates/models.py +++ b/lms/djangoapps/certificates/models.py @@ -62,6 +62,7 @@ class CertificateStatuses(object): restricted = 'restricted' error = 'error' + class CertificateWhitelist(models.Model): """ Tracks students who are whitelisted, all users @@ -74,6 +75,7 @@ class CertificateWhitelist(models.Model): course_id = models.CharField(max_length=255, blank=True, default='') whitelist = models.BooleanField(default=0) + class GeneratedCertificate(models.Model): user = models.ForeignKey(User) course_id = models.CharField(max_length=255, blank=True, default='') diff --git a/lms/djangoapps/certificates/queue.py b/lms/djangoapps/certificates/queue.py index d926035efd..a7eb4e3c81 100644 --- a/lms/djangoapps/certificates/queue.py +++ b/lms/djangoapps/certificates/queue.py @@ -142,7 +142,7 @@ class XQueueCertInterface(object): """ - VALID_STATUSES = [ status.generating, + VALID_STATUSES = [status.generating, status.unavailable, status.deleted, status.error, status.notpassing] diff --git a/lms/djangoapps/course_wiki/course_nav.py b/lms/djangoapps/course_wiki/course_nav.py index 122f9ebb54..434860a0f7 100644 --- a/lms/djangoapps/course_wiki/course_nav.py +++ b/lms/djangoapps/course_wiki/course_nav.py @@ -11,6 +11,7 @@ from courseware.courses import get_course_with_access IN_COURSE_WIKI_REGEX = r'/courses/(?P[^/]+/[^/]+/[^/]+)/wiki/(?P.*|)$' + class Middleware(object): """ This middleware is to keep the course nav bar above the wiki while @@ -18,68 +19,68 @@ class Middleware(object): If it intercepts a request for /wiki/.. that has a referrer in the form /courses/course_id/... it will redirect the user to the page /courses/course_id/wiki/... - + It is also possible that someone followed a link leading to a course that they don't have access to. In this case, we redirect them to the same page on the regular wiki. - + If we return a redirect, this middleware makes sure that the redirect keeps the student in the course. - + Finally, if the student is in the course viewing a wiki, we change the reverse() function to resolve wiki urls as a course wiki url by setting the _transform_url attribute on wiki.models.reverse. - + Forgive me Father, for I have hacked. """ - + def __init__(self): self.redirected = False - + def process_request(self, request): self.redirected = False wiki_reverse._transform_url = lambda url: url - + referer = request.META.get('HTTP_REFERER') destination = request.path - - + + if request.method == 'GET': new_destination = self.get_redirected_url(request.user, referer, destination) - + if new_destination != destination: # We mark that we generated this redirection, so we don't modify it again self.redirected = True return redirect(new_destination) - + course_match = re.match(IN_COURSE_WIKI_REGEX, destination) if course_match: course_id = course_match.group('course_id') prepend_string = '/courses/' + course_match.group('course_id') wiki_reverse._transform_url = lambda url: prepend_string + url - + return None - - + + def process_response(self, request, response): """ If this is a redirect response going to /wiki/*, then we might need to change it to be a redirect going to /courses/*/wiki*. """ - if not self.redirected and response.status_code == 302: #This is a redirect + if not self.redirected and response.status_code == 302: # This is a redirect referer = request.META.get('HTTP_REFERER') destination_url = response['LOCATION'] destination = urlparse(destination_url).path - + new_destination = self.get_redirected_url(request.user, referer, destination) - + if new_destination != destination: new_url = destination_url.replace(destination, new_destination) response['LOCATION'] = new_url - + return response - - + + def get_redirected_url(self, user, referer, destination): """ Returns None if the destination shouldn't be changed. @@ -87,14 +88,14 @@ class Middleware(object): if not referer: return destination referer_path = urlparse(referer).path - + path_match = re.match(r'^/wiki/(?P.*|)$', destination) if path_match: # We are going to the wiki. Check if we came from a course course_match = re.match(r'/courses/(?P[^/]+/[^/]+/[^/]+)/.*', referer_path) if course_match: course_id = course_match.group('course_id') - + # See if we are able to view the course. If we are, redirect to it try: course = get_course_with_access(user, course_id, 'load') @@ -102,9 +103,9 @@ class Middleware(object): except Http404: # Even though we came from the course, we can't see it. So don't worry about it. pass - + else: - # It is also possible we are going to a course wiki view, but we + # It is also possible we are going to a course wiki view, but we # don't have permission to see the course! course_match = re.match(IN_COURSE_WIKI_REGEX, destination) if course_match: @@ -117,9 +118,9 @@ class Middleware(object): except Http404: # We can't see the course, so redirect to the regular wiki return "/wiki/" + course_match.group('wiki_path') - + return destination - + def context_processor(request): """ @@ -129,21 +130,20 @@ def context_processor(request): then we add 'course' to the context. This allows the course nav bar to be shown. """ - + match = re.match(IN_COURSE_WIKI_REGEX, request.path) if match: course_id = match.group('course_id') - + try: course = get_course_with_access(request.user, course_id, 'load') staff_access = has_access(request.user, course, 'staff') - return {'course' : course, + return {'course': course, 'staff_access': staff_access} except Http404: # We couldn't access the course for whatever reason. It is too late to change # the URL here, so we just leave the course context. The middleware shouldn't # let this happen pass - + return {} - \ No newline at end of file diff --git a/lms/djangoapps/course_wiki/editors.py b/lms/djangoapps/course_wiki/editors.py index c1f5b733ad..2ca8260bfe 100644 --- a/lms/djangoapps/course_wiki/editors.py +++ b/lms/djangoapps/course_wiki/editors.py @@ -14,11 +14,11 @@ class CodeMirrorWidget(forms.Widget): def __init__(self, attrs=None): # The 'rows' and 'cols' attributes are required for HTML correctness. default_attrs = {'class': 'markItUp', - 'rows': '10', 'cols': '40',} + 'rows': '10', 'cols': '40', } if attrs: default_attrs.update(attrs) super(CodeMirrorWidget, self).__init__(default_attrs) - + def render(self, name, value, attrs=None): if value is None: value = '' @@ -34,10 +34,10 @@ class CodeMirrorWidget(forms.Widget): class CodeMirror(BaseEditor): editor_id = 'codemirror' - + def get_admin_widget(self, instance=None): return MarkItUpAdminWidget() - + def get_widget(self, instance=None): return CodeMirrorWidget() @@ -61,4 +61,3 @@ class CodeMirror(BaseEditor): "js/wiki/CodeMirror.init.js", "js/wiki/cheatsheet.js", ) - diff --git a/lms/djangoapps/course_wiki/plugins/markdownedx/__init__.py b/lms/djangoapps/course_wiki/plugins/markdownedx/__init__.py index 8845471eda..53fd3d4d3b 100644 --- a/lms/djangoapps/course_wiki/plugins/markdownedx/__init__.py +++ b/lms/djangoapps/course_wiki/plugins/markdownedx/__init__.py @@ -1,2 +1,2 @@ # Make sure wiki_plugin.py gets run. -from course_wiki.plugins.markdownedx.wiki_plugin import ExtendMarkdownPlugin \ No newline at end of file +from course_wiki.plugins.markdownedx.wiki_plugin import ExtendMarkdownPlugin diff --git a/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_mathjax.py b/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_mathjax.py index a9148511e3..b14803744b 100644 --- a/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_mathjax.py +++ b/lms/djangoapps/course_wiki/plugins/markdownedx/mdx_mathjax.py @@ -28,4 +28,3 @@ class MathJaxExtension(markdown.Extension): def makeExtension(configs=None): return MathJaxExtension(configs) - diff --git a/lms/djangoapps/course_wiki/plugins/markdownedx/wiki_plugin.py b/lms/djangoapps/course_wiki/plugins/markdownedx/wiki_plugin.py index ffbe7b0a52..765ee57422 100644 --- a/lms/djangoapps/course_wiki/plugins/markdownedx/wiki_plugin.py +++ b/lms/djangoapps/course_wiki/plugins/markdownedx/wiki_plugin.py @@ -7,15 +7,15 @@ from wiki.core.plugins import registry as plugin_registry from course_wiki.plugins.markdownedx import mdx_circuit, mdx_mathjax, mdx_video + class ExtendMarkdownPlugin(BasePlugin): """ This plugin simply loads all of the markdown extensions we use in edX. """ - + markdown_extensions = [mdx_circuit.CircuitExtension(configs={}), #mdx_image.ImageExtension() , #This one doesn't work. Tries to import simplewiki.settings - mdx_mathjax.MathJaxExtension(configs={}) , + mdx_mathjax.MathJaxExtension(configs={}), mdx_video.VideoExtension(configs={})] plugin_registry.register(ExtendMarkdownPlugin) - diff --git a/lms/djangoapps/course_wiki/tests/__init__.py b/lms/djangoapps/course_wiki/tests/__init__.py index 8b13789179..e69de29bb2 100644 --- a/lms/djangoapps/course_wiki/tests/__init__.py +++ b/lms/djangoapps/course_wiki/tests/__init__.py @@ -1 +0,0 @@ - diff --git a/lms/djangoapps/course_wiki/tests/tests.py b/lms/djangoapps/course_wiki/tests/tests.py index f1c4fa4810..99f138f0bc 100644 --- a/lms/djangoapps/course_wiki/tests/tests.py +++ b/lms/djangoapps/course_wiki/tests/tests.py @@ -13,10 +13,10 @@ class WikiRedirectTestCase(PageLoader): def setUp(self): xmodule.modulestore.django._MODULESTORES = {} courses = modulestore().get_courses() - + def find_course(name): """Assumes the course is present""" - return [c for c in courses if c.location.course==name][0] + return [c for c in courses if c.location.course == name][0] self.full = find_course("full") self.toy = find_course("toy") @@ -29,91 +29,89 @@ class WikiRedirectTestCase(PageLoader): self.create_account('u2', self.instructor, self.password) self.activate_user(self.student) self.activate_user(self.instructor) - - - + + + def test_wiki_redirect(self): """ Test that requesting wiki URLs redirect properly to or out of classes. - - An enrolled in student going from /courses/edX/toy/2012_Fall/progress - to /wiki/some/fake/wiki/page/ will redirect to + + An enrolled in student going from /courses/edX/toy/2012_Fall/progress + to /wiki/some/fake/wiki/page/ will redirect to /courses/edX/toy/2012_Fall/wiki/some/fake/wiki/page/ - + An unenrolled student going to /courses/edX/toy/2012_Fall/wiki/some/fake/wiki/page/ will be redirected to /wiki/some/fake/wiki/page/ - + """ self.login(self.student, self.password) - + self.enroll(self.toy) - - referer = reverse("progress", kwargs={ 'course_id' : self.toy.id }) + + referer = reverse("progress", kwargs={'course_id': self.toy.id}) destination = reverse("wiki:get", kwargs={'path': 'some/fake/wiki/page/'}) - + redirected_to = referer.replace("progress", "wiki/some/fake/wiki/page/") - - resp = self.client.get( destination, HTTP_REFERER=referer) - self.assertEqual(resp.status_code, 302 ) - - self.assertEqual(resp['Location'], 'http://testserver' + redirected_to ) - - + + resp = self.client.get(destination, HTTP_REFERER=referer) + self.assertEqual(resp.status_code, 302) + + self.assertEqual(resp['Location'], 'http://testserver' + redirected_to) + + # Now we test that the student will be redirected away from that page if the course doesn't exist # We do this in the same test because we want to make sure the redirected_to is constructed correctly - + # This is a location like /courses/*/wiki/* , but with an invalid course ID - bad_course_wiki_page = redirected_to.replace( self.toy.location.course, "bad_course" ) - - resp = self.client.get( bad_course_wiki_page, HTTP_REFERER=referer) + bad_course_wiki_page = redirected_to.replace(self.toy.location.course, "bad_course") + + resp = self.client.get(bad_course_wiki_page, HTTP_REFERER=referer) self.assertEqual(resp.status_code, 302) - self.assertEqual(resp['Location'], 'http://testserver' + destination ) - - + self.assertEqual(resp['Location'], 'http://testserver' + destination) + + def create_course_page(self, course): """ Test that loading the course wiki page creates the wiki page. The user must be enrolled in the course to see the page. """ - - course_wiki_home = reverse('course_wiki', kwargs={'course_id' : course.id}) - referer = reverse("progress", kwargs={ 'course_id' : self.toy.id }) - + + course_wiki_home = reverse('course_wiki', kwargs={'course_id': course.id}) + referer = reverse("progress", kwargs={'course_id': self.toy.id}) + resp = self.client.get(course_wiki_home, follow=True, HTTP_REFERER=referer) - + course_wiki_page = referer.replace('progress', 'wiki/' + self.toy.wiki_slug + "/") - + ending_location = resp.redirect_chain[-1][0] ending_status = resp.redirect_chain[-1][1] - - self.assertEquals(ending_location, 'http://testserver' + course_wiki_page ) + + self.assertEquals(ending_location, 'http://testserver' + course_wiki_page) self.assertEquals(resp.status_code, 200) - + self.has_course_navigator(resp) - + def has_course_navigator(self, resp): """ Ensure that the response has the course navigator. """ - self.assertTrue( "course info" in resp.content.lower() ) - self.assertTrue( "courseware" in resp.content.lower() ) - - + self.assertTrue("course info" in resp.content.lower()) + self.assertTrue("courseware" in resp.content.lower()) + + def test_course_navigator(self): """" Test that going from a course page to a wiki page contains the course navigator. """ - + self.login(self.student, self.password) self.enroll(self.toy) self.create_course_page(self.toy) - - - course_wiki_page = reverse('wiki:get', kwargs={'path' : self.toy.wiki_slug + '/'}) - referer = reverse("courseware", kwargs={ 'course_id' : self.toy.id }) - + + + course_wiki_page = reverse('wiki:get', kwargs={'path': self.toy.wiki_slug + '/'}) + referer = reverse("courseware", kwargs={'course_id': self.toy.id}) + resp = self.client.get(course_wiki_page, follow=True, HTTP_REFERER=referer) - + self.has_course_navigator(resp) - - diff --git a/lms/djangoapps/course_wiki/views.py b/lms/djangoapps/course_wiki/views.py index 47112fc1d3..a088f8fc14 100644 --- a/lms/djangoapps/course_wiki/views.py +++ b/lms/djangoapps/course_wiki/views.py @@ -12,6 +12,7 @@ from courseware.courses import get_course_by_id log = logging.getLogger(__name__) + def root_create(request): """ In the edX wiki, we don't show the root_create view. Instead, we @@ -28,7 +29,7 @@ def course_wiki_redirect(request, course_id): example, "/6.002x") to keep things simple. """ course = get_course_by_id(course_id) - + course_slug = course.wiki_slug @@ -43,7 +44,7 @@ def course_wiki_redirect(request, course_id): except: pass - + valid_slug = True if not course_slug: log.exception("This course is improperly configured. The slug cannot be empty.") @@ -54,8 +55,8 @@ def course_wiki_redirect(request, course_id): if not valid_slug: return redirect("wiki:get", path="") - - + + # The wiki needs a Site object created. We make sure it exists here try: site = Site.objects.get_current() @@ -66,30 +67,30 @@ def course_wiki_redirect(request, course_id): new_site.save() if str(new_site.id) != str(settings.SITE_ID): raise ImproperlyConfigured("No site object was created and the SITE_ID doesn't match the newly created one. " + str(new_site.id) + "!=" + str(settings.SITE_ID)) - + try: urlpath = URLPath.get_by_path(course_slug, select_related=True) - - results = list( Article.objects.filter( id = urlpath.article.id ) ) + + results = list(Article.objects.filter(id=urlpath.article.id)) if results: article = results[0] else: article = None - + except (NoRootURL, URLPath.DoesNotExist): # We will create it in the next block urlpath = None article = None - + if not article: # create it root = get_or_create_root() - + if urlpath: # Somehow we got a urlpath without an article. Just delete it and # recerate it. urlpath.delete() - + urlpath = URLPath.create_article( root, course_slug, @@ -105,9 +106,9 @@ def course_wiki_redirect(request, course_id): 'other_read': True, 'other_write': True, }) - + return redirect("wiki:get", path=urlpath.path) - + def get_or_create_root(): """ @@ -121,12 +122,12 @@ def get_or_create_root(): return root except NoRootURL: pass - + starting_content = "\n".join(( "Welcome to the edX Wiki", "===", "Visit a course wiki to add an article.")) - + root = URLPath.create_root(title="Wiki", content=starting_content) article = root.article @@ -136,6 +137,5 @@ def get_or_create_root(): article.other_read = True article.other_write = False article.save() - + return root - diff --git a/lms/djangoapps/courseware/access.py b/lms/djangoapps/courseware/access.py index 475a708254..b41d231011 100644 --- a/lms/djangoapps/courseware/access.py +++ b/lms/djangoapps/courseware/access.py @@ -186,9 +186,9 @@ def _get_access_group_name_course_desc(course, action): ''' Return name of group which gives staff access to course. Only understands action = 'staff' and 'instructor' ''' - if action=='staff': + if action == 'staff': return _course_staff_group_name(course.location) - elif action=='instructor': + elif action == 'instructor': return _course_instructor_group_name(course.location) return [] @@ -367,6 +367,7 @@ def _course_staff_group_name(location, course_context=None): return 'staff_%s' % course_id + def course_beta_test_group_name(location): """ Get the name of the beta tester group for a location. Right now, that's @@ -462,6 +463,7 @@ def _adjust_start_date_for_beta_testers(user, descriptor): return descriptor.start + def _has_instructor_access_to_location(user, location, course_context=None): return _has_access_to_location(user, location, 'instructor', course_context) diff --git a/lms/djangoapps/courseware/admin.py b/lms/djangoapps/courseware/admin.py index f7e54d1800..9ef4c1de20 100644 --- a/lms/djangoapps/courseware/admin.py +++ b/lms/djangoapps/courseware/admin.py @@ -11,4 +11,3 @@ admin.site.register(StudentModule) admin.site.register(OfflineComputedGrade) admin.site.register(OfflineComputedGradeLog) - diff --git a/lms/djangoapps/courseware/courses.py b/lms/djangoapps/courseware/courses.py index ce29d69784..52346d7583 100644 --- a/lms/djangoapps/courseware/courses.py +++ b/lms/djangoapps/courseware/courses.py @@ -27,6 +27,7 @@ from xmodule.modulestore.exceptions import ItemNotFoundError log = logging.getLogger(__name__) + def get_request_for_thread(): """Walk up the stack, return the nearest first argument named "request".""" frame = None @@ -152,7 +153,7 @@ def get_course_about_section(course, section_key): request = get_request_for_thread() loc = course.location._replace(category='about', name=section_key) - course_module = get_module(request.user, request, loc, None, course.id, not_found_ok = True, wrap_xmodule_display = False) + course_module = get_module(request.user, request, loc, None, course.id, not_found_ok=True, wrap_xmodule_display=False) html = '' @@ -190,7 +191,7 @@ def get_course_info_section(request, cache, course, section_key): loc = Location(course.location.tag, course.location.org, course.location.course, 'course_info', section_key) - course_module = get_module(request.user, request, loc, cache, course.id, wrap_xmodule_display = False) + course_module = get_module(request.user, request, loc, cache, course.id, wrap_xmodule_display=False) html = '' if course_module is not None: @@ -259,7 +260,7 @@ def get_courses(user, domain=None): courses = branding.get_visible_courses(domain) courses = [c for c in courses if has_access(user, c, 'see_exists')] - courses = sorted(courses, key=lambda course:course.number) + courses = sorted(courses, key=lambda course: course.number) return courses diff --git a/lms/djangoapps/courseware/features/courses.py b/lms/djangoapps/courseware/features/courses.py index aecaa139ff..9b1316b00d 100644 --- a/lms/djangoapps/courseware/features/courses.py +++ b/lms/djangoapps/courseware/features/courses.py @@ -8,6 +8,8 @@ from logging import getLogger logger = getLogger(__name__) ## support functions + + def get_courses(): ''' Returns dict of lists of courses available, keyed by course.org (ie university). @@ -41,6 +43,7 @@ def get_courses(): # courseware = [ {'chapter_name':c.display_name, 'sections':[s.display_name for s in c.get_children()]} for c in chapters] # return courseware + def get_courseware_with_tabs(course_id): """ Given a course_id (string), return a courseware array of dictionaries for the @@ -101,18 +104,19 @@ def get_courseware_with_tabs(course_id): """ course = get_course_by_id(course_id) - chapters = [ chapter for chapter in course.get_children() if chapter.metadata.get('hide_from_toc','false').lower() != 'true' ] - courseware = [{'chapter_name':c.display_name, - 'sections':[{'section_name':s.display_name, - 'clickable_tab_count':len(s.get_children()) if (type(s)==seq_module.SequenceDescriptor) else 0, - 'tabs':[{'children_count':len(t.get_children()) if (type(t)==vertical_module.VerticalDescriptor) else 0, - 'class':t.__class__.__name__ } - for t in s.get_children() ]} + chapters = [chapter for chapter in course.get_children() if chapter.metadata.get('hide_from_toc', 'false').lower() != 'true'] + courseware = [{'chapter_name': c.display_name, + 'sections': [{'section_name': s.display_name, + 'clickable_tab_count': len(s.get_children()) if (type(s) == seq_module.SequenceDescriptor) else 0, + 'tabs': [{'children_count': len(t.get_children()) if (type(t) == vertical_module.VerticalDescriptor) else 0, + 'class': t.__class__.__name__} + for t in s.get_children()]} for s in c.get_children() if s.metadata.get('hide_from_toc', 'false').lower() != 'true']} - for c in chapters ] + for c in chapters] return courseware + def process_section(element, num_tabs=0): ''' Process section reads through whatever is in 'course-content' and classifies it according to sequence module type. diff --git a/lms/djangoapps/courseware/features/courseware.py b/lms/djangoapps/courseware/features/courseware.py index 05ecd63f4b..7e99cc9f55 100644 --- a/lms/djangoapps/courseware/features/courseware.py +++ b/lms/djangoapps/courseware/features/courseware.py @@ -1,7 +1,8 @@ from lettuce import world, step from lettuce.django import django_url + @step('I visit the courseware URL$') def i_visit_the_course_info_url(step): url = django_url('/courses/MITx/6.002x/2012_Fall/courseware') - world.browser.visit(url) \ No newline at end of file + world.browser.visit(url) diff --git a/lms/djangoapps/courseware/features/courseware_common.py b/lms/djangoapps/courseware/features/courseware_common.py index 8850c88fef..5ee21da906 100644 --- a/lms/djangoapps/courseware/features/courseware_common.py +++ b/lms/djangoapps/courseware/features/courseware_common.py @@ -1,36 +1,43 @@ from lettuce import world, step from lettuce.django import django_url + @step('I click on View Courseware') def i_click_on_view_courseware(step): css = 'p.enter-course' world.browser.find_by_css(css).first.click() + @step('I click on the "([^"]*)" tab$') def i_click_on_the_tab(step, tab): world.browser.find_link_by_text(tab).first.click() world.save_the_html() + @step('I visit the courseware URL$') def i_visit_the_course_info_url(step): url = django_url('/courses/MITx/6.002x/2012_Fall/courseware') world.browser.visit(url) + @step(u'I do not see "([^"]*)" anywhere on the page') def i_do_not_see_text_anywhere_on_the_page(step, text): - assert world.browser.is_text_not_present(text) + assert world.browser.is_text_not_present(text) + @step(u'I am on the dashboard page$') def i_am_on_the_dashboard_page(step): assert world.browser.is_element_present_by_css('section.courses') assert world.browser.url == django_url('/dashboard') + @step('the "([^"]*)" tab is active$') def the_tab_is_active(step, tab): css = '.course-tabs a.active' active_tab = world.browser.find_by_css(css) assert (active_tab.text == tab) + @step('the login dialog is visible$') def login_dialog_visible(step): css = 'form#login_form.login_form' diff --git a/lms/djangoapps/courseware/features/openended.py b/lms/djangoapps/courseware/features/openended.py index d37f9a0fae..0725a051ff 100644 --- a/lms/djangoapps/courseware/features/openended.py +++ b/lms/djangoapps/courseware/features/openended.py @@ -4,29 +4,33 @@ from nose.tools import assert_equals, assert_in from logging import getLogger logger = getLogger(__name__) + @step('I navigate to an openended question$') def navigate_to_an_openended_question(step): world.register_by_course_id('MITx/3.091x/2012_Fall') - world.log_in('robot@edx.org','test') + world.log_in('robot@edx.org', 'test') problem = '/courses/MITx/3.091x/2012_Fall/courseware/Week_10/Polymer_Synthesis/' world.browser.visit(django_url(problem)) tab_css = 'ol#sequence-list > li > a[data-element="5"]' world.browser.find_by_css(tab_css).click() + @step('I navigate to an openended question as staff$') def navigate_to_an_openended_question_as_staff(step): world.register_by_course_id('MITx/3.091x/2012_Fall', True) - world.log_in('robot@edx.org','test') + world.log_in('robot@edx.org', 'test') problem = '/courses/MITx/3.091x/2012_Fall/courseware/Week_10/Polymer_Synthesis/' world.browser.visit(django_url(problem)) tab_css = 'ol#sequence-list > li > a[data-element="5"]' world.browser.find_by_css(tab_css).click() + @step(u'I enter the answer "([^"]*)"$') def enter_the_answer_text(step, text): textarea_css = 'textarea' world.browser.find_by_css(textarea_css).first.fill(text) + @step(u'I submit the answer "([^"]*)"$') def i_submit_the_answer_text(step, text): textarea_css = 'textarea' @@ -34,53 +38,62 @@ def i_submit_the_answer_text(step, text): check_css = 'input.check' world.browser.find_by_css(check_css).click() + @step('I click the link for full output$') def click_full_output_link(step): link_css = 'a.full' world.browser.find_by_css(link_css).first.click() + @step(u'I visit the staff grading page$') def i_visit_the_staff_grading_page(step): # course_u = '/courses/MITx/3.091x/2012_Fall' # sg_url = '%s/staff_grading' % course_u world.browser.click_link_by_text('Instructor') - world.browser.click_link_by_text('Staff grading') + world.browser.click_link_by_text('Staff grading') # world.browser.visit(django_url(sg_url)) + @step(u'I see the grader message "([^"]*)"$') def see_grader_message(step, msg): message_css = 'div.external-grader-message' grader_msg = world.browser.find_by_css(message_css).text assert_in(msg, grader_msg) + @step(u'I see the grader status "([^"]*)"$') def see_the_grader_status(step, status): status_css = 'div.grader-status' grader_status = world.browser.find_by_css(status_css).text assert_equals(status, grader_status) + @step('I see the red X$') def see_the_red_x(step): x_css = 'div.grader-status > span.incorrect' assert world.browser.find_by_css(x_css) + @step(u'I see the grader score "([^"]*)"$') def see_the_grader_score(step, score): score_css = 'div.result-output > p' score_text = world.browser.find_by_css(score_css).text assert_equals(score_text, 'Score: %s' % score) + @step('I see the link for full output$') def see_full_output_link(step): link_css = 'a.full' assert world.browser.find_by_css(link_css) + @step('I see the spelling grading message "([^"]*)"$') def see_spelling_msg(step, msg): spelling_css = 'div.spelling' - spelling_msg = world.browser.find_by_css(spelling_css).text + spelling_msg = world.browser.find_by_css(spelling_css).text assert_equals('Spelling: %s' % msg, spelling_msg) + @step(u'my answer is queued for instructor grading$') def answer_is_queued_for_instructor_grading(step): list_css = 'ul.problem-list > li > a' diff --git a/lms/djangoapps/courseware/features/smart-accordion.py b/lms/djangoapps/courseware/features/smart-accordion.py index 95d3396f57..7c4770d632 100644 --- a/lms/djangoapps/courseware/features/smart-accordion.py +++ b/lms/djangoapps/courseware/features/smart-accordion.py @@ -7,6 +7,7 @@ from courses import * from logging import getLogger logger = getLogger(__name__) + def check_for_errors(): e = world.browser.find_by_css('.outside-app') if len(e) > 0: @@ -14,6 +15,7 @@ def check_for_errors(): else: assert True + @step(u'I verify all the content of each course') def i_verify_all_the_content_of_each_course(step): all_possible_courses = get_courses() @@ -34,11 +36,11 @@ def i_verify_all_the_content_of_each_course(step): check_for_errors() # Get the course. E.g. 'MITx/6.002x/2012_Fall' - current_course = sub('/info','', sub('.*/courses/', '', world.browser.url)) - validate_course(current_course,ids) + current_course = sub('/info', '', sub('.*/courses/', '', world.browser.url)) + validate_course(current_course, ids) world.browser.find_link_by_text('Courseware').click() - assert world.browser.is_element_present_by_id('accordion',wait_time=2) + assert world.browser.is_element_present_by_id('accordion', wait_time=2) check_for_errors() browse_course(current_course) @@ -46,6 +48,7 @@ def i_verify_all_the_content_of_each_course(step): world.browser.find_by_css('.user-link').click() check_for_errors() + def browse_course(course_id): ## count chapters from xml and page and compare @@ -91,7 +94,7 @@ def browse_course(course_id): world.browser.find_by_css('#accordion > nav > div')[chapter_it].find_by_tag('li')[section_it].find_by_tag('a').click() ## sometimes the course-content takes a long time to load - assert world.browser.is_element_present_by_css('.course-content',wait_time=5) + assert world.browser.is_element_present_by_css('.course-content', wait_time=5) ## look for server error div check_for_errors() @@ -108,7 +111,7 @@ def browse_course(course_id): rendered_tabs = 0 num_rendered_tabs = 0 - msg = ('%d tabs expected, %d tabs found, %s - %d - %s' % + msg = ('%d tabs expected, %d tabs found, %s - %d - %s' % (num_tabs, num_rendered_tabs, course_id, section_it, sections[section_it]['section_name'])) #logger.debug(msg) @@ -132,7 +135,7 @@ def browse_course(course_id): tab_class = tabs[tab_it]['class'] if tab_children != 0: rendered_items = world.browser.find_by_css('div#seq_content > section > ol > li > section') - num_rendered_items = len(rendered_items) + num_rendered_items = len(rendered_items) msg = ('%d items expected, %d items found, %s - %d - %s - tab %d' % (tab_children, num_rendered_items, course_id, section_it, sections[section_it]['section_name'], tab_it)) #logger.debug(msg) diff --git a/lms/djangoapps/courseware/grades.py b/lms/djangoapps/courseware/grades.py index f532e6c530..62dd656fe1 100644 --- a/lms/djangoapps/courseware/grades.py +++ b/lms/djangoapps/courseware/grades.py @@ -18,15 +18,17 @@ from models import StudentModule log = logging.getLogger("mitx.courseware") + def yield_module_descendents(module): stack = module.get_display_items() stack.reverse() while len(stack) > 0: next_module = stack.pop() - stack.extend( next_module.get_display_items() ) + stack.extend(next_module.get_display_items()) yield next_module + def yield_dynamic_descriptor_descendents(descriptor, module_creator): """ This returns all of the descendants of a descriptor. If the descriptor @@ -39,15 +41,15 @@ def yield_dynamic_descriptor_descendents(descriptor, module_creator): return module.get_child_descriptors() else: return descriptor.get_children() - - + + stack = [descriptor] while len(stack) > 0: next_descriptor = stack.pop() - stack.extend( get_dynamic_descriptor_children(next_descriptor) ) + stack.extend(get_dynamic_descriptor_children(next_descriptor)) yield next_descriptor - + def yield_problems(request, course, student): """ @@ -88,6 +90,7 @@ def yield_problems(request, course, student): if isinstance(problem, CapaModule): yield problem + def answer_distributions(request, course): """ Given a course_descriptor, compute frequencies of answers for each problem: @@ -150,7 +153,7 @@ def grade(student, request, course, student_module_cache=None, keep_raw_scores=F section_name = section_descriptor.metadata.get('display_name') should_grade_section = False - # If we haven't seen a single problem in the section, we don't have to grade it at all! We can assume 0% + # If we haven't seen a single problem in the section, we don't have to grade it at all! We can assume 0% for moduledescriptor in section['xmoduledescriptors']: if student_module_cache.lookup( course.id, moduledescriptor.category, moduledescriptor.location.url()): @@ -159,20 +162,20 @@ def grade(student, request, course, student_module_cache=None, keep_raw_scores=F if should_grade_section: scores = [] - + def create_module(descriptor): # TODO: We need the request to pass into here. If we could forgo that, our arguments # would be simpler - return get_module(student, request, descriptor.location, + return get_module(student, request, descriptor.location, student_module_cache, course.id) - + for module_descriptor in yield_dynamic_descriptor_descendents(section_descriptor, create_module): - + (correct, total) = get_score(course.id, student, module_descriptor, create_module, student_module_cache) if correct is None and total is None: continue - if settings.GENERATE_PROFILE_SCORES: # for debugging! + if settings.GENERATE_PROFILE_SCORES: # for debugging! if total > 1: correct = random.randrange(max(total - 2, 1), total + 1) else: @@ -208,12 +211,13 @@ def grade(student, request, course, student_module_cache=None, keep_raw_scores=F letter_grade = grade_for_percentage(course.grade_cutoffs, grade_summary['percent']) grade_summary['grade'] = letter_grade - grade_summary['totaled_scores'] = totaled_scores # make this available, eg for instructor download & debugging + grade_summary['totaled_scores'] = totaled_scores # make this available, eg for instructor download & debugging if keep_raw_scores: grade_summary['raw_scores'] = raw_scores # way to get all RAW scores out to instructor # so grader can be double-checked return grade_summary + def grade_for_percentage(grade_cutoffs, percentage): """ Returns a letter grade as defined in grading_policy (e.g. 'A' 'B' 'C' for 6.002x) or None. @@ -225,7 +229,7 @@ def grade_for_percentage(grade_cutoffs, percentage): """ letter_grade = None - + # Possible grades, sorted in descending order of score descending_grades = sorted(grade_cutoffs, key=lambda x: grade_cutoffs[x], reverse=True) for possible_grade in descending_grades: @@ -255,13 +259,13 @@ def progress_summary(student, request, course, student_module_cache): course: A Descriptor containing the course to grade student_module_cache: A StudentModuleCache initialized with all instance_modules for the student - + If the student does not have access to load the course module, this function will return None. - + """ - - + + # TODO: We need the request to pass into here. If we could forgo that, our arguments # would be simpler course_module = get_module(student, request, @@ -270,30 +274,30 @@ def progress_summary(student, request, course, student_module_cache): if not course_module: # This student must not have access to the course. return None - + chapters = [] # Don't include chapters that aren't displayable (e.g. due to error) for chapter_module in course_module.get_display_items(): # Skip if the chapter is hidden - hidden = chapter_module.metadata.get('hide_from_toc','false') + hidden = chapter_module.metadata.get('hide_from_toc', 'false') if hidden.lower() == 'true': continue - + sections = [] for section_module in chapter_module.get_display_items(): # Skip if the section is hidden - hidden = section_module.metadata.get('hide_from_toc','false') + hidden = section_module.metadata.get('hide_from_toc', 'false') if hidden.lower() == 'true': continue - + # Same for sections graded = section_module.metadata.get('graded', False) scores = [] - + module_creator = section_module.system.get_module - + for module_descriptor in yield_dynamic_descriptor_descendents(section_module.descriptor, module_creator): - + course_id = course.id (correct, total) = get_score(course_id, student, module_descriptor, module_creator, student_module_cache) if correct is None and total is None: diff --git a/lms/djangoapps/courseware/management/commands/clean_xml.py b/lms/djangoapps/courseware/management/commands/clean_xml.py index 425dd156c1..1989361b85 100644 --- a/lms/djangoapps/courseware/management/commands/clean_xml.py +++ b/lms/djangoapps/courseware/management/commands/clean_xml.py @@ -12,6 +12,7 @@ from django.core.management.base import BaseCommand from xmodule.modulestore.xml import XMLModuleStore from xmodule.errortracker import make_error_tracker + def traverse_tree(course): '''Load every descriptor in course. Return bool success value.''' queue = [course] diff --git a/lms/djangoapps/courseware/management/commands/metadata_to_json.py b/lms/djangoapps/courseware/management/commands/metadata_to_json.py index 8ef0dee7b3..b80736f693 100644 --- a/lms/djangoapps/courseware/management/commands/metadata_to_json.py +++ b/lms/djangoapps/courseware/management/commands/metadata_to_json.py @@ -14,6 +14,7 @@ from django.core.management.base import BaseCommand from xmodule.modulestore.xml import XMLModuleStore from xmodule.x_module import policy_key + def import_course(course_dir, verbose=True): course_dir = path(course_dir) data_dir = course_dir.dirname() @@ -44,6 +45,7 @@ def import_course(course_dir, verbose=True): return course + def node_metadata(node): # make a copy to_export = ('format', 'display_name', @@ -55,6 +57,7 @@ def node_metadata(node): d = {k: orig[k] for k in to_export if k in orig} return d + def get_metadata(course): d = OrderedDict({}) queue = [course] diff --git a/lms/djangoapps/courseware/migrations/0005_auto__add_offlinecomputedgrade__add_unique_offlinecomputedgrade_user_c.py b/lms/djangoapps/courseware/migrations/0005_auto__add_offlinecomputedgrade__add_unique_offlinecomputedgrade_user_c.py index 674f97cec8..4c21d22937 100644 --- a/lms/djangoapps/courseware/migrations/0005_auto__add_offlinecomputedgrade__add_unique_offlinecomputedgrade_user_c.py +++ b/lms/djangoapps/courseware/migrations/0005_auto__add_offlinecomputedgrade__add_unique_offlinecomputedgrade_user_c.py @@ -114,4 +114,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['courseware'] \ No newline at end of file + complete_apps = ['courseware'] diff --git a/lms/djangoapps/courseware/models.py b/lms/djangoapps/courseware/models.py index bd01318f63..93a4beaafd 100644 --- a/lms/djangoapps/courseware/models.py +++ b/lms/djangoapps/courseware/models.py @@ -113,7 +113,7 @@ class StudentModuleCache(object): descriptor_filter=lambda descriptor: True, select_for_update=False): """ - obtain and return cache for descriptor descendents (ie children) AND modules required by the descriptor, + obtain and return cache for descriptor descendents (ie children) AND modules required by the descriptor, but which are not children of the module course_id: the course in the context of which we want StudentModules. @@ -212,7 +212,7 @@ class OfflineComputedGradeLog(models.Model): course_id = models.CharField(max_length=255, db_index=True) created = models.DateTimeField(auto_now_add=True, null=True, db_index=True) - seconds = models.IntegerField(default=0) # seconds elapsed for computation + seconds = models.IntegerField(default=0) # seconds elapsed for computation nstudents = models.IntegerField(default=0) def __unicode__(self): diff --git a/lms/djangoapps/courseware/module_render.py b/lms/djangoapps/courseware/module_render.py index b19796b357..ded84a971e 100644 --- a/lms/djangoapps/courseware/module_render.py +++ b/lms/djangoapps/courseware/module_render.py @@ -91,7 +91,7 @@ def toc_for_course(user, request, course, active_chapter, active_section): chapters = list() for chapter in course_module.get_display_items(): - hide_from_toc = chapter.metadata.get('hide_from_toc','false').lower() == 'true' + hide_from_toc = chapter.metadata.get('hide_from_toc', 'false').lower() == 'true' if hide_from_toc: continue @@ -166,6 +166,7 @@ def get_module_for_descriptor(user, request, descriptor, student_module_cache, c return _get_module(user, request, descriptor, student_module_cache, course_id, position=position, wrap_xmodule_display=wrap_xmodule_display) + def _get_module(user, request, descriptor, student_module_cache, course_id, position=None, wrap_xmodule_display=True): """ @@ -287,7 +288,7 @@ def _get_module(user, request, descriptor, student_module_cache, course_id, module.get_html = replace_static_urls( _get_html, module.metadata.get('data_dir', ''), - course_namespace = module.location._replace(category=None, name=None)) + course_namespace=module.location._replace(category=None, name=None)) # Allow URLs of the form '/course/' refer to the root of multicourse directory # hierarchy of this course @@ -300,6 +301,8 @@ def _get_module(user, request, descriptor, student_module_cache, course_id, return module # TODO (vshnayder): Rename this? It's very confusing. + + def get_instance_module(course_id, user, module, student_module_cache): """ Returns the StudentModule specific to this module for this student, @@ -329,6 +332,7 @@ def get_instance_module(course_id, user, module, student_module_cache): else: return None + def get_shared_instance_module(course_id, user, module, student_module_cache): """ Return shared_module is a StudentModule specific to all modules with the same @@ -359,6 +363,7 @@ def get_shared_instance_module(course_id, user, module, student_module_cache): else: return None + @csrf_exempt def xqueue_callback(request, course_id, userid, id, dispatch): ''' @@ -415,8 +420,8 @@ def xqueue_callback(request, course_id, userid, id, dispatch): instance_module.save() #Bin score into range and increment stats - score_bucket=get_score_bucket(instance_module.grade, instance_module.max_grade) - org, course_num, run=course_id.split("/") + score_bucket = get_score_bucket(instance_module.grade, instance_module.max_grade) + org, course_num, run = course_id.split("/") statsd.increment("lms.courseware.question_answered", tags=["org:{0}".format(org), "course:{0}".format(course_num), @@ -456,9 +461,9 @@ def modx_dispatch(request, dispatch, location, course_id): return HttpResponse(json.dumps({'success': too_many_files_msg})) for inputfile in inputfiles: - if inputfile.size > settings.STUDENT_FILEUPLOAD_MAX_SIZE: # Bytes + if inputfile.size > settings.STUDENT_FILEUPLOAD_MAX_SIZE: # Bytes file_too_big_msg = 'Submission aborted! Your file "%s" is too large (max size: %d MB)' %\ - (inputfile.name, settings.STUDENT_FILEUPLOAD_MAX_SIZE/(1000**2)) + (inputfile.name, settings.STUDENT_FILEUPLOAD_MAX_SIZE / (1000 ** 2)) return HttpResponse(json.dumps({'success': file_too_big_msg})) p[fileinput_id] = inputfiles @@ -499,7 +504,7 @@ def modx_dispatch(request, dispatch, location, course_id): # Don't track state for anonymous users (who don't have student modules) if instance_module is not None: instance_module.state = instance.get_instance_state() - instance_module.max_grade=instance.max_score() + instance_module.max_grade = instance.max_score() if instance.get_score(): instance_module.grade = instance.get_score()['score'] if (instance_module.grade != oldgrade or @@ -508,8 +513,8 @@ def modx_dispatch(request, dispatch, location, course_id): instance_module.save() #Bin score into range and increment stats - score_bucket=get_score_bucket(instance_module.grade, instance_module.max_grade) - org, course_num, run=course_id.split("/") + score_bucket = get_score_bucket(instance_module.grade, instance_module.max_grade) + org, course_num, run = course_id.split("/") statsd.increment("lms.courseware.question_answered", tags=["org:{0}".format(org), "course:{0}".format(course_num), @@ -526,6 +531,7 @@ def modx_dispatch(request, dispatch, location, course_id): # Return whatever the module wanted to return to the client/caller return HttpResponse(ajax_return) + def preview_chemcalc(request): """ Render an html preview of a chemical formula or equation. The fact that @@ -544,7 +550,7 @@ def preview_chemcalc(request): raise Http404 result = {'preview': '', - 'error': '' } + 'error': ''} formula = request.GET.get('formula') if formula is None: result['error'] = "No formula specified." @@ -563,17 +569,15 @@ def preview_chemcalc(request): return HttpResponse(json.dumps(result)) -def get_score_bucket(grade,max_grade): +def get_score_bucket(grade, max_grade): """ Function to split arbitrary score ranges into 3 buckets. Used with statsd tracking. """ - score_bucket="incorrect" - if(grade>0 and grade 0 and grade < max_grade): + score_bucket = "partial" + elif(grade == max_grade): + score_bucket = "correct" return score_bucket - - diff --git a/lms/djangoapps/courseware/tabs.py b/lms/djangoapps/courseware/tabs.py index 4f5a881d97..a47141b183 100644 --- a/lms/djangoapps/courseware/tabs.py +++ b/lms/djangoapps/courseware/tabs.py @@ -33,6 +33,7 @@ from open_ended_grading import open_ended_notifications log = logging.getLogger(__name__) + class InvalidTabsException(Exception): """ A complaint about invalid tabs. @@ -41,6 +42,7 @@ class InvalidTabsException(Exception): CourseTabBase = namedtuple('CourseTab', 'name link is_active has_img img') + def CourseTab(name, link, is_active, has_img=False, img=""): return CourseTabBase(name, link, is_active, has_img, img) @@ -64,22 +66,26 @@ def _courseware(tab, user, course, active_page): link = reverse('courseware', args=[course.id]) return [CourseTab('Courseware', link, active_page == "courseware")] + def _course_info(tab, user, course, active_page): link = reverse('info', args=[course.id]) return [CourseTab(tab['name'], link, active_page == "info")] + def _progress(tab, user, course, active_page): if user.is_authenticated(): link = reverse('progress', args=[course.id]) return [CourseTab(tab['name'], link, active_page == "progress")] return [] + def _wiki(tab, user, course, active_page): if settings.WIKI_ENABLED: link = reverse('course_wiki', args=[course.id]) return [CourseTab(tab['name'], link, active_page == 'wiki')] return [] + def _discussion(tab, user, course, active_page): """ This tab format only supports the new Berkeley discussion forums. @@ -87,17 +93,19 @@ def _discussion(tab, user, course, active_page): if settings.MITX_FEATURES.get('ENABLE_DISCUSSION_SERVICE'): link = reverse('django_comment_client.forum.views.forum_form_discussion', args=[course.id]) - return [CourseTab(tab['name'], link, active_page=='discussion')] + return [CourseTab(tab['name'], link, active_page == 'discussion')] return [] + def _external_link(tab, user, course, active_page): # external links are never active return [CourseTab(tab['name'], tab['link'], False)] + def _static_tab(tab, user, course, active_page): link = reverse('static_tab', args=[course.id, tab['url_slug']]) active_str = 'static_tab_{0}'.format(tab['url_slug']) - return [CourseTab(tab['name'], link, active_page==active_str)] + return [CourseTab(tab['name'], link, active_page == active_str)] def _textbooks(tab, user, course, active_page): @@ -107,7 +115,7 @@ def _textbooks(tab, user, course, active_page): if user.is_authenticated() and settings.MITX_FEATURES.get('ENABLE_TEXTBOOK'): # since there can be more than one textbook, active_page is e.g. "book/0". return [CourseTab(textbook.title, reverse('book', args=[course.id, index]), - active_page=="textbook/{0}".format(index)) + active_page == "textbook/{0}".format(index)) for index, textbook in enumerate(course.textbooks)] return [] @@ -126,6 +134,7 @@ def _staff_grading(tab, user, course, active_page): return tab return [] + def _peer_grading(tab, user, course, active_page): if user.is_authenticated(): @@ -140,6 +149,7 @@ def _peer_grading(tab, user, course, active_page): return tab return [] + def _combined_open_ended_grading(tab, user, course, active_page): if user.is_authenticated(): link = reverse('open_ended_notifications', args=[course.id]) @@ -171,6 +181,7 @@ def key_checker(expected_keys): need_name = key_checker(['name']) + def null_validator(d): """ Don't check anything--use for tabs that don't need any params. (e.g. textbook) @@ -235,7 +246,7 @@ def get_course_tabs(user, course, active_page): """ Return the tabs to show a particular user, as a list of CourseTab items. """ - if not hasattr(course,'tabs') or not course.tabs: + if not hasattr(course, 'tabs') or not course.tabs: return get_default_tabs(user, course, active_page) # TODO (vshnayder): There needs to be a place to call this right after course @@ -269,7 +280,7 @@ def get_default_tabs(user, course, active_page): if hasattr(course, 'syllabus_present') and course.syllabus_present: link = reverse('syllabus', args=[course.id]) - tabs.append(CourseTab('Syllabus', link, active_page=='syllabus')) + tabs.append(CourseTab('Syllabus', link, active_page == 'syllabus')) tabs.extend(_textbooks({}, user, course, active_page)) @@ -290,10 +301,11 @@ def get_default_tabs(user, course, active_page): if has_access(user, course, 'staff'): link = reverse('instructor_dashboard', args=[course.id]) - tabs.append(CourseTab('Instructor', link, active_page=='instructor')) + tabs.append(CourseTab('Instructor', link, active_page == 'instructor')) return tabs + def get_static_tab_by_slug(course, tab_slug): """ Look for a tab with type 'static_tab' and the specified 'tab_slug'. Returns @@ -308,6 +320,7 @@ def get_static_tab_by_slug(course, tab_slug): return None + def get_static_tab_contents(request, cache, course, tab): loc = Location(course.location.tag, course.location.org, course.location.course, 'static_tab', tab['url_slug']) diff --git a/lms/djangoapps/courseware/tests/__init__.py b/lms/djangoapps/courseware/tests/__init__.py index 8b13789179..e69de29bb2 100644 --- a/lms/djangoapps/courseware/tests/__init__.py +++ b/lms/djangoapps/courseware/tests/__init__.py @@ -1 +0,0 @@ - diff --git a/lms/djangoapps/courseware/tests/factories.py b/lms/djangoapps/courseware/tests/factories.py index 6950e28565..a84b2b8475 100644 --- a/lms/djangoapps/courseware/tests/factories.py +++ b/lms/djangoapps/courseware/tests/factories.py @@ -5,6 +5,7 @@ from django.contrib.auth.models import Group from datetime import datetime import uuid + class UserProfileFactory(factory.Factory): FACTORY_FOR = UserProfile @@ -12,12 +13,14 @@ class UserProfileFactory(factory.Factory): name = 'Robot Studio' courseware = 'course.xml' + class RegistrationFactory(factory.Factory): FACTORY_FOR = Registration user = None activation_key = uuid.uuid4().hex + class UserFactory(factory.Factory): FACTORY_FOR = User @@ -32,11 +35,13 @@ class UserFactory(factory.Factory): last_login = datetime.now() date_joined = datetime.now() + class GroupFactory(factory.Factory): FACTORY_FOR = Group name = 'test_group' + class CourseEnrollmentAllowedFactory(factory.Factory): FACTORY_FOR = CourseEnrollmentAllowed diff --git a/lms/djangoapps/courseware/tests/test_access.py b/lms/djangoapps/courseware/tests/test_access.py index ed9335d382..c0b28e7803 100644 --- a/lms/djangoapps/courseware/tests/test_access.py +++ b/lms/djangoapps/courseware/tests/test_access.py @@ -3,10 +3,11 @@ import time from mock import Mock from django.test import TestCase -from xmodule.modulestore import Location +from xmodule.modulestore import Location from factories import CourseEnrollmentAllowedFactory import courseware.access as access + class AccessTestCase(TestCase): def test__has_global_staff_access(self): u = Mock(is_staff=False) @@ -44,13 +45,13 @@ class AccessTestCase(TestCase): self.assertTrue(access._has_access_to_location(u, location, 'instructor', None)) - # A user does not have staff access if they are + # A user does not have staff access if they are # not in either the staff or the the instructor group g.name = 'student_only' self.assertFalse(access._has_access_to_location(u, location, 'staff', None)) - # A user does not have instructor access if they are + # A user does not have instructor access if they are # not in the instructor group g.name = 'student_only' self.assertFalse(access._has_access_to_location(u, location, @@ -69,7 +70,7 @@ class AccessTestCase(TestCase): # TODO: override DISABLE_START_DATES and test the start date branch of the method u = Mock() d = Mock() - d.start = time.gmtime(time.time() - 86400) # make sure the start time is in the past + d.start = time.gmtime(time.time() - 86400) # make sure the start time is in the past # Always returns true because DISABLE_START_DATES is set in test.py self.assertTrue(access._has_access_descriptor(u, d, 'load')) @@ -105,5 +106,5 @@ class AccessTestCase(TestCase): c.metadata.get = 'is_public' self.assertTrue(access._has_access_course_desc(u, c, 'enroll')) - # TODO: + # TODO: # Non-staff cannot enroll outside the open enrollment period if not specifically allowed diff --git a/lms/djangoapps/courseware/tests/tests.py b/lms/djangoapps/courseware/tests/tests.py index 6c41cbac14..efa5ad823e 100644 --- a/lms/djangoapps/courseware/tests/tests.py +++ b/lms/djangoapps/courseware/tests/tests.py @@ -31,6 +31,7 @@ from xmodule.modulestore.xml_importer import import_from_xml from xmodule.modulestore.xml import XMLModuleStore from xmodule.timeparse import stringify_time + def parse_json(response): """Parse response, which is assumed to be json""" return json.loads(response.content) @@ -49,6 +50,7 @@ def registration(email): # jump_to works with the xmlmodulestore or we have an even better solution # NOTE: this means this test requires mongo to be running. + def mongo_store_config(data_dir): return { 'default': { @@ -64,6 +66,7 @@ def mongo_store_config(data_dir): } } + def draft_mongo_store_config(data_dir): return { 'default': { @@ -79,6 +82,7 @@ def draft_mongo_store_config(data_dir): } } + def xml_store_config(data_dir): return { 'default': { @@ -95,6 +99,7 @@ TEST_DATA_XML_MODULESTORE = xml_store_config(TEST_DATA_DIR) TEST_DATA_MONGO_MODULESTORE = mongo_store_config(TEST_DATA_DIR) TEST_DATA_DRAFT_MONGO_MODULESTORE = draft_mongo_store_config(TEST_DATA_DIR) + class ActivateLoginTestCase(TestCase): '''Check that we can activate and log in''' @@ -286,13 +291,13 @@ class PageLoader(ActivateLoginTestCase): all_ok = False num_bad += 1 elif descriptor.location.category == 'static_tab': - resp = self.client.get(reverse('static_tab', kwargs={'course_id': course_id, 'tab_slug' : descriptor.location.name})) + resp = self.client.get(reverse('static_tab', kwargs={'course_id': course_id, 'tab_slug': descriptor.location.name})) msg = str(resp.status_code) if resp.status_code != 200: msg = "ERROR " + msg all_ok = False - num_bad += 1 + num_bad += 1 elif descriptor.location.category == 'course_info': resp = self.client.get(reverse('info', kwargs={'course_id': course_id})) msg = str(resp.status_code) @@ -300,7 +305,7 @@ class PageLoader(ActivateLoginTestCase): if resp.status_code != 200: msg = "ERROR " + msg all_ok = False - num_bad += 1 + num_bad += 1 elif descriptor.location.category == 'custom_tag_template': pass else: @@ -321,7 +326,7 @@ class PageLoader(ActivateLoginTestCase): # check content to make sure there were no rendering failures content = resp.content - if content.find("this module is temporarily unavailable")>=0: + if content.find("this module is temporarily unavailable") >= 0: msg = "ERROR unavailable module " all_ok = False num_bad += 1 @@ -335,7 +340,7 @@ class PageLoader(ActivateLoginTestCase): self.assertTrue(all_ok) # fail fast print "{0}/{1} good".format(n - num_bad, n) - log.info( "{0}/{1} good".format(n - num_bad, n)) + log.info("{0}/{1} good".format(n - num_bad, n)) self.assertTrue(all_ok) @@ -347,7 +352,7 @@ class TestCoursesLoadTestCase_XmlModulestore(PageLoader): def setUp(self): ActivateLoginTestCase.setUp(self) xmodule.modulestore.django._MODULESTORES = {} - + def test_toy_course_loads(self): module_store = XMLModuleStore( TEST_DATA_DIR, @@ -376,7 +381,7 @@ class TestCoursesLoadTestCase_MongoModulestore(PageLoader): ActivateLoginTestCase.setUp(self) xmodule.modulestore.django._MODULESTORES = {} modulestore().collection.drop() - + def test_toy_course_loads(self): module_store = modulestore() import_from_xml(module_store, TEST_DATA_DIR, ['toy']) @@ -431,7 +436,7 @@ class TestNavigation(PageLoader): # Now we directly navigate to a section in a different chapter self.check_for_get_code(200, reverse('courseware_section', kwargs={'course_id': self.toy.id, - 'chapter':'secret:magic', 'section':'toyvideo'})) + 'chapter': 'secret:magic', 'section': 'toyvideo'})) # And now hitting the courseware tab should redirect to 'secret:magic' resp = self.client.get(reverse('courseware', kwargs={'course_id': self.toy.id})) @@ -565,7 +570,7 @@ class TestViewAuth(PageLoader): """Actually do the test, relying on settings to be right.""" # Make courses start in the future - tomorrow = time.time() + 24*3600 + tomorrow = time.time() + 24 * 3600 self.toy.metadata['start'] = stringify_time(time.gmtime(tomorrow)) self.full.metadata['start'] = stringify_time(time.gmtime(tomorrow)) @@ -603,7 +608,7 @@ class TestViewAuth(PageLoader): def instructor_urls(course): """list of urls that only instructors/staff should be able to see""" - urls = reverse_urls(['instructor_dashboard','gradebook','grade_summary'], + urls = reverse_urls(['instructor_dashboard', 'gradebook', 'grade_summary'], course) return urls @@ -770,7 +775,7 @@ class TestCourseGrader(PageLoader): def find_course(course_id): """Assumes the course is present""" - return [c for c in courses if c.id==course_id][0] + return [c for c in courses if c.id == course_id][0] self.graded_course = find_course("edX/graded/2012_Fall") @@ -825,17 +830,17 @@ class TestCourseGrader(PageLoader): modx_url = reverse('modx_dispatch', kwargs={ - 'course_id' : self.graded_course.id, - 'location' : problem_location, - 'dispatch' : 'problem_check', } + 'course_id': self.graded_course.id, + 'location': problem_location, + 'dispatch': 'problem_check', } ) resp = self.client.post(modx_url, { 'input_i4x-edX-graded-problem-{0}_2_1'.format(problem_url_name): responses[0], 'input_i4x-edX-graded-problem-{0}_2_2'.format(problem_url_name): responses[1], }) - print "modx_url" , modx_url, "responses" , responses - print "resp" , resp + print "modx_url", modx_url, "responses", responses + print "resp", resp return resp @@ -847,9 +852,9 @@ class TestCourseGrader(PageLoader): modx_url = reverse('modx_dispatch', kwargs={ - 'course_id' : self.graded_course.id, - 'location' : problem_location, - 'dispatch' : 'problem_reset', } + 'course_id': self.graded_course.id, + 'location': problem_location, + 'dispatch': 'problem_reset', } ) resp = self.client.post(modx_url) @@ -873,7 +878,7 @@ class TestCourseGrader(PageLoader): # Only get half of the first problem correct self.submit_question_answer('H1P1', ['Correct', 'Incorrect']) self.check_grade_percent(0.06) - self.assertEqual(earned_hw_scores(), [1.0, 0, 0]) # Order matters + self.assertEqual(earned_hw_scores(), [1.0, 0, 0]) # Order matters self.assertEqual(score_for_hw('Homework1'), [1.0, 0.0]) # Get both parts of the first problem correct @@ -905,14 +910,13 @@ class TestCourseGrader(PageLoader): # Third homework self.submit_question_answer('H3P1', ['Correct', 'Correct']) - self.check_grade_percent(0.42) # Score didn't change + self.check_grade_percent(0.42) # Score didn't change self.assertEqual(earned_hw_scores(), [4.0, 4.0, 2.0]) self.submit_question_answer('H3P2', ['Correct', 'Correct']) - self.check_grade_percent(0.5) # Now homework2 dropped. Score changes + self.check_grade_percent(0.5) # Now homework2 dropped. Score changes self.assertEqual(earned_hw_scores(), [4.0, 4.0, 4.0]) # Now we answer the final question (worth half of the grade) self.submit_question_answer('FinalQuestion', ['Correct', 'Correct']) - self.check_grade_percent(1.0) # Hooray! We got 100% - + self.check_grade_percent(1.0) # Hooray! We got 100% diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index 5d65d7c632..02a4b5f5f2 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -137,6 +137,7 @@ def redirect_to_course_position(course_module, first_time): 'chapter': chapter.url_name, 'section': section.url_name})) + def save_child_position(seq_module, child_name, instance_module): """ child_name: url_name of the child @@ -152,6 +153,7 @@ def save_child_position(seq_module, child_name, instance_module): instance_module.state = seq_module.get_instance_state() instance_module.save() + @login_required @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) @@ -184,7 +186,7 @@ def index(request, course_id, chapter=None, section=None, registered = registered_for_course(course, request.user) if not registered: # TODO (vshnayder): do course instructors need to be registered to see course? - log.debug('User %s tried to view course %s but is not enrolled' % (request.user,course.location.url())) + log.debug('User %s tried to view course %s but is not enrolled' % (request.user, course.location.url())) return redirect(reverse('about_course', args=[course.id])) try: @@ -212,7 +214,7 @@ def index(request, course_id, chapter=None, section=None, 'init': '', 'content': '', 'staff_access': staff_access, - 'xqa_server': settings.MITX_FEATURES.get('USE_XQA_SERVER','http://xqa:server@content-qa.mitx.mit.edu/xqa') + 'xqa_server': settings.MITX_FEATURES.get('USE_XQA_SERVER', 'http://xqa:server@content-qa.mitx.mit.edu/xqa') } chapter_descriptor = course.get_child_by(lambda m: m.url_name == chapter) @@ -288,7 +290,7 @@ def index(request, course_id, chapter=None, section=None, try: result = render_to_response('courseware/courseware-error.html', {'staff_access': staff_access, - 'course' : course}) + 'course': course}) except: # Let the exception propagate, relying on global config to at # at least return a nice error message @@ -297,6 +299,7 @@ def index(request, course_id, chapter=None, section=None, return result + @ensure_csrf_cookie def jump_to(request, course_id, location): ''' @@ -333,6 +336,7 @@ def jump_to(request, course_id, location): else: return redirect('courseware_position', course_id=course_id, chapter=chapter, section=section, position=position) + @ensure_csrf_cookie def course_info(request, course_id): """ @@ -343,9 +347,10 @@ def course_info(request, course_id): course = get_course_with_access(request.user, course_id, 'load') staff_access = has_access(request.user, course, 'staff') - return render_to_response('courseware/info.html', {'request' : request, 'course_id' : course_id, 'cache' : None, + return render_to_response('courseware/info.html', {'request': request, 'course_id': course_id, 'cache': None, 'course': course, 'staff_access': staff_access}) + @ensure_csrf_cookie def static_tab(request, course_id, tab_slug): """ @@ -368,9 +373,11 @@ def static_tab(request, course_id, tab_slug): {'course': course, 'tab': tab, 'tab_contents': contents, - 'staff_access': staff_access,}) + 'staff_access': staff_access, }) # TODO arjun: remove when custom tabs in place, see courseware/syllabus.py + + @ensure_csrf_cookie def syllabus(request, course_id): """ @@ -382,7 +389,7 @@ def syllabus(request, course_id): staff_access = has_access(request.user, course, 'staff') return render_to_response('courseware/syllabus.html', {'course': course, - 'staff_access': staff_access,}) + 'staff_access': staff_access, }) def registered_for_course(course, user): @@ -394,6 +401,7 @@ def registered_for_course(course, user): else: return False + @ensure_csrf_cookie @cache_if_anonymous def course_about(request, course_id): @@ -412,7 +420,7 @@ def course_about(request, course_id): {'course': course, 'registered': registered, 'course_target': course_target, - 'show_courseware_link' : show_courseware_link}) + 'show_courseware_link': show_courseware_link}) @ensure_csrf_cookie @@ -425,6 +433,7 @@ def static_university_profile(request, org_id): context = dict(courses=[], org_id=org_id) return render_to_response(template_file, context) + @ensure_csrf_cookie @cache_if_anonymous def university_profile(request, org_id): @@ -446,6 +455,7 @@ def university_profile(request, org_id): return render_to_response(template_file, context) + def render_notifications(request, course, notifications): context = { 'notifications': notifications, @@ -454,6 +464,7 @@ def render_notifications(request, course, notifications): } return render_to_string('courseware/notifications.html', context) + @login_required def news(request, course_id): course = get_course_with_access(request.user, course_id, 'load') @@ -467,6 +478,7 @@ def news(request, course_id): return render_to_response('courseware/news.html', context) + @login_required @cache_control(no_cache=True, no_store=True, must_revalidate=True) def progress(request, course_id, student_id=None): diff --git a/lms/djangoapps/dashboard/views.py b/lms/djangoapps/dashboard/views.py index 964b3fac4a..f5929f241b 100644 --- a/lms/djangoapps/dashboard/views.py +++ b/lms/djangoapps/dashboard/views.py @@ -3,6 +3,7 @@ import json from datetime import datetime from django.http import HttpResponse, Http404 + def dictfetchall(cursor): '''Returns all rows from a cursor as a dict. Borrowed from Django documentation''' @@ -12,23 +13,24 @@ def dictfetchall(cursor): for row in cursor.fetchall() ] + def dashboard(request): """ Quick hack to show staff enrollment numbers. This should be replaced with a real dashboard later. This version is a short-term - bandaid for the next couple weeks. + bandaid for the next couple weeks. """ if not request.user.is_staff: raise Http404 - queries=[] + queries = [] queries.append("select count(user_id) as students, course_id from student_courseenrollment group by course_id order by students desc;") queries.append("select count(distinct user_id) as unique_students from student_courseenrollment;") queries.append("select registrations, count(registrations) from (select count(user_id) as registrations from student_courseenrollment group by user_id) as registrations_per_user group by registrations;") - + from django.db import connection cursor = connection.cursor() - results =[] + results = [] for query in queries: cursor.execute(query) diff --git a/lms/djangoapps/django_comment_client/base/urls.py b/lms/djangoapps/django_comment_client/base/urls.py index 23f2afa037..d8fd4927fb 100644 --- a/lms/djangoapps/django_comment_client/base/urls.py +++ b/lms/djangoapps/django_comment_client/base/urls.py @@ -23,7 +23,7 @@ urlpatterns = patterns('django_comment_client.base.views', url(r'comments/(?P[\w\-]+)/upvote$', 'vote_for_comment', {'value': 'up'}, name='upvote_comment'), url(r'comments/(?P[\w\-]+)/downvote$', 'vote_for_comment', {'value': 'down'}, name='downvote_comment'), url(r'comments/(?P[\w\-]+)/unvote$', 'undo_vote_for_comment', name='undo_vote_for_comment'), - + url(r'^(?P[\w\-.]+)/threads/create$', 'create_thread', name='create_thread'), # TODO should we search within the board? url(r'^(?P[\w\-.]+)/threads/search_similar$', 'search_similar_threads', name='search_similar_threads'), diff --git a/lms/djangoapps/django_comment_client/base/views.py b/lms/djangoapps/django_comment_client/base/views.py index 777c7bafce..7ca00cb37c 100644 --- a/lms/djangoapps/django_comment_client/base/views.py +++ b/lms/djangoapps/django_comment_client/base/views.py @@ -30,6 +30,7 @@ from django_comment_client.models import Role log = logging.getLogger(__name__) + def permitted(fn): @functools.wraps(fn) def wrapper(request, *args, **kwargs): @@ -47,6 +48,7 @@ def permitted(fn): return JsonError("unauthorized", status=401) return wrapper + def ajax_content_response(request, course_id, content, template_name): context = { 'course_id': course_id, @@ -82,11 +84,11 @@ def create_thread(request, course_id, commentable_id): thread = cc.Thread(**extract(post, ['body', 'title', 'tags'])) thread.update_attributes(**{ - 'anonymous' : anonymous, - 'anonymous_to_peers' : anonymous_to_peers, - 'commentable_id' : commentable_id, - 'course_id' : course_id, - 'user_id' : request.user.id, + 'anonymous': anonymous, + 'anonymous_to_peers': anonymous_to_peers, + 'commentable_id': commentable_id, + 'course_id': course_id, + 'user_id': request.user.id, }) @@ -118,6 +120,7 @@ def create_thread(request, course_id, commentable_id): else: return JsonResponse(utils.safe_content(data)) + @require_POST @login_required @permitted @@ -130,6 +133,7 @@ def update_thread(request, course_id, thread_id): else: return JsonResponse(utils.safe_content(thread.to_dict())) + def _create_comment(request, course_id, thread_id=None, parent_id=None): post = request.POST comment = cc.Comment(**extract(post, ['body'])) @@ -146,12 +150,12 @@ def _create_comment(request, course_id, thread_id=None, parent_id=None): anonymous_to_peers = False comment.update_attributes(**{ - 'anonymous' : anonymous, - 'anonymous_to_peers' : anonymous_to_peers, - 'user_id' : request.user.id, - 'course_id' : course_id, - 'thread_id' : thread_id, - 'parent_id' : parent_id, + 'anonymous': anonymous, + 'anonymous_to_peers': anonymous_to_peers, + 'user_id': request.user.id, + 'course_id': course_id, + 'thread_id': thread_id, + 'parent_id': parent_id, }) comment.save() if post.get('auto_subscribe', 'false').lower() == 'true': @@ -162,6 +166,7 @@ def _create_comment(request, course_id, thread_id=None, parent_id=None): else: return JsonResponse(utils.safe_content(comment.to_dict())) + @require_POST @login_required @permitted @@ -171,6 +176,7 @@ def create_comment(request, course_id, thread_id): return JsonError("Comment level too deep") return _create_comment(request, course_id, thread_id=thread_id) + @require_POST @login_required @permitted @@ -179,6 +185,7 @@ def delete_thread(request, course_id, thread_id): thread.delete() return JsonResponse(utils.safe_content(thread.to_dict())) + @require_POST @login_required @permitted @@ -191,6 +198,7 @@ def update_comment(request, course_id, comment_id): else: return JsonResponse(utils.safe_content(comment.to_dict())) + @require_POST @login_required @permitted @@ -200,6 +208,7 @@ def endorse_comment(request, course_id, comment_id): comment.save() return JsonResponse(utils.safe_content(comment.to_dict())) + @require_POST @login_required @permitted @@ -213,6 +222,7 @@ def openclose_thread(request, course_id, thread_id): 'ability': utils.get_ability(course_id, thread, request.user), }) + @require_POST @login_required @permitted @@ -222,6 +232,7 @@ def create_sub_comment(request, course_id, comment_id): return JsonError("Comment level too deep") return _create_comment(request, course_id, parent_id=comment_id) + @require_POST @login_required @permitted @@ -230,6 +241,7 @@ def delete_comment(request, course_id, comment_id): comment.delete() return JsonResponse(utils.safe_content(comment.to_dict())) + @require_POST @login_required @permitted @@ -239,6 +251,7 @@ def vote_for_comment(request, course_id, comment_id, value): user.vote(comment, value) return JsonResponse(utils.safe_content(comment.to_dict())) + @require_POST @login_required @permitted @@ -248,6 +261,7 @@ def undo_vote_for_comment(request, course_id, comment_id): user.unvote(comment) return JsonResponse(utils.safe_content(comment.to_dict())) + @require_POST @login_required @permitted @@ -257,6 +271,7 @@ def vote_for_thread(request, course_id, thread_id, value): user.vote(thread, value) return JsonResponse(utils.safe_content(thread.to_dict())) + @require_POST @login_required @permitted @@ -276,6 +291,7 @@ def follow_thread(request, course_id, thread_id): user.follow(thread) return JsonResponse({}) + @require_POST @login_required @permitted @@ -285,6 +301,7 @@ def follow_commentable(request, course_id, commentable_id): user.follow(commentable) return JsonResponse({}) + @require_POST @login_required @permitted @@ -294,6 +311,7 @@ def follow_user(request, course_id, followed_user_id): user.follow(followed_user) return JsonResponse({}) + @require_POST @login_required @permitted @@ -303,6 +321,7 @@ def unfollow_thread(request, course_id, thread_id): user.unfollow(thread) return JsonResponse({}) + @require_POST @login_required @permitted @@ -312,6 +331,7 @@ def unfollow_commentable(request, course_id, commentable_id): user.unfollow(commentable) return JsonResponse({}) + @require_POST @login_required @permitted @@ -321,6 +341,7 @@ def unfollow_user(request, course_id, followed_user_id): user.unfollow(followed_user) return JsonResponse({}) + @require_POST @login_required @permitted @@ -351,6 +372,7 @@ def update_moderator_status(request, course_id, user_id): else: return JsonResponse({}) + @require_GET def search_similar_threads(request, course_id, commentable_id): text = request.GET.get('text', None) @@ -362,11 +384,12 @@ def search_similar_threads(request, course_id, commentable_id): threads = cc.search_similar_threads(course_id, recursive=False, query_params=query_params) else: theads = [] - context = { 'threads': map(utils.extend_content, threads) } + context = {'threads': map(utils.extend_content, threads)} return JsonResponse({ 'html': render_to_string('discussion/_similar_posts.html', context) }) + @require_GET def tags_autocomplete(request, course_id): value = request.GET.get('q', None) @@ -375,10 +398,11 @@ def tags_autocomplete(request, course_id): results = cc.tags_autocomplete(value) return JsonResponse(results) + @require_POST @login_required @csrf.csrf_exempt -def upload(request, course_id):#ajax upload file to a question or answer +def upload(request, course_id): # ajax upload file to a question or answer """view that handles file upload via Ajax """ @@ -409,7 +433,7 @@ def upload(request, course_id):#ajax upload file to a question or answer time.time() ).replace( '.', - str(random.randint(0,100000)) + str(random.randint(0, 100000)) ) + file_extension file_storage = get_storage_class()() diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 2c1d3c68d5..70d9f40fcf 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -30,6 +30,7 @@ PAGES_NEARBY_DELTA = 2 escapedict = {'"': '"'} log = logging.getLogger("edx.discussions") + def get_threads(request, course_id, discussion_id=None, per_page=THREADS_PER_PAGE): """ This may raise cc.utils.CommentClientError or @@ -78,6 +79,7 @@ def get_threads(request, course_id, discussion_id=None, per_page=THREADS_PER_PAG return threads, query_params + def inline_discussion(request, course_id, discussion_id): """ Renders JSON for DiscussionModules @@ -111,6 +113,7 @@ def inline_discussion(request, course_id, discussion_id): 'allow_anonymous': allow_anonymous, }) + @login_required def forum_form_discussion(request, course_id): """ @@ -136,7 +139,7 @@ def forum_form_discussion(request, course_id): thread.update(courseware_context) if request.is_ajax(): return utils.JsonResponse({ - 'discussion_data': threads, # TODO: Standardize on 'discussion_data' vs 'threads' + 'discussion_data': threads, # TODO: Standardize on 'discussion_data' vs 'threads' 'annotated_content_info': annotated_content_info, 'num_pages': query_params['num_pages'], 'page': query_params['page'], @@ -157,11 +160,11 @@ def forum_form_discussion(request, course_id): 'course': course, #'recent_active_threads': recent_active_threads, #'trending_tags': trending_tags, - 'staff_access' : has_access(request.user, course, 'staff'), - 'threads': saxutils.escape(json.dumps(threads),escapedict), + 'staff_access': has_access(request.user, course, 'staff'), + 'threads': saxutils.escape(json.dumps(threads), escapedict), 'thread_pages': query_params['num_pages'], - 'user_info': saxutils.escape(json.dumps(user_info),escapedict), - 'annotated_content_info': saxutils.escape(json.dumps(annotated_content_info),escapedict), + 'user_info': saxutils.escape(json.dumps(user_info), escapedict), + 'annotated_content_info': saxutils.escape(json.dumps(annotated_content_info), escapedict), 'course_id': course.id, 'category_map': category_map, 'roles': saxutils.escape(json.dumps(utils.get_role_ids(course_id)), escapedict), @@ -169,6 +172,7 @@ def forum_form_discussion(request, course_id): # print "start rendering.." return render_to_response('discussion/index.html', context) + @login_required def single_thread(request, course_id, discussion_id, thread_id): @@ -234,13 +238,13 @@ def single_thread(request, course_id, discussion_id, thread_id): context = { 'discussion_id': discussion_id, 'csrf': csrf(request)['csrf_token'], - 'init': '', #TODO: What is this? - 'user_info': saxutils.escape(json.dumps(user_info),escapedict), + 'init': '', # TODO: What is this? + 'user_info': saxutils.escape(json.dumps(user_info), escapedict), 'annotated_content_info': saxutils.escape(json.dumps(annotated_content_info), escapedict), 'course': course, #'recent_active_threads': recent_active_threads, #'trending_tags': trending_tags, - 'course_id': course.id, #TODO: Why pass both course and course.id to template? + 'course_id': course.id, # TODO: Why pass both course and course.id to template? 'thread_id': thread_id, 'threads': saxutils.escape(json.dumps(threads), escapedict), 'category_map': category_map, @@ -250,6 +254,7 @@ def single_thread(request, course_id, discussion_id, thread_id): return render_to_response('discussion/single_thread.html', context) + @login_required def user_profile(request, course_id, user_id): #TODO: Allow sorting? @@ -259,7 +264,7 @@ def user_profile(request, course_id, user_id): query_params = { 'page': request.GET.get('page', 1), - 'per_page': THREADS_PER_PAGE, # more than threads_per_page to show more activities + 'per_page': THREADS_PER_PAGE, # more than threads_per_page to show more activities } threads, page, num_pages = profiled_user.active_threads(query_params) @@ -274,7 +279,7 @@ def user_profile(request, course_id, user_id): 'discussion_data': map(utils.safe_content, threads), 'page': query_params['page'], 'num_pages': query_params['num_pages'], - 'annotated_content_info': saxutils.escape(json.dumps(annotated_content_info),escapedict), + 'annotated_content_info': saxutils.escape(json.dumps(annotated_content_info), escapedict), }) else: @@ -285,8 +290,8 @@ def user_profile(request, course_id, user_id): 'django_user': User.objects.get(id=user_id), 'profiled_user': profiled_user.to_dict(), 'threads': saxutils.escape(json.dumps(threads), escapedict), - 'user_info': saxutils.escape(json.dumps(user_info),escapedict), - 'annotated_content_info': saxutils.escape(json.dumps(annotated_content_info),escapedict), + 'user_info': saxutils.escape(json.dumps(user_info), escapedict), + 'annotated_content_info': saxutils.escape(json.dumps(annotated_content_info), escapedict), # 'content': content, } @@ -302,7 +307,7 @@ def followed_threads(request, course_id, user_id): query_params = { 'page': request.GET.get('page', 1), - 'per_page': THREADS_PER_PAGE, # more than threads_per_page to show more activities + 'per_page': THREADS_PER_PAGE, # more than threads_per_page to show more activities 'sort_key': request.GET.get('sort_key', 'date'), 'sort_order': request.GET.get('sort_order', 'desc'), } @@ -328,8 +333,8 @@ def followed_threads(request, course_id, user_id): 'django_user': User.objects.get(id=user_id), 'profiled_user': profiled_user.to_dict(), 'threads': saxutils.escape(json.dumps(threads), escapedict), - 'user_info': saxutils.escape(json.dumps(user_info),escapedict), - 'annotated_content_info': saxutils.escape(json.dumps(annotated_content_info),escapedict), + 'user_info': saxutils.escape(json.dumps(user_info), escapedict), + 'annotated_content_info': saxutils.escape(json.dumps(annotated_content_info), escapedict), # 'content': content, } diff --git a/lms/djangoapps/django_comment_client/helpers.py b/lms/djangoapps/django_comment_client/helpers.py index 0a1e8639ef..733856e2a9 100644 --- a/lms/djangoapps/django_comment_client/helpers.py +++ b/lms/djangoapps/django_comment_client/helpers.py @@ -15,12 +15,16 @@ import os # This method is used to pluralize the words "discussion" and "comment" # when referring to how many discussion threads or comments the user # has contributed to. + + def pluralize(singular_term, count): if int(count) >= 2 or int(count) == 0: return singular_term + 's' return singular_term # TODO there should be a better way to handle this + + def include_mustache_templates(): mustache_dir = settings.PROJECT_ROOT / 'templates' / 'discussion' / 'mustache' valid_file_name = lambda file_name: file_name.endswith('.mustache') @@ -31,6 +35,7 @@ def include_mustache_templates(): file_contents = map(read_file, filter(valid_file_name, os.listdir(mustache_dir))) return '\n'.join(map(wrap_in_tag, map(strip_file_name, file_contents))) + def render_content(content, additional_context={}): context = { 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..304907cdae 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 @@ -8,6 +8,7 @@ from django.core.management.base import BaseCommand, CommandError from student.models import CourseEnrollment, assign_default_role + class Command(BaseCommand): args = 'course_id' help = 'Add roles for all users in a course' 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..638d59f5fe 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 @@ -8,6 +8,7 @@ from django.core.management.base import BaseCommand, CommandError from student.models import CourseEnrollment, assign_default_role + class Command(BaseCommand): args = 'course_id' help = 'Seed default permisssions and roles' diff --git a/lms/djangoapps/django_comment_client/management/commands/seed_permissions_roles.py b/lms/djangoapps/django_comment_client/management/commands/seed_permissions_roles.py index 958b67cdb3..6a31e73af3 100644 --- a/lms/djangoapps/django_comment_client/management/commands/seed_permissions_roles.py +++ b/lms/djangoapps/django_comment_client/management/commands/seed_permissions_roles.py @@ -18,7 +18,7 @@ class Command(BaseCommand): student_role = Role.objects.get_or_create(name="Student", course_id=course_id)[0] for per in ["vote", "update_thread", "follow_thread", "unfollow_thread", - "update_comment", "create_sub_comment", "unvote" , "create_thread", + "update_comment", "create_sub_comment", "unvote", "create_thread", "follow_commentable", "unfollow_commentable", "create_comment", ]: student_role.add_permission(per) diff --git a/lms/djangoapps/django_comment_client/middleware.py b/lms/djangoapps/django_comment_client/middleware.py index 08e20b0296..abf2d40cab 100644 --- a/lms/djangoapps/django_comment_client/middleware.py +++ b/lms/djangoapps/django_comment_client/middleware.py @@ -2,7 +2,8 @@ from comment_client import CommentClientError from django_comment_client.utils import JsonError import json -class AjaxExceptionMiddleware(object): + +class AjaxExceptionMiddleware(object): def process_exception(self, request, exception): if isinstance(exception, CommentClientError) and request.is_ajax(): return JsonError(json.loads(exception.message)) diff --git a/lms/djangoapps/django_comment_client/migrations/0001_initial.py b/lms/djangoapps/django_comment_client/migrations/0001_initial.py index 4993984d74..0b5f88e2f2 100644 --- a/lms/djangoapps/django_comment_client/migrations/0001_initial.py +++ b/lms/djangoapps/django_comment_client/migrations/0001_initial.py @@ -129,4 +129,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['django_comment_client'] \ No newline at end of file + complete_apps = ['django_comment_client'] diff --git a/lms/djangoapps/django_comment_client/models.py b/lms/djangoapps/django_comment_client/models.py index 10c05c75e9..023b355a29 100644 --- a/lms/djangoapps/django_comment_client/models.py +++ b/lms/djangoapps/django_comment_client/models.py @@ -35,7 +35,7 @@ class Role(models.Model): def __unicode__(self): return self.name + " for " + (self.course_id if self.course_id else "all courses") - def inherit_permissions(self, role): # TODO the name of this method is a little bit confusing, + def inherit_permissions(self, role): # TODO the name of this method is a little bit confusing, # since it's one-off and doesn't handle inheritance later if role.course_id and role.course_id != self.course_id: logging.warning("{0} cannot inherit permissions from {1} due to course_id inconsistency", \ @@ -52,7 +52,7 @@ class Role(models.Model): (permission.startswith('edit') or permission.startswith('update') or permission.startswith('create')) and \ (not course.forum_posts_allowed): return False - + return self.permissions.filter(name=permission).exists() diff --git a/lms/djangoapps/django_comment_client/mustache_helpers.py b/lms/djangoapps/django_comment_client/mustache_helpers.py index 9756294696..5743dba9cb 100644 --- a/lms/djangoapps/django_comment_client/mustache_helpers.py +++ b/lms/djangoapps/django_comment_client/mustache_helpers.py @@ -7,6 +7,8 @@ import inspect # This method is used to pluralize the words "discussion" and "comment" # which is why you need to tack on an "s" for the case of 0 or two or more. + + def pluralize(content, text): num, word = text.split(' ') num = int(num or '0') @@ -15,12 +17,15 @@ def pluralize(content, text): else: return word + def url_for_user(content, user_id): return urlresolvers.reverse('django_comment_client.forum.views.user_profile', args=[content['course_id'], user_id]) -def url_for_tags(content, tags): # assume that attribute 'tags' is in the format u'a, b, c' + +def url_for_tags(content, tags): # assume that attribute 'tags' is in the format u'a, b, c' return _url_for_tags(content['course_id'], tags) + def close_thread_text(content): if content.get('closed'): return 'Re-open thread' diff --git a/lms/djangoapps/django_comment_client/permissions.py b/lms/djangoapps/django_comment_client/permissions.py index b95a890dda..dfdcd3e7ba 100644 --- a/lms/djangoapps/django_comment_client/permissions.py +++ b/lms/djangoapps/django_comment_client/permissions.py @@ -8,6 +8,7 @@ from util.cache import cache from django.core import cache cache = cache.get_cache('default') + def cached_has_permission(user, permission, course_id=None): """ Call has_permission if it's not cached. A change in a user's role or @@ -21,6 +22,7 @@ def cached_has_permission(user, permission, course_id=None): cache.set(key, val, CACHE_LIFESPAN) return val + def has_permission(user, permission, course_id=None): for role in user.roles.filter(course_id=course_id): if role.has_permission(permission): @@ -29,6 +31,8 @@ def has_permission(user, permission, course_id=None): CONDITIONS = ['is_open', 'is_author'] + + def check_condition(user, condition, course_id, data): def check_open(user, condition, course_id, data): try: @@ -43,8 +47,8 @@ def check_condition(user, condition, course_id, data): return False handlers = { - 'is_open' : check_open, - 'is_author' : check_author, + 'is_open': check_open, + 'is_author': check_author, } return handlers[condition](user, condition, course_id, data) @@ -93,7 +97,7 @@ VIEW_PERMISSIONS = { 'unfollow_commentable': ['unfollow_commentable'], 'unfollow_user' : ['unfollow_user'], 'create_thread' : ['create_thread'], - 'update_moderator_status' : ['manage_moderator'], + 'update_moderator_status': ['manage_moderator'], } diff --git a/lms/djangoapps/django_comment_client/settings.py b/lms/djangoapps/django_comment_client/settings.py index 3234c32478..b9a8d18081 100644 --- a/lms/djangoapps/django_comment_client/settings.py +++ b/lms/djangoapps/django_comment_client/settings.py @@ -1,7 +1,7 @@ from django.conf import settings MAX_COMMENT_DEPTH = None -MAX_UPLOAD_FILE_SIZE = 1024 * 1024 #result in bytes +MAX_UPLOAD_FILE_SIZE = 1024 * 1024 # result in bytes ALLOWED_UPLOAD_FILE_TYPES = ('.jpg', '.jpeg', '.gif', '.bmp', '.png', '.tiff') if hasattr(settings, 'DISCUSSION_SETTINGS'): diff --git a/lms/djangoapps/django_comment_client/tests/test_helpers.py b/lms/djangoapps/django_comment_client/tests/test_helpers.py index bd67830841..e2c074231f 100644 --- a/lms/djangoapps/django_comment_client/tests/test_helpers.py +++ b/lms/djangoapps/django_comment_client/tests/test_helpers.py @@ -2,10 +2,11 @@ import string import random import collections -from django.test import TestCase +from django.test import TestCase from django_comment_client.helpers import pluralize + class PluralizeTestCase(TestCase): def testPluralize(self): diff --git a/lms/djangoapps/django_comment_client/tests/test_middleware.py b/lms/djangoapps/django_comment_client/tests/test_middleware.py index e3249551b3..55e4c72c75 100644 --- a/lms/djangoapps/django_comment_client/tests/test_middleware.py +++ b/lms/djangoapps/django_comment_client/tests/test_middleware.py @@ -2,27 +2,28 @@ import string import random import collections -from django.test import TestCase +from django.test import TestCase import comment_client import django.http import django_comment_client.middleware as middleware + class AjaxExceptionTestCase(TestCase): -# TODO: check whether the correct error message is produced. +# TODO: check whether the correct error message is produced. # The error message should be the same as the argument to CommentClientError - def setUp(self): - self.a = middleware.AjaxExceptionMiddleware() - self.request1 = django.http.HttpRequest() - self.request0 = django.http.HttpRequest() - self.exception1 = comment_client.CommentClientError('{}') - self.exception0 = ValueError() - self.request1.META['HTTP_X_REQUESTED_WITH'] = "XMLHttpRequest" - self.request0.META['HTTP_X_REQUESTED_WITH'] = "SHADOWFAX" - - def test_process_exception(self): - self.assertIsInstance(self.a.process_exception(self.request1, self.exception1), middleware.JsonError) - self.assertIsNone(self.a.process_exception(self.request1, self.exception0)) - self.assertIsNone(self.a.process_exception(self.request0, self.exception1)) - self.assertIsNone(self.a.process_exception(self.request0, self.exception0)) + def setUp(self): + self.a = middleware.AjaxExceptionMiddleware() + self.request1 = django.http.HttpRequest() + self.request0 = django.http.HttpRequest() + self.exception1 = comment_client.CommentClientError('{}') + self.exception0 = ValueError() + self.request1.META['HTTP_X_REQUESTED_WITH'] = "XMLHttpRequest" + self.request0.META['HTTP_X_REQUESTED_WITH'] = "SHADOWFAX" + + def test_process_exception(self): + self.assertIsInstance(self.a.process_exception(self.request1, self.exception1), middleware.JsonError) + self.assertIsNone(self.a.process_exception(self.request1, self.exception0)) + self.assertIsNone(self.a.process_exception(self.request0, self.exception1)) + self.assertIsNone(self.a.process_exception(self.request0, self.exception0)) diff --git a/lms/djangoapps/django_comment_client/tests/test_mustache_helpers.py b/lms/djangoapps/django_comment_client/tests/test_mustache_helpers.py index 8638aba67e..5b788b3cc4 100644 --- a/lms/djangoapps/django_comment_client/tests/test_mustache_helpers.py +++ b/lms/djangoapps/django_comment_client/tests/test_mustache_helpers.py @@ -2,25 +2,27 @@ import string import random import collections -from django.test import TestCase +from django.test import TestCase import django_comment_client.mustache_helpers as mustache_helpers + class PluralizeTestCase(TestCase): - def test_pluralize(self): - self.text1 = '0 goat' - self.text2 = '1 goat' - self.text3 = '7 goat' - self.content = 'unused argument' - self.assertEqual(mustache_helpers.pluralize(self.content, self.text1), 'goats') - self.assertEqual(mustache_helpers.pluralize(self.content, self.text2), 'goat') - self.assertEqual(mustache_helpers.pluralize(self.content, self.text3), 'goats') + def test_pluralize(self): + self.text1 = '0 goat' + self.text2 = '1 goat' + self.text3 = '7 goat' + self.content = 'unused argument' + self.assertEqual(mustache_helpers.pluralize(self.content, self.text1), 'goats') + self.assertEqual(mustache_helpers.pluralize(self.content, self.text2), 'goat') + self.assertEqual(mustache_helpers.pluralize(self.content, self.text3), 'goats') + class CloseThreadTextTestCase(TestCase): - - def test_close_thread_text(self): - self.contentClosed = {'closed': True} - self.contentOpen = {'closed': False} - self.assertEqual(mustache_helpers.close_thread_text(self.contentClosed), 'Re-open thread') - self.assertEqual(mustache_helpers.close_thread_text(self.contentOpen), 'Close thread') + + def test_close_thread_text(self): + self.contentClosed = {'closed': True} + self.contentOpen = {'closed': False} + self.assertEqual(mustache_helpers.close_thread_text(self.contentClosed), 'Re-open thread') + self.assertEqual(mustache_helpers.close_thread_text(self.contentOpen), 'Close thread') diff --git a/lms/djangoapps/django_comment_client/tests/test_utils.py b/lms/djangoapps/django_comment_client/tests/test_utils.py index 2e24cbd837..cec006e630 100644 --- a/lms/djangoapps/django_comment_client/tests/test_utils.py +++ b/lms/djangoapps/django_comment_client/tests/test_utils.py @@ -2,7 +2,7 @@ import string import random import collections -from django.test import TestCase +from django.test import TestCase import factory from django.contrib.auth.models import User @@ -14,6 +14,7 @@ import django_comment_client.utils as utils import xmodule.modulestore.django as django + class UserFactory(factory.Factory): FACTORY_FOR = User username = 'robot' @@ -22,20 +23,24 @@ class UserFactory(factory.Factory): is_active = True is_staff = False + class CourseEnrollmentFactory(factory.Factory): - FACTORY_FOR = CourseEnrollment + FACTORY_FOR = CourseEnrollment user = factory.SubFactory(UserFactory) course_id = 'edX/toy/2012_Fall' + class RoleFactory(factory.Factory): FACTORY_FOR = Role name = 'Student' course_id = 'edX/toy/2012_Fall' + class PermissionFactory(factory.Factory): - FACTORY_FOR = Permission + FACTORY_FOR = Permission name = 'create_comment' + class DictionaryTestCase(TestCase): def test_extract(self): d = {'cats': 'meow', 'dogs': 'woof'} @@ -54,11 +59,12 @@ class DictionaryTestCase(TestCase): self.assertEqual(utils.strip_blank(d), expected) def test_merge_dict(self): - d1 ={'cats': 'meow', 'dogs': 'woof'} - d2 ={'lions': 'roar','ducks': 'quack'} - expected ={'cats': 'meow', 'dogs': 'woof','lions': 'roar','ducks': 'quack'} + d1 = {'cats': 'meow', 'dogs': 'woof'} + d2 = {'lions': 'roar', 'ducks': 'quack'} + expected = {'cats': 'meow', 'dogs': 'woof', 'lions': 'roar', 'ducks': 'quack'} self.assertEqual(utils.merge_dict(d1, d2), expected) + class AccessUtilsTestCase(TestCase): def setUp(self): self.course_id = 'edX/toy/2012_Fall' diff --git a/lms/djangoapps/django_comment_client/utils.py b/lms/djangoapps/django_comment_client/utils.py index b58e3b30e6..1f1a80e2b4 100644 --- a/lms/djangoapps/django_comment_client/utils.py +++ b/lms/djangoapps/django_comment_client/utils.py @@ -24,21 +24,27 @@ log = logging.getLogger(__name__) _FULLMODULES = None _DISCUSSIONINFO = defaultdict(dict) + def extract(dic, keys): return {k: dic.get(k) for k in keys} + def strip_none(dic): return dict([(k, v) for k, v in dic.iteritems() if v is not None]) + def strip_blank(dic): def _is_blank(v): return isinstance(v, str) and len(v.strip()) == 0 return dict([(k, v) for k, v in dic.iteritems() if not _is_blank(v)]) # TODO should we be checking if d1 and d2 have the same keys with different values? + + def merge_dict(dic1, dic2): return dict(dic1.items() + dic2.items()) + def get_role_ids(course_id): roles = Role.objects.filter(course_id=course_id) staff = list(User.objects.filter(is_staff=True).values_list('id', flat=True)) @@ -47,6 +53,7 @@ def get_role_ids(course_id): roles_with_ids[role.name] = list(role.users.values_list('id', flat=True)) return roles_with_ids + def has_forum_access(uname, course_id, rolename): try: role = Role.objects.get(name=rolename, course_id=course_id) @@ -54,12 +61,14 @@ def has_forum_access(uname, course_id, rolename): return False return role.users.filter(username=uname).exists() + def get_full_modules(): global _FULLMODULES if not _FULLMODULES: _FULLMODULES = modulestore().modules return _FULLMODULES + def get_discussion_id_map(course): """ return a dict of the form {category: modules} @@ -68,18 +77,21 @@ def get_discussion_id_map(course): initialize_discussion_info(course) return _DISCUSSIONINFO[course.id]['id_map'] + def get_discussion_title(course, discussion_id): global _DISCUSSIONINFO initialize_discussion_info(course) title = _DISCUSSIONINFO[course.id]['id_map'].get(discussion_id, {}).get('title', '(no title)') return title + def get_discussion_category_map(course): global _DISCUSSIONINFO initialize_discussion_info(course) return filter_unstarted_categories(_DISCUSSIONINFO[course.id]['category_map']) + def filter_unstarted_categories(category_map): now = time.gmtime() @@ -117,6 +129,7 @@ def filter_unstarted_categories(category_map): return result_map + def sort_map_entries(category_map): things = [] for title, entry in category_map["entries"].items(): @@ -211,7 +224,7 @@ def initialize_discussion_info(course): # TODO. BUG! : course location is not unique across multiple course runs! # (I think Kevin already noticed this) Need to send course_id with requests, store it # in the backend. - default_topics = {'General': {'id' :course.location.html_id()}} + default_topics = {'General': {'id': course.location.html_id()}} discussion_topics = course.metadata.get('discussion_topics', default_topics) for topic, entry in discussion_topics.items(): category_map['entries'][topic] = {"id": entry["id"], @@ -223,12 +236,14 @@ def initialize_discussion_info(course): _DISCUSSIONINFO[course.id]['category_map'] = category_map _DISCUSSIONINFO[course.id]['timestamp'] = datetime.now() + class JsonResponse(HttpResponse): def __init__(self, data=None): content = simplejson.dumps(data) super(JsonResponse, self).__init__(content, mimetype='application/json; charset=utf-8') + class JsonError(HttpResponse): def __init__(self, error_messages=[], status=400): if isinstance(error_messages, str): @@ -239,14 +254,17 @@ class JsonError(HttpResponse): super(JsonError, self).__init__(content, mimetype='application/json; charset=utf-8', status=status) + class HtmlResponse(HttpResponse): def __init__(self, html=''): super(HtmlResponse, self).__init__(html, content_type='text/plain') + class ViewNameMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): request.view_name = view_func.__name__ + class QueryCountDebugMiddleware(object): """ This middleware will log the number of queries run @@ -272,6 +290,7 @@ class QueryCountDebugMiddleware(object): log.info('%s queries run, total %s seconds' % (len(connection.queries), total_time)) return response + def get_ability(course_id, content, user): return { 'editable': check_permissions_by_view(user, course_id, content, "update_thread" if content['type'] == 'thread' else "update_comment"), @@ -283,6 +302,8 @@ def get_ability(course_id, content, user): } #TODO: RENAME + + def get_annotated_content_info(course_id, content, user, user_info): """ Get metadata for an individual content (thread or comment) @@ -299,6 +320,8 @@ def get_annotated_content_info(course_id, content, user, user_info): } #TODO: RENAME + + def get_annotated_content_infos(course_id, thread, user, user_info): """ Get metadata for a thread and its children @@ -311,6 +334,7 @@ def get_annotated_content_infos(course_id, thread, user, user_info): annotate(thread) return infos + def get_metadata_for_threads(course_id, threads, user, user_info): def infogetter(thread): return get_annotated_content_infos(course_id, thread, user, user_info) @@ -319,13 +343,17 @@ def get_metadata_for_threads(course_id, threads, user, user_info): return metadata # put this method in utils.py to avoid circular import dependency between helpers and mustache_helpers + + def url_for_tags(course_id, tags): return reverse('django_comment_client.forum.views.forum_form_discussion', args=[course_id]) + '?' + urllib.urlencode({'tags': tags}) + def render_mustache(template_name, dictionary, *args, **kwargs): template = middleware.lookup['main'].get_template(template_name).source return pystache.render(template, dictionary) + def permalink(content): if content['type'] == 'thread': return reverse('django_comment_client.forum.views.single_thread', @@ -334,6 +362,7 @@ def permalink(content): return reverse('django_comment_client.forum.views.single_thread', args=[content['course_id'], content['commentable_id'], content['thread_id']]) + '#' + content['id'] + def extend_content(content): roles = {} if content.get('user_id'): @@ -349,10 +378,11 @@ def extend_content(content): 'raw_tags': ','.join(content.get('tags', [])), 'permalink': permalink(content), 'roles': roles, - 'updated': content['created_at']!=content['updated_at'], + 'updated': content['created_at'] != content['updated_at'], } return merge_dict(content, content_info) + def get_courseware_context(content, course): id_map = get_discussion_id_map(course) id = content['commentable_id'] @@ -361,13 +391,14 @@ def get_courseware_context(content, course): location = id_map[id]["location"].url() title = id_map[id]["title"] (course_id, chapter, section, position) = path_to_location(modulestore(), course.id, location) - url = reverse('courseware_position', kwargs={"course_id":course_id, - "chapter":chapter, - "section":section, - "position":position}) + url = reverse('courseware_position', kwargs={"course_id": course_id, + "chapter": chapter, + "section": section, + "position": position}) content_info = {"courseware_url": url, "courseware_title": title} return content_info + def safe_content(content): fields = [ 'id', 'title', 'body', 'course_id', 'anonymous', 'anonymous_to_peers', diff --git a/lms/djangoapps/instructor/management/commands/compute_grades.py b/lms/djangoapps/instructor/management/commands/compute_grades.py index 462833ba3c..92db04f09a 100644 --- a/lms/djangoapps/instructor/management/commands/compute_grades.py +++ b/lms/djangoapps/instructor/management/commands/compute_grades.py @@ -3,7 +3,9 @@ # django management command: dump grades to csv files # for use by batch processes -import os, sys, string +import os +import sys +import string import datetime import json @@ -15,6 +17,7 @@ from xmodule.modulestore.django import modulestore from django.conf import settings from django.core.management.base import BaseCommand + class Command(BaseCommand): help = "Compute grades for all students in a course, and store result in DB.\n" help += "Usage: compute_grades course_id_or_dir \n" @@ -25,7 +28,7 @@ class Command(BaseCommand): print "args = ", args - if len(args)>0: + if len(args) > 0: course_id = args[0] else: print self.help @@ -46,7 +49,3 @@ class Command(BaseCommand): print "Computing grades for %s" % (course.id) offline_grade_calculation(course.id) - - - - diff --git a/lms/djangoapps/instructor/management/commands/dump_grades.py b/lms/djangoapps/instructor/management/commands/dump_grades.py index 65825271f3..13f86c0e0f 100644 --- a/lms/djangoapps/instructor/management/commands/dump_grades.py +++ b/lms/djangoapps/instructor/management/commands/dump_grades.py @@ -3,7 +3,9 @@ # django management command: dump grades to csv files # for use by batch processes -import os, sys, string +import os +import sys +import string import datetime import json @@ -14,6 +16,7 @@ from xmodule.modulestore.django import modulestore from django.conf import settings from django.core.management.base import BaseCommand + class Command(BaseCommand): help = "dump grades to CSV file. Usage: dump_grades course_id_or_dir filename dump_type\n" help += " course_id_or_dir: either course_id or course_dir\n" @@ -32,12 +35,12 @@ class Command(BaseCommand): fn = "grades.csv" get_raw_scores = False - if len(args)>0: + if len(args) > 0: course_id = args[0] - if len(args)>1: + if len(args) > 1: fn = args[1] - if len(args)>2: - get_raw_scores = args[2].lower()=='raw' + if len(args) > 2: + get_raw_scores = args[2].lower() == 'raw' request = self.DummyRequest() try: @@ -54,15 +57,15 @@ class Command(BaseCommand): print "-----------------------------------------------------------------------------" print "Dumping grades from %s to file %s (get_raw_scores=%s)" % (course.id, fn, get_raw_scores) datatable = get_student_grade_summary_data(request, course, course.id, get_raw_scores=get_raw_scores) - - fp = open(fn,'w') - + + fp = open(fn, 'w') + writer = csv.writer(fp, dialect='excel', quotechar='"', quoting=csv.QUOTE_ALL) writer.writerow(datatable['header']) for datarow in datatable['data']: encoded_row = [unicode(s).encode('utf-8') for s in datarow] writer.writerow(encoded_row) - + fp.close() print "Done: %d records dumped" % len(datatable['data']) @@ -74,6 +77,3 @@ class Command(BaseCommand): return 'edx.mit.edu' def is_secure(self): return False - - - diff --git a/lms/djangoapps/instructor/offline_gradecalc.py b/lms/djangoapps/instructor/offline_gradecalc.py index 7c102805b4..8182c4e58a 100644 --- a/lms/djangoapps/instructor/offline_gradecalc.py +++ b/lms/djangoapps/instructor/offline_gradecalc.py @@ -31,7 +31,7 @@ class MyEncoder(JSONEncoder): def offline_grade_calculation(course_id): ''' - Compute grades for all students for a specified course, and save results to the DB. + Compute grades for all students for a specified course, and save results to the DB. ''' tstart = time.time() @@ -59,16 +59,16 @@ def offline_grade_calculation(course_id): ocg, created = models.OfflineComputedGrade.objects.get_or_create(user=student, course_id=course_id) ocg.gradeset = gs ocg.save() - print "%s done" % student # print statement used because this is run by a management command + print "%s done" % student # print statement used because this is run by a management command tend = time.time() dt = tend - tstart - + ocgl = models.OfflineComputedGradeLog(course_id=course_id, seconds=dt, nstudents=len(enrolled_students)) ocgl.save() print ocgl print "All Done!" - + def offline_grades_available(course_id): ''' @@ -80,7 +80,7 @@ def offline_grades_available(course_id): return False return ocgl.latest('created') - + def student_grades(student, request, course, keep_raw_scores=False, use_offline=False): ''' This is the main interface to get grades. It has the same parameters as grades.grade, as well @@ -89,15 +89,11 @@ def student_grades(student, request, course, keep_raw_scores=False, use_offline= if not use_offline: return grades.grade(student, request, course, keep_raw_scores=keep_raw_scores) - + try: ocg = models.OfflineComputedGrade.objects.get(user=student, course_id=course.id) except models.OfflineComputedGrade.DoesNotExist: - return dict(raw_scores=[], section_breakdown=[], + return dict(raw_scores=[], section_breakdown=[], msg='Error: no offline gradeset available for %s, %s' % (student, course.id)) - + return json.loads(ocg.gradeset) - - - - diff --git a/lms/djangoapps/instructor/tests.py b/lms/djangoapps/instructor/tests.py index e2ee878021..2610e57422 100644 --- a/lms/djangoapps/instructor/tests.py +++ b/lms/djangoapps/instructor/tests.py @@ -71,13 +71,13 @@ class TestInstructorDashboardGradeDownloadCSV(ct.PageLoader): response = self.client.post(url, {'action': 'Download CSV of all student grades for this course'}) msg += "instructor dashboard download csv grades: response = '{0}'\n".format(response) - self.assertEqual(response['Content-Type'],'text/csv',msg) + self.assertEqual(response['Content-Type'], 'text/csv', msg) cdisp = response['Content-Disposition'] msg += "Content-Disposition = '%s'\n" % cdisp self.assertEqual(cdisp, 'attachment; filename=grades_{0}.csv'.format(course.id), msg) - body = response.content.replace('\r','') + body = response.content.replace('\r', '') msg += "body = '{0}'\n".format(body) # All the not-actually-in-the-course hw and labs come from the @@ -89,9 +89,10 @@ class TestInstructorDashboardGradeDownloadCSV(ct.PageLoader): self.assertEqual(body, expected_body, msg) -FORUM_ROLES = [ FORUM_ROLE_ADMINISTRATOR, FORUM_ROLE_MODERATOR, FORUM_ROLE_COMMUNITY_TA ] -FORUM_ADMIN_ACTION_SUFFIX = { FORUM_ROLE_ADMINISTRATOR : 'admin', FORUM_ROLE_MODERATOR : 'moderator', FORUM_ROLE_COMMUNITY_TA : 'community TA'} -FORUM_ADMIN_USER = { FORUM_ROLE_ADMINISTRATOR : 'forumadmin', FORUM_ROLE_MODERATOR : 'forummoderator', FORUM_ROLE_COMMUNITY_TA : 'forummoderator'} +FORUM_ROLES = [FORUM_ROLE_ADMINISTRATOR, FORUM_ROLE_MODERATOR, FORUM_ROLE_COMMUNITY_TA] +FORUM_ADMIN_ACTION_SUFFIX = {FORUM_ROLE_ADMINISTRATOR: 'admin', FORUM_ROLE_MODERATOR: 'moderator', FORUM_ROLE_COMMUNITY_TA: 'community TA'} +FORUM_ADMIN_USER = {FORUM_ROLE_ADMINISTRATOR: 'forumadmin', FORUM_ROLE_MODERATOR: 'forummoderator', FORUM_ROLE_COMMUNITY_TA: 'forummoderator'} + def action_name(operation, rolename): if operation == 'List': @@ -146,7 +147,7 @@ class TestInstructorDashboardForumAdmin(ct.PageLoader): for action in ['Add', 'Remove']: for rolename in FORUM_ROLES: response = self.client.post(url, {'action': action_name(action, rolename), FORUM_ADMIN_USER[rolename]: username}) - self.assertTrue(response.content.find('Error: unknown username "{0}"'.format(username))>=0) + self.assertTrue(response.content.find('Error: unknown username "{0}"'.format(username)) >= 0) def test_add_forum_admin_users_for_missing_roles(self): course = self.toy @@ -155,7 +156,7 @@ class TestInstructorDashboardForumAdmin(ct.PageLoader): for action in ['Add', 'Remove']: for rolename in FORUM_ROLES: response = self.client.post(url, {'action': action_name(action, rolename), FORUM_ADMIN_USER[rolename]: username}) - self.assertTrue(response.content.find('Error: unknown rolename "{0}"'.format(rolename))>=0) + self.assertTrue(response.content.find('Error: unknown rolename "{0}"'.format(rolename)) >= 0) def test_remove_forum_admin_users_for_missing_users(self): course = self.toy @@ -165,7 +166,7 @@ class TestInstructorDashboardForumAdmin(ct.PageLoader): action = 'Remove' for rolename in FORUM_ROLES: response = self.client.post(url, {'action': action_name(action, rolename), FORUM_ADMIN_USER[rolename]: username}) - self.assertTrue(response.content.find('Error: user "{0}" does not have rolename "{1}"'.format(username, rolename))>=0) + self.assertTrue(response.content.find('Error: user "{0}" does not have rolename "{1}"'.format(username, rolename)) >= 0) def test_add_and_remove_forum_admin_users(self): course = self.toy @@ -174,10 +175,10 @@ class TestInstructorDashboardForumAdmin(ct.PageLoader): username = 'u2' for rolename in FORUM_ROLES: response = self.client.post(url, {'action': action_name('Add', rolename), FORUM_ADMIN_USER[rolename]: username}) - self.assertTrue(response.content.find('Added "{0}" to "{1}" forum role = "{2}"'.format(username, course.id, rolename))>=0) + self.assertTrue(response.content.find('Added "{0}" to "{1}" forum role = "{2}"'.format(username, course.id, rolename)) >= 0) self.assertTrue(has_forum_access(username, course.id, rolename)) response = self.client.post(url, {'action': action_name('Remove', rolename), FORUM_ADMIN_USER[rolename]: username}) - self.assertTrue(response.content.find('Removed "{0}" from "{1}" forum role = "{2}"'.format(username, course.id, rolename))>=0) + self.assertTrue(response.content.find('Removed "{0}" from "{1}" forum role = "{2}"'.format(username, course.id, rolename)) >= 0) self.assertFalse(has_forum_access(username, course.id, rolename)) def test_add_and_read_forum_admin_users(self): @@ -189,7 +190,7 @@ class TestInstructorDashboardForumAdmin(ct.PageLoader): # perform an add, and follow with a second identical add: self.client.post(url, {'action': action_name('Add', rolename), FORUM_ADMIN_USER[rolename]: username}) response = self.client.post(url, {'action': action_name('Add', rolename), FORUM_ADMIN_USER[rolename]: username}) - self.assertTrue(response.content.find('Error: user "{0}" already has rolename "{1}", cannot add'.format(username, rolename))>=0) + self.assertTrue(response.content.find('Error: user "{0}" already has rolename "{1}", cannot add'.format(username, rolename)) >= 0) self.assertTrue(has_forum_access(username, course.id, rolename)) def test_add_nonstaff_forum_admin_users(self): @@ -199,7 +200,7 @@ class TestInstructorDashboardForumAdmin(ct.PageLoader): username = 'u1' rolename = FORUM_ROLE_ADMINISTRATOR response = self.client.post(url, {'action': action_name('Add', rolename), FORUM_ADMIN_USER[rolename]: username}) - self.assertTrue(response.content.find('Error: user "{0}" should first be added as staff'.format(username))>=0) + self.assertTrue(response.content.find('Error: user "{0}" should first be added as staff'.format(username)) >= 0) def test_list_forum_admin_users(self): course = self.toy @@ -213,12 +214,10 @@ class TestInstructorDashboardForumAdmin(ct.PageLoader): self.assertTrue(has_forum_access(username, course.id, rolename)) response = self.client.post(url, {'action': action_name('List', rolename), FORUM_ADMIN_USER[rolename]: username}) for header in ['Username', 'Full name', 'Roles']: - self.assertTrue(response.content.find('{0}'.format(header))>0) - self.assertTrue(response.content.find('{0}'.format(username))>=0) + self.assertTrue(response.content.find('{0}'.format(header)) > 0) + self.assertTrue(response.content.find('{0}'.format(username)) >= 0) # concatenate all roles for user, in sorted order: added_roles.append(rolename) added_roles.sort() roles = ', '.join(added_roles) - self.assertTrue(response.content.find('{0}'.format(roles))>=0, 'not finding roles "{0}"'.format(roles)) - - + self.assertTrue(response.content.find('{0}'.format(roles)) >= 0, 'not finding roles "{0}"'.format(roles)) diff --git a/lms/djangoapps/instructor/views.py b/lms/djangoapps/instructor/views.py index a707506045..4faf814bc9 100644 --- a/lms/djangoapps/instructor/views.py +++ b/lms/djangoapps/instructor/views.py @@ -50,9 +50,11 @@ template_imports = {'urllib': urllib} FORUM_ROLE_ADD = 'add' FORUM_ROLE_REMOVE = 'remove' + def split_by_comma_and_whitespace(s): return re.split(r'[\s,]', s) + @ensure_csrf_cookie @cache_control(no_cache=True, no_store=True, must_revalidate=True) def instructor_dashboard(request, course_id): @@ -69,11 +71,11 @@ def instructor_dashboard(request, course_id): # the instructor dashboard page is modal: grades, psychometrics, admin # keep that state in request.session (defaults to grades mode) - idash_mode = request.POST.get('idash_mode','') + idash_mode = request.POST.get('idash_mode', '') if idash_mode: request.session['idash_mode'] = idash_mode else: - idash_mode = request.session.get('idash_mode','Grades') + idash_mode = request.session.get('idash_mode', 'Grades') def escape(s): """escape HTML special characters in string""" @@ -130,7 +132,7 @@ def instructor_dashboard(request, course_id): # process actions from form POST action = request.POST.get('action', '') - use_offline = request.POST.get('use_offline_grades',False) + use_offline = request.POST.get('use_offline_grades', False) if settings.MITX_FEATURES['ENABLE_MANUAL_GIT_RELOAD']: if 'GIT pull' in action: @@ -155,12 +157,12 @@ def instructor_dashboard(request, course_id): course_errors = modulestore().get_item_errors(course.location) msg += '
                    ' for cmsg, cerr in course_errors: - msg += "
                  • {0}:
                    {1}
                    ".format(cmsg,escape(cerr)) + msg += "
                  • {0}:
                    {1}
                    ".format(cmsg, escape(cerr)) msg += '
                  ' except Exception as err: msg += '

                  Error: {0}

                  '.format(escape(err)) - if action == 'Dump list of enrolled students' or action=='List enrolled students': + if action == 'Dump list of enrolled students' or action == 'List enrolled students': log.debug(action) datatable = get_student_grade_summary_data(request, course, course_id, get_grades=False, use_offline=use_offline) datatable['title'] = 'List of students enrolled in {0}'.format(course_id) @@ -195,44 +197,44 @@ def instructor_dashboard(request, course_id): elif "Reset student's attempts" in action: # get the form data - unique_student_identifier=request.POST.get('unique_student_identifier','') - problem_to_reset=request.POST.get('problem_to_reset','') + unique_student_identifier = request.POST.get('unique_student_identifier', '') + problem_to_reset = request.POST.get('problem_to_reset', '') - if problem_to_reset[-4:]==".xml": - problem_to_reset=problem_to_reset[:-4] + if problem_to_reset[-4:] == ".xml": + problem_to_reset = problem_to_reset[:-4] # try to uniquely id student by email address or username try: if "@" in unique_student_identifier: - student_to_reset=User.objects.get(email=unique_student_identifier) + student_to_reset = User.objects.get(email=unique_student_identifier) else: - student_to_reset=User.objects.get(username=unique_student_identifier) - msg+="Found a single student to reset. " + student_to_reset = User.objects.get(username=unique_student_identifier) + msg += "Found a single student to reset. " except: - student_to_reset=None - msg+="Couldn't find student with that email or username. " + student_to_reset = None + msg += "Couldn't find student with that email or username. " if student_to_reset is not None: # find the module in question try: - (org, course_name, run)=course_id.split("/") - module_state_key="i4x://"+org+"/"+course_name+"/problem/"+problem_to_reset - module_to_reset=StudentModule.objects.get(student_id=student_to_reset.id, + (org, course_name, run) = course_id.split("/") + module_state_key = "i4x://" + org + "/" + course_name + "/problem/" + problem_to_reset + module_to_reset = StudentModule.objects.get(student_id=student_to_reset.id, course_id=course_id, module_state_key=module_state_key) - msg+="Found module to reset. " + msg += "Found module to reset. " except Exception as e: - msg+="Couldn't find module with that urlname. " + msg += "Couldn't find module with that urlname. " # modify the problem's state try: # load the state json - problem_state=json.loads(module_to_reset.state) - old_number_of_attempts=problem_state["attempts"] - problem_state["attempts"]=0 + problem_state = json.loads(module_to_reset.state) + old_number_of_attempts = problem_state["attempts"] + problem_state["attempts"] = 0 # save - module_to_reset.state=json.dumps(problem_state) + module_to_reset.state = json.dumps(problem_state) module_to_reset.save() track.views.server_track(request, '{instructor} reset attempts from {old_attempts} to 0 for {student} on problem {problem} in {course}'.format( @@ -243,19 +245,19 @@ def instructor_dashboard(request, course_id): course=course_id), {}, page='idashboard') - msg+="Module state successfully reset!" + msg += "Module state successfully reset!" except: - msg+="Couldn't reset module state. " + msg += "Couldn't reset module state. " elif "Get link to student's progress page" in action: - unique_student_identifier=request.POST.get('unique_student_identifier','') + unique_student_identifier = request.POST.get('unique_student_identifier', '') try: if "@" in unique_student_identifier: - student_to_reset=User.objects.get(email=unique_student_identifier) + student_to_reset = User.objects.get(email=unique_student_identifier) else: - student_to_reset=User.objects.get(username=unique_student_identifier) - progress_url=reverse('student_progress',kwargs={'course_id':course_id,'student_id': student_to_reset.id}) + student_to_reset = User.objects.get(username=unique_student_identifier) + progress_url = reverse('student_progress', kwargs={'course_id': course_id, 'student_id': student_to_reset.id}) track.views.server_track(request, '{instructor} requested progress page for {student} in {course}'.format( student=student_to_reset, @@ -263,18 +265,18 @@ def instructor_dashboard(request, course_id): course=course_id), {}, page='idashboard') - msg+=" Progress page for username: {1} with email address: {2}.".format(progress_url,student_to_reset.username,student_to_reset.email) + msg += " Progress page for username: {1} with email address: {2}.".format(progress_url, student_to_reset.username, student_to_reset.email) except: - msg+="Couldn't find student with that username. " + msg += "Couldn't find student with that username. " #---------------------------------------- # export grades to remote gradebook - elif action=='List assignments available in remote gradebook': + elif action == 'List assignments available in remote gradebook': msg2, datatable = _do_remote_gradebook(request.user, course, 'get-assignments') msg += msg2 - elif action=='List assignments available for this course': + elif action == 'List assignments available for this course': log.debug(action) allgrades = get_student_grade_summary_data(request, course, course_id, get_grades=True, use_offline=use_offline) @@ -285,11 +287,11 @@ def instructor_dashboard(request, course_id): msg += 'assignments=
                  %s
                  ' % assignments - elif action=='List enrolled students matching remote gradebook': + elif action == 'List enrolled students matching remote gradebook': stud_data = get_student_grade_summary_data(request, course, course_id, get_grades=False, use_offline=use_offline) msg2, rg_stud_data = _do_remote_gradebook(request.user, course, 'get-membership') datatable = {'header': ['Student email', 'Match?']} - rg_students = [ x['email'] for x in rg_stud_data['retdata'] ] + rg_students = [x['email'] for x in rg_stud_data['retdata']] def domatch(x): return 'yes' if x.email in rg_students else 'No' datatable['data'] = [[x.email, domatch(x)] for x in stud_data['students']] @@ -300,7 +302,7 @@ def instructor_dashboard(request, course_id): log.debug(action) datatable = {} - aname = request.POST.get('assignment_name','') + aname = request.POST.get('assignment_name', '') if not aname: msg += "Please enter an assignment name" else: @@ -476,13 +478,13 @@ def instructor_dashboard(request, course_id): elif action == 'Enroll student': - student = request.POST.get('enstudent','') + student = request.POST.get('enstudent', '') ret = _do_enroll_students(course, course_id, student) datatable = ret['datatable'] elif action == 'Un-enroll student': - student = request.POST.get('enstudent','') + student = request.POST.get('enstudent', '') datatable = {} isok = False cea = CourseEnrollmentAllowed.objects.filter(course_id=course_id, email=student) @@ -506,7 +508,7 @@ def instructor_dashboard(request, course_id): elif action == 'Enroll multiple students': - students = request.POST.get('enroll_multiple','') + students = request.POST.get('enroll_multiple', '') ret = _do_enroll_students(course, course_id, students) datatable = ret['datatable'] @@ -519,8 +521,8 @@ def instructor_dashboard(request, course_id): 'Overload enrollment list using remote gradebook', 'Merge enrollment list with remote gradebook']: - section = request.POST.get('gradebook_section','') - msg2, datatable = _do_remote_gradebook(request.user, course, 'get-membership', dict(section=section) ) + section = request.POST.get('gradebook_section', '') + msg2, datatable = _do_remote_gradebook(request.user, course, 'get-membership', dict(section=section)) msg += msg2 if not 'List' in action: @@ -539,7 +541,7 @@ def instructor_dashboard(request, course_id): msg += nmsg track.views.server_track(request, 'psychometrics {0}'.format(problem), {}, page='idashboard') - if idash_mode=='Psychometrics': + if idash_mode == 'Psychometrics': problems = psychoanalyze.problems_with_psychometric_data(course_id) @@ -563,10 +565,10 @@ def instructor_dashboard(request, course_id): 'problems': problems, # psychometrics 'plots': plots, # psychometrics 'course_errors': modulestore().get_item_errors(course.location), - 'djangopid' : os.getpid(), - 'mitx_version' : getattr(settings,'MITX_VERSION_STRING',''), - 'offline_grade_log' : offline_grades_available(course_id), - 'cohorts_ajax_url' : reverse('cohorts', kwargs={'course_id': course_id}), + 'djangopid': os.getpid(), + 'mitx_version': getattr(settings, 'MITX_VERSION_STRING', ''), + 'offline_grade_log': offline_grades_available(course_id), + 'cohorts_ajax_url': reverse('cohorts', kwargs={'course_id': course_id}), } return render_to_response('courseware/instructor_dashboard.html', context) @@ -576,17 +578,17 @@ def _do_remote_gradebook(user, course, action, args=None, files=None): ''' Perform remote gradebook action. Returns msg, datatable. ''' - rg = course.metadata.get('remote_gradebook','') + rg = course.metadata.get('remote_gradebook', '') if not rg: msg = "No remote gradebook defined in course metadata" return msg, {} - rgurl = settings.MITX_FEATURES.get('REMOTE_GRADEBOOK_URL','') + rgurl = settings.MITX_FEATURES.get('REMOTE_GRADEBOOK_URL', '') if not rgurl: msg = "No remote gradebook url defined in settings.MITX_FEATURES" return msg, {} - rgname = rg.get('name','') + rgname = rg.get('name', '') if not rgname: msg = "No gradebook name defined in course remote_gradebook metadata" return msg, {} @@ -606,8 +608,8 @@ def _do_remote_gradebook(user, course, action, args=None, files=None): msg += "
                  data=%s" % data return msg, {} - msg = '
                  %s
                  ' % retdict['msg'].replace('\n','
                  ') - retdata = retdict['data'] # a list of dicts + msg = '
                  %s
                  ' % retdict['msg'].replace('\n', '
                  ') + retdata = retdict['data'] # a list of dicts if retdata: datatable = {'header': retdata[0].keys()} @@ -619,6 +621,7 @@ def _do_remote_gradebook(user, course, action, args=None, files=None): return msg, datatable + def _list_course_forum_members(course_id, rolename, datatable): """ Fills in datatable with forum membership information, for a given role, @@ -672,7 +675,7 @@ def _update_forum_role_membership(uname, course, rolename, add_or_remove): log.debug('rolename={0}'.format(rolename)) if add_or_remove == FORUM_ROLE_REMOVE: if not alreadyexists: - msg ='Error: user "{0}" does not have rolename "{1}", cannot remove'.format(uname, rolename) + msg = 'Error: user "{0}" does not have rolename "{1}", cannot remove'.format(uname, rolename) else: user.roles.remove(role) msg = 'Removed "{0}" from "{1}" forum role = "{2}"'.format(user, course.id, rolename) @@ -688,6 +691,7 @@ def _update_forum_role_membership(uname, course, rolename, add_or_remove): return msg + def _group_members_table(group, title, course_id): """ Return a data table of usernames and names of users in group_name. @@ -756,6 +760,7 @@ def add_user_to_group(request, username_or_email, group, group_title, event_name """ return _add_or_remove_user_group(request, username_or_email, group, group_title, event_name, True) + def remove_user_from_group(request, username_or_email, group, group_title, event_name): """ Look up the given user by username (if no '@') or email (otherwise), and remove them from group. @@ -809,22 +814,22 @@ def get_student_grade_summary_data(request, course, course_id, get_grades=True, data = [] for student in enrolled_students: - datarow = [ student.id, student.username, student.profile.name, student.email ] + datarow = [student.id, student.username, student.profile.name, student.email] try: datarow.append(student.externalauthmap.external_email) - except: # ExternalAuthMap.DoesNotExist + except: # ExternalAuthMap.DoesNotExist datarow.append('') if get_grades: gradeset = student_grades(student, request, course, keep_raw_scores=get_raw_scores, use_offline=use_offline) - log.debug('student={0}, gradeset={1}'.format(student,gradeset)) + log.debug('student={0}, gradeset={1}'.format(student, gradeset)) if get_raw_scores: # TODO (ichuang) encode Score as dict instead of as list, so score[0] -> score['earned'] - sgrades = [(getattr(score,'earned','') or score[0]) for score in gradeset['raw_scores']] + sgrades = [(getattr(score, 'earned', '') or score[0]) for score in gradeset['raw_scores']] else: sgrades = [x['percent'] for x in gradeset['section_breakdown']] datarow += sgrades - student.grades = sgrades # store in student object + student.grades = sgrades # store in student object data.append(datarow) datatable['data'] = data @@ -832,6 +837,7 @@ def get_student_grade_summary_data(request, course, course_id, get_grades=True, #----------------------------------------------------------------------------- + @cache_control(no_cache=True, no_store=True, must_revalidate=True) def gradebook(request, course_id): """ @@ -886,9 +892,9 @@ def _do_enroll_students(course, course_id, students, overload=False): if '' in new_students: new_students.remove('') - status = dict([x,'unprocessed'] for x in new_students) + status = dict([x, 'unprocessed'] for x in new_students) - if overload: # delete all but staff + if overload: # delete all but staff todelete = CourseEnrollment.objects.filter(course_id=course_id) for ce in todelete: if not has_access(ce.user, course, 'staff') and ce.user.email.lower() not in new_students_lc: @@ -903,7 +909,7 @@ def _do_enroll_students(course, course_id, students, overload=False): for student in new_students: try: - user=User.objects.get(email=student) + user = User.objects.get(email=student) except User.DoesNotExist: # user not signed up yet, put in pending enrollment allowed table if CourseEnrollmentAllowed.objects.filter(email=student, course_id=course_id): @@ -928,9 +934,9 @@ def _do_enroll_students(course, course_id, students, overload=False): datatable['data'] = [[x, status[x]] for x in status] datatable['title'] = 'Enrollment of students' - def sf(stat): return [x for x in status if status[x]==stat] + def sf(stat): return [x for x in status if status[x] == stat] - data = dict(added=sf('added'), rejected=sf('rejected')+sf('exists'), + data = dict(added=sf('added'), rejected=sf('rejected') + sf('exists'), deleted=sf('deleted'), datatable=datatable) return data @@ -1013,5 +1019,5 @@ def compute_course_stats(course): walk(c) walk(course) - stats = dict(counts) # number of each kind of module + stats = dict(counts) # number of each kind of module return stats diff --git a/lms/djangoapps/licenses/migrations/0001_initial.py b/lms/djangoapps/licenses/migrations/0001_initial.py index bdc1d3ead4..365046272d 100644 --- a/lms/djangoapps/licenses/migrations/0001_initial.py +++ b/lms/djangoapps/licenses/migrations/0001_initial.py @@ -115,4 +115,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['licenses'] \ No newline at end of file + complete_apps = ['licenses'] diff --git a/lms/djangoapps/lms_migration/management/commands/create_groups.py b/lms/djangoapps/lms_migration/management/commands/create_groups.py index 7b52795606..95c9e4238b 100644 --- a/lms/djangoapps/lms_migration/management/commands/create_groups.py +++ b/lms/djangoapps/lms_migration/management/commands/create_groups.py @@ -4,7 +4,10 @@ # # Create all staff_* groups for classes in data directory. -import os, sys, string, re +import os +import sys +import string +import re from django.core.management.base import BaseCommand from django.conf import settings @@ -12,6 +15,7 @@ from django.contrib.auth.models import User, Group from path import path from lxml import etree + def create_groups(): ''' Create staff and instructor groups for all classes in the data_dir @@ -26,7 +30,7 @@ def create_groups(): continue if not os.path.isdir(path(data_dir) / course_dir): continue - + cxfn = path(data_dir) / course_dir / 'course.xml' try: coursexml = etree.parse(cxfn) @@ -38,11 +42,12 @@ def create_groups(): if course is None: print "oops, can't get course id for %s" % course_dir continue - print "course=%s for course_dir=%s" % (course,course_dir) - + print "course=%s for course_dir=%s" % (course, course_dir) + create_group('staff_%s' % course) # staff group create_group('instructor_%s' % course) # instructor group (can manage staff group list) + def create_group(gname): if Group.objects.filter(name=gname): print " group exists for %s" % gname @@ -51,6 +56,7 @@ def create_group(gname): g.save() print " created group %s" % gname + class Command(BaseCommand): help = "Create groups associated with all courses in data_dir." diff --git a/lms/djangoapps/lms_migration/management/commands/create_user.py b/lms/djangoapps/lms_migration/management/commands/create_user.py index 7d39accc44..86b355e571 100644 --- a/lms/djangoapps/lms_migration/management/commands/create_user.py +++ b/lms/djangoapps/lms_migration/management/commands/create_user.py @@ -4,7 +4,10 @@ # # Create user. Prompt for groups and ExternalAuthMap -import os, sys, string, re +import os +import sys +import string +import re import datetime from getpass import getpass import json @@ -16,6 +19,7 @@ from student.models import UserProfile, Registration from external_auth.models import ExternalAuthMap from django.contrib.auth.models import User, Group + class MyCompleter(object): # Custom completer def __init__(self, options): @@ -24,23 +28,25 @@ class MyCompleter(object): # Custom completer def complete(self, text, state): if state == 0: # on first trigger, build possible matches if text: # cache matches (entries that start with entered text) - self.matches = [s for s in self.options + self.matches = [s for s in self.options if s and s.startswith(text)] else: # no text entered, all matches possible self.matches = self.options[:] # return match indexed by state - try: + try: return self.matches[state] except IndexError: return None + def GenPasswd(length=8, chars=string.letters + string.digits): return ''.join([choice(chars) for i in range(length)]) #----------------------------------------------------------------------------- # main command + class Command(BaseCommand): help = "Create user, interactively; can add ExternalAuthMap for MIT user if email@MIT.EDU resolves properly." @@ -52,27 +58,27 @@ class Command(BaseCommand): print "username %s already taken" % uname else: break - + make_eamap = False - if raw_input('Create MIT ExternalAuth? [n] ').lower()=='y': + if raw_input('Create MIT ExternalAuth? [n] ').lower() == 'y': email = '%s@MIT.EDU' % uname if not email.endswith('@MIT.EDU'): print "Failed - email must be @MIT.EDU" sys.exit(-1) mit_domain = 'ssl:MIT' - if ExternalAuthMap.objects.filter(external_id = email, external_domain = mit_domain): + if ExternalAuthMap.objects.filter(external_id=email, external_domain=mit_domain): print "Failed - email %s already exists as external_id" % email sys.exit(-1) make_eamap = True password = GenPasswd(12) - + # get name from kerberos try: kname = os.popen("finger %s | grep 'name:'" % email).read().strip().split('name: ')[1].strip() except: kname = '' name = raw_input('Full name: [%s] ' % kname).strip() - if name=='': + if name == '': name = kname print "name = %s" % name else: @@ -82,17 +88,17 @@ class Command(BaseCommand): if password == password2: break print "Oops, passwords do not match, please retry" - + while True: email = raw_input('email: ') if User.objects.filter(email=email): print "email %s already taken" % email else: break - + name = raw_input('Full name: ') - - + + user = User(username=uname, email=email, is_active=True) user.set_password(password) try: @@ -100,41 +106,41 @@ class Command(BaseCommand): except IntegrityError: print "Oops, failed to create user %s, IntegrityError" % user raise - + r = Registration() r.register(user) - + up = UserProfile(user=user) up.name = name up.save() - + if make_eamap: - credentials = "/C=US/ST=Massachusetts/O=Massachusetts Institute of Technology/OU=Client CA v1/CN=%s/emailAddress=%s" % (name,email) - eamap = ExternalAuthMap(external_id = email, - external_email = email, - external_domain = mit_domain, - external_name = name, - internal_password = password, - external_credentials = json.dumps(credentials), + credentials = "/C=US/ST=Massachusetts/O=Massachusetts Institute of Technology/OU=Client CA v1/CN=%s/emailAddress=%s" % (name, email) + eamap = ExternalAuthMap(external_id=email, + external_email=email, + external_domain=mit_domain, + external_name=name, + internal_password=password, + external_credentials=json.dumps(credentials), ) eamap.user = user eamap.dtsignup = datetime.datetime.now() eamap.save() - + print "User %s created successfully!" % user - - if not raw_input('Add user %s to any groups? [n] ' % user).lower()=='y': + + if not raw_input('Add user %s to any groups? [n] ' % user).lower() == 'y': sys.exit(0) - + print "Here are the groups available:" - + groups = [str(g.name) for g in Group.objects.all()] print groups - + completer = MyCompleter(groups) readline.set_completer(completer.complete) readline.parse_and_bind('tab: complete') - + while True: gname = raw_input("Add group (tab to autocomplete, empty line to end): ") if not gname: @@ -144,6 +150,6 @@ class Command(BaseCommand): continue g = Group.objects.get(name=gname) user.groups.add(g) - print "Added %s to group %s" % (user,g) - + print "Added %s to group %s" % (user, g) + print "Done!" diff --git a/lms/djangoapps/lms_migration/management/commands/manage_course_groups.py b/lms/djangoapps/lms_migration/management/commands/manage_course_groups.py index f3a39db5ca..b63ef7859b 100644 --- a/lms/djangoapps/lms_migration/management/commands/manage_course_groups.py +++ b/lms/djangoapps/lms_migration/management/commands/manage_course_groups.py @@ -4,7 +4,10 @@ # # interactively list and edit membership in course staff and instructor groups -import os, sys, string, re +import os +import sys +import string +import re import datetime from getpass import getpass import json @@ -17,26 +20,27 @@ from django.contrib.auth.models import User, Group #----------------------------------------------------------------------------- # get all staff groups + class Command(BaseCommand): help = "Manage course group membership, interactively." def handle(self, *args, **options): gset = Group.objects.all() - + print "Groups:" - for cnt,g in zip(range(len(gset)), gset): - print "%d. %s" % (cnt,g) - + for cnt, g in zip(range(len(gset)), gset): + print "%d. %s" % (cnt, g) + gnum = int(raw_input('Choose group to manage (enter #): ')) - + group = gset[gnum] - + #----------------------------------------------------------------------------- # users in group - + uall = User.objects.all() - if uall.count()<50: + if uall.count() < 50: print "----" print "List of All Users: %s" % [str(x.username) for x in uall] print "----" @@ -44,24 +48,24 @@ class Command(BaseCommand): print "----" print "There are %d users, which is too many to list" % uall.count() print "----" - + while True: - + print "Users in the group:" - + uset = group.user_set.all() for cnt, u in zip(range(len(uset)), uset): print "%d. %s" % (cnt, u) - + action = raw_input('Choose user to delete (enter #) or enter usernames (comma delim) to add: ') - - m = re.match('^[0-9]+$',action) + + m = re.match('^[0-9]+$', action) if m: unum = int(action) u = uset[unum] print "Deleting user %s" % u u.groups.remove(group) - + else: for uname in action.split(','): try: @@ -71,6 +75,3 @@ class Command(BaseCommand): continue print "adding %s to group %s" % (user, group) user.groups.add(group) - - - diff --git a/lms/djangoapps/lms_migration/migrate.py b/lms/djangoapps/lms_migration/migrate.py index ecde31d6dd..9cdc783bb9 100644 --- a/lms/djangoapps/lms_migration/migrate.py +++ b/lms/djangoapps/lms_migration/migrate.py @@ -22,29 +22,32 @@ log = logging.getLogger("mitx.lms_migrate") LOCAL_DEBUG = True ALLOWED_IPS = settings.LMS_MIGRATION_ALLOWED_IPS + def escape(s): """escape HTML special characters in string""" - return str(s).replace('<','<').replace('>','>') + return str(s).replace('<', '<').replace('>', '>') + def getip(request): ''' Extract IP address of requester from header, even if behind proxy ''' - ip = request.META.get('HTTP_X_REAL_IP','') # nginx reverse proxy + ip = request.META.get('HTTP_X_REAL_IP', '') # nginx reverse proxy if not ip: - ip = request.META.get('REMOTE_ADDR','None') + ip = request.META.get('REMOTE_ADDR', 'None') return ip 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') # getattr(def_ms.courses[reload_dir], 'GIT_COMMIT_ID','No commit id') -def set_commit_id(course,commit_id): +def set_commit_id(course, commit_id): course.metadata['GIT_COMMIT_ID'] = commit_id # setattr(def_ms.courses[reload_dir], 'GIT_COMMIT_ID', new_commit_id) + def manage_modulestores(request, reload_dir=None, commit_id=None): ''' Manage the static in-memory modulestores. @@ -65,7 +68,7 @@ def manage_modulestores(request, reload_dir=None, commit_id=None): html += '

                  IP address: %s

                  ' % ip html += '

                  User: %s

                  ' % request.user html += '

                  My pid: %s

                  ' % os.getpid() - log.debug('request from ip=%s, user=%s' % (ip,request.user)) + log.debug('request from ip=%s, user=%s' % (ip, request.user)) if not (ip in ALLOWED_IPS or 'any' in ALLOWED_IPS): if request.user and request.user.is_staff: @@ -89,7 +92,7 @@ def manage_modulestores(request, reload_dir=None, commit_id=None): log.debug('commit_id="%s"' % commit_id) log.debug('current_commit_id="%s"' % current_commit_id) - if (commit_id is not None) and (commit_id==current_commit_id): + if (commit_id is not None) and (commit_id == current_commit_id): html += "

                  Already at commit id %s for %s

                  " % (commit_id, reload_dir) track.views.server_track(request, 'reload %s skipped already at %s (pid=%s)' % (reload_dir, @@ -100,7 +103,7 @@ def manage_modulestores(request, reload_dir=None, commit_id=None): else: html += '

                  Reloaded course directory "%s"

                  ' % reload_dir def_ms.try_load_course(reload_dir) - gdir = settings.DATA_DIR / reload_dir + gdir = settings.DATA_DIR / reload_dir new_commit_id = os.popen('cd %s; git log -n 1 | head -1' % gdir).read().strip().split(' ')[1] set_commit_id(def_ms.courses[reload_dir], new_commit_id) html += '

                  commit_id=%s

                  ' % new_commit_id @@ -121,21 +124,21 @@ def manage_modulestores(request, reload_dir=None, commit_id=None): #---------------------------------------- - dumpfields = ['definition','location','metadata'] + dumpfields = ['definition', 'location', 'metadata'] for cdir, course in def_ms.courses.items(): html += '
                  ' - html += '

                  Course: %s (%s)

                  ' % (course.display_name,cdir) + html += '

                  Course: %s (%s)

                  ' % (course.display_name, cdir) html += '

                  commit_id=%s

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

                  %s

                  ' % field - if type(data)==dict: + if type(data) == dict: html += '
                    ' - for k,v in data.items(): - html += '
                  • %s:%s
                  • ' % (escape(k),escape(v)) + for k, v in data.items(): + html += '
                  • %s:%s
                  • ' % (escape(k), escape(v)) html += '
                  ' else: html += '
                  • %s
                  ' % escape(data) @@ -159,6 +162,7 @@ def manage_modulestores(request, reload_dir=None, commit_id=None): html += "" return HttpResponse(html) + @csrf_exempt def gitreload(request, reload_dir=None): ''' @@ -172,8 +176,8 @@ def gitreload(request, reload_dir=None): html += '

                  IP address: %s ' % ip html += '

                  User: %s ' % request.user - ALLOWED_IPS = [] # allow none by default - if hasattr(settings,'ALLOWED_GITRELOAD_IPS'): # allow override in settings + ALLOWED_IPS = [] # allow none by default + if hasattr(settings, 'ALLOWED_GITRELOAD_IPS'): # allow override in settings ALLOWED_IPS = settings.ALLOWED_GITRELOAD_IPS if not (ip in ALLOWED_IPS or 'any' in ALLOWED_IPS): @@ -182,9 +186,9 @@ def gitreload(request, reload_dir=None): else: html += 'Permission denied' html += "" - log.debug('request denied from %s, ALLOWED_IPS=%s' % (ip,ALLOWED_IPS)) - return HttpResponse(html) - + log.debug('request denied from %s, ALLOWED_IPS=%s' % (ip, ALLOWED_IPS)) + return HttpResponse(html) + #---------------------------------------- # see if request is from github (POST with JSON) @@ -195,19 +199,19 @@ def gitreload(request, reload_dir=None): log.debug("gitargs=%s" % gitargs) reload_dir = gitargs['repository']['name'] log.debug("github reload_dir=%s" % reload_dir) - gdir = settings.DATA_DIR / reload_dir + gdir = settings.DATA_DIR / reload_dir if not os.path.exists(gdir): log.debug("====> ERROR in gitreload - no such directory %s" % reload_dir) return HttpResponse('Error') cmd = "cd %s; git reset --hard HEAD; git clean -f -d; git pull origin; chmod g+w course.xml" % gdir log.debug(os.popen(cmd).read()) - if hasattr(settings,'GITRELOAD_HOOK'): # hit this hook after reload, if set + if hasattr(settings, 'GITRELOAD_HOOK'): # hit this hook after reload, if set gh = settings.GITRELOAD_HOOK if gh: - ghurl = '%s/%s' % (gh,reload_dir) + ghurl = '%s/%s' % (gh, reload_dir) r = requests.get(ghurl) log.debug("GITRELOAD_HOOK to %s: %s" % (ghurl, r.text)) - + #---------------------------------------- # reload course if specified @@ -220,4 +224,4 @@ def gitreload(request, reload_dir=None): def_ms.try_load_course(reload_dir) track.views.server_track(request, 'reloaded %s' % reload_dir, {}, page='migrate') - return HttpResponse(html) + return HttpResponse(html) diff --git a/lms/djangoapps/open_ended_grading/controller_query_service.py b/lms/djangoapps/open_ended_grading/controller_query_service.py index 5d2c40b6ce..83d5617bd2 100644 --- a/lms/djangoapps/open_ended_grading/controller_query_service.py +++ b/lms/djangoapps/open_ended_grading/controller_query_service.py @@ -12,12 +12,13 @@ from mitxmako.shortcuts import render_to_string log = logging.getLogger(__name__) + class ControllerQueryService(GradingService): """ Interface to staff grading backend. """ def __init__(self, config): - config['system'] = ModuleSystem(None,None,None,render_to_string,None) + config['system'] = ModuleSystem(None, None, None, render_to_string, None) super(ControllerQueryService, self).__init__(config) self.check_eta_url = self.url + '/get_submission_eta/' self.is_unique_url = self.url + '/is_name_unique/' @@ -29,34 +30,34 @@ class ControllerQueryService(GradingService): def check_if_name_is_unique(self, location, problem_id, course_id): params = { 'course_id': course_id, - 'location' : location, - 'problem_id' : problem_id + 'location': location, + 'problem_id': problem_id } response = self.get(self.is_unique_url, params) return response def check_for_eta(self, location): params = { - 'location' : location, + 'location': location, } response = self.get(self.check_eta_url, params) return response def check_combined_notifications(self, course_id, student_id, user_is_staff, last_time_viewed): - params= { - 'student_id' : student_id, - 'course_id' : course_id, - 'user_is_staff' : user_is_staff, - 'last_time_viewed' : last_time_viewed, + params = { + 'student_id': student_id, + 'course_id': course_id, + 'user_is_staff': user_is_staff, + 'last_time_viewed': last_time_viewed, } log.debug(self.combined_notifications_url) - response = self.get(self.combined_notifications_url,params) + response = self.get(self.combined_notifications_url, params) return response def get_grading_status_list(self, course_id, student_id): params = { - 'student_id' : student_id, - 'course_id' : course_id, + 'student_id': student_id, + 'course_id': course_id, } response = self.get(self.grading_status_list_url, params) @@ -64,7 +65,7 @@ class ControllerQueryService(GradingService): def get_flagged_problem_list(self, course_id): params = { - 'course_id' : course_id, + 'course_id': course_id, } response = self.get(self.flagged_problem_list_url, params) @@ -72,12 +73,11 @@ class ControllerQueryService(GradingService): def take_action_on_flags(self, course_id, student_id, submission_id, action_type): params = { - 'course_id' : course_id, - 'student_id' : student_id, - 'submission_id' : submission_id, - 'action_type' : action_type + 'course_id': course_id, + 'student_id': student_id, + 'submission_id': submission_id, + 'action_type': action_type } response = self.post(self.take_action_on_flags_url, params) return response - diff --git a/lms/djangoapps/open_ended_grading/open_ended_notifications.py b/lms/djangoapps/open_ended_grading/open_ended_notifications.py index b8b323acad..f79013e396 100644 --- a/lms/djangoapps/open_ended_grading/open_ended_notifications.py +++ b/lms/djangoapps/open_ended_grading/open_ended_notifications.py @@ -14,7 +14,7 @@ from xmodule import peer_grading_service from xmodule.x_module import ModuleSystem from mitxmako.shortcuts import render_to_string -log=logging.getLogger(__name__) +log = logging.getLogger(__name__) NOTIFICATION_CACHE_TIME = 300 KEY_PREFIX = "open_ended_" @@ -26,10 +26,11 @@ NOTIFICATION_TYPES = ( ('flagged_submissions_exist', 'open_ended_flagged_problems', 'Flagged Submissions') ) + def staff_grading_notifications(course, user): staff_gs = StaffGradingService(settings.STAFF_GRADING_INTERFACE) - pending_grading=False - img_path= "" + pending_grading = False + img_path = "" course_id = course.id student_id = unique_id_for_user(user) notification_type = "staff" @@ -42,7 +43,7 @@ def staff_grading_notifications(course, user): notifications = json.loads(staff_gs.get_notifications(course_id)) if notifications['success']: if notifications['staff_needs_to_grade']: - pending_grading=True + pending_grading = True except: #Non catastrophic error, so no real action notifications = {} @@ -51,17 +52,18 @@ def staff_grading_notifications(course, user): if pending_grading: img_path = "/static/images/slider-handle.png" - notification_dict = {'pending_grading' : pending_grading, 'img_path' : img_path, 'response' : notifications} + notification_dict = {'pending_grading': pending_grading, 'img_path': img_path, 'response': notifications} set_value_in_cache(student_id, course_id, notification_type, notification_dict) return notification_dict + def peer_grading_notifications(course, user): - system = ModuleSystem(None,None,None,render_to_string,None) + system = ModuleSystem(None, None, None, render_to_string, None) peer_gs = peer_grading_service.PeerGradingService(settings.PEER_GRADING_INTERFACE, system) - pending_grading=False - img_path= "" + pending_grading = False + img_path = "" course_id = course.id student_id = unique_id_for_user(user) notification_type = "peer" @@ -71,10 +73,10 @@ def peer_grading_notifications(course, user): return notification_dict try: - notifications = json.loads(peer_gs.get_notifications(course_id,student_id)) + notifications = json.loads(peer_gs.get_notifications(course_id, student_id)) if notifications['success']: if notifications['student_needs_to_peer_grade']: - pending_grading=True + pending_grading = True except: #Non catastrophic error, so no real action notifications = {} @@ -83,12 +85,13 @@ def peer_grading_notifications(course, user): if pending_grading: img_path = "/static/images/slider-handle.png" - notification_dict = {'pending_grading' : pending_grading, 'img_path' : img_path, 'response' : notifications} + notification_dict = {'pending_grading': pending_grading, 'img_path': img_path, 'response': notifications} set_value_in_cache(student_id, course_id, notification_type, notification_dict) return notification_dict + def combined_notifications(course, user): controller_url = open_ended_util.get_controller_url() controller_qs = ControllerQueryService(controller_url) @@ -102,24 +105,24 @@ def combined_notifications(course, user): return notification_dict min_time_to_query = user.last_login - last_module_seen = StudentModule.objects.filter(student=user, course_id = course_id, modified__gt=min_time_to_query).values('modified').order_by('-modified') + last_module_seen = StudentModule.objects.filter(student=user, course_id=course_id, modified__gt=min_time_to_query).values('modified').order_by('-modified') last_module_seen_count = last_module_seen.count() - if last_module_seen_count>0: + if last_module_seen_count > 0: last_time_viewed = last_module_seen[0]['modified'] - datetime.timedelta(seconds=(NOTIFICATION_CACHE_TIME + 60)) else: last_time_viewed = user.last_login - pending_grading= False + pending_grading = False - img_path= "" + img_path = "" try: - controller_response = controller_qs.check_combined_notifications(course.id,student_id, user_is_staff, last_time_viewed) + controller_response = controller_qs.check_combined_notifications(course.id, student_id, user_is_staff, last_time_viewed) log.debug(controller_response) notifications = json.loads(controller_response) if notifications['success']: if notifications['overall_need_to_check']: - pending_grading=True + pending_grading = True except: #Non catastrophic error, so no real action notifications = {} @@ -128,36 +131,41 @@ def combined_notifications(course, user): if pending_grading: img_path = "/static/images/slider-handle.png" - notification_dict = {'pending_grading' : pending_grading, 'img_path' : img_path, 'response' : notifications} + notification_dict = {'pending_grading': pending_grading, 'img_path': img_path, 'response': notifications} set_value_in_cache(student_id, course_id, notification_type, notification_dict) return notification_dict + def get_value_from_cache(student_id, course_id, notification_type): key_name = create_key_name(student_id, course_id, notification_type) success, value = _get_value_from_cache(key_name) return success, value + def set_value_in_cache(student_id, course_id, notification_type, value): key_name = create_key_name(student_id, course_id, notification_type) _set_value_in_cache(key_name, value) + def create_key_name(student_id, course_id, notification_type): key_name = "{prefix}{type}_{course}_{student}".format(prefix=KEY_PREFIX, type=notification_type, course=course_id, student=student_id) return key_name + def _get_value_from_cache(key_name): value = cache.get(key_name) success = False if value is None: - return success , value + return success, value try: value = json.loads(value) success = True except: pass - return success , value + return success, value + def _set_value_in_cache(key_name, value): - cache.set(key_name, json.dumps(value), NOTIFICATION_CACHE_TIME) \ No newline at end of file + cache.set(key_name, json.dumps(value), NOTIFICATION_CACHE_TIME) diff --git a/lms/djangoapps/open_ended_grading/open_ended_util.py b/lms/djangoapps/open_ended_grading/open_ended_util.py index 07744d7d2c..1aa0f1ba70 100644 --- a/lms/djangoapps/open_ended_grading/open_ended_util.py +++ b/lms/djangoapps/open_ended_grading/open_ended_util.py @@ -1,12 +1,13 @@ from django.conf import settings import logging -log=logging.getLogger(__name__) +log = logging.getLogger(__name__) + def get_controller_url(): peer_grading_url = settings.PEER_GRADING_INTERFACE['url'] split_url = peer_grading_url.split("/") controller_url = "http://" + split_url[2] + "/grading_controller" - controller_settings=settings.PEER_GRADING_INTERFACE.copy() + controller_settings = settings.PEER_GRADING_INTERFACE.copy() controller_settings['url'] = controller_url return controller_settings diff --git a/lms/djangoapps/open_ended_grading/staff_grading.py b/lms/djangoapps/open_ended_grading/staff_grading.py index 7a48b25a49..e39b26da56 100644 --- a/lms/djangoapps/open_ended_grading/staff_grading.py +++ b/lms/djangoapps/open_ended_grading/staff_grading.py @@ -22,4 +22,3 @@ class StaffGrading(object): return "Instructor grading!" # context = {} # return render_to_string('courseware/instructor_grading_view.html', context) - diff --git a/lms/djangoapps/open_ended_grading/staff_grading_service.py b/lms/djangoapps/open_ended_grading/staff_grading_service.py index d8bee99ac7..dfadacb724 100644 --- a/lms/djangoapps/open_ended_grading/staff_grading_service.py +++ b/lms/djangoapps/open_ended_grading/staff_grading_service.py @@ -21,6 +21,7 @@ from mitxmako.shortcuts import render_to_string log = logging.getLogger(__name__) + class MockStaffGradingService(object): """ A simple mockup of a staff grading service, testing. @@ -28,7 +29,7 @@ class MockStaffGradingService(object): def __init__(self): self.cnt = 0 - def get_next(self,course_id, location, grader_id): + def get_next(self, course_id, location, grader_id): self.cnt += 1 return json.dumps({'success': True, 'submission_id': self.cnt, @@ -61,7 +62,7 @@ class StaffGradingService(GradingService): Interface to staff grading backend. """ def __init__(self, config): - config['system'] = ModuleSystem(None,None,None,render_to_string,None) + config['system'] = ModuleSystem(None, None, None, render_to_string, None) super(StaffGradingService, self).__init__(config) self.get_next_url = self.url + '/get_next_submission/' self.save_grade_url = self.url + '/save_grade/' @@ -85,7 +86,7 @@ class StaffGradingService(GradingService): Raises: GradingServiceError: something went wrong with the connection. """ - params = {'course_id': course_id,'grader_id': grader_id} + params = {'course_id': course_id, 'grader_id': grader_id} return self.get(self.get_problem_list_url, params) @@ -166,6 +167,7 @@ def staff_grading_service(): return _service + def _err_response(msg): """ Return a HttpResponse with a json dump with success=False, and the given error message. @@ -329,4 +331,3 @@ def save_grade(request, course_id): # Ok, save_grade seemed to work. Get the next submission to grade. return HttpResponse(_get_next(course_id, grader_id, location), mimetype="application/json") - diff --git a/lms/djangoapps/open_ended_grading/tests.py b/lms/djangoapps/open_ended_grading/tests.py index 3ee8352c5c..4d220d4baa 100644 --- a/lms/djangoapps/open_ended_grading/tests.py +++ b/lms/djangoapps/open_ended_grading/tests.py @@ -44,7 +44,7 @@ class TestStaffGradingService(ct.PageLoader): self.create_account('u2', self.instructor, self.password) self.activate_user(self.student) self.activate_user(self.instructor) - + self.course_id = "edX/toy/2012_Fall" self.toy = modulestore().get_course(self.course_id) def make_instructor(course): @@ -118,7 +118,7 @@ class TestStaffGradingService(ct.PageLoader): self.assertTrue(d['success'], str(d)) self.assertIsNotNone(d['problem_list']) - + @override_settings(MODULESTORE=ct.TEST_DATA_XML_MODULESTORE) class TestPeerGradingService(ct.PageLoader): ''' @@ -137,7 +137,7 @@ class TestPeerGradingService(ct.PageLoader): self.create_account('u2', self.instructor, self.password) self.activate_user(self.student) self.activate_user(self.instructor) - + self.course_id = "edX/toy/2012_Fall" self.toy = modulestore().get_course(self.course_id) location = "i4x://edX/toy/peergrading/init" @@ -146,7 +146,7 @@ class TestPeerGradingService(ct.PageLoader): self.system = ModuleSystem(location, None, None, render_to_string, None) self.descriptor = peer_grading_module.PeerGradingDescriptor(self.system) - self.peer_module = peer_grading_module.PeerGradingModule(self.system,location,"",self.descriptor) + self.peer_module = peer_grading_module.PeerGradingModule(self.system, location, "", self.descriptor) self.peer_module.peer_gs = self.mock_service self.logout() @@ -171,7 +171,7 @@ class TestPeerGradingService(ct.PageLoader): def test_save_grade_success(self): raise SkipTest() data = 'rubric_scores[]=1|rubric_scores[]=2|location=' + self.location + '|submission_id=1|submission_key=fake key|score=2|feedback=feedback|submission_flagged=False' - qdict = QueryDict(data.replace("|","&")) + qdict = QueryDict(data.replace("|", "&")) r = self.peer_module.save_grade(qdict) d = r self.assertTrue(d['success']) @@ -222,7 +222,7 @@ class TestPeerGradingService(ct.PageLoader): def test_save_calibration_essay_success(self): raise SkipTest() data = 'rubric_scores[]=1|rubric_scores[]=2|location=' + self.location + '|submission_id=1|submission_key=fake key|score=2|feedback=feedback|submission_flagged=False' - qdict = QueryDict(data.replace("|","&")) + qdict = QueryDict(data.replace("|", "&")) r = self.peer_module.save_calibration_essay(qdict) d = r self.assertTrue(d['success']) @@ -235,4 +235,3 @@ class TestPeerGradingService(ct.PageLoader): self.assertFalse(d['success']) self.assertTrue(d['error'].find('Missing required keys:') > -1) self.assertFalse('actual_score' in d) - diff --git a/lms/djangoapps/open_ended_grading/views.py b/lms/djangoapps/open_ended_grading/views.py index af7f930207..f2e2a4513e 100644 --- a/lms/djangoapps/open_ended_grading/views.py +++ b/lms/djangoapps/open_ended_grading/views.py @@ -10,7 +10,7 @@ from mitxmako.shortcuts import render_to_response from django.core.urlresolvers import reverse from student.models import unique_id_for_user -from courseware.courses import get_course_with_access +from courseware.courses import get_course_with_access from controller_query_service import ControllerQueryService from xmodule.grading_service_module import GradingServiceError @@ -38,12 +38,15 @@ Reverses the URL from the name and the course id, and then adds a trailing slash it does not exist yet """ + + def _reverse_with_slash(url_name, course_id): ajax_url = _reverse_without_slash(url_name, course_id) if not ajax_url.endswith('/'): ajax_url += '/' return ajax_url + def _reverse_without_slash(url_name, course_id): ajax_url = reverse(url_name, kwargs={'course_id': course_id}) return ajax_url @@ -52,14 +55,16 @@ DESCRIPTION_DICT = { 'Peer Grading': "View all problems that require peer assessment in this particular course.", 'Staff Grading': "View ungraded submissions submitted by students for the open ended problems in the course.", 'Problems you have submitted': "View open ended problems that you have previously submitted for grading.", - 'Flagged Submissions' : "View submissions that have been flagged by students as inappropriate." + 'Flagged Submissions': "View submissions that have been flagged by students as inappropriate." } ALERT_DICT = { 'Peer Grading': "New submissions to grade", 'Staff Grading': "New submissions to grade", 'Problems you have submitted': "New grades have been returned", - 'Flagged Submissions' : "Submissions have been flagged for review" + 'Flagged Submissions': "Submissions have been flagged for review" } + + @cache_control(no_cache=True, no_store=True, must_revalidate=True) def staff_grading(request, course_id): """ @@ -68,7 +73,7 @@ def staff_grading(request, course_id): course = get_course_with_access(request.user, course_id, 'staff') ajax_url = _reverse_with_slash('staff_grading', course_id) - + return render_to_response('instructor/staff_grading.html', { 'course': course, 'course_id': course_id, @@ -76,6 +81,7 @@ def staff_grading(request, course_id): # Checked above 'staff_access': True, }) + @cache_control(no_cache=True, no_store=True, must_revalidate=True) def peer_grading(request, course_id): ''' @@ -98,6 +104,7 @@ def peer_grading(request, course_id): log.exception(error_message + "Current course is: {0}".format(course_id)) return HttpResponse(error_message) + def generate_problem_url(problem_url_parts, base_course_url): """ From a list of problem url parts generated by search.path_to_location and a base course url, generates a url to a problem @@ -106,10 +113,10 @@ def generate_problem_url(problem_url_parts, base_course_url): @return: A path to the problem """ problem_url = base_course_url + "/" - for z in xrange(0,len(problem_url_parts)): + for z in xrange(0, len(problem_url_parts)): part = problem_url_parts[z] if part is not None: - if z==1: + if z == 1: problem_url += "courseware/" problem_url += part + "/" return problem_url @@ -139,10 +146,10 @@ def student_problem_list(request, course_id): else: problem_list = problem_list_dict['problem_list'] - for i in xrange(0,len(problem_list)): + for i in xrange(0, len(problem_list)): problem_url_parts = search.path_to_location(modulestore(), course.id, problem_list[i]['location']) problem_url = generate_problem_url(problem_url_parts, base_course_url) - problem_list[i].update({'actual_url' : problem_url}) + problem_list[i].update({'actual_url': problem_url}) """ except GradingServiceError: @@ -166,6 +173,7 @@ def student_problem_list(request, course_id): # Checked above 'staff_access': False, }) + @cache_control(no_cache=True, no_store=True, must_revalidate=True) def flagged_problem_list(request, course_id): ''' @@ -186,7 +194,7 @@ def flagged_problem_list(request, course_id): success = problem_list_dict['success'] if 'error' in problem_list_dict: error_text = problem_list_dict['error'] - problem_list=[] + problem_list = [] else: problem_list = problem_list_dict['flagged_submissions'] @@ -211,6 +219,7 @@ def flagged_problem_list(request, course_id): } return render_to_response('open_ended_problems/open_ended_flagged_problems.html', context) + @cache_control(no_cache=True, no_store=True, must_revalidate=True) def combined_notifications(request, course_id): """ @@ -220,11 +229,11 @@ def combined_notifications(request, course_id): user = request.user notifications = open_ended_notifications.combined_notifications(course, user) response = notifications['response'] - notification_tuples=open_ended_notifications.NOTIFICATION_TYPES + notification_tuples = open_ended_notifications.NOTIFICATION_TYPES notification_list = [] - for response_num in xrange(0,len(notification_tuples)): - tag=notification_tuples[response_num][0] + for response_num in xrange(0, len(notification_tuples)): + tag = notification_tuples[response_num][0] if tag in response: url_name = notification_tuples[response_num][1] human_name = notification_tuples[response_num][2] @@ -241,11 +250,11 @@ def combined_notifications(request, course_id): alert_message = ALERT_DICT[human_name] else: alert_message = "" - + notification_item = { - 'url' : url, - 'name' : human_name, - 'alert' : has_img, + 'url': url, + 'name': human_name, + 'alert': has_img, 'description': description, 'alert_message': alert_message } @@ -253,17 +262,18 @@ def combined_notifications(request, course_id): ajax_url = _reverse_with_slash('open_ended_notifications', course_id) combined_dict = { - 'error_text' : "", - 'notification_list' : notification_list, - 'course' : course, - 'success' : True, - 'ajax_url' : ajax_url, + 'error_text': "", + 'notification_list': notification_list, + 'course': course, + 'success': True, + 'ajax_url': ajax_url, } return render_to_response('open_ended_problems/combined_notifications.html', combined_dict ) + @cache_control(no_cache=True, no_store=True, must_revalidate=True) def take_action_on_flags(request, course_id): """ @@ -293,5 +303,3 @@ def take_action_on_flags(request, course_id): except GradingServiceError: log.exception("Error saving calibration grade, submission_id: {0}, submission_key: {1}, grader_id: {2}".format(submission_id, submission_key, grader_id)) return _err_response('Could not connect to grading service') - - diff --git a/lms/djangoapps/portal/features/common.py b/lms/djangoapps/portal/features/common.py index 20c2ab56b8..8bfb548367 100644 --- a/lms/djangoapps/portal/features/common.py +++ b/lms/djangoapps/portal/features/common.py @@ -1,4 +1,4 @@ -from lettuce import world, step#, before, after +from lettuce import world, step # , before, after from factories import * from django.core.management import call_command from nose.tools import assert_equals, assert_in @@ -11,74 +11,90 @@ import time from logging import getLogger logger = getLogger(__name__) + @step(u'I wait (?:for )?"(\d+)" seconds?$') def wait(step, seconds): time.sleep(float(seconds)) + @step('I (?:visit|access|open) the homepage$') def i_visit_the_homepage(step): world.browser.visit(django_url('/')) assert world.browser.is_element_present_by_css('header.global', 10) + @step(u'I (?:visit|access|open) the dashboard$') def i_visit_the_dashboard(step): world.browser.visit(django_url('/dashboard')) assert world.browser.is_element_present_by_css('section.container.dashboard', 5) + @step(r'click (?:the|a) link (?:called|with the text) "([^"]*)"$') def click_the_link_called(step, text): world.browser.find_link_by_text(text).click() + @step('I should be on the dashboard page$') def i_should_be_on_the_dashboard(step): assert world.browser.is_element_present_by_css('section.container.dashboard', 5) assert world.browser.title == 'Dashboard' + @step(u'I (?:visit|access|open) the courses page$') def i_am_on_the_courses_page(step): world.browser.visit(django_url('/courses')) assert world.browser.is_element_present_by_css('section.courses') + @step('I should see that the path is "([^"]*)"$') def i_should_see_that_the_path_is(step, path): assert world.browser.url == django_url(path) + @step(u'the page title should be "([^"]*)"$') def the_page_title_should_be(step, title): assert world.browser.title == title + @step(r'should see that the url is "([^"]*)"$') def should_have_the_url(step, url): assert_equals(world.browser.url, url) + @step(r'should see (?:the|a) link (?:called|with the text) "([^"]*)"$') def should_see_a_link_called(step, text): assert len(world.browser.find_link_by_text(text)) > 0 + @step(r'should see "(.*)" (?:somewhere|anywhere) in (?:the|this) page') def should_see_in_the_page(step, text): assert_in(text, world.browser.html) + @step('I am logged in$') def i_am_logged_in(step): world.create_user('robot') world.log_in('robot@edx.org', 'test') + @step('I am not logged in$') def i_am_not_logged_in(step): world.browser.cookies.delete() + @step(u'I am registered for a course$') def i_am_registered_for_a_course(step): world.create_user('robot') u = User.objects.get(username='robot') CourseEnrollment.objects.create(user=u, course_id='MITx/6.002x/2012_Fall') world.log_in('robot@edx.org', 'test') - + + @step(u'I am an edX user$') def i_am_an_edx_user(step): world.create_user('robot') + @step(u'User "([^"]*)" is an edX user$') def registered_edx_user(step, uname): world.create_user(uname) diff --git a/lms/djangoapps/portal/features/factories.py b/lms/djangoapps/portal/features/factories.py index 07b615f468..71781ea3d6 100644 --- a/lms/djangoapps/portal/features/factories.py +++ b/lms/djangoapps/portal/features/factories.py @@ -3,6 +3,7 @@ from student.models import User, UserProfile, Registration from datetime import datetime import uuid + class UserProfileFactory(factory.Factory): FACTORY_FOR = UserProfile @@ -13,12 +14,14 @@ class UserProfileFactory(factory.Factory): mailing_address = None goals = 'World domination' + class RegistrationFactory(factory.Factory): FACTORY_FOR = Registration user = None activation_key = uuid.uuid4().hex + class UserFactory(factory.Factory): FACTORY_FOR = User diff --git a/lms/djangoapps/portal/features/homepage.py b/lms/djangoapps/portal/features/homepage.py index 638d65077c..442098c161 100644 --- a/lms/djangoapps/portal/features/homepage.py +++ b/lms/djangoapps/portal/features/homepage.py @@ -1,6 +1,7 @@ from lettuce import world, step from nose.tools import assert_in + @step('I should see "([^"]*)" in the Partners section$') def i_should_see_partner(step, partner): partners = world.browser.find_by_css(".partner .name span") diff --git a/lms/djangoapps/portal/features/login.py b/lms/djangoapps/portal/features/login.py index 5f200eb259..094db078ca 100644 --- a/lms/djangoapps/portal/features/login.py +++ b/lms/djangoapps/portal/features/login.py @@ -1,26 +1,31 @@ from lettuce import step, world from django.contrib.auth.models import User + @step('I am an unactivated user$') def i_am_an_unactivated_user(step): user_is_an_unactivated_user('robot') + @step('I am an activated user$') def i_am_an_activated_user(step): user_is_an_activated_user('robot') + @step('I submit my credentials on the login form') def i_submit_my_credentials_on_the_login_form(step): fill_in_the_login_form('email', 'robot@edx.org') fill_in_the_login_form('password', 'test') login_form = world.browser.find_by_css('form#login_form') login_form.find_by_value('Access My Courses').click() - + + @step(u'I should see the login error message "([^"]*)"$') def i_should_see_the_login_error_message(step, msg): login_error_div = world.browser.find_by_css('form#login_form #login_error') assert (msg in login_error_div.text) + @step(u'click the dropdown arrow$') def click_the_dropdown(step): css = ".dropdown" @@ -29,16 +34,19 @@ def click_the_dropdown(step): #### helper functions + def user_is_an_unactivated_user(uname): u = User.objects.get(username=uname) u.is_active = False u.save() + def user_is_an_activated_user(uname): u = User.objects.get(username=uname) u.is_active = True u.save() + def fill_in_the_login_form(field, value): login_form = world.browser.find_by_css('form#login_form') form_field = login_form.find_by_name(field) diff --git a/lms/djangoapps/portal/features/registration.py b/lms/djangoapps/portal/features/registration.py index 124bed4923..b2b4c4bd8d 100644 --- a/lms/djangoapps/portal/features/registration.py +++ b/lms/djangoapps/portal/features/registration.py @@ -1,5 +1,6 @@ from lettuce import world, step + @step('I register for the course numbered "([^"]*)"$') def i_register_for_the_course(step, course): courses_section = world.browser.find_by_css('section.courses') @@ -13,11 +14,13 @@ def i_register_for_the_course(step, course): assert world.browser.is_element_present_by_css('section.container.dashboard') + @step(u'I should see the course numbered "([^"]*)" in my dashboard$') def i_should_see_that_course_in_my_dashboard(step, course): course_link_css = 'section.my-courses a[href*="%s"]' % course assert world.browser.is_element_present_by_css(course_link_css) + @step(u'I press the "([^"]*)" button in the Unenroll dialog') def i_press_the_button_in_the_unenroll_dialog(step, value): button_css = 'section#unenroll-modal input[value="%s"]' % value diff --git a/lms/djangoapps/portal/features/signup.py b/lms/djangoapps/portal/features/signup.py index afde72b589..3a697a6102 100644 --- a/lms/djangoapps/portal/features/signup.py +++ b/lms/djangoapps/portal/features/signup.py @@ -1,22 +1,25 @@ from lettuce import world, step + @step('I fill in "([^"]*)" on the registration form with "([^"]*)"$') def when_i_fill_in_field_on_the_registration_form_with_value(step, field, value): register_form = world.browser.find_by_css('form#register_form') form_field = register_form.find_by_name(field) form_field.fill(value) + @step('I press the "([^"]*)" button on the registration form$') def i_press_the_button_on_the_registration_form(step, button): register_form = world.browser.find_by_css('form#register_form') register_form.find_by_value(button).click() + @step('I check the checkbox named "([^"]*)"$') def i_check_checkbox(step, checkbox): world.browser.find_by_name(checkbox).check() + @step('I should see "([^"]*)" in the dashboard banner$') def i_should_see_text_in_the_dashboard_banner_section(step, text): css_selector = "section.dashboard-banner h2" assert (text in world.browser.find_by_css(css_selector).text) - \ No newline at end of file diff --git a/lms/djangoapps/psychometrics/management/commands/init_psychometrics.py b/lms/djangoapps/psychometrics/management/commands/init_psychometrics.py index 5e782df595..53f6e17e9d 100644 --- a/lms/djangoapps/psychometrics/management/commands/init_psychometrics.py +++ b/lms/djangoapps/psychometrics/management/commands/init_psychometrics.py @@ -2,7 +2,9 @@ # # generate pyschometrics data from tracking logs and student module data -import os, sys, string +import os +import sys +import string import datetime import json @@ -17,7 +19,7 @@ from django.core.management.base import BaseCommand #db = "ocwtutor" # for debugging #db = "default" -db = getattr(settings,'DATABASE_FOR_PSYCHOMETRICS','default') +db = getattr(settings, 'DATABASE_FOR_PSYCHOMETRICS', 'default') class Command(BaseCommand): @@ -32,39 +34,39 @@ class Command(BaseCommand): #PsychometricData.objects.using(db).all().delete() smset = StudentModule.objects.using(db).exclude(max_grade=None) - + for sm in smset: url = sm.module_state_key location = Location(url) - if not location.category=="problem": + if not location.category == "problem": continue try: state = json.loads(sm.state) done = state['done'] except: - print "Oops, failed to eval state for %s (state=%s)" % (sm,sm.state) + print "Oops, failed to eval state for %s (state=%s)" % (sm, sm.state) continue - + if done: # only keep if problem completed try: pmd = PsychometricData.objects.using(db).get(studentmodule=sm) except PsychometricData.DoesNotExist: pmd = PsychometricData(studentmodule=sm) - + pmd.done = done pmd.attempts = state['attempts'] - + # get attempt times from tracking log uname = sm.student.username - tset = TrackingLog.objects.using(db).filter(username=uname, event_type__contains='save_problem_check') + tset = TrackingLog.objects.using(db).filter(username=uname, event_type__contains='save_problem_check') tset = tset.filter(event_source='server') tset = tset.filter(event__contains="'%s'" % url) checktimes = [x.dtcreated for x in tset] pmd.checktimes = checktimes - if not len(checktimes)==pmd.attempts: + if not len(checktimes) == pmd.attempts: print "Oops, mismatch in number of attempts and check times for %s" % pmd - + #print pmd pmd.save(using=db) - + print "%d PMD entries" % PsychometricData.objects.using(db).all().count() diff --git a/lms/djangoapps/psychometrics/models.py b/lms/djangoapps/psychometrics/models.py index 4ffdf59120..60455f01b8 100644 --- a/lms/djangoapps/psychometrics/models.py +++ b/lms/djangoapps/psychometrics/models.py @@ -7,6 +7,7 @@ from django.db import models from courseware.models import StudentModule + class PsychometricData(models.Model): """ This data is a table linking student, module, and module performance, @@ -25,7 +26,7 @@ class PsychometricData(models.Model): done = models.BooleanField(default=False) attempts = models.IntegerField(default=0) # extracted from studentmodule.state - checktimes = models.TextField(null=True, blank=True) # internally stored as list of datetime objects + checktimes = models.TextField(null=True, blank=True) # internally stored as list of datetime objects # keep in mind # grade = studentmodule.grade @@ -33,7 +34,7 @@ class PsychometricData(models.Model): # student = studentmodule.student # course_id = studentmodule.course_id # location = studentmodule.module_state_key - + def __unicode__(self): sm = self.studentmodule return "[PsychometricData] %s url=%s, grade=%s, max=%s, attempts=%s, ct=%s" % (sm.student, @@ -42,4 +43,3 @@ class PsychometricData(models.Model): sm.max_grade, self.attempts, self.checktimes) - diff --git a/lms/djangoapps/psychometrics/psychoanalyze.py b/lms/djangoapps/psychometrics/psychoanalyze.py index dd7d328278..28a5c4437c 100644 --- a/lms/djangoapps/psychometrics/psychoanalyze.py +++ b/lms/djangoapps/psychometrics/psychoanalyze.py @@ -66,7 +66,7 @@ class StatVar(object): if x > self.max: self.max = x self.sum += x - self.sum2 += x**2 + self.sum2 += x ** 2 self.cnt += 1 def avg(self): @@ -77,11 +77,11 @@ class StatVar(object): def var(self): if self.cnt is None: return 0 - return (self.sum2 / 1.0 / self.cnt / (self.unit**2)) - (self.avg()**2) + return (self.sum2 / 1.0 / self.cnt / (self.unit ** 2)) - (self.avg() ** 2) def sdv(self): v = self.var() - if v>0: + if v > 0: return math.sqrt(v) else: return 0 @@ -112,7 +112,7 @@ def make_histogram(ydata, bins=None): hist = dict(zip(bins, [0] * nbins)) for y in ydata: for b in bins[::-1]: # in reverse order - if y>b: + if y > b: hist[b] += 1 break # hist['bins'] = bins @@ -128,7 +128,7 @@ def problems_with_psychometric_data(course_id): ''' pmdset = PsychometricData.objects.using(db).filter(studentmodule__course_id=course_id) plist = [p['studentmodule__module_state_key'] for p in pmdset.values('studentmodule__module_state_key').distinct()] - problems = dict( (p, pmdset.filter(studentmodule__module_state_key=p).count()) for p in plist ) + problems = dict((p, pmdset.filter(studentmodule__module_state_key=p).count()) for p in plist) return problems @@ -241,7 +241,7 @@ def generate_plots_for_problem(problem): ylast = 0 for x in xdat: y = gset.filter(attempts=x).count() / ngset - ydat.append( y + ylast ) + ydat.append(y + ylast) ylast = y + ylast yset['ydat'] = ydat diff --git a/lms/djangoapps/simplewiki/mdx_mathjax.py b/lms/djangoapps/simplewiki/mdx_mathjax.py index a9148511e3..b14803744b 100644 --- a/lms/djangoapps/simplewiki/mdx_mathjax.py +++ b/lms/djangoapps/simplewiki/mdx_mathjax.py @@ -28,4 +28,3 @@ class MathJaxExtension(markdown.Extension): def makeExtension(configs=None): return MathJaxExtension(configs) - diff --git a/lms/djangoapps/simplewiki/views.py b/lms/djangoapps/simplewiki/views.py index ef0928709f..38c367dec9 100644 --- a/lms/djangoapps/simplewiki/views.py +++ b/lms/djangoapps/simplewiki/views.py @@ -55,6 +55,7 @@ def update_template_dictionary(dictionary, request=None, course=None, article=No else: dictionary['staff_access'] = False + def view(request, article_path, course_id=None): course = get_opt_course_with_access(request.user, course_id, 'load') diff --git a/lms/djangoapps/static_template_view/views.py b/lms/djangoapps/static_template_view/views.py index 8ab6216eda..022f12b148 100644 --- a/lms/djangoapps/static_template_view/views.py +++ b/lms/djangoapps/static_template_view/views.py @@ -46,4 +46,3 @@ def render_404(request): def render_500(request): return HttpResponseServerError(render_to_string('static_templates/server-error.html', {})) - diff --git a/lms/djangoapps/staticbook/views.py b/lms/djangoapps/staticbook/views.py index fabb8b861c..6750d151ce 100644 --- a/lms/djangoapps/staticbook/views.py +++ b/lms/djangoapps/staticbook/views.py @@ -6,6 +6,7 @@ from courseware.access import has_access from courseware.courses import get_course_with_access from lxml import etree + @login_required def index(request, course_id, book_index, page=None): course = get_course_with_access(request.user, course_id, 'load') @@ -22,9 +23,10 @@ def index(request, course_id, book_index, page=None): {'book_index': book_index, 'page': int(page), 'course': course, 'book_url': textbook.book_url, 'table_of_contents': table_of_contents, - 'start_page' : textbook.start_page, - 'end_page' : textbook.end_page, + 'start_page': textbook.start_page, + 'end_page': textbook.end_page, 'staff_access': staff_access}) + def index_shifted(request, course_id, page): return index(request, course_id=course_id, page=int(page) + 24) diff --git a/lms/djangoapps/terrain/__init__.py b/lms/djangoapps/terrain/__init__.py index dd6869e7fd..3445a01d17 100644 --- a/lms/djangoapps/terrain/__init__.py +++ b/lms/djangoapps/terrain/__init__.py @@ -3,4 +3,4 @@ # See https://groups.google.com/forum/?fromgroups=#!msg/lettuce-users/5VyU9B4HcX8/USgbGIJdS5QJ from terrain.browser import * from terrain.steps import * -from terrain.factories import * \ No newline at end of file +from terrain.factories import * diff --git a/lms/djangoapps/terrain/browser.py b/lms/djangoapps/terrain/browser.py index 1c2d401680..e1925bde0b 100644 --- a/lms/djangoapps/terrain/browser.py +++ b/lms/djangoapps/terrain/browser.py @@ -8,20 +8,23 @@ logger.info("Loading the lettuce acceptance testing terrain file...") from django.core.management import call_command + @before.harvest def initial_setup(server): # Launch firefox world.browser = Browser('chrome') + @before.each_scenario def reset_data(scenario): - # Clean out the django test database defined in the + # Clean out the django test database defined in the # envs/acceptance.py file: mitx_all/db/test_mitx.db logger.debug("Flushing the test database...") call_command('flush', interactive=False) + @after.all def teardown_browser(total): # Quit firefox world.browser.quit() - pass \ No newline at end of file + pass diff --git a/lms/djangoapps/terrain/factories.py b/lms/djangoapps/terrain/factories.py index 377ce54d56..896f115df5 100644 --- a/lms/djangoapps/terrain/factories.py +++ b/lms/djangoapps/terrain/factories.py @@ -7,6 +7,7 @@ from time import gmtime from uuid import uuid4 from xmodule.timeparse import stringify_time + class UserProfileFactory(Factory): FACTORY_FOR = UserProfile @@ -17,12 +18,14 @@ class UserProfileFactory(Factory): mailing_address = None goals = 'World domination' + class RegistrationFactory(Factory): FACTORY_FOR = Registration user = None activation_key = uuid4().hex + class UserFactory(Factory): FACTORY_FOR = User @@ -37,12 +40,15 @@ class UserFactory(Factory): last_login = datetime(2012, 1, 1) date_joined = datetime(2011, 1, 1) -def XMODULE_COURSE_CREATION(class_to_create, **kwargs): + +def XMODULE_COURSE_CREATION(class_to_create, **kwargs): return XModuleCourseFactory._create(class_to_create, **kwargs) + def XMODULE_ITEM_CREATION(class_to_create, **kwargs): return XModuleItemFactory._create(class_to_create, **kwargs) + class XModuleCourseFactory(Factory): """ Factory for XModule courses. @@ -58,7 +64,7 @@ class XModuleCourseFactory(Factory): org = kwargs.get('org') number = kwargs.get('number') display_name = kwargs.get('display_name') - location = Location('i4x', org, number, + location = Location('i4x', org, number, 'course', Location.clean(display_name)) store = modulestore('direct') @@ -72,20 +78,22 @@ class XModuleCourseFactory(Factory): new_course.metadata['data_dir'] = uuid4().hex new_course.metadata['start'] = stringify_time(gmtime()) - new_course.tabs = [{"type": "courseware"}, + new_course.tabs = [{"type": "courseware"}, {"type": "course_info", "name": "Course Info"}, {"type": "discussion", "name": "Discussion"}, {"type": "wiki", "name": "Wiki"}, {"type": "progress", "name": "Progress"}] # Update the data in the mongo datastore - store.update_metadata(new_course.location.url(), new_course.own_metadata) + store.update_metadata(new_course.location.url(), new_course.own_metadata) return new_course + class Course: pass + class CourseFactory(XModuleCourseFactory): FACTORY_FOR = Course @@ -94,6 +102,7 @@ class CourseFactory(XModuleCourseFactory): number = '999' display_name = 'Robot Super Course' + class XModuleItemFactory(Factory): """ Factory for XModule items. @@ -110,7 +119,7 @@ class XModuleItemFactory(Factory): """ DETACHED_CATEGORIES = ['about', 'static_tab', 'course_info'] - + parent_location = Location(kwargs.get('parent_location')) template = Location(kwargs.get('template')) display_name = kwargs.get('display_name') @@ -137,12 +146,14 @@ class XModuleItemFactory(Factory): return new_item + class Item: pass + class ItemFactory(XModuleItemFactory): FACTORY_FOR = Item parent_location = 'i4x://MITx/999/course/Robot_Super_Course' template = 'i4x://edx/templates/chapter/Empty' - display_name = 'Section One' \ No newline at end of file + display_name = 'Section One' diff --git a/lms/djangoapps/terrain/steps.py b/lms/djangoapps/terrain/steps.py index 6824fa16ce..6b2a813d8d 100644 --- a/lms/djangoapps/terrain/steps.py +++ b/lms/djangoapps/terrain/steps.py @@ -15,79 +15,97 @@ import os.path from logging import getLogger logger = getLogger(__name__) + @step(u'I wait (?:for )?"(\d+)" seconds?$') def wait(step, seconds): time.sleep(float(seconds)) + @step('I (?:visit|access|open) the homepage$') def i_visit_the_homepage(step): world.browser.visit(django_url('/')) assert world.browser.is_element_present_by_css('header.global', 10) + @step(u'I (?:visit|access|open) the dashboard$') def i_visit_the_dashboard(step): world.browser.visit(django_url('/dashboard')) assert world.browser.is_element_present_by_css('section.container.dashboard', 5) + @step('I should be on the dashboard page$') def i_should_be_on_the_dashboard(step): assert world.browser.is_element_present_by_css('section.container.dashboard', 5) assert world.browser.title == 'Dashboard' + @step(u'I (?:visit|access|open) the courses page$') def i_am_on_the_courses_page(step): world.browser.visit(django_url('/courses')) assert world.browser.is_element_present_by_css('section.courses') + @step(u'I press the "([^"]*)" button$') def and_i_press_the_button(step, value): button_css = 'input[value="%s"]' % value world.browser.find_by_css(button_css).first.click() + @step(u'I click the link with the text "([^"]*)"$') def click_the_link_with_the_text_group1(step, linktext): world.browser.find_link_by_text(linktext).first.click() + @step('I should see that the path is "([^"]*)"$') def i_should_see_that_the_path_is(step, path): assert world.browser.url == django_url(path) + @step(u'the page title should be "([^"]*)"$') def the_page_title_should_be(step, title): assert_equals(world.browser.title, title) + @step('I am a logged in user$') def i_am_logged_in_user(step): create_user('robot') - log_in('robot@edx.org','test') + log_in('robot@edx.org', 'test') + @step('I am not logged in$') def i_am_not_logged_in(step): world.browser.cookies.delete() + @step('I am registered for a course$') def i_am_registered_for_a_course(step): create_user('robot') u = User.objects.get(username='robot') CourseEnrollment.objects.get_or_create(user=u, course_id='MITx/6.002x/2012_Fall') + @step('I am registered for course "([^"]*)"$') def i_am_registered_for_course_by_id(step, course_id): register_by_course_id(course_id) + @step('I am staff for course "([^"]*)"$') def i_am_staff_for_course_by_id(step, course_id): register_by_course_id(course_id, True) + @step('I log in$') def i_log_in(step): - log_in('robot@edx.org','test') + log_in('robot@edx.org', 'test') + @step(u'I am an edX user$') def i_am_an_edx_user(step): create_user('robot') #### helper functions + + @world.absorb def create_user(uname): portal_user = UserFactory.build(username=uname, email=uname + '@edx.org') @@ -100,11 +118,12 @@ def create_user(uname): user_profile = UserProfileFactory(user=portal_user) + @world.absorb -def log_in(email, password): +def log_in(email, password): world.browser.cookies.delete() world.browser.visit(django_url('/')) - world.browser.is_element_present_by_css('header.global', 10) + world.browser.is_element_present_by_css('header.global', 10) world.browser.click_link_by_href('#login-modal') login_form = world.browser.find_by_css('form#login_form') login_form.find_by_name('email').fill(email) @@ -114,15 +133,17 @@ def log_in(email, password): # wait for the page to redraw assert world.browser.is_element_present_by_css('.content-wrapper', 10) + @world.absorb def register_by_course_id(course_id, is_staff=False): create_user('robot') u = User.objects.get(username='robot') if is_staff: - u.is_staff=True - u.save() + u.is_staff = True + u.save() CourseEnrollment.objects.get_or_create(user=u, course_id=course_id) + @world.absorb def save_the_html(path='/tmp'): u = world.browser.url @@ -132,6 +153,7 @@ def save_the_html(path='/tmp'): f.write(html) f.close + @world.absorb def save_the_course_content(path='/tmp'): html = world.browser.html.encode('ascii', 'ignore') @@ -140,12 +162,12 @@ def save_the_course_content(path='/tmp'): # get rid of the header, we only want to compare the body soup.head.decompose() - # for now, remove the data-id attributes, because they are + # for now, remove the data-id attributes, because they are # causing mismatches between cms-master and master for item in soup.find_all(attrs={'data-id': re.compile('.*')}): del item['data-id'] - # we also need to remove them from unrendered problems, + # we also need to remove them from unrendered problems, # where they are contained in the text of divs instead of # in attributes of tags # Be careful of whether or not it was the last attribute @@ -164,7 +186,7 @@ def save_the_course_content(path='/tmp'): # use string slicing to grab everything after 'courseware/' in the URL u = world.browser.url - section_url = u[u.find('courseware/')+11:] + section_url = u[u.find('courseware/') + 11:] if not os.path.exists(path): os.makedirs(path) diff --git a/lms/envs/acceptance.py b/lms/envs/acceptance.py index e0857a4392..412815a402 100644 --- a/lms/envs/acceptance.py +++ b/lms/envs/acceptance.py @@ -1,5 +1,5 @@ """ -This config file extends the test environment configuration +This config file extends the test environment configuration so that we can run the lettuce acceptance tests. """ from .test import * @@ -21,14 +21,14 @@ MODULESTORE = { } } -# Set this up so that rake lms[acceptance] and running the +# Set this up so that rake lms[acceptance] and running the # harvest command both use the same (test) database # which they can flush without messing up your dev db DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ENV_ROOT / "db" / "test_mitx.db", - 'TEST_NAME': ENV_ROOT / "db" / "test_mitx.db", + 'TEST_NAME': ENV_ROOT / "db" / "test_mitx.db", } } diff --git a/lms/envs/common.py b/lms/envs/common.py index 614c68b361..10947a9735 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -40,11 +40,11 @@ DISCUSSION_SETTINGS = { # Features MITX_FEATURES = { - 'SAMPLE' : False, - 'USE_DJANGO_PIPELINE' : True, - 'DISPLAY_HISTOGRAMS_TO_STAFF' : True, - 'REROUTE_ACTIVATION_EMAIL' : False, # nonempty string = address for all activation emails - 'DEBUG_LEVEL' : 0, # 0 = lowest level, least verbose, 255 = max level, most verbose + 'SAMPLE': False, + 'USE_DJANGO_PIPELINE': True, + 'DISPLAY_HISTOGRAMS_TO_STAFF': True, + 'REROUTE_ACTIVATION_EMAIL': False, # nonempty string = address for all activation emails + 'DEBUG_LEVEL': 0, # 0 = lowest level, least verbose, 255 = max level, most verbose ## DO NOT SET TO True IN THIS FILE ## Doing so will cause all courses to be released on production @@ -53,20 +53,20 @@ MITX_FEATURES = { # When True, will only publicly list courses by the subdomain. Expects you # to define COURSE_LISTINGS, a dictionary mapping subdomains to lists of # course_ids (see dev_int.py for an example) - 'SUBDOMAIN_COURSE_LISTINGS' : False, + 'SUBDOMAIN_COURSE_LISTINGS': False, # When True, will override certain branding with university specific values # Expects a SUBDOMAIN_BRANDING dictionary that maps the subdomain to the # university to use for branding purposes 'SUBDOMAIN_BRANDING': False, - 'FORCE_UNIVERSITY_DOMAIN': False, # set this to the university domain to use, as an override to HTTP_HOST + 'FORCE_UNIVERSITY_DOMAIN': False, # set this to the university domain to use, as an override to HTTP_HOST # set to None to do no university selection - 'ENABLE_TEXTBOOK' : True, + 'ENABLE_TEXTBOOK': True, 'ENABLE_DISCUSSION_SERVICE': True, - 'ENABLE_PSYCHOMETRICS': False, # real-time psychometrics (eg item response theory analysis in instructor dashboard) + 'ENABLE_PSYCHOMETRICS': False, # real-time psychometrics (eg item response theory analysis in instructor dashboard) 'ENABLE_SQL_TRACKING_LOGS': False, 'ENABLE_LMS_MIGRATION': False, @@ -74,12 +74,12 @@ MITX_FEATURES = { 'DISABLE_LOGIN_BUTTON': False, # used in systems where login is automatic, eg MIT SSL - 'STUB_VIDEO_FOR_TESTING': False, # do not display video when running automated acceptance tests + 'STUB_VIDEO_FOR_TESTING': False, # do not display video when running automated acceptance tests # extrernal access methods 'ACCESS_REQUIRE_STAFF_FOR_COURSE': False, 'AUTH_USE_OPENID': False, - 'AUTH_USE_MIT_CERTIFICATES' : False, + 'AUTH_USE_MIT_CERTIFICATES': False, 'AUTH_USE_OPENID_PROVIDER': False, } @@ -90,7 +90,7 @@ DEFAULT_GROUPS = [] GENERATE_PROFILE_SCORES = False # Used with XQueue -XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds +XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds ############################# SET PATH INFORMATION ############################# @@ -151,8 +151,8 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.static', 'django.contrib.messages.context_processors.messages', #'django.core.context_processors.i18n', - 'django.contrib.auth.context_processors.auth', #this is required for admin - 'django.core.context_processors.csrf', #necessary for csrf protection + 'django.contrib.auth.context_processors.auth', # this is required for admin + 'django.core.context_processors.csrf', # necessary for csrf protection # Added for django-wiki 'django.core.context_processors.media', @@ -162,7 +162,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'course_wiki.course_nav.context_processor', ) -STUDENT_FILEUPLOAD_MAX_SIZE = 4*1000*1000 # 4 MB +STUDENT_FILEUPLOAD_MAX_SIZE = 4 * 1000 * 1000 # 4 MB MAX_FILEUPLOADS_PER_INPUT = 20 # FIXME: @@ -172,7 +172,7 @@ LIB_URL = '/static/js/' # Dev machines shouldn't need the book # BOOK_URL = '/static/book/' -BOOK_URL = 'https://mitxstatic.s3.amazonaws.com/book_images/' # For AWS deploys +BOOK_URL = 'https://mitxstatic.s3.amazonaws.com/book_images/' # For AWS deploys # RSS_URL = r'lms/templates/feed.rss' # PRESS_URL = r'' RSS_TIMEOUT = 600 @@ -268,8 +268,8 @@ STATICFILES_DIRS = [ ] # Locale/Internationalization -TIME_ZONE = 'America/New_York' # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name -LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html +TIME_ZONE = 'America/New_York' # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name +LANGUAGE_CODE = 'en' # http://www.i18nguy.com/unicode/language-identifiers.html USE_I18N = True USE_L10N = True @@ -290,7 +290,7 @@ ALLOWED_GITRELOAD_IPS = ['207.97.227.253', '50.57.128.197', '108.171.174.178'] # setting is, I'm just bumping the expiration time to something absurd (100 # years). This is only used if DEFAULT_FILE_STORAGE is overriden to use S3 # in the global settings.py -AWS_QUERYSTRING_EXPIRE = 10 * 365 * 24 * 60 * 60 # 10 years +AWS_QUERYSTRING_EXPIRE = 10 * 365 * 24 * 60 * 60 # 10 years ################################# SIMPLEWIKI ################################### SIMPLE_WIKI_REQUIRE_LOGIN_EDIT = True @@ -299,8 +299,8 @@ SIMPLE_WIKI_REQUIRE_LOGIN_VIEW = False ################################# WIKI ################################### WIKI_ACCOUNT_HANDLING = False WIKI_EDITOR = 'course_wiki.editors.CodeMirror' -WIKI_SHOW_MAX_CHILDREN = 0 # We don't use the little menu that shows children of an article in the breadcrumb -WIKI_ANONYMOUS = False # Don't allow anonymous access until the styling is figured out +WIKI_SHOW_MAX_CHILDREN = 0 # We don't use the little menu that shows children of an article in the breadcrumb +WIKI_ANONYMOUS = False # Don't allow anonymous access until the styling is figured out WIKI_CAN_CHANGE_PERMISSIONS = lambda article, user: user.is_staff or user.is_superuser WIKI_CAN_ASSIGN = lambda article, user: user.is_staff or user.is_superuser @@ -419,7 +419,7 @@ main_vendor_js = [ discussion_js = sorted(rooted_glob(PROJECT_ROOT / 'static', 'coffee/src/discussion/**/*.coffee')) staff_grading_js = sorted(rooted_glob(PROJECT_ROOT / 'static', 'coffee/src/staff_grading/**/*.coffee')) -open_ended_js = sorted(rooted_glob(PROJECT_ROOT / 'static','coffee/src/open_ended/**/*.coffee')) +open_ended_js = sorted(rooted_glob(PROJECT_ROOT / 'static', 'coffee/src/open_ended/**/*.coffee')) PIPELINE_CSS = { 'application': { @@ -476,11 +476,11 @@ PIPELINE_JS = { 'source_filenames': discussion_js, 'output_filename': 'js/discussion.js' }, - 'staff_grading' : { + 'staff_grading': { 'source_filenames': staff_grading_js, 'output_filename': 'js/staff_grading.js' }, - 'open_ended' : { + 'open_ended': { 'source_filenames': open_ended_js, 'output_filename': 'js/open_ended.js' } @@ -563,9 +563,9 @@ INSTALLED_APPS = ( 'course_groups', #For the wiki - 'wiki', # The new django-wiki from benjaoming + 'wiki', # The new django-wiki from benjaoming 'django_notify', - 'course_wiki', # Our customizations + 'course_wiki', # Our customizations 'mptt', 'sekizai', #'wiki.plugins.attachments', diff --git a/lms/envs/content.py b/lms/envs/content.py index 2584dca969..f699153895 100644 --- a/lms/envs/content.py +++ b/lms/envs/content.py @@ -10,7 +10,7 @@ TEMPLATE_DEBUG = True EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' ################################ DEBUG TOOLBAR ################################# -INSTALLED_APPS += ('debug_toolbar',) +INSTALLED_APPS += ('debug_toolbar',) MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) DEBUG_TOOLBAR_PANELS = ( @@ -24,8 +24,8 @@ DEBUG_TOOLBAR_PANELS = ( 'debug_toolbar.panels.logger.LoggingPanel', # Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and -# Django=1.3.1/1.4 where requests to views get duplicated (your method gets -# hit twice). So you can uncomment when you need to diagnose performance +# Django=1.3.1/1.4 where requests to views get duplicated (your method gets +# hit twice). So you can uncomment when you need to diagnose performance # problems, but you shouldn't leave it on. # 'debug_toolbar.panels.profiling.ProfilingDebugPanel', ) diff --git a/lms/envs/dev.py b/lms/envs/dev.py index 338a31f641..47bcee1b7e 100644 --- a/lms/envs/dev.py +++ b/lms/envs/dev.py @@ -165,7 +165,7 @@ INSTALLED_APPS += ('django_openid_auth',) OPENID_CREATE_USERS = False OPENID_UPDATE_DETAILS_FROM_SREG = True -OPENID_SSO_SERVER_URL = 'https://www.google.com/accounts/o8/id' # TODO: accept more endpoints +OPENID_SSO_SERVER_URL = 'https://www.google.com/accounts/o8/id' # TODO: accept more endpoints OPENID_USE_AS_ADMIN_LOGIN = False OPENID_PROVIDER_TRUSTED_ROOTS = ['*'] diff --git a/lms/envs/dev_edx4edx.py b/lms/envs/dev_edx4edx.py index 0212d8b550..c138ed81ae 100644 --- a/lms/envs/dev_edx4edx.py +++ b/lms/envs/dev_edx4edx.py @@ -36,7 +36,7 @@ DEBUG = True ENABLE_MULTICOURSE = True # set to False to disable multicourse display (see lib.util.views.mitxhome) QUICKEDIT = True -MAKO_TEMPLATES['course'] = [DATA_DIR, EDX4EDX_ROOT ] +MAKO_TEMPLATES['course'] = [DATA_DIR, EDX4EDX_ROOT] #MITX_FEATURES['USE_DJANGO_PIPELINE'] = False MITX_FEATURES['DISPLAY_HISTOGRAMS_TO_STAFF'] = False @@ -49,12 +49,12 @@ COURSE_TITLE = "edx4edx: edX Author Course" SITE_NAME = "ichuang.mitx.mit.edu" COURSE_SETTINGS = {'edx4edx': {'number' : 'edX.01', - 'title' : 'edx4edx: edX Author Course', + 'title': 'edx4edx: edX Author Course', 'xmlpath': '/edx4edx/', 'github_url': 'https://github.com/MITx/edx4edx', - 'active' : True, - 'default_chapter' : 'Introduction', - 'default_section' : 'edx4edx_Course', + 'active': True, + 'default_chapter': 'Introduction', + 'default_section': 'edx4edx_Course', }, } diff --git a/lms/envs/dev_ike.py b/lms/envs/dev_ike.py index a17622a81a..639d186989 100644 --- a/lms/envs/dev_ike.py +++ b/lms/envs/dev_ike.py @@ -24,25 +24,25 @@ MITX_FEATURES['DISABLE_START_DATES'] = True myhost = socket.gethostname() if ('edxvm' in myhost) or ('ocw' in myhost): - MITX_FEATURES['DISABLE_LOGIN_BUTTON'] = True # auto-login with MIT certificate - MITX_FEATURES['USE_XQA_SERVER'] = 'https://qisx.mit.edu/xqa' # needs to be ssl or browser blocks it - MITX_FEATURES['USE_DJANGO_PIPELINE']=False # don't recompile scss + MITX_FEATURES['DISABLE_LOGIN_BUTTON'] = True # auto-login with MIT certificate + MITX_FEATURES['USE_XQA_SERVER'] = 'https://qisx.mit.edu/xqa' # needs to be ssl or browser blocks it + MITX_FEATURES['USE_DJANGO_PIPELINE'] = False # don't recompile scss if ('ocw' in myhost): MITX_FEATURES['ACCESS_REQUIRE_STAFF_FOR_COURSE'] = False if ('domU' in myhost): EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' - MITX_FEATURES['REROUTE_ACTIVATION_EMAIL'] = 'ichuang@mitx.mit.edu' # nonempty string = address for all activation emails - MITX_FEATURES['USE_DJANGO_PIPELINE']=False # don't recompile scss + MITX_FEATURES['REROUTE_ACTIVATION_EMAIL'] = 'ichuang@mitx.mit.edu' # nonempty string = address for all activation emails + MITX_FEATURES['USE_DJANGO_PIPELINE'] = False # don't recompile scss -SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https') # django 1.4 for nginx ssl proxy +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https') # django 1.4 for nginx ssl proxy #----------------------------------------------------------------------------- # disable django debug toolbars -INSTALLED_APPS = tuple([ app for app in INSTALLED_APPS if not app.startswith('debug_toolbar') ]) -MIDDLEWARE_CLASSES = tuple([ mcl for mcl in MIDDLEWARE_CLASSES if not mcl.startswith('debug_toolbar') ]) +INSTALLED_APPS = tuple([app for app in INSTALLED_APPS if not app.startswith('debug_toolbar')]) +MIDDLEWARE_CLASSES = tuple([mcl for mcl in MIDDLEWARE_CLASSES if not mcl.startswith('debug_toolbar')]) #TEMPLATE_LOADERS = tuple([ app for app in TEMPLATE_LOADERS if not app.startswith('mitxmako') ]) TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', diff --git a/lms/envs/dev_int.py b/lms/envs/dev_int.py index 12123e12d4..21c52c8abc 100644 --- a/lms/envs/dev_int.py +++ b/lms/envs/dev_int.py @@ -14,7 +14,7 @@ from .dev import * MITX_FEATURES['SUBDOMAIN_COURSE_LISTINGS'] = True COURSE_LISTINGS = { - 'default' : ['BerkeleyX/CS169.1x/2012_Fall', + 'default': ['BerkeleyX/CS169.1x/2012_Fall', 'BerkeleyX/CS188.1x/2012_Fall', 'HarvardX/CS50x/2012', 'HarvardX/PH207x/2012_Fall', @@ -25,8 +25,8 @@ COURSE_LISTINGS = { 'berkeley': ['BerkeleyX/CS169.1x/2012_Fall', 'BerkeleyX/CS188.1x/2012_Fall'], - 'harvard' : ['HarvardX/CS50x/2012'], + 'harvard': ['HarvardX/CS50x/2012'], - 'mit' : ['MITx/3.091x/2012_Fall', + 'mit': ['MITx/3.091x/2012_Fall', 'MITx/6.00x/2012_Fall'] } diff --git a/lms/envs/devgroups/courses.py b/lms/envs/devgroups/courses.py index e9ed28a09d..c44717c451 100644 --- a/lms/envs/devgroups/courses.py +++ b/lms/envs/devgroups/courses.py @@ -1,13 +1,13 @@ from ..dev import * CLASSES_TO_DBS = { - 'BerkeleyX/CS169.1x/2012_Fall' : "cs169.db", - 'BerkeleyX/CS188.1x/2012_Fall' : "cs188_1.db", - 'HarvardX/CS50x/2012' : "cs50.db", - 'HarvardX/PH207x/2012_Fall' : "ph207.db", - 'MITx/3.091x/2012_Fall' : "3091.db", - 'MITx/6.002x/2012_Fall' : "6002.db", - 'MITx/6.00x/2012_Fall' : "600.db", + 'BerkeleyX/CS169.1x/2012_Fall': "cs169.db", + 'BerkeleyX/CS188.1x/2012_Fall': "cs188_1.db", + 'HarvardX/CS50x/2012': "cs50.db", + 'HarvardX/PH207x/2012_Fall': "ph207.db", + 'MITx/3.091x/2012_Fall': "3091.db", + 'MITx/6.002x/2012_Fall': "6002.db", + 'MITx/6.00x/2012_Fall': "600.db", } @@ -20,8 +20,8 @@ CACHES = { 'general': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '127.0.0.1:11211', - 'KEY_PREFIX' : 'general', - 'VERSION' : 5, + 'KEY_PREFIX': 'general', + 'VERSION': 5, 'KEY_FUNCTION': 'util.memcache.safe_key', } } @@ -32,11 +32,12 @@ SESSION_ENGINE = 'django.contrib.sessions.backends.cache' def path_for_db(db_name): return ENV_ROOT / "db" / db_name + def course_db_for(course_id): db_name = CLASSES_TO_DBS[course_id] return { - 'default' : { - 'ENGINE' : 'django.db.backends.sqlite3', - 'NAME' : path_for_db(db_name) + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': path_for_db(db_name) } } diff --git a/lms/envs/devgroups/portal.py b/lms/envs/devgroups/portal.py index b674218571..35808d56fa 100644 --- a/lms/envs/devgroups/portal.py +++ b/lms/envs/devgroups/portal.py @@ -10,4 +10,3 @@ for class_id, db_name in CLASSES_TO_DBS.items(): 'ENGINE': 'django.db.backends.sqlite3', 'NAME': path_for_db(db_name) } - diff --git a/lms/envs/devplus.py b/lms/envs/devplus.py index 5c79304c0a..ea6590291c 100644 --- a/lms/envs/devplus.py +++ b/lms/envs/devplus.py @@ -37,8 +37,8 @@ CACHES = { 'general': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '127.0.0.1:11211', - 'KEY_PREFIX' : 'general', - 'VERSION' : 5, + 'KEY_PREFIX': 'general', + 'VERSION': 5, 'KEY_FUNCTION': 'util.memcache.safe_key', } } @@ -47,7 +47,7 @@ SESSION_ENGINE = 'django.contrib.sessions.backends.cache' ################################ DEBUG TOOLBAR ################################# -INSTALLED_APPS += ('debug_toolbar',) +INSTALLED_APPS += ('debug_toolbar',) MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) INTERNAL_IPS = ('127.0.0.1',) @@ -62,8 +62,8 @@ DEBUG_TOOLBAR_PANELS = ( 'debug_toolbar.panels.logger.LoggingPanel', # Enabling the profiler has a weird bug as of django-debug-toolbar==0.9.4 and -# Django=1.3.1/1.4 where requests to views get duplicated (your method gets -# hit twice). So you can uncomment when you need to diagnose performance +# Django=1.3.1/1.4 where requests to views get duplicated (your method gets +# hit twice). So you can uncomment when you need to diagnose performance # problems, but you shouldn't leave it on. 'debug_toolbar.panels.profiling.ProfilingDebugPanel', ) diff --git a/lms/envs/edx4edx_aws.py b/lms/envs/edx4edx_aws.py index adc2c6e1ce..de377c0b57 100644 --- a/lms/envs/edx4edx_aws.py +++ b/lms/envs/edx4edx_aws.py @@ -5,21 +5,21 @@ COURSE_NUMBER = "edX.01" COURSE_TITLE = "edx4edx: edX Author Course" EDX4EDX_ROOT = ENV_ROOT / "data/edx4edx" -### Dark code. Should be enabled in local settings for devel. +### Dark code. Should be enabled in local settings for devel. QUICKEDIT = True -ENABLE_MULTICOURSE = True # set to False to disable multicourse display (see lib.util.views.mitxhome) +ENABLE_MULTICOURSE = True # set to False to disable multicourse display (see lib.util.views.mitxhome) ### PIPELINE_CSS_COMPRESSOR = None PIPELINE_JS_COMPRESSOR = None COURSE_DEFAULT = 'edx4edx' COURSE_SETTINGS = {'edx4edx': {'number' : 'edX.01', - 'title' : 'edx4edx: edX Author Course', + 'title': 'edx4edx: edX Author Course', 'xmlpath': '/edx4edx/', 'github_url': 'https://github.com/MITx/edx4edx', - 'active' : True, - 'default_chapter' : 'Introduction', - 'default_section' : 'edx4edx_Course', + 'active': True, + 'default_chapter': 'Introduction', + 'default_section': 'edx4edx_Course', }, } @@ -34,4 +34,4 @@ STATICFILES_DIRS = [ # ("book", ENV_ROOT / "book_images") ] -MAKO_TEMPLATES['course'] = [DATA_DIR, EDX4EDX_ROOT ] +MAKO_TEMPLATES['course'] = [DATA_DIR, EDX4EDX_ROOT] diff --git a/lms/envs/static.py b/lms/envs/static.py index f233571a9e..23e735c747 100644 --- a/lms/envs/static.py +++ b/lms/envs/static.py @@ -12,7 +12,7 @@ from logsettings import get_logger_config STATIC_GRAB = True -LOGGING = get_logger_config(ENV_ROOT / "log", +LOGGING = get_logger_config(ENV_ROOT / "log", logging_env="dev", tracking_filename="tracking.log", debug=False) @@ -25,7 +25,7 @@ DATABASES = { } CACHES = { - # This is the cache used for most things. + # This is the cache used for most things. # In staging/prod envs, the sessions also live here. 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', diff --git a/lms/envs/test.py b/lms/envs/test.py index 8b546549eb..6cad6416d0 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -23,7 +23,7 @@ MITX_FEATURES['ENABLE_DISCUSSION_SERVICE'] = False WIKI_ENABLED = True # Makes the tests run much faster... -SOUTH_TESTS_MIGRATE = False # To disable migrations and use syncdb instead +SOUTH_TESTS_MIGRATE = False # To disable migrations and use syncdb instead # Nose Test Runner INSTALLED_APPS += ('django_nose',) @@ -57,7 +57,7 @@ XQUEUE_INTERFACE = { }, "basic_auth": ('anant', 'agarwal'), } -XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds +XQUEUE_WAITTIME_BETWEEN_REQUESTS = 5 # seconds # Don't rely on a real staff grading backend diff --git a/lms/envs/test_ike.py b/lms/envs/test_ike.py index b162d9e2bb..907b7eeadf 100644 --- a/lms/envs/test_ike.py +++ b/lms/envs/test_ike.py @@ -34,11 +34,11 @@ DATA_DIR = COURSES_ROOT MAKO_TEMPLATES['course'] = [DATA_DIR] MAKO_TEMPLATES['sections'] = [DATA_DIR / 'sections'] MAKO_TEMPLATES['custom_tags'] = [DATA_DIR / 'custom_tags'] -MAKO_TEMPLATES['main'] = [PROJECT_ROOT / 'templates', +MAKO_TEMPLATES['main'] = [PROJECT_ROOT / 'templates', DATA_DIR / 'info', DATA_DIR / 'problems'] -LOGGING = get_logger_config(TEST_ROOT / "log", +LOGGING = get_logger_config(TEST_ROOT / "log", logging_env="dev", tracking_filename="tracking.log", debug=True) @@ -51,7 +51,7 @@ DATABASES = { } CACHES = { - # This is the cache used for most things. + # This is the cache used for most things. # In staging/prod envs, the sessions also live here. 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', diff --git a/lms/lib/comment_client/comment.py b/lms/lib/comment_client/comment.py index 6d0bafee02..0d81761512 100644 --- a/lms/lib/comment_client/comment.py +++ b/lms/lib/comment_client/comment.py @@ -4,6 +4,7 @@ from thread import Thread import models import settings + class Comment(models.Model): accessible_fields = [ @@ -41,8 +42,10 @@ class Comment(models.Model): else: return super(Comment, cls).url(action, params) + def _url_for_thread_comments(thread_id): return "{prefix}/threads/{thread_id}/comments".format(prefix=settings.PREFIX, thread_id=thread_id) + def _url_for_comment(comment_id): return "{prefix}/comments/{comment_id}".format(prefix=settings.PREFIX, comment_id=comment_id) diff --git a/lms/lib/comment_client/comment_client.py b/lms/lib/comment_client/comment_client.py index fe485433d6..d7c8f05485 100644 --- a/lms/lib/comment_client/comment_client.py +++ b/lms/lib/comment_client/comment_client.py @@ -7,32 +7,40 @@ from utils import * import settings + def search_similar_threads(course_id, recursive=False, query_params={}, *args, **kwargs): default_params = {'course_id': course_id, 'recursive': recursive} attributes = dict(default_params.items() + query_params.items()) return perform_request('get', _url_for_search_similar_threads(), attributes, *args, **kwargs) + def search_recent_active_threads(course_id, recursive=False, query_params={}, *args, **kwargs): default_params = {'course_id': course_id, 'recursive': recursive} attributes = dict(default_params.items() + query_params.items()) return perform_request('get', _url_for_search_recent_active_threads(), attributes, *args, **kwargs) + def search_trending_tags(course_id, query_params={}, *args, **kwargs): default_params = {'course_id': course_id} attributes = dict(default_params.items() + query_params.items()) return perform_request('get', _url_for_search_trending_tags(), attributes, *args, **kwargs) + def tags_autocomplete(value, *args, **kwargs): return perform_request('get', _url_for_threads_tags_autocomplete(), {'value': value}, *args, **kwargs) + def _url_for_search_similar_threads(): return "{prefix}/search/threads/more_like_this".format(prefix=settings.PREFIX) + def _url_for_search_recent_active_threads(): return "{prefix}/search/threads/recent_active".format(prefix=settings.PREFIX) + def _url_for_search_trending_tags(): return "{prefix}/search/tags/trending".format(prefix=settings.PREFIX) + def _url_for_threads_tags_autocomplete(): return "{prefix}/threads/tags/autocomplete".format(prefix=settings.PREFIX) diff --git a/lms/lib/comment_client/commentable.py b/lms/lib/comment_client/commentable.py index 8f91bfc93d..85c357ef81 100644 --- a/lms/lib/comment_client/commentable.py +++ b/lms/lib/comment_client/commentable.py @@ -3,6 +3,7 @@ from utils import * import models import settings + class Commentable(models.Model): base_url = "{prefix}/commentables".format(prefix=settings.PREFIX) diff --git a/lms/lib/comment_client/legacy.py b/lms/lib/comment_client/legacy.py index fc87bcaf4f..fbf66a09fd 100644 --- a/lms/lib/comment_client/legacy.py +++ b/lms/lib/comment_client/legacy.py @@ -1,6 +1,7 @@ def delete_threads(commentable_id, *args, **kwargs): return _perform_request('delete', _url_for_commentable_threads(commentable_id), *args, **kwargs) + def get_threads(commentable_id, recursive=False, query_params={}, *args, **kwargs): default_params = {'page': 1, 'per_page': 20, 'recursive': recursive} attributes = dict(default_params.items() + query_params.items()) @@ -8,6 +9,7 @@ def get_threads(commentable_id, recursive=False, query_params={}, *args, **kwarg attributes, *args, **kwargs) return response.get('collection', []), response.get('page', 1), response.get('num_pages', 1) + def search_threads(course_id, recursive=False, query_params={}, *args, **kwargs): default_params = {'page': 1, 'per_page': 20, 'course_id': course_id, 'recursive': recursive} attributes = dict(default_params.items() + query_params.items()) @@ -15,106 +17,137 @@ def search_threads(course_id, recursive=False, query_params={}, *args, **kwargs) attributes, *args, **kwargs) return response.get('collection', []), response.get('page', 1), response.get('num_pages', 1) + def search_similar_threads(course_id, recursive=False, query_params={}, *args, **kwargs): default_params = {'course_id': course_id, 'recursive': recursive} attributes = dict(default_params.items() + query_params.items()) return _perform_request('get', _url_for_search_similar_threads(), attributes, *args, **kwargs) + def search_recent_active_threads(course_id, recursive=False, query_params={}, *args, **kwargs): default_params = {'course_id': course_id, 'recursive': recursive} attributes = dict(default_params.items() + query_params.items()) return _perform_request('get', _url_for_search_recent_active_threads(), attributes, *args, **kwargs) + def search_trending_tags(course_id, query_params={}, *args, **kwargs): default_params = {'course_id': course_id} attributes = dict(default_params.items() + query_params.items()) return _perform_request('get', _url_for_search_trending_tags(), attributes, *args, **kwargs) + def create_user(attributes, *args, **kwargs): return _perform_request('post', _url_for_users(), attributes, *args, **kwargs) + def update_user(user_id, attributes, *args, **kwargs): return _perform_request('put', _url_for_user(user_id), attributes, *args, **kwargs) + def get_threads_tags(*args, **kwargs): return _perform_request('get', _url_for_threads_tags(), {}, *args, **kwargs) + def tags_autocomplete(value, *args, **kwargs): return _perform_request('get', _url_for_threads_tags_autocomplete(), {'value': value}, *args, **kwargs) + def create_thread(commentable_id, attributes, *args, **kwargs): return _perform_request('post', _url_for_threads(commentable_id), attributes, *args, **kwargs) - + + def get_thread(thread_id, recursive=False, *args, **kwargs): return _perform_request('get', _url_for_thread(thread_id), {'recursive': recursive}, *args, **kwargs) + def update_thread(thread_id, attributes, *args, **kwargs): return _perform_request('put', _url_for_thread(thread_id), attributes, *args, **kwargs) + def create_comment(thread_id, attributes, *args, **kwargs): return _perform_request('post', _url_for_thread_comments(thread_id), attributes, *args, **kwargs) + def delete_thread(thread_id, *args, **kwargs): return _perform_request('delete', _url_for_thread(thread_id), *args, **kwargs) + def get_comment(comment_id, recursive=False, *args, **kwargs): return _perform_request('get', _url_for_comment(comment_id), {'recursive': recursive}, *args, **kwargs) + def update_comment(comment_id, attributes, *args, **kwargs): return _perform_request('put', _url_for_comment(comment_id), attributes, *args, **kwargs) + def create_sub_comment(comment_id, attributes, *args, **kwargs): return _perform_request('post', _url_for_comment(comment_id), attributes, *args, **kwargs) + def delete_comment(comment_id, *args, **kwargs): return _perform_request('delete', _url_for_comment(comment_id), *args, **kwargs) + def vote_for_comment(comment_id, user_id, value, *args, **kwargs): return _perform_request('put', _url_for_vote_comment(comment_id), {'user_id': user_id, 'value': value}, *args, **kwargs) + def undo_vote_for_comment(comment_id, user_id, *args, **kwargs): return _perform_request('delete', _url_for_vote_comment(comment_id), {'user_id': user_id}, *args, **kwargs) + def vote_for_thread(thread_id, user_id, value, *args, **kwargs): return _perform_request('put', _url_for_vote_thread(thread_id), {'user_id': user_id, 'value': value}, *args, **kwargs) + def undo_vote_for_thread(thread_id, user_id, *args, **kwargs): return _perform_request('delete', _url_for_vote_thread(thread_id), {'user_id': user_id}, *args, **kwargs) + def get_notifications(user_id, *args, **kwargs): return _perform_request('get', _url_for_notifications(user_id), *args, **kwargs) + def get_user_info(user_id, complete=True, *args, **kwargs): return _perform_request('get', _url_for_user(user_id), {'complete': complete}, *args, **kwargs) + def subscribe(user_id, subscription_detail, *args, **kwargs): return _perform_request('post', _url_for_subscription(user_id), subscription_detail, *args, **kwargs) + def subscribe_user(user_id, followed_user_id, *args, **kwargs): return subscribe(user_id, {'source_type': 'user', 'source_id': followed_user_id}) follow = subscribe_user + def subscribe_thread(user_id, thread_id, *args, **kwargs): return subscribe(user_id, {'source_type': 'thread', 'source_id': thread_id}) + def subscribe_commentable(user_id, commentable_id, *args, **kwargs): return subscribe(user_id, {'source_type': 'other', 'source_id': commentable_id}) + def unsubscribe(user_id, subscription_detail, *args, **kwargs): return _perform_request('delete', _url_for_subscription(user_id), subscription_detail, *args, **kwargs) + def unsubscribe_user(user_id, followed_user_id, *args, **kwargs): return unsubscribe(user_id, {'source_type': 'user', 'source_id': followed_user_id}) unfollow = unsubscribe_user + def unsubscribe_thread(user_id, thread_id, *args, **kwargs): return unsubscribe(user_id, {'source_type': 'thread', 'source_id': thread_id}) + def unsubscribe_commentable(user_id, commentable_id, *args, **kwargs): return unsubscribe(user_id, {'source_type': 'other', 'source_id': commentable_id}) + def _perform_request(method, url, data_or_params=None, *args, **kwargs): if method in ['post', 'put', 'patch']: response = requests.request(method, url, data=data_or_params) @@ -130,51 +163,66 @@ def _perform_request(method, url, data_or_params=None, *args, **kwargs): else: return json.loads(response.text) + def _url_for_threads(commentable_id): return "{prefix}/{commentable_id}/threads".format(prefix=PREFIX, commentable_id=commentable_id) + def _url_for_thread(thread_id): return "{prefix}/threads/{thread_id}".format(prefix=PREFIX, thread_id=thread_id) + def _url_for_thread_comments(thread_id): return "{prefix}/threads/{thread_id}/comments".format(prefix=PREFIX, thread_id=thread_id) + def _url_for_comment(comment_id): return "{prefix}/comments/{comment_id}".format(prefix=PREFIX, comment_id=comment_id) + def _url_for_vote_comment(comment_id): return "{prefix}/comments/{comment_id}/votes".format(prefix=PREFIX, comment_id=comment_id) + def _url_for_vote_thread(thread_id): return "{prefix}/threads/{thread_id}/votes".format(prefix=PREFIX, thread_id=thread_id) + def _url_for_notifications(user_id): return "{prefix}/users/{user_id}/notifications".format(prefix=PREFIX, user_id=user_id) + def _url_for_subscription(user_id): return "{prefix}/users/{user_id}/subscriptions".format(prefix=PREFIX, user_id=user_id) + def _url_for_user(user_id): return "{prefix}/users/{user_id}".format(prefix=PREFIX, user_id=user_id) + def _url_for_search_threads(): return "{prefix}/search/threads".format(prefix=PREFIX) + def _url_for_search_similar_threads(): return "{prefix}/search/threads/more_like_this".format(prefix=PREFIX) + def _url_for_search_recent_active_threads(): return "{prefix}/search/threads/recent_active".format(prefix=PREFIX) + def _url_for_search_trending_tags(): return "{prefix}/search/tags/trending".format(prefix=PREFIX) + def _url_for_threads_tags(): return "{prefix}/threads/tags".format(prefix=PREFIX) + def _url_for_threads_tags_autocomplete(): return "{prefix}/threads/tags/autocomplete".format(prefix=PREFIX) + def _url_for_users(): return "{prefix}/users".format(prefix=PREFIX) - diff --git a/lms/lib/comment_client/models.py b/lms/lib/comment_client/models.py index 3ce3858d2d..8676d3af33 100644 --- a/lms/lib/comment_client/models.py +++ b/lms/lib/comment_client/models.py @@ -1,5 +1,6 @@ from utils import * + class Model(object): accessible_fields = ['id'] @@ -26,7 +27,7 @@ class Model(object): raise AttributeError("Field {0} does not exist".format(name)) self.retrieve() return self.__getattr__(name) - + def __setattr__(self, name, value): if name == 'attributes' or name not in self.accessible_fields: super(Model, self).__setattr__(name, value) @@ -80,7 +81,7 @@ class Model(object): def initializable_attributes(self): return extract(self.attributes, self.initializable_fields) - + @classmethod def before_save(cls, instance): pass @@ -91,10 +92,10 @@ class Model(object): def save(self): self.__class__.before_save(self) - if self.id: # if we have id already, treat this as an update + if self.id: # if we have id already, treat this as an update url = self.url(action='put', params=self.attributes) response = perform_request('put', url, self.updatable_attributes()) - else: # otherwise, treat this as an insert + else: # otherwise, treat this as an insert url = self.url(action='post', params=self.attributes) response = perform_request('post', url, self.initializable_attributes()) self.retrieved = True @@ -126,5 +127,5 @@ class Model(object): return cls.url_with_id(params) except KeyError: raise CommentClientError("Cannot perform action {0} without id".format(action)) - else: # action must be in DEFAULT_ACTIONS_WITHOUT_ID now + else: # action must be in DEFAULT_ACTIONS_WITHOUT_ID now return cls.url_without_id() diff --git a/lms/lib/comment_client/thread.py b/lms/lib/comment_client/thread.py index 6fd31b0823..912ae1af18 100644 --- a/lms/lib/comment_client/thread.py +++ b/lms/lib/comment_client/thread.py @@ -3,6 +3,7 @@ from utils import * import models import settings + class Thread(models.Model): accessible_fields = [ @@ -66,7 +67,7 @@ class Thread(models.Model): def _retrieve(self, *args, **kwargs): url = self.url(action='get', params=self.attributes) - request_params = { + request_params = { 'recursive': kwargs.get('recursive'), 'user_id': kwargs.get('user_id'), 'mark_as_read': kwargs.get('mark_as_read', True), diff --git a/lms/lib/comment_client/user.py b/lms/lib/comment_client/user.py index 546b27556c..c3ba84175e 100644 --- a/lms/lib/comment_client/user.py +++ b/lms/lib/comment_client/user.py @@ -3,6 +3,7 @@ from utils import * import models import settings + class User(models.Model): accessible_fields = ['username', 'email', 'follower_ids', 'upvoted_ids', 'downvoted_ids', @@ -82,17 +83,22 @@ class User(models.Model): response = perform_request('get', url, retrieve_params) self.update_attributes(**response) + def _url_for_vote_comment(comment_id): return "{prefix}/comments/{comment_id}/votes".format(prefix=settings.PREFIX, comment_id=comment_id) + def _url_for_vote_thread(thread_id): return "{prefix}/threads/{thread_id}/votes".format(prefix=settings.PREFIX, thread_id=thread_id) + def _url_for_subscription(user_id): return "{prefix}/users/{user_id}/subscriptions".format(prefix=settings.PREFIX, user_id=user_id) + def _url_for_user_active_threads(user_id): return "{prefix}/users/{user_id}/active_threads".format(prefix=settings.PREFIX, user_id=user_id) + def _url_for_user_subscribed_threads(user_id): return "{prefix}/users/{user_id}/subscribed_threads".format(prefix=settings.PREFIX, user_id=user_id) diff --git a/lms/lib/comment_client/utils.py b/lms/lib/comment_client/utils.py index f50797d5e0..e053fea6c0 100644 --- a/lms/lib/comment_client/utils.py +++ b/lms/lib/comment_client/utils.py @@ -5,23 +5,28 @@ import settings log = logging.getLogger('mitx.' + __name__) + def strip_none(dic): return dict([(k, v) for k, v in dic.iteritems() if v is not None]) + def strip_blank(dic): def _is_blank(v): return isinstance(v, str) and len(v.strip()) == 0 return dict([(k, v) for k, v in dic.iteritems() if not _is_blank(v)]) + def extract(dic, keys): if isinstance(keys, str): return strip_none({keys: dic.get(keys)}) else: return strip_none({k: dic.get(k) for k in keys}) + def merge_dict(dic1, dic2): return dict(dic1.items() + dic2.items()) + def perform_request(method, url, data_or_params=None, *args, **kwargs): if data_or_params is None: data_or_params = {} @@ -34,7 +39,7 @@ def perform_request(method, url, data_or_params=None, *args, **kwargs): except Exception as err: log.exception("Trying to call {method} on {url} with params {params}".format( method=method, url=url, params=data_or_params)) - # Reraise with a single exception type + # Reraise with a single exception type raise CommentClientError(str(err)) if 200 < response.status_code < 500: @@ -47,6 +52,7 @@ def perform_request(method, url, data_or_params=None, *args, **kwargs): else: return json.loads(response.text) + class CommentClientError(Exception): def __init__(self, msg): self.message = msg @@ -54,5 +60,6 @@ class CommentClientError(Exception): def __str__(self): return repr(self.message) + class CommentClientUnknownError(CommentClientError): pass diff --git a/lms/lib/dogfood/check.py b/lms/lib/dogfood/check.py index 0a1da38529..070d3f9262 100644 --- a/lms/lib/dogfood/check.py +++ b/lms/lib/dogfood/check.py @@ -59,5 +59,3 @@ def check_problem_code(ans, the_lcp, correct_answers, false_answers): 'msg': msg + endmsg, } return ret - - diff --git a/lms/lib/loncapa/loncapa_check.py b/lms/lib/loncapa/loncapa_check.py index 0fd998e00e..2cd591520e 100644 --- a/lms/lib/loncapa/loncapa_check.py +++ b/lms/lib/loncapa/loncapa_check.py @@ -33,5 +33,3 @@ def lc_choose(index, *args): deg2rad = math.pi / 180.0 rad2deg = 180.0 / math.pi - - diff --git a/lms/lib/symmath/symmath_check.py b/lms/lib/symmath/symmath_check.py index 3cc4fd7d3c..a3dec4aae5 100644 --- a/lms/lib/symmath/symmath_check.py +++ b/lms/lib/symmath/symmath_check.py @@ -143,6 +143,7 @@ def check(expect, given, numerical=False, matrix=False, normphase=False, abcsym= #----------------------------------------------------------------------------- # helper function to convert all

                  to + def make_error_message(msg): # msg = msg.replace('

                  ','

                  ').replace('

                  ','

                  ') msg = '
                  %s
                  ' % msg @@ -153,6 +154,7 @@ def make_error_message(msg): # # This is one of the main entry points to call. + def symmath_check(expect, ans, dynamath=None, options=None, debug=None, xml=None): ''' Check a symbolic mathematical expression using sympy. @@ -183,12 +185,12 @@ def symmath_check(expect, ans, dynamath=None, options=None, debug=None, xml=None # msg += '

                  abname=%s' % abname # msg += '

                  adict=%s' % (repr(adict).replace('<','<')) - threshold = 1.0e-3 # for numerical comparison (also with matrices) + threshold = 1.0e-3 # for numerical comparison (also with matrices) DEBUG = debug if xml is not None: - DEBUG = xml.get('debug',False) # override debug flag using attribute in symbolicmath xml - if DEBUG in ['0','False']: + DEBUG = xml.get('debug', False) # override debug flag using attribute in symbolicmath xml + if DEBUG in ['0', 'False']: DEBUG = False # options diff --git a/lms/static/admin/js/compress.py b/lms/static/admin/js/compress.py index 8d2caa28ea..a23b431750 100644 --- a/lms/static/admin/js/compress.py +++ b/lms/static/admin/js/compress.py @@ -6,6 +6,7 @@ import sys here = os.path.dirname(__file__) + def main(): usage = "usage: %prog [file1..fileN]" description = """With no file paths given this script will automatically diff --git a/lms/urls.py b/lms/urls.py index e9746c2338..b25c4d259e 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -13,7 +13,7 @@ urlpatterns = ('', # certificate view url(r'^update_certificate$', 'certificates.views.update_certificate'), - url(r'^$', 'branding.views.index', name="root"), # Main marketing page, or redirect to courseware + url(r'^$', 'branding.views.index', name="root"), # Main marketing page, or redirect to courseware url(r'^dashboard$', 'student.views.dashboard', name="dashboard"), url(r'^admin_dashboard$', 'dashboard.views.dashboard'), @@ -35,7 +35,7 @@ urlpatterns = ('', # url(r'^testcenter/logout$', 'student.test_center_views.logout'), url(r'^event$', 'track.views.user_track'), - url(r'^t/(?P