Commit Graph

46 Commits

Author SHA1 Message Date
Andy Armstrong
a815003b3b Handle anonymous and unenrolled users on the new course home page
LEARNER-1696
2017-07-10 17:52:28 -04:00
Nimisha Asthagiri
15d9883f76 Create core/url_utils.py, moving utilities from lms_xblock/runtime 2016-10-06 21:59:11 -04:00
Nimisha Asthagiri
fb120426e0 Fix Typos 2016-06-23 20:22:32 -04:00
Usman Khalid
6cb62f2697 Rebase upgrade Django to v1.8.5
Please note that this is a squshed commit and the work of:
Symbolist, macdiesel, nedbat, doctoryes, muzaffaryousaf and muhammad-ammar
2015-11-10 15:00:19 -05:00
stv
f03b943b95 Fix Pylint: W0612(unused-variable) 2015-03-13 20:20:05 -07:00
Calen Pennington
b353ed2ea2 Better support specifying of modulestore configuration in test cases
The existing pattern of using `override_settings(MODULESTORE=...)` prevented
us from having more than one layer of subclassing in modulestore tests.

In a structure like:

    @override_settings(MODULESTORE=store_a)
    class BaseTestCase(ModuleStoreTestCase):
        def setUp(self):
            # use store

    @override_settings(MODULESTORE=store_b)
    class ChildTestCase(BaseTestCase):
        def setUp(self):
            # use store

In this case, the store actions performed in `BaseTestCase` on behalf of
`ChildTestCase` would still use `store_a`, even though the `ChildTestCase`
had specified to use `store_b`. This is because the `override_settings`
decorator would be the innermost wrapper around the `BaseTestCase.setUp` method,
no matter what `ChildTestCase` does.

To remedy this, we move the call to `override_settings` into the
`ModuleStoreTestCase.setUp` method, and use a cleanup to remove the override.
Subclasses can just defined the `MODULESTORE` class attribute to specify which
modulestore to use _for the entire `setUp` chain_.

[PLAT-419]
2015-02-04 09:09:14 -05:00
Brian Wilson
2faff29a21 Fix PureSystem so that runtime.publish() works for a pure XBlock.
Fix extracted from https://github.com/edx/edx-platform/pull/6035.
2014-12-19 09:00:32 -05:00
Calen Pennington
980f30c17f Move lms.lib.xblock into lms.djangoapps.lms_xblock in preparation add database backed configuration to it 2014-12-12 21:45:21 -05:00
Jesse Zoldak
bf3b87bc64 Clean up all modulestore testcases
Move modulestore config for tests to an importable location
Disable pylnt warning for lms imports in common tests
Refactor all testcases that loaded all xml courses
TE-610
TE-489
2014-12-02 07:09:36 -05:00
muhammad-ammar
fcaa783e43 Unit Test Improvements
TE-489
2014-10-31 11:55:13 +00:00
Nimisha Asthagiri
ea32529866 Fix all modulestore calls to pass in user ids. 2014-07-09 21:10:12 -04:00
Julia Hansbrough
6ccb11f03e Change Location, CourseLocator, etc to reference opaque-keys library 2014-05-30 20:32:38 +00: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
Alexander Kryklia
25407ef3e7 BLD-642: Allow multiple transcripts with video. 2014-02-24 21:57:08 +02:00
polesye
4a36fa892b BLD-368: Turn "download transcript" into a dropdown. 2014-01-22 18:25:03 +02:00
David Baumgold
8eff442752 mitxmako => edxmako 2013-12-03 14:15:09 -05:00
cahrens
705ccd01bc An empty category will result in InvalidLocationErrors. 2013-11-19 13:41:44 -05:00
Calen Pennington
864d831ce3 Use XBlock handlers for handle_ajax in XModules
Adds xblock handler_url support to the LMS, and makes handle_ajax use
that code.

[LMS-230] [LMS-229]
2013-11-08 11:08:48 -05:00
Calen Pennington
da26ae2529 Remove lms/lib from sys.path in favore of using it as the module lms.lib 2013-11-08 11:08:48 -05:00
Calen Pennington
c3d25e1e61 Prevent unbounded nesting of lms field_datas
Previously, whenever a XModule was created from a XDescriptor, we
created another level of nesting of FieldData objects. This change
prevents that nesting.

