Commit Graph

22 Commits

Author SHA1 Message Date
David Baumgold
4152f5e4e8 Address pylint issue from diff-cover 2014-12-11 13:09:23 -05:00
David Baumgold
36e77c7463 Fixing pep8 issues 2014-12-11 13:04:49 -05:00
stv
829be1e9cb Fix PEP8: E502 the backslash is redundant
between brackets
2014-11-25 10:16:04 -05:00
stv
0d2754d8d1 Fix PEP8: E502 the backslash is redundant
between brackets
2014-11-24 20:48:05 -05:00
stv
cf9308144d Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-10 11:00:11 -08:00
jsa
526d4b1d49 forums: fix assign_default_role to use the correct constant. 2014-06-10 12:26:21 -04:00
Calen Pennington
cfcbdc0145 Move to OpaqueKey implementations from the external library
[LMS-2757]
2014-05-29 17:03:35 -04:00
Calen Pennington
4af2249a9d Remove dead code 2014-05-21 14:28:04 -04:00
Calen Pennington
e2bfcf2a36 Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit updates common/djangoapps.

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-07 12:54:49 -04:00
zubiar-arbi
cf47b6b670 assign default forum role 'Student' to user on course recreate with same name STUD-1140
STUD-1140
2014-02-26 15:40:44 +05:00
jsa
dfa4a03daa i18n: externalize strings in discussion forums templates and python code.
JIRA: FOR-398, FOR-399
2014-01-15 14:26:22 -05:00
Greg Price
88610cb8fb Change forum role granted to staff on enrollment
This applies to global staff (is_staff=True), not course staff.
Previously, staff were granted the Moderator role but not the Student
role upon enrolling in a course. If the Moderator role were later
revoked, then the user would have no role and be unable to post in the
forums, which is confusing for the user. edX staff indicated they would
prefer to not automatically receive the Moderator role, so the Student
role is granted instead. Note that staff will still be able to grant
themselves Moderator privileges through the instructor dashboard if
they wish.

JIRA: FOR-338
2013-12-05 12:54:12 -05:00
Chris Dodge
481cbfd8a5 consolidate delete role logic 2013-09-12 15:57:13 -04:00
Chris Dodge
bd69db4410 switch to using get() rather than get_or_create(). Also add a test case with a different casing on the courseId 2013-09-12 14:27:57 -04:00
Chris Dodge
41be20a000 define a unseeding forums permissions and call into it from delete_course
define a unseeding forums permissions and call into it from delete_course

define a unseeding forums permissions and call into it from delete_course
2013-09-12 14:27:57 -04:00
David Ormsbee
3ce87583ab Shift enroll/unenroll logic to CourseEnrollment model, add is_active and mode.
Features coming down the pipe will want to be able to:
* Refer to enrollments before they are actually activated (approval step).
* See what courses a user used to be enrolled in for when they re-enroll in
  the same course, or a different run of that course.
* Have different "modes" of enrolling in a course, representing things like
  honor certificate enrollment, auditing (no certs), etc.

This change adds an is_active flag and mode (with default being "honor").
The commit is only as large as it is because many parts of the codebase were
manipulating enrollments by adding and removing CourseEnrollment objects
directly. It was necessary to create classmethods on CourseEnrollment to
encapsulate this functionality and then port everything over to using them.

The migration to add columns has been tested on a prod replica, and seems to be
fine for running on a live system with single digit millions of rows of
enrollments.
2013-08-14 13:23:06 -04:00
Chris Dodge
470569545d add a migrations to the new django_comment_common to keep things a bit more consistent with our normal useage. 2013-05-22 13:32:32 -04:00
Chris Dodge
d39d44ba49 keep migrations in djangoapp_comment_client 2013-05-10 12:58:00 -04:00
Chris Dodge
3c747f0e6e consolidate the list of permissions 2013-05-07 11:53:02 -04:00
Chris Dodge
81ecf0c5df add unit test to verify forum seeding occurs when creating new courses 2013-05-07 11:18:15 -04:00
Chris Dodge
ae9d13b53a update comment models.py to not have the dependency on get_course_by_id (which is in LMS). Also explicitly set the db_table name because django auto generates table prefixes according to the djangoapp name 2013-05-06 16:04:25 -04:00
Chris Dodge
57eca325d2 move some files from lms/djangoapps/django_comment_client to common/djangoapps/django_comment_common 2013-05-06 15:59:35 -04:00