Commit Graph

174 Commits

Author SHA1 Message Date
Amir Qayyum Khan
795ead82b5 Added master course staff and admins to ccx and fixed same issues related to ccx 2016-03-26 03:18:39 +05:00
muzaffaryousaf
bb952e148f Restrice non-staff users to access preview content.
TNL-4194
2016-03-21 20:08:24 +05:00
Amir Qayyum Khan
c0a131e5d6 Allowed ccx coaches to see individual students progress from grade book 2016-01-08 16:05:33 +05:00
Nimisha Asthagiri
44abf7a9a2 Performance enhancement in see_exists: reverse order of checks 2015-12-23 16:40:38 -05:00
Nimisha Asthagiri
2b8441a072 Update Course Catalog to use CourseOverview 2015-12-10 20:37:50 -05:00
Nimisha Asthagiri
801165b266 Remove support for outdated ispublic field on Course Descriptor
Also remove its corresponding ACCESS_REQUIRE_STAFF_FOR_COURSE feature
flag.
2015-12-10 20:37:39 -05:00
Michael Frey
29b6ccf5e4 Added new Course List API. 2015-11-24 15:54:03 +00:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -05:00
Nimisha Asthagiri
95fdbd981c Refactor has_access for re-usability. 2015-10-26 16:26:41 -04:00
Zia Fazal
0f637fdc95 check MILESTONES_APP when checking prerequisite courses enabled 2015-10-16 12:53:55 +05: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
Will Daly
ad9d9eb04e Support team UI for regenerating certificates
* Add new role for support staff.
* Move dashboard/support functionality into a new Django app called "support".
* Add support view for searching and regenerating certificates.
* Refactor certificates views into separate files.
2015-08-12 07:09:46 -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
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
Kyle McCormick
5b630a7704 MA-779 Make has_access work on CourseOverview objects 2015-07-08 12:05:38 -04:00
Kyle McCormick
d84c3bd7a9 MA-776 change UserCourseEnrollmentsList endpoint to use course_overviews 2015-06-22 18:33:12 -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
cewing
6a0c9aee9d MIT CCX: Use CCX Keys
Implement the use of CCX opaque keys throughout the ccx code base

include the new custom ccx id package in the github checkouts list

update the coach dashboard wrapper to get CCX information from the incoming course_id, if possible

update function signatures for all view functions to expect CCX as passed by the dashboard wrapper (default to None), remove calls to get_ccx_for_coach as the ccx is passed in.

update reverse calls in python view code to use a CCXLocator for the URL instead of a CourseLocator

use CCXLocator where necessary

use course id to find ccx, instead of thread local

remove unused method and related tests

use course id for getting ccx

provide course id to the get_current_ccx method

ensure the course id passed in is a CourseKey instance of some type whether it starts out as a string or not

use the provided block to figure out what the course_id should be, then get the ccx for that

redirect to ccx dashboard using coach ccx if no ccx is passed in

update student dashboard listing for ccx to build an appropriate url from a CCXLocator, not from the course locator.

refactor building the ccx locator so we don't have to do it repeatedly

begin test refactoring after ccx_keys introduction

Ensure that when access checking happens, the course_locator form of a ccx locator is used.  This ensures that the access check happens against the course and it is not necesarry to duplicate the entire access control structure for the course.

pick up api change in ccx-keys

create and conditionally use a wrapper for the mixed modulestore returned by xmodule.modulestore.django.modulestore

the wrapper will strip and restore ccx values from CourseKey and UsageKey objects

fix return values on a few methods

remove unused symbol

pull updated ccx-keys package

set course_id on the caching descriptor system to avoid api incompatibilities in some subsystems

use ccx.course instead of self.course

fix get method to find course keys from blocks that are not themselves keys but have a location attribute (which will be a key)

if an item coming out of the db has children, restore the ccx to them as well

if the block passed in has a CCX key, unwrap that before we try to look up the override, otherwise it will never be found.

pick up a change in the ccx keys package that allows for stripping CCX identity from a usage key

begin writing tests to cover this modulestore wrapper

remove the switch_pocs view, the url pattern for it, and the tests that covered it

remove the ccx context and the middleware responsible for setting the current CCX.  These are no longer needed

all dashboard views should raise 404 if a ccx is not provided by the coach_dashboard decorator

code quality

prevent errors resulting from trying to `get` a ccx based on non-unique criteria.

remove obsolete usage of ACTIVE_CCX_KEY

fix setUp method for grading tests to properly create grades for the ccx rather than for the course.

clean up reverse calls

code quality

adding docstrings to clarify purpose of this patch

fix bug in getting ccx for coach

fix grading views to properly fetch a ccx-ified course so that grades for that version will be calculated

fix small errors in modulestore implementation

fix errant merge marker

