Exemplo n.º 1
0
  def get(self):
    launch = LTI_Launch(self)
    if launch.complete: return
    if launch.loaded is False:
        self.response.out.write('<p>This tool must be launched using IMS Basic LTI.</p>')
        return
    
    msg = None
    wiskey = 'WisCrowd-'+str(launch.getCourseKey())
    logging.info('WisHandler.render Loading Wis Key='+wiskey)

    self.action = self.request.get('action')
    if launch.isInstructor() and self.action == 'reset':
       data = dict()
       logging.info('Resetting Wis Key='+wiskey)
       memcache.set(wiskey, data, 3600)
       msg = 'Data reset'
    else:
       data = self.getmodel(wiskey)

    self.display(launch, data, msg)