PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | inc/admin/views/tools/course/html-assign-course.php +99 -99 4.3.84.4.8 View file →
@@ -1,99 +1,99 @@
1 -<?php
2 -/**
3 - * @author ThimPress
4 - * @package LearnPress/Admin/Views
5 - * @since 4.2.5.6
6 - * @version 1.0.1
7 - */
8 -
9 -$data_struct_course = [
10 - 'urlApi' => get_rest_url( null, 'lp/v1/admin/tools/search-course' ),
11 - 'dataType' => 'courses',
12 - 'keyGetValue' => [
13 - 'value' => 'ID',
14 - 'text' => '{{post_title}} (#{{ID}})',
15 - 'key_render' => [
16 - 'post_title' => 'post_title',
17 - 'ID' => 'ID',
18 - ],
19 - ],
20 - 'setting' => [
21 - 'placeholder' => esc_html__( 'Choose Course', 'learnpress' ),
22 - ],
23 -];
24 -$assign_course = new LP_Meta_Box_Select_Field(
25 - esc_html__( 'Choose Course', 'learnpress' ),
26 - [],
27 - '',
28 - [
29 - 'options' => array(),
30 - 'tom_select' => true,
31 - 'multiple' => true,
32 - 'name_no_bracket' => true,
33 - 'custom_attributes' => [ 'data-struct' => htmlentities2( json_encode( $data_struct_course ) ) ],
34 - ]
35 -);
36 -$assign_course->id = 'course_ids';
37 -
38 -$data_struct_user = [
39 - 'urlApi' => get_rest_url( null, 'lp/v1/admin/tools/search-user' ),
40 - 'dataType' => 'users',
41 - 'keyGetValue' => [
42 - 'value' => 'ID',
43 - 'text' => '{{display_name}}(#{{ID}}) - {{user_email}}',
44 - 'key_render' => [
45 - 'display_name' => 'display_name',
46 - 'user_email' => 'user_email',
47 - 'ID' => 'ID',
48 - ],
49 - ],
50 - 'setting' => [
51 - 'placeholder' => esc_html__( 'Choose User', 'learnpress' ),
52 - ],
53 -];
54 -$assign_user = new LP_Meta_Box_Select_Field(
55 - esc_html__( 'Chose User', 'learnpress' ),
56 - [],
57 - '',
58 - [
59 - 'options' => array(),
60 - 'tom_select' => true,
61 - 'multiple' => true,
62 - 'name_no_bracket' => true,
63 - 'custom_attributes' => [ 'data-struct' => htmlentities2( json_encode( $data_struct_user ) ) ],
64 - ]
65 -);
66 -$assign_user->id = 'user_ids';
67 -?>
68 -<div id="learn-press-assign-course" class="card">
69 - <h2><?php _e( 'Assign Course', 'learnpress' ); ?></h2>
70 - <div class="description">
71 - <?php _e( 'User can enroll in a specific course by manually assign to them.', 'learnpress' ); ?>
72 - </div>
73 - <i style="color: #a20707">
74 - <?php _e( 'Noted: when assign user to course, the progress old of user with course assign will eraser, so be careful before do this.', 'learnpress' ); ?>
75 - </i>
76 - <div class="content">
77 - <form id="lp-assign-user-course-form" name="" method="post">
78 - <fieldset class="lp-assign-course__options">
79 - <ul>
80 - <li>
81 - <?php $assign_course->output( 0 ); ?>
82 - </li>
83 - <li>
84 - <div class="assign-to-user">
85 - <?php $assign_user->output( 0 ); ?>
86 - </div>
87 - </li>
88 - </ul>
89 - </fieldset>
90 - <div>
91 - <button class="button button-primary lp-button-assign-course" type="submit">
92 - <?php _e( 'Assign', 'learnpress' ); ?>
93 - </button>
94 - <span class="percent" style="margin-left: 10px"></span>
95 - <span class="message" style="margin-left: 10px"></span>
96 - </div>
97 - </form>
98 - </div>
99 -</div>
1 +<?php
2 +/**
3 + * @author ThimPress
4 + * @package LearnPress/Admin/Views
5 + * @since 4.2.5.6
6 + * @version 1.0.1
7 + */
8 +
9 +$data_struct_course = [
10 + 'urlApi' => get_rest_url( null, 'lp/v1/admin/tools/search-course' ),
11 + 'dataType' => 'courses',
12 + 'keyGetValue' => [
13 + 'value' => 'ID',
14 + 'text' => '{{post_title}} (#{{ID}})',
15 + 'key_render' => [
16 + 'post_title' => 'post_title',
17 + 'ID' => 'ID',
18 + ],
19 + ],
20 + 'setting' => [
21 + 'placeholder' => esc_html__( 'Choose Course', 'learnpress' ),
22 + ],
23 +];
24 +$assign_course = new LP_Meta_Box_Select_Field(
25 + esc_html__( 'Choose Course', 'learnpress' ),
26 + [],
27 + '',
28 + [
29 + 'options' => array(),
30 + 'tom_select' => true,
31 + 'multiple' => true,
32 + 'name_no_bracket' => true,
33 + 'custom_attributes' => [ 'data-struct' => htmlentities2( json_encode( $data_struct_course ) ) ],
34 + ]
35 +);
36 +$assign_course->id = 'course_ids';
37 +
38 +$data_struct_user = [
39 + 'urlApi' => get_rest_url( null, 'lp/v1/admin/tools/search-user' ),
40 + 'dataType' => 'users',
41 + 'keyGetValue' => [
42 + 'value' => 'ID',
43 + 'text' => '{{display_name}}(#{{ID}}) - {{user_email}}',
44 + 'key_render' => [
45 + 'display_name' => 'display_name',
46 + 'user_email' => 'user_email',
47 + 'ID' => 'ID',
48 + ],
49 + ],
50 + 'setting' => [
51 + 'placeholder' => esc_html__( 'Choose User', 'learnpress' ),
52 + ],
53 +];
54 +$assign_user = new LP_Meta_Box_Select_Field(
55 + esc_html__( 'Chose User', 'learnpress' ),
56 + [],
57 + '',
58 + [
59 + 'options' => array(),
60 + 'tom_select' => true,
61 + 'multiple' => true,
62 + 'name_no_bracket' => true,
63 + 'custom_attributes' => [ 'data-struct' => htmlentities2( json_encode( $data_struct_user ) ) ],
64 + ]
65 +);
66 +$assign_user->id = 'user_ids';
67 +?>
68 +<div id="learn-press-assign-course" class="card">
69 + <h2><?php _e( 'Assign Course', 'learnpress' ); ?></h2>
70 + <div class="description">
71 + <?php _e( 'User can enroll in a specific course by manually assign to them.', 'learnpress' ); ?>
72 + </div>
73 + <i style="color: #a20707">
74 + <?php _e( 'Noted: when assign user to course, the progress old of user with course assign will eraser, so be careful before do this.', 'learnpress' ); ?>
75 + </i>
76 + <div class="content">
77 + <form id="lp-assign-user-course-form" name="" method="post">
78 + <fieldset class="lp-assign-course__options">
79 + <ul>
80 + <li>
81 + <?php $assign_course->output( 0 ); ?>
82 + </li>
83 + <li>
84 + <div class="assign-to-user">
85 + <?php $assign_user->output( 0 ); ?>
86 + </div>
87 + </li>
88 + </ul>
89 + </fieldset>
90 + <div>
91 + <button class="button button-primary lp-button-assign-course" type="submit">
92 + <?php _e( 'Assign', 'learnpress' ); ?>
93 + </button>
94 + <span class="percent" style="margin-left: 10px"></span>
95 + <span class="message" style="margin-left: 10px"></span>
96 + </div>
97 + </form>
98 + </div>
99 +</div>