0% found this document useful (0 votes)
31 views58 pages

E Learning Applicatiion Final Report (1) vbmn0098

The document discusses developing an e-learning management system application for Android. It aims to provide a user-friendly environment for online learning regardless of location. The system would allow users to select subjects of interest, take quizzes and homework assignments, access study materials, view notices, and more through the mobile app.

Uploaded by

Pankaj Gorle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views58 pages

E Learning Applicatiion Final Report (1) vbmn0098

The document discusses developing an e-learning management system application for Android. It aims to provide a user-friendly environment for online learning regardless of location. The system would allow users to select subjects of interest, take quizzes and homework assignments, access study materials, view notices, and more through the mobile app.

Uploaded by

Pankaj Gorle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Government Polytechnic, Murtizapur

Institute Code: 1241

Department of Information Technology


Project Report on

“E- Learning Application” Subject: -


Capstone Project (22060)
GUIDED BY: -
Prof. A.P.Jane
(HOD in Information Technology)
SUBMITTED BY:-

Roll No. Name Enrollment No.

24 Anand Santosh Kakad 2112410154

17 Pankaj Najukrao Gorle 2112410146

20 Yash Shridhar Harne 2112410149

18 Pranav Santosh Hage 2112410147

54 Aditya Gopal Khumkar 2112410160


CERTIFICATE

Department of Information Technology


Government Polytechnic, Murtizapur
2023-2024

This is to certify that the Project Report on

E- Learning Application
Is a bonafide work and it is submitted to
Maharashtra State Board of Technical Education
Submitted By
Roll No. Name Enrollment No.
24 Anand Santosh Kakad 2112410154
17 Pankaj Najukrao Gorle 2112410146
20 Yash Shridhar Harne 2112410149
18 Pranav Santosh Hage 2112410147
54 Aditya Gopal Khumkar 2112410160

During the academic year 2023 – 2024 Under the


guidance of
Prof. A.P.Jame

Name of Guide External


Examiner Prof. A.P.Jane

Prof. A.P.Jane Dr.A.A.Gulhane

Head Department of IF Principle


ACKOWLEDGEMENT

We take this opportunity to express our profound gratitude and the whole hearted thanks to
our project guide, Prof A.P.Jane , HOD, DEPARTMENT OF INFORMATION TECHNOLOGY for
her valuable guidance, kind suggestions and constant encouragement and providing us the
opportunity to work in an exciting and challenging field of Android Application. Our in interaction
with him has been of immense help in defining our project goal and in identifying ways to achieve
the goal.
We are also very much indebted to, head Prof A.P.Jane HEAD OF DEPARTMENT OF
INFORMATION TECHNOLOGY for motivation and effective support. We also thank all Non-
Teaching Staff of the Department for their comment and opinions and above all valuable guidance
and timely suggestion to accomplish the project dissertation.
Last but not the least, we would like to thank all our friend who helped us directly or indirectly
for the success of our project and the team spirit shown by all has made a project report work
successful.

Pankaj Najukrao Gorle


Yash Shridhar Harne
Pranav Santosh Hage
Anand Santosh Kakad
Aditya Gopal Khumkar
ABSTRACT

E-learning fulfils the thirst of knowledge and offers online content that can be
delivered for the learner at anywhere, anytime and any age through a wide range of e-
learning solution while compared with traditional learning system. It also provides the
rapid access to specific knowledge and information. With the rapid growth of voluminous
information sources and the time constraint the learning methodology has changed.
Learners obtain knowledge through e-Learning systems rather than manually teaching
and learning. In this research paper proposes the elearning management system with web
services oriented frame work and SOA. This system supports the cross browser and fully
integrated with different databases.
This system focused around the several features namely Content Management,
Content Protection, Learning Management, Delivery Management, Evaluation
management, Access Control, etc., and mainly focused on integrated platform needed for
e-learning and managements.

Keywords Quiz, Question ,Homework, Study material, Recording, Notice Board Android
Application.
Index

Sr. No Chapter No. Description

1.1 Motivation
1.2 Objectives
Chapter 1: Brief description of the system/
1 INTRODUCTION Project work

3.1 Related Topics Summary


& Discussion
Chapter 2:
2 LITERATURE REVIEW

3 3.1 Analysis
Brief description about
Chapter 3: Proposed concept/Theory
System Analysis/Design 3.1.1 Problem Definition
3.1.2 Objectives
3.1.3 Feasibility study
3.1.4 Requirement Analysis
3.2 Design
3.2.1 Proposed design
Detail designed

4.1 Setting environment / configuring


4 Chapter 4: system,
System Implementation 4.2 Implementation details System
& Testing Execution details

5 Chapter 5: Conclusion 5.1 Conclusion And Future


Work
& Future scope

6 Chapter 6: 6.1 References


REFRENCES
Chapter 1

INTRODUCTION

This chapter deals with the problem statement that we are intending to solve, the objectives
of our project, the future work that can be done and the limitations of our project. The "E-
learning Management System" has been developed to override the problems prevailing in the
practicing manual system. This software is supported to eliminate and in some cases reduce the
hardships faced by this existing system. Moreover this system is designed for the particular
need of the company to carry out operations in a smooth and effective manner.
The application is reduced as much as possible to avoid errors while entering the data. It
also provides error message while entering invalid data. No formal knowledge is needed for
the user to use this system. Thus by this all it proves it is user-friendly. E-Learning Management
System, as described above, can lead to error free, secure, reliable and fast management system.
It can assist the user to concentrate on their other activities rather to concentrate on the record
keeping. Thus it will help organization in better utilization of resources.
Every organization, whether big or small, has challenges to overcome and managing the
information of Student, Assignment, QUIZ, CLASS, and QUESTION. Every E-learning
Management System has different Assignment needs, therefore we design exclusive employee
management systems that are adapted to your managerial requirements. This is designed to
assist in strategic planning, and will help you ensure that your organization is equipped with
the right level of information and details for your future goals. Also, for those busy executive
who are always on the go, our systems come with remote access features, which will allow you
to manage your workforce anytime, at all times. These systems will ultimately allow you to
better manage resources.

1. Motivation
Polytechnic and Engineering as we all know is the application of science to the
optimum conversion of the resources of nature to the uses of human kind. Engineering has
evolved a lot since its inception and lots of problems has been solved by creating its
applications. But there are still many problems unsolved and so we started our research to
find that one problem which really needed development. During this investigation, we came
across the problem . Elearning becomes an important means of knowledge and skill
acquisition in higher education institutions. Students’ motivation to learn contributes to
knowledge acquisition and hence is of paramount importance to their success in the future.
Many factors impact students’ motivation to learn, and the question of how to stimulate
student to learn remains the subject of much research. As concerns teachers, their role in the
educational process is to create a positive environment which encourages learning and
students’ long-term success.

Finally, we came up with the idea that we call the “E-LEARNING


APPLICATION” which works on Android App. Though there’s much work needed to make
the proposed system more efficient, however it will surely be an immense improvement in
the existing solutions.
1.2 Objectives of project
The main objective behind this project is to provide a user friendly environment to provide
knowledge and give everyone a chance to learn, irrespective of where they are, provided they
register themselves with the system.
The main features that the system provides can be made use of, once the registered people
select their interested subject and take a starter test. This helps to establish incremental learning
process. After taking this, based on their level of competence, they can take available tutorials,
take online tests and also discuss an issue/topic by posting messages in the discussion forum.
Along with this they can also take real time simulations of the most widely known competitive
exams. Project on E-learning Management System is to manage the details of Assignment,
Student, TEACHER, QUIZ, QUESTION. It manages all the information about Assignment,
CLASS, QUESTION, Assignment. The project is totally built at administrative end and thus only
the administrator is guaranteed the access. The purpose of the project is to build an application
program to reduce the manual work for managing the Assignment, Student, CLASS, TEACHER.
It tracks all the details about the TEACHER, QUIZ, QUESTION, ASSIGNMENT,
HOMEWORK,STUDY MATERIAL,RECORDING,NOTICE BOARD.

1.3 Brief description of the system/ Project work


Provides the searching facilities based on various factors. Such as
Assignment, Teacher, Quiz, Question ,Homework, Study material, Recording, Notice Board.
E-learning Management System also manage the Class details online for Quiz details, Question
details, Assignment, Homework, Study material, Recording, Notice Board .It tracks all the
information of Student, CLASS, and QUIZ etc. Manage the information of Student.
Shows the information and description of the Assignment, TEACHER To increase
efficiency of managing the Assignment, Student. It deals with monitoring the information and
transactions of QUIZ. Manage the information of Assignment Editing, adding and updating of
Records is improved which results in proper resource management of Assignment data. Manage
the information of QUIZ Integration of all records of QUESTION Papers.

Focused Moduals
• Registration:-
In this, first the interested students get registered by selecting their desired username and password
and by providing the necessary details.
Then each user profile will be maintained which can be edited by the user when desired.
Each person will register only one time. Details of each person along with their username and
password is saved permanently in the database.
• Login:-
After providing the correct username and password, the user log's in to the eLearning
system's homepage. There the user can select the available subjects to further learn about them.
If user enter wrong username or password then they block their account temporary and after
some security verification they will able to access their account.
o Homepage:-
After providing the correct username and password, the user log's in to the eLearning
system's homepage. Here at the homepage there are many choice for user to learn different
languages like MAD, NIS, c,c++ etc.
User can take following helps:- 1.
Tutorials about the language.
2. View programs in the language.
3. Playing quiz about the language.
4. Download notes and programs.

Modules E-learning Management System:


Assignment Management Module: Used for managing the Assignment details.

Login Module: Used for managing the login details


The Login Module is a portal module that allows users to type a user name and password
to log in. You can add this module on any module tab to allow users to log in to the system.

Users Module: Used for managing the users of the system


The user module allows users to register, log in, and log out. Users benefit from being able
to sign on because this associates content they create with their account and allows various
permissions to be set for their roles.

1. Project work
Chapter 1: Introduction of the Project and the problem statement Chapter 1: Survey of
the research work that has already done.

Chapter 3: The detailed problem statement and the use case of the proposed methodology.

Chapter 4: Design work needed for the proposed solution.


Chapter 5: Implementation and installation of the required software and hardware.
Chapter 6: Conclusion of the project.
Chapter 2
2.1 LITERATURE SURVEY

E-learning systems and programs have played an important role in improving the
interaction between students and teachers. Among the prominent activities provided by learning
management systems are e-teaching materials, which can be presented in different formats.
Eteaching materials in the form of open educational resource (OER) textbooks are discussed
by Dennen and Bagdy (2019). Their study indicated that students have given positive feedback
on OER textbooks and that this type of material contributed to helping them meet course
learning objectives. One recent study found that course activities aligned with learning
objectives such as case studies, group assignments, problem solving, and peer-to-peer
interaction have the highest impact on both student learning and engagement (Sadaf et al.,
2019). E-discussion that aims to engage students with their instructors, course content, or with
each other via synchronous or asynchronous modes has been well documented in the literature.
A study conducted by Truhlar et al. (2018) examined the effects of synchronous chats in an
online course and found that assigning roles to students increased the proportion of
studentstudent interaction. Prior research has also revealed that online discussion and engaging
in interactive assignments stimulate students to share their opinions and develop a personal
perspective (Buelow et al., 2018). Student opinion of the use of online discussion forums varies
across discussion types: structured discussion forums (guided discussion with clearly identified
topic) were received more positively by students than unstructured (students select the topic on
mutual basis) ones (Tibi, 2018). Asynchronous discussion in an online environment is also
investigated by Mitchell (2019). The majority of students in that study indicated that the debate
assignment assisted them in comprehending the course concepts and understanding them better

2.2 Summary & Discussion

The main results show significant positive correlations between the key aspects of
elearning and students’ motivation to learn in AU. This is evidence of the importance of the
appropriate use of key aspects of e-learning in relation to students’ motivation to learn. AU
students have experience dealing with Moodle activities related to e-teaching materials and
eassessments. Since the inception of Moodle at AU, the majority of the Moodle activities used
by the students are related to these two activities. Prior experience with Moodle may have also
contributed to the high correlation between motivation and e-teaching materials and
eassessments. This argument is supported by other researchers (Yili & Tsai, 2017; Slater &
Davies, 2020; Cundell & Sheepy, 2018). The low correlation between motivation variables
and e-discussion and e-grade checking and feedback could be attributed to the absence of real-
time interaction between students and faculty in the way e-discussion and e-grade checking
and feedback are implemented. The implications of these research findings indicate, on the
one hand, that AU students were intrinsically motivated toward learning via eteaching
materials and e-assessments and, on the other, that they are aiming to get good grades
(extrinsic motivation) without sufficient engagement in asynchronous activities. This implies
that the university needs to encourage faculty to develop strategies to further engage students
with such activities to comprehend the course concepts intrinsically and extrinsically
(Mitchell, 2019; Buelow et al., 2018). In addition, AU should consider developing a course
that can be taken early in the student’s term of study and orients them to the importance of
asynchronous activities.

Chapter 3

3.1 Problem Statement :


In today's rapidly evolving educational landscape, there is a
growing reliance on e-learning platforms to deliver educational content and
facilitate remote learning. While these platforms offer unprecedented access to
resources and flexibility in learning, they are often plagued by several challenges
that hinder their effectiveness in engaging students and facilitating meaningful
learning experiences.

3.2 Objectives:-
Improve Student Engagement: Enhance e-learning platforms to
increase student engagement by incorporating interactive elements, gamification,
and multimedia content that cater to diverse learning styles and preferences.
Personalize Learning Experiences: Implement adaptive learning
algorithms and personalized learning pathways to tailor educational content and
activities to individual student needs, interests, and skill levels.

Requirement Analysis :
1. XML: -

XML, or Extensible Markup Language, is not a programming language but a


markup language. It is used for structuring and storing data in a hierarchical and
human-readable format. XML is often used for data interchange between different
systems and for configuration files. With XML, you can conveniently upgrade or
modify your application design. Many technologies, especially newer ones, come
with built-in XML support. They can automatically read and process XML data
files so that you can make changes without having to reformat your entire
database. XML gives structure to the data that you see on webpages. Other website
technologies, like HTML, work with XML to present consistent and relevant data
to website visitors. For example, consider an ecommerce website that sells clothes.
Instead of showing all clothes to all visitors, the website uses XML to create
customized webpages based on user preferences.

➢ Backend Language: -
1. Java:-
Java is a widely used, versatile, and platform-independent programming language
originally developed by Sun Microsystems, which is now owned by Oracle
Corporation. It was first released in 1995 and has since become one of the most popular
programming languages in the world. While most modern Java applications combine
the Java runtime and application together, there are still many applications and even
some websites that will not function unless you have a desktop Java installed.

2. SQL Database:-
SQL stands for Structured Query Language. SQL is the standard language for dealing
with Relational Databases. SQL can execute queries against a database SQL can be
used to insert, search update and delete database records. SQL can do lots of other
operations including optimizing and maintenance of databases.

3. Apache Web Server:-


Apache is most widely used web server software. Developed and maintained by Apache
Software Foundation, Apache is open source software available for free.it runs on 67%
of all web servers in the world. It is fast, reliable, and secure. Web server processes
incoming network requests over HTTP and several other related protocols. The primary
function of web server is to store, process and deliver web pages to clients. When
Apache gets the output back from PHP, it sends that output back to the browser which
renders it to the screen. We used apache server to serve content on the web page.
Code
Splash.java
package com.mountreachsolution.e_learningapp; import
androidx.appcompat.app.AppCompatActivity; import
android.app.ActivityOptions; import android.content.Intent; import
android.os.Bundle; import android.os.Handler; import
android.util.Pair; import android.view.View;
import android.view.animation.Animation; import
android.view.animation.AnimationUtils; import
android.widget.ImageView;
import android.widget.TextView; public class SplashActivity extends AppCompatActivity { private
static int SPLASH_SCREEN = 5000; // Initialize the objects ImageView splash_app_logo;
TextView splash_app_title; Animation top_to_bottom,bottom_to_top; ActivityOptions options;
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); setContentView(R.layout.activity_splash); //find the ids splash_app_logo =
findViewById(R.id.img_splash_logo); splash_app_title = findViewById(R.id.tv_splash_title); top_to_bottom =
AnimationUtils.loadAnimation(this,R.anim.top_to_bottom_anim); bottom_to_top =
AnimationUtils.loadAnimation(this,R.anim.bottom_to_top_anim);
splash_app_logo.setAnimation(top_to_bottom); splash_app_title.setAnimation(bottom_to_top); new
Handler().postDelayed(new Runnable() { @Override public void run() { Intent intent = new
Intent(SplashActivity.this,LoginActivity.class); Pair[] pairs = new Pair[2]; pairs[0] = new
Pair<View,String>(splash_app_logo,"splash_logo"); // pairs[0] = new
Pair<View,String>(splash_app_title,"splash_title");if (android.os.Build.VERSION.SDK_INT >=
android.os.Build.VERSION_CODES.LOLLIPOP) { options =
ActivityOptions.makeSceneTransitionAnimation(SplashActivity.this,pairs[0]); }
startActivity(intent,options.toBundle()); } },SPLASH_SCREEN); } }

splash.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
tools:context=".SplashActivity" android:background="@color/purple_700"
android:gravity="center" > <ImageView android:id="@+id/img_splash_logo"
android:layout_width="200dp" android:layout_height="200dp"
android:layout_centerInParent="true" android:src="@drawable/logo"
android:transitionName="splash_logo" /> <TextView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tv_splash_title"
android:layout_below="@+id/img_splash_logo" android:text="Smart Kaksha
App" android:textAlignment="center" android:textSize="28sp"
android:textStyle="bold" android:textColor="@color/white"
android:fontFamily="@font/bungee" android:layout_marginTop="50dp"
android:transitionName="splash_title"/> </RelativeLayout>

Login.java
package com.mountreachsolution.e_learningapp; import
androidx.appcompat.app.AppCompatActivity; import android.app.ActivityOptions;
import android.app.ProgressDialog; import android.content.Intent; import
android.content.SharedPreferences; import android.os.Bundle; import
android.os.Handler; import android.preference.PreferenceManager; import
android.util.Pair; import android.view.View; import android.widget.Button; import
android.widget.ImageView; import android.widget.TextView; import
android.widget.Toast; import com.android.volley.DefaultRetryPolicy; import
com.android.volley.Request; import com.android.volley.RequestQueue; import
com.android.volley.Response; import com.android.volley.VolleyError; import
com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley;
import
com.google.android.material.textfield.TextInputEditText; import
com.mountreachsolution.e_learningapp.Admin.LoginAdminActivity; import
com.mountreachsolution.e_learningapp.Comman.Urls; import
com.mountreachsolution.e_learningapp.HomeActivity.HomeActivity; import
org.json.JSONException; import org.json.JSONObject; import java.util.HashMap;
import java.util.Map; public class LoginActivity extends AppCompatActivity { private
static int SPLASH_SCREEN = 0000; TextInputEditText tie_login_username,
tie_login_password; ImageView img_login_logo; TextView tv_login_as_admin; Button
btn_login_login, btn_login_register; ActivityOptions options; ProgressDialog
progressDialog; SharedPreferences preferences; SharedPreferences.Editor editor;
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login); setTitle("Login Page"); preferences =
PreferenceManager.getDefaultSharedPreferences(LoginActivity.this); editor =
preferences.edit(); if (preferences.getBoolean("isLogin", true)) { Intent intent = new
Intent(LoginActivity.this, HomeActivity.class); startActivity(intent); } img_login_logo
= findViewById(R.id.img_login_logo); tie_login_username =
findViewById(R.id.tie_login_username); tie_login_password =
findViewById(R.id.tie_login_password); btn_login_login =
findViewById(R.id.btn_login_login); btn_login_register =
findViewById(R.id.btn_login_register); tv_login_as_admin =
findViewById(R.id.tv_login_as_admin); btn_login_login.setOnClickListener(new
View.OnClickListener() { @Override public void onClick(View v) { progressDialog =
new ProgressDialog(LoginActivity.this); progressDialog.setTitle("Login User");
progressDialog.setCancelable(true); progressDialog.setCanceledOnTouchOutside(true);
progressDialog.setMessage("Please Wait..."); progressDialog.show(); loginUser();
} }); btn_login_register.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) { new Handler().postDelayed(new
Runnable() { @Override public void run() { Intent intent = new
Intent(LoginActivity.this,RegistrationActivity.class); Pair[] pairs = new
android.util.Pair[2]; pairs[0] = new
Pair<View,String>(img_login_logo,"splash_logo"); // pairs[0] = new
Pair<View,String>(splash_app_title,"splash_title"); if
(android.os.Build.VERSION.SDK_INT >=
android.os.Build.VERSION_CODES.LOLLIPOP) { options =
ActivityOptions.makeSceneTransitionAnimation(LoginActivity.this,pairs[0]); }
startActivity(intent,options.toBundle()); } },SPLASH_SCREEN); } });
tv_login_as_admin.setOnClickListener(new View.OnClickListener() { @Override
public void onClick(View v) { Intent i = new Intent(LoginActivity.this,
LoginAdminActivity.class); startActivity(i); } }); } private void loginUser() {
StringRequest stringRequest = new StringRequest(Request.Method.POST,
Urls.urlLoginStudent, new Response.Listener<String>() { @Override public void
onResponse(String response) { try { JSONObject obj = new
JSONObject(response); String success = obj.getString("success"); String id =
obj.getString("id"); String image = obj.getString("image"); String name =
obj.getString("name"); String mobile_no = obj.getString("mobile_no"); String email_id
= obj.getString("email_id"); String address = obj.getString("address"); String age =
obj.getString("age"); String username = obj.getString("username");
String password = obj.getString("password"); if (success.equals("1")) {
Toast.makeText(LoginActivity.this, response, Toast.LENGTH_SHORT).show();
editor.putBoolean("isLogin", true).commit(); Intent i = new
Intent(LoginActivity.this, HomeActivity.class); editor.putString("id", id).commit();
editor.putString("image", image).commit(); editor.putString("name", name).commit();
editor.putString("mobile_no", mobile_no).commit(); editor.putString("email_id",
email_id).commit(); editor.putString("address", address).commit();
editor.putString("age", age).commit();
editor.putString("username", username).commit(); editor.putString("password",
password).commit(); Toast.makeText(LoginActivity.this, "Login Successfully Done",
Toast.LENGTH_SHORT).show(); startActivity(i); finish(); progressDialog.dismiss(); }
else { String message = obj.getString("message"); Toast.makeText(LoginActivity.this,
message, Toast.LENGTH_SHORT).show(); Toast.makeText(LoginActivity.this,
response, Toast.LENGTH_SHORT).show(); progressDialog.dismiss(); } } catch
(JSONException e) { e.printStackTrace(); } }
}, new Response.ErrorListener() { @Override public void
onErrorResponse(VolleyError error) { Toast.makeText(LoginActivity.this,
error.toString(), Toast.LENGTH_SHORT).show(); progressDialog.dismiss(); } }) {
@Override protected Map<String, String> getParams() { Map<String, String> params
= new HashMap<String, String>(); params.put("username",
tie_login_username.getText().toString()); params.put("password",
tie_login_password.getText().toString()); return params; } };
stringRequest.setRetryPolicy(new DefaultRetryPolicy(20 * 1000, 1, 1.0f));
RequestQueue requestQueue = Volley.newRequestQueue(LoginActivity.this);
requestQueue.add(stringRequest); } } login.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
tools:context=".LoginActivity" android:orientation="vertical" >
<androidx.cardview.widget.CardView android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_marginTop="85dp"
app:contentPaddingTop="15dp" app:contentPaddingBottom="15dp"
app:contentPaddingLeft="15dp" app:contentPaddingRight="15dp"
app:cardCornerRadius="10dp" > <LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_centerInParent="true"
android:orientation="vertical" android:background="@color/light_grey"
android:padding="20dp"> <ImageView android:id="@+id/img_login_logo"
android:layout_width="100dp" android:layout_height="150dp"
android:src="@drawable/logo" android:transitionName="splash_logo" /> <TextView
android:id="@+id/tv_login_title" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_marginTop="-30dp"
android:fontFamily="@font/bungee" android:text="Welcome to E-Learning App"
android:textColor="@color/purple_700" android:textSize="18sp"
android:transitionName="splash_title" /> <TextView
android:id="@+id/tv_login_subtitle" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:fontFamily="@font/antic"
android:text="Sign in to Continue" android:textSize="20sp"
android:textStyle="bold" /> <LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_marginTop="20dp"
android:layout_marginBottom="20dp" android:orientation="vertical"> <!--
<com.google.android.material.textfield.TextInputLayout--> <!--
android:layout_width="match_parent"--> <!-- android:layout_height="wrap_content"-->
<!-- android:id="@+id/til_login_full_name"--> <!--
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">--> <!--
<com.google.android.material.textfield.TextInputEditText--> <!--
android:layout_width="match_parent"--> <!--
android:layout_height="wrap_content"--> <!--
android:id="@+id/tie_login_full_name"--> <!--
android:textColor="@color/colorAccent"--> <!-- android:hint="Full Name"--> <!--
android:inputType="textPersonName"--> <!-- />--> <!--
</com.google.android.material.textfield.TextInputLayout>-->
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_login_username"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:background="@drawable/edittextbackground">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/tie_login_username" android:layout_width="match_parent"
android:layout_height="wrap_content" android:hint="Username"
android:inputType="text" android:textColor="@color/purple_700" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/til_login_password"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:background="@drawable/edittextbackground">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/tie_login_password" android:layout_width="match_parent"
android:layout_height="wrap_content" android:hint="Password"
android:inputType="textPassword" android:textColor="@color/purple_700" />
</com.google.android.material.textfield.TextInputLayout>
<androidx.appcompat.widget.AppCompatButton android:id="@+id/btn_login_login"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginTop="10dp" android:layout_marginBottom="10dp"
android:background="@drawable/btn_bg_shape"
android:fontFamily="@font/bungee" android:onClick="btn_continue"
android:text="Login" android:textColor="@color/white" android:textStyle="bold"
/> <androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_login_register" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:background="@drawable/btn_bg_shape"
android:fontFamily="@font/bungee" android:onClick="btn_continue"
android:text="New User Register First!!!" android:textColor="@color/white"
android:textStyle="bold" /> <TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/tv_login_as_admin"
android:text="Login as Admin" android:textColor="@color/purple_700"
android:textSize="12sp" android:textStyle="bold"
android:fontFamily="@font/bungee" android:layout_gravity="center"
android:layout_marginTop="40dp" android:textAlignment="center" /> </LinearLayout>
</LinearLayout> <ImageView android:layout_width="120dp"
android:layout_height="120dp" android:id="@+id/login_cirle"
android:src="@drawable/circle" android:layout_gravity="right"
android:layout_marginLeft="-50dp" android:layout_marginBottom="-30dp" />
<ImageView android:layout_width="120dp" android:layout_height="120dp"
android:id="@+id/login_circle1" android:src="@drawable/circle_180"
android:layout_gravity="right" android:layout_marginRight="-50dp"
android:layout_marginTop="-30dp" /> </androidx.cardview.widget.CardView>
</RelativeLayout>

Registration.java
package com.mountreachsolution.e_learningapp; import
androidx.appcompat.app.AppCompatActivity; import android.app.ProgressDialog;
import android.content.Intent; import android.content.SharedPreferences; import
android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; import
android.preference.PreferenceManager; import android.provider.MediaStore; import
android.view.View; import android.widget.Button; import android.widget.ImageView;
import android.widget.Spinner; import android.widget.Toast; import
com.android.volley.AuthFailureError; import com.android.volley.NetworkResponse;
import com.android.volley.Request; import com.android.volley.Response; import
com.android.volley.VolleyError; import com.android.volley.toolbox.Volley; import
com.google.android.material.textfield.TextInputEditText; import
com.loopj.android.http.AsyncHttpClient; import
com.loopj.android.http.JsonHttpResponseHandler; import
com.loopj.android.http.RequestParams; import
com.mountreachsolution.e_learningapp.Comman.Urls; import
com.mountreachsolution.e_learningapp.Comman.VolleyMultipartRequest; import
org.json.JSONException; import org.json.JSONObject; import
java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.HashMap;
import java.util.Map; import
cz.msebera.android.httpclient.Header; public class RegistrationActivity extends
AppCompatActivity { TextInputEditText
tie_name,tie_mobile_no,tie_email_id,tie_age,tie_address,
tie_username,tie_password; Button btn_select_student_image,btn_register;
ProgressDialog progressDialog; private int PICK_IMAGE_REQUEST = 1; private
Bitmap bitmap; ImageView img_student_image; private Uri filePath;
SharedPreferences preferences; SharedPreferences.Editor editor; @Override protected
void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_registration); setTitle("Register"); preferences =
PreferenceManager.getDefaultSharedPreferences(this); editor = preferences.edit();
tie_name = findViewById(R.id.tie_register_name); tie_mobile_no =
findViewById(R.id.tie_register_mobile_no); tie_email_id =
findViewById(R.id.tie_register_email_id); tie_address =
findViewById(R.id.tie_register_address); tie_age =
findViewById(R.id.tie_register_age); tie_username =
findViewById(R.id.tie_register_username); tie_password =
findViewById(R.id.tie_register_password); btn_select_student_image =
findViewById(R.id.btn_choose_Student_image); btn_register =
findViewById(R.id.btn_register_register); img_student_image =
findViewById(R.id.img_Student_image);
btn_select_student_image.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) { showFileChooser(); } });
btn_register.setOnClickListener(new View.OnClickListener() { @Override public void
onClick(View v) { if(tie_name.getText().toString().isEmpty()) {
tie_name.setError("Please Enter Your Name"); } else
if(tie_mobile_no.getText().toString().isEmpty()) { tie_mobile_no.setError("Please
Enter Your Mobile Number"); } else if
(tie_email_id.getText().toString().isEmpty()) { tie_email_id.setError("Please Enter
Your Mail Id"); } else if (tie_address.getText().toString().isEmpty()) {
tie_address.setError("Enter Your Address"); } else if
(tie_age.getText().toString().isEmpty()) { tie_age.setError("Enter Your Age"); } else if
(tie_username.getText().toString().isEmpty()) { tie_username.setError("Enter Your
Username"); } else if
(tie_password.getText().toString().isEmpty()) { tie_password.setError("Enter Your
Password"); } else { progressDialog = new
ProgressDialog(RegistrationActivity.this); progressDialog.setTitle("Registering
student"); progressDialog.setCancelable(true);
progressDialog.setCanceledOnTouchOutside(true);
progressDialog.setMessage("Please Wait..."); progressDialog.show(); addstudent();
} } }); } private void showFileChooser() { Intent intent = new Intent();
intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Picture"),
PICK_IMAGE_REQUEST); } @Override protected void onActivityResult(int
requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode,
resultCode, data); if (requestCode == PICK_IMAGE_REQUEST && resultCode ==
RESULT_OK && data != null && data.getData() != null) { filePath = data.getData();
try { bitmap =
MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);
img_student_image.setImageBitmap(bitmap); } catch (IOException e) {
e.printStackTrace(); } } } private void addstudent() { AsyncHttpClient client = new
AsyncHttpClient(); RequestParams params = new RequestParams();
params.put("name",tie_name.getText().toString());
params.put("mobile_no",tie_mobile_no.getText().toString());
params.put("email_id",tie_email_id.getText().toString());
params.put("address",tie_address.getText().toString());
params.put("age",tie_age.getText().toString());
params.put("username",tie_username.getText().toString());
params.put("password",tie_password.getText().toString());
client.post(Urls.urlRegisterStudent,params,new JsonHttpResponseHandler() {
@Override public void onStart() { super.onStart(); } @Override public void
onSuccess(int statusCode, Header[] headers, JSONObject response) {
progressDialog.dismiss(); try { String aa = response.getString("success"); if
(aa.equals("1")) { uploadBitmap(bitmap,response.getInt("lastinsertedid")); //
Toast.makeText(RegistrationActivity.this, "Registration Succesfully Done",
Toast.LENGTH_SHORT).show(); // startActivity(new
Intent(RegistrationActivity.this,LoginActivity.class)); // finish(); } else {
Toast.makeText(RegistrationActivity.this, "Already Register",
Toast.LENGTH_SHORT).show(); } } catch (JSONException e) {
e.printStackTrace(); } } @Override public void onFailure(int statusCode, Header[]
headers, Throwable throwable, JSONObject errorResponse) {
Toast.makeText(RegistrationActivity.this, "Could not Connect",
Toast.LENGTH_SHORT).show(); } }); } private void uploadBitmap(final Bitmap
bitmap,final int lastinsertedid) { //getting the tag from the edittext //our custom volley
request VolleyMultipartRequest volleyMultipartRequest = new
VolleyMultipartRequest(Request.Method.POST, Urls.url_addStudentimage, new
Response.Listener<NetworkResponse>() { @Override public void
onResponse(NetworkResponse response) { try { JSONObject obj = new
JSONObject(new String(response.data));
Toast.makeText(RegistrationActivity.this,"Registration
Successful",Toast.LENGTH_SHORT).show(); startActivity(new
Intent(RegistrationActivity.this, LoginActivity.class)); finish(); } catch
(JSONException e) { e.printStackTrace(); } } }, new Response.ErrorListener() {
@Override public void onErrorResponse(VolleyError error) {
Toast.makeText(getApplicationContext(), error.getMessage(),
Toast.LENGTH_SHORT).show(); } }) { @Override protected Map<String, String>
getParams() throws AuthFailureError { Map<String, String> params = new
HashMap<>(); params.put("tags",""+ lastinsertedid); return params; } /* * Here we are
passing image by renaming it with a unique name * */ @Override protected Map<String,
DataPart> getByteData() { Map<String, DataPart> params = new HashMap<>(); long
imagename = System.currentTimeMillis(); params.put("pic", new DataPart(imagename
+ ".png", getFileDataFromDrawable(bitmap))); return params; } }; //adding the request
to volley
Volley.newRequestQueue(this).add(volleyMultipartRequest); } public byte[]
getFileDataFromDrawable(Bitmap bitmap) { ByteArrayOutputStream
byteArrayOutputStream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 80, byteArrayOutputStream);
return byteArrayOutputStream.toByteArray(); } @Override public void
onBackPressed() { startActivity(new
Intent(RegistrationActivity.this,LoginActivity.class)); finish(); }

registration.xml
<?xml version="1.0" encoding="utf-8"?> <ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
tools:context=".RegistrationActivity" android:orientation="vertical"
android:fillViewport="true" > <RelativeLayout
android:layout_width="match_parent" android:layout_height="match_parent">
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content" android:orientation="vertical"
android:padding="20dp" > <ImageView android:layout_width="100dp"
android:layout_height="150dp" android:id="@+id/img_register_logo"
android:src="@drawable/logo" android:transitionName="splash_logo" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/tv_register_title"
android:text="Register Yourself" android:textSize="18sp"
android:textColor="@color/purple_700" android:fontFamily="@font/bungee"
android:transitionName="splash_title" android:layout_marginTop="-30dp"/>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/tv_register_subtitle"
android:text="Sign Up" android:textSize="20sp" android:textStyle="bold"
android:fontFamily="@font/antic"/> <LinearLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:layout_marginBottom="20dp"
android:orientation="vertical"> <LinearLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:orientation="horizontal"> <Button android:layout_width="170dp"
android:layout_height="55dp" android:id="@+id/btn_choose_Student_image"
android:text="Select Student Image" android:textSize="14dp"
android:textColor="@color/white" android:layout_gravity="center_vertical"
android:layout_marginTop="5dp"
android:background="@drawable/btn_bg_shape" /> <ImageView
android:id="@+id/img_Student_image" android:layout_width="match_parent"
android:layout_height="150dp" android:src="@drawable/profileimage"
android:layout_marginLeft="4dp"/> </LinearLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/til_register_name"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_register_name" android:textColor="@color/purple_700"
android:hint="Student Name" android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/til_register_mobile_no"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_register_mobile_no"
android:textColor="@color/purple_700" android:hint="Student Mobile Number"
android:inputType="number" android:maxLength="10"/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/til_register_email_id"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_register_email_id" android:textColor="@color/purple_700"
android:hint="Student Email Id" android:inputType="textEmailAddress" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/til_register_age"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_register_age" android:textColor="@color/purple_700"
android:hint="Student Age" android:inputType="number" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/til_register_address"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_register_address" android:textColor="@color/purple_700"
android:hint="Student Address" android:inputType="textPostalAddress" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/til_register_username"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_register_username" android:textColor="@color/purple_700"
android:hint="Username" android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/til_register_password"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_register_password" android:textColor="@color/purple_700"
android:hint="Password" android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<androidx.appcompat.widget.AppCompatButton
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/btn_register_register" android:text="Register"
android:textColor="@color/white" android:textStyle="bold"
android:fontFamily="@font/bungee"
android:background="@drawable/btn_bg_shape"
android:layout_marginTop="10dp" android:layout_marginBottom="10dp"
android:onClick="btn_continue"/> </LinearLayout> </LinearLayout> <ImageView
android:layout_width="120dp" android:layout_height="120dp"
android:id="@+id/register_cirle" android:src="@drawable/circle"
android:layout_alignParentBottom="true" android:layout_marginLeft="-50dp"
android:layout_marginBottom="-30dp" /> <ImageView android:layout_width="120dp"
android:layout_height="120dp" android:id="@+id/register_circle1"
android:src="@drawable/circle_180" android:layout_alignParentRight="true"
android:layout_marginRight="-50dp" android:layout_marginTop="-30dp" />
</RelativeLayout> </ScrollView>

HOMEACTIVITY/ALL_CLASSES.JAVA
package com.mountreachsolution.e_learningapp.HomeActivity; import
android.app.Activity; import android.content.Intent; import
android.content.SharedPreferences; import android.preference.PreferenceManager;
import android.view.LayoutInflater; import android.view.View; import
android.view.ViewGroup; import android.widget.BaseAdapter; import
android.widget.Button; import android.widget.TextView; import
androidx.cardview.widget.CardView; import com.mountreachsolution.e_learningapp.R;
import java.util.List; public class AllClassesAdapter extends BaseAdapter {
List<POJOAllClasses> list; Activity activity; TextView tv_no_records;
SharedPreferences preferences;
SharedPreferences.Editor editor; public AllClassesAdapter(List<POJOAllClasses>
list, Activity activity) { this.list = list; this.activity = activity; preferences =
PreferenceManager.getDefaultSharedPreferences(activity); editor = preferences.edit(); }
@Override public int getCount() { return list.size(); } @Override public Object
getItem(int position) { return list.get(position); } @Override public long getItemId(int
position) { return position; } @Override public View getView(int position, View v,
ViewGroup parent) { final AllClassesAdapter.ViewHolder holder; LayoutInflater
inflater = (LayoutInflater)
activity.getSystemService(Activity.LAYOUT_INFLATER_SERVICE); if (v ==
null) { holder = new AllClassesAdapter.ViewHolder(); v =
inflater.inflate(R.layout.lv_all_class, null); holder.tv_all_class_class_name =
(TextView) v.findViewById(R.id.tv_all_class_class_name);
holder.tv_all_class_class_subject = (TextView)
v.findViewById(R.id.tv_all_class_class_subject); holder.cardView_all_classes =
(CardView) v.findViewById(R.id.cardview11); v.setTag(holder); } else { holder =
(AllClassesAdapter.ViewHolder) v.getTag(); } final POJOAllClasses obj =
list.get(position); holder.tv_all_class_class_name.setText(obj.getClassname());
holder.tv_all_class_class_subject.setText(obj.getSubjectname());
holder.cardView_all_classes.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) { Intent intent = new Intent(activity,
ClassInDetailsActivity.class); editor.putString("class_id", obj.getId()).commit();
editor.putString("class_name", obj.getClassname()).commit();
editor.putString("subject_name",
obj.getSubjectname()).commit();activity.startActivity(intent); } }); return v; } class
ViewHolder { TextView tv_all_class_class_name, tv_all_class_class_subject;
CardView cardView_all_classes; } }

allclasses.xml/home
?xml version="1.0" encoding="utf-8"?> <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical" tools:context=".HomeActivity.HomeActivity" >
<ListView android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/lv_view_all_class"
android:layout_margin="16dp" android:layout_alignParentTop="true" />
<ProgressBar android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_centerInParent="true"
android:id="@+id/progress" android:visibility="gone"/> <TextView
android:layout_width="wrap_content" android:layout_height="match_parent"
android:text="No Class Available" android:layout_centerInParent="true"
android:gravity="center" android:visibility="gone"
android:id="@+id/tv_no_records"/> </RelativeLayout>

Homeactivity.java
package com.mountreachsolution.e_learningapp.HomeActivity; import
androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import
androidx.appcompat.app.AppCompatActivity; import android.content.DialogInterface;
import android.content.Intent; import android.content.SharedPreferences; import
android.os.Bundle; import android.os.Handler; import
android.preference.PreferenceManager; import android.view.Menu; import
android.view.MenuInflater; import android.view.MenuItem; import android.view.View;
import android.widget.ListView; import android.widget.ProgressBar; import
android.widget.TextView; import android.widget.Toast; import
com.loopj.android.http.AsyncHttpClient; import
com.loopj.android.http.JsonHttpResponseHandler; import
com.loopj.android.http.RequestParams; import
com.mountreachsolution.e_learningapp.Comman.Urls; import
com.mountreachsolution.e_learningapp.LoginActivity; import
com.mountreachsolution.e_learningapp.R; import org.json.JSONArray; import
org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList;
import java.util.List; import cz.msebera.android.httpclient.Header; public class
HomeActivity extends AppCompatActivity { List<POJOAllClasses> list; ListView
lv_view_all_class; TextView tv_no_records; ProgressBar pBar; AllClassesAdapter
adapter; SharedPreferences preferences; SharedPreferences.Editor editor; boolean
doubletap = false; @Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); setContentView(R.layout.activity_home);
setTitle("All Classes"); preferences=
PreferenceManager.getDefaultSharedPreferences(HomeActivity.this);
editor=preferences.edit(); list = new ArrayList<POJOAllClasses>(); lv_view_all_class
= (ListView) findViewById(R.id.lv_view_all_class); tv_no_records = (TextView)
findViewById(R.id.tv_no_records); pBar = (ProgressBar)
findViewById(R.id.progress); tv_no_records = (TextView)
findViewById(R.id.tv_no_records); viewAllClass(); } public void viewAllClass() {
AsyncHttpClient client = new AsyncHttpClient(); RequestParams params = new
RequestParams(); client.post(Urls.urlViewAllClasses, params, new
JsonHttpResponseHandler(){ public void onStart() {
pBar.setVisibility(View.VISIBLE); super.onStart(); } public void onSuccess(int
statusCode, Header[] headers, JSONObject response) { try {
pBar.setVisibility(View.GONE); JSONArray jarry =
response.getJSONArray("getAllClass"); if (jarry.isNull(0)) {
tv_no_records.setVisibility(View.VISIBLE); tv_no_records.setText("No Class Available
Yet"); } for (int i = 0 ; i < jarry.length();i++) { JSONObject jsonObject =
jarry.getJSONObject(i); String id = jsonObject.getString("id"); String class_name
= jsonObject.getString("class_name"); String subject_name =
jsonObject.getString("subject_name"); list.add(new
POJOAllClasses(id,class_name,subject_name)); } adapter = new
AllClassesAdapter(list, (AppCompatActivity) HomeActivity.this);
lv_view_all_class.setAdapter(adapter); } catch (JSONException e) {
e.printStackTrace(); } } public void onFailure(int statusCode, Header[] headers, String
res, Throwable t) { Toast.makeText(HomeActivity.this, "could not connect",
Toast.LENGTH_LONG).show(); } }); } @Override public void onBackPressed() { if
(doubletap){ super.onBackPressed(); } else { Toast.makeText(this, "Press back again to
exit", Toast.LENGTH_SHORT).show(); doubletap = true; Handler handler = new
Handler(); handler.postDelayed(new Runnable() { @Override public void
run() { doubletap = false; } }, 1000); } } @Override public boolean
onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.home_menu,menu); return true; } @Override public boolean
onOptionsItemSelected(@NonNull MenuItem item) { if (item.getItemId() ==
R.id.home_menu_qr_code_scanner) { logout(); return true; } return true; } private void
logout() { AlertDialog.Builder ad = new
AlertDialog.Builder(HomeActivity.this); ad.setTitle("E-Learning App");
ad.setMessage("Are you sure you want to logout"); ad.setPositiveButton("Cancel", new
DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface
dialog, int which) { dialog.cancel(); } }); ad.setNegativeButton("Logout", new
DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface
dialog, int which) { Intent intent = new Intent(HomeActivity.this, LoginActivity.class);
editor.putBoolean("isLogin",false).commit(); startActivity(intent); finish(); } });
AlertDialog alertDialog = ad.create();
alertDialog.setCanceledOnTouchOutside(true); alertDialog.show(); } }

homeactivity.xml
?xml version="1.0" encoding="utf-8"?> <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical" tools:context=".HomeActivity.HomeActivity" >
<ListView android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/lv_view_all_class"
android:layout_margin="16dp" android:layout_alignParentTop="true" />
<ProgressBar android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_centerInParent="true"
android:id="@+id/progress" android:visibility="gone"/> <TextView
android:layout_width="wrap_content" android:layout_height="match_parent"
android:text="No Class Available" android:layout_centerInParent="true"
android:gravity="center" android:visibility="gone"
android:id="@+id/tv_no_records"/> </RelativeLayout>

Home_work.java
package com.mountreachsolution.e_learningapp.HomeWork; import
androidx.appcompat.app.AppCompatActivity; import
androidx.appcompat.widget.SearchView; import android.content.Intent; import
android.content.SharedPreferences; import android.os.Bundle; import
android.preference.PreferenceManager; import android.view.View; import
android.widget.ListView; import android.widget.ProgressBar; import
android.widget.TextView; import android.widget.Toast; import
com.loopj.android.http.AsyncHttpClient; import
com.loopj.android.http.JsonHttpResponseHandler; import
com.loopj.android.http.RequestParams; import
com.mountreachsolution.e_learningapp.Comman.Urls; import
com.mountreachsolution.e_learningapp.HomeActivity.ClassInDetailsActivity; import
com.mountreachsolution.e_learningapp.HomeActivity.HomeActivity; import
com.mountreachsolution.e_learningapp.R; import org.json.JSONArray; import
org.json.JSONException; import org.json.JSONObject; import
java.util.ArrayList; import java.util.List; import
cz.msebera.android.httpclient.Header; public class HomeWorkActivity extends
AppCompatActivity { List<POJOHomework> list; SearchView sv_homework;
ListView lv_homework; TextView tv_no_records; ProgressBar progressBar;
HomeworkAdapter adapter; SharedPreferences preferences;
SharedPreferences.Editor editor; @Override protected void onCreate(Bundle
savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home_work); preferences=
PreferenceManager.getDefaultSharedPreferences(HomeWorkActivity.this);
editor=preferences.edit(); setTitle(""+preferences.getString("class_name","")+"
Home Work"); preferences=
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
editor=preferences.edit(); list = new ArrayList<POJOHomework>(); sv_homework =
(SearchView) findViewById(R.id.sv_homework); lv_homework = (ListView)
findViewById(R.id.lv_my_homework); tv_no_records = (TextView)
findViewById(R.id.tv_no_records); progressBar = (ProgressBar)
findViewById(R.id.progressBar); sv_homework.setOnQueryTextListener(new
SearchView.OnQueryTextListener() { @Override public boolean
onQueryTextSubmit(String query) { searchHomework(query); return false; }
@Override public boolean onQueryTextChange(String query) {
searchHomework(query); return false; } }); getmyhomework(); } private void
searchHomework(String query) { List<POJOHomework> temppojoclass = new
ArrayList<>(); temppojoclass.clear(); for(POJOHomework pojo :list) { if
(pojo.getHowework_date().toUpperCase().contains(query.toUpperCase()) ||
pojo.getHomework_title().toUpperCase().contains(query.toUpperCase()) ||
pojo.getHomework_description().toUpperCase().contains(query.toUpperCase())) {
temppojoclass.add(pojo); } adapter = new HomeworkAdapter(temppojoclass,
HomeWorkActivity.this); lv_homework.setAdapter(adapter); } } public void
getmyhomework() { AsyncHttpClient client = new AsyncHttpClient(); RequestParams
params = new RequestParams();
params.put("class_id",preferences.getString("class_id",""));
client.post(Urls.urlGetHomework, params, new JsonHttpResponseHandler(){ public
void onStart() { progressBar.setVisibility(View.VISIBLE); super.onStart(); } public void
onSuccess(int statusCode, Header[] headers, JSONObject response) { try {
progressBar.setVisibility(View.GONE); JSONArray jarry =
response.getJSONArray("getMyHomework"); for (int i = 0; i < jarry.length(); i++){
JSONObject jsonObject = jarry.getJSONObject(i); String howework_date =
jsonObject.getString("howework_date"); String howework_title =
jsonObject.getString("howework_title"); String howework_description =
jsonObject.getString("howework_description"); list.add(new
POJOHomework(howework_date,howework_title,howework_description)); } adapter =
new HomeworkAdapter(list, HomeWorkActivity.this);
lv_homework.setAdapter(adapter); } catch (JSONException e) {
e.printStackTrace(); } } public void onFailure(int statusCode, Header[] headers, String
res, Throwable t) { Toast.makeText(HomeWorkActivity.this, "could not connect",
Toast.LENGTH_LONG).show(); } }); } @Override public void onBackPressed() { //
super.onBackPressed(); startActivity(new Intent(HomeWorkActivity.this,
ClassInDetailsActivity.class));
editor.putString("class_id",preferences.getString("class_id","")).commit();
editor.putString("class_name",preferences.getString("class_name","")).commit();
editor.putString("subject_name",preferences.getString("subject_name","")).commit ();
finish(); } }
homework.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" tools:context=".HomeWork.HomeWorkActivity">
<androidx.appcompat.widget.SearchView android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/sv_homework"
app:queryHint="Search Homework" app:iconifiedByDefault="false"
android:padding="4sp" android:layout_margin="5sp"
android:background="@drawable/et_bg"/> <ListView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/lv_my_homework"
android:layout_below="@+id/sv_homework"/> <ProgressBar
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:id="@+id/progressBar"
android:visibility="gone"/> <TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="No Records"
android:layout_centerInParent="true" android:visibility="gone"
android:id="@+id/tv_no_records"/> </RelativeLayout>

