Version Description
- December 14, 2021 =
Update: Security Update Fix: Instructor can access Withdrawal Requests Issue
Download this release
Release Info
Developer | themeum |
Plugin | Tutor LMS – eLearning and online course solution |
Version | 1.9.12 |
Comparing to | |
See all releases |
Code changes from version 1.9.11 to 1.9.12
- assets/js/tutor-course-builder.js +1 -1
- classes/Admin.php +1 -1
- classes/Instructors_List.php +1 -1
- classes/Tutor_List_Table.php +9 -9
- languages/tutor.pot +24 -12
- readme.txt +6 -1
- templates/course-filter/filters.php +28 -28
- templates/dashboard/announcements/create.php +14 -14
- templates/dashboard/announcements/details.php +5 -5
- templates/dashboard/announcements/update.php +14 -14
- templates/dashboard/assignments/review.php +42 -42
- templates/dashboard/assignments/submitted.php +25 -25
- tutor.php +2 -2
- views/metabox/user-profile-fields.php +12 -12
- views/metabox/video-metabox.php +29 -34
- views/modal/add_quiz.php +1 -1
- views/modal/edit-lesson.php +4 -4
- views/modal/edit_quiz.php +11 -11
- views/modal/question_answer_edit_form.php +22 -22
- views/modal/question_answer_form.php +21 -21
- views/modal/question_form.php +19 -19
- views/modal/review.php +2 -2
- views/pages/add_new_instructor.php +7 -7
- views/pages/announcements.php +13 -13
- views/pages/answer.php +1 -1
- views/pages/instructors.php +11 -11
- views/pages/question_answer.php +1 -1
- views/pages/quiz_attempts.php +1 -1
- views/pages/students.php +3 -3
- views/pages/view_attempt.php +3 -3
- views/pages/withdraw_requests.php +1 -1
assets/js/tutor-course-builder.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.jQuery(document).ready(function(t){t(".tutor-certificate-template-tab [data-tutor-tab-target]").click(function(){t(this).addClass("is-active").siblings().removeClass("is-active"),t("#"+t(this).data("tutor-tab-target")).show().siblings().hide()})
|
1 |
+
window.jQuery(document).ready(function(t){t(".tutor-certificate-template-tab [data-tutor-tab-target]").click(function(){t(this).addClass("is-active").siblings().removeClass("is-active"),t("#"+t(this).data("tutor-tab-target")).show().siblings().hide()})});
|
classes/Admin.php
CHANGED
@@ -70,7 +70,7 @@ class Admin{
|
|
70 |
add_submenu_page('tutor', __('Quiz Attempts', 'tutor'), __('Quiz Attempts', 'tutor'), 'manage_tutor_instructor', Quiz_Attempts_List::QUIZ_ATTEMPT_PAGE, array($this, 'quiz_attempts') );
|
71 |
|
72 |
if ($enable_course_marketplace){
|
73 |
-
add_submenu_page('tutor', __('Withdraw Requests', 'tutor'), __('Withdraw Requests', 'tutor'), '
|
74 |
}
|
75 |
|
76 |
add_submenu_page( 'tutor', __( 'Add-ons', 'tutor' ), __( 'Add-ons', 'tutor' ), 'manage_tutor', 'tutor-addons', array( $this, 'enable_disable_addons' ) );
|
70 |
add_submenu_page('tutor', __('Quiz Attempts', 'tutor'), __('Quiz Attempts', 'tutor'), 'manage_tutor_instructor', Quiz_Attempts_List::QUIZ_ATTEMPT_PAGE, array($this, 'quiz_attempts') );
|
71 |
|
72 |
if ($enable_course_marketplace){
|
73 |
+
add_submenu_page('tutor', __('Withdraw Requests', 'tutor'), __('Withdraw Requests', 'tutor'), 'manage_tutor', Withdraw_Requests_List::WITHDRAW_REQUEST_LIST_PAGE, array($this, 'withdraw_requests') );
|
74 |
}
|
75 |
|
76 |
add_submenu_page( 'tutor', __( 'Add-ons', 'tutor' ), __( 'Add-ons', 'tutor' ), 'manage_tutor', 'tutor-addons', array( $this, 'enable_disable_addons' ) );
|
classes/Instructors_List.php
CHANGED
@@ -77,7 +77,7 @@ class Instructors_List extends \Tutor_List_Table {
|
|
77 |
|
78 |
// Add user edit link
|
79 |
$edit_link = get_edit_user_link($item->ID);
|
80 |
-
$edit_link = '<a href="'
|
81 |
$actions['tutor-instructor-edit-link']=$edit_link;
|
82 |
|
83 |
// Add remove instructor action
|
77 |
|
78 |
// Add user edit link
|
79 |
$edit_link = get_edit_user_link($item->ID);
|
80 |
+
$edit_link = '<a href="' . esc_url( $edit_link ) . '">'. esc_html__( 'Edit' ) . '</a>';
|
81 |
$actions['tutor-instructor-edit-link']=$edit_link;
|
82 |
|
83 |
// Add remove instructor action
|
classes/Tutor_List_Table.php
CHANGED
@@ -363,11 +363,11 @@ class Tutor_List_Table {
|
|
363 |
</div>
|
364 |
';
|
365 |
$options = '';
|
366 |
-
foreach($courses as $course){
|
367 |
-
$options .= '<option value="'
|
368 |
}
|
369 |
|
370 |
-
$content = str_replace('OPTIONS_PLACEHOLDER', $options, $markup);
|
371 |
echo $content;
|
372 |
}
|
373 |
|
@@ -388,10 +388,10 @@ class Tutor_List_Table {
|
|
388 |
</div>
|
389 |
';
|
390 |
$options = '';
|
391 |
-
foreach($orders as $order){
|
392 |
-
$options .= '<option value="'
|
393 |
}
|
394 |
-
$content = str_replace('OPTION_PLACEHOLDER', $options, $markup);
|
395 |
echo $content;
|
396 |
}
|
397 |
/**
|
@@ -400,14 +400,14 @@ class Tutor_List_Table {
|
|
400 |
* @param $selected | optional
|
401 |
*/
|
402 |
|
403 |
-
public function sorting_date($selected = ''){
|
404 |
$placeholder = __( get_option( 'date_format' ), 'tutor' );
|
405 |
-
$date_filter = sanitize_text_field( tutor_utils()->array_get('date', $_GET, '') );
|
406 |
$date_input = '' !== $date_filter ? tutor_get_formated_date( get_option( 'date_format' ), $date_filter ) : '';
|
407 |
$markup = '
|
408 |
<div class="alignright assignment-date-box">
|
409 |
<label>'.__('Date', 'tutor').'</label>
|
410 |
-
<input type="" class="tutor_date_picker tutor-assignment-date-sorting" placeholder="'
|
411 |
<i class="tutor-icon-calendar"></i>
|
412 |
</div>
|
413 |
';
|
363 |
</div>
|
364 |
';
|
365 |
$options = '';
|
366 |
+
foreach ( $courses as $course ) {
|
367 |
+
$options .= '<option value="' . $course->ID . '" ' . selected( $selected,$course->ID, false ) . '> ' . $course->post_title . ' </option>';
|
368 |
}
|
369 |
|
370 |
+
$content = str_replace( 'OPTIONS_PLACEHOLDER', $options, $markup );
|
371 |
echo $content;
|
372 |
}
|
373 |
|
388 |
</div>
|
389 |
';
|
390 |
$options = '';
|
391 |
+
foreach( $orders as $order ) {
|
392 |
+
$options .= '<option value="' . $order . '" '. selected( $selected, $order, false ) . '> '. __( $order, 'tutor' ) . ' </option>';
|
393 |
}
|
394 |
+
$content = str_replace( 'OPTION_PLACEHOLDER', $options, $markup );
|
395 |
echo $content;
|
396 |
}
|
397 |
/**
|
400 |
* @param $selected | optional
|
401 |
*/
|
402 |
|
403 |
+
public function sorting_date( $selected = '' ) {
|
404 |
$placeholder = __( get_option( 'date_format' ), 'tutor' );
|
405 |
+
$date_filter = sanitize_text_field( tutor_utils()->array_get( 'date', $_GET, '' ) );
|
406 |
$date_input = '' !== $date_filter ? tutor_get_formated_date( get_option( 'date_format' ), $date_filter ) : '';
|
407 |
$markup = '
|
408 |
<div class="alignright assignment-date-box">
|
409 |
<label>'.__('Date', 'tutor').'</label>
|
410 |
+
<input type="" class="tutor_date_picker tutor-assignment-date-sorting" placeholder="' . $placeholder . '" value="' . $date_input . '">
|
411 |
<i class="tutor-icon-calendar"></i>
|
412 |
</div>
|
413 |
';
|
languages/tutor.pot
CHANGED
@@ -2016,7 +2016,7 @@ msgstr ""
|
|
2016 |
msgid "Bulk Actions"
|
2017 |
msgstr ""
|
2018 |
|
2019 |
-
#: classes/Tutor_List_Table.php:1270, templates/dashboard/announcements.php:98, templates/dashboard/assignments.php:47, views/pages/announcements.php:77, templates/dashboard/announcements/
|
2020 |
msgid "No course found"
|
2021 |
msgstr ""
|
2022 |
|
@@ -2552,7 +2552,7 @@ msgstr ""
|
|
2552 |
msgid "Last Name"
|
2553 |
msgstr ""
|
2554 |
|
2555 |
-
#: classes/Utils.php:6935
|
2556 |
msgid "Profile Photo"
|
2557 |
msgstr ""
|
2558 |
|
@@ -3657,15 +3657,15 @@ msgstr ""
|
|
3657 |
msgid "Total Course Duration"
|
3658 |
msgstr ""
|
3659 |
|
3660 |
-
#: views/metabox/course-additional-data.php:26, views/metabox/video-metabox.php:
|
3661 |
msgid "HH"
|
3662 |
msgstr ""
|
3663 |
|
3664 |
-
#: views/metabox/course-additional-data.php:30, views/metabox/video-metabox.php:
|
3665 |
msgid "MM"
|
3666 |
msgstr ""
|
3667 |
|
3668 |
-
#: views/metabox/course-additional-data.php:35, views/metabox/video-metabox.php:
|
3669 |
msgid "SS"
|
3670 |
msgstr ""
|
3671 |
|
@@ -3795,6 +3795,18 @@ msgstr ""
|
|
3795 |
msgid "Tutor Fields"
|
3796 |
msgstr ""
|
3797 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3798 |
#: views/metabox/user-profile-fields.php:49
|
3799 |
msgid "Upload"
|
3800 |
msgstr ""
|
@@ -3831,23 +3843,23 @@ msgstr ""
|
|
3831 |
msgid "Thumb Size: 700x430 pixels. File Support: jpg, jpeg, or png"
|
3832 |
msgstr ""
|
3833 |
|
3834 |
-
#: views/metabox/video-metabox.php:
|
3835 |
msgid "External Video URL"
|
3836 |
msgstr ""
|
3837 |
|
3838 |
-
#: views/metabox/video-metabox.php:
|
3839 |
msgid "YouTube Video URL"
|
3840 |
msgstr ""
|
3841 |
|
3842 |
-
#: views/metabox/video-metabox.php:
|
3843 |
msgid "Vimeo Video URL"
|
3844 |
msgstr ""
|
3845 |
|
3846 |
-
#: views/metabox/video-metabox.php:
|
3847 |
msgid "Place your embedded code here"
|
3848 |
msgstr ""
|
3849 |
|
3850 |
-
#: views/metabox/video-metabox.php:
|
3851 |
msgid "Video playback time"
|
3852 |
msgstr ""
|
3853 |
|
@@ -4251,7 +4263,7 @@ msgstr ""
|
|
4251 |
msgid "Announcement Title"
|
4252 |
msgstr ""
|
4253 |
|
4254 |
-
#: views/pages/announcements.php:220, views/pages/announcements.php:302, templates/dashboard/announcements/
|
4255 |
msgid "Announcement title"
|
4256 |
msgstr ""
|
4257 |
|
@@ -4259,7 +4271,7 @@ msgstr ""
|
|
4259 |
msgid "Summary"
|
4260 |
msgstr ""
|
4261 |
|
4262 |
-
#: views/pages/announcements.php:230, views/pages/announcements.php:312, templates/dashboard/announcements/
|
4263 |
msgid "Summary..."
|
4264 |
msgstr ""
|
4265 |
|
2016 |
msgid "Bulk Actions"
|
2017 |
msgstr ""
|
2018 |
|
2019 |
+
#: classes/Tutor_List_Table.php:1270, templates/dashboard/announcements.php:98, templates/dashboard/assignments.php:47, views/pages/announcements.php:77, templates/dashboard/announcements/update.php:30
|
2020 |
msgid "No course found"
|
2021 |
msgstr ""
|
2022 |
|
2552 |
msgid "Last Name"
|
2553 |
msgstr ""
|
2554 |
|
2555 |
+
#: classes/Utils.php:6935, views/metabox/user-profile-fields.php:37
|
2556 |
msgid "Profile Photo"
|
2557 |
msgstr ""
|
2558 |
|
3657 |
msgid "Total Course Duration"
|
3658 |
msgstr ""
|
3659 |
|
3660 |
+
#: views/metabox/course-additional-data.php:26, views/metabox/video-metabox.php:147
|
3661 |
msgid "HH"
|
3662 |
msgstr ""
|
3663 |
|
3664 |
+
#: views/metabox/course-additional-data.php:30, views/metabox/video-metabox.php:152
|
3665 |
msgid "MM"
|
3666 |
msgstr ""
|
3667 |
|
3668 |
+
#: views/metabox/course-additional-data.php:35, views/metabox/video-metabox.php:157
|
3669 |
msgid "SS"
|
3670 |
msgstr ""
|
3671 |
|
3795 |
msgid "Tutor Fields"
|
3796 |
msgstr ""
|
3797 |
|
3798 |
+
#: views/metabox/user-profile-fields.php:13
|
3799 |
+
msgid "Job Title"
|
3800 |
+
msgstr ""
|
3801 |
+
|
3802 |
+
#: views/metabox/user-profile-fields.php:20
|
3803 |
+
msgid "Profile Bio"
|
3804 |
+
msgstr ""
|
3805 |
+
|
3806 |
+
#: views/metabox/user-profile-fields.php:32
|
3807 |
+
msgid "Write a little bit more about you, it will show publicly."
|
3808 |
+
msgstr ""
|
3809 |
+
|
3810 |
#: views/metabox/user-profile-fields.php:49
|
3811 |
msgid "Upload"
|
3812 |
msgstr ""
|
3843 |
msgid "Thumb Size: 700x430 pixels. File Support: jpg, jpeg, or png"
|
3844 |
msgstr ""
|
3845 |
|
3846 |
+
#: views/metabox/video-metabox.php:118
|
3847 |
msgid "External Video URL"
|
3848 |
msgstr ""
|
3849 |
|
3850 |
+
#: views/metabox/video-metabox.php:122
|
3851 |
msgid "YouTube Video URL"
|
3852 |
msgstr ""
|
3853 |
|
3854 |
+
#: views/metabox/video-metabox.php:125
|
3855 |
msgid "Vimeo Video URL"
|
3856 |
msgstr ""
|
3857 |
|
3858 |
+
#: views/metabox/video-metabox.php:128
|
3859 |
msgid "Place your embedded code here"
|
3860 |
msgstr ""
|
3861 |
|
3862 |
+
#: views/metabox/video-metabox.php:140
|
3863 |
msgid "Video playback time"
|
3864 |
msgstr ""
|
3865 |
|
4263 |
msgid "Announcement Title"
|
4264 |
msgstr ""
|
4265 |
|
4266 |
+
#: views/pages/announcements.php:220, views/pages/announcements.php:302, templates/dashboard/announcements/update.php:38
|
4267 |
msgid "Announcement title"
|
4268 |
msgstr ""
|
4269 |
|
4271 |
msgid "Summary"
|
4272 |
msgstr ""
|
4273 |
|
4274 |
+
#: views/pages/announcements.php:230, views/pages/announcements.php:312, templates/dashboard/announcements/update.php:44
|
4275 |
msgid "Summary..."
|
4276 |
msgstr ""
|
4277 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: lms, course, elearning, education, learning management system
|
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 5.8
|
7 |
Requires PHP: 7.0
|
8 |
-
Stable tag: 1.9.
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -241,6 +241,11 @@ Tutor enables you to use any third party plugins without facing any compatibilit
|
|
241 |
|
242 |
== Changelog ==
|
243 |
|
|
|
|
|
|
|
|
|
|
|
244 |
= 1.9.11 - October 18, 2021 =
|
245 |
|
246 |
New: Certificate Builder plugin compatibility
|
5 |
Requires at least: 5.3
|
6 |
Tested up to: 5.8
|
7 |
Requires PHP: 7.0
|
8 |
+
Stable tag: 1.9.12
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
241 |
|
242 |
== Changelog ==
|
243 |
|
244 |
+
= 1.9.12 - December 14, 2021 =
|
245 |
+
|
246 |
+
Update: Security Update
|
247 |
+
Fix: Instructor can access Withdrawal Requests Issue
|
248 |
+
|
249 |
= 1.9.11 - October 18, 2021 =
|
250 |
|
251 |
New: Certificate Builder plugin compatibility
|
templates/course-filter/filters.php
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
<?php
|
2 |
$filter_object = new \TUTOR\Course_Filter();
|
3 |
$filter_levels = array(
|
4 |
-
'beginner'=> __('Beginner', 'tutor'),
|
5 |
-
'intermediate'=> __('Intermediate', 'tutor'),
|
6 |
-
'expert'=> __('Expert', 'tutor')
|
7 |
);
|
8 |
$filter_prices=array(
|
9 |
-
'free'=> __('Free', 'tutor'),
|
10 |
-
'paid'=> __('Paid', 'tutor'),
|
11 |
);
|
12 |
|
13 |
-
$supported_filters = tutor_utils()->get_option('supported_course_filters', array());
|
14 |
-
$supported_filters = array_keys($supported_filters);
|
15 |
?>
|
16 |
<form>
|
17 |
-
<?php do_action('tutor_course_filter/before'); ?>
|
18 |
<?php
|
19 |
-
if(in_array('search', $supported_filters)){
|
20 |
?>
|
21 |
<div class="tutor-course-search-field">
|
22 |
-
<input type="text" name="keyword" placeholder="<?php
|
23 |
<i class="tutor-icon-magnifying-glass-1"></i>
|
24 |
</div>
|
25 |
<?php
|
@@ -27,20 +27,20 @@
|
|
27 |
?>
|
28 |
<div>
|
29 |
<?php
|
30 |
-
if(in_array('category', $supported_filters)){
|
31 |
?>
|
32 |
<div>
|
33 |
-
<h4><?php
|
34 |
-
<?php $filter_object->render_terms('category'); ?>
|
35 |
</div>
|
36 |
<?php
|
37 |
}
|
38 |
|
39 |
-
if(in_array('tag', $supported_filters)){
|
40 |
?>
|
41 |
<div>
|
42 |
-
<h4><?php
|
43 |
-
<?php $filter_object->render_terms('tag'); ?>
|
44 |
</div>
|
45 |
<?php
|
46 |
}
|
@@ -48,16 +48,16 @@
|
|
48 |
</div>
|
49 |
<div>
|
50 |
<?php
|
51 |
-
if(in_array('difficulty_level', $supported_filters)){
|
52 |
?>
|
53 |
<div>
|
54 |
-
<h4><?php
|
55 |
<?php
|
56 |
-
foreach($filter_levels as $value
|
57 |
?>
|
58 |
<label>
|
59 |
-
<input type="checkbox" name="tutor-course-filter-level" value="<?php echo $value; ?>"/>
|
60 |
-
<?php echo $title; ?>
|
61 |
</label>
|
62 |
<?php
|
63 |
}
|
@@ -67,17 +67,17 @@
|
|
67 |
}
|
68 |
|
69 |
|
70 |
-
$is_membership = get_tutor_option('monetize_by')=='pmpro' && tutils()->has_pmpro();
|
71 |
-
if(
|
72 |
?>
|
73 |
<div>
|
74 |
-
<h4><?php
|
75 |
<?php
|
76 |
-
foreach($filter_prices as $value
|
77 |
?>
|
78 |
<label>
|
79 |
-
<input type="checkbox" name="tutor-course-filter-price" value="<?php echo $value; ?>"/>
|
80 |
-
<?php echo $title; ?>
|
81 |
</label>
|
82 |
<?php
|
83 |
}
|
@@ -92,5 +92,5 @@
|
|
92 |
<i class="tutor-icon-cross"></i> Clear All Filter
|
93 |
</a>
|
94 |
</div>
|
95 |
-
<?php do_action('tutor_course_filter/after'); ?>
|
96 |
</form>
|
1 |
<?php
|
2 |
$filter_object = new \TUTOR\Course_Filter();
|
3 |
$filter_levels = array(
|
4 |
+
'beginner'=> __( 'Beginner', 'tutor' ),
|
5 |
+
'intermediate'=> __( 'Intermediate', 'tutor' ),
|
6 |
+
'expert'=> __( 'Expert', 'tutor' )
|
7 |
);
|
8 |
$filter_prices=array(
|
9 |
+
'free'=> __( 'Free', 'tutor' ),
|
10 |
+
'paid'=> __( 'Paid', 'tutor' ),
|
11 |
);
|
12 |
|
13 |
+
$supported_filters = tutor_utils()->get_option( 'supported_course_filters', array() );
|
14 |
+
$supported_filters = array_keys( $supported_filters );
|
15 |
?>
|
16 |
<form>
|
17 |
+
<?php do_action( 'tutor_course_filter/before' ); ?>
|
18 |
<?php
|
19 |
+
if ( in_array( 'search', $supported_filters ) ) {
|
20 |
?>
|
21 |
<div class="tutor-course-search-field">
|
22 |
+
<input type="text" name="keyword" placeholder="<?php echo esc_attr( 'Search...', 'tutor' ); ?>"/>
|
23 |
<i class="tutor-icon-magnifying-glass-1"></i>
|
24 |
</div>
|
25 |
<?php
|
27 |
?>
|
28 |
<div>
|
29 |
<?php
|
30 |
+
if ( in_array( 'category', $supported_filters ) ) {
|
31 |
?>
|
32 |
<div>
|
33 |
+
<h4><?php esc_html_e( 'Category', 'tutor' ); ?></h4>
|
34 |
+
<?php $filter_object->render_terms( 'category' ); ?>
|
35 |
</div>
|
36 |
<?php
|
37 |
}
|
38 |
|
39 |
+
if ( in_array( 'tag', $supported_filters ) ) {
|
40 |
?>
|
41 |
<div>
|
42 |
+
<h4><?php esc_html_e( 'Tag', 'tutor' ); ?></h4>
|
43 |
+
<?php $filter_object->render_terms( 'tag' ); ?>
|
44 |
</div>
|
45 |
<?php
|
46 |
}
|
48 |
</div>
|
49 |
<div>
|
50 |
<?php
|
51 |
+
if ( in_array( 'difficulty_level', $supported_filters ) ) {
|
52 |
?>
|
53 |
<div>
|
54 |
+
<h4><?php esc_html_e( 'Level', 'tutor' ); ?></h4>
|
55 |
<?php
|
56 |
+
foreach ( $filter_levels as $value => $title ) {
|
57 |
?>
|
58 |
<label>
|
59 |
+
<input type="checkbox" name="tutor-course-filter-level" value="<?php echo esc_attr( $value ); ?>"/>
|
60 |
+
<?php echo esc_html( $title ); ?>
|
61 |
</label>
|
62 |
<?php
|
63 |
}
|
67 |
}
|
68 |
|
69 |
|
70 |
+
$is_membership = get_tutor_option( 'monetize_by' ) == 'pmpro' && tutils()->has_pmpro();
|
71 |
+
if ( ! $is_membership && in_array( 'price_type', $supported_filters ) ) {
|
72 |
?>
|
73 |
<div>
|
74 |
+
<h4><?php esc_html_e( 'Price', 'tutor' ); ?></h4>
|
75 |
<?php
|
76 |
+
foreach ( $filter_prices as $value => $title ) {
|
77 |
?>
|
78 |
<label>
|
79 |
+
<input type="checkbox" name="tutor-course-filter-price" value="<?php echo esc_attr( $value ); ?>"/>
|
80 |
+
<?php echo esc_html( $title ); ?>
|
81 |
</label>
|
82 |
<?php
|
83 |
}
|
92 |
<i class="tutor-icon-cross"></i> Clear All Filter
|
93 |
</a>
|
94 |
</div>
|
95 |
+
<?php do_action( 'tutor_course_filter/after' ); ?>
|
96 |
</form>
|
templates/dashboard/announcements/create.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<div class="tutor-modal-content tutor-announcement-modal-content">
|
4 |
<div class="modal-header">
|
5 |
<div class="modal-title">
|
6 |
-
<h1><?php
|
7 |
</div>
|
8 |
<div class="tutor-announcements-modal-close-wrap">
|
9 |
<a href="#" class="tutor-announcement-close-btn">
|
@@ -16,41 +16,41 @@
|
|
16 |
<?php tutor_nonce_field(); ?>
|
17 |
<div class="tutor-form-group">
|
18 |
<label>
|
19 |
-
<?php
|
20 |
</label>
|
21 |
<select class="ignore-nice-select" name="tutor_announcement_course" id="" required>
|
22 |
-
<?php if ($courses) : ?>
|
23 |
-
<?php foreach ($courses as $course) : ?>
|
24 |
-
<option value="<?php echo esc_attr($course->ID) ?>">
|
25 |
-
<?php echo $course->post_title; ?>
|
26 |
</option>
|
27 |
<?php endforeach; ?>
|
28 |
<?php else : ?>
|
29 |
-
<option value=""><?php
|
30 |
<?php endif; ?>
|
31 |
</select>
|
32 |
</div>
|
33 |
<div class="tutor-form-group">
|
34 |
<label>
|
35 |
-
<?php
|
36 |
</label>
|
37 |
-
<input type="text" name="tutor_announcement_title" value="" placeholder="<?php
|
38 |
</div>
|
39 |
<div class="tutor-form-group">
|
40 |
<label for="tutor_announcement_course">
|
41 |
-
<?php
|
42 |
</label>
|
43 |
-
<textarea rows="6" type="text" name="tutor_announcement_summary" value="" placeholder="<?php
|
44 |
</div>
|
45 |
|
46 |
-
<?php do_action('tutor_announcement_editor/after'); ?>
|
47 |
|
48 |
<div class="tutor-form-group">
|
49 |
<div class="tutor-announcements-create-alert"></div>
|
50 |
</div>
|
51 |
<div class="modal-footer">
|
52 |
-
<button type="submit" class="tutor-btn"><?php
|
53 |
-
<button type="button" class="quiz-modal-tab-navigation-btn quiz-modal-btn-cancel tutor-announcement-close-btn tutor-announcement-cancel-btn"><?php
|
54 |
</div>
|
55 |
</form>
|
56 |
</div>
|
3 |
<div class="tutor-modal-content tutor-announcement-modal-content">
|
4 |
<div class="modal-header">
|
5 |
<div class="modal-title">
|
6 |
+
<h1><?php esc_html_e( 'Create New Announcement', 'tutor' ); ?></h1>
|
7 |
</div>
|
8 |
<div class="tutor-announcements-modal-close-wrap">
|
9 |
<a href="#" class="tutor-announcement-close-btn">
|
16 |
<?php tutor_nonce_field(); ?>
|
17 |
<div class="tutor-form-group">
|
18 |
<label>
|
19 |
+
<?php esc_html_e( 'Select Course', 'tutor' ); ?>
|
20 |
</label>
|
21 |
<select class="ignore-nice-select" name="tutor_announcement_course" id="" required>
|
22 |
+
<?php if ( $courses ) : ?>
|
23 |
+
<?php foreach ( $courses as $course ) : ?>
|
24 |
+
<option value="<?php echo esc_attr( $course->ID ) ?>">
|
25 |
+
<?php echo esc_html( $course->post_title ); ?>
|
26 |
</option>
|
27 |
<?php endforeach; ?>
|
28 |
<?php else : ?>
|
29 |
+
<option value=""><?php echo esc_attr( 'No course found', 'tutor' ); ?></option>
|
30 |
<?php endif; ?>
|
31 |
</select>
|
32 |
</div>
|
33 |
<div class="tutor-form-group">
|
34 |
<label>
|
35 |
+
<?php esc_html_e( 'Announcement Title', 'tutor' ); ?>
|
36 |
</label>
|
37 |
+
<input type="text" name="tutor_announcement_title" value="" placeholder="<?php echo esc_attr( 'Announcement title', 'tutor' ); ?>" required>
|
38 |
</div>
|
39 |
<div class="tutor-form-group">
|
40 |
<label for="tutor_announcement_course">
|
41 |
+
<?php esc_html_e( 'Summary', 'tutor' ); ?>
|
42 |
</label>
|
43 |
+
<textarea rows="6" type="text" name="tutor_announcement_summary" value="" placeholder="<?php echo esc_attr( 'Summary...', 'tutor' ); ?>" required></textarea>
|
44 |
</div>
|
45 |
|
46 |
+
<?php do_action( 'tutor_announcement_editor/after' ); ?>
|
47 |
|
48 |
<div class="tutor-form-group">
|
49 |
<div class="tutor-announcements-create-alert"></div>
|
50 |
</div>
|
51 |
<div class="modal-footer">
|
52 |
+
<button type="submit" class="tutor-btn"><?php esc_html_e( 'Publish', 'tutor' ) ?></button>
|
53 |
+
<button type="button" class="quiz-modal-tab-navigation-btn quiz-modal-btn-cancel tutor-announcement-close-btn tutor-announcement-cancel-btn"><?php esc_html_e( 'Cancel', 'tutor' ) ?></button>
|
54 |
</div>
|
55 |
</form>
|
56 |
</div>
|
templates/dashboard/announcements/details.php
CHANGED
@@ -16,21 +16,21 @@
|
|
16 |
|
17 |
<div class="tutor-detail-course-info-wrap">
|
18 |
<div class="tutor-announcement-detail-course-info">
|
19 |
-
<label for=""><?php
|
20 |
<p></p>
|
21 |
</div>
|
22 |
<div class="tutor-announcement-detail-date-info">
|
23 |
-
<label for=""><?php
|
24 |
<p></p>
|
25 |
</div>
|
26 |
</div>
|
27 |
<div class="tutor-announce-detail-popup-button-wrap">
|
28 |
<div class="announcement-detail-cancel-button">
|
29 |
-
<button type="button" class="quiz-modal-tab-navigation-btn quiz-modal-btn-cancel tutor-announcement-close-btn tutor-announcement-cancel-btn"><?php
|
30 |
</div>
|
31 |
<div class="announcement-detail-edit-delete-button">
|
32 |
-
<button class="tutor-btn tutor-announcement-delete tutor-border-none" id="tutor-announcement-delete-from-detail"><?php
|
33 |
-
<button class="tutor-btn tutor-border-none tutor-announcement-edit" id="tutor-announcement-edit-from-detail"><?php
|
34 |
</div>
|
35 |
</div>
|
36 |
</div>
|
16 |
|
17 |
<div class="tutor-detail-course-info-wrap">
|
18 |
<div class="tutor-announcement-detail-course-info">
|
19 |
+
<label for=""><?php esc_html_e( 'Course', 'tutor' ) ?></label>
|
20 |
<p></p>
|
21 |
</div>
|
22 |
<div class="tutor-announcement-detail-date-info">
|
23 |
+
<label for=""><?php esc_html_e( 'Publish Date' ) ?></label>
|
24 |
<p></p>
|
25 |
</div>
|
26 |
</div>
|
27 |
<div class="tutor-announce-detail-popup-button-wrap">
|
28 |
<div class="announcement-detail-cancel-button">
|
29 |
+
<button type="button" class="quiz-modal-tab-navigation-btn quiz-modal-btn-cancel tutor-announcement-close-btn tutor-announcement-cancel-btn"><?php esc_html_e( 'Cancel', 'tutor' ) ?></button>
|
30 |
</div>
|
31 |
<div class="announcement-detail-edit-delete-button">
|
32 |
+
<button class="tutor-btn tutor-announcement-delete tutor-border-none" id="tutor-announcement-delete-from-detail"><?php esc_html_e( 'Delete', 'tutor' ) ?></button>
|
33 |
+
<button class="tutor-btn tutor-border-none tutor-announcement-edit" id="tutor-announcement-edit-from-detail"><?php esc_html_e( 'Edit', 'tutor' ) ?></button>
|
34 |
</div>
|
35 |
</div>
|
36 |
</div>
|
templates/dashboard/announcements/update.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<div class="tutor-modal-content tutor-announcement-modal-content">
|
4 |
<div class="modal-header">
|
5 |
<div class="modal-title">
|
6 |
-
<h1><?php
|
7 |
</div>
|
8 |
<div class="tutor-announcements-modal-close-wrap">
|
9 |
<a href="#" class="tutor-announcement-close-btn">
|
@@ -17,39 +17,39 @@
|
|
17 |
<input type="hidden" name="announcement_id" id="announcement_id">
|
18 |
<div class="tutor-form-group">
|
19 |
<label>
|
20 |
-
<?php
|
21 |
</label>
|
22 |
<select class="ignore-nice-select" name="tutor_announcement_course" id="tutor-announcement-course-id" required>
|
23 |
-
<?php if ($courses) : ?>
|
24 |
-
<?php foreach ($courses as $course) : ?>
|
25 |
-
<option value="<?php echo esc_attr($course->ID) ?>">
|
26 |
-
<?php echo $course->post_title; ?>
|
27 |
</option>
|
28 |
<?php endforeach; ?>
|
29 |
<?php else : ?>
|
30 |
-
<option value=""><?php
|
31 |
<?php endif; ?>
|
32 |
</select>
|
33 |
</div>
|
34 |
<div class="tutor-form-group">
|
35 |
<label>
|
36 |
-
<?php
|
37 |
</label>
|
38 |
-
<input type="text" name="tutor_announcement_title" id="tutor-announcement-title" value="" placeholder="<?php
|
39 |
</div>
|
40 |
<div class="tutor-form-group">
|
41 |
<label for="tutor_announcement_course">
|
42 |
-
<?php
|
43 |
</label>
|
44 |
-
<textarea rows="6" type="text" id="tutor-announcement-summary" name="tutor_announcement_summary" value="" placeholder="<?php
|
45 |
</div>
|
46 |
-
<?php do_action('tutor_announcement_editor/after'); ?>
|
47 |
<div class="tutor-form-group">
|
48 |
<div class="tutor-announcements-update-alert"></div>
|
49 |
</div>
|
50 |
<div class="modal-footer">
|
51 |
-
<button type="submit" class="tutor-btn"><?php
|
52 |
-
<button type="button" class="quiz-modal-tab-navigation-btn quiz-modal-btn-cancel tutor-announcement-close-btn tutor-announcement-cancel-btn "><?php
|
53 |
</div>
|
54 |
</form>
|
55 |
</div>
|
3 |
<div class="tutor-modal-content tutor-announcement-modal-content">
|
4 |
<div class="modal-header">
|
5 |
<div class="modal-title">
|
6 |
+
<h1><?php esc_html_e( 'Update Announcement', 'tutor' ); ?></h1>
|
7 |
</div>
|
8 |
<div class="tutor-announcements-modal-close-wrap">
|
9 |
<a href="#" class="tutor-announcement-close-btn">
|
17 |
<input type="hidden" name="announcement_id" id="announcement_id">
|
18 |
<div class="tutor-form-group">
|
19 |
<label>
|
20 |
+
<?php esc_html_e( 'Select Course', 'tutor' ); ?>
|
21 |
</label>
|
22 |
<select class="ignore-nice-select" name="tutor_announcement_course" id="tutor-announcement-course-id" required>
|
23 |
+
<?php if ( $courses ) : ?>
|
24 |
+
<?php foreach ( $courses as $course ) : ?>
|
25 |
+
<option value="<?php echo esc_attr( $course->ID ) ?>">
|
26 |
+
<?php echo esc_html( $course->post_title ); ?>
|
27 |
</option>
|
28 |
<?php endforeach; ?>
|
29 |
<?php else : ?>
|
30 |
+
<option value=""><?php esc_html_e( 'No course found', 'tutor' ); ?></option>
|
31 |
<?php endif; ?>
|
32 |
</select>
|
33 |
</div>
|
34 |
<div class="tutor-form-group">
|
35 |
<label>
|
36 |
+
<?php esc_html_e( 'Announcement Title', 'tutor' ); ?>
|
37 |
</label>
|
38 |
+
<input type="text" name="tutor_announcement_title" id="tutor-announcement-title" value="" placeholder="<?php esc_attr_e( 'Announcement title', 'tutor' ); ?>" required>
|
39 |
</div>
|
40 |
<div class="tutor-form-group">
|
41 |
<label for="tutor_announcement_course">
|
42 |
+
<?php esc_html_e( 'Summary', 'tutor' ); ?>
|
43 |
</label>
|
44 |
+
<textarea rows="6" type="text" id="tutor-announcement-summary" name="tutor_announcement_summary" value="" placeholder="<?php echo esc_attr__( 'Summary...', 'tutor' ); ?>" required></textarea>
|
45 |
</div>
|
46 |
+
<?php do_action( 'tutor_announcement_editor/after' ); ?>
|
47 |
<div class="tutor-form-group">
|
48 |
<div class="tutor-announcements-update-alert"></div>
|
49 |
</div>
|
50 |
<div class="modal-footer">
|
51 |
+
<button type="submit" class="tutor-btn"><?php esc_html_e( 'Update', 'tutor' ) ?></button>
|
52 |
+
<button type="button" class="quiz-modal-tab-navigation-btn quiz-modal-btn-cancel tutor-announcement-close-btn tutor-announcement-cancel-btn "><?php esc_html_e( 'Cancel', 'tutor' ) ?></button>
|
53 |
</div>
|
54 |
</form>
|
55 |
</div>
|
templates/dashboard/assignments/review.php
CHANGED
@@ -11,72 +11,72 @@
|
|
11 |
* @version 1.4.3
|
12 |
*/
|
13 |
|
14 |
-
$assignment_id = (int) sanitize_text_field(tutor_utils()->array_get('assignment', $_GET));
|
15 |
-
$assignment_submitted_id = (int) sanitize_text_field(tutor_utils()->array_get('view_assignment', $_GET));
|
16 |
-
$submitted_url = tutor_utils()->get_tutor_dashboard_page_permalink('assignments/submitted');
|
17 |
|
18 |
-
if(
|
19 |
-
echo _e("Sorry, but you are looking for something that isn't here." , 'tutor');
|
20 |
return;
|
21 |
}
|
22 |
|
23 |
-
$submitted_assignment = tutor_utils()->get_assignment_submit_info($assignment_submitted_id);
|
24 |
-
if ( $submitted_assignment){
|
25 |
|
26 |
-
$max_mark = tutor_utils()->get_assignment_option($submitted_assignment->comment_post_ID, 'total_mark');
|
27 |
|
28 |
-
$given_mark = get_comment_meta($assignment_submitted_id, 'assignment_mark', true);
|
29 |
-
$instructor_note = get_comment_meta($assignment_submitted_id, 'instructor_note', true);
|
30 |
-
$comment_author = get_user_by('login', $submitted_assignment->comment_author)
|
31 |
?>
|
32 |
|
33 |
<div class="submitted-assignment-title">
|
34 |
-
<a class="prev-btn" href="<?php echo esc_url($submitted_url . '?assignment=' . $assignment_id); ?>"><span>←</span><?php
|
35 |
</div>
|
36 |
|
37 |
<div class="tutor-assignment-review-header">
|
38 |
<h3>
|
39 |
-
<a href="<?php echo get_the_permalink($submitted_assignment->comment_post_ID); ?>" target="_blank">
|
40 |
-
<?php echo get_the_title($submitted_assignment->comment_post_ID); ?>
|
41 |
</a>
|
42 |
</h3>
|
43 |
<p>
|
44 |
-
<?php
|
45 |
-
<a href="<?php echo get_the_permalink($submitted_assignment->comment_parent); ?>" target="_blank">
|
46 |
-
<?php echo get_the_title($submitted_assignment->comment_parent); ?>
|
47 |
</a>
|
48 |
</p>
|
49 |
<p>
|
50 |
-
<?php
|
51 |
-
<span><?php echo $comment_author->display_name. ' ('
|
52 |
</p>
|
53 |
<p>
|
54 |
-
<?php
|
55 |
-
<span><?php echo date('j M, Y, h:i a', strtotime($submitted_assignment->comment_date)); ?></span>
|
56 |
</p>
|
57 |
</div>
|
58 |
|
59 |
<hr>
|
60 |
|
61 |
<div class="tutor-dashboard-assignment-submitted-content">
|
62 |
-
<h4><?php
|
63 |
-
<p><?php echo nl2br(stripslashes($submitted_assignment->comment_content)); ?></p>
|
64 |
|
65 |
<?php
|
66 |
-
$attached_files = get_comment_meta($submitted_assignment->comment_ID, 'uploaded_attachments', true);
|
67 |
-
if($attached_files){
|
68 |
?>
|
69 |
-
<h5><?php
|
70 |
<div class="tutor-dashboard-assignment-files">
|
71 |
<?php
|
72 |
-
$attached_files = json_decode($attached_files, true);
|
73 |
-
if (tutor_utils()->count($attached_files)){
|
74 |
$upload_dir = wp_get_upload_dir();
|
75 |
-
$upload_baseurl = trailingslashit(tutor_utils()->array_get('baseurl', $upload_dir));
|
76 |
-
foreach ($attached_files as $attached_file){
|
77 |
?>
|
78 |
<div class="uploaded-files">
|
79 |
-
<a href="<?php echo $upload_baseurl.tutor_utils()->array_get('uploaded_path', $attached_file) ?>" target="_blank"> <i class="tutor-icon-upload-file"></i> <?php echo tutor_utils()->array_get('name', $attached_file); ?></a>
|
80 |
</div>
|
81 |
<?php
|
82 |
}
|
@@ -89,38 +89,38 @@ if ( $submitted_assignment){
|
|
89 |
</div>
|
90 |
|
91 |
<div class="tutor-dashboard-assignment-review">
|
92 |
-
<h3><?php
|
93 |
-
<form action="" method="post" class="tutor-form-submit-through-ajax" data-toast_success_message="<?php
|
94 |
<?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?>
|
95 |
<input type="hidden" value="tutor_evaluate_assignment_submission" name="tutor_action"/>
|
96 |
-
<input type="hidden" value="<?php echo $assignment_submitted_id; ?>" name="assignment_submitted_id"/>
|
97 |
<div class="tutor-assignment-evaluate-row">
|
98 |
<div class="tutor-option-field-label">
|
99 |
-
<label for=""><?php
|
100 |
</div>
|
101 |
<div class="tutor-option-field input-mark">
|
102 |
<input type="number" name="evaluate_assignment[assignment_mark]" value="<?php echo $given_mark ? $given_mark : 0; ?>">
|
103 |
-
<p class="desc"><?php echo sprintf(__('Evaluate this assignment out of %s', 'tutor'), "<code>{$max_mark}</code>" ); ?></p>
|
104 |
</div>
|
105 |
</div>
|
106 |
<div class="tutor-assignment-evaluate-row">
|
107 |
<div class="tutor-option-field-label">
|
108 |
-
<label for=""><?php
|
109 |
</div>
|
110 |
<div class="tutor-option-field">
|
111 |
-
<textarea name="evaluate_assignment[instructor_note]"><?php echo $instructor_note; ?></textarea>
|
112 |
-
<p class="desc"><?php
|
113 |
</div>
|
114 |
</div>
|
115 |
<div class="tutor-assignment-evaluate-row">
|
116 |
<div class="tutor-option-field-label"></div>
|
117 |
<div class="tutor-option-field">
|
118 |
-
<button type="submit" class="tutor-button tutor-button-primary"><?php
|
119 |
</div>
|
120 |
</div>
|
121 |
</form>
|
122 |
</div>
|
123 |
|
124 |
-
<?php }else{
|
125 |
-
_e('Assignments submission not found or not completed', 'tutor');
|
126 |
} ?>
|
11 |
* @version 1.4.3
|
12 |
*/
|
13 |
|
14 |
+
$assignment_id = (int) sanitize_text_field( tutor_utils()->array_get( 'assignment', $_GET ) );
|
15 |
+
$assignment_submitted_id = (int) sanitize_text_field( tutor_utils()->array_get( 'view_assignment', $_GET ) );
|
16 |
+
$submitted_url = tutor_utils()->get_tutor_dashboard_page_permalink( 'assignments/submitted' );
|
17 |
|
18 |
+
if ( ! $assignment_submitted_id ) {
|
19 |
+
echo _e( "Sorry, but you are looking for something that isn't here." , 'tutor' );
|
20 |
return;
|
21 |
}
|
22 |
|
23 |
+
$submitted_assignment = tutor_utils()->get_assignment_submit_info( $assignment_submitted_id );
|
24 |
+
if ( $submitted_assignment ) {
|
25 |
|
26 |
+
$max_mark = tutor_utils()->get_assignment_option( $submitted_assignment->comment_post_ID, 'total_mark' );
|
27 |
|
28 |
+
$given_mark = get_comment_meta( $assignment_submitted_id, 'assignment_mark', true );
|
29 |
+
$instructor_note = get_comment_meta( $assignment_submitted_id, 'instructor_note', true );
|
30 |
+
$comment_author = get_user_by( 'login', $submitted_assignment->comment_author )
|
31 |
?>
|
32 |
|
33 |
<div class="submitted-assignment-title">
|
34 |
+
<a class="prev-btn" href="<?php echo esc_url( $submitted_url . '?assignment=' . $assignment_id ); ?>"><span>←</span><?php esc_html_e( 'Back', 'tutor' ); ?></a>
|
35 |
</div>
|
36 |
|
37 |
<div class="tutor-assignment-review-header">
|
38 |
<h3>
|
39 |
+
<a href="<?php echo esc_url( get_the_permalink( $submitted_assignment->comment_post_ID ) ); ?>" target="_blank">
|
40 |
+
<?php echo esc_html( get_the_title( $submitted_assignment->comment_post_ID ) ); ?>
|
41 |
</a>
|
42 |
</h3>
|
43 |
<p>
|
44 |
+
<?php esc_html_e( 'Course' , 'tutor' ); ?>:
|
45 |
+
<a href="<?php echo esc_url( get_the_permalink( $submitted_assignment->comment_parent ) ); ?>" target="_blank">
|
46 |
+
<?php echo esc_html( get_the_title( $submitted_assignment->comment_parent ) ); ?>
|
47 |
</a>
|
48 |
</p>
|
49 |
<p>
|
50 |
+
<?php esc_html_e( 'Student' , 'tutor' ); ?>:
|
51 |
+
<span><?php echo esc_html( $comment_author->display_name ) . ' (' . esc_html( $comment_author->user_email ) . ')'; ?></span>
|
52 |
</p>
|
53 |
<p>
|
54 |
+
<?php esc_html_e( 'Submitted Date' , 'tutor' ); ?>:
|
55 |
+
<span><?php echo date( 'j M, Y, h:i a', strtotime( $submitted_assignment->comment_date ) ); ?></span>
|
56 |
</p>
|
57 |
</div>
|
58 |
|
59 |
<hr>
|
60 |
|
61 |
<div class="tutor-dashboard-assignment-submitted-content">
|
62 |
+
<h4><?php esc_html_e( 'Assignment Description:', 'tutor' ); ?></h4>
|
63 |
+
<p><?php echo nl2br( stripslashes( $submitted_assignment->comment_content ) ); ?></p>
|
64 |
|
65 |
<?php
|
66 |
+
$attached_files = get_comment_meta( $submitted_assignment->comment_ID, 'uploaded_attachments', true );
|
67 |
+
if ( $attached_files ) {
|
68 |
?>
|
69 |
+
<h5><?php esc_html_e( 'Attach assignment file(s)', 'tutor' ); ?></h5>
|
70 |
<div class="tutor-dashboard-assignment-files">
|
71 |
<?php
|
72 |
+
$attached_files = json_decode( $attached_files, true );
|
73 |
+
if ( tutor_utils()->count( $attached_files ) ) {
|
74 |
$upload_dir = wp_get_upload_dir();
|
75 |
+
$upload_baseurl = trailingslashit( tutor_utils()->array_get( 'baseurl', $upload_dir ) );
|
76 |
+
foreach ( $attached_files as $attached_file ) {
|
77 |
?>
|
78 |
<div class="uploaded-files">
|
79 |
+
<a href="<?php echo esc_url( $upload_baseurl.tutor_utils()->array_get( 'uploaded_path', $attached_file ) ) ?>" target="_blank"> <i class="tutor-icon-upload-file"></i> <?php echo esc_html( tutor_utils()->array_get( 'name', $attached_file ) ); ?></a>
|
80 |
</div>
|
81 |
<?php
|
82 |
}
|
89 |
</div>
|
90 |
|
91 |
<div class="tutor-dashboard-assignment-review">
|
92 |
+
<h3><?php esc_html_e( 'Evaluation', 'tutor' ); ?></h3>
|
93 |
+
<form action="" method="post" class="tutor-form-submit-through-ajax" data-toast_success_message="<?php esc_attr_e( 'Assignment evaluated', 'tutor' ); ?>">
|
94 |
<?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?>
|
95 |
<input type="hidden" value="tutor_evaluate_assignment_submission" name="tutor_action"/>
|
96 |
+
<input type="hidden" value="<?php echo esc_attr( $assignment_submitted_id ); ?>" name="assignment_submitted_id"/>
|
97 |
<div class="tutor-assignment-evaluate-row">
|
98 |
<div class="tutor-option-field-label">
|
99 |
+
<label for=""><?php esc_html_e( 'Your Points', 'tutor' ); ?></label>
|
100 |
</div>
|
101 |
<div class="tutor-option-field input-mark">
|
102 |
<input type="number" name="evaluate_assignment[assignment_mark]" value="<?php echo $given_mark ? $given_mark : 0; ?>">
|
103 |
+
<p class="desc"><?php echo sprintf( __( 'Evaluate this assignment out of %s', 'tutor' ), "<code>{$max_mark}</code>" ); ?></p>
|
104 |
</div>
|
105 |
</div>
|
106 |
<div class="tutor-assignment-evaluate-row">
|
107 |
<div class="tutor-option-field-label">
|
108 |
+
<label for=""><?php esc_html_e( 'Write a note', 'tutor' ); ?></label>
|
109 |
</div>
|
110 |
<div class="tutor-option-field">
|
111 |
+
<textarea name="evaluate_assignment[instructor_note]"><?php echo esc_html( $instructor_note ); ?></textarea>
|
112 |
+
<p class="desc"><?php esc_html_e( 'Write a note to students about this submission', 'tutor' ); ?></p>
|
113 |
</div>
|
114 |
</div>
|
115 |
<div class="tutor-assignment-evaluate-row">
|
116 |
<div class="tutor-option-field-label"></div>
|
117 |
<div class="tutor-option-field">
|
118 |
+
<button type="submit" class="tutor-button tutor-button-primary"><?php esc_html_e( 'Evaluate this submission', 'tutor' ); ?></button>
|
119 |
</div>
|
120 |
</div>
|
121 |
</form>
|
122 |
</div>
|
123 |
|
124 |
+
<?php } else {
|
125 |
+
_e( 'Assignments submission not found or not completed', 'tutor' );
|
126 |
} ?>
|
templates/dashboard/assignments/submitted.php
CHANGED
@@ -7,48 +7,48 @@
|
|
7 |
|
8 |
global $wpdb;
|
9 |
|
10 |
-
$order_filter = isset($_GET['order']) ? sanitize_text_field($_GET['order']) : 'desc';
|
11 |
-
$assignment_id = sanitize_text_field($_GET['assignment']);
|
12 |
-
$assignments_submitted = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->comments} WHERE comment_type = 'tutor_assignment' AND comment_post_ID = %d ORDER BY comment_ID $order_filter", $assignment_id));
|
13 |
-
|
14 |
-
$max_mark = tutor_utils()->get_assignment_option($assignment_id, 'total_mark');
|
15 |
-
$pass_mark = tutor_utils()->get_assignment_option($assignment_id, 'pass_mark');
|
16 |
-
$format = get_option('date_format').' '.get_option('time_format');
|
17 |
-
$deadline = tutor_utils()->get_assignment_deadline_date($assignment_id, $format, __('No Limit', 'tutor'));
|
18 |
?>
|
19 |
|
20 |
<div class="submitted-assignment-title">
|
21 |
-
<a class="prev-btn" href="<?php echo tutor_utils()->get_tutor_dashboard_page_permalink('assignments'); ?>"><span>←</span><?php
|
22 |
</div>
|
23 |
|
24 |
<?php
|
25 |
-
if (tutor_utils()->count($assignments_submitted)) {
|
26 |
?>
|
27 |
|
28 |
<div class="tutor-assignment-review-header tutor-assignment-submitted-page">
|
29 |
<p>
|
30 |
-
<?php
|
31 |
-
<a href="<?php echo get_the_permalink($assignments_submitted[0]->comment_parent); ?>" target="_blank">
|
32 |
-
<?php echo get_the_title($assignments_submitted[0]->comment_parent); ?>
|
33 |
</a>
|
34 |
</p>
|
35 |
<h3>
|
36 |
-
<a href="<?php echo get_the_permalink($assignment_id); ?>" target="_blank">
|
37 |
-
<?php echo get_the_title($assignment_id); ?>
|
38 |
</a>
|
39 |
</h3>
|
40 |
<div class="assignment-info">
|
41 |
<p>
|
42 |
-
<?php
|
43 |
-
<span><?php echo $deadline; ?></span>
|
44 |
</p>
|
45 |
<p>
|
46 |
-
<?php
|
47 |
-
<span><?php echo $max_mark; ?></span>
|
48 |
</p>
|
49 |
<p>
|
50 |
-
<?php
|
51 |
-
<span><?php echo $pass_mark; ?></span>
|
52 |
</p>
|
53 |
</div>
|
54 |
</div>
|
@@ -57,10 +57,10 @@ if (tutor_utils()->count($assignments_submitted)) {
|
|
57 |
|
58 |
<div class="tutor-dashboard-announcement-sorting-wrap submitted-assignments-sorting-wrap">
|
59 |
<div class="tutor-form-group">
|
60 |
-
<label><?php
|
61 |
<select class="tutor-announcement-order-sorting ignore-nice-select">
|
62 |
-
<option value="desc" <?php selected($order_filter, 'desc'); ?>><?php
|
63 |
-
<option value="asc" <?php selected($order_filter, 'asc'); ?>><?php
|
64 |
</select>
|
65 |
</div>
|
66 |
</div>
|
@@ -69,7 +69,7 @@ if (tutor_utils()->count($assignments_submitted)) {
|
|
69 |
<thead>
|
70 |
<tr>
|
71 |
<th style="width:25%;"><?php esc_attr_e('Date', 'tutor'); ?></td>
|
72 |
-
<th><?php esc_attr_e('Student', 'tutor'); ?></td>
|
73 |
<th style="width:15%;"><?php esc_attr_e('Total Points', 'tutor'); ?></td>
|
74 |
<th style="width:12%;"><?php esc_attr_e('Result', 'tutor'); ?></td>
|
75 |
<th style="width:10%;"> </td>
|
7 |
|
8 |
global $wpdb;
|
9 |
|
10 |
+
$order_filter = isset( $_GET['order'] ) ? sanitize_text_field( $_GET['order'] ) : 'desc';
|
11 |
+
$assignment_id = sanitize_text_field( $_GET['assignment'] );
|
12 |
+
$assignments_submitted = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->comments} WHERE comment_type = 'tutor_assignment' AND comment_post_ID = %d ORDER BY comment_ID $order_filter", $assignment_id ) );
|
13 |
+
|
14 |
+
$max_mark = tutor_utils()->get_assignment_option( $assignment_id, 'total_mark' );
|
15 |
+
$pass_mark = tutor_utils()->get_assignment_option( $assignment_id, 'pass_mark' );
|
16 |
+
$format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
|
17 |
+
$deadline = tutor_utils()->get_assignment_deadline_date( $assignment_id, $format, __( 'No Limit', 'tutor' ) );
|
18 |
?>
|
19 |
|
20 |
<div class="submitted-assignment-title">
|
21 |
+
<a class="prev-btn" href="<?php echo tutor_utils()->get_tutor_dashboard_page_permalink( 'assignments' ); ?>"><span>←</span><?php esc_html_e( 'Back', 'tutor' ); ?></a>
|
22 |
</div>
|
23 |
|
24 |
<?php
|
25 |
+
if ( tutor_utils()->count( $assignments_submitted ) ) {
|
26 |
?>
|
27 |
|
28 |
<div class="tutor-assignment-review-header tutor-assignment-submitted-page">
|
29 |
<p>
|
30 |
+
<?php esc_html_e( 'Course', 'tutor' ); ?> :
|
31 |
+
<a href="<?php echo get_the_permalink( $assignments_submitted[0]->comment_parent ); ?>" target="_blank">
|
32 |
+
<?php echo esc_html( get_the_title( $assignments_submitted[0]->comment_parent ) ); ?>
|
33 |
</a>
|
34 |
</p>
|
35 |
<h3>
|
36 |
+
<a href="<?php echo get_the_permalink( $assignment_id ); ?>" target="_blank">
|
37 |
+
<?php echo esc_html( get_the_title( $assignment_id ) ); ?>
|
38 |
</a>
|
39 |
</h3>
|
40 |
<div class="assignment-info">
|
41 |
<p>
|
42 |
+
<?php esc_html_e( 'Submission Deadline', 'tutor' ); ?>:
|
43 |
+
<span><?php echo esc_html( $deadline ); ?></span>
|
44 |
</p>
|
45 |
<p>
|
46 |
+
<?php esc_html_e( 'Total Points', 'tutor' ); ?>:
|
47 |
+
<span><?php echo esc_html( $max_mark ); ?></span>
|
48 |
</p>
|
49 |
<p>
|
50 |
+
<?php esc_html_e( 'Pass Points', 'tutor' ); ?>:
|
51 |
+
<span><?php echo esc_html( $pass_mark ); ?></span>
|
52 |
</p>
|
53 |
</div>
|
54 |
</div>
|
57 |
|
58 |
<div class="tutor-dashboard-announcement-sorting-wrap submitted-assignments-sorting-wrap">
|
59 |
<div class="tutor-form-group">
|
60 |
+
<label><?php esc_html_e( 'Sort By:', 'tutor' ); ?></label>
|
61 |
<select class="tutor-announcement-order-sorting ignore-nice-select">
|
62 |
+
<option value="desc" <?php selected( $order_filter, 'desc' ); ?>><?php esc_html_e( 'Latest', 'tutor' ); ?></option>
|
63 |
+
<option value="asc" <?php selected( $order_filter, 'asc' ); ?>><?php esc_html_e( 'Oldest', 'tutor' ); ?></option>
|
64 |
</select>
|
65 |
</div>
|
66 |
</div>
|
69 |
<thead>
|
70 |
<tr>
|
71 |
<th style="width:25%;"><?php esc_attr_e('Date', 'tutor'); ?></td>
|
72 |
+
<th><?php esc_attr_e( 'Student', 'tutor' ); ?></td>
|
73 |
<th style="width:15%;"><?php esc_attr_e('Total Points', 'tutor'); ?></td>
|
74 |
<th style="width:12%;"><?php esc_attr_e('Result', 'tutor'); ?></td>
|
75 |
<th style="width:10%;"> </td>
|
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.9.
|
8 |
Author URI: https://themeum.com
|
9 |
Requires at least: 4.5
|
10 |
Tested up to: 5.8
|
@@ -17,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) )
|
|
17 |
/**
|
18 |
* Defined the tutor main file
|
19 |
*/
|
20 |
-
define( 'TUTOR_VERSION', '1.9.
|
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.9.12
|
8 |
Author URI: https://themeum.com
|
9 |
Requires at least: 4.5
|
10 |
Tested up to: 5.8
|
17 |
/**
|
18 |
* Defined the tutor main file
|
19 |
*/
|
20 |
+
define( 'TUTOR_VERSION', '1.9.12' );
|
21 |
define( 'TUTOR_FILE', __FILE__ );
|
22 |
|
23 |
/**
|
views/metabox/user-profile-fields.php
CHANGED
@@ -10,14 +10,14 @@ wp_enqueue_media();
|
|
10 |
<table class="form-table">
|
11 |
<?php do_action('tutor_backend_profile_fields_before'); ?>
|
12 |
<tr class="user-description-wrap">
|
13 |
-
<th><label for="description"><?php
|
14 |
<td>
|
15 |
-
<input type="text" name="_tutor_profile_job_title" id="_tutor_profile_job_title" value="<?php echo get_user_meta($user->ID, '_tutor_profile_job_title', true); ?>" class="regular-text" />
|
16 |
</td>
|
17 |
</tr>
|
18 |
|
19 |
<tr class="user-description-wrap">
|
20 |
-
<th><label for="description"><?php
|
21 |
<td>
|
22 |
<?php
|
23 |
$settings = array(
|
@@ -26,32 +26,32 @@ wp_enqueue_media();
|
|
26 |
'quicktags' => false,
|
27 |
'editor_height' => 200,
|
28 |
);
|
29 |
-
wp_editor(get_user_meta($user->ID, '_tutor_profile_bio', true), '_tutor_profile_bio', $settings);
|
30 |
?>
|
31 |
|
32 |
-
<p class="description"><?php
|
33 |
</td>
|
34 |
</tr>
|
35 |
|
36 |
<tr class="user-description-wrap">
|
37 |
-
<th><label for="description"><?php
|
38 |
<td>
|
39 |
<div class="tutor-video-poster-wrap">
|
40 |
<p class="video-poster-img">
|
41 |
<?php
|
42 |
-
$user_profile_photo = get_user_meta($user->ID, '_tutor_profile_photo', true);
|
43 |
-
if ($user_profile_photo){
|
44 |
-
echo '<img src="'.wp_get_attachment_image_url($user_profile_photo).'" alt="" /> ';
|
45 |
}
|
46 |
?>
|
47 |
</p>
|
48 |
-
<input type="hidden" name="_tutor_profile_photo" value="<?php echo $user_profile_photo; ?>">
|
49 |
-
<button type="button" class="tutor_video_poster_upload_btn button button-primary"><?php
|
50 |
</div>
|
51 |
|
52 |
<input type="hidden" name="tutor_action" value="tutor_profile_update_by_wp">
|
53 |
</td>
|
54 |
</tr>
|
55 |
-
<?php do_action('tutor_backend_profile_fields_after'); ?>
|
56 |
</table>
|
57 |
|
10 |
<table class="form-table">
|
11 |
<?php do_action('tutor_backend_profile_fields_before'); ?>
|
12 |
<tr class="user-description-wrap">
|
13 |
+
<th><label for="description"><?php esc_html_e( 'Job Title', 'tutor' ); ?></label></th>
|
14 |
<td>
|
15 |
+
<input type="text" name="_tutor_profile_job_title" id="_tutor_profile_job_title" value="<?php echo esc_attr( get_user_meta( $user->ID, '_tutor_profile_job_title', true ) ); ?>" class="regular-text" />
|
16 |
</td>
|
17 |
</tr>
|
18 |
|
19 |
<tr class="user-description-wrap">
|
20 |
+
<th><label for="description"><?php esc_html_e( 'Profile Bio', 'tutor' ); ?></label></th>
|
21 |
<td>
|
22 |
<?php
|
23 |
$settings = array(
|
26 |
'quicktags' => false,
|
27 |
'editor_height' => 200,
|
28 |
);
|
29 |
+
wp_editor( get_user_meta( $user->ID, '_tutor_profile_bio', true ), '_tutor_profile_bio', $settings );
|
30 |
?>
|
31 |
|
32 |
+
<p class="description"><?php esc_html_e( 'Write a little bit more about you, it will show publicly.', 'tutor' ); ?></p>
|
33 |
</td>
|
34 |
</tr>
|
35 |
|
36 |
<tr class="user-description-wrap">
|
37 |
+
<th><label for="description"><?php esc_html_e( 'Profile Photo', 'tutor' ); ?></label></th>
|
38 |
<td>
|
39 |
<div class="tutor-video-poster-wrap">
|
40 |
<p class="video-poster-img">
|
41 |
<?php
|
42 |
+
$user_profile_photo = get_user_meta( $user->ID, '_tutor_profile_photo', true );
|
43 |
+
if ( $user_profile_photo ) {
|
44 |
+
echo '<img src="' . esc_url( wp_get_attachment_image_url( $user_profile_photo ) ) . '" alt="" /> ';
|
45 |
}
|
46 |
?>
|
47 |
</p>
|
48 |
+
<input type="hidden" name="_tutor_profile_photo" value="<?php echo esc_attr( $user_profile_photo ); ?>">
|
49 |
+
<button type="button" class="tutor_video_poster_upload_btn button button-primary"><?php esc_html_e( 'Upload', 'tutor' ); ?></button>
|
50 |
</div>
|
51 |
|
52 |
<input type="hidden" name="tutor_action" value="tutor_profile_update_by_wp">
|
53 |
</td>
|
54 |
</tr>
|
55 |
+
<?php do_action( 'tutor_backend_profile_fields_after' ); ?>
|
56 |
</table>
|
57 |
|
views/metabox/video-metabox.php
CHANGED
@@ -3,17 +3,17 @@
|
|
3 |
* Don't change it, it's supporting modal in other place
|
4 |
* if get_the_ID() empty, then it's means we are passing $post variable from another place
|
5 |
*/
|
6 |
-
if (get_the_ID())
|
7 |
global $post;
|
8 |
|
9 |
-
$video = maybe_unserialize(get_post_meta($post->ID, '_video', true));
|
10 |
|
11 |
-
$videoSource = tutor_utils()->avalue_dot('source', $video);
|
12 |
-
$runtimeHours = tutor_utils()->avalue_dot('runtime.hours', $video);
|
13 |
-
$runtimeMinutes = tutor_utils()->avalue_dot('runtime.minutes', $video);
|
14 |
-
$runtimeSeconds = tutor_utils()->avalue_dot('runtime.seconds', $video);
|
15 |
-
$sourceVideoID = tutor_utils()->avalue_dot('source_video_id', $video);
|
16 |
-
$poster = tutor_utils()->avalue_dot('poster', $video);
|
17 |
|
18 |
$video_sources = array(
|
19 |
'html5' => array('title' => __('HTML 5 (mp4)', 'tutor'), 'icon' => 'html5'),
|
@@ -23,11 +23,11 @@ $video_sources = array(
|
|
23 |
'embedded' => array('title' => __('Embedded', 'tutor'), 'icon' => 'code')
|
24 |
);
|
25 |
|
26 |
-
$supported_sources = tutor_utils()->get_option('supported_video_sources', $video_sources);
|
27 |
-
$supported_sources = array_keys($supported_sources);
|
28 |
|
29 |
-
$default_source = tutor_utils()->get_option('default_video_source', null);
|
30 |
-
(
|
31 |
|
32 |
?>
|
33 |
|
@@ -35,10 +35,10 @@ $default_source = tutor_utils()->get_option('default_video_source', null);
|
|
35 |
<div class="tutor-option-field-label">
|
36 |
<label for="">
|
37 |
<?php
|
38 |
-
if ($post->post_type === tutor()->course_post_type){
|
39 |
-
_e('Course Intro Video', 'tutor');
|
40 |
}else{
|
41 |
-
_e('Video Source', 'tutor');
|
42 |
}
|
43 |
?>
|
44 |
</label>
|
@@ -47,18 +47,18 @@ $default_source = tutor_utils()->get_option('default_video_source', null);
|
|
47 |
<div class="tutor-option-field tutor-video-upload-wrap">
|
48 |
|
49 |
<select name="video[source]" class="tutor_lesson_video_source videosource_select2">
|
50 |
-
<option value="-1"><?php _e('Select Video Source', 'tutor'); ?></option>
|
51 |
<?php
|
52 |
-
foreach($video_sources as $value
|
53 |
-
if(in_array($value, $supported_sources)){
|
54 |
-
echo '<option value="'
|
55 |
}
|
56 |
}
|
57 |
?>
|
58 |
</select>
|
59 |
|
60 |
<p class="desc">
|
61 |
-
<?php
|
62 |
</p>
|
63 |
|
64 |
<div class="video-metabox-source-input-wrap" style="display: <?php echo ! $videoSource ? 'none' : 'block'; ?>;">
|
@@ -73,7 +73,7 @@ $default_source = tutor_utils()->get_option('default_video_source', null);
|
|
73 |
<div class="video_source_upload_wrap_html5">
|
74 |
<a href="javascript:;" class="video_upload_btn tutor-button bordered-button"><?php _e('Upload Video', 'tutor'); ?></a>
|
75 |
<input type="hidden" class="input_source_video_id" name="video[source_video_id]" value="<?php echo $sourceVideoID; ?>" >
|
76 |
-
<p style="display: <?php echo $sourceVideoID ? 'block' : 'none'; ?>;"><?php _e('Media ID', 'tutor'); ?>: <span class="video_media_id"><?php echo $sourceVideoID; ?></span></p>
|
77 |
</div>
|
78 |
|
79 |
</div>
|
@@ -86,8 +86,8 @@ $default_source = tutor_utils()->get_option('default_video_source', null);
|
|
86 |
<?php
|
87 |
$builder_course_img_src = tutor()->url . 'assets/images/placeholder-course.jpg';
|
88 |
$poster_url = $builder_course_img_src;
|
89 |
-
if ( $poster){
|
90 |
-
$poster_url = wp_get_attachment_image_url($poster);
|
91 |
}
|
92 |
?>
|
93 |
<img src="<?php echo $poster_url; ?>" class="thumbnail-img" data-placeholder-src="<?php echo $builder_course_img_src; ?>">
|
@@ -113,24 +113,19 @@ $default_source = tutor_utils()->get_option('default_video_source', null);
|
|
113 |
</div>
|
114 |
|
115 |
|
116 |
-
<div class="video-metabox-source-item video_source_wrap_external_url" style="display: <?php echo $videoSource === 'external_url' ? 'block' :
|
117 |
-
'
|
118 |
-
<input type="text" name="video[source_external_url]" value="<?php echo tutor_utils()->avalue_dot('source_external_url', $video);
|
119 |
?>" placeholder="<?php _e('External Video URL', 'tutor'); ?>">
|
120 |
</div>
|
121 |
|
122 |
-
<div class="video-metabox-source-item video_source_wrap_youtube" style="display: <?php echo $videoSource === 'youtube' ? 'block' :
|
123 |
-
'
|
124 |
-
<input type="text" name="video[source_youtube]" value="<?php echo tutor_utils()->avalue_dot('source_youtube', $video); ?>" placeholder="<?php _e('YouTube Video URL', 'tutor'); ?>" data-youtube_api_key="<?php echo tutils()->get_option('lesson_video_duration_youtube_api_key', ''); ?>">
|
125 |
</div>
|
126 |
<div class="video-metabox-source-item video_source_wrap_vimeo" style="display: <?php echo $videoSource === 'vimeo' ? 'block' : 'none'; ?>;">
|
127 |
-
<input type="text" name="video[source_vimeo]" value="<?php echo tutor_utils()->avalue_dot('source_vimeo', $video); ?>" placeholder="<?php _e('Vimeo Video URL', 'tutor'); ?>">
|
128 |
</div>
|
129 |
<div class="video-metabox-source-item video_source_wrap_embedded" style="display: <?php echo $videoSource === 'embedded' ? 'block' : 'none'; ?>;">
|
130 |
-
<textarea name="video[source_embedded]" placeholder="<?php _e('Place your embedded code here', 'tutor'); ?>"><?php echo tutor_utils()
|
131 |
-
->avalue_dot
|
132 |
-
('source_embedded', $video);
|
133 |
-
?></textarea>
|
134 |
</div>
|
135 |
|
136 |
</div>
|
3 |
* Don't change it, it's supporting modal in other place
|
4 |
* if get_the_ID() empty, then it's means we are passing $post variable from another place
|
5 |
*/
|
6 |
+
if ( get_the_ID() )
|
7 |
global $post;
|
8 |
|
9 |
+
$video = maybe_unserialize( get_post_meta( $post->ID, '_video', true ) );
|
10 |
|
11 |
+
$videoSource = tutor_utils()->avalue_dot( 'source', $video );
|
12 |
+
$runtimeHours = tutor_utils()->avalue_dot( 'runtime.hours', $video );
|
13 |
+
$runtimeMinutes = tutor_utils()->avalue_dot( 'runtime.minutes', $video );
|
14 |
+
$runtimeSeconds = tutor_utils()->avalue_dot( 'runtime.seconds', $video );
|
15 |
+
$sourceVideoID = tutor_utils()->avalue_dot( 'source_video_id', $video );
|
16 |
+
$poster = tutor_utils()->avalue_dot( 'poster', $video );
|
17 |
|
18 |
$video_sources = array(
|
19 |
'html5' => array('title' => __('HTML 5 (mp4)', 'tutor'), 'icon' => 'html5'),
|
23 |
'embedded' => array('title' => __('Embedded', 'tutor'), 'icon' => 'code')
|
24 |
);
|
25 |
|
26 |
+
$supported_sources = tutor_utils()->get_option( 'supported_video_sources', $video_sources );
|
27 |
+
$supported_sources = array_keys( $supported_sources );
|
28 |
|
29 |
+
$default_source = tutor_utils()->get_option( 'default_video_source', null );
|
30 |
+
( ! $videoSource && $default_source && in_array( $default_source, $supported_sources ) ) ? $videoSource = $default_source : 0;
|
31 |
|
32 |
?>
|
33 |
|
35 |
<div class="tutor-option-field-label">
|
36 |
<label for="">
|
37 |
<?php
|
38 |
+
if ( $post->post_type === tutor()->course_post_type ) {
|
39 |
+
_e( 'Course Intro Video', 'tutor' );
|
40 |
}else{
|
41 |
+
_e( 'Video Source', 'tutor' );
|
42 |
}
|
43 |
?>
|
44 |
</label>
|
47 |
<div class="tutor-option-field tutor-video-upload-wrap">
|
48 |
|
49 |
<select name="video[source]" class="tutor_lesson_video_source videosource_select2">
|
50 |
+
<option value="-1"><?php _e( 'Select Video Source', 'tutor' ); ?></option>
|
51 |
<?php
|
52 |
+
foreach ( $video_sources as $value => $source ) {
|
53 |
+
if ( in_array( $value, $supported_sources ) ) {
|
54 |
+
echo '<option value="' . $value . '" ' . selected( $value, $videoSource ) . ' data-icon="' . $source['icon'] . '" >' . $source['title'] . '</option>';
|
55 |
}
|
56 |
}
|
57 |
?>
|
58 |
</select>
|
59 |
|
60 |
<p class="desc">
|
61 |
+
<?php esc_html_e( 'Select your preferred video type.', 'tutor' ); ?>
|
62 |
</p>
|
63 |
|
64 |
<div class="video-metabox-source-input-wrap" style="display: <?php echo ! $videoSource ? 'none' : 'block'; ?>;">
|
73 |
<div class="video_source_upload_wrap_html5">
|
74 |
<a href="javascript:;" class="video_upload_btn tutor-button bordered-button"><?php _e('Upload Video', 'tutor'); ?></a>
|
75 |
<input type="hidden" class="input_source_video_id" name="video[source_video_id]" value="<?php echo $sourceVideoID; ?>" >
|
76 |
+
<p style="display: <?php echo $sourceVideoID ? 'block' : 'none'; ?>;"><?php _e('Media ID', 'tutor'); ?>: <span class="video_media_id"><?php echo esc_html( $sourceVideoID ); ?></span></p>
|
77 |
</div>
|
78 |
|
79 |
</div>
|
86 |
<?php
|
87 |
$builder_course_img_src = tutor()->url . 'assets/images/placeholder-course.jpg';
|
88 |
$poster_url = $builder_course_img_src;
|
89 |
+
if ( $poster ) {
|
90 |
+
$poster_url = wp_get_attachment_image_url( $poster );
|
91 |
}
|
92 |
?>
|
93 |
<img src="<?php echo $poster_url; ?>" class="thumbnail-img" data-placeholder-src="<?php echo $builder_course_img_src; ?>">
|
113 |
</div>
|
114 |
|
115 |
|
116 |
+
<div class="video-metabox-source-item video_source_wrap_external_url" style="display: <?php echo $videoSource === 'external_url' ? 'block' : 'none'; ?>;">
|
117 |
+
<input type="text" name="video[source_external_url]" value="<?php echo tutor_utils()->avalue_dot( 'source_external_url', $video );
|
|
|
118 |
?>" placeholder="<?php _e('External Video URL', 'tutor'); ?>">
|
119 |
</div>
|
120 |
|
121 |
+
<div class="video-metabox-source-item video_source_wrap_youtube" style="display: <?php echo $videoSource === 'youtube' ? 'block' : 'none'; ?>;">
|
122 |
+
<input type="text" name="video[source_youtube]" value="<?php echo tutor_utils()->avalue_dot( 'source_youtube', $video ); ?>" placeholder="<?php _e('YouTube Video URL', 'tutor'); ?>" data-youtube_api_key="<?php echo tutils()->get_option('lesson_video_duration_youtube_api_key', ''); ?>">
|
|
|
123 |
</div>
|
124 |
<div class="video-metabox-source-item video_source_wrap_vimeo" style="display: <?php echo $videoSource === 'vimeo' ? 'block' : 'none'; ?>;">
|
125 |
+
<input type="text" name="video[source_vimeo]" value="<?php echo tutor_utils()->avalue_dot( 'source_vimeo', $video ); ?>" placeholder="<?php _e('Vimeo Video URL', 'tutor'); ?>">
|
126 |
</div>
|
127 |
<div class="video-metabox-source-item video_source_wrap_embedded" style="display: <?php echo $videoSource === 'embedded' ? 'block' : 'none'; ?>;">
|
128 |
+
<textarea name="video[source_embedded]" placeholder="<?php _e('Place your embedded code here', 'tutor'); ?>"><?php echo tutor_utils()->avalue_dot('source_embedded', $video); ?></textarea>
|
|
|
|
|
|
|
129 |
</div>
|
130 |
|
131 |
</div>
|
views/modal/add_quiz.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<?php
|
4 |
if ( ! empty($_POST['tutor_quiz_builder_quiz_id'])){
|
5 |
$quiz_id = sanitize_text_field($_POST['tutor_quiz_builder_quiz_id']);
|
6 |
-
echo '<input id="tutor_quiz_builder_quiz_id" value="'
|
7 |
}
|
8 |
if ( isset($_POST['current_topic_id']) && $_POST['current_topic_id'] !== '' ) {
|
9 |
echo '<input type="hidden" id="current_topic_id_for_quiz" value="'.sanitize_text_field( $_POST['current_topic_id'] ).'" />';
|
3 |
<?php
|
4 |
if ( ! empty($_POST['tutor_quiz_builder_quiz_id'])){
|
5 |
$quiz_id = sanitize_text_field($_POST['tutor_quiz_builder_quiz_id']);
|
6 |
+
echo '<input id="tutor_quiz_builder_quiz_id" value="'. esc_attr( $quiz_id ) .'" />';
|
7 |
}
|
8 |
if ( isset($_POST['current_topic_id']) && $_POST['current_topic_id'] !== '' ) {
|
9 |
echo '<input type="hidden" id="current_topic_id_for_quiz" value="'.sanitize_text_field( $_POST['current_topic_id'] ).'" />';
|
views/modal/edit-lesson.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<form class="tutor_lesson_modal_form">
|
2 |
<?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?>
|
3 |
<input type="hidden" name="action" value="tutor_modal_create_or_update_lesson">
|
4 |
-
<input type="hidden" name="lesson_id" value="<?php echo $post->ID; ?>">
|
5 |
-
<input type="hidden" name="current_topic_id" value="<?php echo $topic_id; ?>">
|
6 |
|
7 |
<?php
|
8 |
if (get_tutor_option('enable_lesson_classic_editor')){
|
@@ -55,7 +55,7 @@
|
|
55 |
<a href="javascript:;" class="tutor-lesson-thumbnail-delete-btn" style="display: <?php echo $lesson_thumbnail_id ? 'block':'none'; ?>;"><i class="tutor-icon-line-cross"></i></a>
|
56 |
</p>
|
57 |
|
58 |
-
<input type="hidden" class="_lesson_thumbnail_id" name="_lesson_thumbnail_id" value="<?php echo $lesson_thumbnail_id; ?>">
|
59 |
<button type="button" class="lesson_thumbnail_upload_btn tutor-btn bordered-btn"><?php echo $thumbnail_upload_text; ?></button>
|
60 |
</div>
|
61 |
</div>
|
@@ -72,7 +72,7 @@
|
|
72 |
</div>
|
73 |
|
74 |
<div class="modal-footer">
|
75 |
-
<button type="button" class="tutor-btn active update_lesson_modal_btn" data-toast_success_message="<?php
|
76 |
<?php _e('Update Lesson', 'tutor'); ?>
|
77 |
</button>
|
78 |
</div>
|
1 |
<form class="tutor_lesson_modal_form">
|
2 |
<?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?>
|
3 |
<input type="hidden" name="action" value="tutor_modal_create_or_update_lesson">
|
4 |
+
<input type="hidden" name="lesson_id" value="<?php echo esc_attr( $post->ID ); ?>">
|
5 |
+
<input type="hidden" name="current_topic_id" value="<?php echo esc_attr( $topic_id ); ?>">
|
6 |
|
7 |
<?php
|
8 |
if (get_tutor_option('enable_lesson_classic_editor')){
|
55 |
<a href="javascript:;" class="tutor-lesson-thumbnail-delete-btn" style="display: <?php echo $lesson_thumbnail_id ? 'block':'none'; ?>;"><i class="tutor-icon-line-cross"></i></a>
|
56 |
</p>
|
57 |
|
58 |
+
<input type="hidden" class="_lesson_thumbnail_id" name="_lesson_thumbnail_id" value="<?php echo esc_attr( $lesson_thumbnail_id ); ?>">
|
59 |
<button type="button" class="lesson_thumbnail_upload_btn tutor-btn bordered-btn"><?php echo $thumbnail_upload_text; ?></button>
|
60 |
</div>
|
61 |
</div>
|
72 |
</div>
|
73 |
|
74 |
<div class="modal-footer">
|
75 |
+
<button type="button" class="tutor-btn active update_lesson_modal_btn" data-toast_success_message="<?php esc_attr_e('Lesson Updated', 'tutor'); ?>">
|
76 |
<?php _e('Update Lesson', 'tutor'); ?>
|
77 |
</button>
|
78 |
</div>
|
views/modal/edit_quiz.php
CHANGED
@@ -4,11 +4,11 @@ if (!empty($_POST['tutor_quiz_builder_quiz_id'])) {
|
|
4 |
$quiz_id = sanitize_text_field($_POST['tutor_quiz_builder_quiz_id']);
|
5 |
$quiz = get_post($quiz_id);
|
6 |
|
7 |
-
echo '<input type="hidden" id="tutor_quiz_builder_quiz_id" value="' . $quiz_id . '" />';
|
8 |
} elseif (!empty($quiz_id)) {
|
9 |
$quiz = get_post($quiz_id);
|
10 |
|
11 |
-
echo '<input type="hidden" id="tutor_quiz_builder_quiz_id" value="' . $quiz_id . '" />';
|
12 |
}
|
13 |
|
14 |
if (!$quiz) {
|
@@ -101,12 +101,12 @@ if ( $topic_id != '' ) {
|
|
101 |
</span>
|
102 |
|
103 |
<span class="question-edit-icon">
|
104 |
-
<a href="javascript:;" class="tutor-quiz-open-question-form" data-question-id="<?php echo $question->question_id; ?>"><i class="tutor-icon-pencil"></i> </a>
|
105 |
</span>
|
106 |
</div>
|
107 |
|
108 |
<div class="quiz-builder-qustion-trash">
|
109 |
-
<a href="javascript:;" class="tutor-quiz-question-trash" data-question-id="<?php echo $question->question_id; ?>"><i class="tutor-icon-garbage"></i> </a>
|
110 |
</div>
|
111 |
</div>
|
112 |
<?php
|
@@ -144,7 +144,7 @@ if ( $topic_id != '' ) {
|
|
144 |
<h4> <?php _e('Time Limit', 'tutor'); ?> </h4>
|
145 |
<div class="tutor-quiz-builder-row">
|
146 |
<div class="tutor-quiz-builder-col auto-width">
|
147 |
-
<input type="text" name="quiz_option[time_limit][time_value]" value="<?php echo tutor_utils()->get_quiz_option($quiz_id, 'time_limit.time_value', 0) ?>">
|
148 |
</div>
|
149 |
<div class="tutor-quiz-builder-col auto-width">
|
150 |
<?php $limit_time_type = tutor_utils()->get_quiz_option($quiz_id, 'time_limit.time_type', 'minutes') ?>
|
@@ -219,7 +219,7 @@ if ( $topic_id != '' ) {
|
|
219 |
<div class="tutor-field-type-slider" data-min="0" data-max="20">
|
220 |
<p class="tutor-field-type-slider-value"><?php echo $attempts_allowed; ?></p>
|
221 |
<div class="tutor-field-slider"></div>
|
222 |
-
<input type="hidden" value="<?php echo $attempts_allowed; ?>" name="quiz_option[attempts_allowed]" />
|
223 |
</div>
|
224 |
</div>
|
225 |
</div>
|
@@ -230,7 +230,7 @@ if ( $topic_id != '' ) {
|
|
230 |
<h4><?php _e('Passing Grade (%)', 'tutor'); ?></h4>
|
231 |
<div class="tutor-quiz-builder-row">
|
232 |
<div class="tutor-quiz-builder-col">
|
233 |
-
<input type="number" name="quiz_option[passing_grade]" value="<?php echo tutor_utils()->get_quiz_option($quiz_id, 'passing_grade', 80) ?>" size="10">
|
234 |
</div>
|
235 |
</div>
|
236 |
<p class="help"><?php _e('Set the passing percentage for this quiz', 'tutor'); ?></p>
|
@@ -240,7 +240,7 @@ if ( $topic_id != '' ) {
|
|
240 |
<h4><?php _e('Max questions allowed to answer', 'tutor'); ?></h4>
|
241 |
<div class="tutor-quiz-builder-row">
|
242 |
<div class="tutor-quiz-builder-col">
|
243 |
-
<input type="number" name="quiz_option[max_questions_for_answer]" value="<?php echo tutor_utils()->get_quiz_option($quiz_id, 'max_questions_for_answer', 10) ?>">
|
244 |
</div>
|
245 |
</div>
|
246 |
<p class="help"><?php _e('This amount of question will be available for students to answer, and question will comes randomly from all available questions belongs with a quiz, if this amount greater than available question, then all questions will be available for a student to answer.', 'tutor'); ?></p>
|
@@ -254,7 +254,7 @@ if ( $topic_id != '' ) {
|
|
254 |
<div class="tutor-quiz-builder-modal-control-btn-group">
|
255 |
<div class="quiz-builder-btn-group-left">
|
256 |
<a href="#quiz-builder-tab-questions" class="quiz-modal-tab-navigation-btn quiz-modal-btn-back"><?php _e('Back', 'tutor'); ?></a>
|
257 |
-
<a href="#quiz-builder-tab-advanced-options" class="quiz-modal-tab-navigation-btn quiz-modal-settings-save-btn" data-toast_success_message="<?php
|
258 |
</div>
|
259 |
<!--<div class="quiz-builder-btn-group-right">
|
260 |
<a href="#quiz-builder-tab-questions" class="quiz-modal-tab-navigation-btn quiz-modal-btn-cancel"><?php /*_e('Cancel', 'tutor'); */ ?></a>
|
@@ -322,7 +322,7 @@ if ( $topic_id != '' ) {
|
|
322 |
<h4><?php _e('Short answer characters limit', 'tutor'); ?></h4>
|
323 |
<div class="tutor-quiz-builder-row">
|
324 |
<div class="tutor-quiz-builder-col">
|
325 |
-
<input type="number" name="quiz_option[short_answer_characters_limit]" value="<?php echo tutor_utils()->get_quiz_option($quiz_id, 'short_answer_characters_limit', 200); ?>">
|
326 |
</div>
|
327 |
</div>
|
328 |
<p class="help"><?php _e('Student will place answer in short answer question type within this characters limit.', 'tutor'); ?></p>
|
@@ -332,7 +332,7 @@ if ( $topic_id != '' ) {
|
|
332 |
<h4><?php _e('Open-Ended/Essay questions answer character limit', 'tutor'); ?></h4>
|
333 |
<div class="tutor-quiz-builder-row">
|
334 |
<div class="tutor-quiz-builder-col">
|
335 |
-
<input type="number" name="quiz_option[open_ended_answer_characters_limit]" value="<?php echo tutor_utils()->get_quiz_option($quiz_id, 'open_ended_answer_characters_limit', 500); ?>">
|
336 |
</div>
|
337 |
</div>
|
338 |
<p class="help"><?php _e('Students will place the answer in the Open-Ended/Essay question type within this character limit.', 'tutor'); ?></p>
|
4 |
$quiz_id = sanitize_text_field($_POST['tutor_quiz_builder_quiz_id']);
|
5 |
$quiz = get_post($quiz_id);
|
6 |
|
7 |
+
echo '<input type="hidden" id="tutor_quiz_builder_quiz_id" value="' . esc_attr( $quiz_id ) . '" />';
|
8 |
} elseif (!empty($quiz_id)) {
|
9 |
$quiz = get_post($quiz_id);
|
10 |
|
11 |
+
echo '<input type="hidden" id="tutor_quiz_builder_quiz_id" value="' . esc_attr( $quiz_id ) . '" />';
|
12 |
}
|
13 |
|
14 |
if (!$quiz) {
|
101 |
</span>
|
102 |
|
103 |
<span class="question-edit-icon">
|
104 |
+
<a href="javascript:;" class="tutor-quiz-open-question-form" data-question-id="<?php echo esc_attr( $question->question_id ); ?>"><i class="tutor-icon-pencil"></i> </a>
|
105 |
</span>
|
106 |
</div>
|
107 |
|
108 |
<div class="quiz-builder-qustion-trash">
|
109 |
+
<a href="javascript:;" class="tutor-quiz-question-trash" data-question-id="<?php echo esc_attr( $question->question_id ); ?>"><i class="tutor-icon-garbage"></i> </a>
|
110 |
</div>
|
111 |
</div>
|
112 |
<?php
|
144 |
<h4> <?php _e('Time Limit', 'tutor'); ?> </h4>
|
145 |
<div class="tutor-quiz-builder-row">
|
146 |
<div class="tutor-quiz-builder-col auto-width">
|
147 |
+
<input type="text" name="quiz_option[time_limit][time_value]" value="<?php echo esc_attr( tutor_utils()->get_quiz_option($quiz_id, 'time_limit.time_value', 0) ) ?>">
|
148 |
</div>
|
149 |
<div class="tutor-quiz-builder-col auto-width">
|
150 |
<?php $limit_time_type = tutor_utils()->get_quiz_option($quiz_id, 'time_limit.time_type', 'minutes') ?>
|
219 |
<div class="tutor-field-type-slider" data-min="0" data-max="20">
|
220 |
<p class="tutor-field-type-slider-value"><?php echo $attempts_allowed; ?></p>
|
221 |
<div class="tutor-field-slider"></div>
|
222 |
+
<input type="hidden" value="<?php echo esc_attr( $attempts_allowed ); ?>" name="quiz_option[attempts_allowed]" />
|
223 |
</div>
|
224 |
</div>
|
225 |
</div>
|
230 |
<h4><?php _e('Passing Grade (%)', 'tutor'); ?></h4>
|
231 |
<div class="tutor-quiz-builder-row">
|
232 |
<div class="tutor-quiz-builder-col">
|
233 |
+
<input type="number" name="quiz_option[passing_grade]" value="<?php echo esc_attr( tutor_utils()->get_quiz_option( $quiz_id, 'passing_grade', 80 ) ) ?>" size="10">
|
234 |
</div>
|
235 |
</div>
|
236 |
<p class="help"><?php _e('Set the passing percentage for this quiz', 'tutor'); ?></p>
|
240 |
<h4><?php _e('Max questions allowed to answer', 'tutor'); ?></h4>
|
241 |
<div class="tutor-quiz-builder-row">
|
242 |
<div class="tutor-quiz-builder-col">
|
243 |
+
<input type="number" name="quiz_option[max_questions_for_answer]" value="<?php echo esc_attr( tutor_utils()->get_quiz_option( $quiz_id, 'max_questions_for_answer', 10 ) ) ?>">
|
244 |
</div>
|
245 |
</div>
|
246 |
<p class="help"><?php _e('This amount of question will be available for students to answer, and question will comes randomly from all available questions belongs with a quiz, if this amount greater than available question, then all questions will be available for a student to answer.', 'tutor'); ?></p>
|
254 |
<div class="tutor-quiz-builder-modal-control-btn-group">
|
255 |
<div class="quiz-builder-btn-group-left">
|
256 |
<a href="#quiz-builder-tab-questions" class="quiz-modal-tab-navigation-btn quiz-modal-btn-back"><?php _e('Back', 'tutor'); ?></a>
|
257 |
+
<a href="#quiz-builder-tab-advanced-options" class="quiz-modal-tab-navigation-btn quiz-modal-settings-save-btn" data-toast_success_message="<?php esc_attr_e('Saved', 'tutor'); ?>"><?php _e('Save', 'tutor'); ?></a>
|
258 |
</div>
|
259 |
<!--<div class="quiz-builder-btn-group-right">
|
260 |
<a href="#quiz-builder-tab-questions" class="quiz-modal-tab-navigation-btn quiz-modal-btn-cancel"><?php /*_e('Cancel', 'tutor'); */ ?></a>
|
322 |
<h4><?php _e('Short answer characters limit', 'tutor'); ?></h4>
|
323 |
<div class="tutor-quiz-builder-row">
|
324 |
<div class="tutor-quiz-builder-col">
|
325 |
+
<input type="number" name="quiz_option[short_answer_characters_limit]" value="<?php echo esc_attr( tutor_utils()->get_quiz_option( $quiz_id, 'short_answer_characters_limit', 200 ) ); ?>">
|
326 |
</div>
|
327 |
</div>
|
328 |
<p class="help"><?php _e('Student will place answer in short answer question type within this characters limit.', 'tutor'); ?></p>
|
332 |
<h4><?php _e('Open-Ended/Essay questions answer character limit', 'tutor'); ?></h4>
|
333 |
<div class="tutor-quiz-builder-row">
|
334 |
<div class="tutor-quiz-builder-col">
|
335 |
+
<input type="number" name="quiz_option[open_ended_answer_characters_limit]" value="<?php echo esc_attr( tutor_utils()->get_quiz_option( $quiz_id, 'open_ended_answer_characters_limit', 500 ) ); ?>">
|
336 |
</div>
|
337 |
</div>
|
338 |
<p class="help"><?php _e('Students will place the answer in the Open-Ended/Essay question type within this character limit.', 'tutor'); ?></p>
|
views/modal/question_answer_edit_form.php
CHANGED
@@ -12,7 +12,7 @@ $answer_two_gap_match = ! empty($old_answer->answer_two_gap_match) ? stripslashe
|
|
12 |
|
13 |
<div class="tutor-quiz-question-answers-form">
|
14 |
|
15 |
-
<input type="hidden" name="tutor_quiz_answer_id" value="<?php echo $old_answer->answer_id; ?>" />
|
16 |
|
17 |
<?php
|
18 |
if ($question_type === 'true_false'){
|
@@ -25,7 +25,7 @@ $answer_two_gap_match = ! empty($old_answer->answer_two_gap_match) ? stripslashe
|
|
25 |
<h4><?php _e('Answer title', 'tutor'); ?></h4>
|
26 |
<div class="tutor-quiz-builder-row">
|
27 |
<div class="tutor-quiz-builder-col">
|
28 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="<?php echo $answer_title; ?>">
|
29 |
</div>
|
30 |
</div>
|
31 |
</div>
|
@@ -35,12 +35,12 @@ $answer_two_gap_match = ! empty($old_answer->answer_two_gap_match) ? stripslashe
|
|
35 |
<div class="tutor-quiz-builder-row">
|
36 |
<div class="tutor-quiz-builder-col">
|
37 |
<div class="tutor-media-upload-wrap">
|
38 |
-
<input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="<?php echo $image_id; ?>">
|
39 |
<div class="tutor-media-preview">
|
40 |
<a href="javascript:;" class="tutor-media-upload-btn">
|
41 |
<?php
|
42 |
if ($image_id){
|
43 |
-
echo '<img src="'.wp_get_attachment_image_url($image_id).'" />';
|
44 |
}else{
|
45 |
echo '<i class="tutor-icon-image1"></i>';
|
46 |
}
|
@@ -59,19 +59,19 @@ $answer_two_gap_match = ! empty($old_answer->answer_two_gap_match) ? stripslashe
|
|
59 |
<div class="tutor-quiz-builder-row">
|
60 |
<div class="tutor-quiz-builder-col auto-width">
|
61 |
<label>
|
62 |
-
<input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="text" <?php
|
63 |
echo $answer_view_format ? checked('text', $answer_view_format) : 'checked="checked"' ?>> <?php _e('Only text', 'tutor'); ?>
|
64 |
</label>
|
65 |
</div>
|
66 |
<div class="tutor-quiz-builder-col auto-width">
|
67 |
<label>
|
68 |
-
<input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="image" <?php echo
|
69 |
checked('image', $answer_view_format) ?> > <?php _e('Only Image', 'tutor'); ?>
|
70 |
</label>
|
71 |
</div>
|
72 |
<div class="tutor-quiz-builder-col auto-width">
|
73 |
<label>
|
74 |
-
<input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="text_image" <?php echo checked('text_image', $answer_view_format) ?> > <?php _e('Text & Image both', 'tutor'); ?>
|
75 |
</label>
|
76 |
</div>
|
77 |
</div>
|
@@ -83,7 +83,7 @@ $answer_two_gap_match = ! empty($old_answer->answer_two_gap_match) ? stripslashe
|
|
83 |
<h4><?php _e('Question Title', 'tutor'); ?></h4>
|
84 |
<div class="tutor-quiz-builder-row">
|
85 |
<div class="tutor-quiz-builder-col">
|
86 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="<?php echo $answer_title; ?>">
|
87 |
</div>
|
88 |
</div>
|
89 |
<p class="help"><?php _e( 'Please make sure that <b>{dash}</b> variable contains in your question title to show dash, You can use multiple variable', 'tutor' ); ?></p>
|
@@ -93,7 +93,7 @@ $answer_two_gap_match = ! empty($old_answer->answer_two_gap_match) ? stripslashe
|
|
93 |
<h4><?php _e('Correct Answer(s)', 'tutor'); ?></h4>
|
94 |
<div class="tutor-quiz-builder-row">
|
95 |
<div class="tutor-quiz-builder-col">
|
96 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_two_gap_match]" value="<?php echo $answer_two_gap_match; ?>">
|
97 |
</div>
|
98 |
</div>
|
99 |
<p class="help"><?php _e( 'Separate multiple answer by pipe <b>( | )</b> , 1 answer per variable assigned in question', 'tutor' ); ?></p>
|
@@ -107,7 +107,7 @@ $answer_two_gap_match = ! empty($old_answer->answer_two_gap_match) ? stripslashe
|
|
107 |
<h4><?php _e('Answer title', 'tutor'); ?></h4>
|
108 |
<div class="tutor-quiz-builder-row">
|
109 |
<div class="tutor-quiz-builder-col">
|
110 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="<?php echo $answer_title; ?>">
|
111 |
</div>
|
112 |
</div>
|
113 |
</div>
|
@@ -115,7 +115,7 @@ $answer_two_gap_match = ! empty($old_answer->answer_two_gap_match) ? stripslashe
|
|
115 |
<h4><?php _e('Matched Answer title', 'tutor'); ?></h4>
|
116 |
<div class="tutor-quiz-builder-row">
|
117 |
<div class="tutor-quiz-builder-col">
|
118 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][matched_answer_title]" value="<?php echo $answer_two_gap_match; ?>">
|
119 |
</div>
|
120 |
</div>
|
121 |
</div>
|
@@ -125,12 +125,12 @@ $answer_two_gap_match = ! empty($old_answer->answer_two_gap_match) ? stripslashe
|
|
125 |
<div class="tutor-quiz-builder-row">
|
126 |
<div class="tutor-quiz-builder-col">
|
127 |
<div class="tutor-media-upload-wrap">
|
128 |
-
<input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="<?php echo $image_id; ?>">
|
129 |
<div class="tutor-media-preview">
|
130 |
<a href="javascript:;" class="tutor-media-upload-btn">
|
131 |
<?php
|
132 |
if ($image_id){
|
133 |
-
echo '<img src="'.wp_get_attachment_image_url($image_id).'" />';
|
134 |
}else{
|
135 |
echo '<i class="tutor-icon-image1"></i>';
|
136 |
}
|
@@ -150,19 +150,19 @@ $answer_two_gap_match = ! empty($old_answer->answer_two_gap_match) ? stripslashe
|
|
150 |
<div class="tutor-quiz-builder-row">
|
151 |
<div class="tutor-quiz-builder-col auto-width">
|
152 |
<label>
|
153 |
-
<input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="text" <?php echo $answer_view_format ? checked('text', $answer_view_format) : 'checked="checked"' ?>>
|
154 |
<?php _e('Only text', 'tutor'); ?>
|
155 |
</label>
|
156 |
</div>
|
157 |
<div class="tutor-quiz-builder-col auto-width">
|
158 |
<label>
|
159 |
-
<input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="image" <?php echo checked('image', $answer_view_format) ?> >
|
160 |
<?php _e('Only Image', 'tutor'); ?>
|
161 |
</label>
|
162 |
</div>
|
163 |
<div class="tutor-quiz-builder-col auto-width">
|
164 |
<label>
|
165 |
-
<input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="text_image" <?php echo checked('text_image', $answer_view_format) ?> >
|
166 |
<?php _e('Text & Image both', 'tutor'); ?>
|
167 |
</label>
|
168 |
</div>
|
@@ -178,12 +178,12 @@ $answer_two_gap_match = ! empty($old_answer->answer_two_gap_match) ? stripslashe
|
|
178 |
<div class="tutor-quiz-builder-row">
|
179 |
<div class="tutor-quiz-builder-col">
|
180 |
<div class="tutor-media-upload-wrap">
|
181 |
-
<input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="<?php echo $image_id; ?>">
|
182 |
<div class="tutor-media-preview">
|
183 |
<a href="javascript:;" class="tutor-media-upload-btn">
|
184 |
<?php
|
185 |
if ($image_id){
|
186 |
-
echo '<img src="'.wp_get_attachment_image_url($image_id).'" />';
|
187 |
}else{
|
188 |
echo '<i class="tutor-icon-image1"></i>';
|
189 |
}
|
@@ -202,7 +202,7 @@ $answer_two_gap_match = ! empty($old_answer->answer_two_gap_match) ? stripslashe
|
|
202 |
<h4><?php _e('Image matched text', 'tutor'); ?></h4>
|
203 |
<div class="tutor-quiz-builder-row">
|
204 |
<div class="tutor-quiz-builder-col">
|
205 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="<?php echo $answer_title; ?>">
|
206 |
</div>
|
207 |
</div>
|
208 |
</div> <!-- /.tutor-quiz-builder-group -->
|
@@ -215,12 +215,12 @@ $answer_two_gap_match = ! empty($old_answer->answer_two_gap_match) ? stripslashe
|
|
215 |
<div class="tutor-quiz-builder-row">
|
216 |
<div class="tutor-quiz-builder-col">
|
217 |
<div class="tutor-media-upload-wrap">
|
218 |
-
<input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="<?php echo $image_id; ?>">
|
219 |
<div class="tutor-media-preview">
|
220 |
<a href="javascript:;" class="tutor-media-upload-btn">
|
221 |
<?php
|
222 |
if ($image_id){
|
223 |
-
echo '<img src="'.wp_get_attachment_image_url($image_id).'" />';
|
224 |
}else{
|
225 |
echo '<i class="tutor-icon-image1"></i>';
|
226 |
}
|
@@ -239,7 +239,7 @@ $answer_two_gap_match = ! empty($old_answer->answer_two_gap_match) ? stripslashe
|
|
239 |
<h4><?php _e('Answer input value', 'tutor'); ?></h4>
|
240 |
<div class="tutor-quiz-builder-row">
|
241 |
<div class="tutor-quiz-builder-col">
|
242 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="<?php echo $answer_title; ?>">
|
243 |
</div>
|
244 |
</div>
|
245 |
<p class="help"><?php _e('The answers that students enter should match with this text. Write in <strong>small caps</strong>','tutor'); ?></p>
|
12 |
|
13 |
<div class="tutor-quiz-question-answers-form">
|
14 |
|
15 |
+
<input type="hidden" name="tutor_quiz_answer_id" value="<?php echo esc_attr( $old_answer->answer_id ); ?>" />
|
16 |
|
17 |
<?php
|
18 |
if ($question_type === 'true_false'){
|
25 |
<h4><?php _e('Answer title', 'tutor'); ?></h4>
|
26 |
<div class="tutor-quiz-builder-row">
|
27 |
<div class="tutor-quiz-builder-col">
|
28 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="<?php echo esc_attr( $answer_title ); ?>">
|
29 |
</div>
|
30 |
</div>
|
31 |
</div>
|
35 |
<div class="tutor-quiz-builder-row">
|
36 |
<div class="tutor-quiz-builder-col">
|
37 |
<div class="tutor-media-upload-wrap">
|
38 |
+
<input type="hidden" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][image_id]" value="<?php echo esc_attr( $image_id ); ?>">
|
39 |
<div class="tutor-media-preview">
|
40 |
<a href="javascript:;" class="tutor-media-upload-btn">
|
41 |
<?php
|
42 |
if ($image_id){
|
43 |
+
echo '<img src="'. esc_url( wp_get_attachment_image_url( $image_id ) ) .'" />';
|
44 |
}else{
|
45 |
echo '<i class="tutor-icon-image1"></i>';
|
46 |
}
|
59 |
<div class="tutor-quiz-builder-row">
|
60 |
<div class="tutor-quiz-builder-col auto-width">
|
61 |
<label>
|
62 |
+
<input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="text" <?php
|
63 |
echo $answer_view_format ? checked('text', $answer_view_format) : 'checked="checked"' ?>> <?php _e('Only text', 'tutor'); ?>
|
64 |
</label>
|
65 |
</div>
|
66 |
<div class="tutor-quiz-builder-col auto-width">
|
67 |
<label>
|
68 |
+
<input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="image" <?php echo
|
69 |
checked('image', $answer_view_format) ?> > <?php _e('Only Image', 'tutor'); ?>
|
70 |
</label>
|
71 |
</div>
|
72 |
<div class="tutor-quiz-builder-col auto-width">
|
73 |
<label>
|
74 |
+
<input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="text_image" <?php echo checked('text_image', $answer_view_format) ?> > <?php _e('Text & Image both', 'tutor'); ?>
|
75 |
</label>
|
76 |
</div>
|
77 |
</div>
|
83 |
<h4><?php _e('Question Title', 'tutor'); ?></h4>
|
84 |
<div class="tutor-quiz-builder-row">
|
85 |
<div class="tutor-quiz-builder-col">
|
86 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="<?php echo esc_attr( $answer_title ); ?>">
|
87 |
</div>
|
88 |
</div>
|
89 |
<p class="help"><?php _e( 'Please make sure that <b>{dash}</b> variable contains in your question title to show dash, You can use multiple variable', 'tutor' ); ?></p>
|
93 |
<h4><?php _e('Correct Answer(s)', 'tutor'); ?></h4>
|
94 |
<div class="tutor-quiz-builder-row">
|
95 |
<div class="tutor-quiz-builder-col">
|
96 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_two_gap_match]" value="<?php echo esc_attr( $answer_two_gap_match ); ?>">
|
97 |
</div>
|
98 |
</div>
|
99 |
<p class="help"><?php _e( 'Separate multiple answer by pipe <b>( | )</b> , 1 answer per variable assigned in question', 'tutor' ); ?></p>
|
107 |
<h4><?php _e('Answer title', 'tutor'); ?></h4>
|
108 |
<div class="tutor-quiz-builder-row">
|
109 |
<div class="tutor-quiz-builder-col">
|
110 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="<?php echo esc_attr( $answer_title ); ?>">
|
111 |
</div>
|
112 |
</div>
|
113 |
</div>
|
115 |
<h4><?php _e('Matched Answer title', 'tutor'); ?></h4>
|
116 |
<div class="tutor-quiz-builder-row">
|
117 |
<div class="tutor-quiz-builder-col">
|
118 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][matched_answer_title]" value="<?php echo esc_attr( $answer_two_gap_match ); ?>">
|
119 |
</div>
|
120 |
</div>
|
121 |
</div>
|
125 |
<div class="tutor-quiz-builder-row">
|
126 |
<div class="tutor-quiz-builder-col">
|
127 |
<div class="tutor-media-upload-wrap">
|
128 |
+
<input type="hidden" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][image_id]" value="<?php echo esc_attr( $image_id ); ?>">
|
129 |
<div class="tutor-media-preview">
|
130 |
<a href="javascript:;" class="tutor-media-upload-btn">
|
131 |
<?php
|
132 |
if ($image_id){
|
133 |
+
echo '<img src="'. esc_url( wp_get_attachment_image_url( $image_id ) ) .'" />';
|
134 |
}else{
|
135 |
echo '<i class="tutor-icon-image1"></i>';
|
136 |
}
|
150 |
<div class="tutor-quiz-builder-row">
|
151 |
<div class="tutor-quiz-builder-col auto-width">
|
152 |
<label>
|
153 |
+
<input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="text" <?php echo $answer_view_format ? checked('text', $answer_view_format) : 'checked="checked"' ?>>
|
154 |
<?php _e('Only text', 'tutor'); ?>
|
155 |
</label>
|
156 |
</div>
|
157 |
<div class="tutor-quiz-builder-col auto-width">
|
158 |
<label>
|
159 |
+
<input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="image" <?php echo checked('image', $answer_view_format) ?> >
|
160 |
<?php _e('Only Image', 'tutor'); ?>
|
161 |
</label>
|
162 |
</div>
|
163 |
<div class="tutor-quiz-builder-col auto-width">
|
164 |
<label>
|
165 |
+
<input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="text_image" <?php echo checked('text_image', $answer_view_format) ?> >
|
166 |
<?php _e('Text & Image both', 'tutor'); ?>
|
167 |
</label>
|
168 |
</div>
|
178 |
<div class="tutor-quiz-builder-row">
|
179 |
<div class="tutor-quiz-builder-col">
|
180 |
<div class="tutor-media-upload-wrap">
|
181 |
+
<input type="hidden" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][image_id]" value="<?php echo esc_attr( $image_id ); ?>">
|
182 |
<div class="tutor-media-preview">
|
183 |
<a href="javascript:;" class="tutor-media-upload-btn">
|
184 |
<?php
|
185 |
if ($image_id){
|
186 |
+
echo '<img src="'. esc_url( wp_get_attachment_image_url( $image_id ) ) .'" />';
|
187 |
}else{
|
188 |
echo '<i class="tutor-icon-image1"></i>';
|
189 |
}
|
202 |
<h4><?php _e('Image matched text', 'tutor'); ?></h4>
|
203 |
<div class="tutor-quiz-builder-row">
|
204 |
<div class="tutor-quiz-builder-col">
|
205 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="<?php echo esc_attr( $answer_title ); ?>">
|
206 |
</div>
|
207 |
</div>
|
208 |
</div> <!-- /.tutor-quiz-builder-group -->
|
215 |
<div class="tutor-quiz-builder-row">
|
216 |
<div class="tutor-quiz-builder-col">
|
217 |
<div class="tutor-media-upload-wrap">
|
218 |
+
<input type="hidden" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][image_id]" value="<?php echo esc_attr( $image_id ); ?>">
|
219 |
<div class="tutor-media-preview">
|
220 |
<a href="javascript:;" class="tutor-media-upload-btn">
|
221 |
<?php
|
222 |
if ($image_id){
|
223 |
+
echo '<img src="'. esc_url( wp_get_attachment_image_url( $image_id ) ) .'" />';
|
224 |
}else{
|
225 |
echo '<i class="tutor-icon-image1"></i>';
|
226 |
}
|
239 |
<h4><?php _e('Answer input value', 'tutor'); ?></h4>
|
240 |
<div class="tutor-quiz-builder-row">
|
241 |
<div class="tutor-quiz-builder-col">
|
242 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="<?php echo esc_attr( $answer_title ); ?>">
|
243 |
</div>
|
244 |
</div>
|
245 |
<p class="help"><?php _e('The answers that students enter should match with this text. Write in <strong>small caps</strong>','tutor'); ?></p>
|
views/modal/question_answer_form.php
CHANGED
@@ -17,11 +17,11 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
17 |
<div class="tutor-quiz-builder-row">
|
18 |
<div class="tutor-quiz-builder-col auto-width">
|
19 |
<label>
|
20 |
-
<input type="radio" name="quiz_answer[<?php echo $question_id; ?>][true_false]" value="true" checked="checked">
|
21 |
<?php _e('True', 'tutor'); ?>
|
22 |
</label>
|
23 |
<label>
|
24 |
-
<input type="radio" name="quiz_answer[<?php echo $question_id; ?>][true_false]" value="false">
|
25 |
<?php _e('False', 'tutor'); ?>
|
26 |
</label>
|
27 |
</div>
|
@@ -37,7 +37,7 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
37 |
<div class="tutor-quiz-builder-row">
|
38 |
<div class="tutor-quiz-builder-col">
|
39 |
<div class="quiz-modal-field-wrap">
|
40 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="">
|
41 |
</div>
|
42 |
</div>
|
43 |
</div>
|
@@ -49,7 +49,7 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
49 |
<div class="tutor-quiz-builder-row">
|
50 |
<div class="tutor-quiz-builder-col">
|
51 |
<div class="tutor-media-upload-wrap">
|
52 |
-
<input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="">
|
53 |
<div class="tutor-media-preview">
|
54 |
<a href="javascript:;" class="tutor-media-upload-btn"><i class="tutor-icon-image1"></i></a>
|
55 |
</div>
|
@@ -66,19 +66,19 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
66 |
<div class="tutor-quiz-builder-row">
|
67 |
<div class="tutor-quiz-builder-col auto-width">
|
68 |
<label>
|
69 |
-
<input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="text" checked="checked">
|
70 |
<?php _e('Only text', 'tutor'); ?>
|
71 |
</label>
|
72 |
</div>
|
73 |
<div class="tutor-quiz-builder-col auto-width">
|
74 |
<label>
|
75 |
-
<input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="image">
|
76 |
<?php _e('Only Image', 'tutor'); ?>
|
77 |
</label>
|
78 |
</div>
|
79 |
<div class="tutor-quiz-builder-col auto-width">
|
80 |
<label>
|
81 |
-
<input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="text_image">
|
82 |
<?php _e('Text & Image both', 'tutor'); ?>
|
83 |
</label>
|
84 |
</div>
|
@@ -91,7 +91,7 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
91 |
<h4><?php _e('Question Title', 'tutor'); ?></h4>
|
92 |
<div class="tutor-quiz-builder-row">
|
93 |
<div class="tutor-quiz-builder-col">
|
94 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="">
|
95 |
</div>
|
96 |
</div>
|
97 |
<p class="help"><?php _e( 'Please make sure to use the <strong>{dash}</strong> variable in your question title to show the blanks in your question. You can use multiple <strong>{dash}</strong> variables in one question.', 'tutor' ); ?></p>
|
@@ -101,7 +101,7 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
101 |
<h4><?php _e('Correct Answer(s)', 'tutor'); ?></h4>
|
102 |
<div class="tutor-quiz-builder-row">
|
103 |
<div class="tutor-quiz-builder-col">
|
104 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_two_gap_match]" value="">
|
105 |
</div>
|
106 |
</div>
|
107 |
<p class="help"><?php _e( 'Separate multiple answers by a vertical bar <strong>|</strong>. 1 answer per <strong>{dash}</strong> variable is defined in the question. Example: Apple | Banana | Orange', 'tutor' ); ?></p>
|
@@ -115,7 +115,7 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
115 |
<h4><?php _e('Answer title', 'tutor'); ?></h4>
|
116 |
<div class="tutor-quiz-builder-row">
|
117 |
<div class="tutor-quiz-builder-col">
|
118 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="">
|
119 |
</div>
|
120 |
</div>
|
121 |
</div> <!-- /.tutor-quiz-builder-group -->
|
@@ -124,7 +124,7 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
124 |
<h4><?php _e('Matched Answer title', 'tutor'); ?></h4>
|
125 |
<div class="tutor-quiz-builder-row">
|
126 |
<div class="tutor-quiz-builder-col">
|
127 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][matched_answer_title]" value="">
|
128 |
</div>
|
129 |
</div>
|
130 |
<p class="help"></p>
|
@@ -138,7 +138,7 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
138 |
<h4><?php _e('Answer title', 'tutor'); ?></h4>
|
139 |
<div class="tutor-quiz-builder-row">
|
140 |
<div class="tutor-quiz-builder-col">
|
141 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="">
|
142 |
</div>
|
143 |
</div>
|
144 |
<p class="help"></p>
|
@@ -147,7 +147,7 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
147 |
<h4><?php _e('Matched Answer title', 'tutor'); ?></h4>
|
148 |
<div class="tutor-quiz-builder-row">
|
149 |
<div class="tutor-quiz-builder-col">
|
150 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][matched_answer_title]" value="">
|
151 |
</div>
|
152 |
</div>
|
153 |
<p class="help"></p>
|
@@ -158,7 +158,7 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
158 |
<div class="tutor-quiz-builder-row">
|
159 |
<div class="tutor-quiz-builder-col">
|
160 |
<div class="tutor-media-upload-wrap">
|
161 |
-
<input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="">
|
162 |
<div class="tutor-media-preview">
|
163 |
<a href="javascript:;" class="tutor-media-upload-btn"><i class="tutor-icon-image1"></i></a>
|
164 |
</div>
|
@@ -174,19 +174,19 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
174 |
<div class="tutor-quiz-builder-row">
|
175 |
<div class="tutor-quiz-builder-col auto-width">
|
176 |
<label>
|
177 |
-
<input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="text" checked="checked">
|
178 |
<?php _e('Only text', 'tutor'); ?>
|
179 |
</label>
|
180 |
</div>
|
181 |
<div class="tutor-quiz-builder-col auto-width">
|
182 |
<label>
|
183 |
-
<input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="image">
|
184 |
<?php _e('Only Image', 'tutor'); ?>
|
185 |
</label>
|
186 |
</div>
|
187 |
<div class="tutor-quiz-builder-col auto-width">
|
188 |
<label>
|
189 |
-
<input type="radio" name="quiz_answer[<?php echo $question_id; ?>][answer_view_format]" value="text_image">
|
190 |
<?php _e('Text & Image both', 'tutor'); ?>
|
191 |
</label>
|
192 |
</div>
|
@@ -202,7 +202,7 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
202 |
<div class="tutor-quiz-builder-row">
|
203 |
<div class="tutor-quiz-builder-col">
|
204 |
<div class="tutor-media-upload-wrap">
|
205 |
-
<input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="">
|
206 |
<div class="tutor-media-preview">
|
207 |
<a href="javascript:;" class="tutor-media-upload-btn"><i class="tutor-icon-image1"></i></a>
|
208 |
</div>
|
@@ -217,7 +217,7 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
217 |
<h4><?php _e('Image matched text', 'tutor'); ?></h4>
|
218 |
<div class="tutor-quiz-builder-row">
|
219 |
<div class="tutor-quiz-builder-col">
|
220 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="">
|
221 |
</div>
|
222 |
</div>
|
223 |
</div> <!-- /.tutor-quiz-builder-group -->
|
@@ -231,7 +231,7 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
231 |
<div class="tutor-quiz-builder-row">
|
232 |
<div class="tutor-quiz-builder-col">
|
233 |
<div class="tutor-media-upload-wrap">
|
234 |
-
<input type="hidden" name="quiz_answer[<?php echo $question_id; ?>][image_id]" value="">
|
235 |
<div class="tutor-media-preview">
|
236 |
<a href="javascript:;" class="tutor-media-upload-btn"><i class="tutor-icon-image1"></i></a>
|
237 |
</div>
|
@@ -247,7 +247,7 @@ if ($question_type === 'open_ended' || $question_type === 'short_answer'){
|
|
247 |
<h4><?php _e('Answer input value', 'tutor'); ?></h4>
|
248 |
<div class="tutor-quiz-builder-row">
|
249 |
<div class="tutor-quiz-builder-col">
|
250 |
-
<input type="text" name="quiz_answer[<?php echo $question_id; ?>][answer_title]" value="">
|
251 |
</div>
|
252 |
</div>
|
253 |
<p class="help"><?php _e('The answers that students enter should match with this text. Write in <strong>small caps</strong>','tutor'); ?></p>
|
17 |
<div class="tutor-quiz-builder-row">
|
18 |
<div class="tutor-quiz-builder-col auto-width">
|
19 |
<label>
|
20 |
+
<input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][true_false]" value="true" checked="checked">
|
21 |
<?php _e('True', 'tutor'); ?>
|
22 |
</label>
|
23 |
<label>
|
24 |
+
<input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][true_false]" value="false">
|
25 |
<?php _e('False', 'tutor'); ?>
|
26 |
</label>
|
27 |
</div>
|
37 |
<div class="tutor-quiz-builder-row">
|
38 |
<div class="tutor-quiz-builder-col">
|
39 |
<div class="quiz-modal-field-wrap">
|
40 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="">
|
41 |
</div>
|
42 |
</div>
|
43 |
</div>
|
49 |
<div class="tutor-quiz-builder-row">
|
50 |
<div class="tutor-quiz-builder-col">
|
51 |
<div class="tutor-media-upload-wrap">
|
52 |
+
<input type="hidden" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][image_id]" value="">
|
53 |
<div class="tutor-media-preview">
|
54 |
<a href="javascript:;" class="tutor-media-upload-btn"><i class="tutor-icon-image1"></i></a>
|
55 |
</div>
|
66 |
<div class="tutor-quiz-builder-row">
|
67 |
<div class="tutor-quiz-builder-col auto-width">
|
68 |
<label>
|
69 |
+
<input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="text" checked="checked">
|
70 |
<?php _e('Only text', 'tutor'); ?>
|
71 |
</label>
|
72 |
</div>
|
73 |
<div class="tutor-quiz-builder-col auto-width">
|
74 |
<label>
|
75 |
+
<input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="image">
|
76 |
<?php _e('Only Image', 'tutor'); ?>
|
77 |
</label>
|
78 |
</div>
|
79 |
<div class="tutor-quiz-builder-col auto-width">
|
80 |
<label>
|
81 |
+
<input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="text_image">
|
82 |
<?php _e('Text & Image both', 'tutor'); ?>
|
83 |
</label>
|
84 |
</div>
|
91 |
<h4><?php _e('Question Title', 'tutor'); ?></h4>
|
92 |
<div class="tutor-quiz-builder-row">
|
93 |
<div class="tutor-quiz-builder-col">
|
94 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="">
|
95 |
</div>
|
96 |
</div>
|
97 |
<p class="help"><?php _e( 'Please make sure to use the <strong>{dash}</strong> variable in your question title to show the blanks in your question. You can use multiple <strong>{dash}</strong> variables in one question.', 'tutor' ); ?></p>
|
101 |
<h4><?php _e('Correct Answer(s)', 'tutor'); ?></h4>
|
102 |
<div class="tutor-quiz-builder-row">
|
103 |
<div class="tutor-quiz-builder-col">
|
104 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_two_gap_match]" value="">
|
105 |
</div>
|
106 |
</div>
|
107 |
<p class="help"><?php _e( 'Separate multiple answers by a vertical bar <strong>|</strong>. 1 answer per <strong>{dash}</strong> variable is defined in the question. Example: Apple | Banana | Orange', 'tutor' ); ?></p>
|
115 |
<h4><?php _e('Answer title', 'tutor'); ?></h4>
|
116 |
<div class="tutor-quiz-builder-row">
|
117 |
<div class="tutor-quiz-builder-col">
|
118 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="">
|
119 |
</div>
|
120 |
</div>
|
121 |
</div> <!-- /.tutor-quiz-builder-group -->
|
124 |
<h4><?php _e('Matched Answer title', 'tutor'); ?></h4>
|
125 |
<div class="tutor-quiz-builder-row">
|
126 |
<div class="tutor-quiz-builder-col">
|
127 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][matched_answer_title]" value="">
|
128 |
</div>
|
129 |
</div>
|
130 |
<p class="help"></p>
|
138 |
<h4><?php _e('Answer title', 'tutor'); ?></h4>
|
139 |
<div class="tutor-quiz-builder-row">
|
140 |
<div class="tutor-quiz-builder-col">
|
141 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="">
|
142 |
</div>
|
143 |
</div>
|
144 |
<p class="help"></p>
|
147 |
<h4><?php _e('Matched Answer title', 'tutor'); ?></h4>
|
148 |
<div class="tutor-quiz-builder-row">
|
149 |
<div class="tutor-quiz-builder-col">
|
150 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][matched_answer_title]" value="">
|
151 |
</div>
|
152 |
</div>
|
153 |
<p class="help"></p>
|
158 |
<div class="tutor-quiz-builder-row">
|
159 |
<div class="tutor-quiz-builder-col">
|
160 |
<div class="tutor-media-upload-wrap">
|
161 |
+
<input type="hidden" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][image_id]" value="">
|
162 |
<div class="tutor-media-preview">
|
163 |
<a href="javascript:;" class="tutor-media-upload-btn"><i class="tutor-icon-image1"></i></a>
|
164 |
</div>
|
174 |
<div class="tutor-quiz-builder-row">
|
175 |
<div class="tutor-quiz-builder-col auto-width">
|
176 |
<label>
|
177 |
+
<input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="text" checked="checked">
|
178 |
<?php _e('Only text', 'tutor'); ?>
|
179 |
</label>
|
180 |
</div>
|
181 |
<div class="tutor-quiz-builder-col auto-width">
|
182 |
<label>
|
183 |
+
<input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="image">
|
184 |
<?php _e('Only Image', 'tutor'); ?>
|
185 |
</label>
|
186 |
</div>
|
187 |
<div class="tutor-quiz-builder-col auto-width">
|
188 |
<label>
|
189 |
+
<input type="radio" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_view_format]" value="text_image">
|
190 |
<?php _e('Text & Image both', 'tutor'); ?>
|
191 |
</label>
|
192 |
</div>
|
202 |
<div class="tutor-quiz-builder-row">
|
203 |
<div class="tutor-quiz-builder-col">
|
204 |
<div class="tutor-media-upload-wrap">
|
205 |
+
<input type="hidden" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][image_id]" value="">
|
206 |
<div class="tutor-media-preview">
|
207 |
<a href="javascript:;" class="tutor-media-upload-btn"><i class="tutor-icon-image1"></i></a>
|
208 |
</div>
|
217 |
<h4><?php _e('Image matched text', 'tutor'); ?></h4>
|
218 |
<div class="tutor-quiz-builder-row">
|
219 |
<div class="tutor-quiz-builder-col">
|
220 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="">
|
221 |
</div>
|
222 |
</div>
|
223 |
</div> <!-- /.tutor-quiz-builder-group -->
|
231 |
<div class="tutor-quiz-builder-row">
|
232 |
<div class="tutor-quiz-builder-col">
|
233 |
<div class="tutor-media-upload-wrap">
|
234 |
+
<input type="hidden" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][image_id]" value="">
|
235 |
<div class="tutor-media-preview">
|
236 |
<a href="javascript:;" class="tutor-media-upload-btn"><i class="tutor-icon-image1"></i></a>
|
237 |
</div>
|
247 |
<h4><?php _e('Answer input value', 'tutor'); ?></h4>
|
248 |
<div class="tutor-quiz-builder-row">
|
249 |
<div class="tutor-quiz-builder-col">
|
250 |
+
<input type="text" name="quiz_answer[<?php echo esc_attr( $question_id ); ?>][answer_title]" value="">
|
251 |
</div>
|
252 |
</div>
|
253 |
<p class="help"><?php _e('The answers that students enter should match with this text. Write in <strong>small caps</strong>','tutor'); ?></p>
|
views/modal/question_form.php
CHANGED
@@ -7,7 +7,7 @@ $settings = maybe_unserialize($question->question_settings);
|
|
7 |
|
8 |
|
9 |
<div class="question-form-header">
|
10 |
-
<a href="javascript:;" class="back-to-quiz-questions-btn open-tutor-quiz-modal" data-quiz-id="<?php echo $quiz_id; ?>"
|
11 |
data-back-to-tab="#quiz-builder-tab-questions"><i class="tutor-icon-next-2"></i> <?php _e('Back', 'tutor'); ?></a>
|
12 |
</div>
|
13 |
|
@@ -21,7 +21,7 @@ $settings = maybe_unserialize($question->question_settings);
|
|
21 |
<h4><?php _e('Write your question here', 'tutor'); ?></h4>
|
22 |
<div class="tutor-quiz-builder-row">
|
23 |
<div class="tutor-quiz-builder-col">
|
24 |
-
<input type="text" name="tutor_quiz_question[<?php echo $question_id; ?>][question_title]" placeholder="<?php
|
25 |
</div>
|
26 |
</div>
|
27 |
</div>
|
@@ -34,7 +34,7 @@ $settings = maybe_unserialize($question->question_settings);
|
|
34 |
<div class="select-header">
|
35 |
<span class="lead-option"> <i class="tutor-icon-yes-no"></i> <?php _e('True or False', 'tutor'); ?> </span>
|
36 |
<span class="select-dropdown"><i class="tutor-icon-light-down"></i> </span>
|
37 |
-
<input type="hidden" class="tutor_select_value_holder" name="tutor_quiz_question[<?php echo $question_id; ?>][question_type]" value="" >
|
38 |
</div>
|
39 |
|
40 |
<?php $question_types = tutor_utils()->get_question_types(); ?>
|
@@ -45,7 +45,7 @@ $settings = maybe_unserialize($question->question_settings);
|
|
45 |
|
46 |
foreach ($question_types as $type => $question_type){
|
47 |
?>
|
48 |
-
<p class="tutor-select-option" data-value="<?php echo $type; ?>" <?php echo $question->question_type===$type ? ' data-selected="selected"' : ''; ?> data-is-pro="<?php echo (! $has_tutor_pro && $question_type['is_pro']) ? 'true' : 'false' ?>" >
|
49 |
<?php echo $question_type['icon'].' '.$question_type['name']; ?>
|
50 |
|
51 |
<?php
|
@@ -69,14 +69,14 @@ $settings = maybe_unserialize($question->question_settings);
|
|
69 |
<div class="tutor-quiz-builder-row">
|
70 |
<div class="tutor-quiz-builder-col auto-width">
|
71 |
<label class="btn-switch">
|
72 |
-
<input type="checkbox" value="1" name="tutor_quiz_question[<?php echo $question_id; ?>][answer_required]" <?php checked('1', tutor_utils()->avalue_dot('answer_required', $settings)); ?> />
|
73 |
<div class="btn-slider btn-round"></div>
|
74 |
</label>
|
75 |
<span><?php _e('Answer Required', 'tutor'); ?></span>
|
76 |
</div>
|
77 |
<div class="tutor-quiz-builder-col auto-width">
|
78 |
<label class="btn-switch">
|
79 |
-
<input type="checkbox" value="1" name="tutor_quiz_question[<?php echo $question_id; ?>][randomize_question]" <?php checked('1', tutor_utils()->avalue_dot('randomize_question', $settings)); ?> />
|
80 |
<div class="btn-slider btn-round"></div>
|
81 |
</label>
|
82 |
<span><?php _e('Randomize', 'tutor'); ?></span>
|
@@ -88,8 +88,8 @@ $settings = maybe_unserialize($question->question_settings);
|
|
88 |
<h4><?php _e('Point(s) for this answer', 'tutor'); ?></h4>
|
89 |
<div class="tutor-quiz-builder-row">
|
90 |
<div class="tutor-quiz-builder-col">
|
91 |
-
<input type="text" name="tutor_quiz_question[<?php echo $question_id; ?>][question_mark]" placeholder="<?php
|
92 |
-
echo $question->question_mark; ?>">
|
93 |
</div>
|
94 |
</div>
|
95 |
</div>
|
@@ -98,7 +98,7 @@ $settings = maybe_unserialize($question->question_settings);
|
|
98 |
<div class="tutor-quiz-builder-row">
|
99 |
<div class="tutor-quiz-builder-col auto-width">
|
100 |
<label class="btn-switch">
|
101 |
-
<input type="checkbox" value="1" name="tutor_quiz_question[<?php echo $question_id; ?>][show_question_mark]" <?php checked('1', tutor_utils()->avalue_dot('show_question_mark', $settings)); ?> />
|
102 |
<div class="btn-slider btn-round"></div>
|
103 |
</label>
|
104 |
<span><?php _e('Display Points', 'tutor'); ?></span>
|
@@ -110,7 +110,7 @@ $settings = maybe_unserialize($question->question_settings);
|
|
110 |
<h4><?php _e('Description', 'tutor'); ?> <span>(<?php _e('Optional', 'tutor'); ?>)</span></h4>
|
111 |
<div class="tutor-quiz-builder-row">
|
112 |
<div class="tutor-quiz-builder-col">
|
113 |
-
<textarea name="tutor_quiz_question[<?php echo $question_id; ?>][question_description]"><?php echo stripslashes($question->question_description);?></textarea>
|
114 |
</div>
|
115 |
</div>
|
116 |
</div>
|
@@ -131,13 +131,13 @@ $settings = maybe_unserialize($question->question_settings);
|
|
131 |
<div class="tutor-quiz-builder-row">
|
132 |
<div class="tutor-quiz-builder-col">
|
133 |
<div id="tuotr_question_options_for_quiz" class="quiz-modal-field-wrap">
|
134 |
-
<div id="tutor_quiz_question_answers" data-question-id="<?php echo $question_id; ?>"><?php
|
135 |
|
136 |
$answers = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}tutor_quiz_question_answers where belongs_question_id = %d AND belongs_question_type = %s order by answer_order asc ;", $question_id, $question->question_type));
|
137 |
if (is_array($answers) && count($answers)){
|
138 |
foreach ($answers as $answer){
|
139 |
?>
|
140 |
-
<div class="tutor-quiz-answer-wrap" data-answer-id="<?php echo $answer->answer_id; ?>">
|
141 |
<div class="tutor-quiz-answer">
|
142 |
<span class="tutor-quiz-answer-title">
|
143 |
<?php
|
@@ -154,20 +154,20 @@ $settings = maybe_unserialize($question->question_settings);
|
|
154 |
|
155 |
<?php
|
156 |
if ($answer->image_id){
|
157 |
-
echo '<span class="tutor-question-answer-image"><img src="'.wp_get_attachment_image_url($answer->image_id).'" /> </span>';
|
158 |
}
|
159 |
if ($question->question_type === 'true_false' || $question->question_type === 'single_choice'){
|
160 |
?>
|
161 |
<span class="tutor-quiz-answers-mark-correct-wrap">
|
162 |
-
<input type="radio" name="mark_as_correct[<?php echo $answer->belongs_question_id; ?>]"
|
163 |
-
value="<?php echo $answer->answer_id; ?>" title="<?php
|
164 |
</span>
|
165 |
<?php
|
166 |
}elseif ($question->question_type === 'multiple_choice'){
|
167 |
?>
|
168 |
<span class="tutor-quiz-answers-mark-correct-wrap">
|
169 |
-
<input type="checkbox" name="mark_as_correct[<?php echo $answer->belongs_question_id; ?>]"
|
170 |
-
value="<?php echo $answer->answer_id; ?>" title="<?php
|
171 |
</span>
|
172 |
<?php
|
173 |
}
|
@@ -182,7 +182,7 @@ $settings = maybe_unserialize($question->question_settings);
|
|
182 |
|
183 |
<?php if ( $question->question_type !== 'true_false' ){ ?>
|
184 |
<div class="tutor-quiz-answer-trash-wrap">
|
185 |
-
<a href="javascript:;" class="answer-trash-btn" data-answer-id="<?php echo $answer->answer_id; ?>"><i class="tutor-icon-garbage"></i> </a>
|
186 |
</div>
|
187 |
<?php } ?>
|
188 |
</div>
|
@@ -194,7 +194,7 @@ $settings = maybe_unserialize($question->question_settings);
|
|
194 |
|
195 |
<div id="tutor_quiz_question_answer_form"></div>
|
196 |
|
197 |
-
<a href="javascript:;" class="add_question_answers_option" data-question-id="<?php echo $question_id; ?>">
|
198 |
<i class="tutor-icon-block tutor-icon-plus"></i>
|
199 |
<?php _e('Add An Option', 'tutor'); ?>
|
200 |
</a>
|
7 |
|
8 |
|
9 |
<div class="question-form-header">
|
10 |
+
<a href="javascript:;" class="back-to-quiz-questions-btn open-tutor-quiz-modal" data-quiz-id="<?php echo esc_attr( $quiz_id ); ?>"
|
11 |
data-back-to-tab="#quiz-builder-tab-questions"><i class="tutor-icon-next-2"></i> <?php _e('Back', 'tutor'); ?></a>
|
12 |
</div>
|
13 |
|
21 |
<h4><?php _e('Write your question here', 'tutor'); ?></h4>
|
22 |
<div class="tutor-quiz-builder-row">
|
23 |
<div class="tutor-quiz-builder-col">
|
24 |
+
<input type="text" name="tutor_quiz_question[<?php echo esc_attr( $question_id ); ?>][question_title]" placeholder="<?php esc_attr_e('Type your question here', 'tutor'); ?>" value="<?php echo htmlspecialchars( stripslashes($question->question_title) ); ?>">
|
25 |
</div>
|
26 |
</div>
|
27 |
</div>
|
34 |
<div class="select-header">
|
35 |
<span class="lead-option"> <i class="tutor-icon-yes-no"></i> <?php _e('True or False', 'tutor'); ?> </span>
|
36 |
<span class="select-dropdown"><i class="tutor-icon-light-down"></i> </span>
|
37 |
+
<input type="hidden" class="tutor_select_value_holder" name="tutor_quiz_question[<?php echo esc_attr( $question_id ); ?>][question_type]" value="" >
|
38 |
</div>
|
39 |
|
40 |
<?php $question_types = tutor_utils()->get_question_types(); ?>
|
45 |
|
46 |
foreach ($question_types as $type => $question_type){
|
47 |
?>
|
48 |
+
<p class="tutor-select-option" data-value="<?php echo esc_attr( $type ); ?>" <?php echo $question->question_type===$type ? ' data-selected="selected"' : ''; ?> data-is-pro="<?php echo (! $has_tutor_pro && $question_type['is_pro']) ? 'true' : 'false' ?>" >
|
49 |
<?php echo $question_type['icon'].' '.$question_type['name']; ?>
|
50 |
|
51 |
<?php
|
69 |
<div class="tutor-quiz-builder-row">
|
70 |
<div class="tutor-quiz-builder-col auto-width">
|
71 |
<label class="btn-switch">
|
72 |
+
<input type="checkbox" value="1" name="tutor_quiz_question[<?php echo esc_attr( $question_id ); ?>][answer_required]" <?php checked('1', tutor_utils()->avalue_dot('answer_required', $settings)); ?> />
|
73 |
<div class="btn-slider btn-round"></div>
|
74 |
</label>
|
75 |
<span><?php _e('Answer Required', 'tutor'); ?></span>
|
76 |
</div>
|
77 |
<div class="tutor-quiz-builder-col auto-width">
|
78 |
<label class="btn-switch">
|
79 |
+
<input type="checkbox" value="1" name="tutor_quiz_question[<?php echo esc_attr( $question_id ); ?>][randomize_question]" <?php checked('1', tutor_utils()->avalue_dot('randomize_question', $settings)); ?> />
|
80 |
<div class="btn-slider btn-round"></div>
|
81 |
</label>
|
82 |
<span><?php _e('Randomize', 'tutor'); ?></span>
|
88 |
<h4><?php _e('Point(s) for this answer', 'tutor'); ?></h4>
|
89 |
<div class="tutor-quiz-builder-row">
|
90 |
<div class="tutor-quiz-builder-col">
|
91 |
+
<input type="text" name="tutor_quiz_question[<?php echo esc_attr( $question_id ); ?>][question_mark]" placeholder="<?php esc_attr_e('set the mark ex. 10', 'tutor'); ?>" value="<?php
|
92 |
+
echo esc_attr( $question->question_mark ); ?>">
|
93 |
</div>
|
94 |
</div>
|
95 |
</div>
|
98 |
<div class="tutor-quiz-builder-row">
|
99 |
<div class="tutor-quiz-builder-col auto-width">
|
100 |
<label class="btn-switch">
|
101 |
+
<input type="checkbox" value="1" name="tutor_quiz_question[<?php echo esc_attr( $question_id ); ?>][show_question_mark]" <?php checked('1', tutor_utils()->avalue_dot('show_question_mark', $settings)); ?> />
|
102 |
<div class="btn-slider btn-round"></div>
|
103 |
</label>
|
104 |
<span><?php _e('Display Points', 'tutor'); ?></span>
|
110 |
<h4><?php _e('Description', 'tutor'); ?> <span>(<?php _e('Optional', 'tutor'); ?>)</span></h4>
|
111 |
<div class="tutor-quiz-builder-row">
|
112 |
<div class="tutor-quiz-builder-col">
|
113 |
+
<textarea name="tutor_quiz_question[<?php echo esc_attr( $question_id ); ?>][question_description]"><?php echo stripslashes($question->question_description);?></textarea>
|
114 |
</div>
|
115 |
</div>
|
116 |
</div>
|
131 |
<div class="tutor-quiz-builder-row">
|
132 |
<div class="tutor-quiz-builder-col">
|
133 |
<div id="tuotr_question_options_for_quiz" class="quiz-modal-field-wrap">
|
134 |
+
<div id="tutor_quiz_question_answers" data-question-id="<?php echo esc_attr( $question_id ); ?>"><?php
|
135 |
|
136 |
$answers = $wpdb->get_results($wpdb->prepare("SELECT * FROM {$wpdb->prefix}tutor_quiz_question_answers where belongs_question_id = %d AND belongs_question_type = %s order by answer_order asc ;", $question_id, $question->question_type));
|
137 |
if (is_array($answers) && count($answers)){
|
138 |
foreach ($answers as $answer){
|
139 |
?>
|
140 |
+
<div class="tutor-quiz-answer-wrap" data-answer-id="<?php echo esc_attr( $answer->answer_id ); ?>">
|
141 |
<div class="tutor-quiz-answer">
|
142 |
<span class="tutor-quiz-answer-title">
|
143 |
<?php
|
154 |
|
155 |
<?php
|
156 |
if ($answer->image_id){
|
157 |
+
echo '<span class="tutor-question-answer-image"><img src="'. esc_url( wp_get_attachment_image_url( $answer->image_id ) ) .'" /> </span>';
|
158 |
}
|
159 |
if ($question->question_type === 'true_false' || $question->question_type === 'single_choice'){
|
160 |
?>
|
161 |
<span class="tutor-quiz-answers-mark-correct-wrap">
|
162 |
+
<input type="radio" name="mark_as_correct[<?php echo esc_attr( $answer->belongs_question_id ); ?>]"
|
163 |
+
value="<?php echo esc_attr( $answer->answer_id ); ?>" title="<?php esc_attr_e('Mark as correct', 'tutor'); ?>" <?php checked(1, $answer->is_correct); ?> >
|
164 |
</span>
|
165 |
<?php
|
166 |
}elseif ($question->question_type === 'multiple_choice'){
|
167 |
?>
|
168 |
<span class="tutor-quiz-answers-mark-correct-wrap">
|
169 |
+
<input type="checkbox" name="mark_as_correct[<?php echo esc_attr( $answer->belongs_question_id ); ?>]"
|
170 |
+
value="<?php echo esc_attr( $answer->answer_id ); ?>" title="<?php esc_attr_e('Mark as correct', 'tutor'); ?>" <?php checked(1, $answer->is_correct); ?> >
|
171 |
</span>
|
172 |
<?php
|
173 |
}
|
182 |
|
183 |
<?php if ( $question->question_type !== 'true_false' ){ ?>
|
184 |
<div class="tutor-quiz-answer-trash-wrap">
|
185 |
+
<a href="javascript:;" class="answer-trash-btn" data-answer-id="<?php echo esc_attr( $answer->answer_id ); ?>"><i class="tutor-icon-garbage"></i> </a>
|
186 |
</div>
|
187 |
<?php } ?>
|
188 |
</div>
|
194 |
|
195 |
<div id="tutor_quiz_question_answer_form"></div>
|
196 |
|
197 |
+
<a href="javascript:;" class="add_question_answers_option" data-question-id="<?php echo esc_attr( $question_id ); ?>">
|
198 |
<i class="tutor-icon-block tutor-icon-plus"></i>
|
199 |
<?php _e('Add An Option', 'tutor'); ?>
|
200 |
</a>
|
views/modal/review.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<form class="tutor-component-popup-container tutor-course-review-popup-form">
|
2 |
-
<input type="hidden" name="tutor_course_id" value="<?php echo $course_id; ?>">
|
3 |
<div class="tutor-component-popup-40">
|
4 |
<div class="tutor-component-content-container tutor-star-rating-container">
|
5 |
<h3><?php _e('How would you rate this course?', 'tutor'); ?></h3>
|
@@ -11,7 +11,7 @@
|
|
11 |
?>
|
12 |
</div>
|
13 |
<div class="tutor-form-group">
|
14 |
-
<textarea name="review" placeholder="<?php
|
15 |
</div>
|
16 |
|
17 |
<div class="tutor-component-button-container">
|
1 |
<form class="tutor-component-popup-container tutor-course-review-popup-form">
|
2 |
+
<input type="hidden" name="tutor_course_id" value="<?php echo esc_attr( $course_id ); ?>">
|
3 |
<div class="tutor-component-popup-40">
|
4 |
<div class="tutor-component-content-container tutor-star-rating-container">
|
5 |
<h3><?php _e('How would you rate this course?', 'tutor'); ?></h3>
|
11 |
?>
|
12 |
</div>
|
13 |
<div class="tutor-form-group">
|
14 |
+
<textarea name="review" placeholder="<?php esc_attr_e('Tell us about your own personal experience taking this course. Was it a good match for you?', 'tutor'); ?>"></textarea>
|
15 |
</div>
|
16 |
|
17 |
<div class="tutor-component-button-container">
|
views/pages/add_new_instructor.php
CHANGED
@@ -32,7 +32,7 @@
|
|
32 |
</label>
|
33 |
</div>
|
34 |
<div class="tutor-option-field">
|
35 |
-
<input type="text" name="first_name" value="<?php
|
36 |
</div>
|
37 |
</div>
|
38 |
|
@@ -46,7 +46,7 @@
|
|
46 |
</div>
|
47 |
|
48 |
<div class="tutor-option-field">
|
49 |
-
<input type="text" name="last_name" value="<?php
|
50 |
</div>
|
51 |
</div>
|
52 |
|
@@ -59,7 +59,7 @@
|
|
59 |
</div>
|
60 |
|
61 |
<div class="tutor-option-field">
|
62 |
-
<input type="text" name="user_login" class="tutor_user_name" value="<?php
|
63 |
</div>
|
64 |
</div>
|
65 |
|
@@ -72,7 +72,7 @@
|
|
72 |
</div>
|
73 |
|
74 |
<div class="tutor-option-field">
|
75 |
-
<input type="text" name="email" value="<?php
|
76 |
</div>
|
77 |
</div>
|
78 |
|
@@ -85,7 +85,7 @@
|
|
85 |
</div>
|
86 |
|
87 |
<div class="tutor-option-field">
|
88 |
-
<input type="text" name="phone_number" value="<?php
|
89 |
</div>
|
90 |
</div>
|
91 |
|
@@ -98,7 +98,7 @@
|
|
98 |
</div>
|
99 |
|
100 |
<div class="tutor-option-field">
|
101 |
-
<input type="password" name="password" value="<?php
|
102 |
</div>
|
103 |
</div>
|
104 |
|
@@ -111,7 +111,7 @@
|
|
111 |
</div>
|
112 |
|
113 |
<div class="tutor-option-field">
|
114 |
-
<input type="password" name="password_confirmation" value="<?php
|
115 |
</div>
|
116 |
</div>
|
117 |
|
32 |
</label>
|
33 |
</div>
|
34 |
<div class="tutor-option-field">
|
35 |
+
<input type="text" name="first_name" value="<?php echo esc_attr( tutor_utils()->input_old('first_name') ); ?>" placeholder="<?php esc_attr_e('First Name', 'tutor'); ?>">
|
36 |
</div>
|
37 |
</div>
|
38 |
|
46 |
</div>
|
47 |
|
48 |
<div class="tutor-option-field">
|
49 |
+
<input type="text" name="last_name" value="<?php echo esc_attr( tutor_utils()->input_old('last_name') ); ?>" placeholder="<?php esc_attr_e('Last Name', 'tutor'); ?>">
|
50 |
</div>
|
51 |
</div>
|
52 |
|
59 |
</div>
|
60 |
|
61 |
<div class="tutor-option-field">
|
62 |
+
<input type="text" name="user_login" class="tutor_user_name" value="<?php echo esc_attr( tutor_utils()->input_old('user_login') ); ?>" placeholder="<?php esc_attr_e('User Name', 'tutor'); ?>">
|
63 |
</div>
|
64 |
</div>
|
65 |
|
72 |
</div>
|
73 |
|
74 |
<div class="tutor-option-field">
|
75 |
+
<input type="text" name="email" value="<?php echo esc_attr( tutor_utils()->input_old('email') ); ?>" placeholder="<?php esc_attr_e('E-Mail', 'tutor'); ?>">
|
76 |
</div>
|
77 |
</div>
|
78 |
|
85 |
</div>
|
86 |
|
87 |
<div class="tutor-option-field">
|
88 |
+
<input type="text" name="phone_number" value="<?php echo esc_attr( tutor_utils()->input_old('phone_number') ); ?>" placeholder="<?php esc_attr_e('Phone Number', 'tutor'); ?>">
|
89 |
</div>
|
90 |
</div>
|
91 |
|
98 |
</div>
|
99 |
|
100 |
<div class="tutor-option-field">
|
101 |
+
<input type="password" name="password" value="<?php echo esc_attr( tutor_utils()->input_old('password') ); ?>" placeholder="<?php esc_attr_e('Password', 'tutor'); ?>">
|
102 |
</div>
|
103 |
</div>
|
104 |
|
111 |
</div>
|
112 |
|
113 |
<div class="tutor-option-field">
|
114 |
+
<input type="password" name="password_confirmation" value="<?php echo esc_attr( tutor_utils()->input_old('password_confirmation') ); ?>" placeholder="<?php esc_attr_e('Password Confirmation', 'tutor'); ?>">
|
115 |
</div>
|
116 |
</div>
|
117 |
|
views/pages/announcements.php
CHANGED
@@ -50,13 +50,13 @@ $the_query = new WP_Query($args);
|
|
50 |
<div>
|
51 |
<div class="menu-label"><?php _e('Search', 'tutor'); ?></div>
|
52 |
<div>
|
53 |
-
<input type="text" class="tutor-report-search tutor-announcement-search-field" value="<?php echo $search_filter; ?>" autocomplete="off" placeholder="<?php
|
54 |
<button class="tutor-report-search-btn tutor-announcement-search-sorting"><i class="tutor-icon-magnifying-glass-1"></i></button>
|
55 |
</div>
|
56 |
</div>
|
57 |
|
58 |
<div>
|
59 |
-
<div class="menu-label"><?php
|
60 |
<div>
|
61 |
<?php
|
62 |
//get courses
|
@@ -65,7 +65,7 @@ $the_query = new WP_Query($args);
|
|
65 |
|
66 |
<select class="tutor-report-category tutor-announcement-course-sorting">
|
67 |
|
68 |
-
<option value=""><?php
|
69 |
|
70 |
<?php if ($courses) : ?>
|
71 |
<?php foreach ($courses as $course) : ?>
|
@@ -74,14 +74,14 @@ $the_query = new WP_Query($args);
|
|
74 |
</option>
|
75 |
<?php endforeach; ?>
|
76 |
<?php else : ?>
|
77 |
-
<option value=""><?php
|
78 |
<?php endif; ?>
|
79 |
</select>
|
80 |
</div>
|
81 |
</div>
|
82 |
|
83 |
<div>
|
84 |
-
<div class="menu-label"><?php
|
85 |
<div>
|
86 |
<select class="tutor-report-sort tutor-announcement-order-sorting">
|
87 |
<option <?php selected($order_filter, 'ASC'); ?>>ASC</option>
|
@@ -199,8 +199,8 @@ $the_query = new WP_Query($args);
|
|
199 |
<?php if ($courses) : ?>
|
200 |
<?php foreach ($courses as $course) : ?>
|
201 |
|
202 |
-
<option value="<?php echo esc_attr($course->ID) ?>">
|
203 |
-
<?php echo $course->post_title; ?>
|
204 |
</option>
|
205 |
<?php endforeach; ?>
|
206 |
<?php else : ?>
|
@@ -217,7 +217,7 @@ $the_query = new WP_Query($args);
|
|
217 |
</label>
|
218 |
|
219 |
<div class="tutor-announcement-form-control">
|
220 |
-
<input type="text" name="tutor_announcement_title" value="" placeholder="<?php
|
221 |
</div>
|
222 |
</div>
|
223 |
|
@@ -227,7 +227,7 @@ $the_query = new WP_Query($args);
|
|
227 |
</label>
|
228 |
|
229 |
<div class="tutor-announcement-form-control">
|
230 |
-
<textarea rows="6" type="text" name="tutor_announcement_summary" value="" placeholder="<?php
|
231 |
</div>
|
232 |
</div>
|
233 |
|
@@ -281,8 +281,8 @@ $the_query = new WP_Query($args);
|
|
281 |
<?php if ($courses) : ?>
|
282 |
<?php foreach ($courses as $course) : ?>
|
283 |
|
284 |
-
<option value="<?php echo esc_attr($course->ID) ?>">
|
285 |
-
<?php echo $course->post_title; ?>
|
286 |
</option>
|
287 |
<?php endforeach; ?>
|
288 |
<?php else : ?>
|
@@ -299,7 +299,7 @@ $the_query = new WP_Query($args);
|
|
299 |
</label>
|
300 |
|
301 |
<div class="tutor-announcement-form-control">
|
302 |
-
<input type="text" name="tutor_announcement_title" id="tutor-announcement-title" value="" placeholder="<?php
|
303 |
</div>
|
304 |
</div>
|
305 |
|
@@ -309,7 +309,7 @@ $the_query = new WP_Query($args);
|
|
309 |
</label>
|
310 |
|
311 |
<div class="tutor-announcement-form-control">
|
312 |
-
<textarea rows="6" type="text" id="tutor-announcement-summary" name="tutor_announcement_summary" value="" placeholder="<?php
|
313 |
</div>
|
314 |
</div>
|
315 |
|
50 |
<div>
|
51 |
<div class="menu-label"><?php _e('Search', 'tutor'); ?></div>
|
52 |
<div>
|
53 |
+
<input type="text" class="tutor-report-search tutor-announcement-search-field" value="<?php echo esc_attr( $search_filter ); ?>" autocomplete="off" placeholder="<?php esc_attr_e('Search Announcements', 'tutor'); ?>" />
|
54 |
<button class="tutor-report-search-btn tutor-announcement-search-sorting"><i class="tutor-icon-magnifying-glass-1"></i></button>
|
55 |
</div>
|
56 |
</div>
|
57 |
|
58 |
<div>
|
59 |
+
<div class="menu-label"><?php esc_html_e('Courses', 'tutor'); ?></div>
|
60 |
<div>
|
61 |
<?php
|
62 |
//get courses
|
65 |
|
66 |
<select class="tutor-report-category tutor-announcement-course-sorting">
|
67 |
|
68 |
+
<option value=""><?php esc_html_e('All', 'tutor'); ?></option>
|
69 |
|
70 |
<?php if ($courses) : ?>
|
71 |
<?php foreach ($courses as $course) : ?>
|
74 |
</option>
|
75 |
<?php endforeach; ?>
|
76 |
<?php else : ?>
|
77 |
+
<option value=""><?php esc_html_e('No course found', 'tutor'); ?></option>
|
78 |
<?php endif; ?>
|
79 |
</select>
|
80 |
</div>
|
81 |
</div>
|
82 |
|
83 |
<div>
|
84 |
+
<div class="menu-label"><?php esc_html_e('Sort By', 'tutor'); ?></div>
|
85 |
<div>
|
86 |
<select class="tutor-report-sort tutor-announcement-order-sorting">
|
87 |
<option <?php selected($order_filter, 'ASC'); ?>>ASC</option>
|
199 |
<?php if ($courses) : ?>
|
200 |
<?php foreach ($courses as $course) : ?>
|
201 |
|
202 |
+
<option value="<?php echo esc_attr( $course->ID ) ?>">
|
203 |
+
<?php echo esc_html( $course->post_title ); ?>
|
204 |
</option>
|
205 |
<?php endforeach; ?>
|
206 |
<?php else : ?>
|
217 |
</label>
|
218 |
|
219 |
<div class="tutor-announcement-form-control">
|
220 |
+
<input type="text" name="tutor_announcement_title" value="" placeholder="<?php esc_attr_e('Announcement title', 'tutor'); ?>" required>
|
221 |
</div>
|
222 |
</div>
|
223 |
|
227 |
</label>
|
228 |
|
229 |
<div class="tutor-announcement-form-control">
|
230 |
+
<textarea rows="6" type="text" name="tutor_announcement_summary" value="" placeholder="<?php esc_attr_e('Summary...', 'tutor'); ?>" required></textarea>
|
231 |
</div>
|
232 |
</div>
|
233 |
|
281 |
<?php if ($courses) : ?>
|
282 |
<?php foreach ($courses as $course) : ?>
|
283 |
|
284 |
+
<option value="<?php echo esc_attr( $course->ID ) ?>">
|
285 |
+
<?php echo esc_html( $course->post_title ); ?>
|
286 |
</option>
|
287 |
<?php endforeach; ?>
|
288 |
<?php else : ?>
|
299 |
</label>
|
300 |
|
301 |
<div class="tutor-announcement-form-control">
|
302 |
+
<input type="text" name="tutor_announcement_title" id="tutor-announcement-title" value="" placeholder="<?php esc_attr_e('Announcement title', 'tutor'); ?>" required>
|
303 |
</div>
|
304 |
</div>
|
305 |
|
309 |
</label>
|
310 |
|
311 |
<div class="tutor-announcement-form-control">
|
312 |
+
<textarea rows="6" type="text" id="tutor-announcement-summary" name="tutor_announcement_summary" value="" placeholder="<?php esc_attr_e('Summary...', 'tutor'); ?>" required></textarea>
|
313 |
</div>
|
314 |
</div>
|
315 |
|
views/pages/answer.php
CHANGED
@@ -14,7 +14,7 @@ $question = tutor_utils()->get_qa_question($question_id);
|
|
14 |
<form action="<?php echo admin_url('admin-post.php') ?>" id="tutor_admin_answer_form" method="post">
|
15 |
<?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?>
|
16 |
<input type="hidden" value="tutor_place_answer" name="action"/>
|
17 |
-
<input type="hidden" value="<?php echo $question_id; ?>" name="question_id"/>
|
18 |
|
19 |
<div class="tutor-option-field-row">
|
20 |
<div class="tutor-option-field">
|
14 |
<form action="<?php echo admin_url('admin-post.php') ?>" id="tutor_admin_answer_form" method="post">
|
15 |
<?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?>
|
16 |
<input type="hidden" value="tutor_place_answer" name="action"/>
|
17 |
+
<input type="hidden" value="<?php echo esc_attr( $question_id ); ?>" name="question_id"/>
|
18 |
|
19 |
<div class="tutor-option-field-row">
|
20 |
<div class="tutor-option-field">
|
views/pages/instructors.php
CHANGED
@@ -15,23 +15,23 @@ if ( is_string( $sub_page ) && in_array($sub_page, $allowed_sub_pages)){
|
|
15 |
*
|
16 |
* @since 1.9.7
|
17 |
*/
|
18 |
-
$search_filter = isset( $_GET['search'] ) ? $_GET['search'] : '';
|
19 |
-
$course_filter = isset( $_GET['course-id'] ) ? $_GET['course-id'] : '';
|
20 |
-
$date_filter = isset( $_GET['date'] ) ? $_GET['date'] : '';
|
21 |
-
$order_filter = isset( $_GET['order'] ) ? $_GET['order'] : "ASC";
|
22 |
|
23 |
$instructorList = new \TUTOR\Instructors_List();
|
24 |
-
$instructorList->prepare_items($search_filter, $course_filter, $date_filter,$order_filter);
|
25 |
?>
|
26 |
|
27 |
|
28 |
<div class="wrap">
|
29 |
-
<h1 class="wp-heading-inline"><?php
|
30 |
<?php
|
31 |
-
if(get_option( 'users_can_register', false ) && current_user_can( 'manage_options' )) {
|
32 |
?>
|
33 |
-
<a href="<?php echo add_query_arg(array('sub_page' => 'add_new_instructor')); ?>" class="page-title-action">
|
34 |
-
<i class="tutor-icon-plus"></i> <?php
|
35 |
</a>
|
36 |
<?php
|
37 |
}
|
@@ -39,10 +39,10 @@ $instructorList->prepare_items($search_filter, $course_filter, $date_filter,$ord
|
|
39 |
<hr class="wp-header-end">
|
40 |
|
41 |
<form id="students-filter" method="get">
|
42 |
-
<input type="hidden" name="page" value="<?php echo \TUTOR\Instructors_List::INSTRUCTOR_LIST_PAGE; ?>" />
|
43 |
<?php
|
44 |
//$instructorList->search_box(__('Search', 'tutor'), 'instructors');
|
45 |
-
$instructorList->display($enable_sorting_field_with_bulk_action = true);
|
46 |
?>
|
47 |
</form>
|
48 |
</div>
|
15 |
*
|
16 |
* @since 1.9.7
|
17 |
*/
|
18 |
+
$search_filter = isset( $_GET['search'] ) ? sanitize_text_field( $_GET['search'] ) : '';
|
19 |
+
$course_filter = isset( $_GET['course-id'] ) ? sanitize_text_field( $_GET['course-id'] ) : '';
|
20 |
+
$date_filter = isset( $_GET['date'] ) ? sanitize_text_field( $_GET['date'] ) : '';
|
21 |
+
$order_filter = isset( $_GET['order'] ) ? sanitize_text_field( $_GET['order'] ) : "ASC";
|
22 |
|
23 |
$instructorList = new \TUTOR\Instructors_List();
|
24 |
+
$instructorList->prepare_items( $search_filter, $course_filter, $date_filter,$order_filter );
|
25 |
?>
|
26 |
|
27 |
|
28 |
<div class="wrap">
|
29 |
+
<h1 class="wp-heading-inline"><?php esc_html_e( 'Instructors', 'tutor' ); ?></h1>
|
30 |
<?php
|
31 |
+
if ( get_option( 'users_can_register', false ) && current_user_can( 'manage_options' ) ) {
|
32 |
?>
|
33 |
+
<a href="<?php echo add_query_arg( array( 'sub_page' => 'add_new_instructor' ) ); ?>" class="page-title-action">
|
34 |
+
<i class="tutor-icon-plus"></i> <?php esc_html_e( 'Add New Instructor', 'tutor' ); ?>
|
35 |
</a>
|
36 |
<?php
|
37 |
}
|
39 |
<hr class="wp-header-end">
|
40 |
|
41 |
<form id="students-filter" method="get">
|
42 |
+
<input type="hidden" name="page" value="<?php echo esc_attr( \TUTOR\Instructors_List::INSTRUCTOR_LIST_PAGE ); ?>" />
|
43 |
<?php
|
44 |
//$instructorList->search_box(__('Search', 'tutor'), 'instructors');
|
45 |
+
$instructorList->display( $enable_sorting_field_with_bulk_action = true );
|
46 |
?>
|
47 |
</form>
|
48 |
</div>
|
views/pages/question_answer.php
CHANGED
@@ -18,7 +18,7 @@ $instructorList->prepare_items();
|
|
18 |
<h2><?php _e('Question & Answer', 'tutor'); ?></h2>
|
19 |
|
20 |
<form id="question_answers-filter" method="get">
|
21 |
-
<input type="hidden" name="page" value="<?php echo \TUTOR\Question_Answers_List::Question_Answer_PAGE; ?>" />
|
22 |
<?php
|
23 |
$instructorList->search_box(__('Search', 'tutor'), 'question_answers');
|
24 |
$instructorList->display(); ?>
|
18 |
<h2><?php _e('Question & Answer', 'tutor'); ?></h2>
|
19 |
|
20 |
<form id="question_answers-filter" method="get">
|
21 |
+
<input type="hidden" name="page" value="<?php echo esc_attr( \TUTOR\Question_Answers_List::Question_Answer_PAGE ); ?>" />
|
22 |
<?php
|
23 |
$instructorList->search_box(__('Search', 'tutor'), 'question_answers');
|
24 |
$instructorList->display(); ?>
|
views/pages/quiz_attempts.php
CHANGED
@@ -30,7 +30,7 @@ $quiz_attempt->prepare_items( $search_filter, $course_filter, $date_filter, $ord
|
|
30 |
</div>
|
31 |
|
32 |
<form id="quiz_attempts-filter" method="get">
|
33 |
-
<input type="hidden" name="page" value="<?php echo \TUTOR\Quiz_Attempts_List::QUIZ_ATTEMPT_PAGE; ?>" />
|
34 |
<?php $quiz_attempt->display($enable_sorting_field_with_bulk_action = true); ?>
|
35 |
</form>
|
36 |
</div>
|
30 |
</div>
|
31 |
|
32 |
<form id="quiz_attempts-filter" method="get">
|
33 |
+
<input type="hidden" name="page" value="<?php echo esc_attr( \TUTOR\Quiz_Attempts_List::QUIZ_ATTEMPT_PAGE ); ?>" />
|
34 |
<?php $quiz_attempt->display($enable_sorting_field_with_bulk_action = true); ?>
|
35 |
</form>
|
36 |
</div>
|
views/pages/students.php
CHANGED
@@ -5,12 +5,12 @@ $studentList->prepare_items();
|
|
5 |
|
6 |
|
7 |
<div class="wrap">
|
8 |
-
<h2><?php
|
9 |
|
10 |
<form id="students-filter" method="get">
|
11 |
-
<input type="hidden" name="page" value="<?php echo \Tutor\Students_List::STUDENTS_LIST_PAGE; ?>" />
|
12 |
<?php
|
13 |
-
$studentList->search_box(__('Search', 'tutor'), 'students');
|
14 |
$studentList->display(); ?>
|
15 |
</form>
|
16 |
</div>
|
5 |
|
6 |
|
7 |
<div class="wrap">
|
8 |
+
<h2><?php esc_html_e( 'Students', 'tutor' ); ?></h2>
|
9 |
|
10 |
<form id="students-filter" method="get">
|
11 |
+
<input type="hidden" name="page" value="<?php echo esc_attr( \Tutor\Students_List::STUDENTS_LIST_PAGE ); ?>" />
|
12 |
<?php
|
13 |
+
$studentList->search_box( __( 'Search', 'tutor' ), 'students' );
|
14 |
$studentList->display(); ?>
|
15 |
</form>
|
16 |
</div>
|
views/pages/view_attempt.php
CHANGED
@@ -29,7 +29,7 @@ $user = get_userdata($user_id);
|
|
29 |
</div>
|
30 |
<div class="attempt-info-content">
|
31 |
<h5><?php echo __('Student Name', 'tutor'); ?></h5>
|
32 |
-
<h4><?php echo $user->display_name; ?></h4>
|
33 |
</div>
|
34 |
</div>
|
35 |
</div>
|
@@ -39,7 +39,7 @@ $user = get_userdata($user_id);
|
|
39 |
<h5><?php echo __('Quiz', 'tutor'); ?></h5>
|
40 |
<h4>
|
41 |
<?php
|
42 |
-
echo "<a href='" .admin_url("post.php?post={$attempt->quiz_id}&action=edit")."'>".get_the_title($attempt->quiz_id)."</a>";
|
43 |
?>
|
44 |
</h4>
|
45 |
</div>
|
@@ -75,7 +75,7 @@ $user = get_userdata($user_id);
|
|
75 |
<?php
|
76 |
$quiz = tutor_utils()->get_course_by_quiz($attempt->quiz_id);
|
77 |
if ($quiz) {
|
78 |
-
echo "<a href='".admin_url( "post.php?post={$quiz->ID}&action=edit" ) . "'>". get_the_title( $quiz->ID )."</a>";
|
79 |
}
|
80 |
?>
|
81 |
</h4>
|
29 |
</div>
|
30 |
<div class="attempt-info-content">
|
31 |
<h5><?php echo __('Student Name', 'tutor'); ?></h5>
|
32 |
+
<h4><?php echo esc_html( $user->display_name ); ?></h4>
|
33 |
</div>
|
34 |
</div>
|
35 |
</div>
|
39 |
<h5><?php echo __('Quiz', 'tutor'); ?></h5>
|
40 |
<h4>
|
41 |
<?php
|
42 |
+
echo "<a href='" .esc_url( admin_url("post.php?post={$attempt->quiz_id}&action=edit") )."'>".get_the_title($attempt->quiz_id)."</a>";
|
43 |
?>
|
44 |
</h4>
|
45 |
</div>
|
75 |
<?php
|
76 |
$quiz = tutor_utils()->get_course_by_quiz($attempt->quiz_id);
|
77 |
if ($quiz) {
|
78 |
+
echo "<a href='".esc_url( admin_url( "post.php?post={$quiz->ID}&action=edit" ) ) . "'>". get_the_title( $quiz->ID )."</a>";
|
79 |
}
|
80 |
?>
|
81 |
</h4>
|
views/pages/withdraw_requests.php
CHANGED
@@ -8,7 +8,7 @@ $withdrawList->prepare_items();
|
|
8 |
<h2><?php _e('Withdraw Requests', 'tutor'); ?></h2>
|
9 |
|
10 |
<form id="withdrawals-filter" method="get">
|
11 |
-
<input type="hidden" name="page" value="<?php echo \TUTOR\Withdraw_Requests_List::WITHDRAW_REQUEST_LIST_PAGE; ?>" />
|
12 |
<?php
|
13 |
$withdrawList->search_box(__('Search', 'tutor'), 'withdrawals');
|
14 |
$withdrawList->display(); ?>
|
8 |
<h2><?php _e('Withdraw Requests', 'tutor'); ?></h2>
|
9 |
|
10 |
<form id="withdrawals-filter" method="get">
|
11 |
+
<input type="hidden" name="page" value="<?php echo esc_attr( \TUTOR\Withdraw_Requests_List::WITHDRAW_REQUEST_LIST_PAGE ); ?>" />
|
12 |
<?php
|
13 |
$withdrawList->search_box(__('Search', 'tutor'), 'withdrawals');
|
14 |
$withdrawList->display(); ?>
|