@@ -58,6 +58,32 @@ In the discussion service, notifications are handled asynchronously using a thir
...
@@ -58,6 +58,32 @@ In the discussion service, notifications are handled asynchronously using a thir
bundle exec rake jobs:work
bundle exec rake jobs:work
## Initialize roles and permissions
To fully test the discussion forum, you might want to act as a moderator or an administrator. Currently, moderators can manage everything in the forum, and administrator can manage everything plus assigning and revoking moderator status of other users.
First make sure that the database is up-to-date:
rake django-admin[syncdb]
rake django-admin[migrate]
For convenience, add the following environment variables to the terminal (assuming that you're using configuration set lms.envs.dev):
export DJANGO_SETTINGS_MODULE=lms.envs.dev
export PYTHONPATH=.
Now initialzie roles and permissions:
django-admin.py seed_permissions_roles
To assign yourself as a moderator, use the following command (assuming your username is "test", and the course id is "MITx/6.002x/2012_Fall"):
django-admin.py assign_role test Moderator "MITx/6.002x/2012_Fall"
To assign yourself as an administrator, use the following command
django-admin.py assign_role test Administrator "MITx/6.002x/2012_Fall"
## Some other useful commands
## Some other useful commands
### generate seeds for a specific forum
### generate seeds for a specific forum
...
@@ -104,9 +130,9 @@ We also have a command for generating comments within a forum with the specified
...
@@ -104,9 +130,9 @@ We also have a command for generating comments within a forum with the specified
For instance, if you want to generate comments for the general discussion, for which the discussion id is the course id with slashes and dots replaced by underscores (you **should** do this before testing forum view) and you are in 6.002x, use the following command
For instance, if you want to generate comments for a new discussion tab named "lab_3", then use the following command