def evaluation_dashboard_save(): if request.method == 'POST': print("--------------------------------post_evaluation_dashboard--------------------------------") user = User(_conn) keys = [] form = request.form print('form') print(form) for key in form.keys(): keys.append(key) data = {} ids = list(LST_EVALUATION_TAM.keys()) for i in range(0,len(ids)): name = str(ids[i]) if name in keys: data[name] = request.form[name] else: data[name] = '' print(data) if '' in list(data.values()): return render_template('eduvis/frontend/interview/tam.html', userName=user.get_name(_user_id), questions=LST_EVALUATION_TAM, data=data) else: user.record_evaluation_tam(_user_id,CUSTOMIZABLE_DASHBOARD_TYPE, data) else: pass return redirect('/eduvis/thankyou/')
def evaluation_customizable_dashboard(): user = User(_conn) dashboard = Dashboard(_conn, _user_id, user.get_customizable_dashboard_id(_user_id), CUSTOMIZABLE_DASHBOARD_TYPE) if (dashboard.has_active_without_default_charts()): return render_template('eduvis/frontend/dashboard/evaluate.html', userName=user.get_name(_user_id), dashboardType='customizable', charts_topic=dashboard.topic(without_default_charts=True), charts_id=dashboard.charts("id",without_default_charts=True), charts_layout=dashboard.charts("layout",without_default_charts=True), titleCharts=dashboard.title(without_default_charts=True), post_action="/eduvis/evaluation_customizable_dashboard/save/", data={}) elif (dashboard.has_inactive_default_charts()): return redirect('/eduvis/modification_customizable_dashboard/') else: return redirect('/eduvis/interview/evaluation/')
def navigation1(): # <!-- VG-11 --> user = User(_conn) customizable_dashboard_id = user.get_customizable_dashboard_id(_user_id) navigation = Navigation(_conn, _user_id, customizable_dashboard_id, CUSTOMIZABLE_DASHBOARD_TYPE) dashboard = Dashboard(_conn, _user_id, customizable_dashboard_id, CUSTOMIZABLE_DASHBOARD_TYPE) return render_template('eduvis/frontend/dashboard/configure.html', userName=user.get_name(_user_id), charts_id=navigation.charts("id"), charts_layout=navigation.charts("layout"), titleCharts=navigation.title(), topic=navigation.topic(), charts_active=navigation.charts_active(), enableLeftMenu=CUSTOMIZABLE_DASHBOARD_TYPE, leftMenuInfo=left_menu_info(), amountSelectedVG=dashboard.amount_by_view())
def age4(): # <!-- VG-06 --> user = User(_conn) customizable_dashboard_id = user.get_customizable_dashboard_id(_user_id) age = Age(_conn, _user_id, customizable_dashboard_id, CUSTOMIZABLE_DASHBOARD_TYPE) dashboard = Dashboard(_conn, _user_id, customizable_dashboard_id, CUSTOMIZABLE_DASHBOARD_TYPE) return render_template('eduvis/frontend/dashboard/configure.html', userName=user.get_name(_user_id), charts_id=age.charts("age_forum_topic","id"), charts_layout=age.charts("age_forum_topic","layout"), titleCharts=age.title("age_forum_topic"), topic=age.topic("age_forum_topic"), charts_active=age.charts_active("age_forum_topic"), enableLeftMenu=CUSTOMIZABLE_DASHBOARD_TYPE, leftMenuInfo=left_menu_info(), amountSelectedVG=dashboard.amount_by_view())
def materials2(): # <!-- VG-02 --> user = User(_conn) customizable_dashboard_id = user.get_customizable_dashboard_id(_user_id) material = Material(_conn, _user_id, customizable_dashboard_id, CUSTOMIZABLE_DASHBOARD_TYPE) dashboard = Dashboard(_conn, _user_id, customizable_dashboard_id, CUSTOMIZABLE_DASHBOARD_TYPE) return render_template('eduvis/frontend/dashboard/configure.html', userName=user.get_name(_user_id), charts_id=material.charts("access_materials","id"), charts_layout=material.charts("access_materials","layout"), titleCharts=material.title("access_materials"), topic=material.topic("access_materials"), charts_active=material.charts_active("access_materials"), enableLeftMenu=CUSTOMIZABLE_DASHBOARD_TYPE, leftMenuInfo=left_menu_info(), amountSelectedVG=dashboard.amount_by_view())
def cluster2(): # <!-- VG-05 --> user = User(_conn) customizable_dashboard_id = user.get_customizable_dashboard_id(_user_id) cluster = Cluster(_conn, _user_id, customizable_dashboard_id, CUSTOMIZABLE_DASHBOARD_TYPE) dashboard = Dashboard(_conn, _user_id, customizable_dashboard_id, CUSTOMIZABLE_DASHBOARD_TYPE) return render_template('eduvis/frontend/dashboard/configure.html', userName=user.get_name(_user_id), charts_id=cluster.charts("grades_assignments","id"), charts_layout=cluster.charts("grades_assignments","layout"), titleCharts=cluster.title("grades_assignments"), topic=cluster.topic("grades_assignments"), charts_active=cluster.charts_active("grades_assignments"), enableLeftMenu=CUSTOMIZABLE_DASHBOARD_TYPE, leftMenuInfo=left_menu_info(), amountSelectedVG=dashboard.amount_by_view())
def customizable_dashboard(): user = User(_conn) dashboard = Dashboard(_conn, _user_id, user.get_customizable_dashboard_id(_user_id), CUSTOMIZABLE_DASHBOARD_TYPE) session['type_dashboard'] = CUSTOMIZABLE_DASHBOARD_TYPE return render_template('eduvis/frontend/dashboard/dashboard.html', userName=user.get_name(_user_id), charts_topic=dashboard.topic(), charts_id=dashboard.charts("id"), charts_layout=dashboard.charts("layout"), titleCharts=dashboard.title(), enableLeftMenu=CUSTOMIZABLE_DASHBOARD_TYPE, leftMenuInfo=left_menu_info(), amountSelectedVG=dashboard.amount_by_view())
def evaluation_dashboard(): user = User(_conn) return render_template('eduvis/frontend/interview/tam.html', userName=user.get_name(_user_id), questions=LST_EVALUATION_TAM, data={})
def modification_customizable_dashboard_save(): if request.method == 'POST': print("--------------------------------post_modification_customizable_dashboard--------------------------------") user = User(_conn) dashboard = Dashboard(_conn, _user_id, user.get_customizable_dashboard_id(_user_id), CUSTOMIZABLE_DASHBOARD_TYPE) topics = dashboard.topic(default_charts_inactive=True) charts = dashboard.charts("id",default_charts_inactive=True) data = {} for i in range(0,len(charts)): name = "T"+str(topics[i])+"@"+str(charts[i]) data[name] = request.form[name] print(data) if '' in list(data.values()): return render_template('eduvis/frontend/dashboard/modification.html', userName=user.get_name(_user_id), dashboardType='customizable', charts_topic=dashboard.topic(default_charts_inactive=True), charts_id=dashboard.charts("id",default_charts_inactive=True), charts_layout=dashboard.charts("layout",default_charts_inactive=True), titleCharts=dashboard.title(default_charts_inactive=True), post_action="/eduvis/modification_customizable_dashboard/save/", data=data) else: user.record_evaluation_dashboard(CUSTOMIZABLE_DASHBOARD_TYPE, data, _user_id, evaluation=False) else: pass return redirect('/eduvis/interview/evaluation/')
def modification_customizable_dashboard(): user = User(_conn) dashboard = Dashboard(_conn, _user_id, user.get_customizable_dashboard_id(_user_id), CUSTOMIZABLE_DASHBOARD_TYPE) return render_template('eduvis/frontend/dashboard/modification.html', userName=user.get_name(_user_id), dashboardType='customizable', charts_topic=dashboard.topic(default_charts_inactive=True), charts_id=dashboard.charts("id",default_charts_inactive=True), charts_layout=dashboard.charts("layout",default_charts_inactive=True), titleCharts=dashboard.title(default_charts_inactive=True), post_action="/eduvis/modification_customizable_dashboard/save/", data={})
def evaluation_customizable_dashboard_save(): if request.method == 'POST': print("--------------------------------post_evaluation_customizable_dashboard--------------------------------") user = User(_conn) dashboard = Dashboard(_conn, _user_id, user.get_customizable_dashboard_id(_user_id), CUSTOMIZABLE_DASHBOARD_TYPE) topics = dashboard.topic(without_default_charts=True) charts = dashboard.charts("id",without_default_charts=True) keys = [] form = request.form for key in form.keys(): keys.append(key) data = {} for i in range(0,len(charts)): name = "T"+str(topics[i])+"@"+str(charts[i]) data[name] = request.form[name] name = "T"+str(topics[i])+"@"+str(charts[i])+"#Radio" if name in keys: data[name] = request.form[name] else: data[name] = '' print(data) if '' in list(data.values()): return render_template('eduvis/frontend/dashboard/evaluate.html', userName=user.get_name(_user_id), dashboardType='customizable', charts_topic=dashboard.topic(without_default_charts=True), charts_id=dashboard.charts("id",without_default_charts=True), charts_layout=dashboard.charts("layout",without_default_charts=True), titleCharts=dashboard.title(without_default_charts=True), post_action="/eduvis/evaluation_customizable_dashboard/save/", data=data) else: user.record_evaluation_dashboard(CUSTOMIZABLE_DASHBOARD_TYPE, data, _user_id) else: pass if(dashboard.has_inactive_default_charts()): return redirect('/eduvis/modification_customizable_dashboard/') else: return redirect('/eduvis/interview/evaluation/')
def evaluation_static_dashboard_save(): if request.method == 'POST': print("--------------------------------post_evaluation_static_dashboard--------------------------------") user = User(_conn) dashboard = Dashboard(_conn, _user_id, user.get_static_dashboard_id(_user_id), STATIC_DASHBOARD_TYPE) topics = dashboard.topic() charts = dashboard.charts("id") keys = [] form = request.form for key in form.keys(): keys.append(key) data = {} for i in range(0,len(charts)): name = "T"+str(topics[i])+"@"+str(charts[i]) data[name] = request.form[name] name = "T"+str(topics[i])+"@"+str(charts[i])+"#Radio" if name in keys: data[name] = request.form[name] else: data[name] = '' print(data) if '' in list(data.values()): return render_template('eduvis/frontend/dashboard/evaluate.html', userName=user.get_name(_user_id), dashboardType='static', charts_topic=dashboard.topic(), charts_id=dashboard.charts("id"), charts_layout=dashboard.charts("layout"), titleCharts=dashboard.title(), post_action="/eduvis/evaluation_static_dashboard/save/", data=data) else: user.record_evaluation_dashboard(STATIC_DASHBOARD_TYPE, data, _user_id) else: pass return redirect('/eduvis/customizable_dashboard/')
def evaluation_static_dashboard(): user = User(_conn) dashboard = Dashboard(_conn, _user_id, user.get_static_dashboard_id(_user_id), STATIC_DASHBOARD_TYPE) return render_template('eduvis/frontend/dashboard/evaluate.html', userName=user.get_name(_user_id), dashboardType='static', charts_topic=dashboard.topic(), charts_id=dashboard.charts("id"), charts_layout=dashboard.charts("layout"), titleCharts=dashboard.title(), post_action="/eduvis/evaluation_static_dashboard/save/", data={})