Merge branch 'master' into zulqarnain/BOM-1147
This commit is contained in:
@@ -18,10 +18,10 @@ class CharListFilter(filters.CharFilter):
|
||||
class UUIDListFilter(CharListFilter):
|
||||
""" Filters a field via a comma-delimited list of UUIDs. """
|
||||
|
||||
def __init__(self, name='uuid', label=None, widget=None, method=None, lookup_expr='in', required=False,
|
||||
def __init__(self, field_name='uuid', label=None, widget=None, method=None, lookup_expr='in', required=False,
|
||||
distinct=False, exclude=False, **kwargs):
|
||||
super(UUIDListFilter, self).__init__(
|
||||
name=name,
|
||||
field_name=field_name,
|
||||
label=label,
|
||||
widget=widget,
|
||||
method=method,
|
||||
@@ -36,7 +36,7 @@ class UUIDListFilter(CharListFilter):
|
||||
class CourseEntitlementFilter(filters.FilterSet):
|
||||
|
||||
uuid = UUIDListFilter()
|
||||
user = filters.CharFilter(name='user__username')
|
||||
user = filters.CharFilter(field_name='user__username')
|
||||
|
||||
class Meta:
|
||||
model = CourseEntitlement
|
||||
|
||||
@@ -222,7 +222,6 @@ class MigrationTests(TestCase):
|
||||
Tests for migrations.
|
||||
"""
|
||||
|
||||
@unittest.skip("Due to some recent schema changes this test is failing. Temporarily skipping it.")
|
||||
@override_settings(MIGRATION_MODULES={})
|
||||
def test_migrations_are_in_sync(self):
|
||||
"""
|
||||
|
||||
@@ -1 +1 @@
|
||||
a7b74aee0c53d5250f9d8189f0567339930f03f6
|
||||
5bda3a6b31176c1ee566481849ce26d55672a65d
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1783,6 +1783,8 @@ CREATE TABLE `course_overviews_courseoverview` (
|
||||
`eligible_for_financial_aid` tinyint(1) NOT NULL,
|
||||
`language` longtext,
|
||||
`certificate_available_date` datetime(6) DEFAULT NULL,
|
||||
`end_date` datetime(6) DEFAULT NULL,
|
||||
`start_date` datetime(6) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
@@ -1880,6 +1882,8 @@ CREATE TABLE `course_overviews_historicalcourseoverview` (
|
||||
`history_change_reason` varchar(100) DEFAULT NULL,
|
||||
`history_type` varchar(1) NOT NULL,
|
||||
`history_user_id` int(11) DEFAULT NULL,
|
||||
`end_date` datetime(6) DEFAULT NULL,
|
||||
`start_date` datetime(6) DEFAULT NULL,
|
||||
PRIMARY KEY (`history_id`),
|
||||
KEY `course_overviews_his_history_user_id_e21063d9_fk_auth_user` (`history_user_id`),
|
||||
KEY `course_overviews_historicalcourseoverview_id_647043f0` (`id`),
|
||||
@@ -2545,7 +2549,7 @@ CREATE TABLE `django_migrations` (
|
||||
`name` varchar(255) NOT NULL,
|
||||
`applied` datetime(6) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=639 DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=641 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `django_openid_auth_association`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
@@ -7236,10 +7240,7 @@ CREATE TABLE `wiki_urlpath` (
|
||||
UNIQUE KEY `wiki_urlpath_site_id_parent_id_slug_e4942e5d_uniq` (`site_id`,`parent_id`,`slug`),
|
||||
KEY `wiki_urlpath_article_id_9ef0c0fb_fk_wiki_article_id` (`article_id`),
|
||||
KEY `wiki_urlpath_slug_39d212eb` (`slug`),
|
||||
KEY `wiki_urlpath_lft_46bfd227` (`lft`),
|
||||
KEY `wiki_urlpath_rght_186fc98e` (`rght`),
|
||||
KEY `wiki_urlpath_tree_id_090b475d` (`tree_id`),
|
||||
KEY `wiki_urlpath_level_57f17cfd` (`level`),
|
||||
KEY `wiki_urlpath_parent_id_a6e675ac` (`parent_id`),
|
||||
CONSTRAINT `wiki_urlpath_article_id_9ef0c0fb_fk_wiki_article_id` FOREIGN KEY (`article_id`) REFERENCES `wiki_article` (`id`),
|
||||
CONSTRAINT `wiki_urlpath_parent_id_a6e675ac_fk_wiki_urlpath_id` FOREIGN KEY (`parent_id`) REFERENCES `wiki_urlpath` (`id`),
|
||||
|
||||
@@ -36,7 +36,7 @@ CREATE TABLE `django_migrations` (
|
||||
`name` varchar(255) NOT NULL,
|
||||
`applied` datetime(6) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=639 DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=641 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
|
||||
@@ -176,12 +176,9 @@ class CourseDateSummaryTest(SharedModuleStoreTestCase):
|
||||
self.client.login(username=user.username, password=TEST_PASSWORD)
|
||||
|
||||
html_elements = [
|
||||
'<h3 class="hd hd-6 handouts-header">Important Course Dates</h3>',
|
||||
'<h3 class="hd hd-6 handouts-header">Upcoming Dates</h3>',
|
||||
'<div class="date-summary-container">',
|
||||
'<div class="date-summary date-summary-todays-date">',
|
||||
'<span class="hd hd-6 heading localized-datetime"',
|
||||
'data-datetime="2015-01-02 00:00:00+00:00"',
|
||||
u'data-string="Today is {date}"',
|
||||
'<p class="hd hd-6 date localized-datetime"',
|
||||
'data-timezone="None"'
|
||||
]
|
||||
url = reverse(url_name, args=(course.id,))
|
||||
@@ -204,12 +201,9 @@ class CourseDateSummaryTest(SharedModuleStoreTestCase):
|
||||
response = self.client.get(url, follow=True)
|
||||
|
||||
html_elements = [
|
||||
'<h3 class="hd hd-6 handouts-header">Important Course Dates</h3>',
|
||||
'<h3 class="hd hd-6 handouts-header">Upcoming Dates</h3>',
|
||||
'<div class="date-summary-container">',
|
||||
'<div class="date-summary date-summary-todays-date">',
|
||||
'<span class="hd hd-6 heading localized-datetime"',
|
||||
'data-datetime="2015-01-02 00:00:00+00:00"',
|
||||
u'data-string="Today is {date}"',
|
||||
'<p class="hd hd-6 date localized-datetime"',
|
||||
'data-timezone="America/Los_Angeles"'
|
||||
]
|
||||
for html in html_elements:
|
||||
@@ -235,7 +229,6 @@ class CourseDateSummaryTest(SharedModuleStoreTestCase):
|
||||
url = reverse(url_name, args=(course.id,))
|
||||
response = self.client.get(url, follow=True)
|
||||
html_elements = [
|
||||
u'data-string="in 1 day - {date}"',
|
||||
'data-datetime="2015-01-03 00:00:00+00:00"'
|
||||
]
|
||||
for html in html_elements:
|
||||
@@ -255,7 +248,6 @@ class CourseDateSummaryTest(SharedModuleStoreTestCase):
|
||||
url = reverse(url_name, args=(course.id,))
|
||||
response = self.client.get(url, follow=True)
|
||||
html_elements = [
|
||||
u'data-string="in 1 day - {date}"',
|
||||
'data-datetime="2015-01-03 00:00:00+00:00"',
|
||||
'data-timezone="America/Los_Angeles"'
|
||||
]
|
||||
|
||||
@@ -3578,6 +3578,7 @@ ENTERPRISE_CONSENT_API_URL = LMS_INTERNAL_ROOT_URL + '/consent/api/v1/'
|
||||
ENTERPRISE_SERVICE_WORKER_USERNAME = 'enterprise_worker'
|
||||
ENTERPRISE_API_CACHE_TIMEOUT = 3600 # Value is in seconds
|
||||
ENTERPRISE_CUSTOMER_LOGO_IMAGE_SIZE = 512 # Enterprise logo image size limit in KB's
|
||||
ENTERPRISE_CATALOG_INTERNAL_ROOT_URL = 'http://enterprise.catalog.app:18160'
|
||||
|
||||
############## ENTERPRISE SERVICE LMS CONFIGURATION ##################################
|
||||
# The LMS has some features embedded that are related to the Enterprise service, but
|
||||
|
||||
@@ -1025,6 +1025,11 @@ ENTERPRISE_API_CACHE_TIMEOUT = ENV_TOKENS.get(
|
||||
'ENTERPRISE_API_CACHE_TIMEOUT',
|
||||
ENTERPRISE_API_CACHE_TIMEOUT
|
||||
)
|
||||
ENTERPRISE_CATALOG_INTERNAL_ROOT_URL = ENV_TOKENS.get(
|
||||
'ENTERPRISE_CATALOG_INTERNAL_ROOT_URL',
|
||||
ENTERPRISE_CATALOG_INTERNAL_ROOT_URL
|
||||
)
|
||||
|
||||
|
||||
############## ENTERPRISE SERVICE LMS CONFIGURATION ##################################
|
||||
# The LMS has some features embedded that are related to the Enterprise service, but
|
||||
|
||||
1
lms/static/images/calendar-alt-regular.svg
Normal file
1
lms/static/images/calendar-alt-regular.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="far" data-icon="calendar-alt" class="svg-inline--fa fa-calendar-alt fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -457,9 +457,10 @@ button.accordion-trigger, button.prerequisite-button {
|
||||
.date-summary-container {
|
||||
.date-summary {
|
||||
@include clearfix;
|
||||
@include border-left(3px solid $gray-300);
|
||||
|
||||
padding: $baseline/2;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: $baseline/2 $baseline/2 $baseline/2 0;
|
||||
|
||||
.heading {
|
||||
font-size: 0.9rem;
|
||||
@@ -469,18 +470,38 @@ button.accordion-trigger, button.prerequisite-button {
|
||||
color: theme-color("dark");
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-top: $baseline/2;
|
||||
margin-bottom: $baseline/2;
|
||||
display: inline-block;
|
||||
.left-column {
|
||||
flex: 5%;
|
||||
|
||||
.calendar-icon {
|
||||
margin-top: 3px;
|
||||
height: 1em;
|
||||
width: auto;
|
||||
background: url('#{$static-path}/images/calendar-alt-regular.svg');
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
}
|
||||
|
||||
.date-summary-link {
|
||||
font-weight: $font-semibold;
|
||||
.right-column {
|
||||
flex: 85%;
|
||||
|
||||
a {
|
||||
color: $link-color;
|
||||
font-weight: $font-regular;
|
||||
.localized-datetime {
|
||||
font-weight: $font-weight-bold;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-bottom: $baseline/2;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.date-summary-link {
|
||||
font-weight: $font-semibold;
|
||||
|
||||
a {
|
||||
color: $link-color;
|
||||
font-weight: $font-regular;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.27 on 2020-01-13 13:55
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('course_overviews', '0017_auto_20191002_0823'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='courseoverview',
|
||||
name='end_date',
|
||||
field=models.DateTimeField(null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='courseoverview',
|
||||
name='start_date',
|
||||
field=models.DateTimeField(null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='historicalcourseoverview',
|
||||
name='end_date',
|
||||
field=models.DateTimeField(null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='historicalcourseoverview',
|
||||
name='start_date',
|
||||
field=models.DateTimeField(null=True),
|
||||
),
|
||||
]
|
||||
@@ -54,7 +54,7 @@ class CourseOverview(TimeStampedModel):
|
||||
app_label = 'course_overviews'
|
||||
|
||||
# IMPORTANT: Bump this whenever you modify this model and/or add a migration.
|
||||
VERSION = 6
|
||||
VERSION = 7
|
||||
|
||||
# Cache entry versioning.
|
||||
version = IntegerField()
|
||||
@@ -68,8 +68,11 @@ class CourseOverview(TimeStampedModel):
|
||||
display_org_with_default = TextField()
|
||||
|
||||
# Start/end dates
|
||||
# TODO Remove 'start' & 'end' in removing field in column renaming, DE-1822
|
||||
start = DateTimeField(null=True)
|
||||
end = DateTimeField(null=True)
|
||||
start_date = DateTimeField(null=True)
|
||||
end_date = DateTimeField(null=True)
|
||||
advertised_start = TextField(null=True)
|
||||
announcement = DateTimeField(null=True)
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ from django.contrib.auth import login as django_login
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.contrib.auth.models import User
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
from django.urls import reverse
|
||||
from django.utils.decorators import method_decorator
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.views.decorators.csrf import csrf_exempt, csrf_protect, ensure_csrf_cookie
|
||||
@@ -292,11 +293,19 @@ def _check_user_auth_flow(site, user):
|
||||
|
||||
# If user belongs to allowed domain and not whitelisted then user must login through allowed domain SSO
|
||||
if user_domain == allowed_domain and not AllowedAuthUser.objects.filter(site=site, email=user.email).exists():
|
||||
msg = _(
|
||||
u'As an {allowed_domain} user, You must login with your {allowed_domain} {provider} account.'
|
||||
).format(
|
||||
msg = Text(_(
|
||||
u'As {allowed_domain} user, You must login with your {allowed_domain} '
|
||||
u'{link_start}{provider} account{link_end}.'
|
||||
)).format(
|
||||
allowed_domain=allowed_domain,
|
||||
provider=site.configuration.get_value('THIRD_PARTY_AUTH_ONLY_PROVIDER')
|
||||
link_start=HTML("<a href='{tpa_provider_link}'>").format(
|
||||
tpa_provider_link='{dashboard_url}?tpa_hint={tpa_hint}'.format(
|
||||
dashboard_url=reverse('dashboard'),
|
||||
tpa_hint=site.configuration.get_value('THIRD_PARTY_AUTH_HINT'),
|
||||
)
|
||||
),
|
||||
provider=site.configuration.get_value('THIRD_PARTY_AUTH_ONLY_PROVIDER'),
|
||||
link_end=HTML("</a>")
|
||||
)
|
||||
raise AuthFailedError(msg)
|
||||
|
||||
|
||||
@@ -616,6 +616,7 @@ class LoginTest(SiteMixin, CacheIsolationTestCase):
|
||||
},
|
||||
)
|
||||
@ddt.unpack
|
||||
@skip_unless_lms
|
||||
def test_login_for_user_auth_flow(
|
||||
self,
|
||||
switch_enabled,
|
||||
@@ -629,6 +630,7 @@ class LoginTest(SiteMixin, CacheIsolationTestCase):
|
||||
Verify that `login._check_user_auth_flow` works as expected.
|
||||
"""
|
||||
provider = 'Google'
|
||||
provider_tpa_hint = 'saml-test'
|
||||
username = 'batman'
|
||||
user_email = '{username}@{domain}'.format(username=username, domain=user_domain)
|
||||
user = self._create_user(username, user_email)
|
||||
@@ -636,6 +638,7 @@ class LoginTest(SiteMixin, CacheIsolationTestCase):
|
||||
'SITE_NAME': allowed_domain,
|
||||
'THIRD_PARTY_AUTH_ONLY_DOMAIN': allowed_domain,
|
||||
'THIRD_PARTY_AUTH_ONLY_PROVIDER': provider,
|
||||
'THIRD_PARTY_AUTH_HINT': provider_tpa_hint,
|
||||
}
|
||||
|
||||
with ENABLE_LOGIN_USING_THIRDPARTY_AUTH_ONLY.override(switch_enabled):
|
||||
@@ -647,10 +650,14 @@ class LoginTest(SiteMixin, CacheIsolationTestCase):
|
||||
else:
|
||||
AllowedAuthUser.objects.filter(site=site, email=user.email).delete()
|
||||
|
||||
value = None if success else u'As an {0} user, You must login with your {0} {1} account.'.format(
|
||||
allowed_domain,
|
||||
provider
|
||||
)
|
||||
if success:
|
||||
value = None
|
||||
else:
|
||||
value = u'As {0} user, You must login with your {0} <a href=\'{1}\'>{2} account</a>.'.format(
|
||||
allowed_domain,
|
||||
'{}?tpa_hint={}'.format(reverse("dashboard"), provider_tpa_hint),
|
||||
provider,
|
||||
)
|
||||
response, __ = self._login_response(user.email, self.password)
|
||||
self._assert_response(
|
||||
response,
|
||||
|
||||
@@ -7,12 +7,13 @@
|
||||
<%!
|
||||
from django.utils.translation import ugettext as _
|
||||
%>
|
||||
<h3 class="hd hd-6 handouts-header">${_("Important Course Dates")}</h3>
|
||||
## Should be organized by date, last date appearing at the bottom
|
||||
|
||||
% for course_date in course_date_blocks:
|
||||
<%include file="dates-summary.html" args="course_date=course_date" />
|
||||
% endfor
|
||||
% if len(course_date_blocks) > 0:
|
||||
<h3 class="hd hd-6 handouts-header">${_("Upcoming Dates")}</h3>
|
||||
## Should be organized by date, last date appearing at the bottom
|
||||
% for course_date_block in course_date_blocks:
|
||||
<%include file="dates-summary.html" args="course_date=course_date_block" />
|
||||
% endfor
|
||||
% endif
|
||||
|
||||
<%static:require_module_async module_name="js/dateutil_factory" class_name="DateUtilFactory">
|
||||
DateUtilFactory.transform('.localized-datetime');
|
||||
|
||||
@@ -4,23 +4,24 @@ from django.utils.translation import ugettext as _
|
||||
<%page args="course_date" expression_filter="h"/>
|
||||
<div class="date-summary-container">
|
||||
<div class="date-summary date-summary-${course_date.css_class}">
|
||||
% if course_date.title:
|
||||
% if course_date.title == 'current_datetime':
|
||||
<span class="hd hd-6 heading localized-datetime" data-datetime="${course_date.date}" data-string="${_(u'Today is {date}')}" data-timezone="${user_timezone}" data-language="${user_language}"></span>
|
||||
% else:
|
||||
<div class="left-column">
|
||||
<div class="calendar-icon"></div>
|
||||
</div>
|
||||
<div class="right-column">
|
||||
% if course_date.date:
|
||||
<p class="hd hd-6 date localized-datetime" data-format="shortDate" data-datetime="${course_date.date}" data-timezone="${user_timezone}" data-language="${user_language}"></p>
|
||||
% endif
|
||||
% if course_date.title:
|
||||
<span class="hd hd-6 heading">${course_date.title}</span>
|
||||
% endif
|
||||
% endif
|
||||
% if course_date.date and course_date.title != 'current_datetime':
|
||||
<p class="hd hd-6 date localized-datetime" data-format="shortDate" data-datetime="${course_date.date}" data-timezone="${user_timezone}" data-language="${user_language}" data-string="${_(course_date.relative_datestring)}"></p>
|
||||
% endif
|
||||
% if course_date.description:
|
||||
<p class="description">${course_date.description}</p>
|
||||
% endif
|
||||
% if course_date.link and course_date.link_text:
|
||||
<span class="date-summary-link">
|
||||
<a href="${course_date.link}">${course_date.link_text}</a>
|
||||
</span>
|
||||
% endif
|
||||
% if course_date.description:
|
||||
<p class="description">${course_date.description}</p>
|
||||
% endif
|
||||
% if course_date.link and course_date.link_text:
|
||||
<span class="date-summary-link">
|
||||
<a href="${course_date.link}">${course_date.link_text}</a>
|
||||
</span>
|
||||
% endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -41,7 +41,6 @@ class TestCourseDatesFragmentView(ModuleStoreTestCase):
|
||||
|
||||
def test_course_dates_fragment(self):
|
||||
response = self.client.get(self.dates_fragment_url)
|
||||
self.assertContains(response, 'Today is')
|
||||
self.assertContains(response, 'Course End')
|
||||
|
||||
self.client.logout()
|
||||
|
||||
@@ -70,7 +70,6 @@ from .test_course_updates import create_course_update, remove_course_updates
|
||||
TEST_PASSWORD = 'test'
|
||||
TEST_CHAPTER_NAME = 'Test Chapter'
|
||||
TEST_COURSE_TOOLS = 'Course Tools'
|
||||
TEST_COURSE_TODAY = 'Today is'
|
||||
TEST_BANNER_CLASS = '<div class="course-expiration-message">'
|
||||
TEST_WELCOME_MESSAGE = '<h2>Welcome!</h2>'
|
||||
TEST_UPDATE_MESSAGE = '<h2>Test Update!</h2>'
|
||||
@@ -311,7 +310,6 @@ class TestCourseHomePageAccess(CourseHomePageTestCase):
|
||||
|
||||
# Verify that the course tools and dates are always shown
|
||||
self.assertContains(response, TEST_COURSE_TOOLS)
|
||||
self.assertContains(response, TEST_COURSE_TODAY)
|
||||
|
||||
is_anonymous = user_type is CourseUserType.ANONYMOUS
|
||||
is_enrolled = user_type is CourseUserType.ENROLLED
|
||||
@@ -365,7 +363,6 @@ class TestCourseHomePageAccess(CourseHomePageTestCase):
|
||||
|
||||
# Verify that the course tools and dates are always shown
|
||||
self.assertContains(response, TEST_COURSE_TOOLS)
|
||||
self.assertContains(response, TEST_COURSE_TODAY)
|
||||
|
||||
# Verify that welcome messages are never shown
|
||||
self.assertNotContains(response, TEST_WELCOME_MESSAGE)
|
||||
@@ -639,7 +636,6 @@ class TestCourseHomePageAccess(CourseHomePageTestCase):
|
||||
response = self.client.get(course_home_url(audit_only_course))
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertContains(response, TEST_COURSE_TOOLS)
|
||||
self.assertContains(response, TEST_COURSE_TODAY)
|
||||
self.assertNotContains(response, TEST_BANNER_CLASS)
|
||||
|
||||
@mock.patch.dict(settings.FEATURES, {'DISABLE_START_DATES': False})
|
||||
|
||||
@@ -28,7 +28,7 @@ class CourseDatesFragmentView(EdxFragmentView):
|
||||
course_date_blocks = get_course_date_blocks(course, request.user)
|
||||
|
||||
context = {
|
||||
'course_date_blocks': course_date_blocks
|
||||
'course_date_blocks': [block for block in course_date_blocks if block.title != 'current_datetime']
|
||||
}
|
||||
html = render_to_string(self.template_name, context)
|
||||
dates_fragment = Fragment(html)
|
||||
|
||||
@@ -43,7 +43,7 @@ django-cors-headers # Used to allow to configure CORS headers fo
|
||||
django-countries # Country data for Django forms and model fields
|
||||
django-crum # Middleware that stores the current request and user in thread local storage
|
||||
django-fernet-fields # via edx-enterprise (should be added to its setup.py)
|
||||
django-filter==1.0.4 # Allows users to filter Django querysets dynamically
|
||||
django-filter # Allows users to filter Django querysets dynamically
|
||||
django-ipware # Get the client's real IP address
|
||||
django-method-override
|
||||
django-model-utils
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
-e git+https://github.com/edx/acid-block.git@98aecba94ecbfa934e2d00262741c0ea9f557fc9#egg=acid-xblock
|
||||
-e common/lib/capa
|
||||
-e git+https://github.com/edx/codejail.git@4127fc4bd5775cc72aee8d7f0a70e31405e22439#egg=codejail
|
||||
-e git+https://github.com/edx/django-wiki.git@v0.0.24#egg=django-wiki
|
||||
-e git+https://github.com/edx/django-wiki.git@v0.0.25#egg=django-wiki
|
||||
-e git+https://github.com/edx/DoneXBlock.git@2.0.1#egg=done-xblock
|
||||
-e git+https://github.com/jazkarta/edx-jsme.git@690dbf75441fa91c7c4899df0b83d77f7deb5458#egg=edx-jsme
|
||||
-e .
|
||||
@@ -61,7 +61,7 @@ django-cors-headers==2.5.3
|
||||
django-countries==5.5
|
||||
django-crum==0.7.5
|
||||
django-fernet-fields==0.6
|
||||
django-filter==1.0.4
|
||||
django-filter==2.2.0
|
||||
django-ipware==2.1.0
|
||||
django-js-asset==1.2.2 # via django-mptt
|
||||
django-method-override==0.2.0
|
||||
@@ -168,7 +168,7 @@ nodeenv==1.3.4
|
||||
numpy==1.18.1 # via scipy
|
||||
git+https://github.com/joestump/python-oauth2.git@b94f69b1ad195513547924e380d9265133e995fa#egg=oauth2
|
||||
oauthlib==2.1.0
|
||||
git+https://github.com/edx/edx-ora2.git@2.5.9#egg=ora2==2.5.9
|
||||
git+https://github.com/edx/edx-ora2.git@2.6.0#egg=ora2==2.6.0
|
||||
path.py==8.2.1
|
||||
pathtools==0.1.2
|
||||
paver==1.3.4
|
||||
@@ -243,7 +243,7 @@ web-fragments==0.3.1
|
||||
webencodings==0.5.1 # via bleach, html5lib
|
||||
webob==1.8.5 # via xblock
|
||||
wrapt==1.10.5
|
||||
git+https://github.com/edx-solutions/xblock-drag-and-drop-v2@v2.2.6#egg=xblock-drag-and-drop-v2==2.2.6
|
||||
git+https://github.com/edx-solutions/xblock-drag-and-drop-v2@v2.2.8#egg=xblock-drag-and-drop-v2==2.2.8
|
||||
git+https://github.com/open-craft/xblock-poll@3c7dcaf6c933d914188f0740a60711603f948d26#egg=xblock-poll==1.9.1
|
||||
xblock-utils==1.2.4
|
||||
xblock==1.2.9
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
-e git+https://github.com/edx/acid-block.git@98aecba94ecbfa934e2d00262741c0ea9f557fc9#egg=acid-xblock
|
||||
-e common/lib/capa
|
||||
-e git+https://github.com/edx/codejail.git@4127fc4bd5775cc72aee8d7f0a70e31405e22439#egg=codejail
|
||||
-e git+https://github.com/edx/django-wiki.git@v0.0.24#egg=django-wiki
|
||||
-e git+https://github.com/edx/django-wiki.git@v0.0.25#egg=django-wiki
|
||||
-e git+https://github.com/edx/DoneXBlock.git@2.0.1#egg=done-xblock
|
||||
-e git+https://github.com/jazkarta/edx-jsme.git@690dbf75441fa91c7c4899df0b83d77f7deb5458#egg=edx-jsme
|
||||
-e .
|
||||
@@ -74,7 +74,7 @@ django-countries==5.5
|
||||
django-crum==0.7.5
|
||||
django-debug-toolbar==1.11
|
||||
django-fernet-fields==0.6
|
||||
django-filter==1.0.4
|
||||
django-filter==2.2.0
|
||||
django-ipware==2.1.0
|
||||
django-js-asset==1.2.2
|
||||
django-method-override==0.2.0
|
||||
@@ -207,7 +207,7 @@ nodeenv==1.3.4
|
||||
numpy==1.18.1
|
||||
git+https://github.com/joestump/python-oauth2.git@b94f69b1ad195513547924e380d9265133e995fa#egg=oauth2
|
||||
oauthlib==2.1.0
|
||||
git+https://github.com/edx/edx-ora2.git@2.5.9#egg=ora2==2.5.9
|
||||
git+https://github.com/edx/edx-ora2.git@2.6.0#egg=ora2==2.6.0
|
||||
packaging==20.0
|
||||
pandas==0.22.0
|
||||
path.py==8.2.1
|
||||
@@ -330,7 +330,7 @@ webob==1.8.5
|
||||
websocket-client==0.57.0
|
||||
werkzeug==0.16.0
|
||||
wrapt==1.10.5
|
||||
git+https://github.com/edx-solutions/xblock-drag-and-drop-v2@v2.2.6#egg=xblock-drag-and-drop-v2==2.2.6
|
||||
git+https://github.com/edx-solutions/xblock-drag-and-drop-v2@v2.2.8#egg=xblock-drag-and-drop-v2==2.2.8
|
||||
git+https://github.com/open-craft/xblock-poll@3c7dcaf6c933d914188f0740a60711603f948d26#egg=xblock-poll==1.9.1
|
||||
xblock-utils==1.2.4
|
||||
xblock==1.2.9
|
||||
|
||||
@@ -56,7 +56,7 @@ git+https://github.com/edx/openedx-calc.git@e9b698c85ad1152002bc0868f475f153dce8
|
||||
git+https://github.com/edx/openedx-chem.git@ff4e3a03d3c7610e47a9af08eb648d8aabe2eb18#egg=chem==1.0.0
|
||||
|
||||
# Third-party:
|
||||
-e git+https://github.com/edx/django-wiki.git@v0.0.24#egg=django-wiki
|
||||
-e git+https://github.com/edx/django-wiki.git@v0.0.25#egg=django-wiki
|
||||
git+https://github.com/edx/MongoDBProxy.git@d92bafe9888d2940f647a7b2b2383b29c752f35a#egg=MongoDBProxy==0.1.0+edx.2
|
||||
-e git+https://github.com/dementrock/pystache_custom.git@776973740bdaad83a3b029f96e415a7d1e8bec2f#egg=pystache_custom-dev
|
||||
-e git+https://github.com/jazkarta/edx-jsme.git@690dbf75441fa91c7c4899df0b83d77f7deb5458#egg=edx-jsme
|
||||
@@ -81,7 +81,7 @@ git+https://github.com/edx/bridgekeeper.git@4e34894e4ac5d0467ed1901811a81fd87ee0
|
||||
# Our libraries:
|
||||
-e git+https://github.com/edx/codejail.git@4127fc4bd5775cc72aee8d7f0a70e31405e22439#egg=codejail
|
||||
-e git+https://github.com/edx/acid-block.git@98aecba94ecbfa934e2d00262741c0ea9f557fc9#egg=acid-xblock
|
||||
git+https://github.com/edx/edx-ora2.git@2.5.9#egg=ora2==2.5.9
|
||||
git+https://github.com/edx/edx-ora2.git@2.6.0#egg=ora2==2.6.0
|
||||
git+https://github.com/edx/crowdsourcehinter.git@a7ffc85b134b7d8909bf1fefd23dbdb8eb28e467#egg=crowdsourcehinter-xblock==0.2
|
||||
-e git+https://github.com/edx/RateXBlock.git@2.0#egg=rate-xblock
|
||||
-e git+https://github.com/edx/DoneXBlock.git@2.0.1#egg=done-xblock
|
||||
@@ -93,4 +93,4 @@ git+https://github.com/edx/xblock-lti-consumer.git@v1.2.3#egg=lti_consumer-xbloc
|
||||
|
||||
git+https://github.com/joestump/python-oauth2.git@b94f69b1ad195513547924e380d9265133e995fa#egg=oauth2
|
||||
git+https://github.com/open-craft/xblock-poll@3c7dcaf6c933d914188f0740a60711603f948d26#egg=xblock-poll==1.9.1
|
||||
git+https://github.com/edx-solutions/xblock-drag-and-drop-v2@v2.2.6#egg=xblock-drag-and-drop-v2==2.2.6
|
||||
git+https://github.com/edx-solutions/xblock-drag-and-drop-v2@v2.2.8#egg=xblock-drag-and-drop-v2==2.2.8
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
-e git+https://github.com/edx/acid-block.git@98aecba94ecbfa934e2d00262741c0ea9f557fc9#egg=acid-xblock
|
||||
-e common/lib/capa
|
||||
-e git+https://github.com/edx/codejail.git@4127fc4bd5775cc72aee8d7f0a70e31405e22439#egg=codejail
|
||||
-e git+https://github.com/edx/django-wiki.git@v0.0.24#egg=django-wiki
|
||||
-e git+https://github.com/edx/django-wiki.git@v0.0.25#egg=django-wiki
|
||||
-e git+https://github.com/edx/DoneXBlock.git@2.0.1#egg=done-xblock
|
||||
-e git+https://github.com/jazkarta/edx-jsme.git@690dbf75441fa91c7c4899df0b83d77f7deb5458#egg=edx-jsme
|
||||
-e .
|
||||
@@ -72,7 +72,7 @@ django-cors-headers==2.5.3
|
||||
django-countries==5.5
|
||||
django-crum==0.7.5
|
||||
django-fernet-fields==0.6
|
||||
django-filter==1.0.4
|
||||
django-filter==2.2.0
|
||||
django-ipware==2.1.0
|
||||
django-js-asset==1.2.2
|
||||
django-method-override==0.2.0
|
||||
@@ -199,7 +199,7 @@ nodeenv==1.3.4
|
||||
numpy==1.18.1
|
||||
git+https://github.com/joestump/python-oauth2.git@b94f69b1ad195513547924e380d9265133e995fa#egg=oauth2
|
||||
oauthlib==2.1.0
|
||||
git+https://github.com/edx/edx-ora2.git@2.5.9#egg=ora2==2.5.9
|
||||
git+https://github.com/edx/edx-ora2.git@2.6.0#egg=ora2==2.6.0
|
||||
packaging==20.0 # via pytest, tox
|
||||
pandas==0.22.0
|
||||
path.py==8.2.1
|
||||
@@ -308,7 +308,7 @@ webob==1.8.5
|
||||
websocket-client==0.57.0 # via docker
|
||||
werkzeug==0.16.0 # via moto
|
||||
wrapt==1.10.5
|
||||
git+https://github.com/edx-solutions/xblock-drag-and-drop-v2@v2.2.6#egg=xblock-drag-and-drop-v2==2.2.6
|
||||
git+https://github.com/edx-solutions/xblock-drag-and-drop-v2@v2.2.8#egg=xblock-drag-and-drop-v2==2.2.8
|
||||
git+https://github.com/open-craft/xblock-poll@3c7dcaf6c933d914188f0740a60711603f948d26#egg=xblock-poll==1.9.1
|
||||
xblock-utils==1.2.4
|
||||
xblock==1.2.9
|
||||
|
||||
Reference in New Issue
Block a user