Commit bc424173 by Adam Palay

move _clean_fields to tools.py

parent 640d00c5
...@@ -32,6 +32,7 @@ import instructor_task.api ...@@ -32,6 +32,7 @@ import instructor_task.api
from instructor_task.api_helper import AlreadyRunningError from instructor_task.api_helper import AlreadyRunningError
import instructor.enrollment as enrollment import instructor.enrollment as enrollment
from instructor.enrollment import enroll_email, unenroll_email from instructor.enrollment import enroll_email, unenroll_email
from instructor.views.tools import _clean_field
import instructor.access as access import instructor.access as access
import analytics.basic import analytics.basic
import analytics.distributions import analytics.distributions
...@@ -815,8 +816,3 @@ def _msk_from_problem_urlname(course_id, urlname): ...@@ -815,8 +816,3 @@ def _msk_from_problem_urlname(course_id, urlname):
(org, course_name, __) = course_id.split("/") (org, course_name, __) = course_id.split("/")
module_state_key = "i4x://" + org + "/" + course_name + "/" + urlname module_state_key = "i4x://" + org + "/" + course_name + "/" + urlname
return module_state_key return module_state_key
def _clean_field(field):
if field:
return field.strip()
return field
...@@ -41,6 +41,7 @@ from django_comment_common.models import (Role, ...@@ -41,6 +41,7 @@ from django_comment_common.models import (Role,
FORUM_ROLE_COMMUNITY_TA) FORUM_ROLE_COMMUNITY_TA)
from django_comment_client.utils import has_forum_access from django_comment_client.utils import has_forum_access
from instructor.offline_gradecalc import student_grades, offline_grades_available from instructor.offline_gradecalc import student_grades, offline_grades_available
from instructor.views.tools import _clean_field
from instructor_task.api import (get_running_instructor_tasks, from instructor_task.api import (get_running_instructor_tasks,
get_instructor_task_history, get_instructor_task_history,
submit_rescore_problem_for_all_students, submit_rescore_problem_for_all_students,
...@@ -1568,9 +1569,3 @@ def get_background_task_table(course_id, problem_url, student=None): ...@@ -1568,9 +1569,3 @@ def get_background_task_table(course_id, problem_url, student=None):
datatable['title'] = "{course_id} > {location}".format(course_id=course_id, location=problem_url) datatable['title'] = "{course_id} > {location}".format(course_id=course_id, location=problem_url)
return msg, datatable return msg, datatable
def _clean_field(field):
if field:
return field.strip()
return field
"""
Tools for the instructor dashboard
"""
def _clean_field(field):
if field:
return field.strip()
return field
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment