Professional Documents
Culture Documents
Дипломна Робота Городенко Д.О
Дипломна Робота Городенко Д.О
Kierunek: Informatyka
Specjalność: Informatyka stosowana .
Denys Horodenko
Nr albumu:…………
3
TABLE OF CONTENTS
ABSTRACT.................................................................................................................... 3
INTRODUCTION........................................................................................................... 6
1. THEORETICAL INFORMATION ABOUT THE TOOLS USED TOSOLVE THE
TASK...............................................................................................................................8
1.1 Analysis of Existing Options for Task Solving...................................................8
1.2 Comparative Characteristics of Technologies for Online-Contester
Development to Check Student Programming Works............................................15
1.3 Analysis of Existing DBMS to Solve the Given Task.......................................19
1.4 Comparative Characteristics of Possible DBMS for Use in Online-Contester
Development to Check Student Programming Works............................................22
1.5 Selection of Tools for Solving the Task Based on the Analysis Performed......25
1.6 Conclusions to the Section................................................................................26
2. ANALYSIS OF THE SUBJECT AREA AND SPECIFICATION OF
REQUIREMENTS FOR ONLINE-CONTESTER FOR CHECKING STUDENT
PROGRAMMING WORKS..........................................................................................27
2.1. Brief Description of the Object Online-Contester for Checking Student
Programming Works...............................................................................................27
2.2 Description of the Subject Area........................................................................28
2.3 Review and Analysis of Existing Analogues....................................................30
2.4. Specification of System Requirements............................................................34
2.5 Technical and System Development Support...................................................38
2.5.1. Rationale for Chossing Technical Means..............................................38
2.5.2.Rationale for Chossing OS and Data Exchange Protocol........................39
2.5.3. Protection Measures against Unauthorized Access to the System.........40
3. APPLICATION DESIGN AND PRACTICAL IMPLEMENTATION.....................42
3.1 Software Product Structure and Algorithms of its Functioning.........................42
3.2 Choosing the Developed Application Architecture...........................................44
4
3.3 Database Structure Design................................................................................44
3.4 Software Implementation of Application..........................................................46
3.4.1 Header and Footer Software Implementation for Web Pages.................46
3.4.2 Software Implementation of Home Page................................................48
3.4.3 Creating a Page for the Student to Complete the Selected Task.............52
3.4.4 Creating a Page for the Student to Complete the Selected Task.............54
3.4.5 Feedback Page Development..................................................................57
3.4.6 Creating a Registration Page...................................................................59
3.4.7 Creating an Authorization Page..............................................................59
CONCLUSION..............................................................................................................61
LIST OF REFERENCES...............................................................................................62
5
INTRODUCTION
- System testing
6
- Analysis of work results
Object of the Study is software tools for automating the process of checking
student programming works.
Subject of the Study is web-oriented software tools for designing and
developing software for checking student programming works.
Research Methods. In the process of work, general scientific and special
methods were used, which made it possible to study the subject and the object of the
study, to explore directions and ways to optimize the process of checking student
programming works.
Practical Importance of the Results Obtained. Practical importance of a web
service is determined by the high demand for such systems, as process automation
makes interaction more flexible, understandable, open and standardized, and provides
significant advantages: mobility, contactlessness, price, scalability, responsiveness to
changes in the market of goods and services, speed and efficiency of commercial
transactions, etc.
7
SECTION 1
THEORETICAL INFORMATION ABOUT THE TOOLS USED TOSOLVE THE
TASK
Request sending
Browser Server
Computer File
1
"PHP, MySQL та Dreamweaver MX 2004. Development of Interactive Websites." - St.
Petersburg: BHV-Peterburg, 2005. - 448 pages with illustrations.
8
enable candidates from different regions to connect with others, search for jobs or even
acquire new skills, LinkedIn was programmed in three different programming
languages for web development: JavaScript, Java and Scala, and then used Voldemort
as a distributed database to store the huge number of profiles.
Accordingly, programming languages for web development can be defined as
"complex logical instructions and processes" that help create websites that meet certain
requirements.
So, let's take a look at the most popular programming languages for web
development and determine which of them is the best for solving our task.
JavaScript
Whenever you talk about web development, the name JavaScript is most likely
mentioned 9 out of 10 times. According to the annual reports of various popular
platforms like Stack Overflow and Octoverse, JavaScript is one of the best and leading
programming languages in the world of technologies.
One of the main reasons for this is that a particular language can be used for both
front-end and back-end web development.
Looking at some previous trends and statistics, we can say that the popularity of
Node.js has somehow increased the use of JavaScript as a back-end language for web
development. Meanwhile, the language provides you with great features for server-side
development, such as a lightweight scripting language, dynamic typification,
interpretation, support for object-oriented programming, client-side validation, huge
community support, and much more.
JavaScript frameworks for server-side web development: Next.js, Express,
MeteorJS, etc.
Popular websites using JavaScript: Facebook, Google, eBay, etc 2.
2
"PHP and MySQL Web Development (4th Edition)", Luke Welling, Laura Thomson 848 pages., with ill.;
ISBN 978-5-8459-1574-0, 978-0-672-32916-6.
9
Figure 1.2 - Example of JavaScript Development
Python
Although Python is quite famous among people for its compatibility with
advanced technologies like machine learning, IoT, data science, etc., this powerful
programming language is widely used and very suitable for server-side web
development also. Even one of the leading IT giants of today, Google, relies heavily on
Python, and it is one of the three main languages used by Google (the other two are Java
and C++).
One of the main advantages of using Python for web development is the huge set
of standard libraries that make the work of developers comparatively easier and more
efficient. Additional outstanding and unique features of Python, such as better code
readability, easier integration with other languages, support for GUI programming,
portability, and many other factors make it a more preferred language among web
developers.
Python frameworks for server-side web development: Django, Flask, Pyramid,
etc.
Popular websites using Python: Spotify, Pinterest, Instacart, etc3.
3
«Joomla! 1.5. User Manual", D.M. Kolisnichenko, with illustrations; ISBN 978-5-8459-1509-2; 2009,
224 p.
10
Figure 1.3 Example of Python Development
PHP
11
Popular websites using PHP: WordPress, MailChimp, Flickr, etc 4.
Ruby
Ruby is another programming language that is great for web development. Like
PHP and Python, Ruby is also easy to learn and suitable for beginners.
What makes Ruby special for web development is the Ruby on Rails
environment that powers sites like Github, Shopify, Airbnb, Groupon, GoodReads, and
Kickstarter.
Rails is a model-view-controller (MVC) environment that provides standard
frameworks for databases, web services, and web pages. It encourages and facilitates
the use of web standards such as JSON or XML for data transmission and HTML, CSS,
and JavaScript for user interaction.
The language itself is high-level and purely object-oriented, meaning that "every
value is an object," and Ruby has no primitive data types. It also has strict dynamic
typification and automatic garbage collection, i.e. memory management form.
Ruby's syntax is relatively similar to that of Python and Perl and is quite flexible.
While this makes Ruby easy for programmers to read, it can easily produce
4
Engine for Your Site. CMS Joomla! Slaed, PHP-Nuke». D. Kolesnychenko, St. Petersburg: BHV Peterburg,
368 p.
12
unpredictable runtime errors that are difficult to debug 5.
Java
5
Joomla! Practical Guide"., North B., 448, St. Petersburg: SimbolPlyus.
6
"Joomla! Self-Taught", Dan Ramel, BHV-Peterburg, 2008, 448 p
13
Figure 1.6 - Example of Java Development
C#
C# is one of the few languages that has been consistently ranked among the top
five programming languages by various standard indices for the past few years.
However, it is necessary to know that this general-purpose language was originally
developed by Microsoft primarily for the .Net platform. Along with server-side web
development, C# is now widely used in many areas such as Windows application
development, game development, etc. The language provides you with various useful
features such as fast compilation, interoperability, scalability and upgradability,
component-oriented, structured language and many more. In addition, C# offers a rich
set of libraries that help developers speed up and improve the development process
efficiency. So, if you are looking for a programming language for web development,
you can also try C#.
C# frameworks for server-side web development: .NET
Popular websites using C#: GoDaddy, Marketwatch, Stack Overflow, etc 7.
7
Creating Websites with Joomla! 1.5". Hagen Graf, Williams Publishing House, 304 p., 2009.
14
Figure 1.7 - Example of C# Development
Table 1.1
Imperative + + + + + +
Object-Oriented + + + + + +
15
General
+ + + + + +
Programming
Logical - - - - - -
Table 1.2
Static typification + + - - - -
Dynamic typification + - + + + +
Implicit typification + - + + + +
Table 1.3
16
Unmanaged pointers + - - - - -
Manual memory
+ - - - - -
management
Garbage collection + + + + + +
Table 1.4
Anonymous functions + + + + + +
Lexical closures + + + + + +
Partial application - - + - + +
Currying + - + + + +
Table 1.5
Interfaces + + + + + -
17
Multimethods +/- - - - - -
Mixins - + + + + +
Renaming during
- - - - - -
inheritance
Multiple inheritance - - - - + -
Let's analyze all active sites and get the following chart:
From the performed analysis, we can see that about 79% of sites whose backend
is known use PHP in their design 8.
8
Web Database Application with PHP and MYSQL", 2nd Edition by David Lane, Hugh E. Williams. ©
O'Reilly, May 2004. ISBN: 0-596-00543-1.
18
1.3 Analysis of Existing DBMS to Solve the Given Task
Database is a systematic collection of data. They support electronic data storage and
manipulation. Databases greatly simplify data management.
Here's an example of database: online telephone directory uses a database to store
information about persons, phone numbers, and other contact information. Electricity
supplier uses database to manage billing, customer-related issues, fault data
processing, etc.
Let's also consider Facebook. It should store, process, and serve data related to
members, their friends, member actions, messages, advertising, and more. There are
many examples of how to use databases 9.
Remote database
IP-address
server
Output data
Application program IP- Client IP-address
address
So, let's consider the most popular database management systems and
determine which of them will be the best for solving the task.
9
CMS List. Cms Overview. Site about site management systems. [Electronic resource] Access mode:
http://www.cmslist.ru
19
MySQL
Advantages of MySQL:
MariaDB
10
MySQL 4 – String functions [Electronic resource] Access mode:
http://www.codenet.ru/db/mysql/mystring4.php
20
security and password validation, MariaDB provides features such as PAM and LDAP
authentication, Kerberos, and user roles. Combined with encrypted tablespaces, tables,
and logs, it creates a high level of data protection.
Wide range of functionality. MariaDB has introduced many new functions over
the past few years. For example, GIS support provides smart storage of coordinates and
requests for location data. Dynamic columns allow a single DBMS to provide SQL and
NoSQL data processing for a variety of needs.
High productivity. Although MariaDB is derived from the MySQL engine, it has
come a long way in terms of performance.
Oracle
Advantages of Oracle:
Innovations for the daily workflow. Starting with Oracle version 12c, when
the software entered the hybrid cloud era, new cloud computing technologies
appeared regularly. With each new release, Oracle tries to keep up with the pace of
innovation, paying special attention to information security, including active data
protection, partitioning, improved backup and recovery.
Powerful technical support and documentation. Oracle provides decent
customer support and provides comprehensive technical documentation for several
resources. That way, you're likely to find a solution to any problem you may have.
11
Web development [Electronic resource] Access mode: http://fcit.tneu.org/web-rozrobka/
21
Large capacity. Oracle's multi-model solution allows to host and process huge
amounts of data. With the newly released multi-tenancy feature,
the database architecture now makes it easier to package multiple databases and
seamlessly manage them 12.
PostgreSQL
22
1.4 Comparative Characteristics of Possible DBMS for Use in Online-Contester
Development to Check Student Programming Works
23
Oracle The latest innovations and The cost of Oracle can be very
impressive functionality are prohibitive, especially for small
already implemented in this organizations.
product, as Oracle strives even The system may require significant
against the background of resources immediately after
other DBMS developers. installation.
Oracle is extremely reliable.
MariaDB Performance indicators will let Today, the stability is lower than
you know how the request is that of MySQL, so even on new
being processed. projects it is recommended to install
Frequency of Use
Let's analyze all cases of DBMS use and obtain the following chart:
24
Figure 1.11 - Analysis of DBMS Use
As we can see, about 50% of sites whose backend is known use the MySQL
database in their design 14.
1.5 Selection of Tools for Solving the Task Based on the Analysis Performed
After the analysis and comparative characteristics between the tools that are
relevant in our time and the most suitable for solving our task has been performed, we
have the opportunity to conclude which of them we will use in the process of work
performing.
To write the visual part of Online-Contester Interface for Checking Student
Programming Works, HTML will be used as the main markup for the pages that will
be displayed to the user and
CSS will be used to style these pages and give them the look we need. JavaScript will
be used for dynamic changes. PHP will be used as the language for the backend part, the
analysis showed that this language is the most suitable for the task, as it has a fairly
clear structure, is completely free to use, has good performance indicators and is
excellent for writing web - applications, which is unequivocally confirmed by the
frequency of its use. MySQL was chosen as the DBMS because it is quite easy to use,
has a lot of functionality, is safe, has good speed of operation, and also has an interface
for interacting with PHP. PHPStorm was chosen as the IDE for development, and
14
Databases: Development and Management: Book / Hansem G., Hansem J. - M: Binom, 2010. - 704 p.
25
PHPMyAdmin was chosen to visualize the work with the database.
26
1.6 Conclusions to the Section
In this section, the main theoretical data on tools for solving the task were given.
The analysis and comparative characteristics of these tools have been carried out. Based
on the analysis performed, the tools that mostly satisfy the task were chosen, in
particular: writing the visual part of Online-Contester Interface for Checking Student
Programming Works, HTML will be used as the main markup for the pages that will be
displayed to the user and CSS wil be used to style these pages and give them the look
we need. JavaScript will be used for dynamic changes. PHP will be used as the
language for the backend part, MySQL was chosen as the DBMS, PHPStorm was
chosen as the IDE for development, and PHPMyAdmin was chosen to visualize the
work with the database.
27
SECTION 2
ANALYSIS OF THE SUBJECT AREA AND SPECIFICATION OF
REQUIREMENTS FOR ONLINE-CONTESTER FOR CHECKING STUDENT
PROGRAMMING WORKS
The designed object is a web application for automating the process of checking
student programming work.
The web application allows the user to register in the application, log in to the
application, choose the topic according to which he/she submits the work, download the
completed work in a special form, get an assessment according to the check carried out
by the application, leave feedback on the application operation, and make a service
franchise.
Today, there is a great need for automation of services for checking student
works, so you need to have your own strategy to ensure that this task is performed as
automated as possible with the help of the developed software product In order for a
conditional student to hand in a work for review, he or she needs to perform a large
number of actions, such as traveling to a higher education institution, finding a teacher,
and having the teacher check the correctness of the work, which causes a lot of
inconvenience, especially given the large number of students. To solve this problem, the
most effective way will be to create a web application with a clear user interface and the
implementation of the functionality described above.
This system will allow you to check the completed programming task as quickly
and conveniently as possible without leaving your personal computer, which will
improve the quality of this service, significantly increase the comfort of checking
students' work, and free up a lot of time for teachers.
28
2.2 Description of the Subject Area
- obtaining information about ongoing works that the student can submit;
- possibility of authorization in the application;
- possibility to register in the application;
- possibility to obtain information on the performance of work;
- possibility to upload the completed work to a special form;
- receiving an assessment of the completed task;
- possibility of registering an application franchise;
- possibility to leave feedback on the application's performance.
Figure 2.1 shows a diagram of the development processes for a software product
under design.
Web site developers
Сustomer and its
services Web designer
Web artist
Web programmer
Web site
development
Hosting
Commissioning
29
Fig. 2.1 - Diagram of Software Product Development Processes
Check of the programming work completed gives the user the opportunity to
choose a topic according to which he/she will complete the work, upload a file with the
completed work to a special form, which will be automatically checked and results will
be entered into the database of student results.
30
Main participants User, Server
Figure 2.2 shows the view of the web application home page
31
Figure 2.2 - View of the Application Home Page
This application has a very simple and intuitive interface, but very limited
functionality.
The application screen displays 3 fields for entering code in html, css, Javascript
and a field for outputting the result of code execution. Clicking on a tab opens detailed
information attached to it. There is an opportunity to leave feedback on the application.
The application has the ability of user authorization and registration.
Next, let's consider Html-tester web application:
Figure 2.3 shows the view of the web application home page
32
Figure 2.3 - View of the Web-Application Home Page
This application has even less functionality, navigation through the application is
presented in the form of a horizontal menu. The application allows to check and format
HTML code online. Clicking on a tab opens detailed information attached to it.
Application does not have the ability to authorize and register users.
This application displays examples of mistakes that can be made when writing a
33
code; navigation through the application is presented in the form of a horizontal menu;
it is possible to select a topic on which to complete the task and upload it for checking.
There is also an opportunity to leave feedback about the application. Clicking on a tab
opens detailed information attached to it. The application has the ability of user
authorization and registration.
34
Functionality In this application, In this This application
the user can enter application, the displays examples
the code for user can check of mistakes that can
verification in and format the be made when
html, css, HTML code writing a code;
javascript online, there is no navigation through
programming possibility of the application is
languages and authorization or presented in the
immediately see registration. form of a horizontal
the result, can Clicking on a tab menu; it is possible
register, authorize, opens detailed to select a topic on
configure the information which to complete
interface. The attached to it. the task and upload
interface is easy to it for checking.
use for common There is also an
user. opportunity to leave
feedback about the
application. The
application has the
possibility of
authorization and
registration.
35
portal, as well as a convenient and intuitive user interface for the common user.
Also, a significant advantage is the possibility to leave feedback on the
application's operation and to make a franchise for cooperation with the application.
The main drawback is the lack of features listed above, as well as unintuitive
and difficult to understand user interface, which makes it difficult to work with the
system.
All of the above advantages and disadvantages were taken into account when
developing the web application to automate the process of checking student
programming works with the intended name "StudentsWorks".
15
Technologies of program development and testing [Electronic resource]. Access mode:
http://moodle.ipo.kpi.ua/moodle
36
Internet Service Services provided on the Internet with the help
of special programs
Keywords Words that have a significant semantic load,
they are the key when searching for
information on the Internet or on a website
page.
Contester Program It is a system for checking works and
individual solving of programming tasks,
containing task conditions and possibility of
checking solutions in most modern languages.
37
The designed application has the following functions:
- obtaining information about ongoing works that the student can submit;
This project is being developed for the most automated process of checking
student programming works.
Obtaining
User,
1 information Mandatory High
Database
about ongoing
works
Getting
information User,
2 Mandatory High
about the Database
selected work
38
Authorization
User,
3 in the Mandatory Medium
Database
application
Registration in User,
4 Mandatory Medium
the application Database
Submitting a User,
5 Recommended High
request to Database,
purchase an
application Administrator
franchise
Sending a
feedback on User,
6 Recommended High
application Database
operation
Uploading
7 work for Mandatory Mandatory User
checking
Obtaining
8 the work Mandatory Mandatory User
result
Name of the
Requirement ID Priority Complexity Contact
requirement
39
Basic
requirements
for new system User
1 Optional Low
application in Administrator
relation to other
systems
Requirements
for compliance
User
2 with graphical Recommended Low
Administrator
user interface
standards
Requirements for
7 programming Recommended Medium Administrator
technology
40
program should work correctly on compatible equipment.
The project is implemented in a scripting system (PHP), includes a
language interpreter, a set of functions for accessing databases and various
Internet services. The use of this product imposes the following hardware and
software requirements 16:
— Intel Pentium III Processor 866 MHz and above (Intel Pentium IV / Celeron 1800 MHz
is recommended);
— RAM 1024 MB and above;
— disk space of at least 100 MB;
— video card 256MB;
— minimum screen resolution of 1024x768;
— 32-bit Windows operating system (NT/2000/XP/Vista/Seven/10);
— Flash technology support;
— Internet browser: Opera, Mozilla Firefox, Internet Explorer, Google Chrome;
— mouse manipulator;
— keyboard.
For the correct launch of the software product on the server, the following server
hardware and software requirements are defined:
— Operating system - Linux (CentOs, Debian, etc.).
— PHP 7, Mariadb, Nginx, PHP-FPM
— RAM ranging from 2 GB.
— Availability of SSD
— Processor with at least 2 cores.
— Vesta, ISPmanager
16
Types of software testing [Electronic resource] Access mode:
http://qalearning.com.ua/theory/lectures/material/testing-types-functional/
41
2.5.2. Rationale for Chossing OS and Data Exchange Protocol
Windows Server Standard Edition was chosen for the server, an operating
system designed specifically for small departments of companies and ensures efficient
file and printer sharing, secure Internet connection, centralized deployment of desktop
applications, and web-based solutions for organizing interaction between employees,
partners, and customers.
Windows Server Standard Edition ensures a high level of reliability, scalability
and security.
The Microsoft Windows 10 operating system is chosen for the workstations, as it
has a high level of security, including the ability to encrypt
files and folders for the purpose of corporate information protection; support for mobile
devices to ensure the possibility to work autonomously or connect to a computer in
remote mode; built-in support for high-performance multiprocessor systems; possibility
to work with Microsoft Windows Server and enterprise management systems; effective
interaction with other users around the world thanks to multilingual support capabilities.
The program has the Ukrainian interface, which is convenient for all users of the
enterprise.
42
key transmitted through a closed channel, En(M) is an encryption operation, and Dk(M)
is a decryption operation.
The substitution operation meets the first requirement of a symmetric cipher by
getting rid of any statistics by shuffling the bits
of the message according to a certain given law. The permutation is necessary to meet
the second requirement - making the algorithm nonlinear. It is achieved by replacing a
certain part of the message of the specified volume with a standard value by referring to
the original array 17.
Symmetrical systems have their advantages and disadvantages compared to
asymmetric ones. The advantages of symmetric ciphers include a high-speed
encryption, a shorter required key length with similar stability, great study and ease
of implementation. The disadvantages of symmetric algorithms are primarily the
complexity of key exchange due to the high probability of breaking the key
secrecy during the necessary exchange, and the complexity of key management in
a large network.
17
Transferring files from localhost to server [Electronic resource]. Access mode:
http://joomlaportal.ru/faq/installation-and-update/51-perenos-sajta-slocalhost-na-server
43
SECTION 3
Table 3.1
44
2 Booking Module for implementing the task execution logic
directly, where the task conditions, execution time,
execution language, and logic of interaction with the
database are loaded from the database.
45
7 Check Module for implementing the logic of checking the
program code downloaded by the client. After
completing the verification process, it sends the
verification result using the GET method to the
interaction page.
46
over a computer network on separate hardware, but both client and server may
reside in the same system. Examples of computer applications that use the client–
server model are email, network printing, and the World Wide Web 18.
For this site, the first level of the architecture is the browser, from which all
user operations are performed. On the second level - system logic,
that is, how the web server processes the information. The third level is a DBMS that
stores data for the server.
Table 3.3
Table of Identifiers
47
Role Varchar 100 Role
Table Login Varchar 100 Login
Name Varchar 100 Name
Last Name Varchar 100 Lname
Password Varchar 100 Password
Country Varchar 100 Country
ID varchar 100 msgID
Sender Name varchar 100 senderfname
Feedback Sender's Last
varchar 100 senderlname
Table Name
Sender's email varchar 100 sendereMail
Feedback Varchar 500 Senderfeedback
48
Name Varchar 100 Name
Surname Varchar 100 Sname
Franchise Company Varchar 100 Company
applicatio Position Varchar 100 Position
n table City Varchar 100 City
Phone Varchar 100 Phone
Email Varchar 100 Email
ID Varchar 100 Id
Table of Poster Varchar 100 Img
Informatio Name Varchar 100 Name
n on Tasks Description Varchar 1000 Description
to Be Right answer Varchar 100 Rightanswer
Performed Time Varchar 100 Time
Language Varchar 100 Language
ID Varchar 100 Id
Table of Name Varchar 100 Name
completed Student login Varchar 100 Login
tasks Performance result Varchar 100 Result
Date performed Varchar 100 Data
One of the main design tasks was to create a convenient application interface,
which would allow the user to interact with the functionality.
All data for filling user pages are in the database. Forms sent by the user are also
sent to the database to be processed. Further, the implementation of each page is
described in detail in the subsections.
49
3.4.1 Header and Footer Software Implementation for Web Pages
Header is a block at the top of the site page that is visible on all pages of the site.
Footer is a block at the bottom of the page. It contains useful, but not essential
information.
Header and Footer are used in order not to write the same code repeatedly on
many web pages. This practice is incredibly convenient and saves a lot of time, and also
makes the code much more readable.
<div class="navbar-brand">
<a href="index.php">
<h1 class="navbar-heading">StudentWorks</h1>
</a>
</div>
<div class="navbar-container">
<nav class="navbar">
<ul class="navbar-menu">
<li><a href="index.php">Main</a></li>
<li><a href="franchase.php">Franchise</a></li>
<li><a href="contact-us.php">Connection</a></li>
<li><a href="logout.php">Go out</a></li>
</ul>
</nav>
</div>
It was decided to place in the footer the links to social networks, as well as
contact information about the application and general information about it. The software
implementation is given below:
50
considered.</p>
<p>Phone: +2 010 11 39 11 48</p>
<p>E-mail: studentworks@gmail.com</p>
</div>
</div>
<div class="footer-section footer-section3">
<p>© 2022 StudentWorks. Created by Myself. </p>
<a>Advertising</a>
<a>Privacy Policy</a>
<a>Contact </a>
</div>
Interactive blocks were placed on the home page for the user to select a task to
perform and a direct link to go to this task page. Also, the page presents tips for working
with the portal in the form of dynamic icons and video recordings on the topic of
students' work.
<?php
session_start();
if($_SESSION['itlogin'] == ""){
header('Location: /auth.php');
}else{
$login = $_SESSION['itlogin'];
}
$link = mysqli_connect("localhost", "root", "", "students");
$sql = "SELECT * FROM movietable";
?>
<header></header>
<div id="home-section-1" class="movie-show-container">
<h1>welcome , <? echo $login ?></h1>
<h3>Please choose one of the current programming jobs
available to you</h3>
<div class="movies-container">
<?php
if($result = mysqli_query($link, $sql)){
$lines = mysqli_num_rows($result);
if(mysqli_num_rows($result) > 0){
for ($i = 0; $i <= $lines - 1; $i++){
$row = mysqli_fetch_array($result);
echo '<div class="movie-box">';
echo '<img src="'. $row['movieImg'] .'" alt="
">';
echo '<div class="movie-info ">';
echo '<h3>'. $row['movieTitle'] .'</h3>';
echo '<a href="booking.php?id='.
$row['movieID'].'"><i class="fas fa-ticket-alt"></i> Go to
execution</a>';
echo '</div>';
51
echo '</div>';
}
mysqli_free_result($result);
} else{
echo '<h4 class="no-annot">There are currently no
tasks</h4>';
}
} else{
echo "ERROR: Could not able to execute $sql. " .
mysqli_error($link);
}
// Close connection
mysqli_close($link);
?>
</div>
</div>
This part of the code implements user authorization in the application, if the user
is not authorized, he will be automatically sent to the authorization page. This part also
implements interactive blocks and links for starting tasks available for student to
complete. The task list is loaded from the database when the page is loaded. When
clicking on the task block, the user will be sent to the task performance page along with
the id of this task using the GET method.
52
<div class="service-item"></div>
</div>
</div>
This section of code implements a menu with tips for working with the
application. The tips are presented in the form of dynamic icons that light up when you
hover.
53
<h3>Java course 2</h3>
<i class="far fa-3x fa-play-circle"></i>
</div>
</div>
</div>
</div>
54
Figure 3.2 - General View of Home Page
55
3.4.3 Creating a Page for the Student to Complete the Selected Task
General information about the task chosen by the student was placed on the
page of the student's performance of the chosen task. Information about the task is in
database and is extracted from it at user’s request. A form was also placed on the
page for student to write directly the program code which will be checked.
After filling in and pressing Send for Checking button, the code will be
executed in the corresponding module and the execution result will be returned to the
page. After receiving the result, the script will compare it with the correct answer in
the database and enter into the database a request about the result of student task
performance, which the teacher can see using the administration page
<?php
session_start();
$login = $_SESSION['itlogin'];
$id = $_GET['id'];
$link = mysqli_connect("localhost", "root", "", "students");
$movieQuery = "SELECT * FROM movietable WHERE movieID = $id";
$movieImageById = mysqli_query($link,$movieQuery);
$row = mysqli_fetch_array($movieImageById);
$rightanswer = $row['rightanswer'];
if(isset($_GET['result'])){
if($_GET['result'] == $rightanswer){
$answer = 'That's right';
echo "<script>alert('You have successfully completed
the task')</script>";
}
else{
$answer = 'Wrong';
echo "<script>alert('Unfortunately, you did not
complete the task correctly')</script>";
}
$now = date('l jS \of F Y h:i:s A');
$insert_query = "INSERT INTO
bookingTable ( movieName,
bookingTheatre,
bookingType,
bookingDate)
VALUES ( '".$row['movieTitle']."',
'$login',
'$answer',
'$now')";
mysqli_query($link,$insert_query);
exit("<meta http-equiv='refresh' content='0; url=
index.php'>");
}
?>
56
In this part of the code, a connection to the database is made, information about
the current service is extracted from the database by its ID, which is transmitted by the
GET method along with the page load. After that, the received GET request is checked
to determine the further process of the script.
<div class="booking-panel">
<div class="booking-panel-section booking-panel-section1">
<h1>Please familiarize yourself with the terms and conditions
and complete the task!</h1>
</div>
<div class="booking-panel-section booking-panel-section2"
onclick="window.location.href = 'index.php'">
<i class="fas fa-2x fa-times"></i>
</div>
<div class="booking-panel-section booking-panel-section3">
<div class="movie-box">
<?php
echo '<img src="'.$row['movieImg'].'" alt="">';
?>
</div>
</div>
<div class="booking-panel-section booking-panel-section4">
<div class="title"><?php echo $row['movieTitle']; ?></div>
<div class="movie-information">
<table>
<tr>
<td>The condition</td>
<td><?php echo $row['description']; ?></td>
</tr>
<tr>
<td>Time to perform</td>
<td><?php echo $row['time'] / 1000 . ' minutes'; ?
></td>
</tr>
<tr>
<td>Execution language</td>
<td><?php echo $row['language']; ?></td>
</tr>
</table>
</div>
<div class="booking-form-container">
<form action="check.php" method="POST">
<textarea name="code" style="width: 90%;height: 400px;
background-color: black; font-family: 'Modern No. 20';color: white;
padding: 10px; font-size: 100%;">Enter your program code
here</textarea>
<input name="id" type="hidden" style="width: 0;"
value="<? echo $id?>" >
<button type="submit" value="submit" name="submit"
class="form-btn">Send for verification</button>
</form>
57
In this part of the code, a page with a description of the task to be performed is
generated using the data received from the database. This code will work with any data
that the administrator enters into the database of tasks. This code is also responsible for
generating a form where the user enters the code of the completed task to be checked.
By clicking Send for Checking button, if the data are valid, it is sent to the verification
module for compilation and checking for correct execution.
3.4.4 Creating a Page for the Student to Complete the Selected Task
This page contained a form for filing an application to obtain a franchise of the
application by representatives of higher education institutions. After filling out this
form, if the data are valid, it is sent to the application database for further processing by
the application administration.
<?php
$link = mysqli_connect("localhost", "root", "", "students");
?>
<header></header>
<div>
<div mt="150px" class="container">
58
<div class="row">
<div class="col-3"></div>
<div class="col-6">
<h1><center>To purchase a franchise of the application,
please fill out the form!</center></h1><br>
<form action="" method="POST" >
<div class="box-body">
<div class="step_1">
<div class="form-group">
<label for="First_name">Name :-</label>
<input type="text" class="form-control
first_name " name="name" required>
</div><br>
<div class="form-group">
<label for="Second_name">Surname:-</label>
<input type="text" class="form-control
second_name" name="sname" required>
</div><br>
<div class="form-group">
<label for="birthday">University:-</label>
<input class="form-control birthday"
required type="text" name="company" >
</div><br>
<div class="form-group">
<label for="subject">City:-</label>
<input class="form-control subject"
required type="text" name="position" >
</div><br>
<div class="form-group">
<label for="country">Country:-</label>
<select class="form-control country"
name="country" id="country" >
<?php
$arr =
array("Ukraine","Poland","Latvia","Lithuania","Romania","Kazakhstan","
Other Country");
foreach ($arr as &$value) {
echo "<option>".
$value."</option>";
}?>
</select>
</div><br>
<div class="form-group">
<label for="phone">Phone:-</label>
<input class="form-control phone"
type="tel" placeholder="+(099) 999 99 99)" name="phone" >
</div><br>
<div class="form-group">
<label for="email">Email :-</label>
<input class="form-control email"
required type="text" name="email" >
</div><br>
<div class="box-footer">
<button type="submit" name="submit"
value="submit" class="btn btn-danger">Send</button>
</div>
59
</div>
</div>
<?php
if(isset($_POST['submit'])){
$insert_query = "INSERT INTO
franchase ( name,
sname,
company,
position,
country,
phone,
email)
VALUES ( '".$_POST["name"]."',
'".$_POST["sname"]."',
'".$_POST["company"]."',
'".$_POST["position"]."',
'".$_POST["country"]."',
'".$_POST["phone"]."',
'".$_POST["email"]."')";
mysqli_query($link,$insert_query);
echo "<script>alert(\"Thank you, after reviewing
the application, our manager will contact you!\");</script>";
}
?>
</form>
</div>
</div>
This code is responsible for connecting to the database, creating a form with
fields for first name, last name, country, city, type of franchise, phone and brief
comment. After clicking the button, if the data are valid, it will be sent to the database,
and a pop-up message will appear on the screen that the application has been sent for
consideration.
60
Figure 3.4 - Full View of the Application Filling in Page for the Application Franchise
Purchase
This page contained additional information about the application, address, phone
numbers and email of the conditional office, as well as a card with its location was
embedded. Below was a form in which the user can leave feedback on the use of
application.
<?php
$link = mysqli_connect("localhost", "root", "", "students");
?>
<header></header>
<div class="gmap_canvas"><iframe id="gmap_canvas"
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!
1d3262.5815823728194!2d-80.73889560000869!3d35.14211377150105!2m3!1f0!
2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!
1s0x885421a2eb1e7ea9%3A0x338011bddfd77820!2sWeb%20Development
61
%20Company%20Charlotte!5e0!3m2!1sru!2sua!4v1654828127938!5m2!1sru!
2sua" width="600" height="450" style="border:0;" allowfullscreen=""
loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
</div>
<div class="contact-us-container">
<div class="contact-us-section contact-us-section1">
<h1>Leave your feedback about the service here! </h1>
<form action="" method="POST">
<input placeholder="Your name" name="fName"
required><br>
<input placeholder="Your surname" name="lName" ><br>
<input placeholder="E-mail address" name="email"
required><br>
<textarea placeholder="Message text !" name="feedback"
rows="10" cols="30" required></textarea><br>
<button type="submit" style="margin-left: 3%; width:
20%;" name="submit" value="submit">Send</button>
<?php
if(isset($_POST['submit'])){
$insert_query = "INSERT INTO
feedbackTable ( senderfName,
senderlName,
sendereMail,
senderfeedback)
VALUES ( '".$_POST["fName"]."',
'".$_POST["lName"]."',
'".$_POST["eMail"]."',
'".$_POST["feedback"]."')";
mysqli_query($link,$insert_query);
}
?>
</form>
</div>
<div class="contact-us-section contact-us-section2">
<h1>Address & Information</h1>
<h3>Our numbers</h3>
<p><a href="tel:01011391148">+2 010 11 39 11 48</a><br>
<a href="tel:01011391148">+2 010 11 39 11 48</a></p>
<h3>Address</h3>
<p>El Sherouk City , Suez Desert Road , Cairo 11837 - P.O.
Box 43</p>
<h3>E-mail</h3>
<p><a
href="mailto:cinemareservation@bue.edu.eg">StudentWorks@gmail.com</
a></p>
</div>
</div>
This code is responsible for connecting to the feedback database, displaying and
functioning of the feedback form. To
submit, the user should fill in the form fields and click the submit button, if they are
valid, they will be sent to the feedback database for further processing. Contact
62
information is also displayed on the page.
A form for user registration in the application was placed on this page.
Registration is mandatory for further use of the service.
The page implements a registration form with fields for login, password, first
name, last name and country of the user.
The logic of the page is responsible for verification of the data validity from the
registration form, and if they are valid, the data will be sent to the user database.
63
Figure 3.6 - General View of Registration Page
This page contains a form for authorization in the application. The data entered
into the form will be checked for matching with the database,
and if they match, the user will be moved to the home page of the portal.
The page implements connection to the database, creating a form with name and
password fields, and checking for their availability in the site's database.
64
Figure 3.7 - General View of Authorization Page
65
CONCLUSION
66
LIST OF REFERENCES
67
15. Technologies of program development and testing [Electronic resource]. Access
mode: http://moodle.ipo.kpi.ua/moodle
16. Types of software testing [Electronic resource]. Access mode:
http://qalearning.com.ua/theory/lectures/material/testing-types-functional/
17. Transferring files from localhost to server [Electronic resource]. Access mode:
http://joomlaportal.ru/faq/installation-and-update/51-perenos-sajta-slocalhost-na-
server
18. Client-Server Architecture [Electronic resource] Access mode:
http://inter.ptngu.com/
68