Plugin Directory

Changeset 2500237


Ignore:
Timestamp:
03/20/2021 08:04:09 PM (5 years ago)
Author:
oleksandr87
Message:

update #1

Location:
university-quizzes-online/trunk
Files:
12 added
9 edited

Legend:

Unmodified
Added
Removed
  • university-quizzes-online/trunk/readme.txt

    r2477582 r2500237  
    22Contributors: oleksandr87
    33Donate link: https://oleksandrustymenko.net.ua
    4 Tags: quiz, quizzes, question, questions, university, exam, exams, course
     4Tags: quiz, quizzes, profile, messages, student, chat, exams, course
    55Requires at least: 5
    66Tested up to: 5.6
    7 Stable tag: 1.0
     7Stable tag: 1.1
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    1919
    2020* [Demo](https://oleksandrustymenko.net.ua/courses/)
     21* Free courses
     22* Student cabinet
     23* Quizzes
     24* Messages
     25* Profile
    2126
    2227https://youtu.be/DZM_HvkQ_Dc
     
    26311. To install a plugin you need to open your WordPress dashboard, go to the Plugins menu and click Add. After adding, activate the plugin.
    27321. 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.
     331. [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.
     341. [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.
     351. [universityquizzesonline_student] - Student cabinet.
     361. 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.
    2837
    2938== Frequently Asked Questions ==
     
    37461. Screenshot 1
    38471. Screenshot 2
     481. Screenshot 3
     491. Screenshot 4
    3950
    4051== Changelog ==
  • university-quizzes-online/trunk/s_universityquizzesonline.php

    r2477582 r2500237  
    44Plugin URI: http://oleksandrustymenko.net.ua
    55Description: 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.0
     6Version: 1.1
    77Author: Oleksandr Ustymenko
    88Author 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
     9License: GPLv3
     10License URI: http://www.gnu.org/licenses/gpl-3.0.html
    2711*/
    2812
     
    125109        dbDelta($univquizonline_tattemptssql);
    126110        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    }
    128130}
    129131
     
    152154{
    153155    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    ));
    154161}
    155162
     
    293300add_action( 'wp_ajax_univquizonline_questions_action_search', 'univquizonline_questions_action_search12');
    294301
     302
     303function univquizonline_sfront_student_edit2()
     304{
     305    require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_edit.php');
     306    exit;
     307}
     308add_action( 'wp_ajax_univquizonline_sfront_student_edit', 'univquizonline_sfront_student_edit2');
     309
     310function univquizonline_sfront_student_photo2()
     311{
     312    require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_uphoto.php');
     313    exit;
     314}
     315add_action( 'wp_ajax_univquizonline_sfront_student_photo', 'univquizonline_sfront_student_photo2');
     316
     317function univquizonline_sfront_student_del2()
     318{
     319    require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_delphoto.php');
     320    exit;
     321}
     322add_action( 'wp_ajax_univquizonline_sfront_student_del', 'univquizonline_sfront_student_del2');
     323
     324function univquizonline_sfront_student_search2()
     325{
     326    require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_search.php');
     327    exit;
     328}
     329add_action( 'wp_ajax_univquizonline_sfront_student_search', 'univquizonline_sfront_student_search2');
     330
     331function univquizonline_sfront_student_m2()
     332{
     333    require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_um.php');
     334    exit;
     335}
     336add_action( 'wp_ajax_univquizonline_sfront_student_m', 'univquizonline_sfront_student_m2');
     337
     338function univquizonline_sfront_student_mes_sel2()
     339{
     340    require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_mes_choose.php');
     341    exit;
     342}
     343add_action( 'wp_ajax_univquizonline_sfront_student_mes_sel', 'univquizonline_sfront_student_mes_sel2');
     344
     345function univquizonline_sfront_student_mes_open2()
     346{
     347    require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_mes_open.php');
     348    exit;
     349}
     350add_action( 'wp_ajax_univquizonline_sfront_student_mes_open', 'univquizonline_sfront_student_mes_open2');
     351
     352function univquizonline_sfront_student_mes_send2()
     353{
     354    require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_mes_send.php');
     355    exit;
     356}
     357add_action( 'wp_ajax_univquizonline_sfront_student_mes_send', 'univquizonline_sfront_student_mes_send2');
     358
     359function univquizonline_sfront_student_mes_del2()
     360{
     361    require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student_mes_del.php');
     362    exit;
     363}
     364add_action( 'wp_ajax_univquizonline_sfront_student_mes_del', 'univquizonline_sfront_student_mes_del2');
     365
    295366function univquizonlineou_page()
    296367{
     
    323394       
    324395        <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           
    325403            <div style="margin: 10px; width: 580px;">
    326404                <table>
     
    333411                        <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>
    334412                    </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>
    335418                </table>
    336419            </div>
     
    536619                            <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>
    537620                        </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                                 <?php
    544                                 $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                                     <?php
    553                                 }
    554                                 else
    555                                 {
    556                                     ?>
    557                                     <select name="admin_crc_course_id_product" autocomplete="off" style="padding: 5px; width: 100%;">
    558                                         <option value="">Select product</option>
    559                                         <?php
    560                                         $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                                             <?php
    568                                         }
    569                                         ?>
    570                                     </select>
    571                                     <?php
    572                                 }
    573                                 ?>
    574                             </div>
    575                         </div>
    576                        
    577621                       
    578622                        <div style="padding:10px 0px 0px 0px;">
     
    784828    }
    785829       
    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        
    792830    function univquizonline_quizze_button_start()
    793831    {
     
    909947           
    910948            <div style="float: left; width: 150px;">
    911                  <?php
     949                <?php
    912950                if($univquizonlineou_quizzes_count <=9)
    913951                {
     
    10081046                            <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;">
    10091047                        </div>
    1010                        
     1048                                       
    10111049                        <div style="padding:15px 0px 0px 0px;">
    10121050                            <input type="checkbox" value="1" autocomplete="off" name="admin_crc_quizze_active" id="univquizonline_crc_quizze_active"> Make an active quiz
     
    17181756
    17191757add_shortcode('universityquizzesonline_free', 'univquizonline_free_func');
     1758
     1759function universityquizzesonline_student_func()
     1760{
     1761    require_once( plugin_dir_path(__FILE__).'s_univquizonline_front_student.php');
     1762}
     1763
     1764add_shortcode('universityquizzesonline_student', 'universityquizzesonline_student_func');
    17201765?>
  • university-quizzes-online/trunk/s_univquizonline_edit_course.php

    r2477582 r2500237  
    131131                       
    132132                        <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                                 <?php
    137                                 $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                                     <?php
    146                                 }
    147                                 else
    148                                 {
    149                                     ?>
    150                                     <select name="admin_crc_course_id_product" autocomplete="off" style="padding: 5px; width: 100%;">
    151                                         <option value="">Select product</option>
    152                                         <?php
    153                                         $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                                             <?php
    161                                         }
    162                                         ?>
    163                                     </select>
    164                                     <?php
    165                                 }
    166                                 ?>
    167                             </div>
    168                         </div>
    169                        
    170                        
    171                         <div style="padding:10px 0px 0px 0px;">
    172133                            <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
    173134                        </div>
  • university-quizzes-online/trunk/s_univquizonline_front_course_free.php

    r2477582 r2500237  
    10211021                                jQuery(".univquizonline_front_class_questions_result").html("You answered "+s_u_right_answer+" questions correctly");
    10221022                            }
    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                           
    10241030                                jQuery(".univquizonline_front_class_questions_xstarted").hide();
    10251031                                jQuery(".univquizonline_front_class_questions_finished").show();
     
    11881194                unset($univquizonline_front_questions2_q_answer_array);
    11891195            }
    1190             ?>
    1191            
    1192                
     1196            ?>               
    11931197        </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>   
    11941215
    11951216        <div class="univquizonline_front_class_questions_finished" style="display: none; width: 100%; background: #f2f2f2; border: 1px solid #d9d9d9; color: #000000;">
     
    12021223                <div style="padding: 10px; font-size: 20px; text-align:center;">
    12031224                    <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>
    12041231                </div>
    12051232               
  • university-quizzes-online/trunk/s_univquizonline_quizzes_create.php

    r2477582 r2500237  
    1313    $univquizonline_crc_quizze_course = intval($_POST['admin_crc_quizze_course']);
    1414    $univquizonline_crc_quizze_time = intval($_POST['admin_crc_quizze_time']);
    15     $univquizonline_crc_quizze_attempts = intval($_POST['admin_crc_quizze_attempts']);
    1615    $univquizonline_crc_quizze_active = intval($_POST['admin_crc_quizze_active']);
    1716   
  • university-quizzes-online/trunk/s_univquizonline_quizzes_edit.php

    r2477582 r2500237  
    3535                $univquizonline_quizzes2_list_description = $univquizonline_quizzes2_admin_vsql2->s_quizzes_description;
    3636                $univquizonline_quizzes2_list_time = $univquizonline_quizzes2_admin_vsql2->s_quizzes_time;
     37                $univquizonline_quizzes2_list_attempts = $univquizonline_quizzes2_admin_vsql2->s_quizzes_attempts;
    3738                $univquizonline_quizzes2_list_course = $univquizonline_quizzes2_admin_vsql2->s_quizzes_name_course;
    3839            }
  • university-quizzes-online/trunk/s_univquizonline_quizzes_update.php

    r2477582 r2500237  
    1414    $univquizonline_crc_quizze_course = intval($_POST['admin_crc_quizze_course']);
    1515    $univquizonline_crc_quizze_time = intval($_POST['admin_crc_quizze_time']);
    16     $univquizonline_crc_quizze_attempts = intval($_POST['admin_crc_quizze_attempts']);
    1716    $univquizonline_crc_quizze_active = intval($_POST['admin_crc_quizze_active']);
    1817   
Note: See TracChangeset for help on using the changeset viewer.