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.0 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0 3.8.1 3.8.2 3.8.3 3.9.0 3.9.1 3.9.10 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9
tutor / templates / dashboard / create-course.php
tutor / templates / dashboard Last commit date
announcements 5 years ago assignments 5 years ago earning 5 years ago enrolled-courses 5 years ago instructor 5 years ago my-quiz-attempts 5 years ago notifications 5 years ago question-answer 5 years ago quiz-attempts 5 years ago reviews 5 years ago settings 5 years ago withdraw-method-fields 5 years ago announcements.php 5 years ago assignments.php 5 years ago create-course.php 5 years ago dashboard.php 5 years ago earning.php 5 years ago enrolled-courses.php 5 years ago index.php 5 years ago logged-in.php 5 years ago my-courses.php 5 years ago my-profile.php 5 years ago my-quiz-attempts.php 5 years ago purchase_history.php 5 years ago question-answer.php 5 years ago quiz-attempts.php 5 years ago registration.php 5 years ago reviews.php 5 years ago settings.php 5 years ago wishlist.php 5 years ago withdraw.php 5 years ago
create-course.php
242 lines
1 <?php
2 /**
3 * @package TutorLMS/Templates
4 * @version 1.4.3
5 */
6
7
8 if ( ! defined( 'ABSPATH' ) )
9 exit;
10
11 global $post;
12
13 get_tutor_header(true);
14 do_action('tutor_load_template_before', 'dashboard.create-course', null);
15
16 $course_id = get_the_ID();
17 $can_publish_course = (bool) tutor_utils()->get_option('instructor_can_publish_course') || current_user_can('administrator');
18 ?>
19
20 <?php do_action('tutor/dashboard_course_builder_before'); ?>
21 <form action="" id="tutor-frontend-course-builder" method="post" enctype="multipart/form-data">
22 <?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?>
23
24 <header class="tutor-dashboard-builder-header">
25 <div class="tutor-container tutor-fluid">
26 <div class="tutor-row tutor-align-items-center">
27 <div class="tutor-col-auto">
28 <div class="tutor-dashboard-builder-header-left">
29 <div class="tutor-dashboard-builder-logo">
30 <?php $tutor_course_builder_logo_src = apply_filters('tutor_course_builder_logo_src', tutor()->url . 'assets/images/tutor-logo.png'); ?>
31 <img src="<?php echo esc_url($tutor_course_builder_logo_src); ?>" alt="">
32 </div>
33 <button type="submit" class="tutor-dashboard-builder-draft-btn" name="course_submit_btn" value="save_course_as_draft">
34 <!-- @TODO: Icon must be chenged -->
35 <i class="tutor-icon-save"></i>
36 <span><?php _e('Save', 'tutor'); ?></span>
37 </button>
38 </div>
39 </div>
40 <div class="tutor-col-auto">
41 <div class="tutor-dashboard-builder-header-right">
42 <a href="<?php the_permalink($course_id); ?>" target="_blank"><i class="tutor-icon-glasses"></i><?php _e('Preview', 'tutor'); ?></a>
43 <?php
44 if ($can_publish_course){
45 ?>
46 <button class="tutor-button" type="submit" name="course_submit_btn" value="publish_course"><?php _e('Publish Course', 'tutor'); ?></button>
47 <?php
48 }else{
49 ?>
50 <button class="tutor-button" type="submit" name="course_submit_btn" value="submit_for_review"><?php _e('Submit for Review', 'tutor'); ?></button>
51 <?php
52 }
53 ?>
54 <a href="<?php echo tutor_utils()->tutor_dashboard_url(); ?>"> <?php _e('Exit', "tutor") ?></a>
55 </div>
56 </div>
57 </div>
58 </div>
59 </header>
60 <div class="tutor-frontend-course-builder-section">
61
62 <div class="tutor-container">
63 <div class="tutor-row">
64 <div class="tutor-col-8">
65 <input type="hidden" value="tutor_add_course_builder" name="tutor_action"/>
66 <input type="hidden" name="course_ID" id="course_ID" value="<?php echo get_the_ID(); ?>">
67 <input type="hidden" name="post_ID" id="post_ID" value="<?php echo get_the_ID(); ?>">
68
69
70 <div class="tutor-dashboard-course-builder-wrap">
71 <!--since 1.8.0 alert message -->
72 <?php
73 $instructor_can_publish = tutils()->get_option('instructor_can_publish_course');
74 ?>
75 <?php if(current_user_can('tutor_instructor') && !current_user_can('administrator')):?>
76 <?php if(isset($_SESSION['tutor_course_updated']) && !$instructor_can_publish):?>
77 <div class="tutor-alert tutor-alert-info">
78 <?php _e('Your course has been submitted to the admin. It will be published once it has been reviewed by the admins.','tutor');?>
79 </div>
80 <?php session_destroy();?>
81 <?php endif;?>
82 <?php endif;?>
83 <!--alert message end -->
84 <?php do_action('tutor/dashboard_course_builder_form_field_before'); ?>
85
86 <div class="tutor-course-builder-section tutor-course-builder-info">
87 <div class="tutor-course-builder-section-title">
88 <h3><i class="tutor-icon-down"></i><span><?php esc_html_e('Course Info', 'tutor'); ?></span></h3>
89 </div> <!--.tutor-course-builder-section-title-->
90 <div class="tutor-course-builder-section-content">
91 <div class="tutor-frontend-builder-item-scope">
92 <div class="tutor-form-group">
93 <label class="tutor-builder-item-heading">
94 <?php _e('Course Title', 'tutor'); ?>
95 </label>
96 <input type="text" name="title" value="<?php echo get_the_title(); ?>" placeholder="<?php _e('ex. Learn photoshop CS6 from scratch', 'tutor'); ?>">
97 </div>
98 </div> <!--.tutor-frontend-builder-item-scope-->
99
100 <div class="tutor-frontend-builder-item-scope">
101 <div class="tutor-form-group">
102 <label> <?php _e('Description', 'tutor'); ?></label>
103 <?php
104 $editor_settings = array(
105 'media_buttons' => false,
106 'quicktags' => false,
107 'editor_height' => 150,
108 'textarea_name' => 'content'
109 );
110 wp_editor($post->post_content, 'course_description', $editor_settings);
111 ?>
112 </div>
113 </div> <!--.tutor-frontend-builder-item-scope-->
114
115 <?php do_action('tutor/frontend_course_edit/after/description', $post) ?>
116
117 <div class="tutor-frontend-builder-item-scope">
118 <div class="tutor-form-group">
119 <label>
120 <?php _e('Choose a category', 'tutor'); ?>
121 </label>
122 <div class="tutor-form-field-course-categories">
123 <?php //echo tutor_course_categories_checkbox($course_id);
124 echo tutor_course_categories_dropdown($course_id, array('classes' => 'tutor_select2'));
125 ?>
126 </div>
127 </div>
128 </div>
129
130 <?php
131 $monetize_by = tutils()->get_option('monetize_by');
132 if ($monetize_by === 'wc' || $monetize_by === 'edd'){
133 $course_price = tutor_utils()->get_raw_course_price(get_the_ID());
134 $currency_symbol = tutor_utils()->currency_symbol();
135
136 $_tutor_course_price_type = tutils()->price_type();
137 ?>
138 <div class="tutor-frontend-builder-item-scope tutor-frontend-builder-course-price">
139 <label class="tutor-builder-item-heading">
140 <?php _e('Course Price', 'tutor'); ?>
141 </label>
142 <div class="tutor-row tutor-align-items-center">
143 <div class="tutor-col-auto">
144 <label for="tutor_course_price_type_pro" class="tutor-styled-radio">
145 <input id="tutor_course_price_type_pro" type="radio" name="tutor_course_price_type" value="paid" <?php checked($_tutor_course_price_type, 'paid'); ?> >
146 <span></span>
147 <div class="tutor-form-group">
148 <span class="tutor-input-prepand"><?php echo $currency_symbol; ?></span>
149 <input type="text" name="course_price" value="<?php echo $course_price->regular_price; ?>" placeholder="<?php _e('Set course price', 'tutor'); ?>">
150 </div>
151 </label>
152 </div>
153 <div class="tutor-col-auto">
154 <label class="tutor-styled-radio">
155 <input type="radio" name="tutor_course_price_type" value="free" <?php $_tutor_course_price_type ? checked($_tutor_course_price_type, 'free') : checked('true', 'true'); ?> >
156 <span><?php _e('Free', "tutor") ?></span>
157 </label>
158 </div>
159 </div>
160 </div> <!--.tutor-frontend-builder-item-scope-->
161 <?php } ?>
162
163 <div class="tutor-frontend-builder-item-scope">
164 <div class="tutor-form-group">
165 <label>
166 <?php _e('Course Thumbnail', 'tutor'); ?>
167 </label>
168 <div class="tutor-form-field tutor-form-field-course-thumbnail tutor-thumbnail-wrap">
169 <div class="tutor-row tutor-align-items-center">
170 <div class="tutor-col-5">
171 <div class="builder-course-thumbnail-img-src">
172 <?php
173 $builder_course_img_src = tutor()->url . 'assets/images/placeholder-course.jpg';
174 $_thumbnail_url = get_the_post_thumbnail_url($course_id);
175 $post_thumbnail_id = get_post_thumbnail_id( $course_id );
176
177 if ( ! $_thumbnail_url){
178 $_thumbnail_url = $builder_course_img_src;
179 }
180 ?>
181 <img src="<?php echo $_thumbnail_url; ?>" class="thumbnail-img" data-placeholder-src="<?php echo $builder_course_img_src; ?>">
182 <a href="javascript:;" class="tutor-course-thumbnail-delete-btn" style="display: <?php echo
183 $post_thumbnail_id ? 'block':'none'; ?>;"><i class="tutor-icon-line-cross"></i></a>
184 </div>
185 </div>
186
187 <div class="tutor-col-7">
188 <div class="builder-course-thumbnail-upload-wrap">
189 <div><?php echo sprintf(__("Important Guideline: %1\$s 700x430 pixels %2\$s %3\$s File Support: %1\$s jpg, .jpeg,. gif, or .png %2\$s no text on the image.", "tutor"), "<strong>", "</strong>", "<br>") ?></div>
190 <input type="hidden" id="tutor_course_thumbnail_id" name="tutor_course_thumbnail_id" value="<?php echo $post_thumbnail_id; ?>">
191 <a href="javascript:;" class="tutor-course-thumbnail-upload-btn tutor-button bordered-button"><?php _e('Upload Image', 'tutor'); ?></a>
192 </div>
193 </div>
194 </div>
195
196 </div>
197 </div>
198 </div>
199 </div>
200 </div>
201
202 <?php do_action('tutor/dashboard_course_builder_form_field_after', $post); ?>
203 <div class="tutor-form-row">
204 <div class="tutor-form-col-12">
205 <div class="tutor-form-group">
206 <div class="tutor-form-field tutor-course-builder-btn-group">
207 <button type="submit" class="tutor-button" name="course_submit_btn" value="save_course_as_draft"><?php _e('Save course as draft', 'tutor'); ?></button>
208 <?php if ($can_publish_course){ ?>
209 <button class="tutor-button tutor-success" type="submit" name="course_submit_btn" value="publish_course"><?php _e('Publish Course', 'tutor'); ?></button>
210 <?php }else{ ?>
211 <button class="tutor-button tutor-success" type="submit" name="course_submit_btn" value="submit_for_review"><?php _e('Submit for Review', 'tutor'); ?></button>
212 <?php } ?>
213 </div>
214 </div>
215 </div>
216 </div>
217 </div>
218 </div> <!--.tutor-col-8-->
219 <div class="tutor-col-4">
220 <div class="tutor-course-builder-upload-tips">
221 <h3 class="tutor-course-builder-tips-title"><i class="tutor-icon-light-bulb"></i><?php _e('Course Upload Tips', 'tutor') ?></h3>
222 <ul>
223 <li><?php _e("Set the Course Price option or make it free.", 'tutor');?></li>
224 <li><?php _e("Standard size for the course thumbnail is 700x430.", 'tutor');?></li>
225 <li><?php _e("Video section controls the course overview video.", 'tutor');?></li>
226 <li><?php _e("Course Builder is where you create & organize a course.", 'tutor');?></li>
227 <li><?php _e("Add Topics in the Course Builder section to create lessons, quizzes, and assignments.", 'tutor'); ?></li>
228 <li><?php _e("Prerequisites refers to the fundamental courses to complete before taking this particular course.", 'tutor'); ?></li>
229 <li><?php _e("Information from the Additional Data section shows up on the course single page.", 'tutor'); ?></li>
230 </ul>
231 </div>
232 </div> <!--.tutor-col-4-->
233 </div> <!--.tutor-row-->
234 </div>
235 </div>
236 </form>
237 <?php do_action('tutor/dashboard_course_builder_after'); ?>
238
239
240 <?php
241 do_action('tutor_load_template_after', 'dashboard.create-course', null);
242 get_tutor_footer(true); ?>