Commit Graph

4136 Commits

Author SHA1 Message Date
Eric Fischer
83f2be4929 Merge pull request #14588 from edx/efischer/kill_stuff
Kill edx-reverification-block
2017-03-06 09:29:36 -05:00
Hasnain
d6d2b2d50f Add program marketing view
This change adds the URL configuration and Django view required
to implement a program marketing page. It is left to theme builders
to implement a template that fulfills their own UX requirements.

WL-766
2017-03-02 14:38:01 -05:00
Eric Fischer
7b85c0ea00 Remove in-course reverification
This is unused, and will no longer be supported on edx.org. Also adds a
DeprecatedModel utility class.

TNL-6126
2017-03-01 10:46:29 -05:00
Andy Armstrong
f6876ce199 Merge pull request #13937 from edx/andya/use-ui-blocks
[WIP] Use web fragments for discussion and static tabs
2017-03-01 00:36:48 -05:00
Andy Armstrong
248558f1d4 Render Discussion tab using web fragments 2017-02-28 23:39:39 -05:00
George Song
5e21f64c2c Merge pull request #14585 from vagupta16/fix-course-about-invalid-course-id-upstream
Ensure that course_about uses a valid course ID
2017-02-28 09:32:16 -08:00
cahrens
8fedc08c2a Support web fragments for tabs. 2017-02-24 17:55:32 -05:00
David Ormsbee
ca1f76cedb Move more tests to use bulk_operations. 2017-02-24 15:21:45 -05:00
Varun Gupta
c235ad70bd ensure that course_about uses a valid course ID 2017-02-24 11:17:16 -08:00
David Ormsbee
2051c90924 Test Speedup: Isolate Modulestore Signals
There are a number of Django Signals that are on the modulestore's
SignalHandler class, such as SignalHandler.course_published. These
signals can trigger very expensive processes to occur, such as course
overview or block structures generation. Most of the time, the test
author doesn't care about these side-effects.

This commit does a few things:

* Converts the signals on SignalHandler to be instances of a new
  SwitchedSignal class, that allows signal sending to be disabled.

* Creates a SignalIsolationMixin helper similar in spirit to the
  CacheIsolationMixin, and adds it to the ModuleStoreIsolationMixin
  (and thus to ModuleStoreTestCase and SharedModuleStoreTestCase).

* Converts our various tests to use this new mechanism. In some cases,
  this means adjusting query counts downwards because they no longer
  have to account for publishing listener actions.

Modulestore generated signals are now muted by default during test runs.
Calls to send() them will result in no-ops. You can choose to enable
specific signals for a given subclass of ModuleStoreTestCase or
SharedModuleStoreTestCase by specifying an ENABLED_SIGNALS class
attribute, like the following example:

    from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase

    class MyPublishTestCase(ModuleStoreTestCase):
        ENABLED_SIGNALS = ['course_published', 'pre_publish']

You should take great care when disabling signals outside of a
ModuleStoreTestCase or SharedModuleStoreTestCase, since they can leak
out into other tests. Be sure to always clean up, and never disable
signals outside of testing. Because signals are essentially process
globals, it can have a lot of unpleasant side-effects if we start
mucking around with them during live requests.

Overall, this change has cut the total test execution time for
edx-platform by a bit over a third, though we still spend a lot in
pre-test setup during our test builds.

[PERF-413]
2017-02-23 10:31:16 -05:00
Ben Patterson
c0dd2b878f Lettuce-on-Xenial CMS fix. Iterate through a list to avoid quotation string confusion.
Also change some selenium settings (they were not necessary at this time).
2017-02-20 17:22:36 -05:00
Ben Patterson
0e596dd517 Multi-thread stub servers. 2017-02-20 17:22:23 -05:00
Ben Patterson
e7b0c28d57 Fixes for chrome reliability in selenium.
Fix for rendering timing issue. See https://bugs.chromium.org/p/chromedriver/issues/detail?id=1552
2017-02-20 17:22:02 -05:00
Ben Patterson
452a1f1fbb Refactor click since it was resulting in timeout errors; use correct id for one of the LTI stub's buttons. 2017-02-20 17:21:42 -05:00
Ben Patterson
c58e514231 Properly wait for LTI stub's buttons to render 2017-02-20 17:21:41 -05:00
Albert St. Aubin
13ee3056ff update session cookie with the course id 2017-02-16 14:41:37 -05:00
Hasnain
41f3bba058 Backend code for program detail page.
This adds functions to the catalog utils which munge data
collected from the program endpoint and LMS database to construct
data structures that are ready for use by view and templates
related to the Open EdX marketing pages that live in LMS.

WL-766
2017-02-13 20:37:56 -05:00
Albert (AJ) St. Aubin
c1e2d39b38 Merge pull request #14444 from edx/aj/TNL-6381_upsell_msg
Aj/tnl 6381 upsell msg
2017-02-10 07:25:23 -05:00
Albert St. Aubin
97d7633774 Added upgrade upsell to course info banner and url parameter
TNL-6381
2017-02-09 20:21:39 -05:00
Jesse Shapiro
424b4356a5 Merge pull request #14400 from open-craft/haikuginger/enterprise-course-consent
[ENT-101] Add course-specific data sharing consent hooks for Enterprise app
2017-02-09 18:37:55 -05:00
Jesse Shapiro
9a573de533 Add consent check to course access prerequisites; add utility functions to provide interface to course-specific consent in Enterprise app 2017-02-09 13:49:57 -05:00
sanfordstudent
37c266f08f Merge pull request #14423 from edx/sstudent/TNL-6219
add course and user id to library content assigned
2017-02-08 09:47:59 -05:00
Sanford Student
1a5e15fd5c add course and user id to library content assigned 2017-02-07 13:52:15 -05:00
Renzo Lucioni
e7771148b7 Load all programs from the catalog
This commit contains back end changes necessary to load programs from the catalog in all contexts. The existing program munging utility is applied as late as possible to avoid conflating this work with changes to the front end; those will be made separately.

ECOM-4422
2017-02-06 23:16:29 -05:00
David Ormsbee
608fceb0b5 Remove select_for_update option for FieldDataCache
We've already been ignoring the param for a long time. This just
removes it entirely.
2017-01-26 12:51:22 -05:00
David Ormsbee
5ef1e08050 Disable student state writes for crawlers.
When crawlers like edX-downloader make requests on courseware, they are
often concurrently loading many units in the same sequence. This causes
contention for the rows in courseware_studentmodule that store the
student's state for various XBlocks/XModules, most notably for the
sequence, chapter, and course -- all of which record and update user
position information when loaded.

It would be nice if we could actually remove these writes altogether
and come up with a cleaner way of keeping track of the user's position.
In general, GETs should be side-effect free. However, any such change
would break backwards compatibility, and would require close
coordination with research teams to make sure they weren't negatively
affected.

This commit identifies crawlers by user agent (CrawlersConfig model),
and blocks student state writes if a crawler is detected. FieldDataCache
writes simply become no-ops. It doesn't actually alter the rendering
of the courseware in any way -- the main impact is that the blocks
won't record your most recent position, which is meaningless for
crawlers anyway.

This can also be used as a building block for other policy we want to
define around crawlers. We just have to be mindful that this only works
with "nice" crawlers who are honest in their user agents, and that
significantly more sophisticated (and costly) measures would be
necessary to prevent crawlers that try to be even trivially sneaky.

[PERF-403]
2017-01-26 09:36:53 -05:00
Nimisha Asthagiri
59532fb9a2 Merge pull request #14360 from edx/beryl/fix_db_updated_check
Update has_database_updated_with_new_score to handle all block types
2017-01-23 20:24:43 -05:00
Christopher Lee
b287f48f8b Merge pull request #14301 from edx/clee/return-all-courses-on-mobile
MA-3091: Return non-mobile courses from the mobile enrollments API
2017-01-23 15:55:08 -05:00
Nimisha Asthagiri
5a9179bf00 Update has_database_updated_with_new_score to handle all block types
TNL-6331
2017-01-23 15:50:16 -05:00
christopher lee
b5e987ba61 MA-3091: Added mobile_available flag override admin setting 2017-01-23 15:04:40 -05:00
Christina Roberts
b9c3848449 Merge pull request #14337 from edx/christina/tnl-6050
Allow "masquerading as a group member" in Preview
2017-01-19 15:49:02 -05:00
cahrens
a6776f6973 Always check group access when masquerading.
TNL-6050
2017-01-19 14:47:10 -05:00
Eric Fischer
507e621ccc Revert "Merge pull request #14324 from edx/efischer/revertins"
This reverts commit c7d2d601b8, reversing
changes made to fb2173f43e.
2017-01-18 10:56:13 -05:00
Ari Rizzitano
54a48a3227 [courseware] generate sequence-specific titles server-side (AC-695)
[courseware] generate sequence-specific titles server-side (AC-695)

[courseware] generate sequence-specific titles server-side (AC-695)

case for empty subsections [AC-695]

move title logic into courseware context method [AC-695]

pep8

coffeescript -> js

js mistake

jslint

refactor sequence title generation slightly

missed a line

line too long

python is not javascript

ugh js

ugh js part 2
2017-01-14 17:55:09 -05:00
alisan617
88e10e0ee8 sequence navs keyboard support and test update 2017-01-13 14:07:10 -05:00
Eric Fischer
0b620ebbc1 Revert "Merge pull request #14225 from edx/efischer/tnl-6108"
This reverts commit 8b8cf5f9e0, reversing
changes made to 2716ffbf8e.
2017-01-12 13:50:05 -05:00
Eric Fischer
6845c64977 Hide after course end
Hijacks the existing hide_after_due field to be repected as "hide after course
end" for self-paced courses. Includes tests.

TNL-6108
2017-01-12 09:12:54 -05:00
Nimisha Asthagiri
99e6d53939 Preload definitions when collecting block structures 2016-12-29 08:51:26 -05:00
Jillian Vogel
eef4539355 Merge pull request #14153 from open-craft/jill/fix-insights-ccx-staff
Checks access using the CCX course key instead of the base course key
2016-12-23 08:20:24 +10:30
Dmitry Viskov
fc0577d081 Hide bookmarks link in the LTI mode 2016-12-22 09:56:33 -05:00
Jillian Vogel
8493ff6028 Checks access using the CCX course key,
instead of using the base course key (which does not contain the CCX info).
This removes the need for special checking of CCXKey/CCXLocator types, and just
treats them like normal CourseKeys.

This fix allows users with a Staff role on a CCX course to view CCX courses in Insights.
2016-12-22 08:37:49 +10:30
asadazam93
01f3233a50 Fix InvalidKeyError on render xblock 2016-12-20 13:03:50 +05:00
Afzal Wali
e44e18592f Programs list conditionally added to the context of index and courses page. 2016-12-15 18:16:48 +05:00
Eric Fischer
5a98a90eba Use timestamps in _has_database_updated_with_new_score check
Also fixes issue where ORA grades were never updated, by including
them in this check.

TNL-5994
TNL-5995
2016-12-09 13:46:34 -05:00
Calen Pennington
b24c22804e Merge pull request #14047 from cpennington/safer-opaque-keys
Safer opaque keys
2016-12-02 10:44:36 -05:00
Calen Pennington
fd0d69594a Upgrade to the latest version of opaque-keys 2016-12-01 13:04:31 -05:00
Nimisha Asthagiri
aca69f78f2 Update Subsection Grade Report to differentiate Not Attempted and 0
TNL-5990
2016-11-30 12:36:26 -05:00
Nimisha Asthagiri
e87388e24c Grades cleanup before updating grade report
Remove deprecated SingleSectionGrader.  TNL-5987
Remove display_name and module_id from Scores objects
Update CourseGradeFactory.__init__ to not be user-specific
Update some callers to use CourseGrade class instead of "summary" dict
Remove no longer needed course_grades.py module.
Renamed django signal from GRADES_UPDATED to COURSE_GRADE_CHANGED
2016-11-30 12:36:25 -05:00
Sanford Student
4eb5311ece Separating problem raw score changed and problem weighted score changed signals
For TNL-5993
2016-11-30 10:15:07 -05:00
Christina Roberts
af504fc61d Merge pull request #13805 from edx/christina/ac-583
Christina/ac 583
2016-11-28 12:22:55 -05:00