diff --git a/.gitignore b/.gitignore index 9adaf5f..0e980ad 100644 --- a/.gitignore +++ b/.gitignore @@ -110,6 +110,7 @@ celerybeat-schedule .env .venv env/ +env2/ env3/ venv/ ENV/ diff --git a/lti.py b/lti.py index c80fa52..964cccf 100644 --- a/lti.py +++ b/lti.py @@ -226,7 +226,9 @@ def index(lti=lti): ) try: - tools_by_category = filter_tool_list(session["course_id"], session["api_key"]) + tools_by_category, cagetory_order = filter_tool_list( + session["course_id"], session["api_key"] + ) except CanvasException: app.logger.exception("Couldn't connect to Canvas") return return_error( @@ -243,6 +245,7 @@ def index(lti=lti): return render_template( "main_template.html", tools_by_category=tools_by_category, + category_order=cagetory_order, course=session["course_id"], ) @@ -300,8 +303,7 @@ def status(): app.logger.exception("Dev Key check failed.") # Overall health check - if all checks are True - status["healthy"] = all(v is True for k, v in status["checks"].items()) - + status["healthy"] = all(v is True for k, v in list(status["checks"].items())) return Response(json.dumps(status), mimetype="application/json") diff --git a/requirements.txt b/requirements.txt index 7512fff..4543aad 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -canvasapi==0.14.0 +canvasapi==0.15.0 Flask==1.1.1 -Flask-SQLAlchemy==2.4.0 -mysql-python==1.2.5 +Flask-SQLAlchemy==2.4.1 +mysqlclient -e git+https://github.com/ucfcdl/pylti.git@roles#egg=PyLTI requests==2.22.0 diff --git a/settings.py.template b/settings.py.template index f8bc57e..3a4754b 100644 --- a/settings.py.template +++ b/settings.py.template @@ -41,8 +41,8 @@ oauth2_id = "" oauth2_key = "" # Logging configuration -LOG_MAX_BYTES = 10000 -LOG_BACKUP_COUNT = 1 +LOG_MAX_BYTES = 1024 * 1024 * 5, # 5 MB +LOG_BACKUP_COUNT = 2 ERROR_LOG = "logs/faculty-tools.log" whitelist = "whitelist.json" diff --git a/setup.cfg b/setup.cfg index e3fa53f..494349c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,8 @@ [flake8] exclude= + venv*/* env/* + env2/* env3/* src/* max_line_length=99 @@ -8,6 +10,8 @@ ignore = W503, E203 [coverage:run] omit= + venv*/* env/* + env2/* env3/* src/* diff --git a/templates/lti_list.html b/templates/lti_list.html index 7a31a4a..c2cc9e9 100644 --- a/templates/lti_list.html +++ b/templates/lti_list.html @@ -44,9 +44,8 @@

{{lti.display_name}}

{% endfor %} {% else %}
-
+

No LTIs available in this category.

-
{% endif %} diff --git a/templates/main_template.html b/templates/main_template.html index ee2c50f..8dd5c5e 100644 --- a/templates/main_template.html +++ b/templates/main_template.html @@ -4,7 +4,7 @@

Jump to section: