Commit Graph

68 Commits

Author SHA1 Message Date
Nimisha Asthagiri
33e47d317b Course Overview migrations fix: Readd the Facebook URL field. 2016-02-26 10:20:36 -05:00
Nimisha Asthagiri
fa8ca11d8c Remove unused Mobile Social Facebook endpoint 2016-02-18 12:12:04 -05:00
Ned Batchelder
d8b9dec51e Update this command for Django 1.8 2016-02-11 15:39:35 -05:00
Julien Paillé
ea2633d485 Fix generate_course_structure command. 2016-02-10 10:23:20 +01:00
David Ormsbee
1a5b9172d8 Allow course images to be served from the CDN.
Previously, course images on the student dashboard were always
served from the localhost, even if the CDN was enabled.
2016-02-09 16:45:18 -05:00
David Ormsbee
be25bb8aba Clear caches between tests for ModuleStoreTestCase/SharedModuleStoreTestCase
Cached values were leaking across tests, causing difficult to debug errors,
particularly when using Config Models. As part of this work, certain tests
that had query counts that relied on those values being cached needed to
be adjusted up.
2016-02-06 00:01:15 -05:00
Nimisha Asthagiri
05767b433d Collect Course Blocks on Course Publish and Management Command
MA-1368
2016-02-03 16:56:22 -05:00
David Ormsbee
c4b0c7b483 Move test_get_all_courses_by_mobile_available to CourseOverviewTestCase
It somehow ended up in CourseOverviewImageSetTestCase (merge artifact?).
2016-01-11 04:30:44 -05:00
David Ormsbee
0e70676ba7 Prevent course image thumbnail race condition.
Without this change, we'd throw a TransactionManagementError in the case
where we have a race condition and generate multiple CourseOverviewImageSets
for the same CourseOverview concurrently.
2016-01-11 04:30:35 -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
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
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
Nimisha Asthagiri
d6364312f4 Course Overview - require manual seeding of the table. 2015-12-13 23:35:46 -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
Nimisha Asthagiri
d170c92f3b Refactor course_image_url 2015-12-04 11:25:40 -05:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -05:00
muhammad-ammar
8d5f153201 Merge remote-tracking branch 'origin/release' into dj18-release-merge
Conflicts:
	common/djangoapps/util/testing.py
	lms/djangoapps/instructor/views/api.py
	lms/djangoapps/teams/tests/test_views.py
	openedx/core/djangoapps/programs/models.py
	openedx/core/djangoapps/user_api/accounts/tests/test_views.py
	requirements/edx/github.txt
2015-11-18 17:53:44 +05:00
Giovanni Di Milia
64acf4846b Enforced maximum amount of students for CCX
CCX overrides course max_student_enrollments_allowed
and set it to 200 during CCX creation
2015-11-16 10:10:37 -05:00
Usman Khalid
6cb62f2697 Rebase upgrade Django to v1.8.5
Please note that this is a squshed commit and the work of:
Symbolist, macdiesel, nedbat, doctoryes, muzaffaryousaf and muhammad-ammar
2015-11-10 15:00:19 -05:00
Syed Hassan Raza
3102788bd1 Delete course entry from CourseAboutSearchIndex 2015-11-07 18:27:09 +05:00
David Ormsbee
4ac9725793 Remove foreign key constraint on CourseOverviewTab -> CourseOverview
This will allow v1 code of CourseOverview to delete entries. While
this is not a good thing in general (and future versions will ignore
entries with higher versions than they support), this is necessary
to prevent errors with the existing code in a rollback situation.
Otherwise, old code trying to delete CourseOverview entries will
fail with a foreign key constraint violation.
2015-10-20 15:30:31 -04:00
David Ormsbee
3cd348008d CourseOverview will only delete old versions of saved data.
Previously, CourseOverview would delete data for any version
that didn't match the current one. That could cause problems
during deploys, when multiple versions of CourseOverview
were active. They would overwrite each other, and that could
cause problems if the old one overwrote the new one -- in
our case, the new one created a new table with foreign key
links that the old one was unaware of, and trying to delete
it would have caused an error.
2015-10-20 15:03:50 -04:00
Matt Drayer
1eab25f292 mattdrayer/increment-edx-lint: Bump to v0.2.9 and address pylint/pep8 violations
* Fix paver violations to stablize edx-lint update
* Parens, Line2Long
* Fix missing docstrings
* Fix PEP8 issues
* Address PR feedback (thanks @nedbat!)
2015-10-19 10:11:59 -04:00
wajeeha-khalid
90fe71dbfe MA-1248 - CourseEnrollmentAPI: added discussion URL 2015-10-09 19:04:55 +05:00
Brian Beggs
d9de52751d Merge remote-tracking branch 'origin/release' into bbeggs/2015-09-22-release-to-master 2015-09-28 20:58:34 -04:00
Ben Patterson
2fd6add524 Revert "Merge DRF 3.1 in to master" 2015-09-28 17:12:43 -04:00
Will Daly
322db6de7a TNL-3316: Error on Insights performance report
Preserve DRF v2 behavior of defaulting to None
for missing keys in the grading policy dictionary.
2015-09-28 11:52:32 -04:00
Will Daly
d11ccad0fc Upgrade djangorestframework to v3.1
* Upgrade edx-submissions
* Upgrade edx-ora2
* Upgrade edx-val
* Upgrade edx-proctoring
* Update all edx-platform code that depends on DRF, including:
  - auth_exchange
  - cors_csrf
  - embargo
  - enrollment
  - util
  - commerce
  - course_structure
  - discussion_api
  - mobile_api
  - notifier_api
  - teams
  - credit
  - profile_images
  - user_api
  - lib/api (OAuth2 and pagination)
2015-09-28 11:52:30 -04:00
Will Daly
d6c7d8d383 TNL-3316: Error on Insights performance report
Preserve DRF v2 behavior of defaulting to None
for missing keys in the grading policy dictionary.
2015-09-25 12:40:57 -04:00
Will Daly
8555630df7 Upgrade djangorestframework to v3.1
* Upgrade edx-submissions
* Upgrade edx-ora2
* Upgrade edx-val
* Upgrade edx-proctoring
* Update all edx-platform code that depends on DRF, including:
  - auth_exchange
  - cors_csrf
  - embargo
  - enrollment
  - util
  - commerce
  - course_structure
  - discussion_api
  - mobile_api
  - notifier_api
  - teams
  - credit
  - profile_images
  - user_api
  - lib/api (OAuth2 and pagination)
2015-09-25 12:40:57 -04:00
Matt Drayer
e51c4f23d3 Merge pull request #9822 from edx/saleem-latif/SOL-565
saleem-latif/SOL-565
2015-09-24 10:19:43 -04:00
Saleem Latif
05a72486f3 date format "Monday at 3pm UTC" added for courses starting with-in 5 days 2015-09-23 12:17:08 +05:00
Dennis Jen
844edac443 Optimize OpenID Course Claims for users.
- Course overviews will cache courses upon publish.
- Added management command to warm up cache.
- OAuth2 handler returns courses via course overviews.
2015-09-17 11:29:28 -04:00
Peter Fogg
eafb07552a Merge pull request #9287 from edx/release
Release
2015-08-12 13:06:39 -04:00
Waheed Ahmed
aff849281d Revert "Test library failed to export after import"
This reverts commit 4c1c4619f0.
2015-08-12 02:06:09 +05:00
Brandon DeRosier
34526ddf6a Revert "Revert "Merge pull request #8986 from jazkarta/remove-ccx-enrollment""
This reverts commit 42e78463a7.
2015-08-11 13:03:58 -04:00
Peter Fogg
344ff8c1bc Merge pull request #9267 from edx/release
2015-08-11 release
2015-08-11 12:07:21 -04:00
Peter Fogg
42e78463a7 Revert "Merge pull request #8986 from jazkarta/remove-ccx-enrollment"
This reverts commit 53db053c18, reversing
changes made to 386a8a27dd.
2015-08-07 16:59:56 -04:00
Kyle McCormick
a14667c6f2 MA-1061 Fix IntegrityError caused by race condition in CourseOverview.get_from_id 2015-08-07 08:53:33 -04:00
Syed Hassan Raza
4c1c4619f0 Test library failed to export after import 2015-08-05 12:47:27 -07:00
Carlos de la Guardia
458ed0a64e Use the standard enrollment table instead of a custom CCX table for CCX
enrollments.

The goal for this PR is to have a single mechanism for registering users and
reducing the number of places where special-casing for ccx courses is needed. The
migration at this point is purposefully limited to convert ccx memberships into
student enrollments when moving forward. No backward migration is in place at the
moment. The ccx membership tables are not removed at this time. It is possible to go
backwards and forwards multiple times with no errors or data loss.
2015-08-01 02:59:10 -05:00
Kyle McCormick
10aae0d480 MA-1063 Add versioning and timestamping to CourseOverview 2015-07-31 10:28:17 -04:00
Kyle McCormick
ea89e2d83b Fix conflicting 0004_ migrations on course_overviews
What happened:
* First, I merged `0004_default_lowest_passing_grade_to_None.py`, which adds `null=True` to `lowest_passing_grade`.
* Later, Renzo merged `0004_auto__add_field_courseoverview_enrollment_start__add_field_courseoverv.py`, which adds a bunch of enrollment-related fields
* Neither migrations' `models` variables reflects the changes in the other one.
* release currently has just `0004_default...`
* master and rc/2015-07-22 have `0004_auto...` and `0004_default...`, in that order.

What this commit changes:
* Change `0004_auto...` to `0005_add_enrollment_fields.py`
* Update `models` in `0005_...` to have `null=True` for `lowest_passing_grade`
2015-07-24 11:41:42 -04:00
Renzo Lucioni
b50c905865 Remove modulestore dependency from Enrollment API
Sets the Enrollment API free of the modulestore by replacing modulestore queries with calls to the CourseOverview model. Course deletion invalidates the corresponding CourseOverview. XCOM-462.
2015-07-20 13:41:19 -04:00
Max Rothman
c97314413b Merge branch 'release' into release-merge-test
Conflicts:
	lms/djangoapps/commerce/urls.py
	lms/djangoapps/commerce/views.py
2015-07-17 17:42:03 -04:00