Notice.java
package com.mountreachsolution.e_learningapp.NoticeBoard; import
androidx.appcompat.app.AppCompatActivity; import
android.content.SharedPreferences; import android.os.Bundle; import
android.preference.PreferenceManager; import android.view.View; import
android.widget.ListView; import android.widget.ProgressBar; import
android.widget.TextView; import android.widget.Toast; import
com.loopj.android.http.AsyncHttpClient; import
com.loopj.android.http.JsonHttpResponseHandler; import
com.loopj.android.http.RequestParams; import
com.mountreachsolution.e_learningapp.Comman.Urls; import
com.mountreachsolution.e_learningapp.R; import org.json.JSONArray; import
org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList;
import java.util.List; import cz.msebera.android.httpclient.Header; public class
NoticeBoardActivity extends AppCompatActivity { List<PojoNoticeBoard> list;
ListView lv_view_notice_board; TextView tv_no_records; ProgressBar pBar;
NoticeBoardAdapter adapter; SharedPreferences preferences;
SharedPreferences.Editor editor; @Override protected void onCreate(Bundle
savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_notice_board); preferences=
PreferenceManager.getDefaultSharedPreferences(NoticeBoardActivity.this);
editor=preferences.edit(); setTitle(""+preferences.getString("class_name","")+" Notice
Board"); list = new ArrayList<PojoNoticeBoard>(); lv_view_notice_board
= (ListView) findViewById(R.id.lv_notice_board); tv_no_records = (TextView)
findViewById(R.id.tv_no_records); pBar = (ProgressBar)
findViewById(R.id.progressBar); tv_no_records = (TextView)
findViewById(R.id.tv_no_records); viewNoticeBoard(); } public void
viewNoticeBoard() { AsyncHttpClient client = new AsyncHttpClient(); RequestParams
params = new RequestParams();
params.put("class_id",preferences.getString("class_id",""));
client.post(Urls.urlViewNoticeBoard, params, new JsonHttpResponseHandler(){ public
void onStart() { pBar.setVisibility(View.VISIBLE); super.onStart(); } public void
onSuccess(int statusCode, Header[] headers, JSONObject response) { try {
pBar.setVisibility(View.GONE); JSONArray jarry =
response.getJSONArray("getNoticeBoard"); if (jarry.isNull(0)) {
tv_no_records.setVisibility(View.VISIBLE); tv_no_records.setText("No Notice
Available Yet"); } for (int i = 0 ; i < jarry.length();i++) { JSONObject jsonObject =
jarry.getJSONObject(i); String id = jsonObject.getString("id"); String title =
jsonObject.getString("title"); String description = jsonObject.getString("description");
String doc = jsonObject.getString("doc"); list.add(new
PojoNoticeBoard(title,description,doc)); } adapter = new
NoticeBoardAdapter(list, (AppCompatActivity)
NoticeBoardActivity.this,tv_no_records); lv_view_notice_board.setAdapter(adapter); }
catch (JSONException e) {
e.printStackTrace(); } } public void onFailure(int statusCode, Header[] headers, String
res, Throwable t) { Toast.makeText(NoticeBoardActivity.this, "could not connect",
Toast.LENGTH_LONG).show(); } }); } }

notice.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" tools:context=".HomeWork.HomeWorkActivity">
<androidx.appcompat.widget.SearchView android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/sv_notice_board"
app:queryHint="Search Notice Board" app:iconifiedByDefault="false"
android:padding="4sp" android:layout_margin="5sp"
android:background="@drawable/et_bg"
android:backgroundTint="@color/light_teal"/> <ListView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/lv_notice_board"
android:layout_below="@+id/sv_notice_board"/> <ProgressBar
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:id="@+id/progressBar"
android:visibility="gone"/> <TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="No Records"
android:layout_centerInParent="true" android:visibility="gone"
android:id="@+id/tv_no_records"/> </RelativeLayout>

Modelans.java
package com.mountreachsolution.e_learningapp.QuestionandAnswerModelPaper;
public class PojoQuestionandAnswerPaper { public String title,viewdoc; public
PojoQuestionandAnswerPaper(String title, String viewdoc) { this.title = title;
this.viewdoc = viewdoc; } public String getTitle() { return title; } public void
setTitle(String title) { this.title = title; } public String getViewdoc() { return viewdoc; }
public void setViewdoc(String viewdoc) { this.viewdoc = viewdoc; } }

modelanswer.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
tools:context=".QuestionandAnswerModelPaper.QuestionandAnswerModelPaperA
ctivity" android:orientation="vertical"> <TextView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tv_question_and_answer_paper_select_branch_title"
android:text="Select Branch" android:textSize="18dp" android:textStyle="bold"
android:textColor="@color/purple_700" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginTop="20dp"
android:fontFamily="sans-serif-condensed-medium"/> <Spinner
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/spinner_branch" android:layout_marginTop="20dp"
android:layout_marginLeft="20dp" android:layout_marginRight="20dp"
android:entries="@array/branch" /> <TextView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tv_question_and_answer_paper_select_semester_title"
android:text="Select Semester" android:textSize="18dp" android:textStyle="bold"
android:textColor="@color/purple_700" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginTop="20dp"
android:fontFamily="sans-serif-condensed-medium"/> <Spinner
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/spinner_semester" android:layout_marginTop="20dp"
android:layout_marginLeft="20dp" android:layout_marginRight="20dp"
android:entries="@array/semester" /> <TextView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tv_question_and_answer_paper_select_exam_title"
android:text="Select Exam" android:textSize="18dp" android:textStyle="bold"
android:textColor="@color/purple_700" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginTop="20dp"
android:fontFamily="sans-serif-condensed-medium"/> <Spinner
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/spinner_exam" android:layout_marginTop="20dp"
android:layout_marginLeft="20dp" android:layout_marginRight="20dp"
android:entries="@array/select_the_exam" />
<androidx.appcompat.widget.AppCompatButton
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/btn_question_and_answer_paper_search" android:text="Search
Question and Answer Paper" android:textColor="@color/white"
android:textStyle="bold" android:fontFamily="@font/bungee"
android:background="@drawable/btn_bg_shape" android:layout_margin="20dp"
/> </LinearLayout>

Quiz.java
package com.mountreachsolution.e_learningapp.Quiz; public class PojoGetQuiz {
public String id,question,option1,option2,option3,option4,correct_answer; public
PojoGetQuiz(String id, String question, String option1, String option2, String option3,
String option4, String correct_answer) { this.id = id; this.question = question;
this.option1 = option1; this.option2 = option2; this.option3 = option3; this.option4 =
option4; this.correct_answer = correct_answer; } public String getId() { return id; }
public void setId(String id) { this.id = id; } public String getQuestion() { return
question; } public void setQuestion(String question) { this.question = question; } public
String getOption1() { return option1; } public void setOption1(String option1) {
this.option1 = option1; } public String getOption2() { return option2; } public void
setOption2(String option2) { this.option2 = option2; } public String getOption3() {
return option3; } public void setOption3(String option3) { this.option3 = option3; }
public String getOption4() { return option4; } public void setOption4(String option4) {
this.option4 = option4; } public String getCorrect_answer() { return correct_answer; }
public void setCorrect_answer(String correct_answer) { this.correct_answer =
correct_answer; } }
quiz.xml
<?xml version="1.0" encoding="utf-8"?> <ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" tools:context=".HomeWork.HomeWorkActivity"
android:layout_margin="16dp"> <LinearLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:orientation="vertical"> <TextView android:id="@+id/tv_quiz_title"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:fontFamily="@font/bungee" android:text="Welcome to E-Learning Quiz
Activity" android:textSize="16sp" android:textAlignment="center"
android:textColor="@color/purple_700" android:layout_marginTop="20dp"
android:textStyle="bold" /> <TextView android:id="@+id/tv_quiz_question1"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:fontFamily="sans-serif-condensed-medium" android:text="Who is the father of
C language?" android:textColor="@color/black" android:textSize="16dp"
android:textStyle="bold" /> <RadioGroup android:id="@+id/lv_rg_quiz_11"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:orientation="vertical"> <RadioButton
android:id="@+id/lv_rb_quiz_option11" android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="a) Steve Jobs"
android:textColor="@color/black" /> <RadioButton
android:id="@+id/lv_rb_quiz_option12" android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="b) James Gosling"
android:textColor="@color/black" /> <RadioButton
android:id="@+id/lv_rb_quiz_option13" android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="c) Dennis Ritchie"
android:textColor="@color/black" /> <RadioButton
android:id="@+id/lv_rb_quiz_option14" android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="d) Rasmus Lerdorf"
android:textColor="@color/black" /> </RadioGroup> <View
android:layout_width="match_parent" android:layout_height="2dp"
android:layout_marginTop="20dp" android:background="@color/black"
android:backgroundTint="@color/black" /> <TextView
android:id="@+id/tv_quiz_question2" android:layout_width="match_parent"
android:layout_height="wrap_content" android:fontFamily="sans-serif-
condensedmedium" android:text=" Which of the following is not a valid C variable
name?" android:textColor="@color/black" android:textSize="16dp"
android:layout_marginTop="20dp" android:textStyle="bold" /> <RadioGroup
android:id="@+id/lv_rg_quiz_21" android:layout_width="match_parent"
android:layout_height="wrap_content" android:orientation="vertical">
<RadioButton android:id="@+id/lv_rb_quiz_option22"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:text="a) int number;" android:textColor="@color/black" /> <RadioButton
android:id="@+id/lv_rb_quiz_option23" android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="b) float rate;"
android:textColor="@color/black" /> <RadioButton
android:id="@+id/lv_rb_quiz_option24" android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="c) int variable_count;"
android:textColor="@color/black" /> <RadioButton
android:id="@+id/lv_rb_quiz_option25" android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="d) int $main;"
android:textColor="@color/black" /> </RadioGroup> <View
android:layout_width="match_parent" android:layout_height="2dp"
android:layout_marginTop="20dp" android:background="@color/black"
android:backgroundTint="@color/black" /> <TextView
android:id="@+id/tv_quiz_question3" android:layout_width="match_parent"
android:layout_height="wrap_content" android:fontFamily="sans-serif-
condensedmedium" android:text=" All keywords in C are in ____________"
android:textColor="@color/black" android:textSize="16dp"
android:layout_marginTop="20dp" android:textStyle="bold" /> <RadioGroup
android:id="@+id/lv_rg_quiz_31" android:layout_width="match_parent"
android:layout_height="wrap_content" android:orientation="vertical">
<RadioButton android:id="@+id/lv_rb_quiz_option32"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:text="a) LowerCase letters" android:textColor="@color/black" />
<RadioButton android:id="@+id/lv_rb_quiz_option33"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:text="b) UpperCase letters" android:textColor="@color/black" />
<RadioButton android:id="@+id/lv_rb_quiz_option34"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:text="c) CamelCase letters" android:textColor="@color/black" />
<RadioButton android:id="@+id/lv_rb_quiz_option35"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:text="d) None of the mentioned" android:textColor="@color/black" />
</RadioGroup> <View android:layout_width="match_parent"
android:layout_height="2dp" android:layout_marginTop="20dp"
android:background="@color/black" android:backgroundTint="@color/black" />
<TextView android:id="@+id/tv_quiz_question4"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:fontFamily="sans-serif-condensed-medium" android:text=" Which of the
following cannot be a variable name in C?" android:textColor="@color/black"
android:textSize="16dp" android:layout_marginTop="20dp" android:textStyle="bold"
/> <RadioGroup android:id="@+id/lv_rg_quiz_41"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:orientation="vertical"> <RadioButton
android:id="@+id/lv_rb_quiz_option42" android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="a) volatile"
android:textColor="@color/black" /> <RadioButton
android:id="@+id/lv_rb_quiz_option43" android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="b) true"
android:textColor="@color/black" /> <RadioButton
android:id="@+id/lv_rb_quiz_option44" android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="c) friend"
android:textColor="@color/black" /> <RadioButton
android:id="@+id/lv_rb_quiz_option45" android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="d) export"
android:textColor="@color/black" /> </RadioGroup> <View
android:layout_width="match_parent" android:layout_height="2dp"
android:layout_marginTop="20dp" android:background="@color/black"
android:backgroundTint="@color/black" /> <TextView
android:id="@+id/tv_quiz_question5" android:layout_width="match_parent"
android:layout_height="wrap_content" android:fontFamily="sans-serif-
condensedmedium" android:text=" What is the result of logical or relational expression
in C?" android:textColor="@color/black" android:textSize="16dp"
android:layout_marginTop="20dp" android:textStyle="bold" /> <RadioGroup
android:id="@+id/lv_rg_quiz_51" android:layout_width="match_parent"
android:layout_height="wrap_content" android:orientation="vertical">
<RadioButton android:id="@+id/lv_rb_quiz_option52"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:text="a) True or False" android:textColor="@color/black" />
<RadioButton android:id="@+id/lv_rb_quiz_option53"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:text="b) 0 or 1" android:textColor="@color/black" /> <RadioButton
android:id="@+id/lv_rb_quiz_option54" android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="c) 0 if an expression is false and
any positive number if an expression is true" android:textColor="@color/black" />
<RadioButton
android:id="@+id/lv_rb_quiz_option55" android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="d) None of the mentioned"
android:textColor="@color/black" /> </RadioGroup>
<androidx.appcompat.widget.AppCompatButton
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/btn_quiz_submit" android:text="Submit"
android:textColor="@color/white" android:textStyle="bold"
android:fontFamily="@font/bungee"
android:background="@drawable/btn_bg_shape"
android:backgroundTint="@color/teal_700" android:layout_marginTop="10dp"
android:layout_marginBottom="10dp" android:onClick="btn_continue"/> <!--
<ListView--> <!-- android:layout_width="match_parent"--> <!--
android:layout_height="wrap_content"--> <!-- android:id="@+id/lv_quiz" />--> <!--
<ProgressBar--> <!-- android:layout_width="wrap_content"--> <!--
android:layout_height="wrap_content"--> <!--
android:layout_centerInParent="true"--> <!-- android:id="@+id/progressBar"-->
<!-- android:visibility="gone"/>--> <!-- <TextView--> <!--
android:layout_width="wrap_content"--> <!-- android:layout_height="wrap_content"-->
<!-- android:text="No Records"--> <!-- android:layout_centerInParent="true"--> <!--
android:visibility="gone"--> <!-- android:id="@+id/tv_no_records"/>-->
</LinearLayout> </ScrollView>

Recording.java
package com.mountreachsolution.e_learningapp.Recording; import
androidx.appcompat.app.AppCompatActivity; import
androidx.appcompat.widget.SearchView; import android.annotation.SuppressLint;
import android.content.Intent; import android.content.SharedPreferences; import
android.os.Bundle; import android.preference.PreferenceManager; import
android.view.View; import android.widget.ListView; import
android.widget.ProgressBar; import android.widget.TextView; import
android.widget.Toast; import com.loopj.android.http.AsyncHttpClient; import
com.loopj.android.http.JsonHttpResponseHandler; import
com.loopj.android.http.RequestParams; import
com.mountreachsolution.e_learningapp.Comman.Urls; import
com.mountreachsolution.e_learningapp.HomeActivity.ClassInDetailsActivity; import
com.mountreachsolution.e_learningapp.HomeActivity.HomeActivity; import
com.mountreachsolution.e_learningapp.HomeWork.HomeWorkActivity; import
com.mountreachsolution.e_learningapp.HomeWork.HomeworkAdapter; import
com.mountreachsolution.e_learningapp.HomeWork.POJOHomework; import
com.mountreachsolution.e_learningapp.R; import org.json.JSONArray; import
org.json.JSONException; import org.json.JSONObject; import
java.util.ArrayList; import java.util.List; import cz.msebera.android.httpclient.Header;
public class RecordingActivity extends AppCompatActivity { List<POJORecording>
pojoRecordings; SearchView sv_recording; ListView lv_recording; TextView
tv_no_records; ProgressBar progressBar; RecordingAdapter adapter; SharedPreferences
preferences; SharedPreferences.Editor editor; @SuppressLint("MissingInflatedId")
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); setContentView(R.layout.activity_recording);
preferences=
PreferenceManager.getDefaultSharedPreferences(RecordingActivity.this);
editor=preferences.edit(); setTitle(""+preferences.getString("class_name","")+"
Recording"); pojoRecordings = new ArrayList<POJORecording>(); sv_recording =
(SearchView) findViewById(R.id.sv_recording); lv_recording = (ListView)
findViewById(R.id.lv_my_recording); tv_no_records = (TextView)
findViewById(R.id.tv_no_records); progressBar = (ProgressBar)
findViewById(R.id.progressBar); sv_recording.setOnQueryTextListener(new
SearchView.OnQueryTextListener() { @Override public boolean
onQueryTextSubmit(String query) { searchRecording(query); return false; } @Override
public boolean onQueryTextChange(String query) { searchRecording(query); return
false; } }); getRecording(); } private void searchRecording(String query) {
List<POJORecording> temppojoclass = new ArrayList<>(); temppojoclass.clear();
for(POJORecording pojo :pojoRecordings) { if
(pojo.getRecording_date().toUpperCase().contains(query.toUpperCase()) ||
pojo.getRecording_title().toUpperCase().contains(query.toUpperCase()) ||
pojo.getRecording_description().toUpperCase().contains(query.toUpperCase())) {
temppojoclass.add(pojo); } adapter = new RecordingAdapter(temppojoclass,
RecordingActivity.this); lv_recording.setAdapter(adapter); } } public void
getRecording() { AsyncHttpClient client = new AsyncHttpClient(); RequestParams
params = new RequestParams();
params.put("class_id",preferences.getString("class_id",""));
client.post(Urls.urlGetRecording, params, new JsonHttpResponseHandler(){ public
void onStart() { progressBar.setVisibility(View.VISIBLE); super.onStart(); } public void
onSuccess(int statusCode, Header[] headers, JSONObject response) { try {
progressBar.setVisibility(View.GONE); JSONArray jarry =
response.getJSONArray("getMyRecording"); for (int i = 0; i < jarry.length(); i++){
JSONObject jsonObject = jarry.getJSONObject(i); String recording_date =
jsonObject.getString("recording_date"); String recording_title =
jsonObject.getString("recording_title"); String recording_description =
jsonObject.getString("recording_description"); String recording_url =
jsonObject.getString("recording_url"); pojoRecordings.add(new
POJORecording(recording_date,recording_title, recording_description,recording_url));
} adapter = new RecordingAdapter(pojoRecordings, RecordingActivity.this);
lv_recording.setAdapter(adapter); } catch (JSONException e) { e.printStackTrace(); } }
public void onFailure(int statusCode, Header[] headers, String res, Throwable t) {
Toast.makeText(RecordingActivity.this, "could not connect",
Toast.LENGTH_LONG).show(); } }); } @Override public void onBackPressed() {
// super.onBackPressed(); startActivity(new Intent(RecordingActivity.this,
ClassInDetailsActivity.class));
editor.putString("class_id",preferences.getString("class_id","")).commit();
editor.putString("class_name",preferences.getString("class_name","")).commit();
editor.putString("subject_name",preferences.getString("subject_name","")).commit
(); finish(); } }
recording.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" tools:context=".HomeWork.HomeWorkActivity">
<androidx.appcompat.widget.SearchView android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/sv_recording"
app:queryHint="Search Recording" app:iconifiedByDefault="false"
android:padding="4sp" android:layout_margin="5sp"
android:background="@drawable/et_bg"
android:backgroundTint="@color/light_yellow"/> <ListView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/lv_my_recording"
android:layout_below="@+id/sv_recording"/> <ProgressBar
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:id="@+id/progressBar"
android:visibility="gone"/> <TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="No Records"
android:layout_centerInParent="true" android:visibility="gone"
android:id="@+id/tv_no_records"/> </RelativeLayout>

