Commit Graph

4136 Commits

Author SHA1 Message Date
Calen Pennington
704ae7139a Add a subclass-implementation of the UserStateClient tests 2015-08-01 08:12:04 -04:00
utkjad
b85b50d11a Removing @contract 2015-07-31 17:44:16 +00:00
tlindaliu
3b483d14bc MA-851: Add access response information into view_course_access 2015-07-31 09:30:40 -04:00
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
Awais Jibran
d838686c1b Merge pull request #9043 from edx/aj/tnl-2879-xml-course-error
Grading doesn't work for XML courses
2015-07-27 18:38:54 +05:00
Braden MacDonald
5aa127a9bf Merge pull request #8995 from open-craft/masquerade-cohorts
Allow previewing cohorted content when masquerading (SOL-1064)
2015-07-26 11:18:23 -07: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
Awais Jibran
334005ef2f Grading doesn't work for XML courses
TNL-2879
2015-07-24 19:17:46 +05: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
Braden MacDonald
0defc55b84 Allow previewing cohorted content when masquerading 2015-07-22 00:54:15 -07: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
0c837adfce Refactor auth.has_access to auth.user_has_role
Change name of method to clear up confusion with the access.has_access method.
2015-07-19 20:42:29 -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
Marco Morales
493200734e Merge pull request #8296 from edx/marco/find-courses-page/styling-changes
Styling improvements to openedX search through Find Courses page
2015-07-14 08:14:35 -04: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
39d3537410 Pylint logging-format-interpolation: Convert logging calls to use %s formatting 2015-07-13 17:33:29 -04: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
Sarina Canelake
ba8fd1c21d Eliminate instances of unused-import Pylint violation 2015-07-13 17:33:25 -04:00
Akiva Leffert
6084f4df27 Make render_xblock return a 404 if access check fails
The mobile clients need the request to fail if they don't have
permisssions so that they know to refresh a session token.

JIRA: https://openedx.atlassian.net/browse/MA-1003
2015-07-13 15:56:58 -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
1dfe9ed9e8 MA-779 Update student dashboard to use CourseOverview 2015-07-08 12:05:38 -04: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
Sarina Canelake
b26f2af585 Revert "Adding entries of Call Stack Manager in StudentModule and StudentModuleHistory" 2015-07-07 05:45:23 -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
utkjad
10a3863832 Enable CallStackManager on StudentModule and StudentModuleHistory to capture any use outside of DjangoXBlockUserStateClient 2015-07-06 18:11:05 +00: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
Akiva Leffert
f0b52c698d Merge pull request #8739 from edx/aleffert/remove-chromeless-xblock-border
Remove border from chromeless xblock
2015-07-06 11:37:29 -04:00
Usman Khalid
fe54b085c6 Added ability to disable xblock types in LMS.
TNL-2305
2015-07-03 20:58:40 +05:00
Ned Batchelder
e6e5a8d812 Convert some try/finally to addCleanup 2015-07-02 19:31:48 -04: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