관리-도구
편집 파일: view_assign_response.php
<?php $astest = $data['type']=="assign"?"Assignment":"Test"; ?> <h4 class="text-center py-3 bg-info text-white"><?= t("Submitted"); ?> <?= t($astest); ?></h4> <div class="contaienr"> <div class="card border border-bottom-0"> <div class="card-header"> <a href="javascript:void(0)" data-bs-toggle="collapse" data-bs-target="#cf-course-stu-open-1"> <div class="d-flex justify-content-between"> <div> <span class="text-black cf-course-label-5"><?= t('Student Details'); ?></span> </div> <div> <i class="fas fa-caret-down text-primary"></i> </div> </div> </a> </div> <div class="show collapse border border-top-0 border-right-0 border-left-0 " id ="cf-course-stu-open-1"> <div class="card-body " > <div ><span class="cf-course-label-5" ><?= t("Student's Name"); ?>: </span> <?= $data['name']; ?> </div> <div ><span class="cf-course-label-5"><?= t("Student's Email"); ?>: </span> <?= $data['email']; ?> </div> <div ><span class="cf-course-label-5"><?= t('Course Name'); ?>: </span> <?= $data['title']; ?> </div> <div ><span class="cf-course-label-5"> <?php echo t($astest)." ".t('Name'); ?>: </span> <?= $data['assign_title']; ?> </div> </div> </div> </div> <div class="card d-none border border-bottom-0"> <div class="card-header"> <a href="javascript:void(0)" data-bs-toggle="collapse" data-bs-target="#cf-course-ass-open-1"> <div class="d-flex justify-content-between"> <div> <span class="cf-course-label-5 text-black"><?php echo t($astest)." ".t('Detials'); ?> </span> </div> <div> <i class="fas fa-caret-down text-primary"></i> </div> </div> </a> </div> <div class="card-body show collapse" id ="cf-course-ass-open-1" > <div ><span class="cf-course-label-5" ><?= t("Student's Name"); ?>: </span> <?php //$data['name']; ?> </div> <div ><span class="cf-course-label-5"><?= t("Student's Email"); ?>: </span> <?php //$data['email']; ?> </div> <div ><span class="cf-course-label-5"><?= t('Course Name'); ?>: </span> <?php //$data['title']; ?> </div> <div ><span class="cf-course-label-5"> <?php echo t($astest)." ".t('Name'); ?>: </span> <?php //$data['assign_title']; ?> </div> </div> </div> <div class="card border border-bottom-0"> <div class="card-header"> <a href="javascript:void(0)" data-bs-toggle="collapse" data-bs-target="#cf-course-ass-open-2"> <div class="d-flex justify-content-between"> <div> <span class="text-black cf-course-label-6"><?php echo t($astest)." ".t('Result Details'); ?></span> </div> <div> <i class="fas fa-caret-down text-primary"></i> </div> </div> </a> </div> <div class="card-body show collapse" id ="cf-course-ass-open-2" > <p class='card-text'> <?php if($data['checked']==0 || $data['checked']=="0") { echo t("Please check the \${1} for the result.",[ t($astest) ] ); }else{ ?> <span class="cf-course-label-5"><?= t("Total Questions"); ?> : </span> <?=$data['no_of_questions']; ?><br> <span class="cf-course-label-5"> <?= t("Correct Answer"); ?> : </span> <?=$data['no_correct_answers']; ?><br> <span class="cf-course-label-5"> <?= t("Percentage Received"); ?> : </span> <?=$data['percentage']."%"; ?><br> <span class="cf-course-label-5"> <?= t("Comments Received"); ?> : </span> <?=$data['comment']; ?><br> <span class="cf-course-label-5"> <?= t("Time Spent"); ?> : </span> <?= $data['time_spent']; ?><br> <span class="cf-course-label-5"> <?= t("Submitted On"); ?> : </span> <?= $data['submitted_on'];?> <?php } ?> </p> </div> </div> </div> <div class="card text-black"> <div class="card-header text-black"> <a href="javascript:void(0)" data-bs-toggle="collapse" data-bs-target="#cf-course-sub-open-1"> <div class="d-flex justify-content-between"> <div> <span class="text-black cf-course-label-5"><?php echo t('Submitted').' '.t($astest); ?></span> </div> <div> <i class="fas fa-caret-down text-primary"></i> </div> </div> </a> </div> <div class="card-body show collapse" id ="cf-course-sub-open-1" > <form action="" id="cf-course-check-assign-form" class="cf-course-check-assign-form"> <input type="hidden" name="mid" value="<?=$member_id ?>"> <input type="hidden" name="cid" value="<?=$course_id ?>"> <input type="hidden" name="ar_id" value="<?=$ar_id ?>"> <input type="hidden" name="type" id="cf-course-astest-type" value="<?= $data['type']; ?>"> <input type="hidden" name="assign_id" value="<?=$data['assign_id'] ?>"> <div class="cf-couse-question p-2"> <div id="cf-course-accordion"> <?php if( $qry->num_rows > 0) { $count=1; while($r = $qry->fetch_assoc()) { $question = $assignment_ob->replaceBetweenString( $r['questions'], "{{code}}", "{{/code}}" ); $st_answers = $assignment_ob->replaceBetweenString( ($r['answers_student']), "{{code}}", "{{/code}}" ); $ad_answers = $assignment_ob->replaceBetweenString( $r['answers_admin'], "{{code}}", "{{/code}}" ); $not = strip_tags($st_answers); if( strlen( $not ) > 280 ) { $class="cf-course-assign-ada-ans-h"; $button='<a href="javascript:void(0)" class="d-inline-block cf-course-assign-ada-btn">'.t('Read More').'</a>'; }else{ $class = ''; $button = ''; } $not1 = strip_tags($ad_answers); if( strlen( $not1 ) > 280 ) { $class1="cf-course-assign-ada-ans-h"; $button1='<a href="javascript:void(0)" class="d-inline-block cf-course-assign-ada-btn">'.t('Read More').'</a>'; }else{ $class1 = ''; $button1 = ''; } if(empty($st_answers)) { if(!stristr($st_answers, "Oops! You have not written this answer.")) { $st_answers="<div class='text-danger cf-course-label-6'>Oops! Student have not written this answer.</div>"; }else{ $st_answers="<div class='text-danger cf-course-label-6'>Sorry! Student have not written this answer.</div>"; } } $question = html_entity_decode($question); ?> <div class="card card-remvoe-border m-0"> <div class="card-header"> <a class="card-link" data-bs-toggle="collapse" href="#cf-course-collapseOne-<?=$r['id'] ?>"> <div class="d-flex"> <div class="cf-course-first-div"><span class="cf-course-label-5">Q <?=$count;?>. </span> </div> <div class="d-flex justify-content-between cf-course-second-div"> <div style="font-weight:500;width:100%"><?= $question; ?></div> <div data-bs-toggle="tooltip" title="Collapse Question" ><i class="fas fa-caret-down text-primary"></i></div> </div> </div> </a> </div> <div id="cf-course-collapseOne-<?=$r['id'] ?>" class="collapse show" > <div class="card-body"> <div class="row"> <div class="col-md-12"> <div class="card border border-bottom-0 text-black"> <div class="card-header text-black"> <a href="javascript:void(0)" data-bs-toggle="collapse" data-bs-target="#cf-course-stanswer-<?=$count;?>"> <div class="d-flex justify-content-between"> <div> <span class="cf-course-label-5"><?= t("Student's Answer"); ?>:</span> </div> <div data-bs-toggle="tooltip" title="<?= t("Collapse Student's Answer"); ?>"> <i class="fas fa-caret-down text-primary"></i> </div> </div> </a> </div> <div class="border border-top-0 border-right-0 border-left-0 collapse show" id ="cf-course-stanswer-<?=$count;?>"> <div class="card-body" > <div class="cf-course-assign-question-ans position-relative"> <div class="<?= $class; ?>" style="font-size:0.9em"><?=$st_answers; ?></div> <?= $button; ?> </div> <?php if($r['file_path']!="" ) { echo '<div class="mt-1"><a class="btn btn-sm btn-primary" download href="'.$r['file_path'].'"><i class="fas fa-download"></i> Download Attachment File</a></div>'; } ?> </div> </div> </div> <div class="card border border-bottom-0 text-black"> <div class="card-header text-black"> <a href="javascript:void(0)" data-bs-toggle="collapse" data-bs-target="#cf-course-adanswer-<?=$count;?>"> <div class="d-flex justify-content-between"> <div> <span class="cf-course-label-5"><?= t("Teacher's Answer"); ?>:</span> </div> <div data-bs-toggle="tooltip" title="<?= t("Collapse Teacher's Answer"); ?>"> <i class="fas fa-caret-down text-primary"></i> </div> </div> </a> </div> <div class="border border-top-0 border-right-0 border-left-0 collapse" id ="cf-course-adanswer-<?=$count;?>"> <div class="card-body" > <div class="cf-course-assign-question-ans position-relative"> <div class="<?= $class1; ?>" style="font-size:0.9em"><?=$ad_answers; ?></div> <?= $button1; ?> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class=" card card-footer m-0 mb-4"> <div class="d-flex justify-content-between"> <?php if(!empty($r['checked'])): ?> <div class="p-2"><span class="cf-course-custom-check-ques cf-course-custom-check"> <input type="radio" name="rightwrong[<?=$r['id'] ?>]" <?php echo ($r['checked']=="r"?'checked':''); ?> value="r" class="cf-course-check-rghtwrng" id='cf-checkforright-<?=$r['id'] ?>' > <label for="cf-checkforright-<?=$r['id'] ?>"></label><?= t('Right'); ?> <span class="cf-course-custom-check-ques cf-course-custom-check"> <input type="radio" value="w" <?php echo ($r['checked']=="w" ?'checked':''); ?> id='cf-checkforwrong-<?=$r['id'] ?>' name="rightwrong[<?=$r['id'] ?>]" > <label for="cf-checkforwrong-<?=$r['id'] ?>"></label><?= t('Wrong'); ?> </div> <?php else: ?> <div class="p-2"><span class="cf-course-custom-check-ques cf-course-custom-check"> <input type="radio" name="rightwrong[<?=$r['id'] ?>]" checked value="r" class="cf-course-check-rghtwrng" id='cf-checkforright-<?=$r['id'] ?>' > <label for="cf-checkforright-<?=$r['id'] ?>"></label><?= t('Right'); ?> <span class="cf-course-custom-check-ques cf-course-custom-check"> <input type="radio" value="w" id='cf-checkforwrong-<?=$r['id'] ?>' name="rightwrong[<?=$r['id'] ?>]" > <label for="cf-checkforwrong-<?=$r['id'] ?>"></label><?= t('Wrong'); ?> </div> <?php endif; ?> <div class="p-2 " data-bs-toggle="tooltip" title="Collapse Question"> <a class="card-link" data-bs-toggle="collapse" href="#cf-course-collapseOne-<?=$r['id'] ?>" > <?= t('Collapse'); ?> <i class="fas fa-caret-up text-primary"></i></a> </div> </div> </div> <?php $count++; } } ?> </div> <div class="cf-course-res-ajax "> <div class="row"> <div class="col-md-6"> <div class="" > <button type="submit" class="btn btn-primary " id="cf-course-check-assign"><?php echo t($data['checked']=="1" ?'Already Checked':'Check'); ?> </button> </div> </div> <div class="col-md-6"> <?php if($data['type']=="assign"):?> <button id="cf-course-assign-reply" type="button" class="ajax_response <?php echo ($data['checked']=="1" ?'d-block':''); ?> cf-course-assign-reply btn btn-success float-right" > <?php echo t('Send the message to the student about the assignment?')?></button> <?php else:?> <button id="cf-course-assign-reply" type="button" class="ajax_response <?php echo ($data['checked']=="1" ?'d-block':''); ?> cf-course-assign-reply btn btn-success float-right" > <?php echo t('Send the message to the student about the test?')?></button> <?php endif;?> </div> </div> </div> </div> </form> </div> </div> </div> <!-- Modal --> <!-- The cf_course_drip_model --> <div id="cf_course_one-assing_model" class="cf_course_drip_model p-0 m-0" style="background-color:#000000c9;z-index:99" > <div class="w-75 mx-auto"> <div class=" bg-light px-5 py-4 " > <form id="cf-course-one-asgn-reply" class="cf-course-one-asgn-reply" > <div class="cf_course_drip_model-content w-100" > <div class="row"> <div class="col-sm-6"> <div class="mb-3 p-4"> <label class="text-primary "><?= t('Student Details'); ?></label> <div class="card-body border rounded" style="font-size:0.9em; " > <div><span class="cf-course-label-5" ><?= t("Student's Name"); ?>: </span> <?= $data['name']; ?> </div> <div><span class="cf-course-label-5"><?= t("Student's Email"); ?>: </span> <?= $data['email']; ?> </div> <div><span class="cf-course-label-5"><?= t('Course Name'); ?>: </span> <?= $data['title']; ?> </div> <div><span class="cf-course-label-5"> <?php echo t($astest)." ".t('Name'); ?>: </span> <?= $data['assign_title']; ?> </div> <hr /> <div class="py-2 text-primary"><span class="cf-course-label-6 "><?php echo t($astest)." ".t('Result Details'); ?> </div> <p class='card-text' id ="cf-course-assign-result"> <?php if($data['checked']==0 || $data['checked']=="0") { echo t("Please check the \${1} for the result.",[ t($astest) ] ); }else{ ?> <span class="cf-course-label-5"><?= t("Total Questions"); ?> : </span> <?=$data['no_of_questions']; ?><br> <span class="cf-course-label-5"> <?= t("Correct Answer"); ?> : </span> <?=$data['no_correct_answers']; ?><br> <span class="cf-course-label-5"> <?= t("Percentage Received"); ?> : </span> <?=$data['percentage']."%"; ?><br> <span class="cf-course-label-5"> <?= t("Comments Received"); ?> : </span> <?=$data['comment']; ?><br> <span class="cf-course-label-5"> <?= t("Time Spent"); ?> : </span> <?= $data['time_spent']; ?><br> <span class="cf-course-label-5"> <?= t("Submitted On"); ?> : </span> <?= $data['submitted_on'];?> <?php } ?> </p> </div> </div> </div> <div class="col-sm-6"> <div class="cf_course_drip_model-body p-4"> <div class="cf-course-dis-form"> <input type="hidden" name="name" value="<?= $data['name']; ?>" /> <input type="hidden" name="email" value="<?= $data['email']; ?>" /> <input type="hidden" name="aname" value="<?= $data['assign_title']; ?>" /> <input type="hidden" name="cname" value="<?= $data['title']; ?>" /> <input type="hidden" name="bulk" value="reply_assign" /> <input type="hidden" name="ar_id" id="ar_id" value="<?= $ar_id; ?>" /> <div class="mb-3"> <label class="text-primary cf-course-label-5" ><?= t('Subject'); ?></label> <input type="text" name="title" class="form-control" required> </div> <div class="mb-3"> <label class="text-primary cf-course-label-5"><?=t('Content'); ?></label> <textarea id="cf-course-assign-oreply" name="email_content" class="cf-course-one-reply form-control" ></textarea> </div> </div> </div> </div> </div> <div class="modal-footer"> <div id="cf-course-a-oerror_m" class="ajax_response alert-danger ms-2 " ></div> <div id="cf-course-a-osuccess_m" class="ajax_response alert-success ms-2 " ></div> <button type="button" class="btn btn-primary cf-course-close-btn btn-sm "><?= t('Close'); ?></button> <button type="submit" class="btn btn-success btn-sm" id="cf--cassign-one-reply"><?= t('Send Email'); ?></button> </div> </div> </form> </div> </div> </div> <script> cfCourseTinyEditorAssignment("#cf-course-assign-oreply",250,0); </script> <!--Model end -->