sudo
-u www-data
/edx/app/edxapp/venvs/edxapp/bin/python
/edx/app/edxapp/edx-platform/manage
.py lms --settings aws help
sudo
/edx/bin/supervisorctl
restart edxapp:
以前的版本使用:
sudo
/edx/bin/supervisorctl
-c
/edx/etc/supervisord
.conf edxapp:
sudo
/edx/bin/supervisorctl
status
sudo
-u www-data
/edx/bin/python
.edxapp .
/manage
.py lms --settings aws create_user -s -p edx -e [email protected]
sudo
-u www-data
/edx/bin/python
.edxapp .
/manage
.py lms --settings aws changepassword user
sudo
-u www-data
/edx/bin/python
.edxapp .
/manage
.py lms --settings aws shell
from django.contrib.auth.models
import
User
me = User.objects.get(username=
"user"
)
me.is_superuser = True
me.is_staff = True
me.save()
cd
/edx/app/edxapp/edx-platform
sudo
-u www-data
/edx/bin/python
.edxapp .
/manage
.py lms runserver 8000 --settings aws
ip:8000可访问
sudo
su
edxapp -s
/bin/bash
cd
~
source
edxapp_env
python
/edx/app/edxapp/edx-platform/manage
.py lms
/cms
syncdb --migrate --settings=aws
(lms
/cms
二选一)
sudo
-H -u edxapp
bash
source
/edx/app/edxapp/edxapp_env
cd
/edx/app/edxapp/edx-platform
paver update_assets lms --settings aws
编译cms只要将lms改成cms既可。
cd
/var/tmp
git clone https:
//github
.com
/edx/edx-demo-course
.git
cd
/edx/app/edxapp/edx-platform
sudo
-u www-data
/edx/bin/python
.edxapp .
/manage
.py cms --settings=aws
import
/edx/var/edxapp/data
/var/tmp/edx-demo-course
sudo
-u www-data
/edx/bin/python
.edxapp .
/manage
.py cms --settings=aws delete_course course-v1:Organization+CourseNumber+CourseRun commit
course-v1:Organization+CourseNumber+CourseRun为课程
以前的版本使用:
sudo
-u www-data
/edx/bin/python
.edxapp .
/manage
.py cms --settings=aws delete_course Organization
/CourseNumber/CourseRun
commit
如果删除失败可从数据库删除:
#列出所有课程
mongo
use edxapp
db.modulestore.
find
( {
"_id.category"
:
"course"
}, {
'name'
:
'1'
} )
#删除课程代码为999的课程
db.modulestore.remove({
'_id.course'
:
'999'
})
sudo
-u www-data
/edx/bin/python
.edxapp .
/manage
.py lms --settings aws shell
from django.contrib.auth.models
import
User
u.delete()
或者
sudo
su
edxapp -s
/bin/bash
cd
~
source
edxapp_env
from django.contrib.auth.models
import
User
u.delete()