Changeset 2500237
- Timestamp:
- 03/20/2021 08:04:09 PM (5 years ago)
- Location:
- university-quizzes-online/trunk
- Files:
-
- 12 added
- 9 edited
-
readme.txt (modified) (4 diffs)
-
s_universityquizzesonline.php (modified) (11 diffs)
-
s_univquizonline_edit_course.php (modified) (1 diff)
-
s_univquizonline_front_course_free.php (modified) (3 diffs)
-
s_univquizonline_front_student.php (added)
-
s_univquizonline_front_student_delphoto.php (added)
-
s_univquizonline_front_student_edit.php (added)
-
s_univquizonline_front_student_mes_choose.php (added)
-
s_univquizonline_front_student_mes_del.php (added)
-
s_univquizonline_front_student_mes_open.php (added)
-
s_univquizonline_front_student_mes_send.php (added)
-
s_univquizonline_front_student_search.php (added)
-
s_univquizonline_front_student_um.php (added)
-
s_univquizonline_front_student_uphoto.php (added)
-
s_univquizonline_quizzes_create.php (modified) (1 diff)
-
s_univquizonline_quizzes_edit.php (modified) (1 diff)
-
s_univquizonline_quizzes_update.php (modified) (1 diff)
-
screenshot-1.png (modified) (previous)
-
screenshot-2.png (modified) (previous)
-
screenshot-3.png (added)
-
screenshot-4.png (added)
Legend:
- Unmodified
- Added
- Removed
-
university-quizzes-online/trunk/readme.txt
r2477582 r2500237 2 2 Contributors: oleksandr87 3 3 Donate link: https://oleksandrustymenko.net.ua 4 Tags: quiz, quizzes, question, questions, university, exam, exams, course4 Tags: quiz, quizzes, profile, messages, student, chat, exams, course 5 5 Requires at least: 5 6 6 Tested up to: 5.6 7 Stable tag: 1. 07 Stable tag: 1.1 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 19 19 20 20 * [Demo](https://oleksandrustymenko.net.ua/courses/) 21 * Free courses 22 * Student cabinet 23 * Quizzes 24 * Messages 25 * Profile 21 26 22 27 https://youtu.be/DZM_HvkQ_Dc … … 26 31 1. To install a plugin you need to open your WordPress dashboard, go to the Plugins menu and click Add. After adding, activate the plugin. 27 32 1. You can also install the plugin through the FTP client. You need to unpack the plugin and upload the folder of the unpacked plugin to the hosting in the "plugins" section. After that go to open your WordPress dashboard, go to the Plugins menu. In the "Installed plugins" section, activate the plugin. 33 1. [universityquizzesonline_free] - The courses are available without user registration and they are free. Paid courses will not be displayed with this shortcode. The ranking of the passed courses will not be saved. 34 1. [universityquizzesonline_paid] - Courses are available only to authorized users. Free courses are available to all users. Paid courses are available only to those users who have purchased the course. Only for paid version. 35 1. [universityquizzesonline_student] - Student cabinet. 36 1. Warning. After updating the plugin, you need to deactivate and then reactivate the plugin. This is done in order to create the necessary tables in the database. Each update has a number of improvements. 28 37 29 38 == Frequently Asked Questions == … … 37 46 1. Screenshot 1 38 47 1. Screenshot 2 48 1. Screenshot 3 49 1. Screenshot 4 39 50 40 51 == Changelog == -
university-quizzes-online/trunk/s_universityquizzesonline.php
r2477582 r2500237 4 4 Plugin URI: http://oleksandrustymenko.net.ua 5 5 Description: Organize online exams on your website. With this plugin, you can create various quizzes on your website, conduct exams and assign grades to students. 6 Version: 1. 06 Version: 1.1 7 7 Author: Oleksandr Ustymenko 8 8 Author URI: http://oleksandrustymenko.net.ua 9 */ 10 11 /* 12 Copyright 2021 oleksandr87 (email:ustymenkooleksandrnew@gmail.com) 13 14 This program is free software; you can redistribute it and/or modify 15 it under the terms of the GNU General Public License as published by 16 the Free Software Foundation; either version 2 of the License, or 17 (at your option) any later version. 18 19 This program is distributed in the hope that it will be useful, 20 but WITHOUT ANY WARRANTY; without even the implied warranty of 21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 GNU General Public License for more details. 23 24 You should have received a copy of the GNU General Public License 25 along with this program; if not, write to the Free Software 26 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 9 License: GPLv3 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html 27 11 */ 28 12 … … 125 109 dbDelta($univquizonline_tattemptssql); 126 110 add_option("jal_db_version", $jal_db_version); 127 } 111 } 112 113 $univquizonline_tmessage = $wpdb->prefix . "univquizonline_message"; 114 if($wpdb->get_var("show tables like $univquizonline_tmessage'") != $univquizonline_tmessage) 115 { 116 $univquizonline_tmessagesql = "CREATE TABLE " .$univquizonline_tmessage. " ( 117 s_message_id INTEGER NOT NULL AUTO_INCREMENT, 118 s_message_from INTEGER, 119 s_message_to INTEGER, 120 s_message_status INTEGER, 121 s_message_code INTEGER, 122 s_message_message TEXT, 123 s_message_date TEXT, 124 UNIQUE KEY (s_message_id));"; 125 126 require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 127 dbDelta($univquizonline_tmessagesql); 128 add_option("jal_db_version", $jal_db_version); 129 } 128 130 } 129 131 … … 152 154 { 153 155 wp_enqueue_script('jquery'); 156 wp_localize_script( 'jquery', 'univquizonlinescriptscode', 157 array( 158 'univquizonlinescriptscode_url' => admin_url('admin-ajax.php'), 159 'univquizonlinescriptscode_nonce' => wp_create_nonce('dknj3pirup') 160 )); 154 161 } 155 162 … … 293 300 add_action( 'wp_ajax_univquizonline_questions_action_search', 'univquizonline_questions_action_search12'); 294 301 302 303 function univquizonline_sfront_student_edit2() 304 { 305 require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_edit.php'); 306 exit; 307 } 308 add_action( 'wp_ajax_univquizonline_sfront_student_edit', 'univquizonline_sfront_student_edit2'); 309 310 function univquizonline_sfront_student_photo2() 311 { 312 require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_uphoto.php'); 313 exit; 314 } 315 add_action( 'wp_ajax_univquizonline_sfront_student_photo', 'univquizonline_sfront_student_photo2'); 316 317 function univquizonline_sfront_student_del2() 318 { 319 require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_delphoto.php'); 320 exit; 321 } 322 add_action( 'wp_ajax_univquizonline_sfront_student_del', 'univquizonline_sfront_student_del2'); 323 324 function univquizonline_sfront_student_search2() 325 { 326 require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_search.php'); 327 exit; 328 } 329 add_action( 'wp_ajax_univquizonline_sfront_student_search', 'univquizonline_sfront_student_search2'); 330 331 function univquizonline_sfront_student_m2() 332 { 333 require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_um.php'); 334 exit; 335 } 336 add_action( 'wp_ajax_univquizonline_sfront_student_m', 'univquizonline_sfront_student_m2'); 337 338 function univquizonline_sfront_student_mes_sel2() 339 { 340 require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_mes_choose.php'); 341 exit; 342 } 343 add_action( 'wp_ajax_univquizonline_sfront_student_mes_sel', 'univquizonline_sfront_student_mes_sel2'); 344 345 function univquizonline_sfront_student_mes_open2() 346 { 347 require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_mes_open.php'); 348 exit; 349 } 350 add_action( 'wp_ajax_univquizonline_sfront_student_mes_open', 'univquizonline_sfront_student_mes_open2'); 351 352 function univquizonline_sfront_student_mes_send2() 353 { 354 require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_mes_send.php'); 355 exit; 356 } 357 add_action( 'wp_ajax_univquizonline_sfront_student_mes_send', 'univquizonline_sfront_student_mes_send2'); 358 359 function univquizonline_sfront_student_mes_del2() 360 { 361 require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_mes_del.php'); 362 exit; 363 } 364 add_action( 'wp_ajax_univquizonline_sfront_student_mes_del', 'univquizonline_sfront_student_mes_del2'); 365 295 366 function univquizonlineou_page() 296 367 { … … 323 394 324 395 <div style="width: 600px; color: #000000;"> 396 397 <div style="margin: 10px; width: 580px;"> 398 <div style="fomt-size: 20px; color: #e60000; padding: 10px;"> 399 <b>Warning. After updating the plugin, you need to deactivate and then reactivate the plugin. This is done in order to create the necessary tables in the database. Each update has a number of improvements.</b> 400 </div> 401 </div> 402 325 403 <div style="margin: 10px; width: 580px;"> 326 404 <table> … … 333 411 <td style="width: 380px; text-align: left;">The courses are available without user registration and they are free. Paid courses will not be displayed with this shortcode. The ranking of the passed courses will not be saved.</td> 334 412 </tr> 413 414 <tr> 415 <td style="width: 200px; text-align: text;"><b>[universityquizzesonline_student]</b></td> 416 <td style="width: 380px; text-align: left;">Student cabinet</td> 417 </tr> 335 418 </table> 336 419 </div> … … 536 619 <textarea autocomplete="off" onfocus="univquizonline_crc_course_focus2(); return false;" placeholder="Course Description" name="admin_crc_course_description" id="univquizonline_crc_course_description" style="padding:5px; width: 100%; height: 90px; resize: none;"></textarea> 537 620 </div> 538 539 <div style="padding:10px 0px 0px 0px;">540 You must have the woocommerce plugin installed before activating the paid course.You can set the price, taxes and other financial information from within WooCommerce. If you uninstall the product, then the courses will automatically become the free.541 <div style="padding: 10px 0px 0px 0px;">542 543 <?php544 $univquizonlineou_posts_admin_count = $wpdb->get_var("SELECT COUNT(*) FROM $univquizonlineou_posts_admin where post_status = 'publish' AND post_type = 'product'");545 546 if($univquizonlineou_posts_admin_count == 0)547 {548 ?>549 <div style="padding:5px 0px 5px 0px; text-align: center; color: #b30000; font-size: 16px;">550 You have not created any product yet!551 </div>552 <?php553 }554 else555 {556 ?>557 <select name="admin_crc_course_id_product" autocomplete="off" style="padding: 5px; width: 100%;">558 <option value="">Select product</option>559 <?php560 $univquizonlineou_posts_admin_vsql = $wpdb->get_results("SELECT * FROM $univquizonlineou_posts_admin where post_status = 'publish' AND post_type = 'product'");561 foreach($univquizonlineou_posts_admin_vsql as $univquizonlineou_posts_admin_vsql2)562 {563 $univquizonline_post_list_id = $univquizonlineou_posts_admin_vsql2->ID;564 $univquizonline_post_list_title = $univquizonlineou_posts_admin_vsql2->post_title;565 ?>566 <option value="<?php echo $univquizonline_post_list_id;?>"><?php echo $univquizonline_post_list_title;?></option>567 <?php568 }569 ?>570 </select>571 <?php572 }573 ?>574 </div>575 </div>576 577 621 578 622 <div style="padding:10px 0px 0px 0px;"> … … 784 828 } 785 829 786 function univquizonline_crc_quizze_focus4()787 {788 jQuery("#univquizonline_quizze_create_error").html("Error: All fields marked with an asterisk must be completed!");789 jQuery("#univquizonline_quizze_create_error").hide();790 }791 792 830 function univquizonline_quizze_button_start() 793 831 { … … 909 947 910 948 <div style="float: left; width: 150px;"> 911 <?php949 <?php 912 950 if($univquizonlineou_quizzes_count <=9) 913 951 { … … 1008 1046 <input type="text" onfocus="univquizonline_crc_quizze_focus3(); return false;" autocomplete="off" placeholder="0" name="admin_crc_quizze_time" id="univquizonline_crc_quizze_time" style="padding:5px; width: 60px; text-align: center;"> 1009 1047 </div> 1010 1048 1011 1049 <div style="padding:15px 0px 0px 0px;"> 1012 1050 <input type="checkbox" value="1" autocomplete="off" name="admin_crc_quizze_active" id="univquizonline_crc_quizze_active"> Make an active quiz … … 1718 1756 1719 1757 add_shortcode('universityquizzesonline_free', 'univquizonline_free_func'); 1758 1759 function universityquizzesonline_student_func() 1760 { 1761 require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student.php'); 1762 } 1763 1764 add_shortcode('universityquizzesonline_student', 'universityquizzesonline_student_func'); 1720 1765 ?> -
university-quizzes-online/trunk/s_univquizonline_edit_course.php
r2477582 r2500237 131 131 132 132 <div style="padding:10px 0px 0px 0px;"> 133 You must have the woocommerce plugin installed before activating the paid course.You can set the price, taxes and other financial information from within WooCommerce. If you uninstall the product, then the courses will automatically become the free.134 <div style="padding: 10px 0px 0px 0px;">135 136 <?php137 $univquizonline_posts_admin_count = $wpdb->get_var("SELECT COUNT(*) FROM $univquizonline_posts_admin_db where post_status = 'publish' AND post_type = 'product'");138 139 if($univquizonline_posts_admin_count == 0)140 {141 ?>142 <div style="padding:5px 0px 5px 0px; text-align: center; color: #b30000; font-size: 16px;">143 You have not created any product yet!144 </div>145 <?php146 }147 else148 {149 ?>150 <select name="admin_crc_course_id_product" autocomplete="off" style="padding: 5px; width: 100%;">151 <option value="">Select product</option>152 <?php153 $univquizonline_posts_admin_vsql = $wpdb->get_results("SELECT * FROM $univquizonline_posts_admin_db where post_status = 'publish' AND post_type = 'product'");154 foreach($univquizonline_posts_admin_vsql as $univquizonline_posts_admin_vsql2)155 {156 $univquizonline_post_list_id = $univquizonline_posts_admin_vsql2->ID;157 $univquizonline_post_list_title = $univquizonline_posts_admin_vsql2->post_title;158 ?>159 <option <?php if($univquizonline_course_edit_post_id == $univquizonline_post_list_id) { echo 'selected'; } ?> value="<?php echo $univquizonline_post_list_id;?>"><?php echo $univquizonline_post_list_title;?></option>160 <?php161 }162 ?>163 </select>164 <?php165 }166 ?>167 </div>168 </div>169 170 171 <div style="padding:10px 0px 0px 0px;">172 133 <input type="checkbox" <?php if($univquizonline_course_edit_s_active == 1) {echo 'checked';} ?> value="1" autocomplete="off" name="admin_crc_course_active_edit" id="univquizonline_crc_course_active_edit"> Make an active course 173 134 </div> -
university-quizzes-online/trunk/s_univquizonline_front_course_free.php
r2477582 r2500237 1021 1021 jQuery(".univquizonline_front_class_questions_result").html("You answered "+s_u_right_answer+" questions correctly"); 1022 1022 } 1023 1023 var sx_total_questions = <?php echo $univquizonline_front_list_questions_check3;?>; 1024 1025 var sx_total_one_question = 100 / sx_total_questions; 1026 var sx_total_progress = parseInt(sx_total_one_question * s_u_right_answer); 1027 jQuery(".univquizonline_front_class_progress2").css("width",sx_total_progress+"%"); 1028 jQuery(".univquizonline_front_class_progress3").html(sx_total_progress); 1029 1024 1030 jQuery(".univquizonline_front_class_questions_xstarted").hide(); 1025 1031 jQuery(".univquizonline_front_class_questions_finished").show(); … … 1188 1194 unset($univquizonline_front_questions2_q_answer_array); 1189 1195 } 1190 ?> 1191 1192 1196 ?> 1193 1197 </div> 1198 1199 <style> 1200 .univquizonline_front_class_progress 1201 { 1202 width: 100%; 1203 background-color: #ddd; 1204 } 1205 .univquizonline_front_class_progress2 1206 { 1207 width: 0%; 1208 height: 30px; 1209 background-color: #4CAF50; 1210 text-align: center; 1211 line-height: 30px; 1212 color: #ffffff;; 1213 } 1214 </style> 1194 1215 1195 1216 <div class="univquizonline_front_class_questions_finished" style="display: none; width: 100%; background: #f2f2f2; border: 1px solid #d9d9d9; color: #000000;"> … … 1202 1223 <div style="padding: 10px; font-size: 20px; text-align:center;"> 1203 1224 <b class="univquizonline_front_class_questions_result"></b> 1225 </div> 1226 1227 <div style="padding: 10px; font-size: 20px; text-align:center;"> 1228 <div class="univquizonline_front_class_progress"> 1229 <div class="univquizonline_front_class_progress2"><span class="univquizonline_front_class_progress3">0</span>%</div> 1230 </div> 1204 1231 </div> 1205 1232 -
university-quizzes-online/trunk/s_univquizonline_quizzes_create.php
r2477582 r2500237 13 13 $univquizonline_crc_quizze_course = intval($_POST['admin_crc_quizze_course']); 14 14 $univquizonline_crc_quizze_time = intval($_POST['admin_crc_quizze_time']); 15 $univquizonline_crc_quizze_attempts = intval($_POST['admin_crc_quizze_attempts']);16 15 $univquizonline_crc_quizze_active = intval($_POST['admin_crc_quizze_active']); 17 16 -
university-quizzes-online/trunk/s_univquizonline_quizzes_edit.php
r2477582 r2500237 35 35 $univquizonline_quizzes2_list_description = $univquizonline_quizzes2_admin_vsql2->s_quizzes_description; 36 36 $univquizonline_quizzes2_list_time = $univquizonline_quizzes2_admin_vsql2->s_quizzes_time; 37 $univquizonline_quizzes2_list_attempts = $univquizonline_quizzes2_admin_vsql2->s_quizzes_attempts; 37 38 $univquizonline_quizzes2_list_course = $univquizonline_quizzes2_admin_vsql2->s_quizzes_name_course; 38 39 } -
university-quizzes-online/trunk/s_univquizonline_quizzes_update.php
r2477582 r2500237 14 14 $univquizonline_crc_quizze_course = intval($_POST['admin_crc_quizze_course']); 15 15 $univquizonline_crc_quizze_time = intval($_POST['admin_crc_quizze_time']); 16 $univquizonline_crc_quizze_attempts = intval($_POST['admin_crc_quizze_attempts']);17 16 $univquizonline_crc_quizze_active = intval($_POST['admin_crc_quizze_active']); 18 17
Note: See TracChangeset
for help on using the changeset viewer.