Commit Graph

214 Commits

Author SHA1 Message Date
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
Amir Qayyum Khan
44b409ebff Added pagination on grade book. 2015-11-10 15:18:15 +05:00
Peter Fogg
4805946a83 Override due dates in the LMS for self-paced courses. 2015-10-28 14:33:11 -04:00
Jamie Folsom
a3a7ff2428 Enroll the coach in the CCX on creation
Make the course URL pattern more generic.

Comment newly added functionality.

Fix quality issues.

Address two lint errors, with regex and variable naming.

Changed how we access course_key and course_id.

Replace another instance of self.course.id.to_deprecated_string()

Remove unused import, add missing one.

Improve how the ccx key is extracted from the URL

Use resolve() instead of os.path to get the course_id.

Remove the granting of staff access to coaches.
2015-10-26 11:35:01 -04:00
Peter Pinch
b87634d8e0 Merge pull request #10268 from mitocw/fix/pdw/download-ccx-csv
Fix CCX grades csv file download
2015-10-22 10:58:27 -04:00
Ned Batchelder
322ca34b20 Remove pylint pragmas from "class Meta"
Also remove useless docstrings where they were added to keep pylint
quiet.
2015-10-21 07:37:00 -04:00
pwilkins
5562f8ea0e Fix CCX grades csv file download
In the CCX dashboard, the Student Admin tab has a `Download student
grades` action. This action should download a CSV file containing
grades, but currently displays the CSV content in the browser instead.
This fix sets the `content-type` and `content-disposition` so that
a CSV file download occurs.

- fixes #93
2015-10-20 10:26:55 -04:00
Giovanni Di Milia
82a41b3846 Fixed new pylint violations in lms/djangoapps/ccx 2015-10-19 14:05:13 -04:00
Giovanni Di Milia
220c1e2934 Fixed pylint violation for files in lms/djangoapps/ccx 2015-10-16 14:15:29 -04:00
Peter Pinch
ec023c22e6 Merge pull request #10034 from mitocw/fix/gdm/hide_block_from_ccx
Fixed visibility of hidden blocks in CCX schedule
2015-10-08 08:54:02 -04:00
Giovanni Di Milia
f2a1d0e54b Coaches can't see blocks "hide from students"
If a block is marked as "hide from students" cannot be seen in the
CCX schedule
2015-10-07 09:07:29 -04:00
Calen Pennington
f8f9b91c16 Make unpublish raise the same errors in split and old-mongo when asked to unpublish a DIRECT_ONLY_CATEGORY 2015-10-06 16:54:34 -04:00
George Schneeloch
c6c92230c5 Fixed min_count KeyError 2015-10-01 10:56:13 -04:00
Muhammad Ammar
edf88962b5 Merge pull request #9534 from edx/ammar/update-factory-boy
Update factory_boy
2015-09-18 19:04:48 +05:00
Peter Pinch
01aea1a494 Merge pull request #9335 from mitocw/error_message_student_notfound_ccx_coach_dashboard
Added error message in enrollment tab inside CCX coach dashboard
2015-09-18 09:33:02 -04:00
muhammad-ammar
6a5ce5d544 Upgrade factory_boy
TNL-3179
2015-09-18 18:02:38 +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
amir-qayyum-arbisoft
4ab368720e Added error message in enrollment tab ccx coach dashboard 2015-09-17 14:49:55 +05:00
Syed Hassan Raza
49dfee0e44 save_cxx slow transaction 2015-09-11 06:06:42 -07:00
David Ormsbee
4053d625c9 Move some CCX view tests to use SharedModuleStoreTestCase (performance). 2015-08-24 16:21:27 -04:00
zubair-arbi
ec28a75f14 In-course reverification access control
* Automatically create user partitions on course publish for each ICRV checkpoint.
* Disable partitions for ICRV checkpoints that have been deleted.
* Skip partitions that have been disabled when checking access.
* Add verification access control UI to visibility settings.
* Add verification access control UI to sequential and vertical settings.
* Add partition scheme for verification partition groups.
* Cache information used by verification partition scheme and invalidate the cache on update.
* Add location parameter to UserPartition so the partition scheme can find the associated checkpoint.
* Refactor GroupConfiguration to allow multiple user partitions.
* Add special messaging to ICRV for students in the honor track.

Authors: Zubair Arbi, Awais Qureshi, Aamir Khan, Will Daly
2015-08-20 08:43:55 -07:00
Carlos de la Guardia
aa647bd87e fix test broken by course_overview changes 2015-08-14 10:00:04 -05:00
Carlos de la Guardia
066d5ab651 Changes to a CCX course should emit a course_published event 2015-08-14 01:24:11 -05:00
Diana Huang
82eb1f6b74 Make status use ConfigurationModel instead. 2015-08-11 17:51:39 -04: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
David Ormsbee
58f36d3e93 Enable faster ModuleStore tests with SharedModuleStoreTestCase.
This is a new TestCase base class, intended for situations where
you only want to initialize course content in the setUpClass(),
as opposed to setUp(). This is done for performance reasons, since
many test cases only use courses in a read-only fashion,
particularly in LMS tests.

