Skip to content

Commit

Permalink
Merge branch 'release/v2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sapnamysore committed Nov 26, 2019
2 parents 4a30014 + 7167428 commit 761ee3c
Show file tree
Hide file tree
Showing 61 changed files with 183 additions and 1,568 deletions.
1 change: 0 additions & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
web: gunicorn -c gunicorn.py canvas_manage_course.wsgi:application
rq: python manage.py rqworker isites_file_migration --settings=canvas_manage_course.settings.isites_migration
1 change: 1 addition & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

config.vm.synced_folder "../django-icommons-ui", "/home/vagrant/django-icommons-ui", create: true, owner: "vagrant", group: "vagrant"
config.vm.synced_folder "../django-icommons-common", "/home/vagrant/django-icommons-common", create: true, owner: "vagrant", group: "vagrant"
config.vm.synced_folder "../../.aws", "/home/vagrant/.aws", create: true, owner: "vagrant", group: "vagrant"

# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import unicode_literals

import itertools

from django.db import migrations
Expand All @@ -23,7 +23,7 @@ def create_school_default_permissions(apps, schema_editor):
fields = ('permission', 'school_id', 'canvas_role')

for permission in _get_permissions():
school_permission_class.objects.create(**dict(zip(fields, permission)))
school_permission_class.objects.create(**dict(list(zip(fields, permission))))


def reverse_permissions_load(apps, schema_editor):
Expand Down
2 changes: 1 addition & 1 deletion canvas_manage_course/migrations/0002_add_new_roles.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import unicode_literals

import itertools

from django.db import migrations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import unicode_literals

import itertools

from django.db import migrations
Expand Down
21 changes: 11 additions & 10 deletions canvas_manage_course/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
boto3==1.4.4
Django==1.11.24
cx-Oracle==6.1
boto3==1.9.210
Django==2.2.4
cx-Oracle==7.2.2
django-cached-authentication-middleware==0.2.2
django-redis-cache==1.7.1
hiredis==0.2.0
django-redis-cache==2.0.0
hiredis==1.0.0
kitchen==1.2.4
redis==2.10.6
redis==3.3.8
psycopg2==2.7.3.2
requests==2.22.0
django-storages==1.7.1
django_rq==2.1.0

git+ssh://[email protected]/penzance/canvas_python_sdk.git@v0.10.2#egg=canvas-python-sdk==0.10.2
git+ssh://[email protected]/Harvard-University-iCommons/django-auth-lti.git@v1.3.0#egg=django-auth-lti==1.3.0
git+ssh://[email protected]/penzance/canvas_python_sdk.git@v1.0#egg=canvas-python-sdk==1.0
git+ssh://[email protected]/Harvard-University-iCommons/django-auth-lti.git@v2.0.1#egg=django-auth-lti==2.0.1

git+ssh://[email protected]/Harvard-University-iCommons/django-icommons-common.git@v1.53.2#egg=django-icommons-common[async]==1.53.2
git+ssh://[email protected]/Harvard-University-iCommons/django-icommons-common.git@v2.0.2#egg=django-icommons-common[async_operations]==2.0.2
git+ssh://[email protected]/Harvard-University-iCommons/[email protected]#egg=django-icommons-ui==2.0
git+ssh://[email protected]/Harvard-University-iCommons/django-canvas-lti-school-permissions@v0.6#egg=django-canvas-lti-school-permissions==0.6
git+ssh://[email protected]/Harvard-University-iCommons/django-canvas-lti-school-permissions@v1.0#egg=django-canvas-lti-school-permissions==1.0
git+ssh://[email protected]/Harvard-University-iCommons/[email protected]#egg=django-ssm-parameter-store==0.2
1 change: 0 additions & 1 deletion canvas_manage_course/requirements/isites_migration.txt

This file was deleted.

9 changes: 5 additions & 4 deletions canvas_manage_course/requirements/local.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# local environment requirements

-r aws.txt
-r aws.txt

# below are requirements specific to the local environment

