Commit Graph

1898 Commits

Author SHA1 Message Date
Diana Huang
c8fdf6ad29 Add in tests for the marketing site button. 2013-08-15 16:34:48 -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
Peter Fogg
e20acee4c4 Working on Videoalpha test fix.
Fixed all common and LMS tests.

The tests were failing because XMLDescriptor adds in some attributes
to _model_data, such as `xml_attributes`, that aren't necessary. The
solution is to handle all XML parsing in VideoDescriptor. There's
still one test failing in CMS, which has to do with metadata being
saved. I'm still working out how to update it in such a way that it
doesn't fail, but still tests something meaningful.
2013-08-12 14:32:15 +03:00
Vasyl Nakvasiuk
b33b5c7bd4 Python: videoalpha -> video. 2013-08-12 14:31:48 +03:00
Vasyl Nakvasiuk
28b0ba5e10 Migrate video tests to videoalpha tests, remove video tests. 2013-08-12 14:31:47 +03:00
Peter Fogg
9c84440501 PR comment cleanup. 2013-08-06 13:23:33 -04:00
Peter Fogg
08c5f955aa Unstyled prototype for new list editor design. 2013-08-06 13:23:33 -04:00
Peter Fogg
f317244ac4 Convert Video Alpha to metadata-only. 2013-08-06 13:23:33 -04:00
polesye
042b7d5f60 Merge pull request #428 from edx/valera/video_alpha2_refactor
Valera/video alpha2 refactor
2013-08-02 01:04:13 -07:00
brianhw
a628b62d1e Merge pull request #511 from edx/feature/brian/audit-log
Use audit logger for logging of logins in external_auth...
2013-08-01 14:08:08 -07:00
Valera Rozuvan
52fa6591c2 Corrected all isues found during refactoring #2.
Added missing file.~
Undid a mistake.
Copied Python tests from video_alpha1.
moves TestLogic to __init__.py
reorginizes xmodule logic tests
adds docstrings for poll tests
adds docstring for word cloud and conditional tests
adds docstrings for video alpha tests
adds videoalphafactory for tests, not finished
adds imports
Bug fixing.
fix video/videoalpha tests
Updated lettuce test. Now it is aware of the fact that Video and Video Alpha players have different base CSS classes.
Removed REFACTOR comments.
Turn off autoplay for Video Alpha in Studio.
Carry over fix for bug where in Firefox changing to speed 1.0 has no effect.
Carry over JavaScript Jasmine tests from jmclaus/videoalpha2_js branch.
Exporting state object from main function of Video Alpha.
More stuff from jmclaus/videoalpha2_js branch.
Specs in html5_video.js all pass except ten of them. Cleaned code a bit and moved it out of display_spec.js
One more spec passes
Fixed remaning tests in spec/../html5_video.js test suite. Removed test video files.
Added JavaScript Jasmine tests for main of Video Alpha 2.
adds test for volume control and updates helper file for videoalpha
2013-08-01 20:08:45 +03:00
Calen Pennington
0d3c44996a LMS i18n from Tsinghua 2013-07-31 19:39:15 -04:00
Brian Wilson
635d36fcf9 Add audit log definition, and use for logging of logins in external_auth and student apps. Move test_login to student app. Improve conditional tests for Shibboleth login logic. (Does not include reconfiguring log settings.) 2013-07-31 13:32:21 -04:00
Calen Pennington
b64aa813c8 Make render_template mocking clearer 2013-07-31 12:19:33 -04:00
Calen Pennington
99f9894f1c Switch LMS over to using XBlock rendering commands
This makes the LMS use an XBlock's student_view, rather than an
XModule's get_html to render for display. However, it does not yet use
wrap_child to handle instructor debug information or url rewriting.

[LMS-219]
2013-07-31 09:22:10 -04:00
Adam Palay
2efcb0cdca Change default names for various LMS components
Embedded discussion component defaults to "Discussion"
Blank HTML page defaults to "Text"
Video component defaults to "Video"

These default names show up in tooltips.
2013-07-25 10:38:47 -04:00
Calen Pennington
76055aa211 Add a manage.py command that understands the extra edX options 2013-07-24 09:04:12 -04:00
Diana Huang
86ee2bca7a Merge branch 'release'
Conflicts:
	lms/djangoapps/courseware/tests/test_views.py
2013-07-23 17:57:07 -04:00
Diana Huang
2926c94330 Prevent XSS attack via submission_history page.
Conflicts:
	lms/djangoapps/courseware/tests/test_views.py
