<div class="col-md-4">
            <h2>Recent Deadlines
              <br>
            </h2>
            <ul class="media-list">
              <?php 
$course_code = $_GET['course'];
$course_id = Course::get_id($course_code);
if (is_null($course_id)) {
    header("Location:../\n\n\n\n                    login.php");
    die;
} else {
    $deliverable_ids = Student::get_Deliverables_Ids($_SESSION['person_id'], $course_id);
    if (!is_null($deliverable_ids)) {
        foreach ($deliverable_ids as $deliverable_id) {
            $deliverable_Name = Deliverable::get_name($deliverable_id);
            $Course_id = $course_id;
            $Course_code = $course_code;
            $link_delv = Deliverable::get_des_link($deliverable_id);
            $deadline_delv = Deliverable::get_deadline($deliverable_id);
            $ay7aga = $deliverable_Name . $Course_code;
            $forDivs = str_replace(' ', '', strtolower($ay7aga));
            echo '<li class="media">';
            echo '<div class="media-left">';
            echo '<h3 class="text-center text-primary">' . $course_code . ' </h3>';
            echo '</div>';
            echo '<div class="media-body">';
            echo '<h4 class="media-heading"><a href=" ' . $link_delv . '" target="_blank">' . $deliverable_Name . '</a></h4>';
            echo '<span class="glyphicon glyphicon-time" aria-hidden="false"></span>' . $deadline_delv;
            echo '<br>';
            echo '<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-' . $forDivs . '-modal-sm">   <span class="glyphicon glyphicon-plus-sign" aria-hidden="false"></span> Upload</button>';
    $course_id = Course::get_id($course_code);
} elseif (isset($_GET['courseid'])) {
    # code...
    $course_id = $_GET['courseid'];
}
?>
<div class="col-md-4">
<h2>Deliverables</h2>


<ul class="nav nav-pills nav-stacked">
    <?php 
$deliverables = Stuff::get_Deliverables($_SESSION['person_id'], $course_id);
if ($deliverables != NULL) {
    foreach ($deliverables as $deliverable) {
        $name = Deliverable::get_name($deliverable);
        echo "<li role='presentation'>";
        echo '<a href="deliverable.php?courseid=' . $course_id . '&deliverable=' . $deliverable . '"> ' . $name . ' </a>';
        echo "</li>";
    }
} else {
    echo "NO DELIVERABLES";
}
//$_GET["course"];
//include $_SERVER["DOCUMENT_ROOT"] . "/College_Portal/app/models/Stuff.php";
//$courses = Stuff::get_Courses($_SESSION['person_id']);
//foreach ($courses as $course) {
//  $deliverables= Stuff:: get_Deliverables($_SESSION['person_id'],$course);
//}
?>