Commit Graph

17975 Commits

Author SHA1 Message Date
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
Sarina Canelake
233aba74a3 Merge pull request #8222 from Stanford-Online/giulio/font-awesome-icon-names
BUGFIX: CCX Font Awesome icon name fixes
2015-06-12 00:02:36 -04:00
Ben Patterson
f8f2e2121a Revert "[LTI Provider] Basic LTI authentication" 2015-06-11 21:06:02 -04:00
David Ormsbee
fb491bf265 Merge pull request #8347 from mcgachey/mcgachey-lti-authentication
[LTI Provider] Basic LTI authentication
2015-06-11 19:51:57 -04:00
Renzo Lucioni
2db79556bd Avoid POSTing unnecessary payment processor parameter 2015-06-11 18:24:25 -04:00
Will Daly
9d60b0e07a Merge pull request #8444 from edx/will/credit-provider-part-two
Credit provider integration Python API (Part 2 of 3)
2015-06-11 17:38:42 -04:00
christopher lee
205c735865 Added comment deletion in the discussion API 2015-06-11 14:09:02 -04:00
Renzo Lucioni
41c5916408 Payment button UI modifications
Includes button copy revision and a styling tweak to make the selected payment button appear active while disabled.
2015-06-11 13:43:38 -04:00
jsa
e1dfdc0811 Receipt page now also handles Cybersource payment failures.
XCOM-398
2015-06-11 13:42:58 -04:00
Greg Price
ef26e8e83f Add comment endorsement to discussion API 2015-06-11 12:28:57 -04:00
Greg Price
94c1bf495a Merge pull request #8437 from edx/gprice/discussion-api-edit-comment
Add comment editing to discussion API
2015-06-11 12:28:23 -04:00
Greg Price
895731f526 Add comment editing to discussion API
This is done via PATCH on a comment instance endpoint.
2015-06-11 11:39:01 -04:00
Will Daly
8988aa1c9e Credit provider integration Python API
* Add end-point for initiating a request for credit from a provider.
* Add an end-point for a provider to update the status of a request (approved / denied).
2015-06-11 11:34:25 -04: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
ac6e259388 Merge pull request #8467 from edx/release-2015-06-10-conflict
Release 2015 06 10 conflict
2015-06-11 10:16:48 -04:00
Muzaffar yousaf
3706949eab Merge pull request #8432 from edx/muzaffar/bulk-emails
Remove course_title from bulk email.
2015-06-11 18:10:00 +05:00
Clinton Blackburn
ce8550dba6 Merge pull request #8469 from edx/clintonb/course-structure-api-cleanup
Removed IsAuthenticatedOrDebug
2015-06-10 21:27:36 -04:00
Clinton Blackburn
2da42d5efa Removed IsAuthenticatedOrDebug
IsAuthenticatedOrDebug hides potential issues with API client code that is run in local environments and later deployed to production where authentication fails.

XCOM-193
2015-06-10 18:55:27 -04:00
Brian Talbot
fbe09770a4 Web Certs: adjusting base/honor-code rendering to only hide staff signatures
SOL-973
2015-06-10 18:47:26 -04:00
Edward Zarecor
c12c5c926d fixing post-release merge conflicts with DKH 2015-06-10 16:56:21 -04:00
Ben McMorran
695f19c420 TNL-1907 Implement Course Team Membership API 2015-06-10 20:40:02 +00:00
Will Daly
5198257cbe Merge pull request #8461 from edx/will/verify-student-cleanup
Remove unused code left over from ECOM-188.
2015-06-10 14:44:51 -04:00
Matt Drayer
4dd55609ab Merge pull request #8430 from edx/asadiqbal08/SOL-971
SOL-971
2015-06-10 14:21:42 -04:00
Renzo Lucioni
0349090815 Merge pull request #8456 from edx/renzo/payment-button-ui
Payment button UI modifications
2015-06-10 14:04:59 -04:00
Will Daly
1cc776ff19 Remove V2 of the EdX.org footer 2015-06-10 13:13:32 -04:00
Will Daly
69306da49a Remove unused code left over from ECOM-188. 2015-06-10 13:08:23 -04:00
AlasdairSwan
ff849d206a Fixes bug with app links in new footer 2015-06-10 12:41:49 -04:00
Renzo Lucioni
d6c0460483 Payment button UI modifications
Includes button copy revision and a styling tweak to make the selected payment button appear active while disabled.
2015-06-10 11:28:51 -04:00
Peter Fogg
d74bb36634 Fix updating immutable request dictionary.
Django's `QueryDict`s are immutable during normal running, and so they
must be copied if any updates are to be made to them. In testing,
though, `request.DATA._mutable` is `True`, so tests can falsely pass.
2015-06-10 11:15:02 -04:00
asadiqbal
302d7a0152 SOL-971
Allow microsites to override content

