diff --git a/install.txt b/install.txt index fa82b11a5c..37a6e50986 100644 --- a/install.txt +++ b/install.txt @@ -74,5 +74,4 @@ There is also a script "create-dev-env.sh" that automates these steps. $ django-admin.py syncdb --settings=envs.dev --pythonpath=. $ django-admin.py migrate --settings=envs.dev --pythonpath=. $ django-admin.py runserver --settings=envs.dev --pythonpath=. - diff --git a/lms/djangoapps/django_comment_client/management/commands/seed_permissions_roles.py b/lms/djangoapps/django_comment_client/management/commands/seed_permissions_roles.py index 8ce0cf49d3..5987d5c677 100644 --- a/lms/djangoapps/django_comment_client/management/commands/seed_permissions_roles.py +++ b/lms/djangoapps/django_comment_client/management/commands/seed_permissions_roles.py @@ -3,13 +3,16 @@ from django_comment_client.models import Permission, Role class Command(BaseCommand): - args = '' + args = 'course_id' help = 'Seed default permisssions and roles' def handle(self, *args, **options): - administrator_role = Role.objects.get_or_create(name="Administrator", course_id="MITx/6.002x/2012_Fall")[0] - moderator_role = Role.objects.get_or_create(name="Moderator", course_id="MITx/6.002x/2012_Fall")[0] - student_role = Role.objects.get_or_create(name="Student", course_id="MITx/6.002x/2012_Fall")[0] + if len(args) != 1: + raise CommandError("The number of arguments does not match. ") + course_id = args[0] + administrator_role = Role.objects.get_or_create(name="Administrator", course_id=course_id)[0] + moderator_role = Role.objects.get_or_create(name="Moderator", course_id=course_id)[0] + student_role = Role.objects.get_or_create(name="Student", course_id=course_id)[0] for per in ["vote", "update_thread", "follow_thread", "unfollow_thread", "update_comment", "create_sub_comment", "unvote" , "create_thread", diff --git a/lms/envs/aws.py b/lms/envs/aws.py index d2d71830b0..059254bdff 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -19,6 +19,11 @@ EMAIL_BACKEND = 'django_ses.SESBackend' SESSION_ENGINE = 'django.contrib.sessions.backends.cache' DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' +# Disable askbot, enable Berkeley forums +MITX_FEATURES['ENABLE_DISCUSSION'] = False +MITX_FEATURES['ENABLE_DISCUSSION_SERVICE'] = True + + ########################### NON-SECURE ENV CONFIG ############################## # Things like server locations, ports, etc. with open(ENV_ROOT / "env.json") as env_file: @@ -60,3 +65,5 @@ XQUEUE_INTERFACE = AUTH_TOKENS['XQUEUE_INTERFACE'] if 'COURSE_ID' in ENV_TOKENS: ASKBOT_URL = "courses/{0}/discussions/".format(ENV_TOKENS['COURSE_ID']) +COMMENTS_SERVICE_URL = ENV_TOKENS["COMMENTS_SERVICE_URL"] + diff --git a/lms/lib/comment_client/settings.py b/lms/lib/comment_client/settings.py index df896204ce..f64726335f 100644 --- a/lms/lib/comment_client/settings.py +++ b/lms/lib/comment_client/settings.py @@ -1,3 +1,8 @@ -SERVICE_HOST = 'http://localhost:4567' +from django.conf import settings + +if hasattr(settings, "COMMENTS_SERVICE_URL"): + SERVICE_HOST = settings.COMMENTS_SERVICE_URL +else: + SERVICE_HOST = 'http://localhost:4567' PREFIX = SERVICE_HOST + '/api/v1' diff --git a/lms/templates/discussion/user_profile.html b/lms/templates/discussion/user_profile.html index 3825879c3b..c4d0d85607 100644 --- a/lms/templates/discussion/user_profile.html +++ b/lms/templates/discussion/user_profile.html @@ -14,7 +14,7 @@ <%include file="_js_dependencies.html" /> -<%include file="../course_navigation.html" args="active_page='discussion'" /> +<%include file="/courseware/course_navigation.html" args="active_page='discussion'" />
diff --git a/lms/templates/news.html b/lms/templates/news.html index 63724759a5..2c37975e2a 100644 --- a/lms/templates/news.html +++ b/lms/templates/news.html @@ -10,7 +10,7 @@ <%block name="js_extra"> -<%include file="course_navigation.html" args="active_page='news'" /> +<%include file="/courseware/course_navigation.html" args="active_page='news'" />