Commit Graph

78 Commits

Author SHA1 Message Date
Don Mitchell
7f91ce40ae Restful api for course advanced settings
STUD-948
2013-11-26 10:17:52 -05:00
Don Mitchell
17864353a5 Restful course settings
STUD-946
STUD-947
2013-11-22 10:55:35 -05:00
cahrens
a170c6f4e7 Change save_item and create_item to RESTful URL.
Part of STUD-847.
2013-11-14 11:03:31 -05:00
Don Mitchell
99e7daf796 RESTful refactoring for course_info updates and handouts.
html page and update access use 2 different urls
GET update can get an individual update
STUD-944
2013-11-13 13:16:41 -05:00
Don Mitchell
f41816637e RESTful refactoring of /course access continued
Move index access into the url
Move course creation into the url
Add helper methods for testing to serialize json data and set accept header.
2013-10-30 13:28:22 -04:00
Don Mitchell
45453fae61 Change expect_json to put parsed json in new attr 2013-10-29 16:13:58 -04:00
cahrens
39a8d07e47 Update URLs for assets. 2013-10-24 16:00:56 -04:00
Christina Roberts
286ae9e73d Merge pull request #1470 from edx/christina/cleanup-course-index
Get rid of course_index shim.
2013-10-24 09:22:36 -07:00
cahrens
12488db015 Get rid of course_index shim. 2013-10-24 11:35:02 -04:00
Don Mitchell
3a6a9ee009 tighten case-insensitive test to require full string match 2013-10-24 11:24:37 -04:00
Don Mitchell
277f327690 Require course ids to be case-insensitively unique 2013-10-23 15:47:07 -04:00
Don Mitchell
8902a89fbc Have urls.py fully parse locator url 2013-10-22 10:44:03 -04:00
Don Mitchell
4f60a30afc Remove as_old_location methods
They were incorrect if there were periods in the org or name.
2013-10-21 17:17:20 -04:00
Don Mitchell
010905eb99 RESTful api for getting course listing and opening course in studio.
Pattern for how to do refactoring from locations to locators and from
old style urls to restful ones.
2013-10-16 16:54:31 -04:00
Adam Palay
300f7f13a6 fix pep8 and pylint errors
Conflicts:
	cms/djangoapps/contentstore/views/course.py
	common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
	lms/envs/common.py
2013-09-03 14:55:11 -04:00
cahrens
a061c7ece7 Rewriting of links for Course Updates and Course Handouts.
STUD-669.
2013-08-29 14:35:16 -04:00
Peter Fogg
e4302e62d2 Allow course image uploads in the settings page.
Authors can upload an image (or choose an existing one) from the
settings page, using the in-context uploader from PDF
textbooks. Includes tests for backwards compatibility with XML courses
-- they used a magic filename (images/course_image.jpg) which is
mapped to a location in the Mongo contentstore.

Still needs some UX work, though the backend plumbing is there.
2013-08-21 09:42:00 -04:00
Julian Arni
80619da429 Review fixes 2013-08-15 10:24:38 -04:00
Julian Arni
3ed4198204 Contentstore views pylint fixes 2013-08-14 19:10:00 -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
cahrens
3732d418c9 Add helper methods to hide internals of how users are enrolled in courses.
Remove _

Minor cleanup.
2013-08-06 09:36:39 -04:00
cahrens
a227b14fdd Auto-enroll course staff to fix "View Live".
STUD-554

Code review feedback.
2013-08-05 15:00:37 -04:00
Chris Dodge
beda411e28 improve error message regarding uniqueness 2013-07-30 17:29:02 -04:00
Chris Dodge
d005323ace update error message to be more specific to what the user needs to fix 2013-07-30 17:25:47 -04:00
Chris Dodge
f29819ca4a add some field specific error messages regarding uniqueness 2013-07-30 17:24:44 -04:00
Chris Dodge
1cd70ee386 fix some error messages and also make localizable strings 2013-07-30 17:24:43 -04:00
Chris Dodge
60f03f5dcc fixing tests 2013-07-30 17:24:43 -04:00
Chris Dodge
e23b693d90 put a 4th field in the create new course form where the user must specify a course_run. Also update unit tests to also provide this 4th parameter. Styling changes to better lay out the form fields are still TBD. 2013-07-30 17:20:09 -04:00
Don Mitchell
541c98a3af POST requests were claiming request.method == 'PUT'
So, changed handlers to look for either value.
2013-07-19 11:14:01 -04:00
Diana Huang
3f9431e8cf Provide implicit saves for XBlocks and XModules.
Update existing tests and provide new ones to test new paradigm.
2013-07-18 16:37:34 -04:00
Calen Pennington
f6b7b2678d Set about page default content from overview.yml template 2013-07-16 14:33:59 -04:00
Don Mitchell
3722685e1a No longer persist XModule templates
Instead, we use XModule field default values when creating an empty
XModule. Driven by this use case, we also allow for XModules to be
created in memory without being persisted to the database at all. This
necessitates a change to the Modulestore api, replacing clone_item with
create_draft and save_xmodule.
2013-07-16 14:33:58 -04:00
David Baumgold
628dff5398 pylint fixing 2013-07-09 19:16:43 -04:00
David Baumgold
7506562f50 Another lettuce test, and fixes to make it work 2013-07-09 19:16:11 -04:00
David Baumgold
e1ed5c3d2d docstrings 2013-07-09 19:16:10 -04:00
David Baumgold
2a92a14054 Wrote simple lettuce tests for pdf textbooks 2013-07-09 19:16:09 -04:00
David Baumgold
4bc109708f Use django-method-override module
Replacing the get_request_method function everywhere
2013-07-09 19:16:09 -04:00
David Baumgold
bc3a67ec89 Fix reference error 2013-07-09 19:16:09 -04:00
David Baumgold
ef81556cc5 Use JsonResponse when it makes sense 2013-07-09 19:16:08 -04:00
David Baumgold
090d0d4464 Fix up unit tests 2013-07-09 19:16:08 -04:00
David Baumgold
77ae9a6a78 PDF Textbooks: fetch/save individual textbooks
Created a few RESTful API endpoints, which required creating and assigning
arbitrary IDs to PDF textbooks. Changed the Backbone views to save individual
models, instead of saving a whole collection.
2013-07-09 19:16:07 -04:00
David Baumgold
27e895393c Added generic JsonResponse class
Based on http://djangosnippets.org/snippets/154/
2013-07-09 19:16:07 -04:00
David Baumgold
404c36b8f4 PDF textbooks: namespace JS variables for URLs 2013-07-09 19:16:07 -04:00
David Baumgold
05cb13b171 Adding and fixing tests 2013-07-09 19:16:04 -04:00
David Baumgold
8934cf35ba Add pdf_textbooks tab when textbooks are created 2013-07-09 19:16:04 -04:00
David Baumgold
0d415d814b Remove unused imports 2013-07-09 19:16:03 -04:00
David Baumgold
4509dc03b0 Pull and save pdf textbook information to/from the correct modulestore 2013-07-09 19:16:02 -04:00
David Baumgold
6a3360cefa Full front-end/back-end connection via Backbone.sync. No data validation whatsoever. 2013-07-09 19:16:02 -04:00
David Baumgold
00b885deaa Update pdf textbooks backend to respond to AJAX requests with JSON 2013-07-09 19:16:01 -04:00
David Baumgold
e607bc70ad Pull assets into Mako template for PDF textbooks 2013-07-09 19:16:01 -04:00