Commit Graph

2398 Commits

Author SHA1 Message Date
Ned Batchelder
2300f382cf Ignore more directories to speed up extracting i18n strings.
Also, remove the one use of _() in a test feature, since there's no
point.
2015-08-06 10:39:04 -04:00
John Eskew
56da28526e Merge pull request #9155 from edx/jeskew/csm_api_events_to_datadog
Add DataDog histogram events to DjangoXBlockUserStateClient class.
2015-08-04 18:19:55 -04:00
John Eskew
f3e59acbf1 Add DataDog histogram events to DjangoXBlockUserStateClient class. 2015-08-04 17:14:05 -04:00
Ned Batchelder
ceb5655b2d Merge pull request #9171 from edx/ned/update-pylint
Update pylint and astroid, reduces pylint count by 400
2015-08-04 09:28:35 -04:00
Ned Batchelder
f54fe787c6 Remove needless 'disable=no-member' pragmas 2015-08-03 17:47:44 -04:00
Ned Batchelder
ee0f4b2594 Remove 'pylint: disable=no-value-for-parameter' that we no longer need. 2015-08-03 15:44:29 -04:00
John Eskew
ffc8a11789 Merge pull request #9092 from cpennington/user-state-client-tests
User state client tests
2015-08-03 12:25:05 -04:00
Linda Liu
8aa2d67b6d Merge pull request #8946 from edx/lliu/view-course-access
Add access response information into view_course_access
2015-08-01 13:55:25 -04:00
Calen Pennington
83c10331fa Add a test of submission history display 2015-08-01 08:13:25 -04:00
Calen Pennington
6ba611cb5f Remove remove_input_state.py, as it was one-time fix code, and is not worth porting to the new interface 2015-08-01 08:13:25 -04:00
Calen Pennington
aa374ca12a Make DjangoXBlockUserStateClient pass semantic tests
This required the following changes to the DjangoXBlockUserStateClient
semantics:

1) Changes get/get_many to return XBlockUserState tuples, rather
than state dictionaries or (block_key, state) tuples.
2) Raises DoesNotExist if get_history is called on an XBlock that has
had no data saved to it.
3) Returns XBlockUserState tuples as the results of get_history.
2015-08-01 08:13:25 -04:00
Calen Pennington
53b37e7412 Remove extraneous documentation, contracts, and method definitions 2015-08-01 08:13:25 -04:00
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