update call to get_current_ccx after key refactoring merged with tab changes
2015-06-12 00:01:24 -07:00
Nimisha Asthagiri
d240785b17 MA-722 Render xBlock API Support 2015-06-05 11:18:48 -04:00
Nimisha Asthagiri
a7fabd5927 Move generic mobile API view decorators. 2015-05-27 14:35:27 -04:00
christopher lee
5cef287c5d MA-635 Block Mobile Content for unfulfilled milestones
Previously, the mobile api did not check for pre-requisite courses
or entrance exams. This change checks for these milestones and then
returns course content accordingly.
2015-05-15 09:39:54 -04:00
muzaffaryousaf
f5de0bbf43 Enable unit preview by default.
TNL-1261
2015-05-06 12:40:44 +05:00
Zia Fazal
cc04bb990e Add new gating logic to restrict users from accessing courseware when an entrance exam is required
- added entrance exam check on course info
- staff can by pass gating and added tests
- refined gating logic
- changes after rebasing with Asad's branch
- check ENTRANCE_EXAMS feature is enabled
- updated test to reflect new logic
- catering anonymous user in entrance exam permission
- fixed broken tests
- change after feedback on 16/3
- fix for a broken test
- created new entrance_exams module
- fixed quality error and improved test coverage
- put get_required_content back in milestones helper
- Refactored entrance exams logic
- Refactored tabs logic
- Fixed broken unit test
- changes after feedback from dan-f on 3/27
- removed unnecessary user.is_anonymous check
- Addressed PR feedback
- Addressed commit-specific feedback
- Rework guard clauses
- Add coverage for course info case
2015-03-31 12:12:04 -04:00
John Eskew
34adb256a6 Add datadog counters everywhere a "VS[compat]" comment exists.
Conflicts:
	common/lib/xmodule/xmodule/xml_module.py
2015-03-26 16:18:15 -04:00
stv
2e1400f842 Fix Pylint: W0613(unused-argument) 2015-02-19 19:56:51 -08:00
Nimisha Asthagiri
8394fb71ac Merge pull request #6608 from edx/mobile/MA-216
MA-216 Mobile API: display unreleased courses in enrollment list.
2015-01-16 12:41:21 -05:00
Nimisha Asthagiri
a07f607281 Updated strategy per review feedback. 2015-01-15 17:15:46 -05:00
Zia Fazal
ca3d84a5d4 New pre-requisite course feature via milestones app 2015-01-15 15:17:38 -05:00
cahrens
5de170ff59 Short-circuit group_access check if only user_partitions are split_test partitions. 2015-01-15 10:33:48 -05:00
Andy Armstrong
f58e96a2fa Fix quality failures 2015-01-15 10:33:47 -05:00
Andy Armstrong
561c57dbe9 Extend preview to support cohorted courseware
TNL-651
2015-01-15 10:33:44 -05:00
jsa
6fb3daa772 support group_access. JIRA: TNL-649 2015-01-15 10:33:44 -05:00
Nimisha Asthagiri
5349b55bd0 MA-199 Course Authorization framework in mobile API. 2015-01-07 19:31:02 -05:00
stv
2ce5a6ceed Fix PEP8: E125 continuation line
does not distinguish itself from next logical line
2014-11-24 20:46:44 -05:00
Chris Dodge
3c36f7cbad Add new course_module field which describes what the catalog visibility should be (both, about, none) 2014-11-09 10:36:00 -05:00
Julia Hansbrough
6b061ad23b Response to CR 2014-09-24 21:20:49 +00:00
Julia Hansbrough
5b3c69bc87 Tests fixed 2014-09-24 17:24:42 +00:00
Usman Khalid
660cdf79c0 Added instructor persmission to _has_access_error_desc() in courseware.access.
TNL-208
2014-09-11 19:17:57 +05:00
Sarina Canelake
666f563ee6 Merge pull request #4418 from Stanford-Online/dcadams/make_registration_button_conditional
Make text on register button on About page conditional.
2014-07-15 16:37:00 -04:00
David Adams
aa1b623904 Make text on register button on About page conditional.
Added a new advanced setting; invitation_only

 If invitation_only display "Enrollment in this course is by invitation only"
 Otherwise, if outside of enrollment period display "Enrollment is Closed"

 This issue is logged at LMS-2670

 Also fixed in this PR is issue LMS-2717; even though the Register button was greyed out,
 clicking it sent one to the registration page.
2014-07-15 12:51:12 -07:00
cahrens
66173ab9e6 Add "visible_to_staff_only" field to support staff locking in Studio.
STUD-1875
2014-07-14 14:46:40 -04:00
Mat Peterson
4f6088cbd1 Fixed some isinstance errors with opaque-keys 2014-07-11 15:40:08 -04:00
Waheed Ahmed
cb2af13418 Fixed staff debug info endpoints for staff member.
LMS-2737
2014-06-02 12:26:27 +05:00
Julia Hansbrough
6ccb11f03e Change Location, CourseLocator, etc to reference opaque-keys library 2014-05-30 20:32:38 +00:00
Calen Pennington
cfcbdc0145 Move to OpaqueKey implementations from the external library
[LMS-2757]
2014-05-29 17:03:35 -04:00
Don Mitchell
6834376b8a Don't fetch the course just to find out if the user has access to it. 2014-05-09 10:12:21 -04:00
Calen Pennington
9811926d97 Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit updates lms/djangoapps/courseware.

These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).

For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.

Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>

[LMS-2370]
2014-05-06 10:08:32 -04:00
Ned Batchelder
1bd213beba Remove unused imports. 2014-02-10 14:07:50 -05:00