Commit 5c581853 authored by I.K Seneviratne's avatar I.K Seneviratne

Committing the modifications of student-lecturer correlations and rectifying...

Committing the modifications of student-lecturer correlations and rectifying an error in gaze and emotion front pages.
.
parent ad27aa6d
...@@ -670,10 +670,14 @@ def get_emotion_correlations(individual_lec_emotions, lec_recorded_activity_data ...@@ -670,10 +670,14 @@ def get_emotion_correlations(individual_lec_emotions, lec_recorded_activity_data
# this variable will be used to store the correlations # this variable will be used to store the correlations
correlations = [] correlations = []
limit = 10 # limit = 10
limit = len(individual_lec_emotions)
data_index = ['lecture-{}'.format(i + 1) for i in range(len(individual_lec_emotions))] data_index = ['lecture-{}'.format(i + 1) for i in range(len(individual_lec_emotions))]
# declare the correlation data dictionary
corr_data = {}
# student activity labels # student activity labels
student_emotion_labels = ['Happy', 'Sad', 'Angry', 'Surprise', 'Neutral'] student_emotion_labels = ['Happy', 'Sad', 'Angry', 'Surprise', 'Neutral']
lecturer_activity_labels = ['seated', 'standing', 'walking'] lecturer_activity_labels = ['seated', 'standing', 'walking']
...@@ -693,31 +697,72 @@ def get_emotion_correlations(individual_lec_emotions, lec_recorded_activity_data ...@@ -693,31 +697,72 @@ def get_emotion_correlations(individual_lec_emotions, lec_recorded_activity_data
# loop through the lecturer recorded data (lecturer) # loop through the lecturer recorded data (lecturer)
for data in lec_recorded_activity_data: for data in lec_recorded_activity_data:
sitting_perct_list.append(int(data['seated_count'])) value = int(data['seated_count'])
standing_perct_list.append(int(data['standing_count'])) value1 = int(data['standing_count'])
walking_perct_list.append(int(data['walking_count'])) value2 = int(data['walking_count'])
if value != 0:
sitting_perct_list.append(int(data['seated_count']))
if value1 != 0:
standing_perct_list.append(int(data['standing_count']))
if value2 != 0:
walking_perct_list.append(int(data['walking_count']))
# loop through the lecturer recorded data (student) # loop through the lecturer recorded data (student)
for data in individual_lec_emotions: for data in individual_lec_emotions:
happy_perct_list.append(int(data['happy_perct'])) value = int(data['happy_perct'])
sad_perct_list.append(int(data['sad_perct'])) value1 = int(data['sad_perct'])
angry_perct_list.append(int(data['angry_perct'])) value2 = int(data['angry_perct'])
surprise_perct_list.append(int(data['surprise_perct'])) value3 = int(data['surprise_perct'])
neutral_perct_list.append(int(data['neutral_perct'])) value4 = int(data['neutral_perct'])
if value != 0:
corr_data = {'Happy': happy_perct_list, 'Sad': sad_perct_list, 'Angry': angry_perct_list, 'Surprise': surprise_perct_list, 'Neutral': neutral_perct_list, happy_perct_list.append(int(data['happy_perct']))
'seated': sitting_perct_list, 'standing': standing_perct_list, 'walking': walking_perct_list} if value1 != 0:
sad_perct_list.append(int(data['sad_perct']))
if value2 != 0:
angry_perct_list.append(int(data['angry_perct']))
if value3 != 0:
surprise_perct_list.append(int(data['surprise_perct']))
if value4 != 0:
neutral_perct_list.append(int(data['neutral_perct']))
if len(happy_perct_list) == len(individual_lec_emotions):
corr_data[student_emotion_labels[0]] = happy_perct_list
if len(sad_perct_list) == len(individual_lec_emotions):
corr_data[student_emotion_labels[1]] = sad_perct_list
if len(angry_perct_list) == len(individual_lec_emotions):
corr_data[student_emotion_labels[2]] = angry_perct_list
if len(surprise_perct_list) == len(individual_lec_emotions):
corr_data[student_emotion_labels[3]] = surprise_perct_list
if len(neutral_perct_list) == len(individual_lec_emotions):
corr_data[student_emotion_labels[4]] = neutral_perct_list
if (len(sitting_perct_list)) == len(individual_lec_emotions):
corr_data[lecturer_activity_labels[0]] = sitting_perct_list
if (len(standing_perct_list)) == len(individual_lec_emotions):
corr_data[lecturer_activity_labels[1]] = standing_perct_list
if (len(walking_perct_list)) == len(individual_lec_emotions):
corr_data[lecturer_activity_labels[2]] = walking_perct_list
# corr_data = {'Happy': happy_perct_list, 'Sad': sad_perct_list, 'Angry': angry_perct_list, 'Surprise': surprise_perct_list, 'Neutral': neutral_perct_list,
# 'seated': sitting_perct_list, 'standing': standing_perct_list, 'walking': walking_perct_list}
# create the dataframe # create the dataframe
df = pd.DataFrame(corr_data, index=data_index) df = pd.DataFrame(corr_data, index=data_index)
print(df)
# calculate the correlation # calculate the correlation
pd_series = ut.get_top_abs_correlations(df, limit) pd_series = ut.get_top_abs_correlations(df, limit)
print('====correlated variables=====') print('====correlated variables=====')
print(pd_series) print(pd_series)
# assign a new value to the 'limit' variable
limit = len(pd_series) if len(pd_series) < limit else limit
for i in range(limit): for i in range(limit):
# this dictionary will get the pandas.Series object's indices and values separately # this dictionary will get the pandas.Series object's indices and values separately
corr_dict = {} corr_dict = {}
......
...@@ -752,10 +752,14 @@ def get_activity_correlations(individual_lec_activities, lec_recorded_activity_d ...@@ -752,10 +752,14 @@ def get_activity_correlations(individual_lec_activities, lec_recorded_activity_d
# this variable will be used to store the correlations # this variable will be used to store the correlations
correlations = [] correlations = []
limit = 10 # limit = 10
limit = len(individual_lec_activities)
data_index = ['lecture-{}'.format(i+1) for i in range(len(individual_lec_activities))] data_index = ['lecture-{}'.format(i+1) for i in range(len(individual_lec_activities))]
# declare the correlation data dictionary
corr_data = {}
# student activity labels # student activity labels
student_activity_labels = ['phone checking', 'listening', 'note taking'] student_activity_labels = ['phone checking', 'listening', 'note taking']
lecturer_activity_labels = ['seated', 'standing', 'walking'] lecturer_activity_labels = ['seated', 'standing', 'walking']
...@@ -772,29 +776,63 @@ def get_activity_correlations(individual_lec_activities, lec_recorded_activity_d ...@@ -772,29 +776,63 @@ def get_activity_correlations(individual_lec_activities, lec_recorded_activity_d
# loop through the lecturer recorded data (lecturer) # loop through the lecturer recorded data (lecturer)
for data in lec_recorded_activity_data: for data in lec_recorded_activity_data:
sitting_perct_list.append(int(data['seated_count'])) value = int(data['seated_count'])
standing_perct_list.append(int(data['standing_count'])) value1 = int(data['standing_count'])
walking_perct_list.append(int(data['walking_count'])) value2 = int(data['walking_count'])
if value != 0:
sitting_perct_list.append(int(data['seated_count']))
if value1 != 0:
standing_perct_list.append(int(data['standing_count']))
if value2 != 0:
walking_perct_list.append(int(data['walking_count']))
# loop through the lecturer recorded data (student) # loop through the lecturer recorded data (student)
for data in individual_lec_activities: for data in individual_lec_activities:
phone_perct_list.append(int(data['phone_perct'])) value = int(data['phone_perct'])
listen_perct_list.append(int(data['listening_perct'])) value1 = int(data['listening_perct'])
note_perct_list.append(int(data['writing_perct'])) value2 = int(data['writing_perct'])
if value != 0:
phone_perct_list.append(int(data['phone_perct']))
if value1 != 0:
listen_perct_list.append(int(data['listening_perct']))
if value2 != 0:
note_perct_list.append(int(data['writing_perct']))
if (len(phone_perct_list)) == len(individual_lec_activities):
corr_data[student_activity_labels[0]] = phone_perct_list
if (len(listen_perct_list)) == len(individual_lec_activities):
corr_data[student_activity_labels[1]] = listen_perct_list
if (len(note_perct_list)) == len(individual_lec_activities):
corr_data[student_activity_labels[2]] = note_perct_list
if (len(sitting_perct_list)) == len(individual_lec_activities):
corr_data[lecturer_activity_labels[0]] = sitting_perct_list
if (len(standing_perct_list)) == len(individual_lec_activities):
corr_data[lecturer_activity_labels[1]] = standing_perct_list
if (len(walking_perct_list)) == len(individual_lec_activities):
corr_data[lecturer_activity_labels[2]] = walking_perct_list
corr_data = {'phone checking': phone_perct_list, 'listening': listen_perct_list, 'note taking': note_perct_list,
'seated': sitting_perct_list, 'standing': standing_perct_list, 'walking': walking_perct_list}
# corr_data = {'phone checking': phone_perct_list, 'listening': listen_perct_list, 'note taking': note_perct_list,
# 'seated': sitting_perct_list, 'standing': standing_perct_list, 'walking': walking_perct_list}
# create the dataframe # create the dataframe
df = pd.DataFrame(corr_data, index=data_index) df = pd.DataFrame(corr_data, index=data_index)
print(df)
# calculate the correlation # calculate the correlation
pd_series = ut.get_top_abs_correlations(df, limit) pd_series = ut.get_top_abs_correlations(df, limit)
print('====correlated variables=====') print('====correlated variables=====')
print(pd_series) print(pd_series)
# assign a new value to the 'limit' variable
limit = len(pd_series) if len(pd_series) < limit else limit
for i in range(limit): for i in range(limit):
# this dictionary will get the pandas.Series object's indices and values separately # this dictionary will get the pandas.Series object's indices and values separately
corr_dict = {} corr_dict = {}
......
...@@ -14,4 +14,11 @@ def batch_process(video_id, video_name): ...@@ -14,4 +14,11 @@ def batch_process(video_id, video_name):
gaze_resp = requests.get('http://127.0.0.1:8000/process-lecture-gaze-estimation/?lecture_video_name=' + video_name + '&lecture_video_id=' + video_id) gaze_resp = requests.get('http://127.0.0.1:8000/process-lecture-gaze-estimation/?lecture_video_name=' + video_name + '&lecture_video_id=' + video_id)
pass pass
\ No newline at end of file
# this method will save the lecture video
def save_student_lecture_video(student_video):
# call the API
student_video_save_resp = requests.post('http://127.0.0.1:8000/lecture-video', student_video)
\ No newline at end of file
...@@ -1007,10 +1007,14 @@ def get_gaze_correlations(individual_lec_gaze, lec_recorded_activity_data): ...@@ -1007,10 +1007,14 @@ def get_gaze_correlations(individual_lec_gaze, lec_recorded_activity_data):
# this variable will be used to store the correlations # this variable will be used to store the correlations
correlations = [] correlations = []
limit = 10 # limit = 10
limit = len(individual_lec_gaze)
data_index = ['lecture-{}'.format(i + 1) for i in range(len(individual_lec_gaze))] data_index = ['lecture-{}'.format(i + 1) for i in range(len(individual_lec_gaze))]
# declare the correlation data dictionary
corr_data = {}
# student gaze labels # student gaze labels
student_gaze_labels = ['Up and Right', 'Up and Left', 'Down and Right', 'Down and Left', 'Front'] student_gaze_labels = ['Up and Right', 'Up and Left', 'Down and Right', 'Down and Left', 'Front']
lecturer_activity_labels = ['seated', 'standing', 'walking'] lecturer_activity_labels = ['seated', 'standing', 'walking']
...@@ -1029,28 +1033,72 @@ def get_gaze_correlations(individual_lec_gaze, lec_recorded_activity_data): ...@@ -1029,28 +1033,72 @@ def get_gaze_correlations(individual_lec_gaze, lec_recorded_activity_data):
# loop through the lecturer recorded data (lecturer) # loop through the lecturer recorded data (lecturer)
for data in lec_recorded_activity_data: for data in lec_recorded_activity_data:
sitting_perct_list.append(int(data['seated_count'])) value = int(data['seated_count'])
standing_perct_list.append(int(data['standing_count'])) value1 = int(data['standing_count'])
walking_perct_list.append(int(data['walking_count'])) value2 = int(data['walking_count'])
if value != 0:
sitting_perct_list.append(int(data['seated_count']))
if value1 != 0:
standing_perct_list.append(int(data['standing_count']))
if value2 != 0:
walking_perct_list.append(int(data['walking_count']))
# loop through the lecturer recorded data (student) # loop through the lecturer recorded data (student)
for data in individual_lec_gaze: for data in individual_lec_gaze:
upright_perct_list.append(int(data['looking_up_and_right_perct'])) value = int(data['looking_up_and_right_perct'])
upleft_perct_list.append(int(data['looking_up_and_left_perct'])) value1 = int(data['looking_up_and_left_perct'])
downright_perct_list.append(int(data['looking_down_and_right_perct'])) value2 = int(data['looking_down_and_right_perct'])
downleft_perct_list.append(int(data['looking_down_and_left_perct'])) value3 = int(data['looking_down_and_left_perct'])
front_perct_list.append(int(data['looking_front_perct'])) value4 = int(data['looking_front_perct'])
corr_data = {'Up and Right': upright_perct_list, 'Up and Left': upleft_perct_list, 'Down and Right': downright_perct_list, if value != 0:
'Down and Left': downleft_perct_list, 'Front': front_perct_list, upright_perct_list.append(int(data['looking_up_and_right_perct']))
'seated': sitting_perct_list, 'standing': standing_perct_list, 'walking': walking_perct_list} if value1 != 0:
upleft_perct_list.append(int(data['looking_up_and_left_perct']))
if value2 != 0:
downright_perct_list.append(int(data['looking_down_and_right_perct']))
if value3 != 0:
downleft_perct_list.append(int(data['looking_down_and_left_perct']))
if value4 != 0:
front_perct_list.append(int(data['looking_front_perct']))
if (len(upright_perct_list)) == len(individual_lec_gaze):
corr_data[student_gaze_labels[0]] = upright_perct_list
if (len(upleft_perct_list)) == len(individual_lec_gaze):
corr_data[student_gaze_labels[1]] = upleft_perct_list
if (len(downright_perct_list)) == len(individual_lec_gaze):
corr_data[student_gaze_labels[2]] = downright_perct_list
if (len(downleft_perct_list)) == len(individual_lec_gaze):
corr_data[student_gaze_labels[3]] = downleft_perct_list
if (len(front_perct_list)) == len(individual_lec_gaze):
corr_data[student_gaze_labels[4]] = front_perct_list
if (len(sitting_perct_list)) == len(individual_lec_gaze):
corr_data[lecturer_activity_labels[0]] = sitting_perct_list
if (len(standing_perct_list)) == len(individual_lec_gaze):
corr_data[lecturer_activity_labels[1]] = standing_perct_list
if (len(walking_perct_list)) == len(individual_lec_gaze):
corr_data[lecturer_activity_labels[2]] = walking_perct_list
# corr_data = {'Up and Right': upright_perct_list, 'Up and Left': upleft_perct_list, 'Down and Right': downright_perct_list,
# 'Down and Left': downleft_perct_list, 'Front': front_perct_list,
# 'seated': sitting_perct_list, 'standing': standing_perct_list, 'walking': walking_perct_list}
# create the dataframe # create the dataframe
df = pd.DataFrame(corr_data, index=data_index) df = pd.DataFrame(corr_data, index=data_index)
print(df)
# calculate the correlation # calculate the correlation
pd_series = ut.get_top_abs_correlations(df, limit) pd_series = ut.get_top_abs_correlations(df, limit)
print('====correlated variables=====')
print(pd_series)
# assign a new value to the 'limit' variable
limit = len(pd_series) if len(pd_series) < limit else limit
for i in range(limit): for i in range(limit):
# this dictionary will get the pandas.Series object's indices and values separately # this dictionary will get the pandas.Series object's indices and values separately
......
# this method will remove the redundant pairs in pandas dataframe
def get_redundant_pairs(df): def get_redundant_pairs(df):
'''Get diagonal and lower triangular pairs of correlation matrix''' '''Get diagonal and lower triangular pairs of correlation matrix'''
pairs_to_drop = set() pairs_to_drop = set()
...@@ -8,6 +9,7 @@ def get_redundant_pairs(df): ...@@ -8,6 +9,7 @@ def get_redundant_pairs(df):
pairs_to_drop.add((cols[i], cols[j])) pairs_to_drop.add((cols[i], cols[j]))
return pairs_to_drop return pairs_to_drop
# this method will return the top specified correlations
def get_top_abs_correlations(df, n): def get_top_abs_correlations(df, n):
au_corr = df.corr().abs().unstack() au_corr = df.corr().abs().unstack()
labels_to_drop = get_redundant_pairs(df) labels_to_drop = get_redundant_pairs(df)
......
...@@ -74,6 +74,8 @@ ...@@ -74,6 +74,8 @@
real_class = '.' + real_class; real_class = '.' + real_class;
let date = e.target.parentNode.parentNode.firstChild.innerHTML; let date = e.target.parentNode.parentNode.firstChild.innerHTML;
//assign the date
global_lecture_date = date;
fetch('http://127.0.0.1:8000/get-lecture-emotion-availability/?lecturer=' + global_lecturer + '&date=' + date + '&index=' + global_lecturer_subject_index) fetch('http://127.0.0.1:8000/get-lecture-emotion-availability/?lecturer=' + global_lecturer + '&date=' + date + '&index=' + global_lecturer_subject_index)
.then((res) => res.json()) .then((res) => res.json())
...@@ -246,6 +248,11 @@ ...@@ -246,6 +248,11 @@
$('#student_video').attr('src', video_src); $('#student_video').attr('src', video_src);
{#fetch('http://127.0.0.1:8000/get-random-number')#}
{#.then((res) => res.json())#}
{#.then((out) => alert(out.response))#}
{#.catch((err) => alert('err: ' + err));#}
//fetch the lecture recorded video name //fetch the lecture recorded video name
fetch('http://127.0.0.1:8000/get-lecture-recorded-video-name/?lecturer=' + global_lecturer + '&subject=' + global_subject + '&date=' + global_lecture_date) fetch('http://127.0.0.1:8000/get-lecture-recorded-video-name/?lecturer=' + global_lecturer + '&subject=' + global_subject + '&date=' + global_lecture_date)
.then((res) => res.json()) .then((res) => res.json())
...@@ -255,6 +262,7 @@ ...@@ -255,6 +262,7 @@
{#global_lecturer_video_name = "Test_1.mp4";#} {#global_lecturer_video_name = "Test_1.mp4";#}
{#global_lecturer_video_name = "Test_2.mp4";#} {#global_lecturer_video_name = "Test_2.mp4";#}
{#global_lecturer_video_name = "Test_3.mp4";#} {#global_lecturer_video_name = "Test_3.mp4";#}
{#global_lecturer_video_name = "Lecturer_Video_4.mp4";#}
{##} {##}
{#//define the lecturer video src#} {#//define the lecturer video src#}
{#let lecturer_video_src = "{% static '' %}FirstApp/lecturer_videos/" + global_lecturer_video_name;#} {#let lecturer_video_src = "{% static '' %}FirstApp/lecturer_videos/" + global_lecturer_video_name;#}
...@@ -268,11 +276,11 @@ ...@@ -268,11 +276,11 @@
//fetch data from the API {#//fetch data from the API#}
fetch('http://127.0.0.1:8000/get-lecture-emotion-for-frame?video_name=' + global_video_name) {#fetch('http://127.0.0.1:8000/get-lecture-emotion-for-frame?video_name=' + global_video_name)#}
.then((res) => res.json()) {# .then((res) => res.json())#}
.then((out) => displayEmotionRecognitionForFrame(out.response)) {# .then((out) => displayEmotionRecognitionForFrame(out.response))#}
.catch((err) => alert('error: ' + err)); {# .catch((err) => alert('error: ' + err));#}
}); });
...@@ -290,6 +298,12 @@ ...@@ -290,6 +298,12 @@
$('#lecturer_video').attr('src', lecturer_video_src); $('#lecturer_video').attr('src', lecturer_video_src);
$('#integrate_modal').modal(); $('#integrate_modal').modal();
//fetch data from the API
fetch('http://127.0.0.1:8000/get-lecture-emotion-for-frame?video_name=' + global_video_name)
.then((res) => res.json())
.then((out) => displayEmotionRecognitionForFrame(out.response))
.catch((err) => alert('error: ' + err));
} }
...@@ -362,7 +376,7 @@ ...@@ -362,7 +376,7 @@
fetch('http://127.0.0.1:8000/lecturer/get-lecturer-video-frame-recognitions/?video_name=' + global_lecturer_video_name) fetch('http://127.0.0.1:8000/lecturer/get-lecturer-video-frame-recognitions/?video_name=' + global_lecturer_video_name)
.then((res) => res.json()) .then((res) => res.json())
.then((out) => displayLecturerEmotionRecognitionForFrame(out)) .then((out) => displayLecturerEmotionRecognitionForFrame(out))
.catch((err) => alert('error: ' + err)) .catch((err) => alert('error: ' + err));
} }
......
...@@ -74,6 +74,8 @@ ...@@ -74,6 +74,8 @@
real_class = '.' + real_class; real_class = '.' + real_class;
let date = e.target.parentNode.parentNode.firstChild.innerHTML; let date = e.target.parentNode.parentNode.firstChild.innerHTML;
//assign the date
global_lecture_date = date;
fetch('http://127.0.0.1:8000/get-lecture-video-gaze-estimation-availability/?lecturer=' + global_lecturer + '&date=' + date + '&index=' + global_lecturer_subject_index) fetch('http://127.0.0.1:8000/get-lecture-video-gaze-estimation-availability/?lecturer=' + global_lecturer + '&date=' + date + '&index=' + global_lecturer_subject_index)
.then((res) => res.json()) .then((res) => res.json())
...@@ -249,6 +251,18 @@ ...@@ -249,6 +251,18 @@
.then((out) => assignLecturerRecordedVideoName(out)) .then((out) => assignLecturerRecordedVideoName(out))
.catch((err) => alert('error: ' + err)); .catch((err) => alert('error: ' + err));
{#global_lecturer_video_name = "Test_1.mp4";#}
{#global_lecturer_video_name = "Test_2.mp4";#}
{#global_lecturer_video_name = "Test_3.mp4";#}
{#global_lecturer_video_name = "Lecturer_Video_4.mp4";#}
{##}
{#//define the lecturer video src#}
{#let lecturer_video_src = "{% static '' %}FirstApp/lecturer_videos/" + global_lecturer_video_name;#}
{##}
{#//assign the video src#}
{#$('#lecturer_video').attr('src', lecturer_video_src);#}
{##}
{#$('#integrate_modal').modal();#}
//fetch data from the API //fetch data from the API
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
{% block head %} {% block head %}
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content=""> <meta name="description" content="">
<meta name="author" content=""> <meta name="author" content="">
<title>SLPES</title> <title>SLPES</title>
{% load static %} {% load static %}
<link rel="shortcut icon" href="{% static 'FirstApp/images/favicon.ico' %}" type="image/x-icon" /> <link rel="shortcut icon" href="{% static 'FirstApp/images/favicon.ico' %}" type="image/x-icon"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
<link rel="stylesheet" href="{% static 'FirstApp/css/sb-admin-2.min.css' %}"> integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
<link rel="stylesheet" href="{% static 'FirstApp/css/slider.css' %}"> crossorigin="anonymous">
<link href="{% static 'FirstApp/vendor/fontawesome-free/css/all.min.css' %}" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="{% static 'FirstApp/css/sb-admin-2.min.css' %}">
<link href="{% static 'FirstApp/css/snackbar.css' %}" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="{% static 'FirstApp/css/slider.css' %}">
<link href="{% static 'FirstApp/vendor/fontawesome-free/css/all.min.css' %}" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet"> <link href="{% static 'FirstApp/css/snackbar.css' %}" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="{% static 'FirstApp/css/all.min.css' %}">
<link href="{% static 'FirstApp/vendor/datatables/dataTables.bootstrap4.min.css' %}" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">
<!-- this link will import process workflow CSS --> <link rel="stylesheet" href="{% static 'FirstApp/css/all.min.css' %}">
<link href="{% static 'FirstApp/css/process-worflow.css' %}" rel="stylesheet" type="text/css"> <link href="{% static 'FirstApp/vendor/datatables/dataTables.bootstrap4.min.css' %}" rel="stylesheet">
</head> <!-- this link will import process workflow CSS -->
<link href="{% static 'FirstApp/css/process-worflow.css' %}" rel="stylesheet" type="text/css">
</head>
{% endblock %} {% endblock %}
<body id="page-top"> <body id="page-top">
<!-- Page Wrapper --> <!-- Page Wrapper -->
{% block javascript %} {% block javascript %}
{% load static %} {% load static %}
<script type="text/javascript" src="{% static 'FirstApp/vendor/jquery/jquery.js' %}"></script> <script type="text/javascript" src="{% static 'FirstApp/vendor/jquery/jquery.js' %}"></script>
<script src="{% static 'FirstApp/vendor/jquery/jquery.js' %}"></script> <script src="{% static 'FirstApp/vendor/jquery/jquery.js' %}"></script>
<script src="{% static 'FirstApp/vendor/bootstrap/js/bootstrap.bundle.min.js' %}"></script> <script src="{% static 'FirstApp/vendor/bootstrap/js/bootstrap.bundle.min.js' %}"></script>
{% endblock %} {% endblock %}
<div id="wrapper"> <div id="wrapper">
<!-- Sidebar --> <!-- Sidebar -->
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar"> <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
<!-- Sidebar - Brand --> <!-- Sidebar - Brand -->
<a class="sidebar-brand d-flex align-items-center justify-content-center" href="/"> <a class="sidebar-brand d-flex align-items-center justify-content-center" href="/">
<div class="sidebar-brand-icon rotate-n-15"> {# <div class="sidebar-brand-icon rotate-n-15">#}
<i class="fas fa-laugh-wink"></i> {# <i class="fas fa-laugh-wink"></i>#}
</div> {# </div>#}
<div class="sidebar-brand-icon">
<i class="fas fa-chalkboard-teacher"></i>
</div>
{% if request.session.user_type == "Lecturer" %} {% if request.session.user_type == "Lecturer" %}
<div class="sidebar-brand-text mx-3">SLPES Lecturer</div> <div class="sidebar-brand-text mx-3">SLPES Lecturer</div>
{% endif %} {% endif %}
{% if request.session.user_type == "Admin" %} {% if request.session.user_type == "Admin" %}
<div class="sidebar-brand-text mx-3">SLPES Admin</div> <div class="sidebar-brand-text mx-3">SLPES Admin</div>
{% endif %} {% endif %}
</a> </a>
<!-- Divider --> <!-- Divider -->
<hr class="sidebar-divider my-0"> <hr class="sidebar-divider my-0">
<!-- Nav Item - Dashboard --> <!-- Nav Item - Dashboard -->
<li class="nav-item active"> <li class="nav-item active">
<a class="nav-link" href="/"> <a class="nav-link" href="/">
<i class="fas fa-fw fa-tachometer-alt"></i> <i class="fas fa-fw fa-tachometer-alt"></i>
<span>Dashboard</span></a> <span>Dashboard</span></a>
</li> </li>
<!-- Divider --> <!-- Divider -->
<hr class="sidebar-divider"> <hr class="sidebar-divider">
<!-- Heading --> <!-- Heading -->
<div class="sidebar-heading"> <div class="sidebar-heading">
Interface Interface
</div> </div>
{% if request.session.user_type == "Lecturer" %} {% if request.session.user_type == "Lecturer" %}
<!-- Nav Item - Pages Collapse Menu --> <!-- Nav Item - Pages Collapse Menu -->
<li class="nav-item"> <li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo"> <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo"
<i class="fas fa-fw fa-cog"></i> aria-expanded="true" aria-controls="collapseTwo">
<span>Estimations</span> <i class="fa fa-calculator" aria-hidden="true"></i>
</a> <span>Estimations</span>
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar"> </a>
<div class="bg-white py-2 collapse-inner rounded"> <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
<h6 class="collapse-header">Components:</h6> <div class="bg-white py-2 collapse-inner rounded">
{# <a class="collapse-item" href="/pose">Pose</a>#} <h6 class="collapse-header">Components:</h6>
<a class="collapse-item" href="/gaze">Gaze</a> {# <a class="collapse-item" href="/pose">Pose</a>#}
<a class="collapse-item" href="/emotion">Emotion</a> <a class="collapse-item" href="/gaze">Gaze</a>
<a class="collapse-item" href="/activity">Activity</a> <a class="collapse-item" href="/emotion">Emotion</a>
</div>ac <a class="collapse-item" href="/activity">Activity</a>
</div> </div>
</li> ac
</div>
</li>
<!-- Nav Item - Pages Collapse Menu --> <!-- Nav Item - Pages Collapse Menu -->
<li class="nav-item"> <li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseThree" aria-expanded="true" aria-controls="collapseThree"> <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseThree"
<i class="fas fa-fw fa-cog"></i> aria-expanded="true" aria-controls="collapseThree">
<span>Lecture</span> <i class="fa fa-graduation-cap" aria-hidden="true"></i>
</a> <span>Lecture</span>
<div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordionSidebar"> </a>
<div class="bg-white py-2 collapse-inner rounded"> <div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordionSidebar">
<h6 class="collapse-header">Components:</h6> <div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item" href="/summary/lecture">Summarization</a> <h6 class="collapse-header">Components:</h6>
</div> <a class="collapse-item" href="/summary/lecture">Summarization</a>
</div> </div>
</li> </div>
</li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseFour" aria-expanded="true" aria-controls="collapseThree"> <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseFour"
<i class="fas fa-fw fa-cog"></i> aria-expanded="true" aria-controls="collapseThree">
<span>Attendance</span> <i class="fa fa-eye" aria-hidden="true"></i>
</a> <span>Attendance</span>
<div id="collapseFour" class="collapse" aria-labelledby="headingThree" data-parent="#accordionSidebar"> </a>
<div class="bg-white py-2 collapse-inner rounded"> <div id="collapseFour" class="collapse" aria-labelledby="headingThree" data-parent="#accordionSidebar">
<h6 class="collapse-header">Components:</h6> <div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item" href="/attendance/initiate-lecture">initiate lecture</a> <h6 class="collapse-header">Components:</h6>
</div> <a class="collapse-item" href="/attendance/initiate-lecture">initiate lecture</a>
</div> </div>
</li> </div>
</li>
<!-- Nav Item - Utilities Collapse Menu --> <!-- Nav Item - Utilities Collapse Menu -->
<li class="nav-item"> <li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseUtilities" aria-expanded="true" aria-controls="collapseUtilities"> <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseUtilities"
<i class="fas fa-fw fa-wrench"></i> aria-expanded="true" aria-controls="collapseUtilities">
<span>Utilities</span> <i class="fas fa-fw fa-wrench"></i>
</a> <span>Utilities</span>
<div id="collapseUtilities" class="collapse" aria-labelledby="headingUtilities" data-parent="#accordionSidebar"> </a>
<div class="bg-white py-2 collapse-inner rounded"> <div id="collapseUtilities" class="collapse" aria-labelledby="headingUtilities"
<h6 class="collapse-header">Custom Utilities:</h6> data-parent="#accordionSidebar">
{# <a class="collapse-item" href="/extract">Video Extractor</a>#} <div class="bg-white py-2 collapse-inner rounded">
<a class="collapse-item" href="/video_result">Video Results</a> <h6 class="collapse-header">Custom Utilities:</h6>
{# <a class="collapse-item" href="utilities-animation.html">Animations</a>#} {# <a class="collapse-item" href="/extract">Video Extractor</a>#}
{# <a class="collapse-item" href="utilities-other.html">Other</a>#} <a class="collapse-item" href="/video_result">Video Results</a>
</div> {# <a class="collapse-item" href="utilities-animation.html">Animations</a>#}
</div> {# <a class="collapse-item" href="utilities-other.html">Other</a>#}
</li> </div>
</div>
</li>
{% endif %} {% endif %}
{% if request.session.user_type == "Admin" %} {% if request.session.user_type == "Admin" %}
<!-- Nav Item - Pages Collapse Menu --> <!-- Nav Item - Pages Collapse Menu -->
<li class="nav-item"> <li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePages" <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePages"
aria-expanded="true" aria-controls="collapsePages"> aria-expanded="true" aria-controls="collapsePages">
<i class="fas fa-fw fa-folder"></i> <i class="fas fa-fw fa-folder"></i>
<span>Pages</span> <span>Pages</span>
</a> </a>
<div id="collapsePages" class="collapse" aria-labelledby="headingPages" data-parent="#accordionSidebar"> <div id="collapsePages" class="collapse" aria-labelledby="headingPages" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded"> <div class="bg-white py-2 collapse-inner rounded">
<!-- <h6 class="collapse-header">Login Screens:</h6>--> <!-- <h6 class="collapse-header">Login Screens:</h6>-->
<a class="collapse-item" href="/lecturer">Dashboard</a> <a class="collapse-item" href="/lecturer">Dashboard</a>
<a class="collapse-item" href="/lecturer/lecture-video">Video Page</a> <a class="collapse-item" href="/lecturer/lecture-video">Video Page</a>
</div>
</div> </div>
</div> </li>
</li> {% endif %}
{% endif %}
<!-- Divider -->
<!-- Divider --> <hr class="sidebar-divider">
<hr class="sidebar-divider">
{# <!-- Heading -->#}
{# <!-- Heading -->#} {# <div class="sidebar-heading">#}
{# <div class="sidebar-heading">#} {# Addons#}
{# Addons#} {# </div>#}
{# </div>#}
<!-- Nav Item - Pages Collapse Menu -->
<!-- Nav Item - Pages Collapse Menu --> {# <li class="nav-item">#}
{# <li class="nav-item">#} {# <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePages" aria-expanded="true" aria-controls="collapsePages">#}
{# <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePages" aria-expanded="true" aria-controls="collapsePages">#} {# <i class="fas fa-fw fa-folder"></i>#}
{# <i class="fas fa-fw fa-folder"></i>#} {# <span>Pages</span>#}
{# <span>Pages</span>#} {# </a>#}
{# </a>#} {# <div id="collapsePages" class="collapse" aria-labelledby="headingPages" data-parent="#accordionSidebar">#}
{# <div id="collapsePages" class="collapse" aria-labelledby="headingPages" data-parent="#accordionSidebar">#} {# <div class="bg-white py-2 collapse-inner rounded">#}
{# <div class="bg-white py-2 collapse-inner rounded">#} {# <h6 class="collapse-header">Login Screens:</h6>#}
{# <h6 class="collapse-header">Login Screens:</h6>#} {# <a class="collapse-item" href="/login">Login</a>#}
{# <a class="collapse-item" href="/login">Login</a>#} {# <a class="collapse-item" href="/register">Register</a>#}
{# <a class="collapse-item" href="/register">Register</a>#} {# <a class="collapse-item" href="/forgot-password">Forgot Password</a>#}
{# <a class="collapse-item" href="/forgot-password">Forgot Password</a>#} {# <div class="collapse-divider"></div>#}
{# <div class="collapse-divider"></div>#} {# <h6 class="collapse-header">Other Pages:</h6>#}
{# <h6 class="collapse-header">Other Pages:</h6>#} {# <a class="collapse-item" href="/404">404 Page</a>#}
{# <a class="collapse-item" href="/404">404 Page</a>#} {# <a class="collapse-item" href="/blank">Blank Page</a>#}
{# <a class="collapse-item" href="/blank">Blank Page</a>#} {# </div>#}
{# </div>#} {# </div>#}
{# </div>#} {# </li>#}
{# </li>#}
{# <!-- Nav Item - Charts -->#}
{# <!-- Nav Item - Charts -->#} {# <li class="nav-item">#}
{# <li class="nav-item">#} {# <a class="nav-link" href="charts.html">#}
{# <a class="nav-link" href="charts.html">#} {# <i class="fas fa-fw fa-chart-area"></i>#}
{# <i class="fas fa-fw fa-chart-area"></i>#} {# <span>Charts</span></a>#}
{# <span>Charts</span></a>#} {# </li>#}
{# </li>#} {##}
{##} {# <!-- Nav Item - Tables -->#}
{# <!-- Nav Item - Tables -->#} {# <li class="nav-item">#}
{# <li class="nav-item">#} {# <a class="nav-link" href="/tables">#}
{# <a class="nav-link" href="/tables">#} {# <i class="fas fa-fw fa-table"></i>#}
{# <i class="fas fa-fw fa-table"></i>#} {# <span>Tables</span></a>#}
{# <span>Tables</span></a>#} {# </li>#}
{# </li>#}
<!-- Divider -->
<!-- Divider --> <hr class="sidebar-divider d-none d-md-block">
<hr class="sidebar-divider d-none d-md-block">
<!-- Sidebar Toggler (Sidebar) -->
<!-- Sidebar Toggler (Sidebar) --> <div class="text-center d-none d-md-inline">
<div class="text-center d-none d-md-inline"> <button class="rounded-circle border-0" id="sidebarToggle"></button>
<button class="rounded-circle border-0" id="sidebarToggle"></button> </div>
</div>
</ul> </ul>
...@@ -219,248 +231,257 @@ ...@@ -219,248 +231,257 @@
<div id="content-wrapper" class="d-flex flex-column"> <div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content --> <!-- Main Content -->
<div id="content"> <div id="content">
<!-- Topbar --> <!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow"> <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
<!-- Sidebar Toggle (Topbar) --> <!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3"> <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i> <i class="fa fa-bars"></i>
</button> </button>
<!-- Topbar Search --> <!-- Topbar Search -->
{# <form class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">#} {# <form class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">#}
{# <div class="input-group">#} {# <div class="input-group">#}
{# <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">#} {# <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">#}
{# <div class="input-group-append">#} {# <div class="input-group-append">#}
{# <button class="btn btn-primary" type="button">#} {# <button class="btn btn-primary" type="button">#}
{# <i class="fas fa-search fa-sm"></i>#} {# <i class="fas fa-search fa-sm"></i>#}
{# </button>#} {# </button>#}
{# </div>#} {# </div>#}
{# </div>#} {# </div>#}
{# </form>#} {# </form>#}
<!-- Topbar Navbar --> <!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto"> <ul class="navbar-nav ml-auto">
<!-- Nav Item - Search Dropdown (Visible Only XS) --> <!-- Nav Item - Search Dropdown (Visible Only XS) -->
{# <li class="nav-item dropdown no-arrow d-sm-none">#} {# <li class="nav-item dropdown no-arrow d-sm-none">#}
{# <a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">#} {# <a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">#}
{# <i class="fas fa-search fa-fw"></i>#} {# <i class="fas fa-search fa-fw"></i>#}
{# </a>#} {# </a>#}
{# <!-- Dropdown - Messages -->#} {# <!-- Dropdown - Messages -->#}
{# <div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in" aria-labelledby="searchDropdown">#} {# <div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in" aria-labelledby="searchDropdown">#}
{# <form class="form-inline mr-auto w-100 navbar-search">#} {# <form class="form-inline mr-auto w-100 navbar-search">#}
{# <div class="input-group">#} {# <div class="input-group">#}
{# <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">#} {# <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">#}
{# <div class="input-group-append">#} {# <div class="input-group-append">#}
{# <button class="btn btn-primary" type="button">#} {# <button class="btn btn-primary" type="button">#}
{# <i class="fas fa-search fa-sm"></i>#} {# <i class="fas fa-search fa-sm"></i>#}
{# </button>#} {# </button>#}
{# </div>#} {# </div>#}
{# </div>#} {# </div>#}
{# </form>#} {# </form>#}
{# </div>#} {# </div>#}
{# </li>#} {# </li>#}
{##} {##}
{# <!-- Nav Item - Alerts -->#} {# <!-- Nav Item - Alerts -->#}
{# <li class="nav-item dropdown no-arrow mx-1">#} {# <li class="nav-item dropdown no-arrow mx-1">#}
{# <a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">#} {# <a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">#}
{# <i class="fas fa-bell fa-fw"></i>#} {# <i class="fas fa-bell fa-fw"></i>#}
{# <!-- Counter - Alerts -->#} {# <!-- Counter - Alerts -->#}
{# <span class="badge badge-danger badge-counter">3+</span>#} {# <span class="badge badge-danger badge-counter">3+</span>#}
{# </a>#} {# </a>#}
{# <!-- Dropdown - Alerts -->#} {# <!-- Dropdown - Alerts -->#}
{# <div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="alertsDropdown">#} {# <div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="alertsDropdown">#}
{# <h6 class="dropdown-header">#} {# <h6 class="dropdown-header">#}
{# Alerts Center#} {# Alerts Center#}
{# </h6>#} {# </h6>#}
{# <a class="dropdown-item d-flex align-items-center" href="#">#} {# <a class="dropdown-item d-flex align-items-center" href="#">#}
{# <div class="mr-3">#} {# <div class="mr-3">#}
{# <div class="icon-circle bg-primary">#} {# <div class="icon-circle bg-primary">#}
{# <i class="fas fa-file-alt text-white"></i>#} {# <i class="fas fa-file-alt text-white"></i>#}
{# </div>#} {# </div>#}
{# </div>#} {# </div>#}
{# <div>#} {# <div>#}
{# <div class="small text-gray-500">December 12, 2019</div>#} {# <div class="small text-gray-500">December 12, 2019</div>#}
{# <span class="font-weight-bold">A new monthly report is ready to download!</span>#} {# <span class="font-weight-bold">A new monthly report is ready to download!</span>#}
{# </div>#} {# </div>#}
{# </a>#} {# </a>#}
{# <a class="dropdown-item d-flex align-items-center" href="#">#} {# <a class="dropdown-item d-flex align-items-center" href="#">#}
{# <div class="mr-3">#} {# <div class="mr-3">#}
{# <div class="icon-circle bg-success">#} {# <div class="icon-circle bg-success">#}
{# <i class="fas fa-donate text-white"></i>#} {# <i class="fas fa-donate text-white"></i>#}
{# </div>#} {# </div>#}
{# </div>#} {# </div>#}
{# <div>#} {# <div>#}
{# <div class="small text-gray-500">December 7, 2019</div>#} {# <div class="small text-gray-500">December 7, 2019</div>#}
{# $290.29 has been deposited into your account!#} {# $290.29 has been deposited into your account!#}
{# </div>#} {# </div>#}
{# </a>#} {# </a>#}
{# <a class="dropdown-item d-flex align-items-center" href="#">#} {# <a class="dropdown-item d-flex align-items-center" href="#">#}
{# <div class="mr-3">#} {# <div class="mr-3">#}
{# <div class="icon-circle bg-warning">#} {# <div class="icon-circle bg-warning">#}
{# <i class="fas fa-exclamation-triangle text-white"></i>#} {# <i class="fas fa-exclamation-triangle text-white"></i>#}
{# </div>#} {# </div>#}
{# </div>#} {# </div>#}
{# <div>#} {# <div>#}
{# <div class="small text-gray-500">December 2, 2019</div>#} {# <div class="small text-gray-500">December 2, 2019</div>#}
{# Spending Alert: We've noticed unusually high spending for your account.#} {# Spending Alert: We've noticed unusually high spending for your account.#}
{# </div>#} {# </div>#}
{# </a>#} {# </a>#}
{# <a class="dropdown-item text-center small text-gray-500" href="#">Show All Alerts</a>#} {# <a class="dropdown-item text-center small text-gray-500" href="#">Show All Alerts</a>#}
{# </div>#} {# </div>#}
{# </li>#} {# </li>#}
<!-- Nav Item - Messages --> <!-- Nav Item - Messages -->
{# <li class="nav-item dropdown no-arrow mx-1">#} {# <li class="nav-item dropdown no-arrow mx-1">#}
{# <a class="nav-link dropdown-toggle" href="#" id="messagesDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">#} {# <a class="nav-link dropdown-toggle" href="#" id="messagesDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">#}
{# <i class="fas fa-envelope fa-fw"></i>#} {# <i class="fas fa-envelope fa-fw"></i>#}
{# <!-- Counter - Messages -->#} {# <!-- Counter - Messages -->#}
{# <span class="badge badge-danger badge-counter">7</span>#} {# <span class="badge badge-danger badge-counter">7</span>#}
{# </a>#} {# </a>#}
{# <!-- Dropdown - Messages -->#} {# <!-- Dropdown - Messages -->#}
{# <div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="messagesDropdown">#} {# <div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="messagesDropdown">#}
{# <h6 class="dropdown-header">#} {# <h6 class="dropdown-header">#}
{# Message Center#} {# Message Center#}
{# </h6>#} {# </h6>#}
{# <a class="dropdown-item d-flex align-items-center" href="#">#} {# <a class="dropdown-item d-flex align-items-center" href="#">#}
{# <div class="dropdown-list-image mr-3">#} {# <div class="dropdown-list-image mr-3">#}
{# <img class="rounded-circle" src="https://source.unsplash.com/fn_BT9fwg_E/60x60" alt="">#} {# <img class="rounded-circle" src="https://source.unsplash.com/fn_BT9fwg_E/60x60" alt="">#}
{# <div class="status-indicator bg-success"></div>#} {# <div class="status-indicator bg-success"></div>#}
{# </div>#} {# </div>#}
{# <div class="font-weight-bold">#} {# <div class="font-weight-bold">#}
{# <div class="text-truncate">Hi there! I am wondering if you can help me with a problem I've been having.</div>#} {# <div class="text-truncate">Hi there! I am wondering if you can help me with a problem I've been having.</div>#}
{# <div class="small text-gray-500">Emily Fowler · 58m</div>#} {# <div class="small text-gray-500">Emily Fowler · 58m</div>#}
{# </div>#} {# </div>#}
{# </a>#} {# </a>#}
{# <a class="dropdown-item d-flex align-items-center" href="#">#} {# <a class="dropdown-item d-flex align-items-center" href="#">#}
{# <div class="dropdown-list-image mr-3">#} {# <div class="dropdown-list-image mr-3">#}
{# <img class="rounded-circle" src="https://source.unsplash.com/AU4VPcFN4LE/60x60" alt="">#} {# <img class="rounded-circle" src="https://source.unsplash.com/AU4VPcFN4LE/60x60" alt="">#}
{# <div class="status-indicator"></div>#} {# <div class="status-indicator"></div>#}
{# </div>#} {# </div>#}
{# <div>#} {# <div>#}
{# <div class="text-truncate">I have the photos that you ordered last month, how would you like them sent to you?</div>#} {# <div class="text-truncate">I have the photos that you ordered last month, how would you like them sent to you?</div>#}
{# <div class="small text-gray-500">Jae Chun · 1d</div>#} {# <div class="small text-gray-500">Jae Chun · 1d</div>#}
{# </div>#} {# </div>#}
{# </a>#} {# </a>#}
{# <a class="dropdown-item d-flex align-items-center" href="#">#} {# <a class="dropdown-item d-flex align-items-center" href="#">#}
{# <div class="dropdown-list-image mr-3">#} {# <div class="dropdown-list-image mr-3">#}
{# <img class="rounded-circle" src="https://source.unsplash.com/CS2uCrpNzJY/60x60" alt="">#} {# <img class="rounded-circle" src="https://source.unsplash.com/CS2uCrpNzJY/60x60" alt="">#}
{# <div class="status-indicator bg-warning"></div>#} {# <div class="status-indicator bg-warning"></div>#}
{# </div>#} {# </div>#}
{# <div>#} {# <div>#}
{# <div class="text-truncate">Last month's report looks great, I am very happy with the progress so far, keep up the good work!</div>#} {# <div class="text-truncate">Last month's report looks great, I am very happy with the progress so far, keep up the good work!</div>#}
{# <div class="small text-gray-500">Morgan Alvarez · 2d</div>#} {# <div class="small text-gray-500">Morgan Alvarez · 2d</div>#}
{# </div>#} {# </div>#}
{# </a>#} {# </a>#}
{# <a class="dropdown-item d-flex align-items-center" href="#">#} {# <a class="dropdown-item d-flex align-items-center" href="#">#}
{# <div class="dropdown-list-image mr-3">#} {# <div class="dropdown-list-image mr-3">#}
{# <img class="rounded-circle" src="https://source.unsplash.com/Mv9hjnEUHR4/60x60" alt="">#} {# <img class="rounded-circle" src="https://source.unsplash.com/Mv9hjnEUHR4/60x60" alt="">#}
{# <div class="status-indicator bg-success"></div>#} {# <div class="status-indicator bg-success"></div>#}
{# </div>#} {# </div>#}
{# <div>#} {# <div>#}
{# <div class="text-truncate">Am I a good boy? The reason I ask is because someone told me that people say this to all dogs, even if they aren't good...</div>#} {# <div class="text-truncate">Am I a good boy? The reason I ask is because someone told me that people say this to all dogs, even if they aren't good...</div>#}
{# <div class="small text-gray-500">Chicken the Dog · 2w</div>#} {# <div class="small text-gray-500">Chicken the Dog · 2w</div>#}
{# </div>#} {# </div>#}
{# </a>#} {# </a>#}
{# <a class="dropdown-item text-center small text-gray-500" href="#">Read More Messages</a>#} {# <a class="dropdown-item text-center small text-gray-500" href="#">Read More Messages</a>#}
{# </div>#} {# </div>#}
{# </li>#} {# </li>#}
<div class="topbar-divider d-none d-sm-block"></div> <div class="topbar-divider d-none d-sm-block"></div>
<!-- Nav Item - User Information --> <!-- Nav Item - User Information -->
<li class="nav-item dropdown no-arrow"> <li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
<span class="mr-2 d-none d-lg-inline text-gray-600 small">{{ request.user.username }}</span> data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% load static %} <span class="mr-2 d-none d-lg-inline text-gray-600 small">{{ request.user.username }}</span>
<img class="img-profile rounded-circle" src="{% static 'FirstApp/images/user_profile.png' %}"> {% load static %}
</a> <img class="img-profile rounded-circle"
<!-- Dropdown - User Information --> src="{% static 'FirstApp/images/user_profile.png' %}">
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown"> </a>
<a class="dropdown-item" href="#"> <!-- Dropdown - User Information -->
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i> <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
Profile aria-labelledby="userDropdown">
</a> {# <a class="dropdown-item" href="#">#}
<a class="dropdown-item" href="#"> {# <i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>#}
<i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i> {# Profile#}
Settings {# </a>#}
</a> {# <a class="dropdown-item" href="#">#}
<a class="dropdown-item" href="#"> {# <i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>#}
<i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i> {# Settings#}
Activity Log {# </a>#}
</a> {# <a class="dropdown-item" href="#">#}
<div class="dropdown-divider"></div> {# <i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>#}
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal"> {# Activity Log#}
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i> {# </a>#}
Logout {# <div class="dropdown-divider"></div>#}
</a> <a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
</div> <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
</li> Logout
</a>
</div>
</li>
</ul>
</nav>
<!-- End of Topbar -->
{% block 'container-fluid' %}
{% load static %}
{% endblock %}
</div>
</ul> {% block 'footer' %}
<footer class="sticky-footer bg-white">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>Copyright &copy; Student and Lecturer Performance Enhancement System 2019</span>
</div>
</div>
</footer>
{% endblock %}
</div>
</div>
</nav> {% block 'modal' %}
<!-- End of Topbar --> {% load static %}
<script type="text/javascript" src="{% static 'FirstApp/vendor/jquery/jquery.js' %}"></script>
<script src="{% static 'FirstApp/vendor/jquery/jquery.js' %}"></script>
<script src="{% static 'FirstApp/vendor/bootstrap/js/bootstrap.bundle.min.js' %}"></script>
{% block 'container-fluid' %}
{% load static %} <a class="scroll-to-top rounded" href="#page-top">
{% endblock %} <i class="fas fa-angle-up"></i>
</div> </a>
{% block 'footer' %}
<footer class="sticky-footer bg-white"> <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
<div class="container my-auto"> aria-hidden="true">
<div class="copyright text-center my-auto"> <div class="modal-dialog" role="document">
<span>Copyright &copy; Student and Lecturer Performance Enhancement System 2019</span> <div class="modal-content">
</div> <div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
<div class="modal-footer">
<button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
<a class="btn btn-primary" href="/logout">Logout</a>
</div>
</div>
</div> </div>
</footer>
{% endblock %}
</div> </div>
</div>
{% block 'modal' %} {% endblock %}
{% load static %}
<script type="text/javascript" src="{% static 'FirstApp/vendor/jquery/jquery.js' %}"></script> {% block 'scripts' %}
<script src="{% static 'FirstApp/vendor/jquery/jquery.js' %}"></script>
<script src="{% static 'FirstApp/vendor/bootstrap/js/bootstrap.bundle.min.js' %}"></script>
<a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i>
</a>
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
<div class="modal-footer">
<button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
<a class="btn btn-primary" href="/logout">Logout</a>
</div>
</div>
</div>
</div>
{% endblock %}
{% block 'scripts' %}
{% load static %} {% load static %}
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script> <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script> integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
crossorigin="anonymous"></script>
<script src="{% static 'FirstApp/vendor/jquery/jquery.js' %}"></script> <script src="{% static 'FirstApp/vendor/jquery/jquery.js' %}"></script>
<script src="{% static 'FirstApp/vendor/bootstrap/js/bootstrap.bundle.min.js' %}"></script> <script src="{% static 'FirstApp/vendor/bootstrap/js/bootstrap.bundle.min.js' %}"></script>
...@@ -477,7 +498,7 @@ ...@@ -477,7 +498,7 @@
<!-- Page level custom scripts --> <!-- Page level custom scripts -->
<script src="{% static 'FirstApp/js/demo/chart-area-demo.js' %}"></script> <script src="{% static 'FirstApp/js/demo/chart-area-demo.js' %}"></script>
<script src="{% static 'FirstApp/js/demo/chart-pie-demo.js' %}"></script> <script src="{% static 'FirstApp/js/demo/chart-pie-demo.js' %}"></script>
{% endblock %} {% endblock %}
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -301,7 +301,8 @@ ...@@ -301,7 +301,8 @@
/* /*
let interval = setInterval(() => { let interval = setInterval(() => {
{#let url = 'http://127.0.0.1:8000/get-random_number';#}
{#let url = 'http://127.0.0.1:8000/get-random_number';#}
let url = 'http://127.0.0.1:8000/check-availability'; let url = 'http://127.0.0.1:8000/check-availability';
fetch(url) fetch(url)
...@@ -401,7 +402,7 @@ ...@@ -401,7 +402,7 @@
<div class="card-body"> <div class="card-body">
<!--loading gif --> <!--loading gif -->
{% if due_lectures.count == 0 %} {% if due_lectures|length == 0 %}
<div class="text-center" id="no_subject_selected"> <div class="text-center" id="no_subject_selected">
<span class="font-italic">No lecture is to be processed</span> <span class="font-italic">No lecture is to be processed</span>
</div> </div>
...@@ -414,38 +415,43 @@ ...@@ -414,38 +415,43 @@
<div class="text-center" id="no_timetable_content" hidden> <div class="text-center" id="no_timetable_content" hidden>
<span class="font-italic">Not included in the timetable</span> <span class="font-italic">Not included in the timetable</span>
</div> </div>
<!--displaying the timetable -->
<table class="table table-striped" id="timetable"> <!-- if there are due lectures, display the table -->
{# <caption id="timetable_caption"></caption>#} {% if due_lectures %}
<thead>
<tr> <!--displaying the timetable -->
<th>Date</th> <table class="table table-striped" id="timetable">
<th>Subject</th> {# <caption id="timetable_caption"></caption>#}
<th>start time</th> <thead>
<th>end time</th>
<th></th>
</tr>
</thead>
<tbody id="timetable_body">
{% for lecture in due_lectures %}
<tr> <tr>
<td class="font-weight-bolder">{{ lecture.date }}</td> <th>Date</th>
{# <td>{{ lecture.subject }}</td>#} <th>Subject</th>
<td class="font-weight-bolder">{{ lecture.subject_name }}</td> <th>start time</th>
<td class="font-weight-bolder">{{ lecture.start_time }}</td> <th>end time</th>
<td class="font-weight-bolder">{{ lecture.end_time }}</td> <th></th>
<td>
<button type="button" class="btn btn-success batch_process"
data-video-id="{{ lecture.video_id }}"
data-video-name="{{ lecture.video_name }}"
id="{{ lecture.subject }}">Process
</button>
{# <span class="font-italic font-weight-bolder text-success">Processing</span>#}
</td>
</tr> </tr>
{% endfor %} </thead>
</tbody> <tbody id="timetable_body">
</table> {% for lecture in due_lectures %}
<tr>
<td class="font-weight-bolder">{{ lecture.date }}</td>
{# <td>{{ lecture.subject }}</td>#}
<td class="font-weight-bolder">{{ lecture.subject_name }}</td>
<td class="font-weight-bolder">{{ lecture.start_time }}</td>
<td class="font-weight-bolder">{{ lecture.end_time }}</td>
<td>
<button type="button" class="btn btn-success batch_process"
data-video-id="{{ lecture.video_id }}"
data-video-name="{{ lecture.video_name }}"
id="{{ lecture.subject }}">Process
</button>
{# <span class="font-italic font-weight-bolder text-success">Processing</span>#}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</div> </div>
...@@ -528,7 +534,6 @@ ...@@ -528,7 +534,6 @@
<!-- end of progress row --> <!-- end of progress row -->
</div> </div>
<!-- end of container --> <!-- end of container -->
...@@ -541,9 +546,9 @@ ...@@ -541,9 +546,9 @@
</div> </div>
<!-- end of progress row --> <!-- end of progress row -->
<!-- snackbar --> <!-- snackbar -->
<div id="snackbar">The lecture is completely processed..</div> <div id="snackbar">The lecture is completely processed..</div>
<!-- end of snackbar --> <!-- end of snackbar -->
</div> </div>
{% endblock %} {% endblock %}
......
...@@ -190,7 +190,7 @@ urlpatterns = [ ...@@ -190,7 +190,7 @@ urlpatterns = [
url(r'^check-availability/$', api.CheckStudentBehaviorAvailability.as_view()), url(r'^check-availability/$', api.CheckStudentBehaviorAvailability.as_view()),
# perform random task (delete later) # perform random task (delete later)
url(r'^get-random_number/$', api.TestRandom.as_view()), url(r'^get-random-number/$', api.TestRandom.as_view()),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment