Commit Graph

2302 Commits

Author SHA1 Message Date
Ahsan Ulhaq
d35b652843 Display Eligibility table on progress page
1-Adding basic html for displaying eligibility table
2-Updated Eligibility Requirements Dynamically

ECOM-1523
2015-06-16 16:19:33 +05:00
Matt Drayer
c3b78ea90a Merge pull request #8448 from edx/ziafazal/SOL-886
certificates event tracking SOL-886
2015-06-15 15:09:35 -04:00
Zia Fazal
6afaa3cce3 certificates event tracking
some optimisations

refactored code and added created event

added test to make sure generate event is emitted

changes based on feedback on 6/11

added certificate web page and tests

fixed quality violations
2015-06-15 19:53:47 +05:00
Sarina Canelake
ed2f73e6d2 Add i18n regression tests (LOC-72, LOC-85) 2015-06-12 18:14:26 -04:00
Calen Pennington
83fce4d61f Merge pull request #8395 from jazkarta/ccx-custom-ids
MIT CCX: Use CCX Keys
2015-06-12 16:19:12 -04:00
cewing
cb431ccb24 MIT CCX: Use CCX Keys: further revisions in response to code review
only require ccx-keys once

get_current_ccx will now expect a CourseKey instance as its argument, and will raise a value error if this expectation is not met.

document reason for local import

add special methods to pass attribute setting and deletion through to the wrapped modulestore

add __setattr__ and __delattr__ per code review, update __init__ to work with new methods

style change per code review

clean up context manager usage as recommended by code review

remove unused code and imports

convert modulestore type tests to use the `get_modulestore_type` api, remove unused imports

code quality: add docstrings

increase coverage for utils tests

fix bug found in testing.

increase test coverage on modulestore wrapper

code quality fixes

code-quality: ignore import error, but mark site for future consideration
2015-06-12 11:20:30 -07:00
Calen Pennington
c1ace04483 Merge pull request #8391 from edx/alawibaba/plat5892
First draft.
2015-06-12 12:39:38 -04:00
Calen Pennington
b9f5eef4ae Log an exception before swallowing it in a KeyValueMultiSaveError 2015-06-12 12:37:49 -04:00
Calen Pennington
0f6ef44476 Don't pass in a user object to DjangoUserStateClient 2015-06-12 12:37:49 -04:00
Ali Mohammad
69772ef20e Convert access to StudentModuleHistory to use the UserStateClient API. 2015-06-12 12:37:34 -04:00
Nimisha Asthagiri
1a15bd7bed Merge pull request #8209 from edx/mobile/xblock-support
Course Blocks + Navigation API (feature flagged) for Mobile
2015-06-12 11:25:23 -04:00
Phil McGachey
c3106bc4bd This change cleans up the work in progress request at #8176
This is an initial authentication implementation that allows LTI users to
log in transparently to edX. The behavior is driven by pilot users at
Harvard; this was the most requested feature.

The patch creates a new database model that maps users' LTI identifiers
to newly-created edX accounts. If an LTI launch comes in with a user_id
field that is not in the database, a new edX account is created with a
random user name and password. This account is then stored in the
database, so that it is permanently associated with the LTI user ID.

This patch takes a simplistic approach to session management. If a user
is logged in with a different account when they perform an LTI launch,
they will be logged out and then re-logged in using their LTI account.

In order to keep the patch simple, I have split out some refactoring
that needs to be done into a separate branch that I'll post once this
has been merged. Since we no longer redirect to the login page, we don't
need to maintain two separate LTI endpoints (one for the LTI launch and
one for authenticated users), or deal with the session management that
requires. There are also multiple fetches of the LtiConsumer object
(one in the view, one in the signature validation) that the later
patch will consolidate into one.

This branch fixes the previous conflicts with the test refactoring
carried out in PR 8240.
2015-06-12 10:21:48 -04:00
Nimisha Asthagiri
4921ec48c8 MA-792 Course Blocks and Navigation API (user-specific) 2015-06-12 09:27:20 -04:00
Nimisha Asthagiri
037ef3be77 Video module support for student_view_json. 2015-06-12 09:27:17 -04:00
cewing
ef4836503f MIT CCX: Use CCX Keys - responses to code review
remove references to middleware that were missed previously

use key apis rather than local implementation of key conversion.  remove local implementationa

