Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
18c4587
Test reproducing orphaning of children
Oct 2, 2013
5e1f03b
Publish removes deleted children
Oct 2, 2013
7cfe279
Merge pull request #1348 from edx/dhm/bug_publish
brianhw Oct 15, 2013
6713d6c
Work in progress.
Sep 27, 2013
9f871e5
Updated code fomat in test Jasmine.
Sep 30, 2013
a1e0f71
Added hard-coded flag to video.html that turns on/off autohiding of c…
Sep 30, 2013
49f4a71
Added functionality to show captions on "CC" button mousemove.
Oct 1, 2013
2a6418e
Updated fixtures for Jasmine tests.
Oct 1, 2013
e1e0cba
Added acceptance tests.
Oct 2, 2013
1f84053
Updated acceptance tests.
Oct 2, 2013
55fde6e
Updated acceptance tests.
Oct 2, 2013
05eb13f
Fixing JS.
Oct 3, 2013
3b7cc6a
Furthe addressing comments on PR.
Oct 3, 2013
f17a84c
Minor tweak.
Oct 3, 2013
c3030e8
Fixing minor typo.
Oct 3, 2013
0bd706b
Tidy up the code.
polesye Oct 4, 2013
46abe39
Fix acceptance tests.
polesye Oct 4, 2013
2e216a2
Clean up the code.
polesye Oct 4, 2013
30ddaf7
Enabling showing of captions always when mouse is over CC.
Oct 7, 2013
4b371d4
Fixing Jean Michel access. bug.
Oct 8, 2013
8ec9a16
Fix parentheses so that we only pull the course modes we want.
dianakhuang Oct 2, 2013
3cfaa6d
Add changelog
dianakhuang Oct 3, 2013
de48e4a
Add EmptyDataRawDescriptor.
polesye Oct 10, 2013
5c88399
Merge pull request #1363 from edx/diana/course-mode-expiration
dianakhuang Oct 16, 2013
7fca5e8
Merge pull request #1360 from edx/valera/carry_over_of_add_option_tra…
brianhw Oct 16, 2013
014089e
Merge pull request #1364 from edx/ned/cherry-pick-pr-1297
brianhw Oct 16, 2013
ef22182
LMS: revises CSS reference/pipeline architecture to handle IE9 select…
talbs Oct 2, 2013
56b2205
LMS: corrects indentation issue in hint_manager.html template
talbs Oct 11, 2013
e379a77
LMS: removes ie-fixes static:css group from all template references
talbs Oct 11, 2013
e0b73b0
LMS: removes error on <html> element syntax for iframed register buttons
talbs Oct 15, 2013
bbcb381
LMS: adds in redundant, but needed dashboard visual padding rule
talbs Oct 16, 2013
91c31e1
Implemented bulk email interface for new dashboard
Oct 3, 2013
d69748c
disable buttons for large courses on legacy and beta instr dash
adampalay Sep 24, 2013
867d3ba
Implemented bulk email interface for new dashboard
Oct 3, 2013
d8a857d
Changed GET to POST and xmodule HTML editor call, section CSS
Oct 4, 2013
3f88b87
Added acceptance tests for bulk email (through beta dashboard)
Oct 2, 2013
b8aff26
Merged in email confirmation modal
Oct 1, 2013
c7d4270
API tests, email tests, working notifications
Oct 7, 2013
fd54b06
added self to authors style, changed GET to POST
Oct 4, 2013
8a30e9b
Legacy email tests, removed duplicate code, updated comments, fixed CSS
Oct 7, 2013
9c94263
Removed email acceptance test
Oct 10, 2013
67a8ee1
Revert remnants of disable-button, and how html editor is invoked.
brianhw Oct 16, 2013
8fddcdf
Initial refactoring for bulk_email monitoring.
brianhw Sep 11, 2013
ffbb228
Add support for counting and reporting skips in background tasks.
brianhw Sep 17, 2013
2f4774f
Pass status into course_email for tracking retry status.
brianhw Sep 18, 2013
01611c3
Refactor instructor_task tests, and add handling for general errors i…
brianhw Sep 19, 2013
5c29530
Factor out subtask-specific code into subtasks.py.
brianhw Sep 20, 2013
7988b71
Move updates for InstructorTask into BaseInstructorTask abstract class.
brianhw Sep 24, 2013
0fd7518
Update handling of bulk-email retries to update InstructorTask before…
brianhw Sep 24, 2013
c133fd9
Use HIGH_PRIORITY_QUEUE for send_course_email.
brianhw Sep 25, 2013
08a0844
Add some handling for SES exceptions.
brianhw Sep 25, 2013
7b7afd4
Incorporate changes in max_retry logic, adding subtask_status as bulk…
brianhw Sep 26, 2013
a4c35ac
Use separate retry count for calculating retry delay.
brianhw Sep 30, 2013
04f90fe
Fix subtask code to handle (tests) running in eager mode.
brianhw Oct 3, 2013
df0fba9
Add more task-level tests for retries and other errors. Respond to i…
brianhw Oct 4, 2013
eaec962
Internationalize task progress.
brianhw Oct 8, 2013
41fcd96
Don't send emails to students who haven't activated.
brianhw Oct 8, 2013
c5debc2
Add settings to cap infinite retries.
brianhw Oct 8, 2013
4505fb4
Update InstructorTask before performing a retry.
brianhw Oct 8, 2013
e75dd46
Move subtask update logic that was only needed for tests into the tes…
brianhw Oct 8, 2013
bc599a0
Update tests with more complete coverage.
brianhw Oct 9, 2013
87a72b7
Rename some constants, and refactor bulk email task flow.
brianhw Oct 10, 2013
22285da
Switch to 0.2.6 version of diff-cover.
brianhw Oct 10, 2013
9861c93
Change calls in beta instructor dash.
brianhw Oct 10, 2013
b823906
Check that email subtasks are known to the InstructorTask before exec…
brianhw Oct 15, 2013
86c4a03
admin-console support for enabling email per course
Oct 8, 2013
291db0a
Merge pull request #1365 from edx/talbs/lms-cssarch
brianhw Oct 16, 2013
97e01be
Merge pull request #1359 from edx/brian/bulk-email-rc
brianhw Oct 16, 2013
4211749
add UserStanding model
adampalay Oct 9, 2013
1fc993c
add functionality to disable users
adampalay Oct 7, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ node_modules
*.scssc
lms/static/sass/*.css
lms/static/sass/application.scss
lms/static/sass/application-extend1.scss
lms/static/sass/application-extend2.scss
lms/static/sass/course.scss
cms/static/sass/*.css

Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,4 @@ Akshay Jagadeesh <akjags@gmail.com>
Nick Parlante <nick.parlante@cs.stanford.edu>
Marko Seric <marko.seric@math.uzh.ch>
Felipe Montoya <felipe.montoya@edunext.co>
Julia Hansbrough <julia@edx.org>
9 changes: 8 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ These are notable changes in edx-platform. This is a rolling list of changes,
in roughly chronological order, most recent first. Add your entries at or near
the top. Include a label indicating the component affected.

LMS: Add PaidCourseRegistration mode, where payment is required before course registration.
LMS: Fix issue with CourseMode expiration dates

LMS: Ported bulk emailing to the beta instructor dashboard.

LMS: Add monitoring of bulk email subtasks to display progress on instructor dash.

LMS: Add PaidCourseRegistration mode, where payment is required before course
registration.

LMS: Add split testing functionality for internal use.

Expand Down
34 changes: 34 additions & 0 deletions cms/djangoapps/contentstore/features/video.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,69 @@
Feature: CMS.Video Component
As a course author, I want to be able to view my created videos in Studio.

# 1
# Video Alpha Features will work in Firefox only when Firefox is the active window
Scenario: Autoplay is disabled in Studio
Given I have created a Video component
Then when I view the video it does not have autoplay enabled

# 2
Scenario: Creating a video takes a single click
Given I have clicked the new unit button
Then creating a video takes a single click

# 3
# Sauce Labs cannot delete cookies
@skip_sauce
Scenario: Captions are hidden correctly
Given I have created a Video component with subtitles
And I have hidden captions
Then when I view the video it does not show the captions

# 4
# Sauce Labs cannot delete cookies
@skip_sauce
Scenario: Captions are shown correctly
Given I have created a Video component with subtitles
Then when I view the video it does show the captions

# 5
# Sauce Labs cannot delete cookies
@skip_sauce
Scenario: Captions are toggled correctly
Given I have created a Video component with subtitles
And I have toggled captions
Then when I view the video it does show the captions

# 6
Scenario: Video data is shown correctly
Given I have created a video with only XML data
Then the correct Youtube video is shown

# 7
Scenario: Closed captions become visible when the mouse hovers over CC button
Given I have created a Video component with subtitles
And Make sure captions are closed
Then Captions become "invisible" after 3 seconds
And I hover over button "CC"
Then Captions become "visible"
And I hover over button "volume"
Then Captions become "invisible" after 3 seconds

# 8
Scenario: Open captions never become invisible
Given I have created a Video component with subtitles
And Make sure captions are open
Then Captions are "visible"
And I hover over button "CC"
Then Captions are "visible"
And I hover over button "volume"
Then Captions are "visible"

# 9
Scenario: Closed captions are invisible when mouse doesn't hover on CC button
Given I have created a Video component with subtitles
And Make sure captions are closed
Then Captions become "invisible" after 3 seconds
And I hover over button "volume"
Then Captions are "invisible"
48 changes: 46 additions & 2 deletions cms/djangoapps/contentstore/features/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
from xmodule.modulestore import Location
from contentstore.utils import get_modulestore

BUTTONS = {
'CC': '.hide-subtitles',
'volume': '.volume',
}


@step('I have created a Video component$')
def i_created_a_video_component(step):
Expand All @@ -17,8 +22,13 @@ def i_created_a_video_component(step):


@step('I have created a Video component with subtitles$')
def i_created_a_video_component_subtitles(step):
step.given('I have created a Video component')
def i_created_a_video_with_subs(_step):
_step.given('I have created a Video component with subtitles "OEoXaMPEzfM"')


@step('I have created a Video component with subtitles "([^"]*)"$')
def i_created_a_video_with_subs_with_name(_step, sub_id):
_step.given('I have created a Video component')

# Store the current URL so we can return here
video_url = world.browser.url
Expand Down Expand Up @@ -108,3 +118,37 @@ def the_youtube_video_is_shown(_step):
ele = world.css_find('.video').first
assert ele['data-streams'].split(':')[1] == world.scenario_dict['YOUTUBE_ID']


@step('Make sure captions are (.+)$')
def set_captions_visibility_state(_step, captions_state):
if captions_state == 'closed':
if world.css_visible('.subtitles'):
world.browser.find_by_css('.hide-subtitles').click()
else:
if not world.css_visible('.subtitles'):
world.browser.find_by_css('.hide-subtitles').click()


@step('I hover over button "([^"]*)"$')
def hover_over_button(_step, button):
world.css_find(BUTTONS[button.strip()]).mouse_over()


@step('Captions (?:are|become) "([^"]*)"$')
def are_captions_visibile(_step, visibility_state):
_step.given('Captions become "{0}" after 0 seconds'.format(visibility_state))


@step('Captions (?:are|become) "([^"]*)" after (.+) seconds$')
def check_captions_visibility_state(_step, visibility_state, timeout):
timeout = int(timeout.strip())

# Captions become invisible by fading out. We must wait by a specified
# time.
world.wait(timeout)

if visibility_state == 'visible':
assert world.css_visible('.subtitles')
else:
assert not world.css_visible('.subtitles')

1 change: 1 addition & 0 deletions cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@

# Instead of AuthenticationMiddleware, we use a cache-backed version
'cache_toolbox.middleware.CacheBackedAuthenticationMiddleware',
'student.middleware.UserStandingMiddleware',
'contentserver.middleware.StaticContentServer',

'django.contrib.messages.middleware.MessageMiddleware',
Expand Down
4 changes: 2 additions & 2 deletions common/djangoapps/course_modes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def modes_for_course(cls, course_id):
"""
now = datetime.now(pytz.UTC)
found_course_modes = cls.objects.filter(Q(course_id=course_id) &
Q(expiration_date__isnull=True) |
Q(expiration_date__gte=now))
(Q(expiration_date__isnull=True) |
Q(expiration_date__gte=now)))
modes = ([Mode(mode.mode_slug, mode.mode_display_name, mode.min_price, mode.suggested_prices, mode.currency)
for mode in found_course_modes])
if not modes:
Expand Down
9 changes: 9 additions & 0 deletions common/djangoapps/course_modes/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,12 @@ def test_modes_for_course_expired(self):
self.create_mode(mode1.slug, mode1.name, mode1.min_price, mode1.suggested_prices)
modes = CourseMode.modes_for_course(self.course_id)
self.assertEqual([mode1], modes)

expired_mode.expiration_date = datetime.now(pytz.UTC) + timedelta(days=1)
expired_mode.save()
expired_mode_value = Mode(u'verified', u'Verified Certificate', 0, '', 'usd')
modes = CourseMode.modes_for_course(self.course_id)
self.assertEqual([expired_mode_value, mode1], modes)

modes = CourseMode.modes_for_course('second_test_course')
self.assertEqual([CourseMode.DEFAULT_MODE], modes)
37 changes: 37 additions & 0 deletions common/djangoapps/student/middleware.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
"""
Middleware that checks user standing for the purpose of keeping users with
disabled accounts from accessing the site.
"""
from django.http import HttpResponseForbidden

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Start files with a module-level docstring.

from django.utils.translation import ugettext as _
from django.conf import settings
from student.models import UserStanding

class UserStandingMiddleware(object):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still has off-kilter indentation.

"""
Checks a user's standing on request. Returns a 403 if the user's
status is 'disabled'.
"""
def process_request(self, request):
user = request.user
try:
user_account = UserStanding.objects.get(user=user.id)
# because user is a unique field in UserStanding, there will either be
# one or zero user_accounts associated with a UserStanding
except UserStanding.DoesNotExist:
pass
else:
if user_account.account_status == UserStanding.ACCOUNT_DISABLED:
msg = _(
'Your account has been disabled. If you believe '
'this was done in error, please contact us at '
'{link_start}{support_email}{link_end}'
).format(
support_email=settings.DEFAULT_FEEDBACK_EMAIL,
link_start=u'<a href="mailto:{address}?subject={subject_line}">'.format(
address=settings.DEFAULT_FEEDBACK_EMAIL,
subject_line=_('Disabled Account'),
),
link_end=u'</a>'
)
return HttpResponseForbidden(msg)
Loading