Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added legacy grade export functionality to the instructor dashboard #7

Closed
wants to merge 2 commits into from

Conversation

gsidebo
Copy link

@gsidebo gsidebo commented May 31, 2017

What are the relevant tickets?

Closes mitocw#74

What's this PR do?

Adds legacy grade export functionality back into the instructor dashboard (was removed after the dogwood releases)

Where should the reviewer start?

Probably lms/templates/instructor/instructor_dashboard_2/grade_export.html and lms/static/js/instructor_dashboard/grade_export.js.

How should this be manually tested?

  • Set the ENABLE_INSTRUCTOR_GRADE_EXPORT feature to True
  • Set a REMOTE_GRADEBOOK_URL feature value - you can ask me or Peter for the proper setting here
  • Navigate to the Export Grades tab for some course (eg: http://localhost:8000/courses/course-v1:edX+DemoX+Demo_Course/instructor#view-grade_export - make sure you have staff/admin privileges)
  • Click the buttons and make sure they work

Any background context you want to provide?

This grade exporting functionality last existed in the dogwood releases (eg: dogwood.3-3) in something called the legacy instructor dashboard. As such there is a lot of functionality that was lifted out of the codebase as it existed then. I made several changes to match the patterns that currently exist in the instructor dashboard (the buttons make AJAX requests instead of submitting a general HTML form, etc.), but I tried to be careful not to overdo it with optimizing legacy code.

A few key files from the dogwood release that contained the legacy dashboard functionality:

@blarghmatey
Copy link
Member

@gsidebo when attempting to load this on the QA instances that are running the mitx/ficus-1rc1 branch it was throwing the following error:

    2017-06-05 12:32:19,403 ERROR 26686 [gunicorn.error] glogging.py:219 - Error handling request
    Traceback (most recent call last):
      File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 126, in handle_request
        respiter = self.wsgi(environ, resp.start_response)
      File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 170, in __call__
        self.load_middleware()
      File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 52, in load_middleware
        mw_instance = mw_class()
      File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/middleware/locale.py", line 24, in __init__
        for url_pattern in get_resolver(None).url_patterns:
      File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 401, in url_patterns
        patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
      File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 395, in urlconf_module
        self._urlconf_module = import_module(self.urlconf_name)
      File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
        __import__(name)
      File "/edx/app/edxapp/edx-platform/lms/urls.py", line 11, in <module>
        from courseware.views.views import EnrollStaffView
      File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/views/views.py", line 36, in <module>
        from lms.djangoapps.instructor.views.api import require_global_staff
      File "/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/views/api.py", line 43, in <module>
        from lms.djangoapps.grades.new.course_grade_factory import CourseGradeFactory
    ImportError: No module named course_grade_factory

I assume this is due to that module being added in after the Ficus branch was cut from master.

@pdpinch
Copy link
Member

pdpinch commented Jun 5, 2017

Argh. Does this mean we've been working against the wrong branch?

@gsidebo
Copy link
Author

gsidebo commented Jun 7, 2017

Closing in favor of #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants