Commit c21906a0 by Justin Riley

request access from the proctor automatically in is_released()

The proctor server's status call now additionally returns whether the
problem has been requested or not. If it's not been requested yet the
proctor xmodule now automatically submits a request on behalf of the
user. This completely skips the 'request access' page when MIT card
integration is active.
parent 0cbbfa39
......@@ -78,7 +78,14 @@ class ProctorPanel(object):
def is_released(self):
retdata = self.status()
return retdata.get('enabled', False)
enabled = retdata.get('enabled', False)
requested = retdata.get('requested', False)
# request the problem from the proctor automatically
if not enabled and not requested:
self.request()
retdata = self.status()
enabled = retdata.get('enabled', False)
return enabled
class ProctorFields(object):
......
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