Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit adds the non-courseware lms/djangoapps and lms/lib. 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]
This commit is contained in:
@@ -29,23 +29,23 @@ def make_populated_course(step): # pylint: disable=unused-argument
|
||||
number='888',
|
||||
display_name='Bulk Email Test Course'
|
||||
)
|
||||
world.bulk_email_course_id = 'edx/888/Bulk_Email_Test_Course'
|
||||
world.bulk_email_course_id = course.id
|
||||
|
||||
try:
|
||||
# See if we've defined the instructor & staff user yet
|
||||
world.bulk_email_instructor
|
||||
except AttributeError:
|
||||
# Make & register an instructor for the course
|
||||
world.bulk_email_instructor = InstructorFactory(course=course.location)
|
||||
world.bulk_email_instructor = InstructorFactory(course=world.bulk_email_course_id)
|
||||
world.enroll_user(world.bulk_email_instructor, world.bulk_email_course_id)
|
||||
|
||||
# Make & register a staff member
|
||||
world.bulk_email_staff = StaffFactory(course=course.location)
|
||||
world.bulk_email_staff = StaffFactory(course=course.id)
|
||||
world.enroll_user(world.bulk_email_staff, world.bulk_email_course_id)
|
||||
|
||||
# Make & register a student
|
||||
world.register_by_course_id(
|
||||
'edx/888/Bulk_Email_Test_Course',
|
||||
world.register_by_course_key(
|
||||
course.id,
|
||||
username='student',
|
||||
password='test',
|
||||
is_staff=False
|
||||
|
||||
@@ -43,12 +43,12 @@ def i_am_staff_or_instructor(step, role): # pylint: disable=unused-argument
|
||||
display_name='Test Course'
|
||||
)
|
||||
|
||||
world.course_id = 'edx/999/Test_Course'
|
||||
world.course_id = course.id
|
||||
world.role = 'instructor'
|
||||
# Log in as the an instructor or staff for the course
|
||||
if role == 'instructor':
|
||||
# Make & register an instructor for the course
|
||||
world.instructor = InstructorFactory(course=course.location)
|
||||
world.instructor = InstructorFactory(course=world.course_id)
|
||||
world.enroll_user(world.instructor, world.course_id)
|
||||
|
||||
world.log_in(
|
||||
@@ -61,7 +61,7 @@ def i_am_staff_or_instructor(step, role): # pylint: disable=unused-argument
|
||||
else:
|
||||
world.role = 'staff'
|
||||
# Make & register a staff member
|
||||
world.staff = StaffFactory(course=course.location)
|
||||
world.staff = StaffFactory(course=world.course_id)
|
||||
world.enroll_user(world.staff, world.course_id)
|
||||
|
||||
world.log_in(
|
||||
|
||||
Reference in New Issue
Block a user