Commit Graph

482 Commits

Author SHA1 Message Date
Jonathan Piacenti
acc0161c0f Add custom registration form extension feature. 2016-01-05 10:14:28 -06:00
vkaracic
534b32c78c Xblock utilities tests
Tests for xblock_utils.py functions.
2015-12-29 18:46:10 +00:00
Nimisha Asthagiri
3d84e29218 Update Course Catalog API to include About Overview field. 2015-12-28 15:03:22 -05: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
ehtesham
3385d1e128 TNL-2810 backend implementation to limit the maximum bookmarks per course 2015-12-21 22:17:58 +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
27dcb811e7 Speedup the bookmarks tests. 2015-12-17 22:10:22 +05:00
Usman Khalid
1c387e4f41 Address review feedback. 2015-12-17 22:10:21 +05:00
Usman Khalid
8bdc097293 Fixes after rebase to Django 1.8 2015-12-17 22:10:21 +05:00
muzaffaryousaf
3792943960 Fixing the failing tests for XMLModule. 2015-12-17 22:07:35 +05:00
Usman Khalid
778b921c41 Do not include path or display name in the XBlockService cache. 2015-12-17 22:07:35 +05:00
Usman Khalid
4304c66c54 Performance optimizations and cache to keep the bookmarks info updated.
The cache uses the bookmarks.XBlockCache model.

TNL-1945
2015-12-17 22:07:34 +05:00
muzaffaryousaf
1616de5051 Bookmarks API.
TNL-2180
2015-12-17 22:07:30 +05:00
wajeeha-khalid
e37f8ff767 Merge pull request #10905 from edx/jia/MA-1051
MA-1051 - DiscussionAPI: Remove http errors from api.py
2015-12-17 15:42:40 +05:00
Nimisha Asthagiri
67ec142259 Merge pull request #10982 from edx/course_overview/management_command
generate_course_overview management command error handling
2015-12-16 11:33:01 -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
Nimisha Asthagiri
e96e65a377 generate_course_overview management command error handling 2015-12-16 10:53:44 -05:00
Renzo Lucioni
2cee39d535 Modify Course API to filter visible courses by org
Org to filter by is provided to the Course API list view using a querystring argument. Filtering ultimately occurs at the database layer. ECOM-2761.
2015-12-14 15:32:46 -05:00
Adam
029e1397c4 Merge pull request #10941 from edx/adam/fix-image-translations
fix translations for profile images (TNL-3901)
2015-12-14 09:55:55 -05:00
Nimisha Asthagiri
160f391408 Merge pull request #10959 from edx/course_overview/manual_seeding
Course Overview - require manual seeding of the table
2015-12-14 08:39:03 -05:00
Adam Palay
70552845ca fix translations for profile images (TNL-3901) 2015-12-14 08:19:00 -05:00
Nimisha Asthagiri
d6364312f4 Course Overview - require manual seeding of the table. 2015-12-13 23:35:46 -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
Nimisha Asthagiri
c14c146d0e Merge pull request #10841 from edx/mobile/optimize-course-api
Optimize Course Catalog using CourseOverview
2015-12-11 10:03:35 -05:00
Muhammad Ammar
0b4050f4ac Merge pull request #10924 from edx/ammar/fix-subject-field-in-jwt
use users anonymous id for subject field in JWT
2015-12-11 16:58:17 +05:00
Nimisha Asthagiri
4133155acc Update CourseDetails support for Course About information 2015-12-10 17:15:43 -05:00
Nimisha Asthagiri
8289c321be Update CourseOverview for Course Catalog
Added the following fields to CourseOverview:
    announcement
    catalog_visibility
    course_video_url
    effort
    short_description

Now requires CourseOverview models for each course in the system:
    Introduced a CourseOverviewGeneratedHistory model to keep track of
    when the CourseOverview table was seeded. The seeding can be
    done preemptively by calling the generate_course_overview management
    command. Otherwise, it is lazily computed, when needed.
2015-12-10 17:15:41 -05:00
muhammad-ammar
c0479fb79a use users anonymous id for subject field in JWT 2015-12-10 11:56:50 +05:00
Ned Batchelder
43ac38aa87 Add autospec to all mocks 2015-12-09 09:44:22 -05:00
Sarina Canelake
8928e9ef19 Remove CallStackManager (PLAT-931) 2015-12-08 10:21:55 -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
4a530690e1 Remove unused "has_cert_config" field on CourseDetails. 2015-12-04 16:03:06 -05:00
Nimisha Asthagiri
d6ced072c4 Refactor CourseDetails 2015-12-04 16:03:05 -05:00
Clinton Blackburn
01f0e2e37c Merge pull request #10824 from edx/clintonb/credit-auth-fix
Corrected permission class and test
2015-12-04 11:52:27 -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
David Baumgold
58daa365cd re-enable edx.org comprehensive theme 2015-12-03 17:18:55 -05:00
Peter Fogg
8b97ca1b24 Merge pull request #10802 from edx/feature/remove-honor-code-certs
Remove default honor code.
2015-12-03 14:55:30 -05:00
Ned Batchelder
67c1cdf5f4 Fix missing translator comments
Turns out if the string literal starts on the next line after the
translation function, then the translator comment is lost.  So, either
close up short strings, or add a dummy empty string on the first line to
concatenate with the real string.

Ugh.
2015-12-03 13:45:01 -05:00
Eric Fischer
88a389652b CohortMembership Test Fixes
There are 3 main changes in this commit:
* CohortFactory now sets up memberships properly, so consuming tests do not
need to explicitly touch CourseUserGroup.users to add() users.
* test_get_cohort_sql_queries has been updated to 3 and 9 queries when using
and not using the cache, respectively. This is needed due to each operation
needing an extra queery to get the CourseUserGroup from the CohortMembership.
* Adding remove_user_from_cohort(), the counterpart to add_user_to_cohort().
This is also to keep tests from touching the users field directly, and keep
CohortMembership data in sync.
2015-12-02 15:03:52 -05:00
Eric Fischer
731d85f771 CohortMembership Transaction Fixes
An issue arose recently due to ATOMIC_REQUESTS being turned on by default. It
turns out that CohortMemberships had been somewhat relying on the old default
transaction handling in order to keep CohortMemberships and the underlying
CourseUserGroup.users values in-sync.

To fix this, I've made all updates to Cohortmemberships go through an
outer_atomic(read_committed=True) block. This, is conjunction with the already
present select_for_update(), will no longer allow 2 simultaneous requests to
modify objects in memory without sharing them. Only one process will be
touching a given CohortMembership at any given time, and all changes will be
immediately comitted to the database, where the other process will see them.

I've also included some changes to get_cohort(), add_user_to_cohort(), and
remove_user_from_cohort() in order to properly make use of the new
CohortMembership system.
2015-12-02 15:03:28 -05:00
Renzo Lucioni
d370b0aa23 Merge pull request #10774 from edx/renzo/fix-programs-migration
Modify existing Programs migration to account for help_text change
2015-12-01 11:06:12 -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
wajeeha-khalid
092cc4b278 MA-1211; Discussion API - make boolean params case insensitive 2015-12-01 11:25:27 +05:00
Renzo Lucioni
c2138a3512 Modify existing Programs migration to account for help_text change
Prevents makemigrations from creating a new migration for the programs app.
2015-11-30 17:36:35 -05:00
Ahsan Ulhaq
a4b04faf19 Merge pull request #10735 from edx/ahsan/ECOM-2993-Help-text-update-for-full-name
Help text update for full name
2015-11-27 15:14:08 +05:00