From d28d886bb5e400512182b8e1eaa7f24961d8f18b Mon Sep 17 00:00:00 2001 From: Bruno Date: Wed, 1 May 2024 21:30:53 -0400 Subject: [PATCH 1/3] Centered Question Box for admin/professor --- public/teacher_view/admin.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/teacher_view/admin.php b/public/teacher_view/admin.php index e2d7384..2ab3061 100644 --- a/public/teacher_view/admin.php +++ b/public/teacher_view/admin.php @@ -57,6 +57,7 @@ +

Create Free Response Question

"> @@ -85,6 +86,7 @@
+ From 151f709a867d9f1f700aeb4654963e2e02619b47 Mon Sep 17 00:00:00 2001 From: Bruno Date: Wed, 1 May 2024 22:16:39 -0400 Subject: [PATCH 2/3] Centered Session Info --- public/teacher_view/admin.php | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/public/teacher_view/admin.php b/public/teacher_view/admin.php index 2ab3061..3dd7631 100644 --- a/public/teacher_view/admin.php +++ b/public/teacher_view/admin.php @@ -16,9 +16,9 @@ $sessionCode = $_SESSION['sessionCode']; $sessionName = $_SESSION['session_name']; $sessionID = $_SESSION['sessionID']; - echo "Session Code : ".$sessionCode."
"; - echo "Session Name : ".$sessionName."
"; - echo "Session ID : ".$sessionID."
"; + //echo "Session Code : ".$sessionCode."
"; + //echo "Session Name : ".$sessionName."
"; + //echo "Session ID : ".$sessionID."
"; } else { echo "Session code not found."; @@ -57,6 +57,23 @@ +
+
+
+
+
+

+

+ Session Code :
+ Session Name :
+ Session ID :
+

+

+
+
+
+
+

Create Free Response Question

From 99654b26e25fead0b5b4bcf84d9ed0020b3ed2b3 Mon Sep 17 00:00:00 2001 From: Bruno Date: Thu, 2 May 2024 00:45:54 -0400 Subject: [PATCH 3/3] Made comments centered on the center of the screen for the teacher view --- public/teacher_view/admin.php | 83 ++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 36 deletions(-) diff --git a/public/teacher_view/admin.php b/public/teacher_view/admin.php index 3dd7631..faf3aac 100644 --- a/public/teacher_view/admin.php +++ b/public/teacher_view/admin.php @@ -99,10 +99,11 @@
-
+
+
-
+ @@ -123,42 +124,52 @@ function getQuestion() { }); } +function displayCard(value) { + var html = ""; + html += "
"; + html += "
"; + html += "
"; + html += "

" + value.DisplayName + "

"; + html += "

" + value.Content + "

"; + html += "
"; + html += "
"; + html += "
"; + html += ""; + html += "
"; + html += "
"; + html += "
"; + html += ""; + html += "
"; + html += "
"; + for (let i = 0; i < value.replies.length; i++) { + var reply = value.replies[i]; + html += displayCard(reply); + } + html += "
"; + html += "
"; + html += "
"; + return html; + } + function getMsg() { $.ajax({ - type: "GET", - url: "../server/getstate.php", - success: function (response) { - response = JSON.parse(response); - var html = ""; - if(response.length) { - $.each(response, function(key, value) { - html += "
"; - html += "
"; - html += "
"; - html += "

" + value.DisplayName + "

"; - html += "

" + value.Content + "

"; - html += "
"; - html += "
"; - html += "
"; - html += ""; - html += "
"; - html += "
"; - html += "
"; - html += ""; - html += "
" - html += "
" - html += "
" - html += "
" - html += "
" - }); - } else { - html += '
'; - html += 'No messages yet!'; - html += '
'; - } - $("#responseArea").html(html); - } - }); + type: "GET", + url: "../server/getstate.php", + success: function (response) { + response = JSON.parse(response); + var html = ""; + if(response.length) { + $.each(response, function(key, value) { + html += displayCard(value); + }); + } else { + html += '
'; + html += 'No messages yet!'; + html += '
'; + } + $("#responseArea").html(html); + } + }); } getQuestion();