diff --git a/pages/logged_in_teacher.php b/pages/logged_in_teacher.php index 2c43852..76d5fd4 100644 --- a/pages/logged_in_teacher.php +++ b/pages/logged_in_teacher.php @@ -154,7 +154,7 @@ } //TODO: link poll class to the class poll using the proper parameter send structure if (empty($removeZerothIndex)) { - echo "

You have no classes! Create one!

"; + echo "

You have no classes! Create one!

"; } ?> diff --git a/pages/manage_questions.php b/pages/manage_questions.php index 7bf94cc..b73392e 100644 --- a/pages/manage_questions.php +++ b/pages/manage_questions.php @@ -121,57 +121,53 @@

Current Questions

- ", $answers); - - $correct_answers = json_decode($value['correct_answers'], TRUE); - if(is_null($correct_answers) || empty($correct_answers)) - $correct_answers = "There are no correct answers!"; - else - $correct_answers = implode(" ", $correct_answers); - - - echo "
-
-

$description

-
-
-
$answers
-
-
-
$correct_answers
-
-
"; - } - - if (empty($removeZerothIndex)) { - echo "

You have no questions! Create one!

"; - } - - ?> + - - + $retVal = searchQuestionsByTeacherID($_SESSION['id']); + $retVal = json_decode($retVal,true); + $removeZerothIndex = $retVal; + unset($removeZerothIndex[0]); - ", $answers); + + $correct_answers = json_decode($value['correct_answers'], TRUE); + if(is_null($correct_answers) || empty($correct_answers)) + $correct_answers = "There are no correct answers!"; + else + $correct_answers = implode(" ", $correct_answers); + + + echo "
+
+

$description

+
+
+
$answers
+
+
+
$correct_answers
+
+
"; + } + + if (empty($removeZerothIndex)) { + echo "

Get started by creating some questions!

"; + } + + ?> +
+ + + ?>