use xmodule
db.modulestore.find( { "_id.category" : "course" }, {'name':'1'} )
db.modulestore.remove({'_id.course': '999'})
To access it, you need to know your course locator string. This will be org/number/display_name. E.g. if my org is MITx, my course number is 999, and my course display name is "My_Foo", then it would be "MITx/999/My_Foo" It's the same as the URL that your course is accessed by. One easy way to discover the URL is to open your course in Studio, and go to the Course Setting / Schedule & Details page. Look at the URL in the Course Summary Page field.
To delete your course, you can access the delete_course command using rake like this:
`rake cms:delete_course "LOC=<locator> commit`
e.g. `rake cms:delete_course LOC=MITx/999/My_Foo commit`
To delete a course
rake cms:delete_course LOC=<University/Course_ID/Course_NAME> COMMIT=commitUnknown command: 'delete_course'Type 'django-admin help' for usage.rake aborted!
By the way, I use 'edx' as the <University> part in the command. This is the whole command:root@online:/opt/wwc/edx-platform# rake cms:delete_course LOC=edx/8390/edx-platform COMMIT=commitI used edx-configuration to install the whole edx-platform on an ec2 instance. Is the University part right ?
THEN:
My command should look like the following: rake cms:delete_course LOC=NA/T1/2014_T1 COMMIT=commit
When I run this, I get the following error (...which may be an environment issue?)
./bin/rake cms:delete_course LOC=NA/T1/2014_T1 COMMIT=commit./manage.py cms --settings dev delete_course --traceback NA/T1/2014_T1 commitTraceback (most recent call last):File "./manage.py", line 90, in <module>startup = importlib.import_module(edx_args.startup)File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module__import__(name)File "/edx/app/edxapp/edx-platform/cms/startup.py", line 4, in <module>from django.conf import settingsImportError: No module named django.confrake aborted!Command failed with status (1): [./manage.py cms --settings dev delete_cour...]/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/file_utils.rb:53:in `block in create_shell_runner'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `call'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `sh'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/file_utils_ext.rb:37:in `sh'/edx/app/edxapp/edx-platform/rakelib/django.rake:92:in `block (2 levels) in <top (required)>'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'/edx/app/edxapp/.gem/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'Tasks: TOP => cms:delete_course(See full trace by running task with --trace)
--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/34f626bd-ddc9-4c8d-9427-b955f0fa5690%40googlegroups.com.
If you're having challenges getting Open edX up and running, might I suggest a fully managed offering from my company Appsembler? Our Tahoe platform is a hosted and managed edition of Open edX with management tools for easily branding/theming your site, and creating top level pages - all without touching a server or writing any code! You can sign up for a free 30 day trial here: https://appsembler.com/tahoe/ |
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/b5b4bae1-d40c-4d63-8522-48a13d28eb5a%40googlegroups.com.