Studymaterial.java
{ List<PojoMyStudyMaterial> list; ListView lv_my_study_material; TextView
tv_no_records; ProgressBar pBar; StudyMaterialAdapter adapter; SharedPreferences
preferences; SharedPreferences.Editor editor; @Override protected void
onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_study_material); preferences=
PreferenceManager.getDefaultSharedPreferences(StudyMaterialActivity.this);
editor=preferences.edit(); setTitle(""+preferences.getString("class_name","")+" Study
Material"); list = new ArrayList<PojoMyStudyMaterial>(); lv_my_study_material =
(ListView) findViewById(R.id.lv_my_study_material); tv_no_records = (TextView)
findViewById(R.id.tv_no_records); pBar = (ProgressBar)
findViewById(R.id.progressBar); tv_no_records = (TextView)
findViewById(R.id.tv_no_records); myStudyMaterial(); } public void
myStudyMaterial() { AsyncHttpClient client = new AsyncHttpClient(); RequestParams
params = new RequestParams();
params.put("class_id",preferences.getString("class_id",""));
client.post(Urls.urlMyStudyMaterial, params, new JsonHttpResponseHandler(){ public
void onStart() { pBar.setVisibility(View.VISIBLE); super.onStart(); } public void
onSuccess(int statusCode, Header[] headers, JSONObject response) { try {
pBar.setVisibility(View.GONE); JSONArray jarry =
response.getJSONArray("getStudyMaterial"); if (jarry.isNull(0)) {
tv_no_records.setVisibility(View.VISIBLE); tv_no_records.setText("No Notice
Available Yet"); } for (int i = 0 ; i < jarry.length();i++) { JSONObject jsonObject =
jarry.getJSONObject(i); String id = jsonObject.getString("id"); String title =
jsonObject.getString("title"); String description =
jsonObject.getString("description"); String doc = jsonObject.getString("doc");
String date = jsonObject.getString("date"); list.add(new
PojoMyStudyMaterial(title,description,doc,date)); } adapter = new
StudyMaterialAdapter(list, (AppCompatActivity)
StudyMaterialActivity.this,tv_no_records); lv_my_study_material.setAdapter(adapter);
} catch (JSONException e) {
e.printStackTrace(); } } public void onFailure(int statusCode, Header[] headers, String
res, Throwable t) { Toast.makeText(StudyMaterialActivity.this, "could not connect",
Toast.LENGTH_LONG).show(); } }); } }

Studymaterial.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="vertical"
tools:context=".StudyMaterial.StudyMaterialActivity">
<androidx.appcompat.widget.SearchView android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/sv_study_material"
app:queryHint="Search Study Material" app:iconifiedByDefault="false"
android:padding="4sp" android:layout_margin="5sp"
android:background="@drawable/et_bg"
android:backgroundTint="@color/light_orange"/> <ListView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/lv_my_study_material"
android:layout_below="@+id/sv_study_material"/> <ProgressBar
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:id="@+id/progressBar"
android:visibility="gone"/> <TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="No Records"
android:layout_centerInParent="true" android:visibility="gone"
android:id="@+id/tv_no_records"/> </RelativeLayout>

Admin app
Addclass.java
package com.mountreachsolution.e_learningapp.Admin.AddClass; import
androidx.appcompat.app.AppCompatActivity; import android.app.ProgressDialog;
import android.content.Intent; import android.content.SharedPreferences; import
android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; import
android.preference.PreferenceManager; import android.view.View; import
android.widget.Button; import android.widget.ImageView; import
android.widget.Toast; import
com.google.android.material.textfield.TextInputEditText; import
com.loopj.android.http.AsyncHttpClient; import
com.loopj.android.http.JsonHttpResponseHandler; import
com.loopj.android.http.RequestParams; import
com.mountreachsolution.e_learningapp.Admin.ClassInDetailsAdminActivity;
import com.mountreachsolution.e_learningapp.Admin.HomeAdminActivity;
import com.mountreachsolution.e_learningapp.Comman.Urls; import
com.mountreachsolution.e_learningapp.R; import
com.mountreachsolution.e_learningapp.RegistrationActivity; import
org.json.JSONException; import org.json.JSONObject; import
cz.msebera.android.httpclient.Header; public class AddClassActivity extends
AppCompatActivity { TextInputEditText tie_class_name,tie_subject_name; Button
btn_add_class; ProgressDialog progressDialog; SharedPreferences preferences;
SharedPreferences.Editor editor; @Override protected void onCreate(Bundle
savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_class); preferences=
PreferenceManager.getDefaultSharedPreferences(AddClassActivity.this);
editor=preferences.edit(); tie_class_name =
findViewById(R.id.tie_add_class_class_name); tie_subject_name =
findViewById(R.id.tie_add_class_subject_name); btn_add_class =
findViewById(R.id.btn_add_class); btn_add_class.setOnClickListener(new
View.OnClickListener() { @Override public void onClick(View v) { if
(tie_class_name.getText().toString().isEmpty()) { tie_class_name.setError("Enter Your
Class Name"); } else if (tie_subject_name.getText().toString().isEmpty()) {
tie_subject_name.setError("Enter Your Subject Name"); } else { progressDialog = new
ProgressDialog(AddClassActivity.this); progressDialog.setTitle("Adding Class");
progressDialog.setCancelable(true); progressDialog.setCanceledOnTouchOutside(true);
progressDialog.setMessage("Please Wait..."); progressDialog.show(); addClass(); }
} }); } private void addClass() { AsyncHttpClient client = new AsyncHttpClient();
RequestParams params = new RequestParams();
params.put("class_name",tie_class_name.getText().toString());
params.put("subject_name",tie_subject_name.getText().toString());
client.post(Urls.urlAddClass,params,new JsonHttpResponseHandler() { @Override
public void onStart() { super.onStart(); } @Override public void onSuccess(int
statusCode, Header[] headers, JSONObject response) { progressDialog.dismiss();
try { String aa = response.getString("success"); if (aa.equals("1")) {
Toast.makeText(AddClassActivity.this, "Class Added Successfully",
Toast.LENGTH_SHORT).show(); startActivity(new Intent(AddClassActivity.this,
HomeAdminActivity.class)); finish(); } else {
Toast.makeText(AddClassActivity.this, "Already Added",
Toast.LENGTH_SHORT).show(); } } catch (JSONException e) {
e.printStackTrace(); } } @Override public void onFailure(int statusCode, Header[]
headers, Throwable throwable, JSONObject errorResponse) {
Toast.makeText(AddClassActivity.this, "Could not Connect",
Toast.LENGTH_SHORT).show(); } }); } }

addclass.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" tools:context=".HomeActivity.HomeActivity"
android:padding="16dp"> <androidx.cardview.widget.CardView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/cardview11" android:layout_marginTop="10dp"
app:cardCornerRadius="10dp" > <LinearLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:id="@+id/ll1" android:padding="16dp"
android:background="@color/light_grey" >
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/til_add_class_class_name"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_add_class_class_name"
android:textColor="@color/purple_700" android:hint="Class Name"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:id="@+id/til_add_class_subject_name"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_add_class_subject_name"
android:textColor="@color/purple_700" android:hint="Subject Name"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<androidx.appcompat.widget.AppCompatButton
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/btn_add_class" android:text="Add Class"
android:textColor="@color/white" android:textStyle="bold"
android:fontFamily="@font/bungee"
android:background="@drawable/btn_bg_shape"
android:backgroundTint="@color/teal_700" android:layout_marginTop="20dp"
android:layout_marginBottom="10dp" android:onClick="btn_continue"/>
</LinearLayout> </androidx.cardview.widget.CardView> </RelativeLayout>

Addhomework.java
package com.mountreachsolution.e_learningapp.Admin.AddHomeWork; import
androidx.appcompat.app.AppCompatActivity; import android.app.ProgressDialog;
import android.content.Intent; import android.content.SharedPreferences; import
android.os.Bundle; import android.preference.PreferenceManager; import
android.view.View; import android.widget.Button; import android.widget.Toast; import
com.google.android.material.textfield.TextInputEditText; import
com.loopj.android.http.AsyncHttpClient; import
com.loopj.android.http.JsonHttpResponseHandler; import
com.loopj.android.http.RequestParams; import
com.mountreachsolution.e_learningapp.Admin.HomeAdminActivity; import
com.mountreachsolution.e_learningapp.Comman.Urls; import
com.mountreachsolution.e_learningapp.R; import org.json.JSONException; import
org.json.JSONObject; import cz.msebera.android.httpclient.Header; public class
AddHomeWorkActivity extends AppCompatActivity { TextInputEditText
tie_homework_title,tie_homework_description; Button btn_add_homework;
ProgressDialog progressDialog; SharedPreferences preferences;
SharedPreferences.Editor editor; @Override protected void onCreate(Bundle
savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_home_work); preferences=
PreferenceManager.getDefaultSharedPreferences(AddHomeWorkActivity.this);
editor=preferences.edit(); tie_homework_title =
findViewById(R.id.tie_add_homework_homework_title); tie_homework_description =
findViewById(R.id.tie_add_homework_homework_description); btn_add_homework =
findViewById(R.id.btn_add_homework);
btn_add_homework.setOnClickListener(new View.OnClickListener() { @Override
public void onClick(View v) { if (tie_homework_title.getText().toString().isEmpty()) {
tie_homework_title.setError("Enter Your Homework title"); } else if
(tie_homework_description.getText().toString().isEmpty()) {
tie_homework_description.setError("Enter Your Homework Description"); } else {
progressDialog = new ProgressDialog(AddHomeWorkActivity.this);
progressDialog.setTitle("Adding Homework"); progressDialog.setCancelable(true);
progressDialog.setCanceledOnTouchOutside(true);
progressDialog.setMessage("Please Wait..."); progressDialog.show(); addHomework();
} } }); } private void addHomework() { AsyncHttpClient client = new
AsyncHttpClient(); RequestParams params = new RequestParams();
params.put("class_id",preferences.getString("class_id",""));
params.put("homework_title",tie_homework_title.getText().toString());
params.put("homework_description",tie_homework_description.getText().toString ());
client.post(Urls.urlAddHomework,params,new JsonHttpResponseHandler() {
@Override public void onStart() { super.onStart(); } @Override public void
onSuccess(int statusCode, Header[] headers, JSONObject response) {
progressDialog.dismiss(); try { String aa = response.getString("success"); if
(aa.equals("1")) { Toast.makeText(AddHomeWorkActivity.this, "Homework
Added Successfully", Toast.LENGTH_SHORT).show(); startActivity(new
Intent(AddHomeWorkActivity.this, HomeAdminActivity.class)); finish(); } else {
Toast.makeText(AddHomeWorkActivity.this, "Already Added",
Toast.LENGTH_SHORT).show(); } } catch (JSONException e) {
e.printStackTrace(); } } @Override public void onFailure(int statusCode, Header[]
headers, Throwable throwable, JSONObject errorResponse) {
Toast.makeText(AddHomeWorkActivity.this, "Could not Connect",
Toast.LENGTH_SHORT).show(); } }); } }