2013-07-23 17:23:59 -04:00
Chris Dodge
c5ef8dc526 add line break between arguments 2013-07-23 12:15:56 -04:00
Chris Dodge
f78e3a221b fix fat finger string formatting 2013-07-23 12:15:56 -04:00
Chris Dodge
345d2af540 address review feedback 2013-07-23 12:15:56 -04:00
Chris Dodge
e24eb3e4eb added explicit unit test to verify the link rewriting 2013-07-23 12:15:55 -04:00
Chris Dodge
63c5cfda94 add comment and fix mistake in test 2013-07-23 12:10:49 -04:00
Chris Dodge
1c79b9c874 add a /jump_to_id/ shortcut for producing more durable links between courseware in Studio 2013-07-23 12:10:49 -04:00
chrisndodge
8c94be8083 Merge pull request #436 from edx/fix/cdodge/stop-using-unmunged-urlnames-as-display-names
change from_xml class method on video class to make sure we honor the fa...
2013-07-23 08:33:27 -07:00
Alexander Kryklia
1eaba8b0b4 Merge pull request #41 from edx/alex/word_cloud_course_factory
Word cloud tests
2013-07-23 04:47:38 -07:00
Chris Dodge
22802a4d29 change from_xml class method on video class to make sure we honor the fact that the xml string could actually be a pointer to another file on disk which actually contains the attributes 2013-07-19 13:54:22 -04:00
Joe Blaylock
50c906732f Chat rebase, test update
Rebase on today's master and update to unit test to include settings
where needed.
2013-07-18 15:00:54 -07:00
Nate Hardison
f4ae0e0cae Test generation of chat settings
Ensure that the chat connection settings are generated properly for
the template context.
2013-07-18 15:00:54 -07: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
Sarina Canelake
f0c9aa3916 Provide set_many methods for Lms and Mongo KeyValueStores
Refactor new set_many and update XBlock version number.
2013-07-18 15:30:13 -04:00
Adam Palay
dfa435012b notify students for NotFoundErrors from capa_module, improve error logging 2013-07-17 11:03:47 -04:00
Alexander Kryklia
813c22d138 Adds integration tests for word_cloud module 2013-07-17 14:57:32 +03:00
Don Mitchell
be4fbc562e Refactor tests to no longer use templates
Add boilerplate option to ItemFactory
Minor start date fix to not use microsecs
2013-07-16 16:00:28 -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
Don Mitchell
ef8618f7ad Make DraftModuleStore mongo only
DraftModuleStore was originally designed as a mixin, but never used that
way, and with the upcoming changes to use the versioned module store,
never will be. This changes removes a circular dependency between
mongo.py and draft.py.
2013-07-16 08:55:26 -04:00
JonahStanley
676da2d592 Removed set trace 2013-07-11 10:12:10 -04:00
JonahStanley
7fb5f505d6 Refactored out full from the lms tests 2013-07-11 10:12:06 -04:00
ihoover
5a03d93000 refactor login and enrollment test cases to use the mongo modulestore
added namee to authors file
2013-07-10 10:34:14 -04:00
Ned Batchelder
31a72093e0 Fix broken tests by simplifying the CourseFactory
The data argument was being treated specially, but that was just
because we didn't have **kwargs support.  Now we do.  There are
two uses of data=, one we convert to kwargs, the other was actually
unused, so remove it completely.
2013-07-03 17:04:18 -04:00
Jean Manuel Nater
5cb4c1a750 Removed some pep8 violations. 2013-07-01 17:07:24 -04:00
Jean Manuel Nater
72b4561e3a Moved xml_store_config, mongo_store_config, and draft_mongo_store_config to xmodule/modulestore/tests/django_util.py
Removed some repeated instances of xml_store_config.
Reverted some changes to mongo_store_config so each modulestore gets it's own uuid.
2013-07-01 14:45:53 -04:00
Valera Rozuvan
97d7421432 Fix for bug Blades/BLD-152. Added test for bugfix. Optimized bug fix. 2013-06-28 13:52:04 +03:00
Jean Manuel Nater
3e0f933a73 Formatted a docstring. 2013-06-27 16:40:04 -04:00
Jean Manuel Nater
3c67e2754a Merge branch 'master' into jnater/courseware_tests
Conflicts:
	lms/djangoapps/courseware/tests/tests.py
	lms/djangoapps/instructor/tests/test_enrollment.py
2013-06-27 13:53:47 -04:00
Sarina Canelake
02a24716c6 Merge pull request #278 from edx/sarina/fix-modulestore-500s
Catch InvalidLocationError
2013-06-27 08:33:45 -07:00
Jean Manuel Nater
7f017d0ca9 Addressed pull request feedback 2013-06-26 17:19:13 -04:00
Sarina Canelake
f7d6d14946 Catch InvalidLocationError 2013-06-26 15:24:48 -04:00
Don Mitchell
b42fe277d4 Add serial commas to modulestore definitions 2013-06-25 22:34:36 -04:00