more test checks

Fix pylint error (duplicate import)

SOL-971 Changes
2015-06-10 19:26:30 +05:00
Awais Qureshi
16bbdc7fca Merge pull request #8329 from edx/awais786/ECOM-1494-remove-midcourse-models
ECOM-1494 removing models.
2015-06-10 18:24:39 +05:00
Awais
ed02d9cc5c ECOM-1494 removing models only. 2015-06-10 11:19:51 +05:00
Marco Morales
f39cef25be Merge pull request #8440 from Stanford-Online/giulio/font-awesome-icon-main-platform-fixes
BUGFIX: fix  FA4 conversion for a few icons
2015-06-09 22:35:11 -07:00
Sarina Canelake
cc85bfe81e Merge pull request #8019 from jazkarta/testjs
Add Jasmine specs to test CCX schedule tab
2015-06-09 21:36:08 -04:00
Carlos de la Guardia
85111ceb5a Add jasmine tests for ccx schedule code. 2015-06-09 16:31:57 -05:00
Brian Talbot
387f7d149e revising expected output paths for Django Pipeline 2015-06-09 17:31:38 -04:00
David Baumgold
77facf13ba Merge pull request #8419 from edx/sass-output-to-css-dir
Compile Sass to CSS dirs, move Creative Commons CSS into Sass
2015-06-09 17:00:15 -04:00
Matt Drayer
e756685418 mattdrayer/SOL-952: Update default URLs and add backwards migration 2015-06-09 15:11:48 -04:00
Giulio Gratta
cd76b40542 BUGFIX: CCX icon FA4 conversion
- ccx enrollment remove icon -> correct icon: "fa-times-circle"
- ccx grading policy warning -> correct icon: "fa-warning"
2015-06-09 10:23:06 -07:00
Giulio Gratta
0b741aa3c4 BUGFIX: fix FA4 conversion for a few icons
- course-about sidebar info icon -> correct icon: "fa-info-circle"
- wiki search add file -> correct icon: "fa-plus-circle"
- wiki history paragraph info -> correct icon: "fa-info-circle"
2015-06-09 10:18:35 -07: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
Awais Qureshi
4eef610833 Merge pull request #8328 from edx/awais786/awais786/ECOM-1572-icrv-emails-format-new
ECOM-1572 implementing code to new branch.
2015-06-09 20:24:16 +05:00
David Baumgold
9bdf64d385 Merge pull request #8433 from edx/db/json-as-dicts
Use dicts when defining JSON
2015-06-09 11:15:56 -04:00
Will Daly
36d1eb22cd Merge pull request #8338 from edx/will/credit-provider-integration
Credit provider integration Python API (Part 1 of 3)
2015-06-09 11:12:51 -04:00
David Baumgold
141892a9fd Move _creative-commons.scss into elements directory 2015-06-09 11:08:40 -04:00
David Baumgold
a7c710a0de Moved Creative Commons CSS into Sass
Also reconfigured paver to compile Sass into CSS directories
2015-06-09 10:55:20 -04:00