D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
cas
/
application
/
views
/
student
/
assessment
/
Filename :
attemptModelPaper.php
back
Copy
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title><?php echo stripslashes($modelPaperInfo->mepm_title); ?> | <?php echo $this->session->userdata("studentData")["branch_short_name"]; ?> | College Automation System</title> <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/style.css"); ?>"> <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/jquery-ui.css"); ?>"> <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/jquery.dataTables.min.css"); ?>" type='text/css' /> <link rel="image icon" href="<?php echo base_url("assets/admin/images/logo.png"); ?>"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,800,900&display=swap"> <script src="<?php echo base_url("assets/admin/js/jquery-1.10.2.min.js"); ?>"></script> <script src="<?php echo base_url("assets/admin/js/jquery-ui.js"); ?>"></script> <script src="<?php echo base_url("assets/admin/js/bootstrap.min.js"); ?>"></script> <script src="<?php echo base_url("assets/admin/js/jquery.dataTables.min.js"); ?>"></script> </head> <body class="cbp-spmenu-push"> <div class="se-pre-con"></div> <section> <?php $this->load->view("student/navAndHeader"); ?> <div class="main-content"> <div class="container-fluid content-top-gap"> <nav aria-label="breadcrumb"> <ol class="breadcrumb my-breadcrumb"> <li class="breadcrumb-item"><a href="<?php echo site_url("student/Dashboard"); ?>">Home</a></li> <li class="breadcrumb-item active">Assessments</li> <li class="breadcrumb-item active" aria-current="page"><a href="<?php echo site_url("student/TasksAndQuizzes/"); ?>">My Tasks & Quizzes</a></li> <li class="breadcrumb-item active" aria-current="page"><a href="<?php echo site_url("student/TasksAndQuizzes/attemptModelPaper/") . $modelPaperInfo->mepm_id; ?>"><?php echo stripslashes($modelPaperInfo->mepm_title); ?></a></li> </ol> </nav> <section class="data-tables"> <div class="card card_border p-4"> <h3 class="card__title"><i class="fa fa-file"></i> Attempting Model Paper => <b><?php echo stripslashes($modelPaperInfo->mepm_title); ?></b></h3><br> <div class="table-responsive"> <?php if ($this->session->flashdata('successMessage')) { ?> <div class="alert alert-success"> <strong><?php echo $this->session->flashdata('successMessage'); ?></strong></div> <?php } ?> <?php if ($this->session->flashdata('errorMessage')) { ?> <div class="alert alert-danger"> <strong><?php echo $this->session->flashdata('errorMessage'); ?></strong> </div> <?php } if ($modelPaperInfo->mepm_type == "O") { ?> <table width="950" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #000;" align="center"> <tr> <td width="3"></td> <td width="797" align="center" valign="top"> <table align="center" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="797" height="48" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="797" height="120" align="center" valign="top"><img src="<?php echo base_url('assets/admin/images/ietheadernew.png'); ?>" width="95%" height="100" style="margin-top:4%"></td> </tr> </table> </td> </tr> <tr> <td height="48" valign="top"> <center> <p style="margin:5%;font-family: Courier;font-size: 15px;"> <h4 style="font-family:Times;"><b><u><span id="modelPaperTitle"><?php echo stripslashes($modelPaperInfo->mepm_title); ?></span></u></b></h4> <h5 style="font-family:Times;"><b><span id="modelPaperSubject"><?php echo stripslashes($modelPaperInfo->sm_name); ?></span></b></h5> <h6 style="font-family:Times;"> <b> <span id="courseAndSemester"> <?php echo stripslashes($modelPaperInfo->course_name) . "-"; echo ($modelPaperInfo->course_time_mgmt_flag == "Y") ? $modelPaperInfo->sm_semester . " Year" : $modelPaperInfo->sm_semester . " Sem"; ?> </span> </b> </h6> </p> </center> </td> </tr> <tr style="font-family: Arial;font-size:12px;"> <td height="48" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="797" height="25" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="388" height="25" valign="middle"> <span style="margin-left:5%"><b> M.M. <span id="maximumMarks"></span> </b></span> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr style="font-family: Arial;font-size:12px;"> <td height="48" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="797" height="25" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="388" height="25" valign="middle"> <span style="margin-left:5%"><b><span id="modelPaperDesc"><?php echo stripslashes($modelPaperInfo->mepm_description); ?></span> </b></span> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <table class="table table-bordered" id="modelPaperContent"> <tr> <th colspan='2'> <center> <u><i><h5>Objective (MCQ Type) Questions</h5></i></u><br> </center> </th> </tr> <?php echo form_open(site_url('student/TasksAndQuizzes/saveModelPaperAttempt'), ['name' => 'saveModelPaperAttemptFrm', 'id' => 'saveModelPaperAttemptFrm']); $mMarks = 0; for ($i = 0; $i < sizeof($genQuestions); $i++) { $thisQuestion = $genQuestions[$i]; $mMarks += $thisQuestion->qb_marks; ?> <tr> <th style='width:10%;' valign='top'><?php echo ($i + 1); ?></th> <td><b><?php echo stripslashes($thisQuestion->qb_question) . " (" . $thisQuestion->qb_marks . " marks)"; ?></b><br> <?php echo ($thisQuestion->qb_image != NULL || $thisQuestion->qb_image != "") ? "<img src='" . base_url($thisQuestion->qb_image) . "'>" : ""; ?> <br> <table width='100%'> <tr> <td> <input type="radio" id="question<?php echo $i ?>A" name="question<?php echo $thisQuestion->qb_id; ?>" value="A"> A. <label for="question<?php echo $i ?>A"><?php echo stripslashes($thisQuestion->qb_opt_a); ?></label> <?php echo ($thisQuestion->qb_opt_a_img != NULL || $thisQuestion->qb_opt_a_img != "") ? "<img src='" . base_url($thisQuestion->qb_opt_a_img) . "'>" : ""; ?> </td> <td> <input type="radio" id="question<?php echo $i ?>B" name="question<?php echo $thisQuestion->qb_id; ?>" value="B"> B. <label for="question<?php echo $i ?>B"><?php echo stripslashes($thisQuestion->qb_opt_b); ?></label> <?php echo ($thisQuestion->qb_opt_b_img != NULL || $thisQuestion->qb_opt_b_img != "") ? "<img src='" . base_url($thisQuestion->qb_opt_b_img) . "'>" : ""; ?> </td> </tr> <tr> <td> <input type="radio" id="question<?php echo $i ?>C" name="question<?php echo $thisQuestion->qb_id; ?>" value="C"> C. <label for="question<?php echo $i ?>C"><?php echo stripslashes($thisQuestion->qb_opt_c); ?></label> <?php echo ($thisQuestion->qb_opt_c_img != NULL || $thisQuestion->qb_opt_c_img != "") ? "<img src='" . base_url($thisQuestion->qb_opt_c_img) . "'>" : ""; ?> </td> <td> <input type="radio" id="question<?php echo $i ?>D" name="question<?php echo $thisQuestion->qb_id; ?>" value="D"> D. <label for="question<?php echo $i ?>D"><?php echo stripslashes($thisQuestion->qb_opt_d); ?></label> <?php echo ($thisQuestion->qb_opt_d_img != NULL || $thisQuestion->qb_opt_d_img != "") ? "<img src='" . base_url($thisQuestion->qb_opt_d_img) . "'>" : ""; ?> </td> </tr> </table> </td> </tr> <input type="hidden" name="questionIds[]" value="<?php echo $thisQuestion->qb_id; ?>"> <?php } ?> </table> </table> <?php } else { ?> <table width="950" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #000;" align="center"> <tr> <td width="3"></td> <td width="797" align="center" valign="top"> <table align="center" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="797" height="48" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="797" height="120" align="center" valign="top"><img src="<?php echo base_url('assets/admin/images/ietheadernew.png'); ?>" width="95%" height="100" style="margin-top:4%"></td> </tr> </table> </td> </tr> <tr> <td height="48" valign="top"> <center> <p style="margin:5%;font-family: Courier;font-size: 15px;"> <h4 style="font-family:Times;"><b><u><span id="modelPaperTitle"><?php echo stripslashes($modelPaperInfo->mepm_title); ?></span></u></b></h4> <h5 style="font-family:Times;"><b><span id="modelPaperSubject"><?php echo stripslashes($modelPaperInfo->sm_name); ?></span></b></h5> <h6 style="font-family:Times;"> <b> <span id="courseAndSemester"> <?php echo stripslashes($modelPaperInfo->course_name) . "-"; echo ($modelPaperInfo->course_time_mgmt_flag == "Y") ? $modelPaperInfo->sm_semester . " Year" : $modelPaperInfo->sm_semester . " Sem"; ?> </span> </b> </h6> </p> </center> </td> </tr> <tr style="font-family: Arial;font-size:12px;"> <td height="48" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="797" height="25" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="388" height="25" valign="middle"> <span style="margin-left:5%"><b> M.M. <span id="maximumMarks"></span> </b></span> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr style="font-family: Arial;font-size:12px;"> <td height="48" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="797" height="25" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="388" height="25" valign="middle"> <span style="margin-left:5%"><b><span id="modelPaperDesc"><?php echo stripslashes($modelPaperInfo->mepm_description); ?></span> </b></span> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <table class="table table-bordered" id="modelPaperContent"> <tr> <th colspan='2'> <center> <u><i><h5>Subjective Questions</h5></i></u><br> </center> </th> </tr> <?php echo form_open_multipart(site_url('student/TasksAndQuizzes/saveModelPaperAttempt'), ['name' => 'saveModelPaperAttemptFrm', 'id' => 'saveModelPaperAttemptFrm']); $mMarks = 0; for ($i = 0; $i < sizeof($genQuestions); $i++) { $thisQuestion = $genQuestions[$i]; $mMarks += $thisQuestion->qb_marks; ?> <tr> <th style='width:10%;' valign='top'><?php echo ($i + 1); ?></th> <td><b><?php echo stripslashes($thisQuestion->qb_question) . " (" . $thisQuestion->qb_marks . " marks)"; ?></b><br> <?php echo ($thisQuestion->qb_image != NULL || $thisQuestion->qb_image != "") ? "<img src='" . base_url($thisQuestion->qb_image) . "'>" : ""; ?> <br> <table width='100%'> <tr> <td> <textarea style="width:100%;" id="question<?php echo $i ?>" name="question<?php echo $thisQuestion->qb_id; ?>" placeholder="Type Your Answer Here (Max. 1000 Chars Allowed)"></textarea> </td> </tr> <tr> <td> <input type="file" id="file<?php echo $i ?>" name="file<?php echo $thisQuestion->qb_id; ?>"> </td> </tr> </table> </td> </tr> <input type="hidden" name="questionIds[]" value="<?php echo $thisQuestion->qb_id; ?>"> <?php } if (sizeof($groupQuestions)) { ?> <tr> <td colspan="2"> <center> <u><i><h5>Subjective Questions (Comprehension Based)</h5></i></u><br> </center> </td> </tr> <?php for ($i = 0; $i < sizeof($groupQuestions); $i++) { $thisQuestion = $groupQuestions[$i]; $mMarks += $thisQuestion->qb_marks; ?> <tr> <th style='width:10%;' valign='top'><?php echo ($i + 1); ?></th> <td><b><?php echo stripslashes($thisQuestion->qg_question) . " (" . $thisQuestion->qg_marks . " marks)"; ?></b><br> <?php echo ($thisQuestion->qg_image != NULL || $thisQuestion->qg_image != "") ? "<img src='" . base_url($thisQuestion->qg_image) . "'>" : ""; ?> <br> <table width='100%'> <tr> <td> <b>Question: <?php echo stripslashes($thisQuestion->qb_question) . " (" . $thisQuestion->qb_marks . " marks)"; ?></b> <textarea style="width:100%;" id="question<?php echo $i ?>" name="question<?php echo $thisQuestion->qb_id; ?>" placeholder="Type Your Answer Here (Max. 1000 Chars Allowed)"></textarea> </td> </tr> <tr> <td> <input type="file" id="file<?php echo $i ?>" name="file<?php echo $thisQuestion->qb_id; ?>"> </td> </tr> </table> </td> </tr> <input type="hidden" name="questionIds[]" value="<?php echo $thisQuestion->qb_id; ?>"> <?php } } ?> </table> </table> <?php } ?> <br> <input type='hidden' name='mepm_id' value='<?php echo $modelPaperInfo->mepm_id; ?>'> <input type='hidden' name='mepm_type' value='<?php echo $modelPaperInfo->mepm_type; ?>'> <button type="button" onClick="confirmSubmit();" class="btn btn-primary btn-block"><i class="fa fa-hand-o-up"></i> Submit</button> <?php echo form_close(); ?> </div> </div> </section> </div> </div> </section> <script> function confirmSubmit() { if (confirm("Are You Sure To Submit This Model Paper? Click OK To Proceed & Cancel Otherwise.")) { $("#saveModelPaperAttemptFrm").submit(); } } $(document).ready(function () { $("#maximumMarks").html(<?php echo $mMarks; ?>); }); </script> <?php $this->load->view("admin/footer"); ?> </body> </html>