Commit Graph

871 Commits

Author SHA1 Message Date
David Baumgold
c1a38a6dc7 Pull discussion underscore templates out into individual files
No need to go through Mako
2015-07-28 09:36:31 -04:00
John Eskew
756008aa9b Merge pull request #8768 from open-craft/jump_to_children_ospr
Jump to children
2015-07-27 13:42:32 -04:00
Peter Fogg
8fc5444095 Merge pull request #9020 from edx/peter-fogg/404-not-live
Redirect to dashboard from non-live courses.
2015-07-24 13:49:45 -04:00
Peter Fogg
c8ed59ac61 Redirect to dashboard from non-live courses.
TNL-2693
2015-07-24 13:05:47 -04:00
muzaffaryousaf
38ef22b8a2 Using youtube api (v3) instead of v2 to get the video duration .
TNL-2413
2015-07-24 17:03:46 +05:00
Jonathan Piacenti
c8339072dd Fixup for tests. 2015-07-21 14:39:19 +00:00
Jonathan Piacenti
405b266fa7 Addressed notes. 2015-07-21 14:39:18 +00:00
Jonathan Piacenti
a6ae44a0db Add ability to activate a child block via jump_to_id. 2015-07-21 14:39:18 +00:00
Will Daly
a725e84233 Merge pull request #8983 from edx/will/ecom-1912-and-1913
Credit progress page formatting bugfixes.
2015-07-20 14:14:53 -07:00
Will Daly
d3f58b689f Credit progress page formatting bugfixes.
* Correctly format the student's full name on the progress page.
* Add tests for progress page credit requirements display.
* Display grade percentage for credit requirement on progress page
2015-07-20 13:08:13 -07: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
80cf4d6ecb Merge pull request #8969 from edx/release-merge-test
Release merge test
2015-07-20 10:38:37 -04:00
tlindaliu
e0840d2d43 MA-849: Change has_access return type
New classes for the return type, and changes to the has_access function and tests to make them compatible.
2015-07-19 20:42:29 -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
Adam
2735b2b5bb Revert "Decorated instructor dashboard with sudo_required." 2015-07-17 12:11:38 -04:00
Waheed Ahmed
bc052db1ee Added DjangoSudo functionality for instructor dashboard and course team page 2015-07-16 11:14:11 +05:00
Sven Marnach
3d7246ecc8 Allow masquerading as a specific user different from the logged in user. 2015-07-13 18:55:45 -07:00
Sarina Canelake
8283c07e32 Remove superfluous-parens pylint violations
Skipped 'print' statement violations, as print() is Py3k syntax.
2015-07-13 17:33:28 -04:00
Adam Palay
5088ae3091 when removing field from _field_data_cache when rebinding a module to a new user, also remove it from _dirty_fields (TNL-2640) 2015-07-13 14:17:27 -04:00
Sarina Canelake
07a3d74999 Merge pull request #8844 from ubc/xcompass/pu/fix-test_course_about_in_cart
Fix failed test_course_about_in_cart
2015-07-09 14:01:52 -04:00
zubair-arbi
1574650f28 Merge pull request #8845 from edx/tasawer/story/ecom-1651-on-demand-cert-download-update
Update copy for On Demand Cert Download
2015-07-09 21:08:47 +05:00
David Ormsbee
79de77cf95 Optimize grading/progress page to reduce database queries (cache max scores).
The progress page did a number of things that make performance terrible for
courses with large numbers of problems, particularly if those problems are
customresponse CapaModule problems that need to be executed via codejail.

The grading code takes pains to not instantiate student state and execute the
problem code. If a student has answered the question, the max score is stored
in StudentModule. However, if the student hasn't attempted the question yet, we
have to run the problem code just to call .max_score() on it. This is necessary
in grade() if the student has answered other problems in the assignment (so we
can know what to divide by). This is always necessary to know in
progress_summary() because we list out every problem there. Code execution can
be especially slow if the problems need to invoke codejail.

To address this, we create a MaxScoresCache that will cache the max raw score
possible for every problem. We select the cache keys so that it will
automatically become invalidated when a new version of the course is published.

The fundamental assumption here is that a problem cannot have two different
max score values for two unscored students. A problem *can* score two students
differently such that they have different max scores. So Carlos can have 2/3 on
a problem, while Lyla gets 3/4. But if neither Carlos nor Lyla has ever
interacted with the problem (i.e. they're just seeing it on their progress
page), they must both see 0/4 -- it cannot be the case that Carlos sees 0/3 and
Lyla sees 0/4.

We used to load all student state into two separate FieldDataCache instances,
after which we do a bunch of individual queries for scored items. Part of this
split-up was done because of locking problems, but I think we might have gotten
overzealous with our manual transaction hammer.

In this commit, we consolidate all state access in grade() and progress()
to use one shared FieldDataCache. We also use a filter so that we only pull
back StudentModule state for things that might possibly affect the grade --
items that either have scores or have children.

Because some older XModules do work in their __init__() methods (like Video),
instantiating them takes time, particularly on large courses. This commit also
changes the code that fetches the grading_context to filter out children that
can't possibly affect the grade.

Finally, we introduce a ScoresClient that also tries to fetch score
information all at once, instead of in separate queries. Technically, we are
fetching this information redundantly, but that's because the state and score
interfaces are being teased apart as we move forward. Still, this only
amounts to one extra SQL query, and has very little impact on performance
overall.

Much thanks to @adampalay -- his hackathon work in #7168 formed the basis of
this.

https://openedx.atlassian.net/browse/CSM-17
2015-07-09 10:03:58 -04:00
Tasawer
c964b5cb5a Update copy for On Demand Cert Download
ECOM-1651
2015-07-09 15:45:40 +05:00
Pan Luo
2b29ad2066 Fix failed test_course_about_in_cart
This test failed since d240785 on devstack.
The self.request_factory.get() just return a request object, which is
being passed to views.course_about() directly without being processed by
edxmako.middleware. The REQUEST_CONTEXT.request in
d240785b17/common/djangoapps/edxmako/middleware.py (L39)
is None, instead of request object, which contains the LANGUAGE_CODE and
other stuff used by the view.

Also cleaned up the use of MakoMiddleware. Using the method in
edxmako.tests module.
2015-07-08 23:46:51 -07:00
Kyle McCormick
5b630a7704 MA-779 Make has_access work on CourseOverview objects 2015-07-08 12:05:38 -04:00
Matt Drayer
c25e37ea93 Merge pull request #8734 from edx/ziafazal/SOL-1011
ziafazal:SOL-1011: Certificate URL should use 'download_url' field and not 'verify_uuid'
2015-07-07 15:40:34 -04:00
Davorin Šego
ad5a98e40a Merge pull request #8282 from Stanford-Online/giulio/default-course-about-images
Default "Course About" image
2015-07-07 00:24:54 +02:00
Matt Drayer
a8f909fe77 Merge pull request #8659 from edx/ziafazal/SOL-1006
ziafazal/SOL-1006: Disable course 'start date' for inactive web-enabled certificates
2015-07-06 16:45:24 -04:00
Giulio Gratta
84f7aef917 Default "Course About" image
Templates that display the image now check if courses specifies an image, if they don't the default image is displayed

Path set in both common.py and aws.py to allow for easy overriding in one place.

Addresses SOL-926

Some code provided by Davorin Sego
2015-07-06 10:29:12 -07:00
Usman Khalid
fe54b085c6 Added ability to disable xblock types in LMS.
TNL-2305
2015-07-03 20:58:40 +05:00
Will Daly
bfe01605b4 Merge pull request #8700 from edx/will/remove-provider-course-m2m-relation
Credit eligibility/provider refactor
2015-07-02 12:36:37 -07:00
Matt Drayer
4526b929b0 Merge pull request #8491 from edx/mattdrayer/fix-progress-template
mattdrayer/SOL-1018: Fixed progress template for better web certificates support
2015-07-02 13:51:49 -04:00
Ali Mohammad
eb70f2303c Merge pull request #8749 from edx/rc/2015-06-29
Merge back into master
2015-07-02 13:34:42 -04:00
Will Daly
e2acf3ab87 Credit eligibility/provider refactor
* Remove m2m relation between credit course and credit providers.
* Separate eligibility and provider APIs into different modules.
* Add API call for retrieving a user's eligibilities.
* Cache credit course list.
* Style the dashboard purchase button.
* Display a link for the credit provider on the dashboard.
* Add analytics events for clicks on the purchase button.
* Expose more credit models to Django admin and add search functionality.
2015-07-02 10:03:52 -07:00
Zia Fazal
ad1f4951fc get_certificate_url should return certificate download_url in case of non html certificates 2015-07-01 16:14:37 +05:00
Ahsan Ulhaq
7787974dd5 Order of Credit Eligibility line items
Displayed eligibility line items on the Progress page of a Credit course
in the order of appearance in the courseware.

ECOM-1782
2015-07-01 13:40:39 +05:00
Adam Palay
4bb4efe9d9 Merge remote-tracking branch 'origin/release' into rc/2015-06-29
Conflicts:
	requirements/edx/github.txt
2015-06-29 16:55:57 -04:00
Adam Palay
61431015c2 update xblock only to mark field values as dirty if they've changed (TNL-2475)
force save "download_video" field if not set

set timezone to UTC explicitly
2015-06-29 14:28:45 -04:00
Awais
b8e04f30a1 ECOM-1597 adding signals to update min-grade requirement. 2015-06-29 15:01:19 +05:00
Zia Fazal
bcbd1464d4 New course cannot be started till web certificate is active
fixed broken test

changes based on feedback on 6/24

fixed broken unit test after feedback changes

added more checks and updated tests

fixed broken bok choy test

Fixed pylint quality error

trying to fix pylint quality error
2015-06-29 12:53:21 +05:00
Sarina Canelake
9f46d9f0c5 Regression test: dark lang stays set through multiple pages 2015-06-26 13:15:44 -04:00
Sarina Canelake
cf80c96f0b Add i18n roundtrip regression tests for language pref and dark lang
Tests would have caught issues raised in LOC-87
2015-06-26 13:15:44 -04:00
Sarina Canelake
5fcdafd0cf Add i18n regression tests (LOC-72, LOC-85) 2015-06-26 13:15:42 -04:00
Calen Pennington
ba971db1ba Merge pull request #8594 from cpennington/pass-xblock-parents
Pass xblock parents
2015-06-26 12:15:41 -04:00
Matt Drayer
700eb8b702 mattdrayer/fix-progress/template: Improved web certificates support 2015-06-26 10:43:26 -04:00
Calen Pennington
fdf81042f5 Pass XBlock parents down to their children when constructing them, for caching 2015-06-25 13:59:46 -04:00
Nimisha Asthagiri
8b5e5c5910 Merge branch 'release' 2015-06-25 13:11:41 -04:00
Sarina Canelake
e7cbcfff20 Merge pull request #8618 from edx/sarina/revert-8402
Revert "Merge pull request #8402 from edx/sarina/annotate-middleware"
2015-06-22 16:05:49 -04:00
Matt Drayer
f0f3766443 mattdrayer/ECOM-1773: Fixed invalid URL reversal 2015-06-22 14:04:43 -04:00
Sarina Canelake
1e21945e22 Revert "Merge pull request #8402 from edx/sarina/annotate-middleware"
This reverts commit 09425c3d8f, reversing
changes made to 410b9282af.
2015-06-22 13:55:53 -04:00