[TKTS-393]
2013-10-25 12:21:05 -04:00
Calen Pennington
6b474724ac Make XModuleDescriptor and XModule act as a single class
By transparently proxying between the XModuleDescriptor and the XModule,
and between their runtimes, we can make them act as a single class, so
that we can swap in an actual XBlock instead.
2013-10-08 15:29:17 -04:00
Calen Pennington
230bf0c643 Switch get_html replacement out for using wrap_child 2013-10-03 14:28:19 -04:00
Calen Pennington
9643fd463f Rename xblock_field_data to xmodule_field_data 2013-09-18 10:49:41 -04:00
Valera Rozuvan
d02ef8bc12 Add Learning Tools Interoperability (LTI) blade.
LTI blade allows to include LTI components to courses.
Python integration, Jasmine and acceptance tests are included.
2013-09-09 23:54:49 +03:00
Alexander Kryklia
719ec8f9d8 Revert "Merge pull request #804 from edx/valera/lti_module"
This reverts commit 2894b21c32, reversing
changes made to 34d0fe1554.
2013-09-09 22:51:57 +03:00
Alexander Kryklia
ab3cde8a4d Fix 2013-09-09 19:16:14 +03:00
Alexander Kryklia
e10577d6ad Pass user_id and course_id to runtime in cms (dev) and tests. 2013-09-09 19:16:14 +03:00
Calen Pennington
8201b1412e Use XBlock 0.3 2013-09-06 09:45:59 -04:00
Calen Pennington
407b02b358 Centralize startup code, and execute in all contexts
Inspired by: http://eldarion.com/blog/2013/02/14/entry-point-hook-django-projects/
Moves startup code to lms.startup and cms.startup, and calls the startup
methods in wsgi.py and manage.py for both projects.
2013-08-27 12:12:20 -04:00
Will Daly
48c6daacb8 Removed unnecessary settings wrangling from ModuleStoreTestCase.
Modified navigation tests to use MixedModulestore
Updated factories to find editable modulestore

Updated test_submitting_problems

Updated test_tabs.py

Updated test_view_authentication

Updated test_views

Updated courseware/tests/tests.py

Updated test_masquerade

Updated test_module_render

Pylint fixes

Updated video and word cloud tests

Updated course wiki tests

Updated license and open_ended tests.
One open_ended test still failing due to Mako initialization issues

Updated staticbook

Updated django_comment_client tests

Updated instructor tests

Updated instructor task tests

Updated external_auth tests

Updated course_groups
2013-08-21 09:36:45 -04:00
Chris Dodge
61219169d4 change over the modulestore configuration to be a dict and use a property accessor. Also update some django-admin configs to use this means to set the runtime configuration 2013-08-15 22:58:04 -04:00
Peter Fogg
f317244ac4 Convert Video Alpha to metadata-only. 2013-08-06 13:23:33 -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
Alexander Kryklia
813c22d138 Adds integration tests for word_cloud module 2013-07-17 14:57:32 +03: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
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
lapentab
b9ca9a84d7 Merge branch 'master' into blapenta/fix-test-coverage
Conflicts:
	AUTHORS
	common/lib/xmodule/xmodule/tests/test_annotatable_module.py
	common/lib/xmodule/xmodule/tests/test_capa_module.py
	common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
	common/lib/xmodule/xmodule/tests/test_conditional.py
	common/lib/xmodule/xmodule/tests/test_html_module.py
	common/lib/xmodule/xmodule/tests/test_progress.py
	common/lib/xmodule/xmodule/tests/test_xml_module.py
	lms/djangoapps/courseware/tests/__init__.py
2013-06-18 13:41:53 -04:00
lapentab
b93f00e02f Rename system_test to get_test_system 2013-06-18 11:37:24 -04:00
Vasyl Nakvasiuk
80f38b8f3c python tests for videoalpha 2013-06-18 16:30:14 +03:00
Calen Pennington
82606a062c Make XModuleDescriptor use __init__ from XBlock
Fixes JIRA LMS-203
2013-06-17 13:38:57 -04:00
Bethany LaPenta
85f1386918 Fixed test_system looking like a test to nosetests, also fixed a class in test_error_module.py that had one class inheriting from another 2013-06-13 14:30:07 -04:00
Vasyl Nakvasiuk
d0e3f99e77 BaseTestXmodule: create module on the fly 2013-06-06 16:46:47 +03:00
Vasyl Nakvasiuk
b25710346f add python video tests 2013-06-06 16:46:28 +03:00
Calen Pennington
cfae1cdf62 Pep8 autofixes 2013-02-06 11:13:50 -05:00
Victor Shnayder
73b3826820 Initial integration tests!
* new env file to run integration tests with mongo backend
  - needs askbot to get db in the right state
  - needs wiki to load pages successfully
  - not using migrations to make it run faster
* import test courses, check that each page loads without erroring.
* fix NonePointerException in index view to make tests pass
* misc formatting cleanups
2012-07-27 16:09:25 -04:00