def home(): """ Home page view. :return: HTTP Response """ tags = Tag.get_all() return render_template('home.html', tags=tags)
def index(): id = session.get("user_id", "") return render_template("index.html", id=id, loggedin=check.logged_in(), tags=Tag.get_all(), pagination=Post.paginate( int(request.args.get('page') or 1)))
def json_get_tags(): # create json file of all tags tags = Tag.get_all() # list of dicytionaries data = [] for tag in tags: data.append({"id": tag.id, "name": tag.name}) # Qreturn "Test return" return json.dumps(data)
def review(): answer = Schedule.get_answer(g.lti.get_user_id()) if answer == None: return "No answers to review." fsession['reviewanswer'] = answer.id enabledtags = AnswerTag.get_tag_ids(answer.id) reviews = Review.get_list(answer.id) return render_template('reviewanswer.html', answer=answer, tags=Tag.get_all(), enabledtags=enabledtags, reviews=reviews)
def review(): answer = Schedule.get_answer(g.lti.get_user_id()) if answer == None: return "No answers to review." fsession['reviewanswer'] = answer.id enabledtags = AnswerTag.get_tag_ids(answer.id) reviews = Review.get_list(answer.id) question = Question.by_id(answer.questionID) if question is None: return "Question was not found." return render_template('reviewanswer.html', answer=answer, tags=Tag.get_all(), enabledtags=enabledtags, reviews=reviews, question=question)
def render(self): enabledtags = AnswerTag.get_tag_ids(self.answer_id) return render_template('assigntag.html', answer=self.answer, tags=Tag.get_all(), enabledtags=enabledtags)
def render(self): self.taglist = Tag.get_all() return render_template('modifytags.html',tags=self.taglist)