Пример #1
0
    def post(self):
        LTI_Launch.USE_COOKIE = True
        launch = LTI_Launch(self)
        if launch.complete: return
        if launch.new and launch.fromcookie is False:
            launch.cookieRedirect()
            if launch.complete: return

        if launch.loaded:
            self.response.out.write('<p>Done:' + launch.getUserName() + '</p>')
            if launch.fromcookie:
                self.response.out.write('<p>(Cookie is Working) ')
                self.response.out.write('<a href="' + self.request.url +
                                        '" target="_new">Open</a></p>')
            else:
                self.response.out.write('<p>(Cookie are off) ')
                self.response.out.write('<a href="' + launch.getUrl() +
                                        '" target="_new">Open</a></p>')
            val = launch.get('val', 0)
            self.response.out.write('<p>Val ' + str(val) + '</p>')
            launch['val'] = val + 1
        else:
            self.response.out.write(
                '<p>This tool must be launched using IMS Basic LTI.</p>')
        self.response.out.write('\n' + launch.dump() + '\n')
Пример #2
0
  def post(self):
      launch = LTI_Launch(self)
      if launch.complete: return

      if launch.loaded:
          self.response.out.write('<p>Done:'+launch.getUserName())
          self.response.out.write(' <a href="'+launch.getUrl()+'" target="_new">Open</a></p>')
          val = launch.get('val',0)
          self.response.out.write('<p>Val '+str(val)+'</p>')
          launch['val'] = val + 1
      else:
          self.response.out.write('<p>This tool must be launched using IMS Basic LTI.</p>')
      self.response.out.write('\n'+launch.dump()+'\n');
Пример #3
0
    def post(self):
        launch = LTI_Launch(self)
        if launch.complete: return

        if launch.loaded:
            self.response.out.write('<p>Done:' + launch.getUserName())
            self.response.out.write(' <a href="' + launch.getUrl() +
                                    '" target="_new">Open</a></p>')
            val = launch.get('val', 0)
            self.response.out.write('<p>Val ' + str(val) + '</p>')
            launch['val'] = val + 1
        else:
            self.response.out.write(
                '<p>This tool must be launched using IMS Basic LTI.</p>')
        self.response.out.write('\n' + launch.dump() + '\n')
Пример #4
0
    def post(self):
        LTI_Launch.USE_COOKIE = True
        launch = LTI_Launch(self)
        if launch.complete: return
        if launch.new and launch.fromcookie is False:
            launch.cookieRedirect()
            if launch.complete : return

        if launch.loaded:
            self.response.out.write('<p>Done:'+launch.getUserName()+'</p>')
            if launch.fromcookie:
                self.response.out.write('<p>(Cookie is Working) ')
                self.response.out.write('<a href="'+self.request.url+'" target="_new">Open</a></p>')
            else:
                self.response.out.write('<p>(Cookie are off) ')
                self.response.out.write('<a href="'+launch.getUrl()+'" target="_new">Open</a></p>')
            val = launch.get('val',0)
            self.response.out.write('<p>Val '+str(val)+'</p>')
            launch['val'] = val + 1
        else:
            self.response.out.write('<p>This tool must be launched using IMS Basic LTI.</p>')
        self.response.out.write('\n'+launch.dump()+'\n');