관리-도구
편집 파일: manage_cirtificate.php
<div class="container-fluid"> <div class="row page-titles mb-4"> <div class="col-md-5 align-self-center"> <h4 class="text-themecolor" id="commoncontainerid"><?= t('Manage Certificate') ?></h4> </div> <div class="col-md-7 align-self-center text-right"> <div class="d-flex justify-content-end align-items-center"><?= t('Manage Courses'); ?></div> </div> </div> <div class="bg-white"> <div class="p-3"> <div class="row"> <div class="col-md-2"> <div class="cf-course-virtical-tabs py-4"> <a href="#cf-course-vert-tabs-a-1" data-count="1" class="cf-course-verticle cf-course-vert-tabs-a-1 cf-course-as-basic-tabs text-primary cf-course-as-tabs-active"><?= t('Setup for completion'); ?></a> <a href="#cf-course-vert-tabs-a-2" data-count="2" class="cf-course-verticle cf-course-vert-tabs-a-2 cf-course-as-ques-tabs"><?= t('Setup for exams'); ?></a> </div> </div> <div class="col-md-10 cf-course-assignment-half"> <form action="" method="POST"> <div class="cf-course-basic-info cf-course-vert-1 cf-course-verticle-cont cf-course-vertical-active" id="cf-course-vert-1"> <div class="mb-3"> <label for="cirt_completion_content" class="text-primary"><?= t('Enter certificate content'); ?></label> <textarea id="cirt_completion_content" name="completion_content"><?php if (isset($setup['completion_content'])) { echo $setup['completion_content']; } else { echo ""; } ?></textarea> <div class="text-left mt-1"> <span href="javascript:void(0)" class="btn btn-info btn-sm" data-bs-toggle="collapse" data-bs-target="#cfdisp-demo1"><?php w('View Shortcodes'); ?></span> <div id="cfdisp-demo1" class="collapse"> <p class="" style="font-size: 13px !important; opacity: 0.8;"> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{candidate_name}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{candidate_name}</span> <?php w("Candidate name used during the exam"); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{candidate_image}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{candidate_image}</span> <?php w("Candidate image used during the exam"); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{candidate_email}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{candidate_email}</span> <?php w("Candidate email used during the exam"); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{exam_name}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{exam_name}</span> <?php w("Exam name"); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{exam_description}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{exam_description}</span> <?php w('Description for the exam'); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{exam_id}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{exam_id}</span> <?php w('exam_id'); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{candidate_id}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{candidate_id}</span> <?php w("A unique id that use to be generated for each student during the exam (It's not the same as student id)"); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{student_id}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{student_id}</span> <?php w('This is the student id'); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{correct_answers}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{correct_answers}</span> <?php w('Number of correct answers'); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{total_questions}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{total_questions}</span> <?php w('Number of total questions'); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{number_of_attempts}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{number_of_attempts}</span> <?php w('Number of total attempts'); ?><br> <span class="text-info cfdisp_cursor" onclick="copyText(`{number_of_unanswerd}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{number_of_unanswerd}</span> <?php w('Number of questions that were not answered'); ?><br> <span class="text-info cfdisp_cursor" onclick="copyText(`{result_in_percentage}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{result_in_percentage}</span> <?php w('Result in percentage'); ?><br> <span class="text-info cfdisp_cursor" onclick="copyText(`{result_status}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{result_status}</span> <?php w('Progress status text that you have arranged for the exam depending on the mark'); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{time_spent}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{time_spent}</span> <?php w('Time spent by the candidate for the exam'); ?><br> <span class="text-info cfdisp_cursor" onclick="copyText(`{result_out_date}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{result_out_date}</span> <?php w('Result out date'); ?><br> </p> <p style="font-size: 13px !important;font-weight:500"> <strong><?php w('Example'); ?></strong>: <br> <?php w('Congratulation {candidate_name}, you completed {exam_name} Exam'); ?> <br> <?php w('Congratulation sam, you completed Web development exam'); ?> </p> </div> </div> </div> <div class="mb-3"> <div class="row"> <div class="col-sm-6"> <label for="completion_page_size" class="text-primary"><?= t('Select page size'); ?></label> <select id="completion_page_size" name="completion_page_size" class="form-control"><?php echo $this->createPageSize((($setup && isset($setup['completion_page_size'])) ? $setup['completion_page_size'] : 'A4')); ?></select> </div> <div class="col-sm-6"> <label for="completion_page_size" class="text-primary"><?= t('Select Orientation'); ?></label> <select name="completion_page_orientation" class="form-control"> <option value="portrait" <?php if ($setup && $setup['completion_page_orientation'] === 'portrait') { echo "selected"; } ?>><?= t('Portrait'); ?></option> <option value="landscape" <?php if ($setup && $setup['completion_page_orientation'] === 'landscape') { echo "selected"; } ?>><?= t('Landscape'); ?></option> </select> </div> </div> </div> <div class="mb-3"> <div class="mb-3"> <label class="text-primary"><?= t('Select theme'); ?></label> <div class="row"> <?php for ($i = 1; $i <= 5; $i++) { ?> <div class="col-sm-4"> <div class="card" style="cursor:pointer;"> <label for="lbl_theme_<?php echo $i; ?>"> <div class="card-body" style="height: 200px; text-align:center;"> <center><input id="lbl_theme_<?php echo $i; ?>" type="radio" name="completion_page_theme" value="<?php echo $i; ?>" <?php if ($setup && $i == $setup['completion_page_theme']) { echo "checked"; } ?>></center> <img src="<?php echo plugins_url('../assets/image/cirtificate_bg/' . $i . '.jpg', __FILE__); ?>" class="img-fluid" style="max-height:100%;max-width:100%;"> </div> </label> </div> </div> <?php } ?> <div class="col-sm-4"> <div class="card" style="cursor:pointer;"> <label for="lbl_theme_custom"> <div class="card-body completion_cirt_custom_card" style="height: 200px; text-align:center;"> <center> <span class="text-primary" style="cursor:pointer;"> <input id="lbl_theme_custom" type="radio" name="completion_page_theme" value="<?php if ($setup && is_array($setup) && filter_var($setup['completion_page_theme'], FILTER_VALIDATE_URL)) { echo $setup['completion_page_theme']; } ?>" <?php if (is_array($setup)) { if (filter_var($setup['completion_page_theme'], FILTER_VALIDATE_URL)) { echo "checked"; } } ?>> <strong onclick="cfCourseDouploadCirtBg('completion')"> <?= t('Upload Media'); ?></strong> </span> </center> <?php if ($setup && filter_var($setup['completion_page_theme'], FILTER_VALIDATE_URL)) { ?> <img src="<?php if (filter_var($setup['completion_page_theme'], FILTER_VALIDATE_URL)) { echo $setup['completion_page_theme']; } ?>" class="img-fluid customimg-cirt-completion" style="max-height:100%;max-width:100%;"> <?php } else { echo "<center class='customimg-cirt-completion'><h3><i class='fas fa-image' style='font-size: 150px; opacity: 0.2;'></i></h3></center> "; } ?> </div> </label> </div> </div> </div> </div> </div> </div> <div class="cf-course-basic-info cf-course-vert-2 cf-course-verticle-cont" id="cf-course-vert-2"> <div class="mb-3"> <label for="cirt_exam_content" class="text-primary"><?= t('Enter certificate content'); ?></label> <textarea id="cirt_exam_content" name="exam_content"><?php if ($setup && isset($setup['exam_content'])) { echo $setup['exam_content']; } else { echo ""; } ?></textarea> <div class="text-left mt-1"> <span href="javascript:void(0)" class="btn btn-info btn-sm" data-bs-toggle="collapse" data-bs-target="#cfdisp-demo2"><?php w('View Shortcodes'); ?></span> <div id="cfdisp-demo2" class="collapse"> <p class="" style="font-size: 13px !important; opacity: 0.8;"> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{candidate_name}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{candidate_name}</span> <?php w("Candidate name used during the exam"); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{candidate_email}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{candidate_email}</span> <?php w("Candidate email used during the exam"); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{exam_name}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{exam_name}</span> <?php w("Exam name"); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{exam_description}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{exam_description}</span> <?php w('Description for the exam'); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{exam_id}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{exam_id}</span> <?php w('exam_id'); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{candidate_id}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{candidate_id}</span> <?php w("A unique id that use to be generated for each student during the exam (It's not the same as student id)"); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{student_id}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{student_id}</span> <?php w('This is the student id'); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{correct_answers}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{correct_answers}</span> <?php w('Number of correct answers'); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{total_questions}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{total_questions}</span> <?php w('Number of total questions'); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{number_of_attempts}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{number_of_attempts}</span> <?php w('Number of total attempts'); ?><br> <span class="text-info cfdisp_cursor" onclick="copyText(`{number_of_unanswerd}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{number_of_unanswerd}</span> <?php w('Number of questions that were not answered'); ?><br> <span class="text-info cfdisp_cursor" onclick="copyText(`{result_in_percentage}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{result_in_percentage}</span> <?php w('Result in percentage'); ?><br> <span class="text-info cfdisp_cursor" onclick="copyText(`{result_status}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{result_status}</span> <?php w('Progress status text that you have arranged for the exam depending on the mark'); ?> <br> <span class="text-info cfdisp_cursor" onclick="copyText(`{time_spent}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{time_spent}</span> <?php w('Time spent by the candidate for the exam'); ?><br> <span class="text-info cfdisp_cursor" onclick="copyText(`{result_out_date}`)" data-bs-toggle="tooltip" title="Copy to clipboard">{result_out_date}</span> <?php w('Result out date'); ?><br> </p> <p style="font-size: 13px !important;font-weight:500"> <strong><?php w('Example'); ?></strong>: <br> <?php w('Congratulation {candidate_name}, you completed {exam_name} Exam'); ?> <br> <?php w('Congratulation sam, you completed Web development exam'); ?> </p> </div> </div> </div> <div class="mb-3"> <div class="row"> <div class="col-sm-6"> <label for="exam_page_size" class="text-primary"><?= t('Select page size'); ?></label> <select id="exam_page_size" name="exam_page_size" class="form-control"><?php echo $this->createPageSize((($setup && isset($setup['exam_page_size'])) ? $setup['exam_page_size'] : 'A4')); ?></select> </div> <div class="col-sm-6"> <label for="exam_page_size" class="text-primary"><?= t('Select Orientation'); ?></label> <select name="exam_page_orientation" class="form-control"> <option value="portrait" <?php if ($setup && $setup['exam_page_orientation'] === 'portrait') { echo "selected"; } ?>><?= t('Portrait'); ?></option> <option value="landscape" <?php if ($setup && $setup['exam_page_orientation'] === 'landscape') { echo "selected"; } ?>><?= t('Landscape'); ?></option> </select> </div> </div> </div> <div class="mb-3"> <label class="text-primary"><?= t('Select theme'); ?></label> <div class="row"> <?php for ($i = 1; $i <= 5; $i++) { ?> <div class="col-sm-4"> <div class="card" style="cursor:pointer;"> <label for="_lbl_theme_<?php echo $i; ?>"> <div class="card-body" style="height: 200px; text-align:center;"> <center><input id="_lbl_theme_<?php echo $i; ?>" type="radio" name="exam_page_theme" value="<?php echo $i; ?>" <?php if ($setup && $i == $setup['exam_page_theme']) { echo "checked"; } ?>></center> <img src="<?php echo plugins_url('../assets/image/cirtificate_bg/' . $i . '.jpg', __FILE__); ?>" class="img-fluid" style="max-height:100%;max-width:100%;"> </div> </label> </div> </div> <?php } ?> <div class="col-sm-4"> <div class="card" style="cursor:pointer;"> <label for="_lbl_theme_custom"> <div class="card-body exam_cirt_custom_card" style="height: 200px; text-align:center;"> <center> <span class="text-primary" style="cursor:pointer;"> <input id="_lbl_theme_custom" type="radio" name="exam_page_theme" value="<?php if ($setup && is_array($setup) && filter_var($setup['exam_page_theme'], FILTER_VALIDATE_URL)) { echo $setup['exam_page_theme']; } ?>" <?php if (filter_var($setup['exam_page_theme'], FILTER_VALIDATE_URL)) { echo "checked"; } ?>> <strong onclick="cfCourseDouploadCirtBg('exam')"> <?= t('Upload Media'); ?></strong> </span> </center> <?php if ($setup && filter_var($setup['exam_page_theme'], FILTER_VALIDATE_URL)) { ?> <img src="<?php if (filter_var($setup['exam_page_theme'], FILTER_VALIDATE_URL)) { echo $setup['exam_page_theme']; } ?>" class="img-fluid customimg-cirt-exam" style="max-height:100%;max-width:100%;"> <?php } else { echo "<center class='customimg-cirt-exam'><h3><i class='fas fa-image' style='font-size: 150px; opacity: 0.2;'></i></h3></center> "; } ?> </div> </label> </div> </div> </div> </div> </div> <button name="save_cirtificate_setup" class="btn btn-primary" type="submit"><?= t('Save setup'); ?></button> </form> </div> </div> </div> </div> </div> <?php cf_media(true); ?>