def get(self): uid, insession = attemptlogin(self.request) emailid = extractkeyfromrequest(self.request, 'e') if emailid is None: emailid = '' zipcode = extractkeyfromrequest(self.request, 'z') if zipcode is None: zipcode = '' returnvalue = extractkeyfromrequest(self.request, 'r') if returnvalue is None: returnvalue = 0 returnvalue = int(returnvalue) template_values = { 'emailid': emailid, 'zipcode': zipcode, 'returnvalue': returnvalue, } header_template_values = buildheadertemplatevalues(insession, uid) template_values.update(header_template_values) channelpartnersservice = ChannelPartnersService() channelpartners = channelpartnersservice.getchannelpartners() channelpartner_template_values = buildchannelpartnertemplatevalues( insession, channelpartners) template_values.update(channelpartner_template_values) template = JINJA_ENVIRONMENT.get_template('signup.html') self.response.write(template.render(template_values))
def get(self): uid, insession = attemptlogin(self.request) coursesservice = CoursesService() courses = coursesservice.listcourses() template_values = {} header_template_values = buildheadertemplatevalues(insession, uid) template_values.update(header_template_values) course_template_values = buildallcoursestemplatevalues( insession, courses) template_values.update(course_template_values) # logging.info('template_values='+str(template_values)) template = JINJA_ENVIRONMENT.get_template('allcourses.html') self.response.write(template.render(template_values))
def get(self): uid, insession = attemptlogin(self.request) returnvalue = extractkeyfromrequest(self.request, 'r') hasreturnvalue = True if returnvalue is None: hasreturnvalue = False emailid = extractkeyfromrequest(self.request, 'e') template_values = { 'emailid': emailid, 'hasreturnvalue': hasreturnvalue, } header_template_values = buildheadertemplatevalues(insession, uid) template_values.update(header_template_values) template = JINJA_ENVIRONMENT.get_template('signupstatus.html') self.response.write(template.render(template_values))
def get(self): uid, insession = attemptlogin(self.request) coursesservice = CoursesService() userservice = UserService() emailid = userservice.getemailidforsession(uid) usercourses = coursesservice.listusercourses(emailid) template_values = {} header_template_values = buildheadertemplatevalues(insession, uid) template_values.update(header_template_values) course_template_values = buildmycoursestemplatevalues( insession, uid, usercourses) template_values.update(course_template_values) template = JINJA_ENVIRONMENT.get_template('mycourses.html?s=' + str(sessionid)) self.response.write(template.render(template_values))
def get(self): uid, insession = attemptlogin(self.request) staffservice = StaffService() staff = staffservice.getstaff() channelpartnersservice = ChannelPartnersService() channelpartners = channelpartnersservice.getchannelpartners() template_values = {} header_template_values = buildheadertemplatevalues(insession, uid) template_values.update(header_template_values) staff_template_values = buildstafftemplatevalues(insession, staff) template_values.update(staff_template_values) channelpartner_template_values = buildchannelpartnertemplatevalues( insession, channelpartners) template_values.update(channelpartner_template_values) # logging.error('template_values='+str(template_values)) template = JINJA_ENVIRONMENT.get_template('about.html') self.response.write(template.render(template_values))
def get(self): uid, insession = attemptlogin(self.request) emailid = extractkeyfromrequest(self.request, 'e') if emailid is None: emailid = '' returnvalue = extractkeyfromrequest(self.request, 'r') if returnvalue is None: returnvalue = 0 else: returnvalue = int(returnvalue) template_values = { 'emailid': emailid, 'returnvalue': returnvalue, } header_template_values = buildheadertemplatevalues(insession, uid) template_values.update(header_template_values) template = JINJA_ENVIRONMENT.get_template('forgot.html') self.response.write(template.render(template_values))
def get(self): uid, insession = attemptlogin(self.request) emailid = extractkeyfromrequest(self.request, 'e') iserror = extractkeyfromrequest(self.request, 'x') != None errormsg = '' if iserror: errormsg = 'Unable to signin' if emailid is None: emailid = '' template_values = { 'errormsg': errormsg, 'emailid': emailid, 'forgoturl': '/forgot?e=' + str(emailid), 'forgoturllinktext': 'Forgot Student ID?' } header_template_values = buildheadertemplatevalues(insession, uid) template_values.update(header_template_values) template = JINJA_ENVIRONMENT.get_template('signin.html') self.response.write(template.render(template_values))
def get(self): uid, insession = attemptlogin(self.request) courseid = extractkeyfromrequest(self.request, 'c') coursecontentid = extractkeyfromrequest(self.request, 'cc') coursesservice = CoursesService() course = coursesservice.getcourse(courseid) coursecontents = coursesservice.getcoursecontents(courseid) coursehandouts = coursesservice.getcoursehandouts(courseid) coursehomeworks = coursesservice.getcoursehomeworks(courseid) coursevideos = coursesservice.getcoursevideos(courseid) coursestarterpacks = coursesservice.getcoursestarterpacks(courseid) coursequizzes = coursesservice.getcoursequizzes(courseid) template_values = {} header_template_values = buildheadertemplatevalues(insession, uid) template_values.update(header_template_values) coursecontent_template_values = buildcoursecontenttemplatevalues( insession, courseid, coursecontentid, course, coursecontents, coursehandouts, coursehomeworks, coursevideos, coursestarterpacks, coursequizzes) template_values.update(coursecontent_template_values) logging.info('template_values=' + str(template_values)) template = JINJA_ENVIRONMENT.get_template('coursecontent.html') self.response.write(template.render(template_values))