Open thraxil opened 2 years ago
Actually, it errors out a line earlier on https://github.com/appsembler/xblock-grade-fetcher/blob/master/gradefetcher/gradefetcher.py#L490
@thraxil We didn't implement the POST
method functionality and users can't set the HTTP method to post in the studio author UI. I remove that code block for POST
to prevent confusion.
At the end of the
grade_user()
method, there's a check on whethergrade >= 0
: https://github.com/appsembler/xblock-grade-fetcher/blob/master/gradefetcher/gradefetcher.py#L492That
grade
variable is only created on either line 416 or 418: https://github.com/appsembler/xblock-grade-fetcher/blob/master/gradefetcher/gradefetcher.py#L416 https://github.com/appsembler/xblock-grade-fetcher/blob/master/gradefetcher/gradefetcher.py#L418, both of which are inside theif self.http_method == "get":
branch: https://github.com/appsembler/xblock-grade-fetcher/blob/master/gradefetcher/gradefetcher.py#L367If
http_method
is insteadpost
, and it skips that branch, running https://github.com/appsembler/xblock-grade-fetcher/blob/master/gradefetcher/gradefetcher.py#L473,grade
never gets defined and the whole thing will always fail with aNameError
exception.