remove spurious test for attribute

fix test setUp to avoid unneeded flattening

code quality fixes

add security check ensuring that the coach is coach for *this* CCX.

prevent ccx/deprecated course id problems

1.  do not allow ccx objects to be created if the course id is deprecated
2.  filter out any ccx memberships that involve deprecated course ids (in case there are bad ccxs in the database)

Fix test failures and errors arising from incorrect code path execution

Create context manager to handle unwrapping and restoring ccx values for the modulestore wrapper, employ it throughout modulestore wrapper implementation
2015-06-12 00:01:24 -07:00
cewing
6a0c9aee9d MIT CCX: Use CCX Keys
Implement the use of CCX opaque keys throughout the ccx code base

include the new custom ccx id package in the github checkouts list

update the coach dashboard wrapper to get CCX information from the incoming course_id, if possible

update function signatures for all view functions to expect CCX as passed by the dashboard wrapper (default to None), remove calls to get_ccx_for_coach as the ccx is passed in.

update reverse calls in python view code to use a CCXLocator for the URL instead of a CourseLocator

use CCXLocator where necessary

use course id to find ccx, instead of thread local

remove unused method and related tests

use course id for getting ccx

provide course id to the get_current_ccx method

ensure the course id passed in is a CourseKey instance of some type whether it starts out as a string or not

use the provided block to figure out what the course_id should be, then get the ccx for that

redirect to ccx dashboard using coach ccx if no ccx is passed in

update student dashboard listing for ccx to build an appropriate url from a CCXLocator, not from the course locator.

refactor building the ccx locator so we don't have to do it repeatedly

begin test refactoring after ccx_keys introduction

Ensure that when access checking happens, the course_locator form of a ccx locator is used.  This ensures that the access check happens against the course and it is not necesarry to duplicate the entire access control structure for the course.

pick up api change in ccx-keys

create and conditionally use a wrapper for the mixed modulestore returned by xmodule.modulestore.django.modulestore

the wrapper will strip and restore ccx values from CourseKey and UsageKey objects

fix return values on a few methods

remove unused symbol

pull updated ccx-keys package

set course_id on the caching descriptor system to avoid api incompatibilities in some subsystems

use ccx.course instead of self.course

fix get method to find course keys from blocks that are not themselves keys but have a location attribute (which will be a key)

if an item coming out of the db has children, restore the ccx to them as well

if the block passed in has a CCX key, unwrap that before we try to look up the override, otherwise it will never be found.

pick up a change in the ccx keys package that allows for stripping CCX identity from a usage key

begin writing tests to cover this modulestore wrapper

remove the switch_pocs view, the url pattern for it, and the tests that covered it

remove the ccx context and the middleware responsible for setting the current CCX.  These are no longer needed

all dashboard views should raise 404 if a ccx is not provided by the coach_dashboard decorator

code quality

prevent errors resulting from trying to `get` a ccx based on non-unique criteria.

remove obsolete usage of ACTIVE_CCX_KEY

fix setUp method for grading tests to properly create grades for the ccx rather than for the course.

clean up reverse calls

code quality

adding docstrings to clarify purpose of this patch

fix bug in getting ccx for coach

fix grading views to properly fetch a ccx-ified course so that grades for that version will be calculated

fix small errors in modulestore implementation

fix errant merge marker

update call to get_current_ccx after key refactoring merged with tab changes
2015-06-12 00:01:24 -07:00
Will Daly
26f1ecb6a5 Merge pull request #8458 from edx/will/remove-v2-footer
Remove V2 of the EdX.org footer
2015-06-11 10:43:30 -04:00
Edward Zarecor
c12c5c926d fixing post-release merge conflicts with DKH 2015-06-10 16:56:21 -04:00
Will Daly
1cc776ff19 Remove V2 of the EdX.org footer 2015-06-10 13:13:32 -04:00
David Ormsbee
73b3af6c94 Merge pull request #8426 from mcgachey/mcgachey-lti-enrollment-fix
[LTI Provider] Fix bug preventing unenrolled users from accessing content
2015-06-09 11:49:57 -04:00
Ben Patterson
e54ce29587 Fix flaky lettuce test. TE-572.
This should be ported to bok-choy, but until then we should fix the flakiness in
this test. It needs to wait for the page to change after the user clicks 'reset'.
2015-06-09 09:37:36 -04:00
Phil McGachey
0c7623d530 [LTI Provider] Fix bug preventing unenrolled users from accessing content
Change https://github.com/edx/edx-platform/pull/8240 refactored the LTI
provider template rendering code and introduced an issue where a user was
required to be enrolled in a course before that course's content could be
accessed over LTI. According to the LTI design spec:
    https://docs.google.com/document/d/185hdPvIxcKtiDOLjb4sTGovA_WYXWz5Cd79gCzQwBms
we delegate access control over LTI content to the LTI consumer, rather
than requiring that users enroll in edX courses explicitly (and that admins
keep edX and LTI provider enrollemnts consistent when students add or drop
courses).

This change fixes the immediate issue, which is disrupting the LTI Provider
pilot currently running at Harvard.
2015-06-08 23:01:43 -04:00
Diana Huang
cddd387beb Merge pull request #8367 from edx/diana/merge-course-view-and-tab
Refactor and merge CourseViewType and CourseTab.
2015-06-08 16:08:27 -04:00
Diana Huang
7461a2fd37 Refactor and merge CourseViewType and CourseTab.
TNL-2321
2015-06-08 15:18:39 -04:00
Sarina Canelake
c9796b83a9 Merge pull request #8403 from edx/sarina/remove-redefine-django14-cors
Use Django 1.4 @ensure_csrf_cookie method PLAT-664
2015-06-08 11:44:25 -04:00
Diana Huang
a224d06a89 Allow multiple external_link tabs for one course. 2015-06-08 10:10:45 -04:00
asadiqbal
6f0606a00b asadiqbal08/SOL-961: Student-generated certificate flow shows "download" certificate button 2015-06-07 20:44:42 -04:00
Sarina Canelake
e53b9c83d9 Use Django 1.4 @ensure_csrf_cookie method PLAT-664 2015-06-06 08:48:36 -04:00
Nimisha Asthagiri
d240785b17 MA-722 Render xBlock API Support 2015-06-05 11:18:48 -04:00
Xiaolu Xiong
4f45839211 Merge pull request #8325 from beardeer/master
Merge pull request #8325 from beardeer/edx-platform
2015-06-04 11:45:15 -04:00
Adam
5952906e72 Merge pull request #8349 from edx/adam/fix-capa-devstack
disable contracts that were breaking capa problems on devstack (TNL-2…
2015-06-04 11:22:17 -04:00
Xiaolu Xiong
aa1bca6b41 Change the misleading doc string (str doesn't has attr 'name' ) 2015-06-04 08:30:38 -04:00
Mushtaq Ali
c575c89853 Bug - Unicode character in tab number shouldn't return 500 #TNL-2055
Adding user to AUTHORS file
2015-06-04 12:33:06 +05:00
Adam Palay
6012a34765 disable contracts that were breaking capa problems on devstack (TNL-2343) 2015-06-03 16:17:30 -04:00
Ali Mohammad
94e98e9cae Merge pull request #8257 from edx/alawibaba/plat589
Make clean_history.py use the StudentHistoryModule django model.
2015-06-03 11:45:33 -04:00
Diana Huang
15291aa43b Merge pull request #8015 from edx/andya/add-tab-extensions
Add extensible course view types for edX platform
2015-06-02 17:08:45 -04:00
Diana Huang
dae137feaa Convert all tabs to the new plugin framework. 2015-06-02 15:05:16 -04:00
Jonathan Piacenti
d499b22498 Analytics events for badges. 2015-06-02 18:32:50 +00:00
Andy Armstrong
94e1c42314 Add extensible course view types for edX platform 2015-06-02 13:12:40 -04:00
Ned Batchelder
cc5c1001d1 Fix simplifiable-range pylint warnings. 2015-06-02 09:47:13 -04:00
Alexander Kryklia
ef8f391888 Merge pull request #7825 from edx/alex/video_bumper
Alex/video bumper
2015-06-01 23:07:05 +03:00
dino-cikatic
62797a3f2e Merge pull request #7697 from edx/feature/course-discovery
Feature/course discovery
2015-06-01 11:46:44 +02:00
Martyn James
7f633fc045 Course Discovery feature using edx-search 2015-06-01 10:33:45 +02:00
Alexander Kryklia
4c7bfb44dd Add Video Bumper.
Fix n-click behaviour on poster.
Fix unit tests.
Fix handler for non_en lang for bumper.
Add more tests.
Fix docstrings.
Fix pep8.
Fix static redirection with bumper.
Fix button in IE11.
Add video_bumper field in bok_choy.

Fix pylink violations.

Update docstrings and some clean up.

Rename edx_video_id in bumper tests.

Fix too long lines in help text.

Address ui comments.

Fix bumper events.

Refactor bumper-transcripts code, fix bugs, address comments.
Squashed commits:
Fix download transcript button.
[74e0c8c] Fix quality
[a759f33] Fix error, when sub contains extension.
[b30755c] Revert "Add video files to host for transcripts."

This reverts commit cf8a96bf84346e17b6ad57ad4cc6a27d7a9118cd.
[36f038a] Add video files to host for transcripts.
[23f1655] Fix pep8 and pyling issues.
[0f1f9d2] Update acceptance test.
[765a27d] Wait for ajax in captions.
[8ae72a3] Fix logic.
[063450f] Fix unit tests.
[d1075fc] Fix handlers tests.
[25d31ad] Update bumper_utils.
[cb5f9df] Remove maxDiff.
[8738b1a] Code cleanup.
[87dbcb7] Fix issues with transcripts.
[ec899de] Fix transcripts in serializers.
[444b1fc] Fix transcripts typo.
[d524cb5] Fix bumper.
[f62cf22] Fix video mongo tests.
[8f1b55a] Fix dispatches.
[53bc308] Add more fixes.
[d5e3723] Fix test_video_handlers and rename the method.
[93efc23] Fix mobile tests.
[740e2ae] Fix pep8 and pylint.
[47cfb66] Address comments, add fixes.
[4e499d9] Add fixes.
[8353553] Add improvements.

Updated dispatch values)
.

Use ddt in bumper handler tests.

Move common metadata to single place.

Fix style.

Update docstring.

Fix poster button.

Improve bumper events.

Fix test after rebase.

Address comments.

Download transcript: use def video lang, not bump.

Renamed date_last_view_bumper to bumper_last_view_date.

Rename do_not_show_again_bumper to bumper_...

Address comments.

Fix tests for download for en lang.

Fix bumper logic.

Update strings.

Update resizer.

Remove resizer.

Fix unit tests.

Add tests.

Fix bumper events.

Clean up tests.

Fix pylint violations.

Fix pep8 and pylint violations.

Update docs and method names.

Update events.

Make /static/ prefix a must.

Fix wrong code.
2015-05-31 14:45:31 +03:00
John Eskew
a0675a16d0 Merge pull request #8281 from edx/release
Merging hotfix-2015-05-29 from release to master
2015-05-29 18:32:46 -04:00
alawibaba
36e5fcf4c9 Make clean_history.py use the StudentHistoryModule django model. 2015-05-29 17:28:01 -04:00
John Eskew
c33c782fcb Wrap _invoke_xblock_handler in a bulk_op. 2015-05-29 15:57:19 -04:00
Ned Batchelder
eb3b8c5ce4 TNL-2269 Compute language direction every time.
The old code would compute the language direction once when the template
was loaded.

TNL-2269
2015-05-28 16:13:59 -04:00
Will Daly
78ea4d55f4 Merge pull request #8175 from edx/will/footer-api-redux
ECOM-1339 Branding API footer
2015-05-28 11:03:06 -04:00
Will Daly
6af5fc1452 ECOM-1339 Branding API footer
Serve branded footer JSON/HTML/CSS/JS from an API endpoint
in the branding app.  Refactor OpenEdX and EdX.org footer templates
to use the Python version of the API, ensuring that the API
values are consistent with the footer included in main.html.

Detailed changes:

* Added footer API end-point to the branding app.
* Footer API allows the language to be set with querystring parameters.
* Footer API allows showing/hiding of the OpenEdX logo using querystring parameters.
* Deprecate ENABLE_FOOTER_V3 in favor of the branding API configuration flag.
* Move no referrer script into main.html from the edx footer template.
* Rename rwd_header_footer.js to rwd_header.js
* Cache API responses.

Authors:
Awais Qureshi, Aamir Khan, Will Daly
2015-05-28 08:30:45 -04:00