Version Description
21 June, 2019 =
Added: Tutor Assignment Addon in the pro version
Added: Upgrade to pro text in plugin action links if Tutor Pro LMS does not exist or not installed
Added: tutor_assignments course post type
Added:
tutor_course_contents_post_types
course content filterRename: categories to course categories
Updated: some template hook modified
Fixed: tutor pro function checking
function_exists('tutor_pro');
Fixed:
wp_enqueue_editor()
in Assets class frontend frontend_scripts method conflict issue with divi builder
Download this release
Release Info
Developer | themeum |
Plugin | Tutor LMS – eLearning and online course solution |
Version | 1.3.3 |
Comparing to | |
See all releases |
Code changes from version 1.3.2 to 1.3.3
- assets/css/tutor-admin.css +27 -3
- assets/css/tutor-front.css +56 -18
- assets/icons/css/tutor-icon.css +2 -2
- assets/js/tutor-admin.js +149 -0
- assets/js/tutor-front.js +31 -0
- classes/Admin.php +3 -3
- classes/Assets.php +8 -1
- classes/Options.php +48 -37
- classes/Post_types.php +52 -3
- classes/Rewrite_Rules.php +3 -0
- classes/Template.php +16 -0
- classes/Utils.php +140 -3
- includes/theme-compatibility/storefront/assets/css/style.css +1 -1
- includes/tutor-template-functions.php +23 -0
- readme.txt +12 -1
- templates/dashboard.php +1 -20
- templates/single-assignment.php +31 -0
- templates/single-course-enrolled-announcements.php +4 -2
- templates/single-course-enrolled-overview.php +4 -0
- templates/single-course-enrolled-questions.php +4 -0
- templates/single-course-enrolled.php +2 -0
- templates/single-course.php +2 -4
- templates/single-lesson.php +0 -3
- templates/single-preview-lesson.php +0 -2
- templates/single/assignment/content.php +251 -0
- templates/single/lesson/content.php +2 -4
- templates/single/lesson/lesson_sidebar.php +56 -29
- tutor.php +2 -2
- views/metabox/course-contents.php +23 -4
- views/metabox/course-topics.php +16 -1
- views/metabox/instructors-metabox.php +0 -1
assets/css/tutor-admin.css
CHANGED
@@ -212,7 +212,7 @@ Group Field Option
|
|
212 |
display: flex;
|
213 |
font-size: 14px;
|
214 |
}
|
215 |
-
#tutor-course-topics .tutor-lesson-top .open-tutor-lesson-modal, .tutor-quiz .open-tutor-quiz-modal{
|
216 |
-webkit-box-flex: 1;
|
217 |
-ms-flex: 1;
|
218 |
flex: 1;
|
@@ -370,7 +370,7 @@ p.course-empty-content {
|
|
370 |
background: #E9E9E9;
|
371 |
padding: 15px 20px;
|
372 |
}
|
373 |
-
#tutor-course-content-wrap .tutor-topics-wrap .tutor-topics-body .create-lesson-in-topic-btn, #tutor-course-content-wrap .tutor-topics-wrap .tutor-topics-body .tutor-add-quiz-btn{
|
374 |
line-height: 35px;
|
375 |
color: #393c40;
|
376 |
display: inline-block;
|
@@ -969,6 +969,8 @@ Quiz Modal
|
|
969 |
line-height: 47px;
|
970 |
color: #fff;
|
971 |
font-size: 25px;
|
|
|
|
|
972 |
}
|
973 |
.tutor-modal-wrap.tutor-quiz-builder-modal-wrap .modal-title {
|
974 |
-ms-flex-preferred-size: 0;
|
@@ -986,6 +988,7 @@ Quiz Modal
|
|
986 |
line-height: 28px;
|
987 |
color: #3a3d42;
|
988 |
font-size: 22px;
|
|
|
989 |
}
|
990 |
.tutor-modal-wrap.tutor-quiz-builder-modal-wrap .modal-header {
|
991 |
padding: 15px 20px;
|
@@ -1046,7 +1049,12 @@ Quiz Modal
|
|
1046 |
.tutor-quiz-builder-form-row .quiz-form-warning {
|
1047 |
color: #e88e06;
|
1048 |
}
|
1049 |
-
|
|
|
|
|
|
|
|
|
|
|
1050 |
.tutor-quiz-question-answers-form {
|
1051 |
background-color: #fff;
|
1052 |
padding: 20px;
|
@@ -1953,4 +1961,20 @@ span.withdraw-method-label {
|
|
1953 |
}
|
1954 |
.withdraw-list-row-actions .rejected a{
|
1955 |
color: #ff3842;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1956 |
}
|
212 |
display: flex;
|
213 |
font-size: 14px;
|
214 |
}
|
215 |
+
#tutor-course-topics .tutor-lesson-top .open-tutor-lesson-modal, .tutor-quiz .open-tutor-quiz-modal, .course-content-item .open-tutor-assignment-modal{
|
216 |
-webkit-box-flex: 1;
|
217 |
-ms-flex: 1;
|
218 |
flex: 1;
|
370 |
background: #E9E9E9;
|
371 |
padding: 15px 20px;
|
372 |
}
|
373 |
+
#tutor-course-content-wrap .tutor-topics-wrap .tutor-topics-body .create-lesson-in-topic-btn, #tutor-course-content-wrap .tutor-topics-wrap .tutor-topics-body .tutor-add-quiz-btn, #tutor-course-content-wrap .tutor-topics-wrap .tutor-topics-body .tutor-create-assignments-btn{
|
374 |
line-height: 35px;
|
375 |
color: #393c40;
|
376 |
display: inline-block;
|
969 |
line-height: 47px;
|
970 |
color: #fff;
|
971 |
font-size: 25px;
|
972 |
+
position: absolute;
|
973 |
+
right: 0;
|
974 |
}
|
975 |
.tutor-modal-wrap.tutor-quiz-builder-modal-wrap .modal-title {
|
976 |
-ms-flex-preferred-size: 0;
|
988 |
line-height: 28px;
|
989 |
color: #3a3d42;
|
990 |
font-size: 22px;
|
991 |
+
position: relative;
|
992 |
}
|
993 |
.tutor-modal-wrap.tutor-quiz-builder-modal-wrap .modal-header {
|
994 |
padding: 15px 20px;
|
1049 |
.tutor-quiz-builder-form-row .quiz-form-warning {
|
1050 |
color: #e88e06;
|
1051 |
}
|
1052 |
+
.tutor-assignment-builder-modal-wrap .modal-container{
|
1053 |
+
padding: 10px;
|
1054 |
+
}
|
1055 |
+
.assignment-modal-form-wrap .tutor-option-field.tutor-assignment-modal-title-wrap{
|
1056 |
+
margin: 0;
|
1057 |
+
}
|
1058 |
.tutor-quiz-question-answers-form {
|
1059 |
background-color: #fff;
|
1060 |
padding: 20px;
|
1961 |
}
|
1962 |
.withdraw-list-row-actions .rejected a{
|
1963 |
color: #ff3842;
|
1964 |
+
}
|
1965 |
+
|
1966 |
+
/**
|
1967 |
+
Assignments
|
1968 |
+
*/
|
1969 |
+
|
1970 |
+
.submitted-assignment-wrap{
|
1971 |
+
background-color: #ffffff;
|
1972 |
+
padding: 20px;
|
1973 |
+
margin-top: 20px;
|
1974 |
+
}
|
1975 |
+
.tutor-individual-attachment-file{
|
1976 |
+
margin-bottom: 20px;
|
1977 |
+
}
|
1978 |
+
.tutor-individual-attachment-file p {
|
1979 |
+
margin: 0 !important;
|
1980 |
}
|
assets/css/tutor-front.css
CHANGED
@@ -2279,24 +2279,6 @@ Instructor
|
|
2279 |
.single-instructor-wrap .single-instructor-bottom .ratings .rating-generated{
|
2280 |
color: #f8c51c;
|
2281 |
}
|
2282 |
-
.tutor-pagination{
|
2283 |
-
margin: 20px 0;
|
2284 |
-
}
|
2285 |
-
.tutor-pagination .page-numbers {
|
2286 |
-
display: inline-block;
|
2287 |
-
padding: 5px 10px;
|
2288 |
-
margin: 0 2px 0 0;
|
2289 |
-
border: 1px solid #eee;
|
2290 |
-
line-height: 1;
|
2291 |
-
text-decoration: none;
|
2292 |
-
border-radius: 2px;
|
2293 |
-
}
|
2294 |
-
.tutor-pagination .page-numbers.current,
|
2295 |
-
a.page-numbers:hover {
|
2296 |
-
background: var( --tutor-primary-hover-color);
|
2297 |
-
border: 1px solid var(--tutor-primary-color);
|
2298 |
-
color: #ffffff;
|
2299 |
-
}
|
2300 |
.tutor-dashboard-pagination-results-stats{
|
2301 |
margin: 10px 0 30px;
|
2302 |
}
|
@@ -4120,6 +4102,43 @@ Course question and answer
|
|
4120 |
/* Tutor Pagination Wrap */
|
4121 |
/* ********************* */
|
4122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4123 |
.tutor-pagination-wrap{
|
4124 |
text-align: center;
|
4125 |
padding: 5px;
|
@@ -4137,6 +4156,8 @@ Course question and answer
|
|
4137 |
border-color: var(--tutor-primary-color);
|
4138 |
}
|
4139 |
|
|
|
|
|
4140 |
|
4141 |
/* ********************* */
|
4142 |
/* Tutor Course Tags */
|
@@ -4485,4 +4506,21 @@ button.tm-close.tutor-icon-line-cross:hover{
|
|
4485 |
.label-status-on-hold{
|
4486 |
background-color: #DB5382;
|
4487 |
color: #ffffff;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4488 |
}
|
2279 |
.single-instructor-wrap .single-instructor-bottom .ratings .rating-generated{
|
2280 |
color: #f8c51c;
|
2281 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2282 |
.tutor-dashboard-pagination-results-stats{
|
2283 |
margin: 10px 0 30px;
|
2284 |
}
|
4102 |
/* Tutor Pagination Wrap */
|
4103 |
/* ********************* */
|
4104 |
|
4105 |
+
.tutor-pagination-wrap{
|
4106 |
+
text-align: center;
|
4107 |
+
margin: 20px 0;
|
4108 |
+
}
|
4109 |
+
|
4110 |
+
|
4111 |
+
.tutor-pagination-wrap a,
|
4112 |
+
.tutor-pagination-wrap span{
|
4113 |
+
padding: 5px;
|
4114 |
+
}
|
4115 |
+
|
4116 |
+
|
4117 |
+
.tutor-pagination-wrap a:hover{
|
4118 |
+
color: var(--tutor-primary-color);
|
4119 |
+
}
|
4120 |
+
|
4121 |
+
|
4122 |
+
/*
|
4123 |
+
|
4124 |
+
.tutor-pagination{
|
4125 |
+
margin: 20px 0;
|
4126 |
+
}
|
4127 |
+
.tutor-pagination .page-numbers {
|
4128 |
+
display: inline-block;
|
4129 |
+
padding: 5px 10px;
|
4130 |
+
margin: 0 2px 0 0;
|
4131 |
+
border: 1px solid #eee;
|
4132 |
+
line-height: 1;
|
4133 |
+
text-decoration: none;
|
4134 |
+
border-radius: 2px;
|
4135 |
+
}
|
4136 |
+
.tutor-pagination .page-numbers.current,
|
4137 |
+
.tutor-pagination a.page-numbers:hover {
|
4138 |
+
background: var( --tutor-primary-hover-color);
|
4139 |
+
border: 1px solid var(--tutor-primary-color);
|
4140 |
+
color: #ffffff;
|
4141 |
+
}
|
4142 |
.tutor-pagination-wrap{
|
4143 |
text-align: center;
|
4144 |
padding: 5px;
|
4156 |
border-color: var(--tutor-primary-color);
|
4157 |
}
|
4158 |
|
4159 |
+
*/
|
4160 |
+
|
4161 |
|
4162 |
/* ********************* */
|
4163 |
/* Tutor Course Tags */
|
4506 |
.label-status-on-hold{
|
4507 |
background-color: #DB5382;
|
4508 |
color: #ffffff;
|
4509 |
+
}
|
4510 |
+
.tutor-lesson-content-area h2 {
|
4511 |
+
margin-bottom: 20px;
|
4512 |
+
margin-top: 20px;
|
4513 |
+
}
|
4514 |
+
.assignment-result-wrap {
|
4515 |
+
text-align: center;
|
4516 |
+
padding: 10px 0;
|
4517 |
+
}
|
4518 |
+
.submitted-assignment-grade-pass{
|
4519 |
+
color: var(--tutor-success-button-color);
|
4520 |
+
}
|
4521 |
+
submitted-assignment-grade-failed{
|
4522 |
+
color: red;
|
4523 |
+
}
|
4524 |
+
.received-marks{
|
4525 |
+
color: var(--tutor-primary-color);
|
4526 |
}
|
assets/icons/css/tutor-icon.css
CHANGED
@@ -244,13 +244,13 @@ Animation Spinner
|
|
244 |
.tutor-icon-attach:before {
|
245 |
content: "\e988";
|
246 |
}
|
247 |
-
.tutor-icon-
|
248 |
content: "\e959";
|
249 |
}
|
250 |
.tutor-icon-short-ans:before {
|
251 |
content: "\e95a";
|
252 |
}
|
253 |
-
.tutor-icon-
|
254 |
content: "\e956";
|
255 |
}
|
256 |
.tutor-icon-menu:before {
|
244 |
.tutor-icon-attach:before {
|
245 |
content: "\e988";
|
246 |
}
|
247 |
+
.tutor-icon-image-ans:before {
|
248 |
content: "\e959";
|
249 |
}
|
250 |
.tutor-icon-short-ans:before {
|
251 |
content: "\e95a";
|
252 |
}
|
253 |
+
.tutor-icon-image-matching:before {
|
254 |
content: "\e956";
|
255 |
}
|
256 |
.tutor-icon-menu:before {
|
assets/js/tutor-admin.js
CHANGED
@@ -1681,4 +1681,153 @@ jQuery(document).ready(function($){
|
|
1681 |
return value && typeof value === 'object' && value.constructor === Object;
|
1682 |
}
|
1683 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1684 |
});
|
1681 |
return value && typeof value === 'object' && value.constructor === Object;
|
1682 |
}
|
1683 |
|
1684 |
+
|
1685 |
+
/**
|
1686 |
+
* Tutor Assignments JS
|
1687 |
+
* @since v.1.3.3
|
1688 |
+
*/
|
1689 |
+
$(document).on('click', '.tutor-create-assignments-btn', function(e){
|
1690 |
+
e.preventDefault();
|
1691 |
+
|
1692 |
+
var $that = $(this);
|
1693 |
+
var topic_id = $(this).attr('data-topic-id');
|
1694 |
+
var course_id = $('#post_ID').val();
|
1695 |
+
|
1696 |
+
$.ajax({
|
1697 |
+
url : ajaxurl,
|
1698 |
+
type : 'POST',
|
1699 |
+
data : {topic_id : topic_id, course_id : course_id, action: 'tutor_load_assignments_builder_modal'},
|
1700 |
+
beforeSend: function () {
|
1701 |
+
$that.addClass('tutor-updating-message');
|
1702 |
+
},
|
1703 |
+
success: function (data) {
|
1704 |
+
$('.tutor-lesson-modal-wrap .modal-container').html(data.data.output);
|
1705 |
+
$('.tutor-lesson-modal-wrap').attr('data-topic-id', topic_id).addClass('show');
|
1706 |
+
|
1707 |
+
tinymce.init(tinyMCEPreInit.mceInit.content);
|
1708 |
+
tinymce.execCommand( 'mceRemoveEditor', false, 'tutor_assignments_modal_editor' );
|
1709 |
+
tinyMCE.execCommand('mceAddEditor', false, "tutor_assignments_modal_editor");
|
1710 |
+
},
|
1711 |
+
complete: function () {
|
1712 |
+
quicktags({id : "tutor_assignments_modal_editor"});
|
1713 |
+
|
1714 |
+
$that.removeClass('tutor-updating-message');
|
1715 |
+
}
|
1716 |
+
});
|
1717 |
+
});
|
1718 |
+
|
1719 |
+
$(document).on('click', '.open-tutor-assignment-modal', function(e){
|
1720 |
+
e.preventDefault();
|
1721 |
+
|
1722 |
+
var $that = $(this);
|
1723 |
+
var assignment_id = $that.attr('data-assignment-id');
|
1724 |
+
var topic_id = $that.attr('data-topic-id');
|
1725 |
+
var course_id = $('#post_ID').val();
|
1726 |
+
|
1727 |
+
$.ajax({
|
1728 |
+
url : ajaxurl,
|
1729 |
+
type : 'POST',
|
1730 |
+
data : {assignment_id : assignment_id, topic_id : topic_id, course_id : course_id, action: 'tutor_load_assignments_builder_modal'},
|
1731 |
+
beforeSend: function () {
|
1732 |
+
$that.addClass('tutor-updating-message');
|
1733 |
+
},
|
1734 |
+
success: function (data) {
|
1735 |
+
$('.tutor-lesson-modal-wrap .modal-container').html(data.data.output);
|
1736 |
+
$('.tutor-lesson-modal-wrap').attr({'data-assignment-id' : assignment_id, 'data-topic-id':topic_id}).addClass('show');
|
1737 |
+
|
1738 |
+
tinymce.init(tinyMCEPreInit.mceInit.content);
|
1739 |
+
tinymce.execCommand( 'mceRemoveEditor', false, 'tutor_assignments_modal_editor' );
|
1740 |
+
tinyMCE.execCommand('mceAddEditor', false, "tutor_assignments_modal_editor");
|
1741 |
+
},
|
1742 |
+
complete: function () {
|
1743 |
+
quicktags({id : "tutor_assignments_modal_editor"});
|
1744 |
+
$that.removeClass('tutor-updating-message');
|
1745 |
+
}
|
1746 |
+
});
|
1747 |
+
});
|
1748 |
+
|
1749 |
+
/**
|
1750 |
+
* Update Assignment Data
|
1751 |
+
*/
|
1752 |
+
$(document).on( 'click', '.update_assignment_modal_btn', function( event ){
|
1753 |
+
event.preventDefault();
|
1754 |
+
|
1755 |
+
var $that = $(this);
|
1756 |
+
var content;
|
1757 |
+
var editor = tinyMCE.get('tutor_assignments_modal_editor');
|
1758 |
+
if (editor) {
|
1759 |
+
content = editor.getContent();
|
1760 |
+
} else {
|
1761 |
+
content = $('#'+inputid).val();
|
1762 |
+
}
|
1763 |
+
|
1764 |
+
var form_data = $(this).closest('form').serialize();
|
1765 |
+
form_data += '&assignment_content='+content;
|
1766 |
+
|
1767 |
+
$.ajax({
|
1768 |
+
url : ajaxurl,
|
1769 |
+
type : 'POST',
|
1770 |
+
data : form_data,
|
1771 |
+
beforeSend: function () {
|
1772 |
+
$that.addClass('tutor-updating-message');
|
1773 |
+
},
|
1774 |
+
success: function (data) {
|
1775 |
+
if (data.success){
|
1776 |
+
$('#tutor-course-content-wrap').html(data.data.course_contents);
|
1777 |
+
enable_sorting_topic_lesson();
|
1778 |
+
|
1779 |
+
//Close the modal
|
1780 |
+
$('.tutor-lesson-modal-wrap').removeClass('show');
|
1781 |
+
}
|
1782 |
+
},
|
1783 |
+
complete: function () {
|
1784 |
+
$that.removeClass('tutor-updating-message');
|
1785 |
+
}
|
1786 |
+
});
|
1787 |
+
});
|
1788 |
+
|
1789 |
+
/**
|
1790 |
+
* Add Assignment
|
1791 |
+
*/
|
1792 |
+
$(document).on( 'click', '.add-assignment-attachments', function( event ){
|
1793 |
+
event.preventDefault();
|
1794 |
+
|
1795 |
+
var $that = $(this);
|
1796 |
+
var frame;
|
1797 |
+
// If the media frame already exists, reopen it.
|
1798 |
+
if ( frame ) {
|
1799 |
+
frame.open();
|
1800 |
+
return;
|
1801 |
+
}
|
1802 |
+
|
1803 |
+
// Create a new media frame
|
1804 |
+
frame = wp.media({
|
1805 |
+
title: 'Select or Upload Media Of Your Chosen Persuasion',
|
1806 |
+
button: {
|
1807 |
+
text: 'Use this media'
|
1808 |
+
},
|
1809 |
+
multiple: false // Set to true to allow multiple files to be selected
|
1810 |
+
});
|
1811 |
+
|
1812 |
+
// When an image is selected in the media frame...
|
1813 |
+
frame.on( 'select', function() {
|
1814 |
+
// Get media attachment details from the frame state
|
1815 |
+
var attachment = frame.state().get('selection').first().toJSON();
|
1816 |
+
|
1817 |
+
var field_markup = '<div class="tutor-individual-attachment-file"><p class="attachment-file-name">'+attachment.filename+'</p><input type="hidden" name="tutor_assignment_attachments[]" value="'+attachment.id+'"><a href="javascript:;" class="remove-assignment-attachment-a text-muted"> × Remove</a></div>';
|
1818 |
+
|
1819 |
+
$('#assignment-attached-file').append(field_markup);
|
1820 |
+
$that.closest('.video_source_wrap_html5').find('input').val(attachment.id);
|
1821 |
+
});
|
1822 |
+
// Finally, open the modal on click
|
1823 |
+
frame.open();
|
1824 |
+
});
|
1825 |
+
|
1826 |
+
$(document).on( 'click', '.remove-assignment-attachment-a', function( event ){
|
1827 |
+
event.preventDefault();
|
1828 |
+
$(this).closest('.tutor-individual-attachment-file').remove();
|
1829 |
+
});
|
1830 |
+
|
1831 |
+
|
1832 |
+
|
1833 |
});
|
assets/js/tutor-front.js
CHANGED
@@ -776,6 +776,37 @@ jQuery(document).ready(function($){
|
|
776 |
});
|
777 |
|
778 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
779 |
|
780 |
|
781 |
});
|
776 |
});
|
777 |
|
778 |
|
779 |
+
/**
|
780 |
+
* Assignment
|
781 |
+
*
|
782 |
+
* @since v.1.3.3
|
783 |
+
*/
|
784 |
+
|
785 |
+
$( document ).on( 'submit', '#tutor_assignment_start_form', function(e) {
|
786 |
+
e.preventDefault();
|
787 |
+
|
788 |
+
var $that = $(this);
|
789 |
+
var form_data = $that.serialize()+'&action=tutor_start_assignment';
|
790 |
+
|
791 |
+
$.ajax({
|
792 |
+
url: _tutorobject.ajaxurl,
|
793 |
+
type: 'POST',
|
794 |
+
data: form_data,
|
795 |
+
beforeSend: function () {
|
796 |
+
$('#tutor_assignment_start_btn').addClass('updating-icon');
|
797 |
+
},
|
798 |
+
success: function (data) {
|
799 |
+
if (data.success){
|
800 |
+
location.reload();
|
801 |
+
}
|
802 |
+
},
|
803 |
+
complete : function () {
|
804 |
+
$('#tutor_assignment_start_btn').removeClass('updating-icon');
|
805 |
+
}
|
806 |
+
});
|
807 |
+
|
808 |
+
});
|
809 |
+
|
810 |
|
811 |
|
812 |
});
|
classes/Admin.php
CHANGED
@@ -400,12 +400,12 @@ class Admin{
|
|
400 |
}
|
401 |
|
402 |
public function plugin_action_links($actions){
|
403 |
-
|
404 |
|
405 |
if(!$hasPro){
|
406 |
$actions['tutor_pro_link'] = '<a href="https://www.themeum.com/product/tutor-lms/#pricing?utm_source=tutor_plugin_action_link&utm_medium=wordpress_dashboard&utm_campaign=go_premium" target="_blank"><span
|
407 |
-
style="color: #
|
408 |
-
}
|
409 |
|
410 |
$is_erase_data = tutor_utils()->get_option('delete_on_uninstall');
|
411 |
|
400 |
}
|
401 |
|
402 |
public function plugin_action_links($actions){
|
403 |
+
$hasPro = tutor()->has_pro;
|
404 |
|
405 |
if(!$hasPro){
|
406 |
$actions['tutor_pro_link'] = '<a href="https://www.themeum.com/product/tutor-lms/#pricing?utm_source=tutor_plugin_action_link&utm_medium=wordpress_dashboard&utm_campaign=go_premium" target="_blank"><span
|
407 |
+
style="color: #ff7742; font-weight: bold;">' . __('Upgrade to Pro', 'wp-megamenu') . '</span></a>';
|
408 |
+
}
|
409 |
|
410 |
$is_erase_data = tutor_utils()->get_option('delete_on_uninstall');
|
411 |
|
classes/Assets.php
CHANGED
@@ -45,7 +45,14 @@ class Assets{
|
|
45 |
public function frontend_scripts(){
|
46 |
global $post, $wp_query;
|
47 |
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
$tutor_dashboard_page_id = (int) tutor_utils()->get_option('tutor_dashboard_page_id');
|
51 |
if ($tutor_dashboard_page_id === get_the_ID()){
|
45 |
public function frontend_scripts(){
|
46 |
global $post, $wp_query;
|
47 |
|
48 |
+
/**
|
49 |
+
* We checked wp_enqueue_editor() in condition because it conflicting with Divi Builder
|
50 |
+
* condition @since v.1.3.3
|
51 |
+
*/
|
52 |
+
|
53 |
+
if (is_single()){
|
54 |
+
wp_enqueue_editor();
|
55 |
+
}
|
56 |
|
57 |
$tutor_dashboard_page_id = (int) tutor_utils()->get_option('tutor_dashboard_page_id');
|
58 |
if ($tutor_dashboard_page_id === get_the_ID()){
|
classes/Options.php
CHANGED
@@ -62,7 +62,7 @@ class Options {
|
|
62 |
|
63 |
wp_send_json_success( array('msg' => __('Option Updated', 'tutor') ) );
|
64 |
}
|
65 |
-
|
66 |
public function options_attr(){
|
67 |
$pages = tutor_utils()->get_pages();
|
68 |
|
@@ -83,35 +83,40 @@ class Options {
|
|
83 |
'fields' => array(
|
84 |
'tutor_dashboard_page_id' => array(
|
85 |
'type' => 'select',
|
86 |
-
'label' => __('
|
87 |
'default' => '0',
|
88 |
'options' => $pages,
|
89 |
-
'desc' => __('This page will
|
90 |
),
|
91 |
'enable_public_profile' => array(
|
92 |
'type' => 'checkbox',
|
93 |
-
'label' => __('
|
|
|
94 |
'default' => '0',
|
95 |
'desc' => __('Enable this to make a profile publicly visible', 'tutor')."<br />" .$student_url,
|
96 |
),
|
97 |
'load_tutor_css' => array(
|
98 |
'type' => 'checkbox',
|
99 |
-
'label' => __('Load Tutor
|
|
|
100 |
'desc' => __('If your theme has its own styling, then you can turn it off to load CSS from the plugin directory', 'tutor'),
|
101 |
),
|
102 |
'load_tutor_js' => array(
|
103 |
'type' => 'checkbox',
|
104 |
-
'label' => __('Load Tutor
|
|
|
105 |
'desc' => __('If you have put required script in your theme javascript file, then you can turn it off to load JavaScript from the plugin directory', 'tutor'),
|
106 |
),
|
107 |
'student_must_login_to_view_course' => array(
|
108 |
'type' => 'checkbox',
|
109 |
-
'label' => __('Course
|
|
|
110 |
'desc' => __('Students must be logged in to view course', 'tutor'),
|
111 |
),
|
112 |
'delete_on_uninstall' => array(
|
113 |
'type' => 'checkbox',
|
114 |
'label' => __('Erase upon uninstallation', 'tutor'),
|
|
|
115 |
'desc' => __('Delete all data during uninstall', 'tutor'),
|
116 |
),
|
117 |
)
|
@@ -127,19 +132,22 @@ class Options {
|
|
127 |
'fields' => array(
|
128 |
'enable_gutenberg_course_edit' => array(
|
129 |
'type' => 'checkbox',
|
130 |
-
'label' => __('
|
131 |
-
'label_title' => __('Enable
|
|
|
132 |
),
|
133 |
'display_course_instructors' => array(
|
134 |
'type' => 'checkbox',
|
135 |
-
'label' => __('Display
|
136 |
-
'label_title' => __('
|
|
|
137 |
),
|
138 |
'enable_q_and_a_on_course' => array(
|
139 |
'type' => 'checkbox',
|
140 |
-
'label' => __('
|
|
|
141 |
'default' => '0',
|
142 |
-
'desc' => __('
|
143 |
),
|
144 |
),
|
145 |
),
|
@@ -152,7 +160,7 @@ class Options {
|
|
152 |
'label' => __('Course Archive Page', 'tutor'),
|
153 |
'default' => '0',
|
154 |
'options' => $pages,
|
155 |
-
'desc' => __('
|
156 |
),
|
157 |
'courses_col_per_row' => array(
|
158 |
'type' => 'slider',
|
@@ -263,16 +271,17 @@ class Options {
|
|
263 |
'fields' => array(
|
264 |
'enable_course_marketplace' => array(
|
265 |
'type' => 'checkbox',
|
266 |
-
'label' => __('
|
|
|
267 |
'default' => '0',
|
268 |
'desc' => __('By enabling this settings will allow multiple instructors can upload their course.', 'tutor'),
|
269 |
),
|
270 |
'instructor_register_page' => array(
|
271 |
'type' => 'select',
|
272 |
-
'label' => __('Instructor
|
273 |
'default' => '0',
|
274 |
'options' => $pages,
|
275 |
-
'desc' => __('This will be
|
276 |
),
|
277 |
'instructor_can_publish_course' => array(
|
278 |
'type' => 'checkbox',
|
@@ -282,9 +291,10 @@ class Options {
|
|
282 |
),
|
283 |
'enable_become_instructor_btn' => array(
|
284 |
'type' => 'checkbox',
|
285 |
-
'label' => __('
|
|
|
286 |
'default' => '0',
|
287 |
-
'desc' => __('
|
288 |
),
|
289 |
),
|
290 |
),
|
@@ -299,7 +309,7 @@ class Options {
|
|
299 |
'fields' => array(
|
300 |
'student_register_page' => array(
|
301 |
'type' => 'select',
|
302 |
-
'label' => __('Student
|
303 |
'default' => '0',
|
304 |
'options' => $pages,
|
305 |
'desc' => __('Choose the page for student registration page', 'tutor'),
|
@@ -307,13 +317,14 @@ class Options {
|
|
307 |
'students_own_review_show_at_profile' => array(
|
308 |
'type' => 'checkbox',
|
309 |
'label' => __('Show reviews on profile', 'tutor'),
|
310 |
-
'label_title' => __('Enable
|
311 |
'default' => '0',
|
312 |
-
'desc' => __('Enabling this will
|
313 |
),
|
314 |
'show_courses_completed_by_student' => array(
|
315 |
'type' => 'checkbox',
|
316 |
-
'label' => __('Show Completed
|
|
|
317 |
'default' => '0',
|
318 |
'desc' => __('Completed courses will be show on student profile', 'tutor')."<br />".$student_url,
|
319 |
),
|
@@ -322,50 +333,50 @@ class Options {
|
|
322 |
),
|
323 |
),
|
324 |
'tutor_earning' => array(
|
325 |
-
'label' => __('
|
326 |
'sections' => array(
|
327 |
'general' => array(
|
328 |
-
'label' => __('
|
329 |
'desc' => __('Enable Disable Option to on/off notification on various event', 'tutor'),
|
330 |
'fields' => array(
|
331 |
'enable_tutor_earning' => array(
|
332 |
'type' => 'checkbox',
|
333 |
-
'label' => __('
|
334 |
-
'label_title' => __('Enable
|
335 |
'default' => '0',
|
336 |
-
'desc' => __('
|
337 |
),
|
338 |
'earning_admin_commission' => array(
|
339 |
'type' => 'number',
|
340 |
-
'label' => __('Admin
|
341 |
'default' => '20',
|
342 |
-
'desc' => __('Define the
|
343 |
),
|
344 |
'earning_instructor_commission' => array(
|
345 |
'type' => 'number',
|
346 |
-
'label' => __('Instructor
|
347 |
'default' => '80',
|
348 |
-
'desc' => __('Define the
|
349 |
),
|
350 |
'tutor_earning_fees' => array(
|
351 |
'type' => 'group_fields',
|
352 |
-
'label' => __('
|
353 |
-
'desc' => __('
|
354 |
'group_fields' => array(
|
355 |
|
356 |
'enable_fees_deducting' => array(
|
357 |
'type' => 'checkbox',
|
358 |
-
'label' => __('Enable
|
359 |
'default' => '0',
|
360 |
),
|
361 |
'fees_name' => array(
|
362 |
'type' => 'text',
|
363 |
-
'label' => __('
|
364 |
'default' => '',
|
365 |
),
|
366 |
'fees_amount' => array(
|
367 |
'type' => 'number',
|
368 |
-
'label' => __('
|
369 |
'default' => '',
|
370 |
),
|
371 |
'fees_type' => array(
|
62 |
|
63 |
wp_send_json_success( array('msg' => __('Option Updated', 'tutor') ) );
|
64 |
}
|
65 |
+
|
66 |
public function options_attr(){
|
67 |
$pages = tutor_utils()->get_pages();
|
68 |
|
83 |
'fields' => array(
|
84 |
'tutor_dashboard_page_id' => array(
|
85 |
'type' => 'select',
|
86 |
+
'label' => __('Dashboard Page', 'tutor'),
|
87 |
'default' => '0',
|
88 |
'options' => $pages,
|
89 |
+
'desc' => __('This page will be used for student and instructor dashboard', 'tutor'),
|
90 |
),
|
91 |
'enable_public_profile' => array(
|
92 |
'type' => 'checkbox',
|
93 |
+
'label' => __('Public Profile', 'tutor'),
|
94 |
+
'label_title' => __('Enable', 'tutor'),
|
95 |
'default' => '0',
|
96 |
'desc' => __('Enable this to make a profile publicly visible', 'tutor')."<br />" .$student_url,
|
97 |
),
|
98 |
'load_tutor_css' => array(
|
99 |
'type' => 'checkbox',
|
100 |
+
'label' => __('Load Tutor CSS', 'tutor'),
|
101 |
+
'label_title' => __('Enable', 'tutor'),
|
102 |
'desc' => __('If your theme has its own styling, then you can turn it off to load CSS from the plugin directory', 'tutor'),
|
103 |
),
|
104 |
'load_tutor_js' => array(
|
105 |
'type' => 'checkbox',
|
106 |
+
'label' => __('Load Tutor JavaScript', 'tutor'),
|
107 |
+
'label_title' => __('Enable', 'tutor'),
|
108 |
'desc' => __('If you have put required script in your theme javascript file, then you can turn it off to load JavaScript from the plugin directory', 'tutor'),
|
109 |
),
|
110 |
'student_must_login_to_view_course' => array(
|
111 |
'type' => 'checkbox',
|
112 |
+
'label' => __('Course Visibility', 'tutor'),
|
113 |
+
'label_title' => __('Logged in only', 'tutor'),
|
114 |
'desc' => __('Students must be logged in to view course', 'tutor'),
|
115 |
),
|
116 |
'delete_on_uninstall' => array(
|
117 |
'type' => 'checkbox',
|
118 |
'label' => __('Erase upon uninstallation', 'tutor'),
|
119 |
+
'label_title' => __('Enable', 'tutor'),
|
120 |
'desc' => __('Delete all data during uninstall', 'tutor'),
|
121 |
),
|
122 |
)
|
132 |
'fields' => array(
|
133 |
'enable_gutenberg_course_edit' => array(
|
134 |
'type' => 'checkbox',
|
135 |
+
'label' => __('Gutenberg Editor', 'tutor'),
|
136 |
+
'label_title' => __('Enable', 'tutor'),
|
137 |
+
'desc' => __('Use Gutenberg editor on course description area.', 'tutor'),
|
138 |
),
|
139 |
'display_course_instructors' => array(
|
140 |
'type' => 'checkbox',
|
141 |
+
'label' => __('Display Instructor Info', 'tutor'),
|
142 |
+
'label_title' => __('Enable', 'tutor'),
|
143 |
+
'desc' => __('Show tutor bio on each course page.', 'tutor'),
|
144 |
),
|
145 |
'enable_q_and_a_on_course' => array(
|
146 |
'type' => 'checkbox',
|
147 |
+
'label' => __('Question and Answer', 'tutor'),
|
148 |
+
'label_title' => __('Enable','tutor'),
|
149 |
'default' => '0',
|
150 |
+
'desc' => __('Enabling this feature will add a Q&A section on every course.', 'tutor'),
|
151 |
),
|
152 |
),
|
153 |
),
|
160 |
'label' => __('Course Archive Page', 'tutor'),
|
161 |
'default' => '0',
|
162 |
'options' => $pages,
|
163 |
+
'desc' => __('This page will be used to list all the published courses.', 'tutor'),
|
164 |
),
|
165 |
'courses_col_per_row' => array(
|
166 |
'type' => 'slider',
|
271 |
'fields' => array(
|
272 |
'enable_course_marketplace' => array(
|
273 |
'type' => 'checkbox',
|
274 |
+
'label' => __('Course Marketplace', 'tutor'),
|
275 |
+
'label_title' => __('Enable', 'tutor'),
|
276 |
'default' => '0',
|
277 |
'desc' => __('By enabling this settings will allow multiple instructors can upload their course.', 'tutor'),
|
278 |
),
|
279 |
'instructor_register_page' => array(
|
280 |
'type' => 'select',
|
281 |
+
'label' => __('Instructor Registration Page', 'tutor'),
|
282 |
'default' => '0',
|
283 |
'options' => $pages,
|
284 |
+
'desc' => __('This page will be used to sign up new instructors.', 'tutor'),
|
285 |
),
|
286 |
'instructor_can_publish_course' => array(
|
287 |
'type' => 'checkbox',
|
291 |
),
|
292 |
'enable_become_instructor_btn' => array(
|
293 |
'type' => 'checkbox',
|
294 |
+
'label' => __('Become Instructor Button', 'tutor'),
|
295 |
+
'label_title' => __('Enable', 'tutor'),
|
296 |
'default' => '0',
|
297 |
+
'desc' => __('Uncheck this option to hide the button from student dashboard.', 'tutor'),
|
298 |
),
|
299 |
),
|
300 |
),
|
309 |
'fields' => array(
|
310 |
'student_register_page' => array(
|
311 |
'type' => 'select',
|
312 |
+
'label' => __('Student Registration Page', 'tutor'),
|
313 |
'default' => '0',
|
314 |
'options' => $pages,
|
315 |
'desc' => __('Choose the page for student registration page', 'tutor'),
|
317 |
'students_own_review_show_at_profile' => array(
|
318 |
'type' => 'checkbox',
|
319 |
'label' => __('Show reviews on profile', 'tutor'),
|
320 |
+
'label_title' => __('Enable', 'tutor'),
|
321 |
'default' => '0',
|
322 |
+
'desc' => __('Enabling this will show the reviews written by each student on their profile', 'tutor')."<br />" .$student_url,
|
323 |
),
|
324 |
'show_courses_completed_by_student' => array(
|
325 |
'type' => 'checkbox',
|
326 |
+
'label' => __('Show Completed Courses', 'tutor'),
|
327 |
+
'label_title' => __('Enable', 'tutor'),
|
328 |
'default' => '0',
|
329 |
'desc' => __('Completed courses will be show on student profile', 'tutor')."<br />".$student_url,
|
330 |
),
|
333 |
),
|
334 |
),
|
335 |
'tutor_earning' => array(
|
336 |
+
'label' => __('Revenue Sharing', 'tutor'),
|
337 |
'sections' => array(
|
338 |
'general' => array(
|
339 |
+
'label' => __('Revenue Sharing', 'tutor'),
|
340 |
'desc' => __('Enable Disable Option to on/off notification on various event', 'tutor'),
|
341 |
'fields' => array(
|
342 |
'enable_tutor_earning' => array(
|
343 |
'type' => 'checkbox',
|
344 |
+
'label' => __('Revenue Sharing', 'tutor'),
|
345 |
+
'label_title' => __('Enable', 'tutor'),
|
346 |
'default' => '0',
|
347 |
+
'desc' => __('If disabled, the Admin will receive 100% of the revenue', 'tutor'),
|
348 |
),
|
349 |
'earning_admin_commission' => array(
|
350 |
'type' => 'number',
|
351 |
+
'label' => __('Admin Share Percentage', 'tutor'),
|
352 |
'default' => '20',
|
353 |
+
'desc' => __('Define the share of the Admin from each sale.(after deducting fees)', 'tutor'),
|
354 |
),
|
355 |
'earning_instructor_commission' => array(
|
356 |
'type' => 'number',
|
357 |
+
'label' => __('Instructor Share Percentage', 'tutor'),
|
358 |
'default' => '80',
|
359 |
+
'desc' => __('Define the share for instructors from each sale.(after deducting fees)', 'tutor'),
|
360 |
),
|
361 |
'tutor_earning_fees' => array(
|
362 |
'type' => 'group_fields',
|
363 |
+
'label' => __('Fee Deduction', 'tutor'),
|
364 |
+
'desc' => __('Fees are charged from the entire sales amount. The remaining amount will be divided among admin and instructors.', 'tutor'),
|
365 |
'group_fields' => array(
|
366 |
|
367 |
'enable_fees_deducting' => array(
|
368 |
'type' => 'checkbox',
|
369 |
+
'label' => __('Enable', 'tutor'),
|
370 |
'default' => '0',
|
371 |
),
|
372 |
'fees_name' => array(
|
373 |
'type' => 'text',
|
374 |
+
'label' => __('Fee Name', 'tutor'),
|
375 |
'default' => '',
|
376 |
),
|
377 |
'fees_amount' => array(
|
378 |
'type' => 'number',
|
379 |
+
'label' => __('Fee Amount', 'tutor'),
|
380 |
'default' => '',
|
381 |
),
|
382 |
'fees_type' => array(
|
classes/Post_types.php
CHANGED
@@ -16,7 +16,7 @@ class Post_types{
|
|
16 |
add_action( 'init', array($this, 'register_lesson_post_types') );
|
17 |
add_action( 'init', array($this, 'register_quiz_post_types') );
|
18 |
add_action( 'init', array($this, 'register_topic_post_types') );
|
19 |
-
|
20 |
|
21 |
/**
|
22 |
* Customize the message of course
|
@@ -81,7 +81,7 @@ class Post_types{
|
|
81 |
* Taxonomy
|
82 |
*/
|
83 |
$labels = array(
|
84 |
-
'name' => _x( 'Categories', 'taxonomy general name', 'tutor' ),
|
85 |
'singular_name' => _x( 'Category', 'taxonomy singular name', 'tutor' ),
|
86 |
'search_items' => __( 'Search Categories', 'tutor' ),
|
87 |
'popular_items' => __( 'Popular Categories', 'tutor' ),
|
@@ -96,7 +96,7 @@ class Post_types{
|
|
96 |
'add_or_remove_items' => __( 'Add or remove categories', 'tutor' ),
|
97 |
'choose_from_most_used' => __( 'Choose from the most used categories', 'tutor' ),
|
98 |
'not_found' => __( 'No categories found.', 'tutor' ),
|
99 |
-
'menu_name' => __( 'Categories', 'tutor' ),
|
100 |
);
|
101 |
|
102 |
$args = array(
|
@@ -256,6 +256,55 @@ class Post_types{
|
|
256 |
register_post_type( 'topics', $args );
|
257 |
}
|
258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
function course_updated_messages( $messages ) {
|
260 |
$post = get_post();
|
261 |
$post_type = get_post_type( $post );
|
16 |
add_action( 'init', array($this, 'register_lesson_post_types') );
|
17 |
add_action( 'init', array($this, 'register_quiz_post_types') );
|
18 |
add_action( 'init', array($this, 'register_topic_post_types') );
|
19 |
+
add_action( 'init', array($this, 'register_assignments_post_types') );
|
20 |
|
21 |
/**
|
22 |
* Customize the message of course
|
81 |
* Taxonomy
|
82 |
*/
|
83 |
$labels = array(
|
84 |
+
'name' => _x( 'Course Categories', 'taxonomy general name', 'tutor' ),
|
85 |
'singular_name' => _x( 'Category', 'taxonomy singular name', 'tutor' ),
|
86 |
'search_items' => __( 'Search Categories', 'tutor' ),
|
87 |
'popular_items' => __( 'Popular Categories', 'tutor' ),
|
96 |
'add_or_remove_items' => __( 'Add or remove categories', 'tutor' ),
|
97 |
'choose_from_most_used' => __( 'Choose from the most used categories', 'tutor' ),
|
98 |
'not_found' => __( 'No categories found.', 'tutor' ),
|
99 |
+
'menu_name' => __( 'Course Categories', 'tutor' ),
|
100 |
);
|
101 |
|
102 |
$args = array(
|
256 |
register_post_type( 'topics', $args );
|
257 |
}
|
258 |
|
259 |
+
public function register_assignments_post_types() {
|
260 |
+
$labels = array(
|
261 |
+
'name' => _x( 'Assignments', 'post type general name', 'tutor' ),
|
262 |
+
'singular_name' => _x( 'Assignment', 'post type singular name', 'tutor' ),
|
263 |
+
'menu_name' => _x( 'Assignments', 'admin menu', 'tutor' ),
|
264 |
+
'name_admin_bar' => _x( 'Assignment', 'add new on admin bar', 'tutor' ),
|
265 |
+
'add_new' => _x( 'Add New', $this->lesson_post_type, 'tutor' ),
|
266 |
+
'add_new_item' => __( 'Add New Assignment', 'tutor' ),
|
267 |
+
'new_item' => __( 'New Assignment', 'tutor' ),
|
268 |
+
'edit_item' => __( 'Edit Assignment', 'tutor' ),
|
269 |
+
'view_item' => __( 'View Assignment', 'tutor' ),
|
270 |
+
'all_items' => __( 'Assignments', 'tutor' ),
|
271 |
+
'search_items' => __( 'Search Assignments', 'tutor' ),
|
272 |
+
'parent_item_colon' => __( 'Parent Assignments:', 'tutor' ),
|
273 |
+
'not_found' => __( 'No Assignments found.', 'tutor' ),
|
274 |
+
'not_found_in_trash' => __( 'No Assignments found in Trash.', 'tutor' )
|
275 |
+
);
|
276 |
+
|
277 |
+
$args = array(
|
278 |
+
'labels' => $labels,
|
279 |
+
'description' => __( 'Description.', 'tutor' ),
|
280 |
+
'public' => true,
|
281 |
+
'publicly_queryable' => true,
|
282 |
+
'show_ui' => false,
|
283 |
+
'show_in_menu' => 'tutor',
|
284 |
+
'query_var' => true,
|
285 |
+
'rewrite' => array( 'slug' => $this->lesson_post_type ),
|
286 |
+
'menu_icon' => 'dashicons-editor-help',
|
287 |
+
'capability_type' => 'post',
|
288 |
+
'has_archive' => true,
|
289 |
+
'hierarchical' => false,
|
290 |
+
'menu_position' => null,
|
291 |
+
'supports' => array( 'title', 'editor'),
|
292 |
+
'capabilities' => array(
|
293 |
+
'edit_post' => 'edit_tutor_assignment',
|
294 |
+
'read_post' => 'read_tutor_assignment',
|
295 |
+
'delete_post' => 'delete_tutor_assignment',
|
296 |
+
'delete_posts' => 'delete_tutor_assignments',
|
297 |
+
'edit_posts' => 'edit_tutor_assignments',
|
298 |
+
'edit_others_posts' => 'edit_others_tutor_assignments',
|
299 |
+
'publish_posts' => 'publish_tutor_assignments',
|
300 |
+
'read_private_posts' => 'read_private_tutor_assignments',
|
301 |
+
'create_posts' => 'edit_tutor_assignments',
|
302 |
+
),
|
303 |
+
);
|
304 |
+
|
305 |
+
register_post_type( 'tutor_assignments', $args );
|
306 |
+
}
|
307 |
+
|
308 |
function course_updated_messages( $messages ) {
|
309 |
$post = get_post();
|
310 |
$post_type = get_post_type( $post );
|
classes/Rewrite_Rules.php
CHANGED
@@ -38,6 +38,9 @@ class Rewrite_Rules extends Tutor_Base {
|
|
38 |
$this->course_post_type."/(.+?)/{$this->lesson_base_permalink}/(.+?)/?$" => "index.php?post_type={$this->lesson_post_type}&name=".$wp_rewrite->preg_index(2),
|
39 |
//Quiz Permalink
|
40 |
$this->course_post_type."/(.+?)/tutor_quiz/(.+?)/?$" => "index.php?post_type=tutor_quiz&name=".$wp_rewrite->preg_index(2),
|
|
|
|
|
|
|
41 |
//Private Video URL
|
42 |
"video-url/(.+?)/?$" => "index.php?post_type={$this->lesson_post_type}&lesson_video=true&name=". $wp_rewrite->preg_index(1),
|
43 |
//Student Public Profile URL
|
38 |
$this->course_post_type."/(.+?)/{$this->lesson_base_permalink}/(.+?)/?$" => "index.php?post_type={$this->lesson_post_type}&name=".$wp_rewrite->preg_index(2),
|
39 |
//Quiz Permalink
|
40 |
$this->course_post_type."/(.+?)/tutor_quiz/(.+?)/?$" => "index.php?post_type=tutor_quiz&name=".$wp_rewrite->preg_index(2),
|
41 |
+
//Assignments URL
|
42 |
+
$this->course_post_type."/(.+?)/assignments/(.+?)/?$" => "index.php?post_type=tutor_assignments&name=".$wp_rewrite->preg_index(2),
|
43 |
+
|
44 |
//Private Video URL
|
45 |
"video-url/(.+?)/?$" => "index.php?post_type={$this->lesson_post_type}&lesson_video=true&name=". $wp_rewrite->preg_index(1),
|
46 |
//Student Public Profile URL
|
classes/Template.php
CHANGED
@@ -23,6 +23,7 @@ class Template extends Tutor_Base {
|
|
23 |
add_filter( 'template_include', array($this, 'load_single_lesson_template'), 99 );
|
24 |
add_filter( 'template_include', array($this, 'play_private_video'), 99 );
|
25 |
add_filter( 'template_include', array($this, 'load_quiz_template'), 99 );
|
|
|
26 |
|
27 |
add_filter( 'template_include', array($this, 'student_public_profile'), 99 );
|
28 |
add_filter( 'template_include', array($this, 'tutor_dashboard'), 99 );
|
@@ -315,6 +316,21 @@ class Template extends Tutor_Base {
|
|
315 |
return $template;
|
316 |
}
|
317 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
/**
|
319 |
* @param $template
|
320 |
*
|
23 |
add_filter( 'template_include', array($this, 'load_single_lesson_template'), 99 );
|
24 |
add_filter( 'template_include', array($this, 'play_private_video'), 99 );
|
25 |
add_filter( 'template_include', array($this, 'load_quiz_template'), 99 );
|
26 |
+
add_filter( 'template_include', array($this, 'load_assignment_template'), 99 );
|
27 |
|
28 |
add_filter( 'template_include', array($this, 'student_public_profile'), 99 );
|
29 |
add_filter( 'template_include', array($this, 'tutor_dashboard'), 99 );
|
316 |
return $template;
|
317 |
}
|
318 |
|
319 |
+
public function load_assignment_template($template){
|
320 |
+
global $wp_query;
|
321 |
+
|
322 |
+
if ($wp_query->is_single && ! empty($wp_query->query_vars['post_type']) && $wp_query->query_vars['post_type'] === 'tutor_assignments'){
|
323 |
+
if (is_user_logged_in()){
|
324 |
+
$template = tutor_get_template( 'single-assignment' );
|
325 |
+
}else{
|
326 |
+
$template = tutor_get_template('login');
|
327 |
+
}
|
328 |
+
return $template;
|
329 |
+
}
|
330 |
+
|
331 |
+
return $template;
|
332 |
+
}
|
333 |
+
|
334 |
/**
|
335 |
* @param $template
|
336 |
*
|
classes/Utils.php
CHANGED
@@ -92,6 +92,24 @@ class Utils {
|
|
92 |
return $value;
|
93 |
}
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
/**
|
96 |
* @return array
|
97 |
*
|
@@ -719,7 +737,7 @@ class Utils {
|
|
719 |
|
720 |
$lesson_post_type = tutor()->lesson_post_type;
|
721 |
$args = array(
|
722 |
-
'post_type' => array($lesson_post_type, 'tutor_quiz'),
|
723 |
'post_parent' => $topics_id,
|
724 |
'posts_per_page' => $limit,
|
725 |
'orderby' => 'menu_order',
|
@@ -741,11 +759,11 @@ class Utils {
|
|
741 |
public function checking_nonce($request_method = 'post'){
|
742 |
if ($request_method === 'post'){
|
743 |
if (!isset($_POST[tutor()->nonce]) || !wp_verify_nonce($_POST[tutor()->nonce], tutor()->nonce_action)) {
|
744 |
-
exit();
|
745 |
}
|
746 |
}else{
|
747 |
if (!isset($_GET[tutor()->nonce]) || !wp_verify_nonce($_GET[tutor()->nonce], tutor()->nonce_action)) {
|
748 |
-
exit();
|
749 |
}
|
750 |
}
|
751 |
}
|
@@ -4265,4 +4283,123 @@ class Utils {
|
|
4265 |
return "<span class='label-order-status label-status-{$status}'>$status_name</span>";
|
4266 |
}
|
4267 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4268 |
}
|
92 |
return $value;
|
93 |
}
|
94 |
|
95 |
+
/**
|
96 |
+
* @param null $key
|
97 |
+
* @param array $array
|
98 |
+
*
|
99 |
+
* @return array|bool|mixed
|
100 |
+
*
|
101 |
+
* alias of avalue_dot method of utils
|
102 |
+
*
|
103 |
+
* Get array value by key and recursive array value by dot notation key
|
104 |
+
*
|
105 |
+
* ex: tutor_utils()->array_get('key.child_key', $array);
|
106 |
+
*
|
107 |
+
* @since v.1.3.3
|
108 |
+
*/
|
109 |
+
public function array_get($key = null, $array = array()){
|
110 |
+
return $this->avalue_dot($key, $array);
|
111 |
+
}
|
112 |
+
|
113 |
/**
|
114 |
* @return array
|
115 |
*
|
737 |
|
738 |
$lesson_post_type = tutor()->lesson_post_type;
|
739 |
$args = array(
|
740 |
+
'post_type' => apply_filters('tutor_course_contents_post_types', array($lesson_post_type, 'tutor_quiz')),
|
741 |
'post_parent' => $topics_id,
|
742 |
'posts_per_page' => $limit,
|
743 |
'orderby' => 'menu_order',
|
759 |
public function checking_nonce($request_method = 'post'){
|
760 |
if ($request_method === 'post'){
|
761 |
if (!isset($_POST[tutor()->nonce]) || !wp_verify_nonce($_POST[tutor()->nonce], tutor()->nonce_action)) {
|
762 |
+
exit('Nonce does not matched');
|
763 |
}
|
764 |
}else{
|
765 |
if (!isset($_GET[tutor()->nonce]) || !wp_verify_nonce($_GET[tutor()->nonce], tutor()->nonce_action)) {
|
766 |
+
exit('Nonce does not matched');
|
767 |
}
|
768 |
}
|
769 |
}
|
4283 |
return "<span class='label-order-status label-status-{$status}'>$status_name</span>";
|
4284 |
}
|
4285 |
|
4286 |
+
public function get_course_id_by_assignment($assignment_id = 0){
|
4287 |
+
$assignment_id = $this->get_post_id($assignment_id);
|
4288 |
+
return get_post_meta($assignment_id, '_tutor_course_id_for_assignments', true);
|
4289 |
+
}
|
4290 |
+
|
4291 |
+
/**
|
4292 |
+
* @param int $assignment_id
|
4293 |
+
* @param string $option_key
|
4294 |
+
* @param bool $default
|
4295 |
+
*
|
4296 |
+
* @return array|bool|mixed
|
4297 |
+
*
|
4298 |
+
* Get assignment options
|
4299 |
+
*
|
4300 |
+
* @since v.1.3.3
|
4301 |
+
*/
|
4302 |
+
public function get_assignment_option($assignment_id = 0, $option_key = '', $default = false){
|
4303 |
+
$assignment_id = $this->get_post_id($assignment_id);
|
4304 |
+
$get_option_meta = maybe_unserialize(get_post_meta($assignment_id, 'assignment_option', true));
|
4305 |
+
|
4306 |
+
if ( ! $option_key && ! empty($get_option_meta)) {
|
4307 |
+
return $get_option_meta;
|
4308 |
+
}
|
4309 |
+
|
4310 |
+
$value = $this->avalue_dot( $option_key, $get_option_meta );
|
4311 |
+
if ( $value ) {
|
4312 |
+
return $value;
|
4313 |
+
}
|
4314 |
+
return $default;
|
4315 |
+
}
|
4316 |
+
|
4317 |
+
/**
|
4318 |
+
* @param int $assignment_id
|
4319 |
+
* @param int $user_id
|
4320 |
+
*
|
4321 |
+
* @return int
|
4322 |
+
*
|
4323 |
+
* Is running any assignment submitting
|
4324 |
+
*
|
4325 |
+
* @since v.1.3.3
|
4326 |
+
*/
|
4327 |
+
public function is_assignment_submitting($assignment_id = 0, $user_id = 0){
|
4328 |
+
global $wpdb;
|
4329 |
+
|
4330 |
+
$assignment_id = $this->get_post_id($assignment_id);
|
4331 |
+
$user_id = $this->get_user_id($user_id);
|
4332 |
+
|
4333 |
+
$is_running_submit = (int) $wpdb->get_var("SELECT comment_ID FROM {$wpdb->comments} WHERE comment_type = 'tutor_assignment' AND comment_approved = 'submitting' AND user_id = {$user_id} AND comment_post_ID =
|
4334 |
+
{$assignment_id} ");
|
4335 |
+
|
4336 |
+
return $is_running_submit;
|
4337 |
+
}
|
4338 |
+
|
4339 |
+
/**
|
4340 |
+
* @param int $assignment_id
|
4341 |
+
* @param int $user_id
|
4342 |
+
*
|
4343 |
+
* @return array|null|object
|
4344 |
+
*
|
4345 |
+
* Determine if any assignment submitted by user to a assignment
|
4346 |
+
*
|
4347 |
+
* @since v.1.3.3
|
4348 |
+
*/
|
4349 |
+
|
4350 |
+
public function is_assignment_submitted($assignment_id = 0, $user_id = 0){
|
4351 |
+
global $wpdb;
|
4352 |
+
|
4353 |
+
$assignment_id = $this->get_post_id($assignment_id);
|
4354 |
+
$user_id = $this->get_user_id($user_id);
|
4355 |
+
|
4356 |
+
$has_submitted = $wpdb->get_row("SELECT * FROM {$wpdb->comments} WHERE comment_type = 'tutor_assignment' AND comment_approved = 'submitted' AND user_id = {$user_id} AND comment_post_ID = {$assignment_id} ");
|
4357 |
+
|
4358 |
+
return $has_submitted;
|
4359 |
+
}
|
4360 |
+
|
4361 |
+
public function get_assignment_submit_info($assignment_submitted_id = 0){
|
4362 |
+
global $wpdb;
|
4363 |
+
|
4364 |
+
$assignment_submitted_id = $this->get_post_id($assignment_submitted_id);
|
4365 |
+
|
4366 |
+
$submitted_info = $wpdb->get_row("SELECT * FROM {$wpdb->comments} WHERE comment_ID = {$assignment_submitted_id} AND comment_type = 'tutor_assignment' AND comment_approved = 'submitted' ");
|
4367 |
+
|
4368 |
+
return $submitted_info;
|
4369 |
+
}
|
4370 |
+
|
4371 |
+
public function get_total_assignments(){
|
4372 |
+
global $wpdb;
|
4373 |
+
|
4374 |
+
$count = $wpdb->get_var("SELECT COUNT(comment_ID) FROM {$wpdb->comments} WHERE comment_type = 'tutor_assignment' AND comment_approved = 'submitted' ");
|
4375 |
+
|
4376 |
+
return (int) $count;
|
4377 |
+
}
|
4378 |
+
|
4379 |
+
public function get_assignments(){
|
4380 |
+
global $wpdb;
|
4381 |
+
|
4382 |
+
$results = $wpdb->get_results("SELECT * FROM {$wpdb->comments} WHERE comment_type = 'tutor_assignment' AND comment_approved = 'submitted' ");
|
4383 |
+
|
4384 |
+
return $results;
|
4385 |
+
}
|
4386 |
+
|
4387 |
+
/**
|
4388 |
+
* @param int $user_id
|
4389 |
+
*
|
4390 |
+
* @return array
|
4391 |
+
*
|
4392 |
+
* Get all courses id assigned or owned by an instructors
|
4393 |
+
*
|
4394 |
+
* @since v.1.3.3
|
4395 |
+
*/
|
4396 |
+
public function get_assigned_courses_ids_by_instructors($user_id = 0){
|
4397 |
+
global $wpdb;
|
4398 |
+
$user_id = $this->get_user_id($user_id);
|
4399 |
+
|
4400 |
+
$get_assigned_courses_ids = $wpdb->get_col("SELECT meta_value from {$wpdb->usermeta} WHERE meta_key = '_tutor_instructor_course_id' AND user_id = {$user_id} GROUP BY meta_value ; ");
|
4401 |
+
|
4402 |
+
return $get_assigned_courses_ids;
|
4403 |
+
}
|
4404 |
+
|
4405 |
}
|
includes/theme-compatibility/storefront/assets/css/style.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
body.single-lesson #content .col-full, body.single-tutor_quiz #content .col-full{
|
2 |
width: 100%;
|
3 |
max-width: 100%;
|
4 |
padding: 0;
|
1 |
+
body.single-lesson #content .col-full, body.single-tutor_quiz #content .col-full, body.single-tutor_assignments #content .col-full{
|
2 |
width: 100%;
|
3 |
max-width: 100%;
|
4 |
padding: 0;
|
includes/tutor-template-functions.php
CHANGED
@@ -1301,3 +1301,26 @@ if ( ! function_exists('tutor_social_share')) {
|
|
1301 |
}
|
1302 |
}
|
1303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1301 |
}
|
1302 |
}
|
1303 |
|
1304 |
+
/**
|
1305 |
+
* @param bool $echo
|
1306 |
+
*
|
1307 |
+
* @return mixed
|
1308 |
+
*
|
1309 |
+
* Get Assignment content
|
1310 |
+
*
|
1311 |
+
* @since v.1.3.3
|
1312 |
+
*/
|
1313 |
+
|
1314 |
+
if ( ! function_exists('tutor_assignment_content')) {
|
1315 |
+
function tutor_assignment_content( $echo = true ) {
|
1316 |
+
ob_start();
|
1317 |
+
tutor_load_template( 'single.assignment.content' );
|
1318 |
+
$output = apply_filters( 'tutor_assignment/single/content', ob_get_clean() );
|
1319 |
+
|
1320 |
+
if ( $echo ) {
|
1321 |
+
echo $output;
|
1322 |
+
}
|
1323 |
+
|
1324 |
+
return $output;
|
1325 |
+
}
|
1326 |
+
}
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: lms, course, elearning, education, quiz, training, sell courses, courses,
|
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 5.2
|
7 |
Requires PHP: 5.4.0
|
8 |
-
Stable tag: 1.3.
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -207,6 +207,17 @@ Tutor enables you to use any third party plugins without facing any compatibilit
|
|
207 |
|
208 |
== Changelog ==
|
209 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
= 1.3.2 - 29 May, 2019 =
|
211 |
|
212 |
* Added: centralized tutor version upgrading system by a dedicated class called `Upgrader`
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 5.2
|
7 |
Requires PHP: 5.4.0
|
8 |
+
Stable tag: 1.3.3
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
207 |
|
208 |
== Changelog ==
|
209 |
|
210 |
+
= 1.3.3 - 21 June, 2019 =
|
211 |
+
|
212 |
+
* Added: Tutor Assignment Addon in the pro version
|
213 |
+
* Added: Upgrade to pro text in plugin action links if Tutor Pro LMS does not exist or not installed
|
214 |
+
* Added: tutor_assignments course post type
|
215 |
+
* Added: `tutor_course_contents_post_types` course content filter
|
216 |
+
* Rename: categories to course categories
|
217 |
+
* Updated: some template hook modified
|
218 |
+
* Fixed: tutor pro function checking `function_exists('tutor_pro');`
|
219 |
+
* Fixed: `wp_enqueue_editor()` in Assets class frontend frontend_scripts method conflict issue with divi builder
|
220 |
+
|
221 |
= 1.3.2 - 29 May, 2019 =
|
222 |
|
223 |
* Added: centralized tutor version upgrading system by a dedicated class called `Upgrader`
|
templates/dashboard.php
CHANGED
@@ -33,29 +33,19 @@ $user_id = get_current_user_id();
|
|
33 |
$user = get_user_by('ID', $user_id);
|
34 |
|
35 |
do_action('tutor_dashboard/before/wrap'); ?>
|
36 |
-
|
37 |
<div class="tutor-wrap tutor-dashboard tutor-dashboard-student">
|
38 |
<div class="tutor-container">
|
39 |
-
|
40 |
-
|
41 |
<div class="tutor-row">
|
42 |
<div class="tutor-col-12">
|
43 |
<div class="tutor-dashboard-header">
|
44 |
-
|
45 |
<div class="tutor-dashboard-header-avatar">
|
46 |
<img src="<?php echo get_avatar_url($user_id, array('size' => 150)); ?>" />
|
47 |
</div>
|
48 |
-
|
49 |
<div class="tutor-dashboard-header-info">
|
50 |
-
|
51 |
<div class="tutor-dashboard-header-display-name">
|
52 |
<h4><?php _e('Howdy,', 'tutor'); ?> <strong><?php echo $user->display_name; ?></strong> </h4>
|
53 |
</div>
|
54 |
-
|
55 |
-
<?php
|
56 |
-
$instructor_rating = tutor_utils()->get_instructor_ratings($user->ID);
|
57 |
-
?>
|
58 |
-
|
59 |
<?php
|
60 |
if (current_user_can(tutor()->instructor_role)){
|
61 |
?>
|
@@ -70,12 +60,10 @@ do_action('tutor_dashboard/before/wrap'); ?>
|
|
70 |
</div>-->
|
71 |
</div>
|
72 |
<?php } ?>
|
73 |
-
|
74 |
</div>
|
75 |
|
76 |
<div class="tutor-dashboard-header-button">
|
77 |
<?php
|
78 |
-
|
79 |
if(current_user_can(tutor()->instructor_role)){
|
80 |
$course_type = tutor()->course_post_type;
|
81 |
?>
|
@@ -83,7 +71,6 @@ do_action('tutor_dashboard/before/wrap'); ?>
|
|
83 |
<?php _e('<i class="tutor-icon-video-camera"></i> Upload A Course', 'tutor'); ?>
|
84 |
</a>
|
85 |
<?php
|
86 |
-
|
87 |
}else{
|
88 |
if (tutor_utils()->get_option('enable_become_instructor_btn')) {
|
89 |
?>
|
@@ -94,9 +81,7 @@ do_action('tutor_dashboard/before/wrap'); ?>
|
|
94 |
}
|
95 |
}
|
96 |
?>
|
97 |
-
|
98 |
</div>
|
99 |
-
|
100 |
</div>
|
101 |
</div>
|
102 |
</div>
|
@@ -111,7 +96,6 @@ do_action('tutor_dashboard/before/wrap'); ?>
|
|
111 |
if ($dashboard_key === 'index')
|
112 |
$dashboard_key = '';
|
113 |
$active_class = $dashboard_key == $dashboard_page_slug ? 'active' : '';
|
114 |
-
|
115 |
echo "<li class='{$li_class} {$active_class}'><a href='".tutor_utils()->get_tutor_dashboard_page_permalink($dashboard_key)."'> {$dashboard_page} </a> </li>";
|
116 |
}
|
117 |
?>
|
@@ -131,10 +115,7 @@ do_action('tutor_dashboard/before/wrap'); ?>
|
|
131 |
</div>
|
132 |
</div>
|
133 |
</div>
|
134 |
-
|
135 |
</div>
|
136 |
-
|
137 |
-
|
138 |
<?php do_action('tutor_dashboard/after/wrap'); ?>
|
139 |
|
140 |
<?php
|
33 |
$user = get_user_by('ID', $user_id);
|
34 |
|
35 |
do_action('tutor_dashboard/before/wrap'); ?>
|
|
|
36 |
<div class="tutor-wrap tutor-dashboard tutor-dashboard-student">
|
37 |
<div class="tutor-container">
|
|
|
|
|
38 |
<div class="tutor-row">
|
39 |
<div class="tutor-col-12">
|
40 |
<div class="tutor-dashboard-header">
|
|
|
41 |
<div class="tutor-dashboard-header-avatar">
|
42 |
<img src="<?php echo get_avatar_url($user_id, array('size' => 150)); ?>" />
|
43 |
</div>
|
|
|
44 |
<div class="tutor-dashboard-header-info">
|
|
|
45 |
<div class="tutor-dashboard-header-display-name">
|
46 |
<h4><?php _e('Howdy,', 'tutor'); ?> <strong><?php echo $user->display_name; ?></strong> </h4>
|
47 |
</div>
|
48 |
+
<?php $instructor_rating = tutor_utils()->get_instructor_ratings($user->ID); ?>
|
|
|
|
|
|
|
|
|
49 |
<?php
|
50 |
if (current_user_can(tutor()->instructor_role)){
|
51 |
?>
|
60 |
</div>-->
|
61 |
</div>
|
62 |
<?php } ?>
|
|
|
63 |
</div>
|
64 |
|
65 |
<div class="tutor-dashboard-header-button">
|
66 |
<?php
|
|
|
67 |
if(current_user_can(tutor()->instructor_role)){
|
68 |
$course_type = tutor()->course_post_type;
|
69 |
?>
|
71 |
<?php _e('<i class="tutor-icon-video-camera"></i> Upload A Course', 'tutor'); ?>
|
72 |
</a>
|
73 |
<?php
|
|
|
74 |
}else{
|
75 |
if (tutor_utils()->get_option('enable_become_instructor_btn')) {
|
76 |
?>
|
81 |
}
|
82 |
}
|
83 |
?>
|
|
|
84 |
</div>
|
|
|
85 |
</div>
|
86 |
</div>
|
87 |
</div>
|
96 |
if ($dashboard_key === 'index')
|
97 |
$dashboard_key = '';
|
98 |
$active_class = $dashboard_key == $dashboard_page_slug ? 'active' : '';
|
|
|
99 |
echo "<li class='{$li_class} {$active_class}'><a href='".tutor_utils()->get_tutor_dashboard_page_permalink($dashboard_key)."'> {$dashboard_page} </a> </li>";
|
100 |
}
|
101 |
?>
|
115 |
</div>
|
116 |
</div>
|
117 |
</div>
|
|
|
118 |
</div>
|
|
|
|
|
119 |
<?php do_action('tutor_dashboard/after/wrap'); ?>
|
120 |
|
121 |
<?php
|
templates/single-assignment.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template for displaying assignment
|
4 |
+
*
|
5 |
+
* @since v.1.0.0
|
6 |
+
*
|
7 |
+
* @author Themeum
|
8 |
+
* @url https://themeum.com
|
9 |
+
*/
|
10 |
+
|
11 |
+
get_header();
|
12 |
+
|
13 |
+
global $post;
|
14 |
+
$currentPost = $post;
|
15 |
+
?>
|
16 |
+
|
17 |
+
<?php do_action('tutor_assignment/single/before/wrap'); ?>
|
18 |
+
<div class="tutor-single-lesson-wrap ">
|
19 |
+
|
20 |
+
<div class="tutor-lesson-sidebar">
|
21 |
+
<?php tutor_lessons_sidebar(); ?>
|
22 |
+
</div>
|
23 |
+
|
24 |
+
<div id="tutor-single-entry-content" class="tutor-lesson-content tutor-single-entry-content tutor-single-entry-content-<?php the_ID(); ?>">
|
25 |
+
<?php tutor_assignment_content(); ?>
|
26 |
+
</div>
|
27 |
+
|
28 |
+
</div>
|
29 |
+
<?php do_action('tutor_assignment/single/after/wrap');
|
30 |
+
|
31 |
+
get_footer();
|
templates/single-course-enrolled-announcements.php
CHANGED
@@ -18,18 +18,20 @@ do_action('tutor_course/single/enrolled/before/wrap');
|
|
18 |
<div class="tutor-container">
|
19 |
<div class="tutor-row">
|
20 |
<div class="tutor-col-8 tutor-col-md-100">
|
21 |
-
<?php do_action('tutor_course/single/enrolled/before/wrap'); ?>
|
22 |
<?php tutor_course_enrolled_lead_info(); ?>
|
23 |
<?php tutor_course_enrolled_nav(); ?>
|
24 |
<?php tutor_course_announcements(); ?>
|
25 |
-
<?php do_action('tutor_course/single/enrolled/after/wrap'); ?>
|
26 |
</div>
|
27 |
<div class="tutor-col-4">
|
28 |
<div class="tutor-single-course-sidebar">
|
|
|
29 |
<?php tutor_course_enroll_box(); ?>
|
30 |
<?php tutor_course_requirements_html(); ?>
|
31 |
<?php tutor_course_tags_html(); ?>
|
32 |
<?php tutor_course_target_audience_html(); ?>
|
|
|
33 |
</div>
|
34 |
</div>
|
35 |
</div>
|
18 |
<div class="tutor-container">
|
19 |
<div class="tutor-row">
|
20 |
<div class="tutor-col-8 tutor-col-md-100">
|
21 |
+
<?php do_action('tutor_course/single/enrolled/before/inner-wrap'); ?>
|
22 |
<?php tutor_course_enrolled_lead_info(); ?>
|
23 |
<?php tutor_course_enrolled_nav(); ?>
|
24 |
<?php tutor_course_announcements(); ?>
|
25 |
+
<?php do_action('tutor_course/single/enrolled/after/inner-wrap'); ?>
|
26 |
</div>
|
27 |
<div class="tutor-col-4">
|
28 |
<div class="tutor-single-course-sidebar">
|
29 |
+
<?php do_action('tutor_course/single/enrolled/before/sidebar'); ?>
|
30 |
<?php tutor_course_enroll_box(); ?>
|
31 |
<?php tutor_course_requirements_html(); ?>
|
32 |
<?php tutor_course_tags_html(); ?>
|
33 |
<?php tutor_course_target_audience_html(); ?>
|
34 |
+
<?php do_action('tutor_course/single/enrolled/after/sidebar'); ?>
|
35 |
</div>
|
36 |
</div>
|
37 |
</div>
|
templates/single-course-enrolled-overview.php
CHANGED
@@ -17,16 +17,20 @@ do_action('tutor_course/single/enrolled/before/wrap');
|
|
17 |
<div class="tutor-container">
|
18 |
<div class="tutor-row">
|
19 |
<div class="tutor-col-8 tutor-col-md-100">
|
|
|
20 |
<?php tutor_course_enrolled_lead_info(); ?>
|
21 |
<?php tutor_course_enrolled_nav(); ?>
|
22 |
<?php get_tutor_posts_attachments(); ?>
|
|
|
23 |
</div>
|
24 |
<div class="tutor-col-4">
|
25 |
<div class="tutor-single-course-sidebar">
|
|
|
26 |
<?php tutor_course_enroll_box(); ?>
|
27 |
<?php tutor_course_requirements_html(); ?>
|
28 |
<?php tutor_course_tags_html(); ?>
|
29 |
<?php tutor_course_target_audience_html(); ?>
|
|
|
30 |
</div>
|
31 |
</div>
|
32 |
</div>
|
17 |
<div class="tutor-container">
|
18 |
<div class="tutor-row">
|
19 |
<div class="tutor-col-8 tutor-col-md-100">
|
20 |
+
<?php do_action('tutor_course/single/enrolled/before/inner-wrap'); ?>
|
21 |
<?php tutor_course_enrolled_lead_info(); ?>
|
22 |
<?php tutor_course_enrolled_nav(); ?>
|
23 |
<?php get_tutor_posts_attachments(); ?>
|
24 |
+
<?php do_action('tutor_course/single/enrolled/after/inner-wrap'); ?>
|
25 |
</div>
|
26 |
<div class="tutor-col-4">
|
27 |
<div class="tutor-single-course-sidebar">
|
28 |
+
<?php do_action('tutor_course/single/enrolled/before/sidebar'); ?>
|
29 |
<?php tutor_course_enroll_box(); ?>
|
30 |
<?php tutor_course_requirements_html(); ?>
|
31 |
<?php tutor_course_tags_html(); ?>
|
32 |
<?php tutor_course_target_audience_html(); ?>
|
33 |
+
<?php do_action('tutor_course/single/enrolled/after/sidebar'); ?>
|
34 |
</div>
|
35 |
</div>
|
36 |
</div>
|
templates/single-course-enrolled-questions.php
CHANGED
@@ -18,16 +18,20 @@ get_header();
|
|
18 |
<div class="tutor-container">
|
19 |
<div class="tutor-row">
|
20 |
<div class="tutor-col-8 tutor-col-md-100">
|
|
|
21 |
<?php tutor_course_enrolled_lead_info(); ?>
|
22 |
<?php tutor_course_enrolled_nav(); ?>
|
23 |
<?php tutor_course_question_and_answer(); ?>
|
|
|
24 |
</div>
|
25 |
<div class="tutor-col-4">
|
26 |
<div class="tutor-single-course-sidebar">
|
|
|
27 |
<?php tutor_course_enroll_box(); ?>
|
28 |
<?php tutor_course_requirements_html(); ?>
|
29 |
<?php tutor_course_tags_html(); ?>
|
30 |
<?php tutor_course_target_audience_html(); ?>
|
|
|
31 |
</div>
|
32 |
</div>
|
33 |
</div>
|
18 |
<div class="tutor-container">
|
19 |
<div class="tutor-row">
|
20 |
<div class="tutor-col-8 tutor-col-md-100">
|
21 |
+
<?php do_action( 'tutor_course/single/enrolled/before/inner-wrap' ); ?>
|
22 |
<?php tutor_course_enrolled_lead_info(); ?>
|
23 |
<?php tutor_course_enrolled_nav(); ?>
|
24 |
<?php tutor_course_question_and_answer(); ?>
|
25 |
+
<?php do_action( 'tutor_course/single/enrolled/before/inner-wrap' ); ?>
|
26 |
</div>
|
27 |
<div class="tutor-col-4">
|
28 |
<div class="tutor-single-course-sidebar">
|
29 |
+
<?php do_action('tutor_course/single/enrolled/before/sidebar'); ?>
|
30 |
<?php tutor_course_enroll_box(); ?>
|
31 |
<?php tutor_course_requirements_html(); ?>
|
32 |
<?php tutor_course_tags_html(); ?>
|
33 |
<?php tutor_course_target_audience_html(); ?>
|
34 |
+
<?php do_action('tutor_course/single/enrolled/after/sidebar'); ?>
|
35 |
</div>
|
36 |
</div>
|
37 |
</div>
|
templates/single-course-enrolled.php
CHANGED
@@ -29,10 +29,12 @@ do_action('tutor_course/single/enrolled/before/wrap');
|
|
29 |
</div>
|
30 |
<div class="tutor-col-4">
|
31 |
<div class="tutor-single-course-sidebar">
|
|
|
32 |
<?php tutor_course_enroll_box(); ?>
|
33 |
<?php tutor_course_requirements_html(); ?>
|
34 |
<?php tutor_course_tags_html(); ?>
|
35 |
<?php tutor_course_target_audience_html(); ?>
|
|
|
36 |
</div>
|
37 |
</div>
|
38 |
</div>
|
29 |
</div>
|
30 |
<div class="tutor-col-4">
|
31 |
<div class="tutor-single-course-sidebar">
|
32 |
+
<?php do_action('tutor_course/single/enrolled/before/sidebar'); ?>
|
33 |
<?php tutor_course_enroll_box(); ?>
|
34 |
<?php tutor_course_requirements_html(); ?>
|
35 |
<?php tutor_course_tags_html(); ?>
|
36 |
<?php tutor_course_target_audience_html(); ?>
|
37 |
+
<?php do_action('tutor_course/single/enrolled/after/sidebar'); ?>
|
38 |
</div>
|
39 |
</div>
|
40 |
</div>
|
templates/single-course.php
CHANGED
@@ -19,26 +19,24 @@ get_header();
|
|
19 |
<div class="tutor-container">
|
20 |
<div class="tutor-row">
|
21 |
<div class="tutor-col-8 tutor-col-md-100">
|
22 |
-
|
23 |
<?php do_action('tutor_course/single/before/inner-wrap'); ?>
|
24 |
-
|
25 |
<?php tutor_course_lead_info(); ?>
|
26 |
<?php tutor_course_content(); ?>
|
27 |
<?php tutor_course_benefits_html(); ?>
|
28 |
<?php tutor_course_topics(); ?>
|
29 |
<?php tutor_course_instructors_html(); ?>
|
30 |
<?php tutor_course_target_reviews_html(); ?>
|
31 |
-
|
32 |
<?php do_action('tutor_course/single/after/inner-wrap'); ?>
|
33 |
-
|
34 |
</div> <!-- .tutor-col-8 -->
|
35 |
|
36 |
<div class="tutor-col-4">
|
37 |
<div class="tutor-single-course-sidebar">
|
|
|
38 |
<?php tutor_course_enroll_box(); ?>
|
39 |
<?php tutor_course_requirements_html(); ?>
|
40 |
<?php tutor_course_tags_html(); ?>
|
41 |
<?php tutor_course_target_audience_html(); ?>
|
|
|
42 |
</div>
|
43 |
</div>
|
44 |
</div>
|
19 |
<div class="tutor-container">
|
20 |
<div class="tutor-row">
|
21 |
<div class="tutor-col-8 tutor-col-md-100">
|
|
|
22 |
<?php do_action('tutor_course/single/before/inner-wrap'); ?>
|
|
|
23 |
<?php tutor_course_lead_info(); ?>
|
24 |
<?php tutor_course_content(); ?>
|
25 |
<?php tutor_course_benefits_html(); ?>
|
26 |
<?php tutor_course_topics(); ?>
|
27 |
<?php tutor_course_instructors_html(); ?>
|
28 |
<?php tutor_course_target_reviews_html(); ?>
|
|
|
29 |
<?php do_action('tutor_course/single/after/inner-wrap'); ?>
|
|
|
30 |
</div> <!-- .tutor-col-8 -->
|
31 |
|
32 |
<div class="tutor-col-4">
|
33 |
<div class="tutor-single-course-sidebar">
|
34 |
+
<?php do_action('tutor_course/single/before/sidebar'); ?>
|
35 |
<?php tutor_course_enroll_box(); ?>
|
36 |
<?php tutor_course_requirements_html(); ?>
|
37 |
<?php tutor_course_tags_html(); ?>
|
38 |
<?php tutor_course_target_audience_html(); ?>
|
39 |
+
<?php do_action('tutor_course/single/after/sidebar'); ?>
|
40 |
</div>
|
41 |
</div>
|
42 |
</div>
|
templates/single-lesson.php
CHANGED
@@ -16,15 +16,12 @@ $currentPost = $post;
|
|
16 |
|
17 |
<?php do_action('tutor_lesson/single/before/wrap'); ?>
|
18 |
<div class="tutor-single-lesson-wrap ">
|
19 |
-
|
20 |
<div class="tutor-lesson-sidebar">
|
21 |
<?php tutor_lessons_sidebar(); ?>
|
22 |
</div>
|
23 |
-
|
24 |
<div id="tutor-single-entry-content" class="tutor-lesson-content tutor-single-entry-content tutor-single-entry-content-<?php the_ID(); ?>">
|
25 |
<?php tutor_lesson_content(); ?>
|
26 |
</div>
|
27 |
-
|
28 |
</div>
|
29 |
<?php do_action('tutor_lesson/single/after/wrap');
|
30 |
|
16 |
|
17 |
<?php do_action('tutor_lesson/single/before/wrap'); ?>
|
18 |
<div class="tutor-single-lesson-wrap ">
|
|
|
19 |
<div class="tutor-lesson-sidebar">
|
20 |
<?php tutor_lessons_sidebar(); ?>
|
21 |
</div>
|
|
|
22 |
<div id="tutor-single-entry-content" class="tutor-lesson-content tutor-single-entry-content tutor-single-entry-content-<?php the_ID(); ?>">
|
23 |
<?php tutor_lesson_content(); ?>
|
24 |
</div>
|
|
|
25 |
</div>
|
26 |
<?php do_action('tutor_lesson/single/after/wrap');
|
27 |
|
templates/single-preview-lesson.php
CHANGED
@@ -13,7 +13,6 @@ get_header();
|
|
13 |
global $post;
|
14 |
$currentPost = $post;
|
15 |
?>
|
16 |
-
|
17 |
<?php do_action('tutor_lesson/single/before/wrap'); ?>
|
18 |
<div <?php tutor_post_class('tutor-single-lesson-wrap tutor-page-wrap'); ?>>
|
19 |
<div class="tutor-container">
|
@@ -23,7 +22,6 @@ $currentPost = $post;
|
|
23 |
<?php the_content(); ?>
|
24 |
<?php get_tutor_posts_attachments(); ?>
|
25 |
</div>
|
26 |
-
|
27 |
</div>
|
28 |
</div>
|
29 |
</div>
|
13 |
global $post;
|
14 |
$currentPost = $post;
|
15 |
?>
|
|
|
16 |
<?php do_action('tutor_lesson/single/before/wrap'); ?>
|
17 |
<div <?php tutor_post_class('tutor-single-lesson-wrap tutor-page-wrap'); ?>>
|
18 |
<div class="tutor-container">
|
22 |
<?php the_content(); ?>
|
23 |
<?php get_tutor_posts_attachments(); ?>
|
24 |
</div>
|
|
|
25 |
</div>
|
26 |
</div>
|
27 |
</div>
|
templates/single/assignment/content.php
ADDED
@@ -0,0 +1,251 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: mhshohel
|
5 |
+
* Date: 19/6/19
|
6 |
+
* Time: 1:19 PM
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) )
|
10 |
+
exit;
|
11 |
+
|
12 |
+
?>
|
13 |
+
|
14 |
+
<?php do_action('tutor_assignment/single/before/content'); ?>
|
15 |
+
|
16 |
+
<div class="tutor-single-page-top-bar">
|
17 |
+
<div class="tutor-topbar-item tutor-hide-sidebar-bar">
|
18 |
+
<a href="javascript:;" class="tutor-lesson-sidebar-hide-bar"><i class="tutor-icon-menu-2"></i> </a>
|
19 |
+
<?php $course_id = get_post_meta(get_the_ID(), '_tutor_course_id_for_assignments', true); ?>
|
20 |
+
<a href="<?php echo get_the_permalink($course_id); ?>" class="tutor-topbar-home-btn">
|
21 |
+
<i class="tutor-icon-next-2"></i> <?php echo __('Go to Course Home', 'tutor') ; ?>
|
22 |
+
</a>
|
23 |
+
</div>
|
24 |
+
<div class="tutor-topbar-item tutor-topbar-content-title-wrap">
|
25 |
+
<?php
|
26 |
+
tutor_utils()->get_lesson_type_icon(get_the_ID(), true, true);
|
27 |
+
the_title(); ?>
|
28 |
+
</div>
|
29 |
+
|
30 |
+
</div>
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
<div class="tutor-lesson-content-area">
|
35 |
+
|
36 |
+
<div class="tutor-assignment-title">
|
37 |
+
<h2><?php the_title(); ?></h2>
|
38 |
+
</div>
|
39 |
+
|
40 |
+
<div class="tutor-assignment-information">
|
41 |
+
<p><?php _e('Total Marks', 'tutor'); ?> : <?php echo tutor_utils()->get_assignment_option(get_the_ID(), 'total_mark'); ?> </p>
|
42 |
+
<p><?php _e('Passing Marks', 'tutor'); ?> : <?php echo tutor_utils()->get_assignment_option(get_the_ID(),'pass_mark'); ?> </p>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<hr />
|
46 |
+
|
47 |
+
<div class="tutor-assignment-content">
|
48 |
+
<h2><?php _e('Description', 'tutor'); ?></h2>
|
49 |
+
|
50 |
+
<?php the_content(); ?>
|
51 |
+
</div>
|
52 |
+
|
53 |
+
|
54 |
+
<?php
|
55 |
+
$assignment_attachments = maybe_unserialize(get_post_meta(get_the_ID(),'_tutor_assignment_attachments', true));
|
56 |
+
if (tutor_utils()->count($assignment_attachments)){
|
57 |
+
?>
|
58 |
+
<div class="tutor-assignment-attachments">
|
59 |
+
<h2><?php _e('Attachments', 'tutor'); ?></h2>
|
60 |
+
<?php
|
61 |
+
foreach ($assignment_attachments as $attachment_id){
|
62 |
+
if ($attachment_id) {
|
63 |
+
|
64 |
+
$attachment_name = get_post_meta( $attachment_id, '_wp_attached_file', true );
|
65 |
+
$attachment_name = substr($attachment_name, strrpos($attachment_name, '/')+1);
|
66 |
+
?>
|
67 |
+
<p class="attachment-file-name">
|
68 |
+
<a href="<?php echo wp_get_attachment_url($attachment_id); ?>" target="_blank">
|
69 |
+
<i class="tutor-icon-attach"></i> <?php echo $attachment_name; ?>
|
70 |
+
</a>
|
71 |
+
</p>
|
72 |
+
<?php
|
73 |
+
}
|
74 |
+
}
|
75 |
+
?>
|
76 |
+
</div>
|
77 |
+
<?php
|
78 |
+
}
|
79 |
+
?>
|
80 |
+
|
81 |
+
|
82 |
+
|
83 |
+
|
84 |
+
<?php
|
85 |
+
$is_submitting = tutor_utils()->is_assignment_submitting(get_the_ID());
|
86 |
+
if ($is_submitting){
|
87 |
+
?>
|
88 |
+
|
89 |
+
<div class="tutor-assignment-submit-form-wrap">
|
90 |
+
|
91 |
+
<h2><?php _e('Assignment answer form', 'tutor'); ?></h2>
|
92 |
+
|
93 |
+
|
94 |
+
<form action="" method="post" id="tutor_assignment_submit_form" enctype="multipart/form-data">
|
95 |
+
<?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?>
|
96 |
+
<input type="hidden" value="tutor_assignment_submit" name="tutor_action"/>
|
97 |
+
<input type="hidden" name="assignment_id" value="<?php echo get_the_ID(); ?>">
|
98 |
+
|
99 |
+
<?php
|
100 |
+
$allowd_upload_files = (int) tutor_utils()->get_assignment_option(get_the_ID(), 'upload_files_limit');
|
101 |
+
?>
|
102 |
+
|
103 |
+
|
104 |
+
<div class="tutor-form-group">
|
105 |
+
<p><?php _e('Write your answer briefly', 'tutor'); ?></p>
|
106 |
+
<textarea name="assignment_answer"></textarea>
|
107 |
+
</div>
|
108 |
+
|
109 |
+
|
110 |
+
<?php
|
111 |
+
if ($allowd_upload_files){
|
112 |
+
?>
|
113 |
+
<p>Attach assignment files</p>
|
114 |
+
<?php
|
115 |
+
for ($item = 1; $item <= $allowd_upload_files; $item++){
|
116 |
+
?>
|
117 |
+
<div class="tutor-form-group">
|
118 |
+
<input type="file" name="attached_assignment_files[]">
|
119 |
+
</div>
|
120 |
+
<?php
|
121 |
+
}
|
122 |
+
}
|
123 |
+
?>
|
124 |
+
|
125 |
+
<div class="tutor-assignment-submit-btn-wrap">
|
126 |
+
<button type="submit" class="tutor-btn" id="tutor_assignment_submit_btn"> <?php _e('Submit Assignment', 'tutor');
|
127 |
+
?> </button>
|
128 |
+
</div>
|
129 |
+
|
130 |
+
</form>
|
131 |
+
|
132 |
+
</div>
|
133 |
+
|
134 |
+
<?php
|
135 |
+
}else{
|
136 |
+
|
137 |
+
$submitted_assignment = tutor_utils()->is_assignment_submitted(get_the_ID());
|
138 |
+
if ($submitted_assignment){
|
139 |
+
$is_reviewed_by_instructor = get_comment_meta($submitted_assignment->comment_ID, 'evaluate_time', true);
|
140 |
+
|
141 |
+
if ($is_reviewed_by_instructor){
|
142 |
+
$max_mark = tutor_utils()->get_assignment_option($submitted_assignment->comment_post_ID, 'total_mark');
|
143 |
+
$pass_mark = tutor_utils()->get_assignment_option($submitted_assignment->comment_post_ID, 'pass_mark');
|
144 |
+
$given_mark = get_comment_meta($submitted_assignment->comment_ID, 'assignment_mark', true);
|
145 |
+
?>
|
146 |
+
|
147 |
+
<div class="assignment-result-wrap">
|
148 |
+
<h4><?php echo sprintf(__('You received %s marks out of %s', 'tutor'), "<span class='received-marks'>{$given_mark}</span>", "<span class='out-of-marks'>{$max_mark}</span>") ?></h4>
|
149 |
+
<h4 class="submitted-assignment-grade">
|
150 |
+
<?php _e('Your Grade is '); ?>
|
151 |
+
|
152 |
+
|
153 |
+
<?php if ($given_mark >= $pass_mark){
|
154 |
+
?>
|
155 |
+
<span class="submitted-assignment-grade-pass">
|
156 |
+
<?php _e('Passed', 'tutor'); ?>
|
157 |
+
</span>
|
158 |
+
<?php
|
159 |
+
}else{
|
160 |
+
?>
|
161 |
+
<span class="submitted-assignment-grade-failed">
|
162 |
+
<?php _e('Failed', 'tutor'); ?>
|
163 |
+
</span>
|
164 |
+
<?php
|
165 |
+
} ?>
|
166 |
+
</h4>
|
167 |
+
</div>
|
168 |
+
<?php } ?>
|
169 |
+
|
170 |
+
|
171 |
+
<div class="tutor-assignments-submitted-answers-wrap">
|
172 |
+
|
173 |
+
<h2><?php _e('Your Answers', 'tutor'); ?></h2>
|
174 |
+
|
175 |
+
<?php echo nl2br(stripslashes($submitted_assignment->comment_content)); ?>
|
176 |
+
|
177 |
+
<?php
|
178 |
+
|
179 |
+
$attached_files = get_comment_meta($submitted_assignment->comment_ID, 'uploaded_attachments', true);
|
180 |
+
|
181 |
+
if ($attached_files){
|
182 |
+
$attached_files = json_decode($attached_files, true);
|
183 |
+
|
184 |
+
if (tutor_utils()->count($attached_files)){
|
185 |
+
|
186 |
+
?>
|
187 |
+
<h2><?php _e('Your uploaded file(s)', 'tutor'); ?></h2>
|
188 |
+
|
189 |
+
<?php
|
190 |
+
|
191 |
+
$upload_dir = wp_get_upload_dir();
|
192 |
+
$upload_baseurl = trailingslashit(tutor_utils()->array_get('baseurl', $upload_dir));
|
193 |
+
|
194 |
+
foreach ($attached_files as $attached_file){
|
195 |
+
?>
|
196 |
+
<div class="uploaded-files">
|
197 |
+
<a href="<?php echo $upload_baseurl.tutor_utils()->array_get('uploaded_path', $attached_file) ?>" target="_blank"><?php echo tutor_utils()->array_get('name', $attached_file); ?>
|
198 |
+
</a>
|
199 |
+
</div>
|
200 |
+
<?php
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
}
|
205 |
+
|
206 |
+
|
207 |
+
if ($is_reviewed_by_instructor){
|
208 |
+
?>
|
209 |
+
|
210 |
+
<div class="instructor-note-wrap">
|
211 |
+
<h2><?php _e('Instructor Note', 'tutor'); ?></h2>
|
212 |
+
|
213 |
+
<p><?php echo nl2br(get_comment_meta($submitted_assignment->comment_ID,'instructor_note', true)) ?></p>
|
214 |
+
</div>
|
215 |
+
<?php
|
216 |
+
}
|
217 |
+
|
218 |
+
?>
|
219 |
+
|
220 |
+
</div>
|
221 |
+
|
222 |
+
|
223 |
+
|
224 |
+
<?php
|
225 |
+
}else {
|
226 |
+
|
227 |
+
|
228 |
+
?>
|
229 |
+
|
230 |
+
<div class="tutor-assignment-start-btn-wrap">
|
231 |
+
<form action="" method="post" id="tutor_assignment_start_form">
|
232 |
+
<?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?>
|
233 |
+
<input type="hidden" value="tutor_assignment_start_submit" name="tutor_action"/>
|
234 |
+
<input type="hidden" name="assignment_id" value="<?php echo get_the_ID(); ?>">
|
235 |
+
|
236 |
+
<button type="submit" class="tutor-btn"
|
237 |
+
id="tutor_assignment_start_btn"> <?php _e( 'Start assignment submit', 'tutor' ); ?> </button>
|
238 |
+
</form>
|
239 |
+
</div>
|
240 |
+
|
241 |
+
<?php
|
242 |
+
}
|
243 |
+
}
|
244 |
+
?>
|
245 |
+
|
246 |
+
|
247 |
+
|
248 |
+
|
249 |
+
</div>
|
250 |
+
|
251 |
+
<?php do_action('tutor_assignment/single/after/content'); ?>
|
templates/single/lesson/content.php
CHANGED
@@ -23,7 +23,7 @@ if ($best_watch_time > 0){
|
|
23 |
?>
|
24 |
|
25 |
|
26 |
-
|
27 |
|
28 |
<div class="tutor-single-page-top-bar">
|
29 |
<div class="tutor-topbar-item tutor-hide-sidebar-bar">
|
@@ -43,7 +43,6 @@ if ($best_watch_time > 0){
|
|
43 |
<?php tutor_lesson_mark_complete_html(); ?>
|
44 |
</div>
|
45 |
|
46 |
-
|
47 |
</div>
|
48 |
|
49 |
|
@@ -55,5 +54,4 @@ if ($best_watch_time > 0){
|
|
55 |
<?php get_tutor_posts_attachments(); ?>
|
56 |
</div>
|
57 |
|
58 |
-
<?php
|
59 |
-
do_action('tutor_lesson/single/after/content'); ?>
|
23 |
?>
|
24 |
|
25 |
|
26 |
+
<?php do_action('tutor_lesson/single/before/content'); ?>
|
27 |
|
28 |
<div class="tutor-single-page-top-bar">
|
29 |
<div class="tutor-topbar-item tutor-hide-sidebar-bar">
|
43 |
<?php tutor_lesson_mark_complete_html(); ?>
|
44 |
</div>
|
45 |
|
|
|
46 |
</div>
|
47 |
|
48 |
|
54 |
<?php get_tutor_posts_attachments(); ?>
|
55 |
</div>
|
56 |
|
57 |
+
<?php do_action('tutor_lesson/single/after/content'); ?>
|
|
templates/single/lesson/lesson_sidebar.php
CHANGED
@@ -19,7 +19,10 @@ $course_id = 0;
|
|
19 |
if ($post->post_type === 'tutor_quiz'){
|
20 |
$course = tutor_utils()->get_course_by_quiz(get_the_ID());
|
21 |
$course_id = $course->ID;
|
22 |
-
}
|
|
|
|
|
|
|
23 |
$course_id = get_post_meta($post->ID, '_tutor_course_id_for_lesson', true);
|
24 |
}
|
25 |
|
@@ -76,7 +79,49 @@ if ($post->post_type === 'tutor_quiz'){
|
|
76 |
while ($lessons->have_posts()){
|
77 |
$lessons->the_post();
|
78 |
|
79 |
-
if ($post->post_type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
$video = tutor_utils()->get_video_info();
|
82 |
|
@@ -96,38 +141,20 @@ if ($post->post_type === 'tutor_quiz'){
|
|
96 |
?>
|
97 |
<span class="lesson_title"><?php the_title(); ?></span>
|
98 |
<span class="tutor-lesson-right-icons">
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
</a>
|
108 |
</div>
|
109 |
|
110 |
<?php
|
111 |
-
}else{
|
112 |
-
$quiz = $post;
|
113 |
-
?>
|
114 |
-
<div class="tutor-single-lesson-items quiz-single-item quiz-single-item-<?php echo $quiz->ID; ?>" data-quiz-id="<?php echo $quiz->ID; ?>">
|
115 |
-
<a href="<?php echo get_permalink($quiz->ID); ?>" class="sidebar-single-quiz-a" data-quiz-id="<?php echo $quiz->ID; ?>">
|
116 |
-
<i class="tutor-icon-doubt"></i>
|
117 |
-
<span class="lesson_title"><?php echo $quiz->post_title; ?></span>
|
118 |
-
<span class="tutor-lesson-right-icons">
|
119 |
|
120 |
-
|
121 |
-
$time_limit = tutor_utils()->get_quiz_option($quiz->ID, 'time_limit.time_value');
|
122 |
-
if ($time_limit){
|
123 |
-
$time_type = tutor_utils()->get_quiz_option($quiz->ID, 'time_limit.time_type');
|
124 |
-
echo "<span class='quiz-time-limit'>{$time_limit} {$time_type}</span>";
|
125 |
-
}
|
126 |
-
?>
|
127 |
-
</span>
|
128 |
-
</a>
|
129 |
-
</div>
|
130 |
-
<?php
|
131 |
}
|
132 |
|
133 |
}
|
19 |
if ($post->post_type === 'tutor_quiz'){
|
20 |
$course = tutor_utils()->get_course_by_quiz(get_the_ID());
|
21 |
$course_id = $course->ID;
|
22 |
+
}elseif($post->post_type === 'tutor_assignments'){
|
23 |
+
$course_id = get_post_meta($post->ID, '_tutor_course_id_for_assignments', true);
|
24 |
+
|
25 |
+
} else{
|
26 |
$course_id = get_post_meta($post->ID, '_tutor_course_id_for_lesson', true);
|
27 |
}
|
28 |
|
79 |
while ($lessons->have_posts()){
|
80 |
$lessons->the_post();
|
81 |
|
82 |
+
if ($post->post_type === 'tutor_quiz') {
|
83 |
+
|
84 |
+
|
85 |
+
$quiz = $post;
|
86 |
+
?>
|
87 |
+
<div class="tutor-single-lesson-items quiz-single-item quiz-single-item-<?php echo $quiz->ID; ?>" data-quiz-id="<?php echo $quiz->ID; ?>">
|
88 |
+
<a href="<?php echo get_permalink($quiz->ID); ?>" class="sidebar-single-quiz-a" data-quiz-id="<?php echo $quiz->ID; ?>">
|
89 |
+
<i class="tutor-icon-doubt"></i>
|
90 |
+
<span class="lesson_title"><?php echo $quiz->post_title; ?></span>
|
91 |
+
<span class="tutor-lesson-right-icons">
|
92 |
+
|
93 |
+
<?php
|
94 |
+
$time_limit = tutor_utils()->get_quiz_option($quiz->ID, 'time_limit.time_value');
|
95 |
+
if ($time_limit){
|
96 |
+
$time_type = tutor_utils()->get_quiz_option($quiz->ID, 'time_limit.time_type');
|
97 |
+
echo "<span class='quiz-time-limit'>{$time_limit} {$time_type}</span>";
|
98 |
+
}
|
99 |
+
?>
|
100 |
+
</span>
|
101 |
+
</a>
|
102 |
+
</div>
|
103 |
+
<?php
|
104 |
+
}elseif($post->post_type === 'tutor_assignments'){
|
105 |
+
/**
|
106 |
+
* Assignments
|
107 |
+
* @since this block v.1.3.3
|
108 |
+
*/
|
109 |
+
|
110 |
+
?>
|
111 |
+
<div class="tutor-single-lesson-items assignments-single-item assignment-single-item-<?php echo $post->ID; ?>"
|
112 |
+
data-assignment-id="<?php echo $post->ID; ?>">
|
113 |
+
<a href="<?php echo get_permalink($post->ID); ?>" class="sidebar-single-assignment-a" data-assignment-id="<?php echo $post->ID; ?>">
|
114 |
+
<i class="tutor-icon-clipboard"></i>
|
115 |
+
<span class="lesson_title"> <?php echo $post->post_title; ?> </span>
|
116 |
+
</a>
|
117 |
+
</div>
|
118 |
+
<?php
|
119 |
+
|
120 |
+
}else{
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Lesson
|
124 |
+
*/
|
125 |
|
126 |
$video = tutor_utils()->get_video_info();
|
127 |
|
141 |
?>
|
142 |
<span class="lesson_title"><?php the_title(); ?></span>
|
143 |
<span class="tutor-lesson-right-icons">
|
144 |
+
<?php
|
145 |
+
if ( $play_time ) {
|
146 |
+
echo "<i class='tutor-play-duration'>$play_time</i>";
|
147 |
+
}
|
148 |
+
$lesson_complete_icon = $is_completed_lesson ? 'tutor-icon-mark tutor-done' : '';
|
149 |
+
echo "<i class='tutor-lesson-complete $lesson_complete_icon'></i>";
|
150 |
+
?>
|
151 |
+
</span>
|
152 |
</a>
|
153 |
</div>
|
154 |
|
155 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
}
|
159 |
|
160 |
}
|
tutor.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Tutor LMS
|
|
4 |
Plugin URI: https://www.themeum.com/product/tutor-lms/
|
5 |
Description: Tutor is a complete solution for creating a Learning Management System in WordPress way. It can help you to create small to large scale online education site very conveniently. Power features like report, certificate, course preview, private file sharing make Tutor a robust plugin for any educational institutes.
|
6 |
Author: Themeum
|
7 |
-
Version: 1.3.
|
8 |
Author URI: http://themeum.com
|
9 |
Requires at least: 4.5
|
10 |
Tested up to: 5.2
|
@@ -17,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) )
|
|
17 |
/**
|
18 |
* Defined the tutor main file
|
19 |
*/
|
20 |
-
define('TUTOR_VERSION', '1.3.
|
21 |
define('TUTOR_FILE', __FILE__);
|
22 |
|
23 |
|
4 |
Plugin URI: https://www.themeum.com/product/tutor-lms/
|
5 |
Description: Tutor is a complete solution for creating a Learning Management System in WordPress way. It can help you to create small to large scale online education site very conveniently. Power features like report, certificate, course preview, private file sharing make Tutor a robust plugin for any educational institutes.
|
6 |
Author: Themeum
|
7 |
+
Version: 1.3.3
|
8 |
Author URI: http://themeum.com
|
9 |
Requires at least: 4.5
|
10 |
Tested up to: 5.2
|
17 |
/**
|
18 |
* Defined the tutor main file
|
19 |
*/
|
20 |
+
define('TUTOR_VERSION', '1.3.3');
|
21 |
define('TUTOR_FILE', __FILE__);
|
22 |
|
23 |
|
views/metabox/course-contents.php
CHANGED
@@ -51,7 +51,7 @@
|
|
51 |
|
52 |
<div class="tutor-option-field-row">
|
53 |
<div class="tutor-option-field-label">
|
54 |
-
<label for=""><?php _e('Topic
|
55 |
</div>
|
56 |
<div class="tutor-option-field">
|
57 |
<textarea name="topic_summery"><?php echo $topic->post_content; ?></textarea>
|
@@ -87,7 +87,20 @@
|
|
87 |
</div>
|
88 |
|
89 |
<?php
|
90 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
?>
|
92 |
<div id="tutor-lesson-<?php echo $lesson->ID; ?>" class="course-content-item tutor-lesson tutor-lesson-<?php echo
|
93 |
$lesson->ID; ?>">
|
@@ -105,10 +118,16 @@
|
|
105 |
|
106 |
<div class="tutor_add_quiz_wrap" data-add-quiz-under="<?php echo $topic->ID; ?>">
|
107 |
<div class="tutor-add-quiz-button-wrap">
|
|
|
|
|
|
|
108 |
<a href="javascript:;" class="create-lesson-in-topic-btn open-tutor-lesson-modal" data-topic-id="<?php echo $topic->ID; ?>" data-lesson-id="0" ><i class="tutor-icon-block tutor-icon-plus"></i> <?php _e('Add new lesson', 'tutor'); ?></a>
|
109 |
|
110 |
-
<button type="button" class="icon-bl tutor-add-quiz-btn"> <i class="tutor-icon-doubt"></i> <?php _e('Add Topic Quiz',
|
111 |
-
|
|
|
|
|
|
|
112 |
</div>
|
113 |
</div>
|
114 |
|
51 |
|
52 |
<div class="tutor-option-field-row">
|
53 |
<div class="tutor-option-field-label">
|
54 |
+
<label for=""><?php _e('Topic Summary', 'tutor'); ?></label>
|
55 |
</div>
|
56 |
<div class="tutor-option-field">
|
57 |
<textarea name="topic_summery"><?php echo $topic->post_content; ?></textarea>
|
87 |
</div>
|
88 |
|
89 |
<?php
|
90 |
+
}elseif($lesson->post_type === 'tutor_assignments'){
|
91 |
+
?>
|
92 |
+
<div id="tutor-assignment-<?php echo $lesson->ID; ?>" class="course-content-item tutor-assignment tutor-assignment-<?php echo
|
93 |
+
$lesson->ID; ?>">
|
94 |
+
<div class="tutor-lesson-top">
|
95 |
+
<i class="tutor-icon-move"></i>
|
96 |
+
<a href="javascript:;" class="open-tutor-assignment-modal" data-assignment-id="<?php echo $lesson->ID; ?>"
|
97 |
+
data-topic-id="<?php echo $topic->ID; ?>"><i class="tutor-icon-clipboard"></i> <?php echo
|
98 |
+
$lesson->post_title; ?> </a>
|
99 |
+
<a href="javascript:;" class="tutor-delete-lesson-btn" data-lesson-id="<?php echo $lesson->ID; ?>"><i class="tutor-icon-garbage"></i></a>
|
100 |
+
</div>
|
101 |
+
</div>
|
102 |
+
<?php
|
103 |
+
} else{
|
104 |
?>
|
105 |
<div id="tutor-lesson-<?php echo $lesson->ID; ?>" class="course-content-item tutor-lesson tutor-lesson-<?php echo
|
106 |
$lesson->ID; ?>">
|
118 |
|
119 |
<div class="tutor_add_quiz_wrap" data-add-quiz-under="<?php echo $topic->ID; ?>">
|
120 |
<div class="tutor-add-quiz-button-wrap">
|
121 |
+
|
122 |
+
<?php do_action('tutor_course_builder_before_btn_group', $topic->ID); ?>
|
123 |
+
|
124 |
<a href="javascript:;" class="create-lesson-in-topic-btn open-tutor-lesson-modal" data-topic-id="<?php echo $topic->ID; ?>" data-lesson-id="0" ><i class="tutor-icon-block tutor-icon-plus"></i> <?php _e('Add new lesson', 'tutor'); ?></a>
|
125 |
|
126 |
+
<button type="button" class="icon-bl tutor-add-quiz-btn"> <i class="tutor-icon-doubt"></i> <?php _e('Add Topic Quiz', 'tutor'); ?>
|
127 |
+
</button>
|
128 |
+
|
129 |
+
<?php do_action('tutor_course_builder_after_btn_group', $topic->ID); ?>
|
130 |
+
|
131 |
</div>
|
132 |
</div>
|
133 |
|
views/metabox/course-topics.php
CHANGED
@@ -32,7 +32,7 @@
|
|
32 |
|
33 |
<div class="tutor-option-field-row">
|
34 |
<div class="tutor-option-field-label">
|
35 |
-
<label for=""><?php _e('Topic
|
36 |
</div>
|
37 |
<div class="tutor-option-field">
|
38 |
<textarea name="topic_summery"></textarea>
|
@@ -88,4 +88,19 @@
|
|
88 |
</div>
|
89 |
<div class="modal-container"></div>
|
90 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
</div>
|
32 |
|
33 |
<div class="tutor-option-field-row">
|
34 |
<div class="tutor-option-field-label">
|
35 |
+
<label for=""><?php _e('Topic Summary', 'tutor'); ?></label>
|
36 |
</div>
|
37 |
<div class="tutor-option-field">
|
38 |
<textarea name="topic_summery"></textarea>
|
88 |
</div>
|
89 |
<div class="modal-container"></div>
|
90 |
</div>
|
91 |
+
</div>
|
92 |
+
|
93 |
+
|
94 |
+
<div class="tutor-modal-wrap tutor-assignment-builder-modal-wrap">
|
95 |
+
<div class="tutor-modal-content">
|
96 |
+
<div class="modal-header">
|
97 |
+
<div class="modal-title">
|
98 |
+
<h1><?php _e('Assignments', 'tutor'); ?></h1>
|
99 |
+
</div>
|
100 |
+
<div class="modal-close-wrap">
|
101 |
+
<a href="javascript:;" class="modal-close-btn"><i class="tutor-icon-line-cross"></i> </a>
|
102 |
+
</div>
|
103 |
+
</div>
|
104 |
+
<div class="modal-container"></div>
|
105 |
+
</div>
|
106 |
</div>
|
views/metabox/instructors-metabox.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
<div class="tutor-course-instructors-metabox-wrap">
|
3 |
<?php
|
4 |
$instructors = tutor_utils()->get_instructors_by_course();
|
5 |
-
|
6 |
?>
|
7 |
|
8 |
<div class="tutor-course-available-instructors">
|
2 |
<div class="tutor-course-instructors-metabox-wrap">
|
3 |
<?php
|
4 |
$instructors = tutor_utils()->get_instructors_by_course();
|
|
|
5 |
?>
|
6 |
|
7 |
<div class="tutor-course-available-instructors">
|