Commit 511a38ac by Joe Blaylock

Resolve conflicts from upstream release merge

Thanks to David and Giulio for their assistance.
parent 1aa630b9
......@@ -155,14 +155,10 @@ Johnny Brown <johnnybrown7@gmail.com>
Ben McMorran <bmcmorran@edx.org>
Mat Peterson <mpeterson@edx.org>
Tim Babych <tim.babych@gmail.com>
<<<<<<< HEAD
Se Won Jang <swjang@stanford.edu>
=======
Brandon DeRosier <btd@cheesekeg.com>
Daniel Li <swli@edx.org>
Daniel Friedman <dfriedman@edx.org>
Asad Iqbal <aiqbal@edx.org>
Peter Pinch <pdpinch@mit.edu>
Muhammad Shoaib <mshoaib@edx.org>
>>>>>>> upstream/rc/2014-07-23
......@@ -66,13 +66,9 @@ else:
'concept', # Concept mapper. See https://github.com/pmitros/ConceptXBlock
'done', # Lets students mark things as done. See https://github.com/pmitros/DoneXBlock
'audio', # Embed an audio file. See https://github.com/pmitros/AudioXBlock
<<<<<<< HEAD
'split_test',
'edx_sga'
=======
'edx_sga', # that weird grading xblock thing - remove this next merge
SPLIT_TEST_COMPONENT_TYPE, # Adds A/B test support
'recommender' # Crowdsourced recommender. Prototype by dli&pmitros. Intended for roll-out in one place in one course.
>>>>>>> upstream/rc/2014-07-23
] + OPEN_ENDED_COMPONENT_TYPES + NOTE_COMPONENT_TYPES
ADVANCED_COMPONENT_CATEGORY = 'advanced'
......
......@@ -136,15 +136,9 @@ class ChecklistTestCase(CourseTestCase):
# Verify no side effect in the original list.
self.assertEqual(get_action_url(checklist, index), stored)
<<<<<<< HEAD
test_expansion(self.course.checklists[0], 0, 'ManageUsers', '/course_team/slashes:mitX+333+Checklists_Course/')
test_expansion(self.course.checklists[1], 1, 'CourseOutline', '/course/slashes:mitX+333+Checklists_Course')
test_expansion(self.course.checklists[2], 0, 'http://www.youtube.com', 'http://www.youtube.com')
=======
test_expansion(self.course.checklists[0], 0, 'ManageUsers', '/course_team/mitX/333/Checklists_Course/')
test_expansion(self.course.checklists[1], 1, 'CourseOutline', '/course/mitX/333/Checklists_Course')
test_expansion(self.course.checklists[2], 0, 'http://help.edge.edx.org/', 'http://help.edge.edx.org/')
>>>>>>> upstream/rc/2014-07-23
test_expansion(self.course.checklists[2], 0, 'http://www.youtube.com', 'http://www.youtube.com')
def get_first_item(checklist):
......
......@@ -72,29 +72,9 @@ urlpatterns += patterns(
r'^course_info_update/{}/(?P<provided_id>\d+)?$'.format(settings.COURSE_KEY_PATTERN),
'course_info_update_handler'
),
<<<<<<< HEAD
url(r'^course/(?P<course_key_string>[^/]+)?$', 'course_handler', name='course_handler'),
url(r'^subsection/(?P<usage_key_string>[^/]+)$', 'subsection_handler'),
url(r'^unit/(?P<usage_key_string>[^/]+)$', 'unit_handler'),
url(r'^container/(?P<usage_key_string>[^/]+)$', 'container_handler'),
url(r'^checklists/(?P<course_key_string>[^/]+)/(?P<checklist_index>\d+)?$', 'checklists_handler'),
url(r'^orphan/(?P<course_key_string>[^/]+)$', 'orphan_handler'),
url(r'^assets/(?P<course_key_string>[^/]+)/(?P<asset_key_string>.+)?$', 'assets_handler'),
url(r'^import/(?P<course_key_string>[^/]+)$', 'import_handler'),
url(r'^import_status/(?P<course_key_string>[^/]+)/(?P<filename>.+)$', 'import_status_handler'),
url(r'^export/(?P<course_key_string>[^/]+)$', 'export_handler'),
url(r'^xblock/(?P<usage_key_string>[^/]+)/(?P<view_name>[^/]+)$', 'xblock_view_handler'),
url(r'^xblock/(?P<usage_key_string>[^/]+)?$', 'xblock_handler'),
url(r'^tabs/(?P<course_key_string>[^/]+)$', 'tabs_handler'),
url(r'^settings/details/(?P<course_key_string>[^/]+)$', 'settings_handler'),
url(r'^settings/grading/(?P<course_key_string>[^/]+)(/)?(?P<grader_index>\d+)?$', 'grading_handler'),
url(r'^settings/advanced/(?P<course_key_string>[^/]+)$', 'advanced_settings_handler'),
url(r'^textbooks/(?P<course_key_string>[^/]+)$', 'textbooks_list_handler'),
url(r'^textbooks/(?P<course_key_string>[^/]+)/(?P<textbook_id>\d[^/]*)$', 'textbooks_detail_handler'),
url(r'^utilities/(?P<course_key_string>[^/]+)$', 'utility_handler'),
url(r'^utility/captions/(?P<course_key_string>[^/]+)$', 'utility_captions_handler'),
url(r'^utility/bulksettings/(?P<course_key_string>[^/]+)$', 'utility_bulksettings_handler'),
=======
url(r'^course/{}?$'.format(settings.COURSE_KEY_PATTERN), 'course_handler', name='course_handler'),
url(r'^subsection/{}$'.format(settings.USAGE_KEY_PATTERN), 'subsection_handler'),
url(r'^unit/{}$'.format(settings.USAGE_KEY_PATTERN), 'unit_handler'),
......@@ -113,7 +93,6 @@ urlpatterns += patterns(
url(r'^settings/advanced/{}$'.format(settings.COURSE_KEY_PATTERN), 'advanced_settings_handler'),
url(r'^textbooks/{}$'.format(settings.COURSE_KEY_PATTERN), 'textbooks_list_handler'),
url(r'^textbooks/{}/(?P<textbook_id>\d[^/]*)$'.format(settings.COURSE_KEY_PATTERN), 'textbooks_detail_handler'),
>>>>>>> upstream/rc/2014-07-23
)
if settings.FEATURES.get('ENABLE_GROUP_CONFIGURATIONS'):
......
......@@ -170,16 +170,14 @@ def _has_access_course_desc(user, action, course):
else:
reg_method_ok = True # if not using this access check, it's always OK.
<<<<<<< HEAD
if reg_method_ok and within_enrollment_period():
# in enrollment period, so any user is allowed to enroll.
debug("Allow: in enrollment period")
return True
=======
now = datetime.now(UTC())
start = course.enrollment_start or datetime.min.replace(tzinfo=pytz.UTC)
end = course.enrollment_end or datetime.max.replace(tzinfo=pytz.UTC)
>>>>>>> upstream/rc/2014-07-23
# if user is in CourseEnrollmentAllowed with right course key then can also enroll
# (note that course.id actually points to a CourseKey)
......@@ -315,11 +313,8 @@ def _has_access_descriptor(user, action, descriptor, course_key=None):
students to see modules. If not, views should check the course, so we
don't have to hit the enrollments table on every module load.
"""
<<<<<<< HEAD
=======
if descriptor.visible_to_staff_only and not _has_staff_access_to_descriptor(user, descriptor, course_key):
return False
>>>>>>> upstream/rc/2014-07-23
# If start dates are off, can always load
if settings.FEATURES['DISABLE_START_DATES'] and not is_masquerading_as_student(user):
......
......@@ -649,7 +649,6 @@ def course_about(request, course_id):
reg_then_add_to_cart_link = "{reg_url}?course_id={course_id}&enrollment_action=add_to_cart".format(
reg_url=reverse('register_user'), course_id=course.id.to_deprecated_string())
<<<<<<< HEAD
# only allow course sneak peek if
# 1) within enrollment period
# 2) course specifies it's okay
......@@ -658,49 +657,37 @@ def course_about(request, course_id):
CoursePreference.course_allows_nonregistered_access(course_key) and
not UserProfile.has_registered(request.user))
# see if we have already filled up all allowed enrollments
is_course_full = CourseEnrollment.is_course_full(course)
context = {
=======
# Used to provide context to message to student if enrollment not allowed
can_enroll = has_access(request.user, 'enroll', course)
invitation_only = course.invitation_only
# see if we have already filled up all allowed enrollments
is_course_full = CourseEnrollment.is_course_full(course)
# Register button should be disabled if one of the following is true:
# - Student is already registered for course
# - Course is already full
# - Student cannot enroll in course
active_reg_button = not(registered or is_course_full or not can_enroll)
active_reg_button = not(regularly_registered or is_course_full or not can_enroll)
is_shib_course = uses_shib(course)
return render_to_response('courseware/course_about.html', {
>>>>>>> upstream/rc/2014-07-23
'course': course,
'regularly_registered': regularly_registered,
'sneakpeek_allowed': sneakpeek_allowed,
'staff_access': staff_access,
'studio_url': studio_url,
'regularly_registered': regularly_registered,
'sneakpeek_allowed': sneakpeek_allowed,
'course_target': course_target,
'registration_price': registration_price,
'in_cart': in_cart,
'reg_then_add_to_cart_link': reg_then_add_to_cart_link,
'show_courseware_link': show_courseware_link,
<<<<<<< HEAD
'is_course_full': is_course_full
}
return render_to_response('courseware/course_about.html', context)
=======
'is_course_full': is_course_full,
'can_enroll': can_enroll,
'invitation_only': invitation_only,
'active_reg_button': active_reg_button,
'is_shib_course': is_shib_course,
})
>>>>>>> upstream/rc/2014-07-23
@ensure_csrf_cookie
......
......@@ -387,14 +387,10 @@
</section>
</section>
<<<<<<< HEAD
%if not regularly_registered:
=======
## Need to put this hidden form on the page so that the registration button works.
## Since it's no harm to display a hidden form, we display it with the most permissive conditional
## which is when the student is not registered.
%if active_reg_button or is_shib_course:
>>>>>>> upstream/rc/2014-07-23
<div style="display: none;">
<form id="class_enroll_form" method="post" data-remote="true" action="${reverse('change_enrollment')}">
<fieldset class="enroll_fieldset">
......
......@@ -45,17 +45,12 @@
{% block bodyextra %}{% endblock %}
</div>
<<<<<<< HEAD
{% if FEATURES.USE_CUSTOM_THEME %}
{% include "theme-footer.html" %}
{% else %}
{% include "footer.html" %}
{% endif %}
=======
{% include "edx_footer.html" %}
>>>>>>> upstream/rc/2014-07-23
{% compressed_js 'application' %}
{% compressed_js 'module-js' %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment