Skip to content

Commit

Permalink
Make validate assignment compatible with jupyter server
Browse files Browse the repository at this point in the history
  • Loading branch information
tmetzl committed Aug 21, 2023
1 parent abfb283 commit e9f6290
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions e2xgrader/server_extensions/apps/validate_assignment/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import os
import traceback

from e2xcore.handlers import E2xHandler
from jupyter_core.paths import jupyter_config_path
from jupyter_server.base.handlers import JupyterHandler
from nbgrader.apps import NbGrader
from nbgrader.nbgraderformat import SchemaTooNewError, SchemaTooOldError
from nbgrader.server_extensions.validate_assignment.handlers import (
Expand All @@ -16,10 +16,10 @@
static = os.path.join(os.path.dirname(__file__), "static")


class ValidateAssignmentHandler(JupyterHandler):
class ValidateAssignmentHandler(E2xHandler):
@property
def notebook_dir(self):
return self.settings["notebook_dir"]
def root_dir(self):
return self.settings["root_dir"]

def load_config(self):
paths = jupyter_config_path()
Expand All @@ -32,7 +32,7 @@ def load_config(self):
return app.config

def validate_notebook(self, path):
fullpath = os.path.join(self.notebook_dir, path)
fullpath = os.path.join(self.root_dir, path)

try:
config = self.load_config()
Expand Down

0 comments on commit e9f6290

Please sign in to comment.