Commit Graph

112 Commits

Author SHA1 Message Date
Dmitry Viskov
209ddc700d Difficulty selectbox in Studio (based on new XBlockAside functionality). Include:
- adaptation asides to be imported from the XML
- updating SplitMongo to handle XBlockAsides (CRUD operations)
- updating Studio to handle XBlockAsides handler calls
- updating xblock/core.js to properly init XBlockAsides JavaScript
2016-03-02 03:37:13 +03:00
Kevin Falcone
6f9a3911e5 Implement a BaseStudentModuleHistory
This abstract class contains most of the fields (aside from the id and
foreign key to StudentModule that the subclasses need to manage).  It
also provides a get_history method that abstracts searching across
multiple backends.

Move router code to openedx/core
We need to use it from cms and lms.
Ensure aws_migrate can be used for migrating both the lms and cms.

Handle queries directed to student_module_history vs default and the
extra queries generated by Django 1.8 (SAVEPOINTS, etc).

Additionally, flag testing classes as multi_db so that Django will
flush the non-default database between unit tests.

Further decouple the foreignkey relation between csm and csmhe

When calling StudentModule().delete() Django will try to delete CSMHE
objects, but naively does so in the database, not by consulting the
database router.

Instead, we disable django cascading deletes and listen for post_delete
signals and clean up CSMHE by hand.

Add feature flags for CSMHE
One to turn it on/off so we can control the deploy.
The other will control whether or not we read from two database tables
or one when searching.

Update tests to explicitly use this get_history method rather than
looking directly into StudentModuleHistory or
StudentModuleHistoryExtended.

Inform lettuce to avoid the coursewarehistoryextended app

Otherwise it fails when it can't find features/ in that app.

Add Pg support, this is not tested automatically.
2016-02-29 13:59:27 -05:00
Giovanni Di Milia
7683eadcaf Modified permission classes for CCX REST APIs
Modified how the per object permissions are enforced in the CCX REST APIs
2016-02-24 08:40:07 -05:00
Nimisha Asthagiri
03487073aa Merge pull request #11579 from edx/course_blocks_api/support_substructure
Course Blocks API: Support accessing a substructure MA-1604
2016-02-22 13:38:01 -05:00
Omar Khan
a1301ded69 Merge pull request #11544 from open-craft/omar/remove-newrelic-handler
Remove newrelic logging handler
2016-02-22 23:56:16 +07:00
Nimisha Asthagiri
70469c16b2 Block Structure API: Replace has_block with __contains__ 2016-02-22 11:25:46 -05:00
zubair-arbi
182826261d enable jwt auth with feature flag 2016-02-20 02:31:51 +05:00
Nimisha Asthagiri
d969f48646 Course Blocks API: Support accessing a substructure MA-1604 2016-02-18 10:03:58 -05:00
Omar Khan
510dd90c07 Remove newrelic logging handler
It was introduced back in 2012, and is not used in the default
configuration.
2016-02-15 11:04:55 +07:00
jsa
8a620640c2 Disable credentials-related settings/tests under cms. 2016-02-12 13:25:44 -05:00
Renzo Lucioni
2717f228f8 Merge pull request #11483 from edx/renzo/programs-task-fixes
Fixes for program certificate generation
2016-02-10 10:41:01 -05:00
Renzo Lucioni
67f8b49056 Fixes for program certificate generation
ECOM-3528
2016-02-09 16:27:16 -05:00
wajeeha-khalid
9d6df1e132 Merge pull request #11189 from edx/ekafeel/discussion-api-namespace-pagination
Ekafeel/discussion api namespace pagination
2016-02-09 17:42:48 +05:00
Nimisha Asthagiri
599173c6b6 Merge pull request #11198 from edx/block-cache/collect-phase
Refactor Block Cache to separate Collect and Transform phases
2016-02-03 20:18:09 -05:00
Robert Raposa
f555ffd585 Refactor and improve js_utils helpers
- Rename escape_json_dumps to dump_js_escaped_json
- Rename escape_js_string to js_escaped_string
- Update js_escaped_string to output empty string for None
- Introduce dump_html_escaped_json
- Move dump_js_escaped_json after the pipe as new best practice
- Introduce additional uses of helpers
- Introduce new djangolib directory and move js_utils
2016-02-03 17:13:21 -05:00
Nimisha Asthagiri
05767b433d Collect Course Blocks on Course Publish and Management Command
MA-1368
2016-02-03 16:56:22 -05:00
Nimisha Asthagiri
66397c35b9 Refactor Block Cache to separate Collect and Transform phases 2016-02-03 16:54:29 -05:00
Douglas Hall
37a7fdc0f2 Added subsection gating feature 2016-01-28 14:05:20 -05:00
Ahsan Ulhaq
9220420925 Add jwt auth in LMS
ECOM-3419
2016-01-28 14:00:58 +05:00
Ahsan Ulhaq
70eaf18936 caching for requests to credentials service
ECOM-3278
2016-01-28 13:05:50 +05:00
Ahsan Ulhaq
5181513629 Show message for earned programs credentials
ECOM-3015
2016-01-28 13:05:50 +05:00
Nimisha Asthagiri
08a2bc9620 Merge pull request #11358 from edx/release
Hotfix for MA-1981 and safe sessions
2016-01-27 15:53:20 -05:00
Giovanni Di Milia
e63194c1cd Added CCX REST APIs
CCX REST APIs
OAUTH2 authorization for CCX APIs
- oauth2 authorization required for ccx list.
- Course-instructor permission for ccx api endpoint
- Protection for detail view too.

Tests for CCX REST APIs and OAUTH2 authorization
2016-01-27 11:04:28 -05:00
Nimisha Asthagiri
e76e05fa77 Specially handle login redirect for mobile apps 2016-01-26 17:23:04 -05:00
Adam Palay
bb2d75d80e Revert "Merge pull request #11241 from edx/feature/credentials-phase-1"
This reverts commit 46df454536, reversing
changes made to 039e6cdfe6.
2016-01-25 12:46:57 -05:00
Awais Jibran
c2255ef0d6 Merge pull request #11226 from edx/aj/ecom3384-course-image-breaking
Studio - Schedule & Details tab broken
2016-01-22 18:56:15 +05:00
Awais Jibran
8a6699a46d Studio breaks DEFAULT_COURSE_ABOUT_IMAGE_URL is not set in settings in cms
ECOM-3384
2016-01-22 16:49:57 +05:00
Ahsan Ulhaq
bcb8afb2c4 Add jwt auth in LMS
ECOM-3419
2016-01-22 13:00:36 +05:00
Ahsan Ulhaq
8fb998fee7 caching for requests to credentials service
ECOM-3278
2016-01-20 12:51:28 +05:00
Ahsan Ulhaq
4ce58a6f67 Show message for earned programs credentials
ECOM-3015
2016-01-20 12:50:30 +05:00
Ehtesham
a13bf52dbf [MA-1862] using NamespacedPageNumberPagination class for pagination 2016-01-19 12:54:28 +05:00
J. Cliff Dyer
864e081ffb Add appropriate messages to OAuth2 401 responses.
Format responses as a JSON dict containing an error_code and a
developer_message.  user_message is not necessary, as these are API
level errors, not seen by end users.

MA-1900
2016-01-13 16:43:16 +00:00
vkaracic
534b32c78c Xblock utilities tests
Tests for xblock_utils.py functions.
2015-12-29 18:46:10 +00:00
Nimisha Asthagiri
8e3f4e058d Update Course Catalog API to support filters 2015-12-23 12:31:31 -05:00
Robert Raposa
5e69224c32 Deprecate escaping in display_name_with_default
- Remove escaping in display_name_with_default
- Move escaped version to deprecated display_name_with_default_escaped
- Does not include any other changes to remove double-escaping

Thanks to agaylard who initiated this work:
https://github.com/edx/edx-platform/pull/10756

TNL-3425
2015-12-22 11:52:04 -05:00
Usman Khalid
5e972b2a66 Merge pull request #11022 from edx/bookmarking
Bookmarking
2015-12-22 18:25:48 +05:00
David Ormsbee
88c7d58313 Modify CourseOverviews to create course image thumbnails.
Course teams occasionally upload very large files as their course
image. Before this commit, those images would be used directly in
the student's dashboard, sometimes leading to MBs worth of image
data on that page. With this commit, we now auto-generate small
and large thumbnails of configurable size. The Student Dashboard
and Course About pages will make use of this new functionality
(CourseOverview.image_urls), but the behavior of
CourseOverview.course_image_url will not change.

Note that the thumbnails are still created in the contentstore,
and sit alongside their originals.

What's included:

1. Multiple sizes, currently starting with "raw", "small", and
   "large". This falls back to the current behavior automatically in
   the case where thumbnails don't exist or this feature has been
   disabled in configuration.

2. Django admin based configuration for image sizes and whether
   to enable the functionality at all. Note that to regenerate
   images, you'd need to wipe the CourseOverviewImageSet model
   rows -- it doesn't do that automatically. This is partly because
   it's a very rare operation, and partly because I'm not entirely
   sure what the longer term invalidation strategy should be in a
   world where we might potentially have multiple themes. The
   flexible configuration was intended to allow better customization
   and theming.

3. The Course About pages also use the new thumbnail functionality,
   as an example of "large". This is in addition to the "small"
   used on the student dashboard.

Things I'm punting on for now (followup PRs welcome!):

1. Bringing the thumbnails to course discovery. A quick attempt
   to do so showed that it wasn't getting properly invalidated
   and updated when publishes happen (so the old image still showed
   up). It probably has something to do with when we do the
   re-indexing because it stores this data in elasticsearch, but
   I'm not going to chase it down right now.

2. Center-cropping. While this is a nice-to-have feature, the
   behavior in this PR is no worse than what already exists in
   master in terms of image distortion (letting the browser handle
   it).

3. Automated invalidation of the images when a new config is
   created.
2015-12-18 20:03:09 -05:00
Matjaz Gregoric
585c64f282 Enable staff debug everywhere except on detached blocks.
Staff markup was enabled on all block types in
https://github.com/edx/edx-platform/pull/10903

This works well inside the courseware, but it breaks layout of the course about
page, which is also an XModule, see:
https://github.com/edx/edx-platform/pull/10903#issuecomment-164266342

This commit disables staff markup/staff debug on all blocks except
blocks tagged with 'detached'. Detached blocks include course about
and info pages, static tabs.
2015-12-18 08:19:57 +01:00
Usman Khalid
8bdc097293 Fixes after rebase to Django 1.8 2015-12-17 22:10:21 +05:00
wajeeha-khalid
588833ff43 MA-1051: DiscussionAPI - Removed http errors from api.py and refactored to more specific errors 2015-12-16 21:23:51 +05:00
Clinton Blackburn
2f131fafed Merge pull request #10961 from edx/release
Merging patch/2015-12-11
2015-12-11 15:16:52 -05:00
Clinton Blackburn
dfadb28343 Fixed Permissions Bug
The permissions class now supports non-GET requests.

ECOM-2893
2015-12-11 13:02:05 -05:00
muhammad-ammar
c0479fb79a use users anonymous id for subject field in JWT 2015-12-10 11:56:50 +05:00
Nimisha Asthagiri
7429a32ba8 Merge pull request #10799 from edx/mobile/course-api-fields-MA-1661
Update Course About API to include effort and video (MA-1661)
2015-12-04 17:17:21 -05:00
Nimisha Asthagiri
d170c92f3b Refactor course_image_url 2015-12-04 11:25:40 -05:00
Clinton Blackburn
c90880719f Corrected permission class and test
- The permission now checks the correct request attribute (GET instead of data).
- The Credit API view test has been updated to check for the positive access instead of just denial.

 ECOM-3096
2015-12-04 10:18:53 -05:00
J. Cliff Dyer
f53de2c04a Paginate results of Courses API list endpoint
* Catalog results are now paginated
* Implements the new namespaced pagination described at
  https://openedx.atlassian.net/wiki/pages/viewpage.action?pageId=47481813
* API level code returns pythonic business objects
* View layer performs serialize at the view layer
* Convert views to use DRF generic views
* Removes an unintentional authentication decorator that caused
  the detail endpoint to return a 401 for anonymous users

MA-1724
2015-12-01 08:13:18 -05:00
Jim Abramson
8f4c2264a1 Merge pull request #10701 from edx/renzo/studio-programs-tab
Add Programs tab to Studio
2015-11-25 16:37:34 -05:00
Renzo Lucioni
70d57327eb Add Programs tab to Studio
Extends the Programs ConfigurationModel, cleans up Programs-related utilities and corresponding tests, and corrects caching. Uses the Programs API to list programs within Studio. ECOM-2769.
2015-11-25 14:56:50 -05:00
Clinton Blackburn
92153752c0 Rewrote Credit API
- API built atop Django REST Framework
- Added support for OAuth 2.0 and session authentication
- Added permissions around eligibility data

ECOM-2609
2015-11-24 22:06:54 -05:00