def show_scanner(): user = _getUser(CASClient().authenticate()) user.scanner_viewed = True db.session.commit() if user.is_eval: return render_template("eval_modules/scanner.html", is_about=False, constructors=True) return render_template('modules/scanner.html', is_about=False, constructors=True)
def show_queue(): user = _getUser(CASClient().authenticate()) user.queue_viewed = True db.session.commit() if user.is_eval and user.is_groupA: return render_template("eval_modules/queue.html", is_about=False, constructors=True) return render_template('modules/queue.html', is_about=False, constructors=True)
def show_index(): user = _getUser(CASClient().authenticate()) progress = _getProgress(user) progressBars = {} for key, val in progress.items(): progressBars[key] = "<div class='progress-bar' role='progressbar' style='width: " + \ str(val) + "%' aria-valuenow='" + str(val) + \ "%' aria-valuemin='0' aria-valuemax='100'> </div>" return render_template('index.html', is_about=False, progressBars=progressBars)
def show_printwriter(): user = _getUser(CASClient().authenticate()) user.printwriter_viewed = True db.session.commit() return render_template('modules/printwriter.html', is_about=False, constructors=True)
def show_system_out(): user = _getUser(CASClient().authenticate()) user.system_out_viewed = True db.session.commit() return render_template('modules/system-out.html', is_about=False, constructors=False)
def mark_eval_groupB(): user = _getUser(CASClient().authenticate()) user.is_eval = True user.is_groupA = False db.session.commit() return show_index()
def show_scanner_test(): user = _getUser(CASClient().authenticate()) user.scanner_test_viewed = True db.session.commit() return render_template("code_pages/scanner.html", is_about=False, stdjava_code=user.scanner_test_code, username=user.netid)
def logout(): casClient = CASClient() casClient.authenticate() casClient.logout() return show_home()
def show_about_auth(): CASClient().authenticate() return render_template('about_auth.html', is_about=True)