Quiz Management System Documentation
Quiz Management System Documentation
Submitted To:
Submitted By:
Table of Contents
Introduction 1
INTRODUCTION:
This project is about ONLINE QUIZ SYSTEM which provides the facility to both Teachers and Students. Teachers have a separate
login system to generate quiz according to subject. A program has a facility to Insert questions in quiz along with different
functionalities like update quiz, view quiz, select quiz and delete quiz. There is also a separate Administrative Login provided to
teachers so that students can’t cheat by entering into teacher’s login and getting the quizzes. Students have separate section for login,
and take quiz. After taking quizzes the program will check the quizzes, generate marks and view reports.
For entering into whole process there is a system of Login where students and teachers give their ID and password. If there is a new
user in process the program also have a facility to register a new student. Besides that system also checks either password is accurate
or not and it does also provides facility to recover password in case of loose your password and to change the existing password.
Along with all this, there are different types of exception handling, security and search modules are made to make the program more
Class Code
//INTERFCES//
interface Marks_Evaluation_Criteria
decimal count();
interface System_Database
//INHERITENCE INTERFACE//
interface Exception_handling:System_Database
public decimal m;
om = om + increament;
return om;
m = m + increament1;
return m;
//CLASSES//
public class quizsystem:Exception_handling
public int q;
//CONSTRUCTOR FUNCTION//
public quizsystem()
conn.ConnectionString = connection;
conn.Open();
dataadapter.Fill(dataset, tablename);
command.ExecuteNonQuery();
command.ExecuteNonQuery();
command.ExecuteNonQuery();
//SIMPLE METHODS//
int i = 0;
int ans = 4;
ans = 1;
else
i++;
if (i == dataset.Tables["login"].Rows.Count)
ans = 0;
return ans;
int i = 0;
int ans = 4;
if (Convert.ToString(row["name"]) == b)
ans = 1;
else
i++;
if (i == dataset.Tables["login"].Rows.Count)
ans = 0;
return ans;
int i = 0;
int ans = 4;
if (Convert.ToString(row["sq"]) == a || Convert.ToString(row["ans"])==b )
pass = Convert.ToString(row["pass"]);
ans = 1;
else
i++;
if (i == dataset.Tables["login"].Rows.Count)
ans = 0;
return ans;
int i = 0;
int ans = 4;
if (Convert.ToString(row["pass"]) == b)
ans = 1;
else
i++;
if (i == dataset.Tables["login"].Rows.Count)
ans = 0;
return ans;
int i = 0;
int ans = 4;
if (Convert.ToString(row["pass"]) == b)
ans = 1;
else
i++;
if (i == dataset.Tables["login"].Rows.Count)
ans = 0;
return ans;
int i = 0;
int ans = 4;
if (Convert.ToString(row["name"]) == b)
ans = 1;
else
i++;
if (i == dataset.Tables["login"].Rows.Count)
ans = 0;
return ans;
int i = 0;
int ans = 4;
if (Convert.ToString(row["qno"]) == b)
questions[0] = Convert.ToString(row["qstmt"]);
questions[1] = Convert.ToString(row["ans1"]);
questions[2] = Convert.ToString(row["ans2"]);
questions[3] = Convert.ToString(row["ans3"]);
questions[4] = Convert.ToString(row["ans4"]);
questions[5] = Convert.ToString(row["ans5"]);
questions[6] = Convert.ToString(row["crctans"]);
ans = 1;
else
i++;
if (i == dataset.Tables["addquest"].Rows.Count)
ans = 0;
return ans;
int i = 0;
int ans = 4;
if (Convert.ToString(row["qno"]) == b)
ans = 1;
else
i++;
if (i == dataset.Tables["addquest"].Rows.Count)
ans = 0;
return ans;
timer1.Start();
p.Value = 0;
timer2.Start();
this.Opacity += 0.02;
this.Opacity -= 0.3;
if (this.Opacity <= 0)
this.Hide();
timer2.Stop();
timer1.Stop();
paremtform.Show();
else
p.Value += 2;
obj.Show();
obj.Show();
this.Close();
obj.Show();
this.Close();
this.Opacity += 0.1;
timer1.Start();
form14obj.Show();
obj.Show();
obj.Show();
obj.Show();
obj.Show();
obj.Show();
obj.Show();
timer1.Start();
this.Opacity += 0.1;
timer1.Stop();
else
p.Value += 2;
int x = 5;
string loginquery = "SELECT * FROM login where name = '" + username + "' and pass = '" + pass + "' and occu = '" + comboBox1.SelectedItem + "' ";
obj.selection(loginquery,"login");
x=obj.loginerrorchek(username,pass,comboBox1.SelectedText);
if(x==1)
if (comboBox1.SelectedIndex == 0)
p.Value = 0;
timer1.Start();
form1obj.Show();
this.Hide();
else if (comboBox1.SelectedIndex == 1)
p1.Value = 0;
timer2.Start();
form4obj.Show();
this.Hide();
else if(x==0)
if (MessageBox.Show("Make Sure The Username and Password and Domain you entered is Correct?" + "\r\n" + "Do you wish to try again ",
this.Activate();
textBox1.Clear();
textBox2.Clear();
comboBox1.SelectedIndex=-1;
else
this.Close();
if (comboBox1.SelectedIndex == 0)
this.pictureBox2.Image = global::WindowsFormsApplication1.Properties.Resources.imagesuy;
else if (comboBox1.SelectedIndex == 1)
this.pictureBox2.Image = global::WindowsFormsApplication1.Properties.Resources.iconLogin1;
this.Opacity += 0.1;
timer2.Stop();
else
p1.Value += 2;
obj.Show();
obj.Show();
this.Close();
Now this is a processing which leads to relevant process which is chosen, such as starting client windows.
CODING OF FORM 4:
p.Value = 0;
timer1.Start();
this.Opacity -= 0.4;
if (this.Opacity <= 0)
form13obj.Show();
this.Close();
else
p.Value += 2;
This screen is used for creating students login by fulfilling the relevant information like user name, password, security question and
its answer.
CODING OF FORM 9:
// CREATE LOGIN FOR
STUDENT FORM
CODE//
//PASSWORD
MATCH CODING ON
TEXTBOX//
private void
if (textBox4.Text == textBox3.Text)
label5.Visible = true;
label6.Visible = false;
pictureBox1.Visible = true;
this.Close();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
comboBox1.SelectedIndex = -1;
textBox5.Clear();
label5.Visible = false;
pictureBox1.Visible = false;
else
if (textBox4.Text != textBox3.Text)
label6.Visible = true;
label5.Visible = false;
pictureBox1.Visible = false;
else
try
string insertstudentinfo = "insert into login values('" + name + "' , '" + pass + "' , '" + occu + "' , '" + ans + "' , '" + comboBox1.SelectedItem + "')";
loginobj.insert(insertstudentinfo);
this.Close();
loginobj.conn.Close();
catch (Exception)
if (textBox2.Text == "")
else
pictureBox2.Visible = true;
label9.Visible = false;
label10.Visible = false;
int x = 5;
string nameselect = "select * from login where name = '" + uname + "'";
selectobj.selection(nameselect, "login");
x = selectobj.passrecoveryerrorchek1(uname);
if (x == 1)
p.Value = 0;
timer1.Start();
else if (x == 0)
p1.Value = 0;
timer2.Start();
if (p.Value == p.Maximum)
label9.Visible = true;
label10.Visible = false;
pictureBox2.Visible = false;
timer1.Stop();
else
p.Value += 5;
if (p1.Value == p1.Maximum)
label9.Visible = false;
label10.Visible = true;
pictureBox2.Visible = false;
timer2.Stop();
else
p1.Value += 5;
This window is for taking quizzes from students, which is prepared by the Administrator.
this.Close();
textBox9.Text = "A";
if (radioButton1.Checked)
radioButton2.Enabled = false;
radioButton3.Enabled = false;
radioButton4.Enabled = false;
radioButton5.Enabled = false;
textBox9.Text = "B";
if (radioButton2.Checked)
radioButton1.Enabled = false;
radioButton3.Enabled = false;
radioButton4.Enabled = false;
radioButton5.Enabled = false;
textBox9.Text = "C";
if (radioButton3.Checked)
radioButton2.Enabled = false;
radioButton1.Enabled = false;
radioButton4.Enabled = false;
radioButton5.Enabled = false;
textBox9.Text = "D";
if (radioButton4.Checked)
radioButton2.Enabled = false;
radioButton3.Enabled = false;
radioButton1.Enabled = false;
radioButton5.Enabled = false;
textBox9.Text = "E";
if (radioButton5.Checked)
radioButton2.Enabled = false;
radioButton3.Enabled = false;
radioButton4.Enabled = false;
radioButton1.Enabled = false;
addquestobj2.selection(viewmsqt, "marksheetdb");
vqtm.Text = Convert.ToString(row["qt"]);
addquestobj2.conn.Close();
addquestobj3.selection(viewasqt, "answersheetdb");
vqtans.Text = Convert.ToString(row["qt"]);
addquestobj2.conn.Close();
addquestobj1.selection(addquestview1, "addquest");
textBox8.Text = Convert.ToString(row["qno"]);
addquestobj1.conn.Close();
/////////////////////////////////////////////////////////////////////
titleobj.selection(titleview, "createquiz");
qt.Text = Convert.ToString(row["qt"]);
cn.Text = Convert.ToString(row["cn"]);
ct.Text = Convert.ToString(row["ct"]);
ti.Text = Convert.ToString(row["ci"]);
tm.Text = Convert.ToString(row["mm"]);
ta.Text = Convert.ToString(row["ta"]);
d.Text = Convert.ToString(row["qd"]);
ei.Text = Convert.ToString(row["et"]);
if (textBox8.Text == "")
if (MessageBox.Show("There is no quiz for Attemt" + "\r\n" + "Please contact to your Instructor", "Access Denied", MessageBoxButtons.OK) ==
DialogResult.OK)
this.Close();
addquestobj.selection(addquestview, "addquest");
listBox1.Items.Add(Convert.ToString(row["qno"]));
addquestobj.conn.Close();
listBox1.SelectedIndex = 0;
select.selection(selectquest, "addquest");
qno.Text = Convert.ToString(row["qno"]);
qs.Text = Convert.ToString(row["qstmt"]);
opt1.Text = Convert.ToString(row["ans1"]);
opt2.Text = Convert.ToString(row["ans2"]);
opt3.Text = Convert.ToString(row["ans3"]);
opt4.Text = Convert.ToString(row["ans4"]);
opt5.Text = Convert.ToString(row["ans5"]);
cans.Text = Convert.ToString(row["crctans"]);
select.conn.Close();
if (listBox1.SelectedIndex == listBox1.Items.Count - 1)
button1.Visible = false;
button2.Visible = true;
try
else
obj[1].count();
mm.Text = Convert.ToString(obj[1].m);
if (textBox9.Text == cans.Text)
obj[0].count();
gm.Text = Convert.ToString(obj[0].om);
textBox4.Text = cans.Text;
r.Text = Convert.ToString(result);
string rs = textBox3.Text; ;
if (crctans != "")
else
{ crctans = ""; }
string insert1 = "insert into answersheet values('" + rolno + "','" + nam + "','" + qno.Text + "','" + qs.Text + "','" + opt1.Text + "','" + opt2.Text +
"','" + opt3.Text + "','" + opt4.Text + "','" + opt5.Text + "','" + ansstmt + "','" + ans + "','" + rsltstmt + "','" + rs + "','" + crctans + "')";
insertanswersheet.insert(insert1);
string insert2 = "insert into answersheetdb values('" + vqtans.Text +"','" + rolno + "','" + nam + "','" + qno.Text + "','" + qs.Text + "','" + opt1.Text
+ "','" + opt2.Text + "','" + opt3.Text + "','" + opt4.Text + "','" + opt5.Text + "','" + ansstmt + "','" + ans + "','" + rsltstmt + "','" + rs + "','" + crctans + "')";
insertanswersheet.insert(insert2);
insertanswersheet.conn.Close();
if (listBox1.SelectedIndex == listBox1.Items.Count - 1)
string insertms = "insert into marksheet values('" + rolino + "','" + namm + "','" + atmpt + "','" + crct + "','" + rslt + "')";
insertmarksheet.insert(insertms);
string insertms1 = "insert into marksheetdb values('"+ vqtm.Text +"','" + rolino + "','" + namm + "','" + atmpt + "','" + crct + "','" + rslt + "')";
insertmarksheet.insert(insertms1);
this.Close();
radioButton1.Checked = false;
radioButton2.Checked = false;
radioButton3.Checked = false;
radioButton4.Checked = false;
radioButton5.Checked = false;
textBox9.Clear();
else
if (MessageBox.Show("Quiz has been solved by you before" + "\r\n" + "so please i advised you to leave now", "Access Denied",
MessageBoxButtons.OK) == DialogResult.OK)
this.Close();
textBox4.Clear();
try
else
obj[1].count();
mm.Text = Convert.ToString(obj[1].m);
if (textBox9.Text == cans.Text)
obj[0].count();
gm.Text = Convert.ToString(obj[0].om);
textBox4.Text = cans.Text;
r.Text = Convert.ToString(result);
string rs = textBox3.Text; ;
if (crctans != "")
else
{ crctans = ""; }
string insert1 = "insert into answersheet values('" + rolno + "','" + nam + "','" + qno.Text + "','" + qs.Text + "','" + opt1.Text + "','" + opt2.Text +
"','" + opt3.Text + "','" + opt4.Text + "','" + opt5.Text + "','" + ansstmt + "','" + ans + "','" + rsltstmt + "','" + rs + "','" + crctans + "')";
insertanswersheet.insert(insert1);
string insert2 = "insert into answersheetdb values('" + vqtans.Text + "','" + rolno + "','" + nam + "','" + qno.Text + "','" + qs.Text + "','" + opt1.Text
+ "','" + opt2.Text + "','" + opt3.Text + "','" + opt4.Text + "','" + opt5.Text + "','" + ansstmt + "','" + ans + "','" + rsltstmt + "','" + rs + "','" + crctans + "')";
insertanswersheet.insert(insert2);
insertanswersheet.conn.Close();
radioButton1.Enabled = true;
radioButton2.Enabled = true;
radioButton3.Enabled = true;
radioButton4.Enabled = true;
radioButton5.Enabled = true;
radioButton1.Checked = false;
radioButton2.Checked = false;
radioButton3.Checked = false;
radioButton4.Checked = false;
radioButton5.Checked = false;
textBox9.Clear();
listBox1.SelectedIndex = listBox1.SelectedIndex += 1;
else
if (MessageBox.Show("Quiz has been solved by you before" + "\r\n" + "so please I advised you to leave now", "Access Denied",
MessageBoxButtons.OK) == DialogResult.OK)
this.Close();
textBox4.Clear();
These two forms are made for password recovery. Students enter his / her user name, if the user name is correct the next form
appears otherwise the error will shown. In next form student have to answer a security question. If the answer is right the correct
CODING OF
FORM:
int x = 5;
string nameselect = "select * from login where name = '" + uname + "'";
selectobj.selection(nameselect, "login");
x=selectobj.passrecoveryerrorchek1(uname);
if (x == 1)
pictureBox1.Visible = true;
p.Value = 0;
timer1.Start();
else if (x == 0)
if (MessageBox.Show("Make Sure The Username you entered is Correct?" + "\r\n" + "Do you wish to try again ", "Incorrect Username",
MessageBoxButtons.YesNo) == DialogResult.Yes)
this.Activate();
textBox1.Clear();
textBox1.Focus();
else
this.Close();
//BACK BUTTON//
this.Close();
if (p.Value == p.Maximum)
pictureBox1.Hide();
groupBox1.Visible = true;
else
p.Value += 5;
//AFTER USERNAME VERIFIED SQURITY QUESTION VERIFY PROGRESSBARR RUN ON THIS WORKING//
if (p1.Value == p1.Maximum)
pictureBox2.Hide();
label4.Visible = true;
label5.Visible = true;
else
p1.Value += 5;
//AFTER USERNAME ENTER SECURITY AREA WILL SHOW AND WHEN IT MATCH THEN SHOW PASSWORD//
int x = 5;
string sqselect = "select * from login where name= '" + name + "' and sq = '" + comboBox1.SelectedItem + "' and ans = '" + ans + "' ";
selectobj.selection(sqselect, "login");
x = selectobj.passrecoveryerrorchek2(comboBox1.SelectedText, ans);
if (x == 1)
label5.Text = selectobj.pass;
p1.Value = 0;
timer2.Start();
pictureBox2.Visible = true;
else if (x == 0)
if (MessageBox.Show("Make Sure The Username you entered is Correct?" + "\r\n" + "Do you wish to try again ", "Incorrect Username",
MessageBoxButtons.YesNo) == DialogResult.Yes)
this.Activate();
comboBox1.SelectedItem = -1;
textBox2.Clear();
Students can also logout from the system after giving quiz by clicking on logout from the main menu and then the following form
CODING
OF FORM:
obj.Show();
this.Close();
obj.Show();
this.Hide();
obj.Show();
this.Hide();
obj.Show();
this.Close();
After clicking on confirm logout sign the next window appears for shutdown. Which means now the user is no more sign in.
CODING
OF FORM:
//OPACITY
FUNCTION
USE ON
THIS-------
AFTER
this.Opacity -= 0.4;
if (this.Opacity <= 0)
this.Close();
obj.Show();
else
p.Value += 2;
p.Value = 0;
timer1.Start();
Now another phase of program designed for Teachers, from the same login window teachers can also login by selecting administrator mode from the
occupation option. Once giving admin login, the screen appears for admin members to go through into quiz process.
CODING OF FORM:
// FORM 1-----LOGON STRING WINDOWS LOADING SCREEN CODE//
p.Value = 0;
timer1.Start();
this.Opacity -= 0.4;
if (this.Opacity <= 0)
this.Close();
obj.Show();
else
p.Value += 2;
This screen is used for creating Administration login by fulfilling the relevant information like user name, password, security
question and its answer. There is also an option for recovering old password for Administration and changing the pass key.
CODING OF FORM:
if (textBox4.Text == textBox3.Text)
label5.Visible = true;
label6.Visible = false;
pictureBox1.Visible = true;
//BACK BUTTON//
this.Close();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
comboBox1.SelectedIndex = -1;
textBox5.Clear();
label5.Visible = false;
pictureBox1.Visible = false;
else
if (textBox4.Text != textBox3.Text)
label6.Visible = true;
label5.Visible = false;
pictureBox1.Visible = false;
else
int x = 5;
obj.selection(select, "login");
x = obj.adminpasschangeerror(oldpass);
if (x == 1)
string update = "update login set name='" + username + "', pass='" + newpass + "', ans='" + ans + "',sq='" + comboBox1.SelectedItem + "',occu='"
obj.update(update);
obj.conn.Close();
else if (x == 0)
Below form is facilitating teachers for modifying quizzes, creating quiz and adding questions in quiz. This module has also a function
CODING OF FORM:
createobj.selection(titleview, "createquiz");
textBox1.Text = Convert.ToString(row["qt"]);
t1.Text = Convert.ToString(row["qt"]);
t2.Text = Convert.ToString(row["cn"]);
t3.Text = Convert.ToString(row["ct"]);
t4.Text = Convert.ToString(row["ci"]);
t5.Text = Convert.ToString(row["mm"]);
t6.Text = Convert.ToString(row["ta"]);
t7.Text = Convert.ToString(row["qd"]);
t8.Text = Convert.ToString(row["et"]);
createobj.conn.Close();
string edit = "update createquiz set qt='" + tb1 + "' , cn='" + tb2 + "',ct='" + tb3 + "',ci='" + tb4 + "' , mm='" + tb5 + "',ta='" + tb6 + "',qd='" + tb7 + "',et='"
createobj.update(edit);
createobj.conn.Close();
this.Close();
t7.Text = Convert.ToString(dateTimePicker1.Value);
This is a form for adding questions one by one in quiz by respective teacher.
CODING OF FORM:
this.Close();
//FOR CORRECT OPTION FOR ANSWER RADIOBUTTONS CODE ON CREATE QUIZ GROUPBOX//
tb13.Text = "A";
tb13.Text = "B";
tb13.Text = "C";
tb13.Text = "D";
tb13.Text = "E";
t7.Text = Convert.ToString(dateTimePicker1.Value);
if (t1.Text != " " && t2.Text != "" && t3.Text != "" && t4.Text != "" && t5.Text != ""&& t6.Text != "" && t7.Text != "")
string insertqt = "insert into marksheetdb values('" + tb1 + "','" + " " + "','" + " " + "','" + " " + "','" + " " + "','" + " " + "')";
string insertqt1 = "insert into answersheetdb values('" + tb1 + "','" + " " + "','" + " " + "','" + " " + "','" + " " + "','" + " " + "','" + " " + "','" + " " + "','" + " " +
"','" + " " + "','" + " " + "','" + " " + "','" + " " + "','" + " " + "','" + " " + "')";
insertqtobj.insert(insertqt);
insertqtobj.insert(insertqt1);
string edit = "update createquiz set qt='" + tb1 + "' , cn='" + tb2 + "',ct='" + tb3 + "',ci='" + tb4 + "' , mm='" + tb5 + "',ta='" + tb6 + "',qd='" + tb7 +
createobj.update(edit);
createobj.conn.Close();
if (textBox2.Text == "")
groupBox3.Visible = false;
groupBox1.Visible = true;
addquestobj.selection(addquestview, "addquest");
listBox1.Items.Add(Convert.ToString(row["qno"]));
addquestobj.conn.Close();
listBox1.SelectedIndex = 0;
groupBox2.Visible = true;
groupBox3.Visible = false;
else
MessageBox.Show("Make sure that all the required lines are fullfilled", "Access Denied");
t1.Focus();
try
if (tb1.Text != "" && tb2.Text != "" && tb3.Text != "" && tb5.Text != "" && tb7.Text != "" && tb9.Text != "" && tb11.Text != "")
string question = "insert into addquest values('" + tbox1 + "' , '" + tbox2 + "','" + tbox3 + "','" + tbox5 + "','" + tbox7 + "','" + tbox9 + "','" + tbox11
addquest.insert(question);
addquest.conn.Close();
radioButton1.Checked = false;
radioButton2.Checked = false;
radioButton3.Checked = false;
radioButton4.Checked = false;
radioButton5.Checked = false;
tb1.Focus();
tb2.Clear();
tb3.Clear();
tb5.Clear();
tb7.Clear();
tb9.Clear();
tb11.Clear();
tb13.Clear();
else
else
MessageBox.Show("Make Sure that all the required lines are fullfilled", "Access Denied");
tb1.Focus();
catch (Exception)
tb1.Clear();
tb1.Focus();
int x = 5;
obj.selection(viewquest, "addquest");
x= obj.viewquestionerorchek(tbox1);
if (x == 1)
tb2.Text = obj.questions[0];
tb3.Text = obj.questions[1];
tb5.Text = obj.questions[2];
tb7.Text = obj.questions[3];
tb9.Text = obj.questions[4];
tb11.Text = obj.questions[5];
tb13.Text = obj.questions[6];
if (x == 0)
tb1.Focus();
//VIEW CODE AGAIN AND EDIT QUESTION ENTERY ON ADD QUESTION GROUPBOX AND IF THERE IS NO ENTRY IN THE BACK END IT IS ALSO
int x = 5;
createobj.selection(edit, "addquest");
x = createobj.editquestionerrorchek(questno);
if (x == 1)
string editaddquest = "update addquest set qstmt='" + tbox2 + "' , ans1='" + tbox3 + "',ans2='" + tbox5 + "' ,ans3='" + tbox7 + "',ans4='" + tbox9 +
createobj.update(editaddquest);
createobj.conn.Close();
else if (x == 0)
//FOR DELETE GROUPBOX IF THERE IS NO QUESTIONS IN THE BACK END FOR LAST QUESTION DELETE IF THERE IS ONLY 1 QUESTION IN
markshetobj.delete(deletemarksheets);
anssheetobj.delete(deleteanssheet);
obj.selection(view, "addquest");
textBox2.Text = Convert.ToString(row["qno"]);
obj.conn.Close();
createobj.selection(titleview, "createquiz");
textBox1.Text = Convert.ToString(row["qt"]);
createobj.conn.Close();
obj.delete(deletequestions);
listBox1.SelectedIndex = listBox1.SelectedIndex += 1;
if (listBox1.SelectedIndex == listBox1.Items.Count-1)
button10.Visible = false;
button8.Visible = true;
string deletequestions = "delete from addquest where qno ='" + listBox1.SelectedItem + "'";
obj.delete(deletequestions);
if (MessageBox.Show("All the Questions has been deleted from database" + "\r\n" + "press ok to proceed for add new entries of questions", "Delete
groupBox2.Visible = false;
groupBox1.Visible = true;
//CREATE QUESTIONS GROUPBOX-----FOR APPEAR CREATE QUIZ TITLE FORM -----EDIT BUTTON CODE//
obj.Show();
if (listBox1.SelectedIndex == listBox1.Items.Count - 1)
button10.Visible = false;
button8.Visible = true;
groupBox2.Visible = false;
groupBox1.Visible = true;
groupBox3.Visible = false;
groupBox2.Visible = true;
Following in the delete form appeared before teachers create quiz window if there is already any quiz exists in the module or
database record.
CODING OF FORM:
//FOR DELETE GROUPBOX IF THERE IS NO QUESTIONS IN THE BACK END FOR LAST QUESTION DELETE IF THERE IS ONLY 1 QUESTION IN BACK END
CODE//
obj.selection(view, "addquest");
textBox2.Text = Convert.ToString(row["qno"]);
obj.conn.Close();
createobj.selection(titleview, "createquiz");
textBox1.Text = Convert.ToString(row["qt"]);
createobj.conn.Close();
obj.delete(deletequestions);
listBox1.SelectedIndex = listBox1.SelectedIndex += 1;
if (listBox1.SelectedIndex == listBox1.Items.Count-1)
button10.Visible = false;
button8.Visible = true;
string deletequestions = "delete from addquest where qno ='" + listBox1.SelectedItem + "'";
obj.delete(deletequestions);
if (MessageBox.Show("All the Questions has been deleted from database" + "\r\n" + "press ok to proceed for add new entries of questions", "Delete
groupBox2.Visible = false;
groupBox1.Visible = true;
An option of Google search is added to help the teachers. By clicking on search in main menu helps tab the internet explorer window
appears.
int x = 5;
deleteloginobj.selection(select, "login");
x = deleteloginobj.deleteloginerrorchk(uname);
if (x == 1)
string delete = "delete from login where name ='" + uname + "'";
deleteloginobj.delete(delete);
deleteloginobj.conn.Close();
else if (x == 0)
if (MessageBox.Show("Make Sure Username you entered is Correct?" + "\r\n" + "Do you wish to try again ", "Incorrect Code",
MessageBoxButtons.YesNo) == DialogResult.Yes)
this.Activate();
textBox2.Clear();
textBox2.Focus();
else
this.Close();
this.Close();
This is a form for editing questions for prints during the printing reports to make the interface more users friendly.
CODING OF FORM:
obj.Show();
int x = 5;
obj.selection(viewquest, "addquest");
x = obj.viewquestionerorchek(tbox1);
if (x == 1)
tb2.Text = obj.questions[0];
tb3.Text = obj.questions[1];
tb5.Text = obj.questions[2];
tb7.Text = obj.questions[3];
tb9.Text = obj.questions[4];
tb11.Text = obj.questions[5];
tb13.Text = obj.questions[6];
if (x == 0)
tb1.Focus();
int x = 5;
createobj.selection(edit, "addquest");
x = createobj.editquestionerrorchek(questno);
if (x == 1)
string editaddquest = "update addquest set qstmt='" + tbox2 + "' , ans1='" + tbox3 + "',ans2='" + tbox5 + "' ,ans3='" + tbox7 + "',ans4='" + tbox9 +
createobj.update(editaddquest);
radioButton1.Checked = false;
radioButton2.Checked = false;
radioButton3.Checked = false;
radioButton4.Checked = false;
radioButton5.Checked = false;
createobj.conn.Close();
else
else if (x == 0)
tb13.Text = "A";
tb13.Text = "B";
tb13.Text = "C";
tb13.Text = "D";
tb13.Text = "E";
this.Close();
try
if (tb1.Text != "" && tb2.Text != "" && tb3.Text != "" && tb5.Text != "" && tb7.Text != "" && tb9.Text != "" && tb11.Text != "")
string question = "insert into addquest values('" + tbox1 + "' , '" + tbox2 + "','" + tbox3 + "','" + tbox5 + "','" + tbox7 + "','" + tbox9 + "','" + tbox11
addquest.insert(question);
addquest.conn.Close();
radioButton1.Checked = false;
radioButton2.Checked = false;
radioButton3.Checked = false;
radioButton4.Checked = false;
radioButton5.Checked = false;
tb1.Focus();
tb2.Clear();
tb3.Clear();
tb5.Clear();
tb7.Clear();
tb9.Clear();
tb11.Clear();
tb13.Clear();
else
else
MessageBox.Show("Make Sure that all the required lines are fullfilled", "Access Denied");
tb1.Focus();
catch (Exception)
tb1.Clear();
tb1.Focus();
REPORTS
PAPER SHOW REPORT (FORM 8)
Following is the report screen made for teachers, such as print quiz and paper show for the purpose of print reports.
CODING
OF FORM:
this.Close();
if (textBox1.Text != "")
string str = "select * from answersheet where rolno ='" + textBox1.Text + "'";
da.Fill(ds, "answersheet");
cr1.SetDataSource(ds.Tables["answersheet"]);
crystalReportViewer1.ReportSource = cr1;
else
textBox1.Clear();
textBox1.Focus();
This is an answer sheet form made for teachers to show in class to students in soft form as well as they can take prints of answer
FORM
CODING:
//OFFLINE QUIZ
REPORT
FORM//
//FOR EDIT
QUIZ
QUESTIONS----------EDIT BUTTON//
obj.Show();
this.Close();
CODING OF FORM:
if (textBox1.Text != "")
da.Fill(ds, "marksheetdb");
cr1.SetDataSource(ds.Tables["marksheetdb"]);
crystalReportViewer1.ReportSource = cr1;
else
textBox1.Clear();
textBox1.Focus();
this.Close();
string str = "select * from answersheetdb where qt ='" + textBox1.Text + "' and rolno='"+textBox2.Text+"'";
da.Fill(ds, "answersheetdb");
cr1.SetDataSource(ds.Tables["answersheetdb"]);
crystalReportViewer1.ReportSource = cr1;
else
textBox1.Clear();
textBox1.Focus();
this.Close();
if (textBox1.Text != "")
string str = "select * from marksheet where rolno ='" + textBox1.Text + "'";
da.Fill(ds, "marksheet");
cr1.SetDataSource(ds.Tables["marksheet"]);
crystalReportViewer1.ReportSource = cr1;
else
textBox1.Clear();
textBox1.Focus();
//BACK BUTTON//
this.Close();
LOGIN DATABASE
CONCLUSION:
We have tried to provided an online and offline solutions for Teachers and students. This software can
easily be deployed in all education institutions for the purpose of quiz generation and quiz taking
system. We have made this system user friendly. It is a best solution for online and offline Quiz system