This commit also converts the following modules to use this new
base class:

  lms/djangoapps/ccx/tests/test_ccx_modulestore.py (38s -> 4s)
  lms/djangoapps/discussion_api/tests/test_api.py (2m45s -> 51s)
  lms/djangoapps/teams/tests/test_views.py (1m17s -> 33s)
2015-07-27 13:02:16 -04:00
Calen Pennington
0e8b303d2e Cache CcxFieldOverrides on a per-request basis 2015-07-20 14:54:27 -04:00
Calen Pennington
63ddbd9b03 Cache CustomCourseForEdX object lookup per-request 2015-07-20 14:53:11 -04:00
Calen Pennington
1e84ad9941 Make CcxFactory fill in a coach if one isn't supplied 2015-07-20 14:53:10 -04:00
Kyle McCormick
a9c4774fe7 PLA-749 Fix student dashboard for users enrolled in CCX courses 2015-07-20 14:03:50 -04: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
Awais
b8e04f30a1 ECOM-1597 adding signals to update min-grade requirement. 2015-06-29 15:01:19 +05:00
Calen Pennington
fdf81042f5 Pass XBlock parents down to their children when constructing them, for caching 2015-06-25 13:59:46 -04:00
Calen Pennington
324d4785c1 Include stack traces when counting calls in unit tests 2015-06-25 13:58:00 -04:00
Calen Pennington
de142b2b51 Set a minimum number of Xblock constructions in field override tests 2015-06-23 13:32:50 -04:00
Ahsan Ulhaq
6fdff766bc Credit eligibility requirements display on student progress page
ECOM-1523
2015-06-22 18:36:54 +05:00
Calen Pennington
6bb25982de Add enable_ccx to the suite of override performance checking tests 2015-06-17 15:26:10 -04:00
Carlos de la Guardia
d56303dd0f Only enable the OverrideFieldData when there are active overrides on a course. 2015-06-17 15:26:10 -04:00
Ahsan Ulhaq
d35b652843 Display Eligibility table on progress page
1-Adding basic html for displaying eligibility table
2-Updated Eligibility Requirements Dynamically

ECOM-1523
2015-06-16 16:19:33 +05:00
Calen Pennington
9821323946 Merge pull request #8504 from cpennington/bdero/ccx-query-tests
A version of #8260 that is consistent on jenkins and locally
2015-06-15 11:51:33 -04:00
Calen Pennington
b06d256f99 Clear all caches before measure FieldOverride performance 2015-06-15 11:10:27 -04:00
Calen Pennington
e4bc328c3a Reduce the number of queries when walking parents in MongoModuleStore by avoiding cache misses on the data due to missing runs 2015-06-15 11:09:43 -04:00
Calen Pennington
67bde5e2e9 Measure XBlock instantiations in FieldOverride performance tests 2015-06-15 11:08:57 -04:00
Calen Pennington
5962c4eb8f Better simulate a request happening in the LMS in FieldOverride performance tests 2015-06-15 11:06:45 -04:00
Brandon DeRosier
5c6ccc8f0b Add CCX SQL query/mongo read tests 2015-06-15 09:50:44 -04:00
cewing
cb431ccb24 MIT CCX: Use CCX Keys: further revisions in response to code review
only require ccx-keys once

get_current_ccx will now expect a CourseKey instance as its argument, and will raise a value error if this expectation is not met.

document reason for local import

add special methods to pass attribute setting and deletion through to the wrapped modulestore

add __setattr__ and __delattr__ per code review, update __init__ to work with new methods

style change per code review

clean up context manager usage as recommended by code review

remove unused code and imports

convert modulestore type tests to use the `get_modulestore_type` api, remove unused imports

code quality: add docstrings

increase coverage for utils tests

fix bug found in testing.

increase test coverage on modulestore wrapper

code quality fixes

code-quality: ignore import error, but mark site for future consideration
2015-06-12 11:20:30 -07:00
cewing
ef4836503f MIT CCX: Use CCX Keys - responses to code review
remove references to middleware that were missed previously

use key apis rather than local implementation of key conversion.  remove local implementationa

remove spurious test for attribute

fix test setUp to avoid unneeded flattening

code quality fixes

add security check ensuring that the coach is coach for *this* CCX.

prevent ccx/deprecated course id problems

1.  do not allow ccx objects to be created if the course id is deprecated
2.  filter out any ccx memberships that involve deprecated course ids (in case there are bad ccxs in the database)

Fix test failures and errors arising from incorrect code path execution

Create context manager to handle unwrapping and restoring ccx values for the modulestore wrapper, employ it throughout modulestore wrapper implementation
2015-06-12 00:01:24 -07:00