addhomework.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" tools:context=".HomeActivity.HomeActivity"
android:padding="16dp"> <androidx.cardview.widget.CardView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/cardview11" android:layout_marginTop="10dp"
app:cardCornerRadius="10dp" > <LinearLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:id="@+id/ll1" android:padding="16dp"
android:background="@color/light_grey" >
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/til_add_homework_homework_title"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_add_homework_homework_title"
android:textColor="@color/purple_700" android:hint="Homework Title"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:id="@+id/til_add_homework_homework_description"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_add_homework_homework_description"
android:textColor="@color/purple_700" android:hint="Homework Description"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<androidx.appcompat.widget.AppCompatButton android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/btn_add_homework"
android:text="Add Homework" android:textColor="@color/white"
android:textStyle="bold" android:fontFamily="@font/bungee"
android:background="@drawable/btn_bg_shape"
android:backgroundTint="@color/teal_700" android:layout_marginTop="20dp"
android:layout_marginBottom="10dp" android:onClick="btn_continue"/>
</LinearLayout> </androidx.cardview.widget.CardView> </RelativeLayout>

Addnotice.java
{ TextInputEditText tie_notice_board_title, tie_notice_board_description; TextView
tv_select_pdf; Button btn_add_notice_board; ProgressDialog progressDialog;
SharedPreferences preferences; SharedPreferences.Editor editor; private int
PICK_FILE_REQUEST = 2; private String selectedFilePath; private static final int
STORAGE_PERMISSION_CODE = 101; private Uri filePath = null;
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_notice_board); preferences =
PreferenceManager.getDefaultSharedPreferences(AddNoticeBoardActivity.this); editor
= preferences.edit(); tie_notice_board_title =
findViewById(R.id.tie_add_notice_board_title); tie_notice_board_description =
findViewById(R.id.tie_add_notice_board_description); tv_select_pdf =
findViewById(R.id.tv_add_notice_board_select_pdf); btn_add_notice_board =
findViewById(R.id.btn_add_notice_board); // if (Build.VERSION.SDK_INT >=
Build.VERSION_CODES.M && ContextCompat.checkSelfPermission(this, //
Manifest.permission.READ_EXTERNAL_STORAGE) // !=
PackageManager.PERMISSION_GRANTED) { // Intent intent = new
Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, //
Uri.parse("package:" + getPackageName())); // finish(); // startActivity(intent); // return;
// } checkPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE,
STORAGE_PERMISSION_CODE); tv_select_pdf.setOnClickListener(new
View.OnClickListener() { @Override public void onClick(View v) {
showFileChooser(); } }); btn_add_notice_board.setOnClickListener(new
View.OnClickListener(){ @Override public void onClick(View v) { if
(tie_notice_board_title.getText().toString().isEmpty()) {
tie_notice_board_title.setError("Enter Your Notice Title"); } else if
(tie_notice_board_description.getText().toString().isEmpty()) {
tie_notice_board_description.setError("Enter Your Notice Description"); } else {
progressDialog = new ProgressDialog(AddNoticeBoardActivity.this);
progressDialog.setTitle("Adding Notice Board"); progressDialog.setCancelable(true);
progressDialog.setCanceledOnTouchOutside(true);
progressDialog.setMessage("Please Wait..."); progressDialog.show();
addNoticeBoard(); } } }); } private void showFileChooser() { Intent intent = new
Intent(); intent.setType("application/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select pdf"),
PICK_FILE_REQUEST); } @Override protected void onActivityResult(int
requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode,
resultCode, data); if (requestCode == PICK_FILE_REQUEST && resultCode ==
RESULT_OK && data != null && data.getData() != null) { filePath = data.getData();
Log.d("", "File Uri: " + filePath.toString()); // Get the path try { selectedFilePath =
CommonMethods.getPath(this, filePath); tv_select_pdf.setText("File attached"); } catch
(URISyntaxException e) {
e.printStackTrace(); } } } // Function to check and request permission. public void
checkPermission(String permission, int requestCode) { if
(ContextCompat.checkSelfPermission(AddNoticeBoardActivity.this, permission)
== PackageManager.PERMISSION_DENIED) { // Requesting the permission
ActivityCompat.requestPermissions(AddNoticeBoardActivity.this, new String[] {
permission }, requestCode); } else { Toast.makeText(AddNoticeBoardActivity.this,
"Permission already granted", Toast.LENGTH_SHORT).show(); } } private void
addNoticeBoard() { AsyncHttpClient client = new AsyncHttpClient(); RequestParams
params = new RequestParams(); params.put("class_id",
preferences.getString("class_id", "")); params.put("title",
tie_notice_board_title.getText().toString()); params.put("description",
tie_notice_board_description.getText().toString());
client.post(Urls.urlAddNoticeBoard, params, new JsonHttpResponseHandler() { public
void onSuccess(int statusCode, Header[] headers, JSONObject response) {
try { String aa = response.getString("success"); if (aa.equals("1")) { uploadMultipart();
} else { Toast.makeText(AddNoticeBoardActivity.this, "Please Select all fields",
Toast.LENGTH_SHORT).show(); } } catch (JSONException e) { e.printStackTrace(); }
catch (IOException e) { throw new RuntimeException(e); } } public void onFailure(int
statusCode, Header[] headers, Throwable throwable,
JSONObject errorResponse) { Toast.makeText(AddNoticeBoardActivity.this, "Could
Not Connect", Toast.LENGTH_SHORT).show(); } }); } private void uploadMultipart()
throws IOException { //getting name for the pdf Random random = new Random();
String name = String.format("%04d",
random.nextInt(1000000)); if (filePath == null) { onBackPressed(); return; }
//getting the actual path of the pdf File path = new
File(AddStudyMaterialActivity.FileUtil.from(AddNoticeBoardActivity.this, filePath));
if (path == null) { Toast.makeText(this, "Please move your .pdf file to internal storage
and retry", Toast.LENGTH_LONG).show(); } else { //Uploading code try { String
uploadId = UUID.randomUUID().toString(); //Creating a multi part request new
MultipartUploadRequest(this, uploadId,
Urls.urlAddNoticeBoardDoc) .addFileToUpload(String.valueOf(path), "pdf")
//Adding file .addParameter("name", name) //Adding text parameter to the request
.setNotificationConfig(new UploadNotificationConfig()) .setMaxRetries(2)
.startUpload(); //Starting the upload onBackPressed(); } catch (Exception exc) {
Toast.makeText(this, exc.getMessage(), Toast.LENGTH_SHORT).show(); } } } public
static class FileUtil { private static final int EOF = -1; private static final int
DEFAULT_BUFFER_SIZE = 1024 * 4; private FileUtil() { } public static String
from(Context context, Uri uri) throws IOException { InputStream inputStream =
context.getContentResolver().openInputStream(uri); String fileName =
getFileName(context, uri); String[] splitName = splitFileName(fileName); File tempFile
= File.createTempFile(splitName[0], splitName[1]); tempFile = rename(tempFile,
fileName); tempFile.deleteOnExit(); FileOutputStream out = null; try { out = new
FileOutputStream(tempFile); } catch (FileNotFoundException e) { e.printStackTrace();
} if (inputStream != null) { copy(inputStream, out); inputStream.close(); } if (out !=
null) { out.close(); } return tempFile.toString(); } private static String[]
splitFileName(String fileName) { String name = fileName; String extension = ""; int i =
fileName.lastIndexOf("."); if (i != -1) { name = fileName.substring(0, i); extension =
fileName.substring(i); } return new String[]{name, extension}; } private static String
getFileName(Context context,
Uri uri) { String result = null; if (uri.getScheme().equals("content")) { Cursor
cursor = context.getContentResolver().query(uri, null, null, null, null); try { if
(cursor != null && cursor.moveToFirst()) { result =
cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)); } }
catch (Exception e) { e.printStackTrace(); } finally { if (cursor != null) { cursor.close();
} } } if (result == null) { result = uri.getPath(); int cut =
result.lastIndexOf(File.separator); if (cut != -1) { result = result.substring(cut + 1); } }
return result; } private static File rename(File file, String newName) { File newFile =
new File(file.getParent(), newName); if (!newFile.equals(file)) { if (newFile.exists()
&& newFile.delete()) { Log.d("FileUtil", "Delete old " + newName + " file"); } if
(file.renameTo(newFile)) { Log.d("FileUtil", "Rename file to " + newName); } } return
newFile; } private static long copy(InputStream input, OutputStream output) throws
IOException { long count = 0; int n; byte[]
buffer = new byte[DEFAULT_BUFFER_SIZE]; while (EOF != (n =
input.read(buffer))) { output.write(buffer, 0, n); count += n; } return count; } } }

Addnotice.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
tools:context=".Admin.AddNoticeBoardActivity.AddNoticeBoardActivity"
android:padding="16dp"> <androidx.cardview.widget.CardView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/cardview11" android:layout_marginTop="10dp"
app:cardCornerRadius="10dp" > <LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content" android:orientation="vertical"
android:id="@+id/ll1" android:padding="16dp"
android:background="@color/light_yellow" >
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/til_add_notice_board_title"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_add_notice_board_title"
android:textColor="@color/purple_700" android:hint="Notice Title"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:id="@+id/til_add_notice_board_description"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_add_notice_board_description"
android:textColor="@color/purple_700" android:hint="Notice Description"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout> <TextView
android:id="@+id/tv_add_notice_board_select_pdf_title"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginTop="25dp"
android:layout_marginRight="10dp" android:text="Select Notice PDF"
android:textColor="@color/black" android:textSize="18dp" android:textStyle="bold" />
<TextView android:id="@+id/tv_add_notice_board_select_pdf"
android:layout_width="match_parent" android:layout_height="45dp"
android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/edittextbackground" android:hint="Click here select
PDF" android:textAlignment="center" android:gravity="center"
android:textColorHint="@color/teal_700" android:textSize="15dp"
<androidx.appcompat.widget.AppCompatButton
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/btn_add_notice_board" android:text="Add Notice"
android:textColor="@color/white" android:textStyle="bold"
android:fontFamily="@font/bungee"
android:background="@drawable/btn_bg_shape"
android:backgroundTint="@color/teal_700" android:layout_marginTop="20dp"
android:layout_marginBottom="10dp" /> </LinearLayout>
</androidx.cardview.widget.CardView> </RelativeLayout>

Addmodelans.java
ackage
com.mountreachsolution.e_learningapp.Admin.AddQuestionandAnswerModelPap
erActivity; import androidx.appcompat.app.AppCompatActivity; import
androidx.appcompat.widget.AppCompatButton; import
androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat;
import android.Manifest; import android.app.ProgressDialog; import
android.content.Context; import android.content.Intent; import
android.content.SharedPreferences; import android.content.pm.PackageManager;
import android.database.Cursor; import android.net.Uri; import android.os.Build;
import android.os.Bundle; import android.preference.PreferenceManager; import
android.provider.OpenableColumns; import android.provider.Settings; import
android.util.Log; import android.view.View; import android.widget.Spinner; import
android.widget.TextView; import android.widget.Toast; import
com.google.android.material.textfield.TextInputEditText; import
com.loopj.android.http.AsyncHttpClient; import
com.loopj.android.http.JsonHttpResponseHandler; import
com.loopj.android.http.RequestParams; import
com.mountreachsolution.e_learningapp.Admin.AddNoticeBoardActivity.AddNotic
eBoardActivity; import
com.mountreachsolution.e_learningapp.Admin.AddQuestionandAnswerModelPap
erActivity.AddQuestionandAnswerModelPaperActivity; import
com.mountreachsolution.e_learningapp.Admin.AddStudyMaterial.AddStudyMater
ialActivity; import
com.mountreachsolution.e_learningapp.Comman.CommonMethods; import
com.mountreachsolution.e_learningapp.Comman.Urls; import
com.mountreachsolution.e_learningapp.QuestionandAnswerModelPaper.Questiona
ndAnswerModelPaperActivity; import
com.mountreachsolution.e_learningapp.QuestionandAnswerModelPaper.SearchQu
estionandAnswerPaperActivity; import com.mountreachsolution.e_learningapp.R;
import net.gotev.uploadservice.MultipartUploadRequest; import
net.gotev.uploadservice.UploadNotificationConfig; import
org.json.JSONException; import org.json.JSONObject; import java.io.File; import
java.io.FileNotFoundException; import java.io.FileOutputStream; import
java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import
java.net.URISyntaxException; import java.util.Random; import java.util.UUID; import
cz.msebera.android.httpclient.Header; public class
AddQuestionandAnswerModelPaperActivity extends AppCompatActivity { Spinner
spinner_add_branch, spinner_add_semester, spinner_add_exam;
TextInputEditText tie_question_and_answer_paper_title; TextView tv_select_pdf;
AppCompatButton btn_add_question_and_answer_paper; SharedPreferences
preferences; SharedPreferences.Editor editor; ProgressDialog progressDialog; private
int PICK_FILE_REQUEST = 2; private String selectedFilePath; private Uri filePath =
null; private static final int STORAGE_PERMISSION_CODE = 101; @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_questionand_answer_model_paper); preferences =
PreferenceManager.getDefaultSharedPreferences(AddQuestionandAnswerModelP
aperActivity.this); editor = preferences.edit(); setTitle("" +
preferences.getString("class_name", "") + "Add Q and A Paper"); spinner_add_branch =
findViewById(R.id.spinner_add_branch); spinner_add_semester =
findViewById(R.id.spinner_add_semester); spinner_add_exam =
findViewById(R.id.spinner_add_exam);
tie_question_and_answer_paper_title =
findViewById(R.id.tie_add_question_and_answer_paper_title); tv_select_pdf =
findViewById(R.id.tv_add_question_and_answer_paper);
btn_add_question_and_answer_paper =
findViewById(R.id.btn_add_question_and_answer_paper_search);
checkPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE,
STORAGE_PERMISSION_CODE); // if (Build.VERSION.SDK_INT >=
Build.VERSION_CODES.M && ContextCompat.checkSelfPermission(this, //
Manifest.permission.READ_EXTERNAL_STORAGE) // !=
PackageManager.PERMISSION_GRANTED) { // Intent intent = new
Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, //
Uri.parse("package:" + getPackageName())); // finish(); // startActivity(intent); // return;
// } tv_select_pdf.setOnClickListener(new View.OnClickListener() { @Override public
void onClick(View v) { showFileChooser(); } });
btn_add_question_and_answer_paper.setOnClickListener(new View.OnClickListener()
{ @Override public void onClick(View v) { if
(spinner_add_branch.getSelectedItem().toString().equals("Select Your Branch")) {
((TextView) spinner_add_branch.getSelectedView()).setError("Please Select Your
Branch"); } else if
(spinner_add_semester.getSelectedItem().toString().equals("Select Your Sem")) {
((TextView) spinner_add_semester.getSelectedView()).setError("Please Select Your
Sem"); } else if
(spinner_add_exam.getSelectedItem().toString().equals("Select Your Exam")) {
((TextView) spinner_add_exam.getSelectedView()).setError("Please Select Your
Exam"); } if (tie_question_and_answer_paper_title.getText().toString().isEmpty())
{ tie_question_and_answer_paper_title.setError("Enter Your Question and Answer
Paper Title"); } else { progressDialog = new
ProgressDialog(AddQuestionandAnswerModelPaperActivity.this);
progressDialog.setTitle("Adding Notice Board"); progressDialog.setCancelable(true);
progressDialog.setCanceledOnTouchOutside(true);
progressDialog.setMessage("Please Wait..."); progressDialog.show();
addQuestionandAnswerPaper(); } } }); } // Function to check and request permission.
public void checkPermission(String permission, int requestCode) { if
(ContextCompat.checkSelfPermission(AddQuestionandAnswerModelPaperActivit
y.this, permission) == PackageManager.PERMISSION_DENIED) { // Requesting the
permission
ActivityCompat.requestPermissions(AddQuestionandAnswerModelPaperActivity.t his,
new String[] { permission }, requestCode); } else {
Toast.makeText(AddQuestionandAnswerModelPaperActivity.this, "Permission already
granted", Toast.LENGTH_SHORT).show(); } } private void showFileChooser() { Intent
intent = new Intent(); intent.setType("application/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select pdf"),
PICK_FILE_REQUEST); } @Override protected void onActivityResult(int
requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode,
resultCode, data); if (requestCode == PICK_FILE_REQUEST && resultCode ==
RESULT_OK && data != null && data.getData() != null) { filePath = data.getData();
Log.d("", "File Uri: " + filePath.toString()); // Get the path try { selectedFilePath =
CommonMethods.getPath(this, filePath); tv_select_pdf.setText("File attached"); } catch
(URISyntaxException e) { e.printStackTrace(); } } } private void
addQuestionandAnswerPaper() { AsyncHttpClient client = new AsyncHttpClient();
RequestParams params = new RequestParams(); params.put("class_id",
preferences.getString("class_id", "")); params.put("branch",
spinner_add_branch.getSelectedItem().toString()); params.put("sem",
spinner_add_semester.getSelectedItem().toString()); params.put("exam",
spinner_add_exam.getSelectedItem().toString()); params.put("title",
tie_question_and_answer_paper_title.getText().toString());
client.post(Urls.urlAddQuestionandAnswerPaper, params, new
JsonHttpResponseHandler() { public void onSuccess(int statusCode, Header[] headers,
JSONObject response) { try { String aa = response.getString("success"); if
(aa.equals("1")) { uploadMultipart(); } else {
Toast.makeText(AddQuestionandAnswerModelPaperActivity.this, "Please Select all
fields", Toast.LENGTH_SHORT).show(); } } catch (JSONException e) {
e.printStackTrace(); } catch (IOException e) { throw new RuntimeException(e); }
} public void onFailure(int statusCode, Header[] headers, Throwable throwable,
JSONObject errorResponse) {
Toast.makeText(AddQuestionandAnswerModelPaperActivity.this, "Could Not
Connect", Toast.LENGTH_SHORT).show(); } }); } private void uploadMultipart()
throws IOException { //getting name for the pdf Random random = new Random();
String name = String.format("%04d", random.nextInt(1000000)); if
(filePath == null) { onBackPressed(); return; } //getting the actual path of the pdf File
path = new
File(FileUtil.from(AddQuestionandAnswerModelPaperActivity.this, filePath)); if (path
== null) { Toast.makeText(this, "Please move your .pdf file to internal storage and retry",
Toast.LENGTH_LONG).show(); } else { //Uploading code try { String uploadId =
UUID.randomUUID().toString(); //Creating a multi part request new
MultipartUploadRequest(this, uploadId,
Urls.urlAddQuestionandAnswerPaperDoc)
.addFileToUpload(String.valueOf(path), "pdf") //Adding file
.addParameter("name", name) //Adding text parameter to the request
.setNotificationConfig(new UploadNotificationConfig()) .setMaxRetries(2)
.startUpload(); //Starting the upload onBackPressed(); } catch (Exception exc) {
Toast.makeText(this, exc.getMessage(), Toast.LENGTH_SHORT).show(); } } } public
static class FileUtil { private static final int EOF = -1; private static final int
DEFAULT_BUFFER_SIZE = 1024 * 4; private FileUtil() { } public static String
from(Context context, Uri uri) throws IOException { InputStream inputStream =
context.getContentResolver().openInputStream(uri); String fileName =
getFileName(context, uri); String[] splitName = splitFileName(fileName); File tempFile
= File.createTempFile(splitName[0], splitName[1]); tempFile = rename(tempFile,
fileName); tempFile.deleteOnExit(); FileOutputStream out = null; try { out = new
FileOutputStream(tempFile); } catch (FileNotFoundException e) { e.printStackTrace();
} if (inputStream != null) { copy(inputStream, out); inputStream.close(); } if (out !=
null) { out.close(); } return tempFile.toString(); } private static String[]
splitFileName(String fileName) { String name = fileName; String extension = ""; int i =
fileName.lastIndexOf("."); if (i != -1) { name = fileName.substring(0, i); extension =
fileName.substring(i); } return new String[]{name, extension}; } private static String
getFileName(Context context, Uri uri) { String result = null; if
(uri.getScheme().equals("content")) { Cursor cursor =
context.getContentResolver().query(uri, null, null, null, null); try { if
(cursor != null && cursor.moveToFirst()) { result =
cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)); } }
catch (Exception e) { e.printStackTrace(); } finally { if (cursor != null) { cursor.close();
} } } if (result == null) { result = uri.getPath(); int cut =
result.lastIndexOf(File.separator); if (cut != -1) { result = result.substring(cut + 1); } }
return result; } private static File rename(File file, String newName) { File newFile =
new File(file.getParent(), newName); if (!newFile.equals(file)) { if (newFile.exists()
&& newFile.delete()) { Log.d("FileUtil", "Delete old " + newName + " file"); } if
(file.renameTo(newFile)) { Log.d("FileUtil", "Rename file to " + newName); } } return
newFile; } private static long copy(InputStream input, OutputStream output) throws
IOException { long count = 0; int n; byte[]
buffer = new byte[DEFAULT_BUFFER_SIZE]; while (EOF != (n =
input.read(buffer))) { output.write(buffer, 0, n); count += n; } return count; } } }

addmodelans.xml
?xml version="1.0" encoding="utf-8"?> <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
tools:context=".QuestionandAnswerModelPaper.QuestionandAnswerModelPaperA
ctivity" android:orientation="vertical"> <TextView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tv_add_question_and_answer_paper_select_branch_title"
android:text="Select Branch" android:textSize="18dp" android:textStyle="bold"
android:textColor="@color/purple_700" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginTop="20dp"
android:fontFamily="sans-serif-condensed-medium"/> <Spinner
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/spinner_add_branch" android:layout_marginTop="20dp"
android:layout_marginLeft="20dp" android:layout_marginRight="20dp"
android:entries="@array/branch" /> <TextView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tv_add_question_and_answer_paper_select_semester_title"
android:text="Select Semester" android:textSize="18dp" android:textStyle="bold"
android:textColor="@color/purple_700" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginTop="20dp"
android:fontFamily="sans-serif-condensed-medium"/> <Spinner
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/spinner_add_semester" android:layout_marginTop="20dp"
android:layout_marginLeft="20dp" android:layout_marginRight="20dp"
android:entries="@array/semester" /> <TextView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tv_add_question_and_answer_paper_select_exam_title"
android:text="Select Exam" android:textSize="18dp" android:textStyle="bold"
android:textColor="@color/purple_700" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginTop="20dp"
android:fontFamily="sans-serif-condensed-medium"/> <Spinner
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/spinner_add_exam" android:layout_marginTop="20dp"
android:layout_marginLeft="20dp" android:layout_marginRight="20dp"
android:entries="@array/select_the_exam" />
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:id="@+id/tv_add_question_and_answer_paper_title"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_add_question_and_answer_paper_title"
android:textColor="@color/purple_700" android:hint="Title of Paper"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout> <TextView
android:id="@+id/tv_add_question_and_answer_paper_Pdf_title"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginTop="25dp"
android:layout_marginRight="10dp" android:text="Select Question or Answer Paper
PDF" android:textColor="@color/black" android:textSize="18dp"
android:textStyle="bold" /> <TextView
android:id="@+id/tv_add_question_and_answer_paper"
android:layout_width="match_parent" android:layout_height="45dp"
android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/edittextbackground" android:hint="Click here select
PDF" android:textAlignment="center" android:gravity="center"
android:textColorHint="@color/teal_700" android:textSize="15dp" />
<androidx.appcompat.widget.AppCompatButton
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/btn_add_question_and_answer_paper_search"
android:text="Add Question and Answer Paper" android:textColor="@color/white"
android:textStyle="bold" android:fontFamily="@font/bungee"
android:background="@drawable/btn_bg_shape" android:layout_margin="20dp"
/>

Addrecorduing.java
?xml version="1.0" encoding="utf-8"?> <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".QuestionandAnswerModelPaper.QuestionandAnswerModelPaperA
ctivity" android:orientation="vertical"> <TextView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tv_add_question_and_answer_paper_select_branch_title"
android:text="Select Branch" android:textSize="18dp" android:textStyle="bold"
android:textColor="@color/purple_700" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginTop="20dp"
android:fontFamily="sans-serif-condensed-medium"/> <Spinner
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/spinner_add_branch" android:layout_marginTop="20dp"
android:layout_marginLeft="20dp" android:layout_marginRight="20dp"
android:entries="@array/branch" /> <TextView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/tv_add_question_and_answer_paper_select_semester_title"
android:text="Select Semester" android:textSize="18dp" android:textStyle="bold"
android:textColor="@color/purple_700" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginTop="20dp"
android:fontFamily="sans-serif-condensed-medium"/> <Spinner
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/spinner_add_semester" android:layout_marginTop="20dp"
android:layout_marginLeft="20dp" android:layout_marginRight="20dp"
android:entries="@array/semester" /> <TextView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tv_add_question_and_answer_paper_select_exam_title"
android:text="Select Exam" android:textSize="18dp" android:textStyle="bold"
android:textColor="@color/purple_700" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" android:layout_marginTop="20dp"
android:fontFamily="sans-serif-condensed-medium"/> <Spinner
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/spinner_add_exam" android:layout_marginTop="20dp"
android:layout_marginLeft="20dp" android:layout_marginRight="20dp"
android:entries="@array/select_the_exam" />
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:id="@+id/tv_add_question_and_answer_paper_title"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_add_question_and_answer_paper_title"
android:textColor="@color/purple_700" android:hint="Title of Paper"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout> <TextView
android:id="@+id/tv_add_question_and_answer_paper_Pdf_title"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginTop="25dp"
android:layout_marginRight="10dp" android:text="Select Question or Answer Paper
PDF" android:textColor="@color/black" android:textSize="18dp"
android:textStyle="bold" /> <TextView
android:id="@+id/tv_add_question_and_answer_paper"
android:layout_width="match_parent" android:layout_height="45dp"
android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/edittextbackground" android:hint="Click here select
PDF" android:textAlignment="center" android:gravity="center"
android:textColorHint="@color/teal_700" android:textSize="15dp" />
<androidx.appcompat.widget.AppCompatButton
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/btn_add_question_and_answer_paper_search"
android:text="Add Question and Answer Paper" android:textColor="@color/white"
android:textStyle="bold" android:fontFamily="@font/bungee"
android:background="@drawable/btn_bg_shape" android:layout_margin="20dp"
/>

Addrecording.xml
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" tools:context=".HomeActivity.HomeActivity"
android:padding="16dp"> <androidx.cardview.widget.CardView
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/cardview11" android:layout_marginTop="10dp"
app:cardCornerRadius="10dp" > <LinearLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:id="@+id/ll1" android:padding="16dp"
android:background="@color/light_purple" >
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/til_add_recording_recording_title"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_add_recording_recording_title"
android:textColor="@color/purple_700" android:hint="Recording Title"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:id="@+id/til_add_recording_recording_description"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_add_recording_recording_description"
android:textColor="@color/purple_700" android:hint="Recording Description"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:id="@+id/til_add_recording_recording_url"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/tie_add_recording_recording_url"
android:textColor="@color/purple_700" android:hint="Recording URL"
android:autoLink="web" android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<androidx.appcompat.widget.AppCompatButton android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/btn_add_recording"
android:text="Add Recording" android:textColor="@color/white"
android:textStyle="bold" android:fontFamily="@font/bungee"
android:background="@drawable/btn_bg_shape"
android:backgroundTint="@color/teal_700" at.java
android:layout_marginBottom="10dp" /> </LinearLayout>
</androidx.cardview.widget.CardView> </RelativeLayout>

addstudym.java
package com.mountreachsolution.e_learningapp.Admin.AddStudyMaterial; import
androidx.appcompat.app.AppCompatActivity; import
androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat;
import android.Manifest; import android.app.ProgressDialog; import
android.content.Context; import android.content.Intent; import
android.content.SharedPreferences; import android.content.pm.PackageManager;
import android.database.Cursor; import android.net.Uri; import android.os.Build;
import android.os.Bundle; import android.preference.PreferenceManager; import
android.provider.MediaStore; import android.provider.OpenableColumns; import
android.provider.Settings; import android.util.Log; import android.view.View; import
android.widget.Button; import android.widget.EditText; import
android.widget.TextView; import android.widget.Toast; import
com.google.android.material.textfield.TextInputEditText; import
com.loopj.android.http.AsyncHttpClient; import
com.loopj.android.http.JsonHttpResponseHandler; import
com.loopj.android.http.RequestParams; import
com.mountreachsolution.e_learningapp.Admin.AddClass.AddClassActivity; import
com.mountreachsolution.e_learningapp.Comman.CommonMethods; import
com.mountreachsolution.e_learningapp.Comman.Urls; import
com.mountreachsolution.e_learningapp.R; import
net.gotev.uploadservice.MultipartUploadRequest; import
net.gotev.uploadservice.UploadNotificationConfig; import
org.json.JSONException; import org.json.JSONObject; import java.io.File; import
java.io.FileNotFoundException; import java.io.FileOutputStream; import
java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import
java.net.URISyntaxException; import java.util.Random; import java.util.UUID; import
cz.msebera.android.httpclient.Header; public class AddStudyMaterialActivity extends
AppCompatActivity { EditText
et_study_material_title, et_study_material_description; TextView tv_select_pdf; Button
btn_add_study_material; ProgressDialog progressDialog;
SharedPreferences preferences; SharedPreferences.Editor editor; private int
PICK_FILE_REQUEST = 2; private String selectedFilePath; private Uri filePath = null;
private static final int STORAGE_PERMISSION_CODE = 101; @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_study_material); preferences =
PreferenceManager.getDefaultSharedPreferences(AddStudyMaterialActivity.this);
editor = preferences.edit(); et_study_material_title =
findViewById(R.id.et_study_material_title); et_study_material_description =
findViewById(R.id.et_study_material_description); tv_select_pdf =
findViewById(R.id.tv_study_material_select_pdf); btn_add_study_material =
findViewById(R.id.btn_add_study_material); // if (Build.VERSION.SDK_INT >=
Build.VERSION_CODES.M && ContextCompat.checkSelfPermission(this, //
Manifest.permission.READ_EXTERNAL_STORAGE) // !=
PackageManager.PERMISSION_GRANTED) { // Intent intent = new
Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, //
Uri.parse("package:" + getPackageName())); // finish(); // startActivity(intent); // return;
// } checkPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE,
STORAGE_PERMISSION_CODE); tv_select_pdf.setOnClickListener(new
View.OnClickListener() { @Override public void onClick(View v) {
showFileChooser(); } }); btn_add_study_material.setOnClickListener(new
View.OnClickListener() { @Override public void onClick(View v) { if
(et_study_material_title.getText().toString().isEmpty()) {
et_study_material_title.setError("Enter Your Study Material Title"); } else if
(et_study_material_description.getText().toString().isEmpty()) {
et_study_material_description.setError("Enter Your Study Material Description"); } else
{ progressDialog = new ProgressDialog(AddStudyMaterialActivity.this);
progressDialog.setTitle("Adding Study Material"); progressDialog.setCancelable(true);
progressDialog.setCanceledOnTouchOutside(true);
progressDialog.setMessage("Please Wait..."); progressDialog.show();
addStudyMaterial(); } } }); } // Function to check and request permission. public void
checkPermission(String permission, int requestCode) { if
(ContextCompat.checkSelfPermission(AddStudyMaterialActivity.this, permission)
== PackageManager.PERMISSION_DENIED) { // Requesting the permission
ActivityCompat.requestPermissions(AddStudyMaterialActivity.this, new String[]
{ permission }, requestCode); } else {
Toast.makeText(AddStudyMaterialActivity.this, "Permission already granted",
Toast.LENGTH_SHORT).show(); } } private void showFileChooser() { Intent
intent = new Intent(); intent.setType("application/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select pdf"),
PICK_FILE_REQUEST); } @Override protected void onActivityResult(int
requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode,
resultCode, data); if (requestCode == PICK_FILE_REQUEST && resultCode ==
RESULT_OK && data != null && data.getData() != null) { filePath =
data.getData();Log.d("", "File Uri: " + filePath.toString()); // Get the path try {
selectedFilePath = CommonMethods.getPath(this, filePath); tv_select_pdf.setText("File
attached"); } catch (URISyntaxException e) {
e.printStackTrace(); } } } private void addStudyMaterial() { AsyncHttpClient client =
new AsyncHttpClient(); RequestParams params = new RequestParams();
params.put("class_id", preferences.getString("class_id", "")); params.put("title",
et_study_material_title.getText().toString()); params.put("description",
et_study_material_description.getText().toString());
client.post(Urls.urlAddStudyMaterial, params, new JsonHttpResponseHandler() {
public void onSuccess(int statusCode, Header[] headers, JSONObject response) { try {
String aa = response.getString("success"); if (aa.equals("1")) { uploadMultipart(); } else
{ Toast.makeText(AddStudyMaterialActivity.this, "Please Select all fields",
Toast.LENGTH_SHORT).show(); } } catch (JSONException e) { e.printStackTrace(); }
catch (IOException e) { throw new RuntimeException(e); } } public void onFailure(int
statusCode, Header[] headers, Throwable throwable,
JSONObject errorResponse) { Toast.makeText(AddStudyMaterialActivity.this, "Could
Not Connect", Toast.LENGTH_SHORT).show(); } }); } private void uploadMultipart()
throws IOException { //getting name for the pdf Random random = new Random();
String name = String.format("%04d",
random.nextInt(1000000)); if (filePath == null) { onBackPressed(); return; }
//getting the actual path of the pdf File path = new
File(FileUtil.from(AddStudyMaterialActivity.this, filePath)); if (path == null) {
Toast.makeText(this, "Please move your .pdf file to internal storage and retry",
Toast.LENGTH_LONG).show(); } else { //Uploading code try { String uploadId =
UUID.randomUUID().toString(); //Creating a multi part request new
MultipartUploadRequest(this, uploadId, Urls.urlAddStudyMaterialDoc)
.addFileToUpload(String.valueOf(path), "pdf") //Adding file
.addParameter("name", name) //Adding text parameter to the request
.setNotificationConfig(new UploadNotificationConfig()) .setMaxRetries(2)
.startUpload(); //Starting the upload onBackPressed(); } catch (Exception exc) {
Toast.makeText(this, exc.getMessage(), Toast.LENGTH_SHORT).show(); } } } public
static class FileUtil { private static final int EOF = -1; private static final int
DEFAULT_BUFFER_SIZE = 1024 * 4; private FileUtil() { } public static String
from(Context context, Uri uri) throws IOException { InputStream inputStream =
context.getContentResolver().openInputStream(uri); String fileName =
getFileName(context, uri); String[] splitName = splitFileName(fileName); File tempFile
= File.createTempFile(splitName[0], splitName[1]); tempFile = rename(tempFile,
fileName); tempFile.deleteOnExit(); FileOutputStream out = null; try { out = new
FileOutputStream(tempFile); } catch (FileNotFoundException e) { e.printStackTrace();
} if (inputStream != null) { copy(inputStream, out); inputStream.close(); } if (out !=
null) { out.close(); } return tempFile.toString(); } private static String[]
splitFileName(String fileName) { String name = fileName; String extension = ""; int i =
fileName.lastIndexOf("."); if (i != -1) { name = fileName.substring(0, i); extension =
fileName.substring(i); } return new String[]{name, extension}; } private static String
getFileName(Context context, Uri uri) { String result = null; if
(uri.getScheme().equals("content")) { Cursor cursor =
context.getContentResolver().query(uri, null, null, null, null); try { if
(cursor != null && cursor.moveToFirst()) { result =
cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)); } }
catch (Exception e) { e.printStackTrace(); } finally { if (cursor != null) { cursor.close();
} } } if (result == null) { result = uri.getPath(); int cut =
result.lastIndexOf(File.separator); if (cut != -1) { result = result.substring(cut + 1); } }
return result; } private static File rename(File file, String newName) { File newFile =
new File(file.getParent(), newName); if (!newFile.equals(file)) { if (newFile.exists()
&& newFile.delete()) { Log.d("FileUtil", "Delete old " + newName + " file"); } if
(file.renameTo(newFile)) { Log.d("FileUtil", "Rename file to " + newName); } } return
newFile; } private static long copy(InputStream input, OutputStream output) throws
IOException { long count = 0; int n; byte[]
buffer = new byte[DEFAULT_BUFFER_SIZE]; while (EOF != (n =
input.read(buffer))) { output.write(buffer, 0, n); count += n; } return count; } } }

addstudymat.xml
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
tools:context=".Admin.HomeAdminActivity"> <LinearLayout
android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> <TextView
android:id="@+id/tv_study_material_title" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_marginLeft="10dp"
android:layout_marginTop="25dp" android:layout_marginRight="10dp"
android:text="Study Material Title" android:textColor="@color/black"
android:textSize="18dp" android:textStyle="bold" /> <EditText
android:id="@+id/et_study_material_title" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="@drawable/edittextbackground" android:hint="Study Material
Title" android:textAlignment="center"
android:textColorHint="@color/teal_700" android:textSize="15dp" /> <TextView
android:id="@+id/tv_study_material_description"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginTop="25dp"
android:layout_marginRight="10dp" android:text="Study Material Description"
android:textColor="@color/black" android:textSize="18dp" android:textStyle="bold" />
<EditText android:id="@+id/et_study_material_description"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:background="@drawable/edittextbackground" android:hint="Study Material
Description" android:minHeight="45dp" android:textAlignment="center"
android:textColorHint="@color/teal_700" android:textSize="15dp" /> <TextView
android:id="@+id/tv_study_material_select_pdf_title"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_marginLeft="10dp" android:layout_marginTop="25dp"
android:layout_marginRight="10dp" android:text="Select Study Material PDF"
android:textColor="@color/black" android:textSize="18dp" android:textStyle="bold" />
<TextView android:id="@+id/tv_study_material_select_pdf"
android:layout_width="match_parent" android:layout_height="45dp"
android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/edittextbackground" android:hint="Click here select
PDF" android:textAlignment="center" android:gravity="center"
android:textColorHint="@color/teal_700" android:textSize="15dp" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_add_study_material" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_gravity="center"
android:layout_marginTop="20dp" android:layout_marginBottom="20dp"
android:background="@drawable/btn_bg_shape"
android:backgroundTint="@color/teal_700" android:text="Add Study Material"
android:textAllCaps="false" android:textColor="#ffff"
android:layout_margin="16dp" android:textSize="16dp" android:textStyle="bold"
/> <ProgressBar android:id="@+id/progress" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_centerInParent="true"
android:visibility="gone" />
</LinearLayout> </ScrollView>

Manifest.xml
<?xml version="1.0" encoding="utf-8"?> <manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"> <uses-permission
android:name="android.permission.INTERNET" /> <uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION" />
<usespermission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE" />
<usespermission android:name="android.permission.FOREGROUND_SERVICE" />
<!--Declaring the required permissions--> <uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE" />
<usespermission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true"
android:theme="@style/Theme.ELearningApp"
android:usesCleartextTraffic="true" tools:targetApi="31"> <activity
android:name=".Admin.AddClass.AddClassActivity" android:exported="false" />
<activity
android:name=".Admin.AddQuestionandAnswerModelPaperActivity.AddQuestion
andAnswerModelPaperActivity" android:exported="false" /> <activity
android:name=".Admin.AddNoticeBoardActivity.AddNoticeBoardActivity"
android:exported="false" /> <activity
android:name=".Admin.AddRecording.AddRecordingActivity"
android:exported="false" /> <activity
android:name=".Admin.AddStudyMaterial.AddStudyMaterialActivity"
android:exported="false" /> <activity
android:name=".Admin.AddHomeWork.AddHomeWorkActivity"
android:exported="false" /> <activity
android:name=".Admin.ClassInDetailsAdminActivity" android:exported="false" />
<activity android:name=".Admin.HomeAdminActivity" android:exported="false"
/> <activity android:name=".Admin.LoginAdminActivity" android:exported="false" />
<activity
android:name=".QuestionandAnswerModelPaper.SearchQuestionandAnswerPaper
Activity" android:exported="false" /> <activity
android:name=".Quiz.QuizActivity" android:exported="false" /> <activity
android:name=".QuestionandAnswerModelPaper.QuestionandAnswerModelPaper
Activity" android:exported="false" /> <activity
android:name=".NoticeBoard.NoticeBoardActivity" android:exported="false" />
<activity android:name=".Recording.RecordingActivity" android:exported="false"
/> <activity android:name=".StudyMaterial.StudyMaterialActivity"
android:exported="false" /> <activity
android:name=".HomeWork.HomeWorkActivity" android:exported="false" />
<activity android:name=".HomeActivity.ClassInDetailsActivity"
android:exported="false" /> <activity android:name=".RegistrationActivity"
android:exported="false" android:theme="@style/NoActionBar" /> <activity
android:name=".HomeActivity.HomeActivity" android:exported="false" /> <activity
android:name=".LoginActivity" android:exported="false"
android:theme="@style/NoActionBar" /> <activity android:name=".SplashActivity"
android:exported="true" android:theme="@style/NoActionBar"> <intent-filter> <action
android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> </intent-filter>
</activity> </application> </manifest>
Chapter 4
4.1.1 Software Requirements:

• Windows 7 or above
• RAM 8 GB Minimum
• SSD 256 Minimum
• Android Studio
• Xampp
• Postman
• Sublime

4.1.2 Database Requirements:

• MySQL
• PHP Web Service

4.1.2 Programming Language:

• Java
• XML
• PHP
• SQL

4.2.1 Implementation details:

1.Frontend Development:
Web Development: Use HTML, CSS, and JavaScript frameworks (such as React.js, Angular, or
Vue.js) to create the user interface.

Mobile Development: Develop mobile applications for Android using technologies like Android
Studio.

Backend Development:
Choose a backend programming language (e.g., Python, Node.js, Ruby) and framework (e.g., Django,
Flask, Express.js) to build the server-side logic.Implement APIs for managing user authentication,
course content, progress tracking, and other functionalities.
Set up a database (e.g., MySQL, PostgreSQL, MongoDB) to store user data, course materials, and other
relevant information.

2.User Authentication and Authorization:


Implement authentication mechanisms such as username/password login, social media login (e.g.,
OAuth), or single sign-on (SSO) solutions.Manage user roles and permissions to control access to
courses, content, and administrative features.

3.Content Management:
Develop a system for creating, organizing, and delivering educational content. This may include text
documents, videos, presentations, quizzes, assignments, and interactive simulations.
Support for multimedia formats and content uploading/storage (e.g., Amazon S3, Google Cloud
Storage).

4.Interactivity and Engagement:


Implement features for interactive learning activities such as quizzes, assessments, discussions, and
peer-to-peer collaboration.Utilize real-time communication technologies (e.g., WebSockets, WebRTC)
for live lectures, virtual classrooms, and online tutoring sessions.

5.Progress Tracking and Analytics:


Capture and analyze data on user interactions, course progress, assessment scores, and other relevant
metrics.Use analytics tools and dashboards to generate insights and reports for learners, instructors,
and administrators.

6.Communication and Collaboration:


Integrate messaging systems, discussion forums, and chatbots for communication between learners,
instructors, and peers. Implement features for collaborative projects, group assignments, and
teamwork.

7.Mobile Accessibility:
Ensure responsiveness and compatibility with various devices and screen sizes. Develop native mobile
applications or optimize the web application for mobile browsers.
4.2.1 Output
Chapter 5

5.1 CONCLUSION AND FUTURE WORK


Our project is only a humble venture to satisfy the needs to manage their
project work. Several user friendly coding have also adopted. This package shall prove to be a
powerful package in satisfying all the requirements of the school. The objective of software planning
is to provide a frame work that enables the manger to make reasonable estimates made within a
limited time frame at the beginning of the software project and should be updated regularly as the
project progresses.

• At the end it is concluded that we have made effort on following points...

• A description of the background and context of the project and its relation to work already done
in the area.

• Made statement of the aims and objectives of the project.

• The description of Purpose, Scope, and applicability.

• We &fine the problem on which we are working in the project.

• We describe the requirement Specifications of the system and the actions that can be done on
these things.

• We understand the problem domain and produce a model of the system, which describes
operations that can be performed on the system.

• We included features and operations in detail, including screen layouts.

• We designed user interface and security issues related to system.

• Finally the system is implemented and tested according to test cases.


5.2 FUTURE WORK
In a nutshell, it can be summarized that the future scope of the project circles around maintaining
information regarding:
We can add printer in future.
• We can give more advance software for E-learning Management System including more
facilities
• We will host the platform on online servers to make it accessible worldwide
• Integrate multiple load balancers to distribute the loads of the system
• Create the master and slave database structure to reduce the overload of the database queries
• Implement the backup mechanism for taking backup of codebase and database on regular basis
on different servers.

The above mentioned points are the enhancements which can be done to increase the applicability and
usage of this project. Here we can maintain the records of Assignment and Student. Also, as it can be
seen that now-a-days the players are versatile, i.e. so there is a scope for introducing a method to
maintain the E-learning Management System.
Enhancements can be done to maintain all the Assignment, Student, TEACHER, QUIZ, QUESTION.
We have left all the options open so that if there is any other future requirement in the system by
the user for the enhancement of the system then it is possible to implement them. In the last we
would like to thanks all the persons involved in the development of the system directly or
indirectly. We hope that the project will serve its purpose for which it is develop there by
underlining success of process.

5.3 DATA FLOW DIAGRAM (DFD)


Quiz
Roles
Student Login of User Error and
Solution

Learning
Student Materials
Login Activity
Registration
Add Project

Roles Add Learning


Admin Login of Materials
Admin
Chapter 6

6.1 REFERENCES

[1] C.-H. P. Muhammad Ali, Syed Ali Raza, Wasim Qazi, “Assessing e-learning system in higher
education institutes : evidence from structural equation modelling,” Interact. Technol. Smart
Educ., 2017.

[2] D. Adams, M. Hwee, and J. Tan, “Students ’ readiness for blended learning in a leading Malaysian
private higher education institution,” Interact. Technol. Smart Educ., 2020, doi: 10.1108/ITSE-03-
2020-0032.
[3] A. Chandra, “Analysis of factor ’ s in fl uencing the adoption of e-teaching methodology of
learning by students : an empirical study amidst the present pandemic crisis,” Asian J. Econ.
Bank., vol. 5, no. 1, pp. 15–24, 2021, doi: 10.1108/AJEB-122020-0112.

[4] M. Alawamleh and L. M. Al-twait, “The effect of online learning on communication between
instructors and students during Covid-19 pandemic,” Asian Educ. Dev. Stud., 2020, doi:
10.1108/AEDS-06-2020-0131.

[5] M. M. M. Abdelmalak, “Web 2 . 0 Technologies and Building Online Learning Communities :


Students ’ Perspectives,” J. Asynchronous Learn. Networks, vol. 19, no. 2, 2015, [Online].
Available: https://files.eric.ed.gov/fulltext/EJ1062942.pdf.

[6] K. P. Gupta, “Investigating the adoption of MOOCs in a developing country framework and self-
determination theory,” Interact. Technol. Smart Educ., 2019, doi:
10.1108/ITSE-06-2019-0033.

[7] S. L. Chang, “The Roles of Mentors in Electronic Learning Environments,” AACE J., vol. 12, no.
3, pp. 331–342, 2004, [Online].
Available:https://www.learntechlib.org/primary/p/4881/.

[8] G. Chopra, P. Madan, P. Jaisingh, and P. Bhaskar, “Effectiveness of e-learning portal from
students’ perspective: A structural equation model (SEM) approach,” Interact. Technol. Smart
Educ., vol. 16, no. 2, pp. 94–116, 2019, doi: 10.1108/ITSE05-2018-0027.

[9] A. H. A.-S. Adnan Aldholay, Osama Isaac, Zaini Abdullah, Rasheed Abdulsalam,
“An extension of Delone and McLean IS success model with self-efficacy: Online learning usage in
Yemen,” Int. J. Inf. Learn. Technol., vol. 35, no. 4, pp. 285–304, 2018.

[10] C. W. Sameh Al Natour, “The determinants of learner satisfaction with the online video
presentation method presentations,” Internet Res., 2019, doi: 10.1108/INTR-042019-0155.

You might also like