ddt==1.1.1
django-debug-toolbar==1.8
django-sslserver==0.19
django-debug-toolbar==1.9
django-sslserver==0.21


mock==2.0.0
oauthlib==1.1.1
pyvirtualdisplay==0.2.1
requests-oauthlib==0.8.0
selenium==2.53.2
Expand Down
25 changes: 4 additions & 21 deletions canvas_manage_course/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import logging
import os

from django.core.urlresolvers import reverse_lazy
from django.urls import reverse_lazy

from dj_secure_settings.loader import load_secure_settings

Expand All @@ -31,7 +31,7 @@
# Application definition

INSTALLED_APPS = [
'async',
'async_operations',
'canvas_manage_course',
'class_roster',
'django.contrib.auth',
Expand All @@ -41,17 +41,15 @@
'django.contrib.postgres',
'django.contrib.staticfiles',
'django_auth_lti',
'django_rq',
'icommons_common',
'icommons_common.monitor',
'icommons_ui',
'isites_migration',
'lti_school_permissions',
'manage_people',
'manage_sections',
]

MIDDLEWARE_CLASSES = [
MIDDLEWARE = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'cached_auth.Middleware',
Expand Down Expand Up @@ -146,19 +144,13 @@
# RQ
# http://python-rq.org/docs/

ISITES_MIGRATION_QUEUE_NAME = 'isites_file_migration'

_rq_redis_config = {
'HOST': REDIS_HOST,
'PORT': REDIS_PORT,
'DB': 0,
'DEFAULT_TIMEOUT': SECURE_SETTINGS.get('default_rq_timeout_secs', 300),
}

RQ_QUEUES = {
'default': _rq_redis_config,
ISITES_MIGRATION_QUEUE_NAME: _rq_redis_config
}

# Sessions

Expand Down Expand Up @@ -195,6 +187,7 @@
_DEFAULT_LOG_LEVEL = SECURE_SETTINGS.get('log_level', logging.DEBUG)
_LOG_ROOT = SECURE_SETTINGS.get('log_root', '') # Default to current directory


# Turn off default Django logging
# https://docs.djangoproject.com/en/1.8/topics/logging/#disabling-logging-configuration
LOGGING_CONFIG = None
Expand Down Expand Up @@ -255,11 +248,6 @@
'level': _DEFAULT_LOG_LEVEL,
'propagate': False,
},
'isites_migration': {
'handlers': ['default', 'console'],
'level': _DEFAULT_LOG_LEVEL,
'propagate': False,
},
'manage_people': {
'handlers': ['default'],
'level': _DEFAULT_LOG_LEVEL,
Expand Down Expand Up @@ -315,7 +303,6 @@
LTI_SCHOOL_PERMISSIONS_TOOL_PERMISSIONS = (
'canvas_manage_course', # dashboard
'class_roster',
'im_import_files', # isites_migration app
'manage_people',
'manage_sections'
)
Expand Down Expand Up @@ -349,7 +336,3 @@
ICOMMONS_REST_API_SKIP_CERT_VERIFICATION = SECURE_SETTINGS.get(
'icommons_rest_api_skip_cert_verification', False)

ISITES_MIGRATION = {
'aws_access_key_id': SECURE_SETTINGS.get('isites_migration_aws_access_key_id'),
'aws_secret_access_key': SECURE_SETTINGS.get('isites_migration_aws_secret_access_key'),
}
11 changes: 0 additions & 11 deletions canvas_manage_course/settings/isites_export_tool.py

This file was deleted.

38 changes: 0 additions & 38 deletions canvas_manage_course/settings/isites_migration.py

This file was deleted.

2 changes: 1 addition & 1 deletion canvas_manage_course/settings/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

INSTALLED_APPS += ['debug_toolbar', 'sslserver']
MIDDLEWARE_CLASSES += ['debug_toolbar.middleware.DebugToolbarMiddleware']
MIDDLEWARE += ['debug_toolbar.middleware.DebugToolbarMiddleware']

# For Django Debug Toolbar:
INTERNAL_IPS = ('127.0.0.1', '10.0.2.2',)
Expand Down
1 change: 0 additions & 1 deletion canvas_manage_course/settings/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
'auth': 'default',
'contenttypes': 'default',
'icommons_common': 'default',
'isites_migration': 'default',
'lti_permissions': 'default', # deprecated, but still around for migrations
'lti_school_permissions': 'default',
'manage_people': 'default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,52 +89,6 @@ <h2 class="card-content-title ellipsis" title="Manage Sections">
</div>
{% endif %}

{% if allowed.im_import_files %}
{% if isites_migration_active %}
<div class="card card_color3">
<a href="{% url 'isites_migration:index' %}" id="isites-migration">
<div class="card-body">
<div class="card-header card-header_color3">
</div>
<div class="card-content card-content_normal">
<h2 class="card-content-title ellipsis"
title="Import iSites Content">
<span class="content-link">
Import iSites Content
</span>
</h2>
<p title="Import iSites Content">
Migrate content from a previous term's
Course iSite to this Canvas course
</p>
</div>
</div>
</a>
</div>
{% else %}
<div class="card card_disabled">
<div class="card-body">
<div class="card-header card-header_disabled">
</div>
<div class="card-content card-content_alert">
<h2 class="card-content-title ellipsis"
title="Import iSites Content">
Import iSites Content
</h2>
<p title="Import iSites Content">
Migrate content from a previous term's
Course iSite to this Canvas course
</p>
<div class="notification">
This Canvas course is not associated
with any Course iSites.
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}

{% if allowed.custom_fas_card_1 %}
<div class="card card_color5">
<a href="https://atg.fas.harvard.edu/adding-apps-to-canvas" id="fas-external" target="_blank">
Expand Down
26 changes: 14 additions & 12 deletions canvas_manage_course/urls.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
from django.conf.urls import include, url
from django.urls import path, re_path, include
from django.conf import settings

from canvas_manage_course import views
from icommons_ui import views as icommons_ui_views

urlpatterns = [
url(r'^course_dashboard$', views.dashboard_course, name='dashboard_course'),
url(r'^class_roster/', include('class_roster.urls', namespace='class_roster')),
url(r'^isites_migration/', include('isites_migration.urls', namespace='isites_migration')),
url(r'^lti_auth_error$', icommons_ui_views.not_authorized, name='lti_auth_error'),
url(r'^lti_launch$', views.lti_launch, name='lti_launch'),
url(r'^manage_people/', include('manage_people.urls', namespace='manage_people')),
url(r'^manage_school_permissions/', include('lti_school_permissions.urls', namespace='manage_school_permissions')),
url(r'^manage_sections/', include('manage_sections.urls', namespace='manage_sections')),
url(r'^not_authorized$', icommons_ui_views.not_authorized, name='not_authorized'),
url(r'^tool_config$', views.tool_config, name='tool_config'),

path('course_dashboard', views.dashboard_course, name='dashboard_course'),
path('class_roster/', include(('class_roster.urls','class_roster'), namespace='class_roster')),
path('lti_auth_error', icommons_ui_views.not_authorized, name='lti_auth_error'),
path('lti_launch', views.lti_launch, name='lti_launch'),

path('manage_people/', include(('manage_people.urls','manage_people'), namespace='manage_people')),
path('manage_school_permissions/', include(('lti_school_permissions.urls','manage_school_permissions'),
namespace='manage_school_permissions')),
path('manage_sections/', include(('manage_sections.urls','manage_sections'), namespace='manage_sections')),
path('not_authorized', icommons_ui_views.not_authorized, name='not_authorized'),
path('tool_config', views.tool_config, name='tool_config'),
]

# Import the debug toolbar and handle any namespace issues that may occur
Expand All @@ -24,7 +26,7 @@
try:
import debug_toolbar
urlpatterns += [
url(r'^__debug__/', include(debug_toolbar.urls)),
re_path(r'^__debug__/', include(debug_toolbar.urls)),
]
except:
pass
Expand Down
Loading

0 comments on commit 761ee3c

Please sign in to comment.