Multiple Choice Quiz With Access, Get 3 Levels Of Answers?
Nov 22, 2011
I am working on a multiple choice quiz, admin screen, student login screen where they choose their level of difficulty. I have been able to start the quiz, have the questions and answers filled, user answers question, check if correct or not, if correct then the score is incremented.I am able to set up a variable for 'level' and want to write some code so that whatever is selected then that table / questions will be selected and displayed to the user.
The way I'm thinking at the moment seems very long winded. I think I'll have to write an IF ELSE statement/case statement for each of the 'navigaterecords' and the sql statment for beginners, intermediate and advanced.Assume there is a variable 'LEVEL' - have not actually done this yet. Where the code refers to 'advanced' is where I have been trying it out to select questions from the advanced table.
trying to make a Multiple Choice quiz, with 20 questions
-4 RadioButtons
-2 Label (Reading the Questions) and 1, keeping a score count
Do I wanna make some arrays like Questions(20) and Answers(20)
Dim ScoreCount as Integer
So I want it to be a little screen, and once you click a Radiobutton to choose answer, it will change the label to Question(2) so forth.. but I am unsure how to do this. I am fairly new to vb, im doing this to learn.How do I make it so everytime you click a radiobutton wether it's right or wrong, the next question and possible answers all change??
I have a button 'start quiz' which uses the dataset to fill the quiz form - ready for the user to start answering the questions.However, I am getting a 'null reference' at the point where the 'navigate records' on the quiz form is called. Have looked up that it means I have a variable that is null. But I have declared all the variables etc. Not sure what I'm doing wrong. I am very new to programming and I have spent quite a bit of time on this already.This is the code for the student user login:
Private Sub btnLoginStudent_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoginStudent.Click FrmQuiz.Show()
I need a multiple choice quiz but I've ran into some problems. So far i have 5 arrays: one for the questions and four for the answers. The question is displayed in a label and the answers on radio buttons. Problem one: I am using a random number generator to pull them but this allows them to be reused. How do I stop repeats. Problem two, my grading isn't always working.
I have to make a multiple choice and true or false quiz in VB. So i am thinking of two questions on one form.BUt i have to make the questions appear in random and not in order and make sure they dont repeat.Btw, i have searched a long time for this. I have found out how to make random numbers. But I have to make sure only 10 come and not repeated.
I have a requirement to create a multi level treeview in ASP.Net (with VB) but I am completely stuck on how to start this. Currently my treeview is a fixed 2 level approach but now I need to rewrite this to be more dynamic and support extra levels being added into our database tables.So this treeview needs to support as many levels as needed without having to rewrite any code each time we want to add new level, Ideally we will just insert the data at the database level.I think I have the database part designed correctly, I created 2 tables Menu and MenuItemsMenu has 2 columns ItemID and ChildIDMenuItems has 2 columns ItemID and Description Doing this query:
i'm developing an application with vb.net and mysql. I want to add additional users to the application but with different access levels. this is my original code [code]If i add a third parameter named level to the sql statement, how do i determine which form shows???
I have created my own quiz for my aplication, but, a lot of people asked me , why can't the programe count right or wrong answers and one of them told me can you make a quiz that randomly selects questions?ok, I told them its all posible to make , but I actually coulndt make it working.So, usualy for a classic quiz I got the code to make a button go red if the answer is wrong, but I need the code line for the random question selection and the counting.I found some code but it didn't work,
I want to make different levels of access for a vb.net program i'm writing.I have a database called "stratocast". I want to show a specific form for entries in this table with "IsManager" checked and another specific form for those with "IsAdmin" checked.Im using MySql server and visual basic 2010 express
EDIT:To clear up any misconceptions about my post, ill explain further: In my vb.net application i have a login form with two textboxes; One for the username and one for password. I also have three other forms, one is called "frmAdmin", another called "frmManager" and another one called "frmEmployee".
On my database i have a table called "employee" with columns called "name", "title", "IsManager", "IsAdmin", "Username" and "Password".
IsManager and IsAdmin are both Boolean columns
This means that their values can only be 0 or 1 and the result is displayed as a checkbox.When the employee logs into this applcation i want it to check whether or not the employee is a manager, an administrator, or just a regular employee with no additional rights. If the employee is a manager, i want to show "frmManager". If the employee is an Administrator i want to show "frmAdmin". And if the employee has no additional rights then i want to show "frmEmployee".
I'd like to keep the configuration for access level checking confined to the one table but if it's better to have separate tables for each level of access (ie: tables called Admin,Manager, and Employee) then ill consider that too.
I'm not great with VB and I'm having some trouble with my University assignment at the moment.I'm trying to code a multiple choice program with several forms with different questions and then a scoring form
I'm not sure how to tell VB what the correct answer should be and how to display the scores in another form, the answers need to show how many correct in each section out of how many the user attemped to answer, so they can check scores before completing all the questions.
I'm currently quite new to VB and am trying to create a multiple choice questionnaire for work. This is a depression survey in which there are 23 groups of statements with 4 options per group. Every time a patient clicks an option, the next set of 4 questions comes up on the screen.
I'm trying to convert the old VB4 code into the new VB 2010 code. Before we were using a control array and the code looks a little something like this[code]...
I am in the process of creating an array for a set of multiple choice questions but I am having a few problems. I am an absolute beginner at VB and I am creating a quiz that users will select one of three possible questions and then depending on their answer a +1 value will be added to the score. However I do not know where my questions and answers are supposed to go, from what I have read online I have to use (0, 1) format to give possible answers but I do not know how I would make the questions and answers display in textboxes on my form. At the bottom of my code I have also included code to randomise the questions although I am unsure as to if it is correct. At the moment I can run my form fine without any problems but my main issue is to how I will get the questions and answers linked to my textboxes on my form.
Public Class frmTest Private ran As Random = New Random() Public intScore As Integer Private Sub cmdStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdStart.Click 'Turns the message box invisible when start is clicked lblMessage.Visible = False [Code] .....
I am trying to create a simple program that delivers True/False questions from a text file and then displays the mark to the student, but I'm running into trouble.I created two forms. The first contains a listbox which is populated with the possible test choices (taken from a .txt file containing only 2 choices). I wrote this code for the listbox
Private Sub frmTest_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Populates listbox with test names from TESTS.txt Dim sr As IO.StreamReader = IO.File.OpenText("TESTS.txt") lstTest.Items.Clear()
[code]....
After the test is chosen, the user presses BEGIN. At this point I have my actual Question form pop up, and the first form is hidden. I tried to begin with an If-Then statement which will open the appropriate .txt based on the selection from the first form.
Private Sub frmQuestion_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Opens appropriate test based on selection If frmTest.txtChosenTest.Text = CStr(frmTest.lstTest.Items(0)) Then
[code]....
This is where I get completely bottle necked though. I've been staring at the screen/textbook for 5 hours now and I don't understand how to write the code that will take my questions from the (now open) text file, separate the question from the answer, and put the question and question number in the appropriate text boxes. The format of the question .txt's are simple. One question per line, with the answer following, separated by a comma. For example, Midterm.txt might look like this
Question1isthisone,T Question2isthisone,F
If I were to design a form for this problem let's say it would look like this:I am currently stuck at this part though. How do I populate the two read-only text boxes with the question number/question, and then cycle through the questions from the .txt while also keeping the user's score?
I have four drop down lists here and I've assigned the datasource and displaymemberproperties so they are populated by a table. When I run the program and select a choice, all four of them get updated with the new choice.
've got a function that takes two parameters (a delegate and an integer) and then creates a LINQ MethodCallExpression, which it uses to gets the results:
Public Delegate Function CompareTwoIntegerFunction(ByVal i1 As Integer, ByVal i2 As Integer) As Boolean Public Function Test(ByVal pFunc As CompareTwoIntegerFunction, ByVal i1 As Integer, ByVal
I'm really new at programming and was looking for guidance about a project I have.I have to design a program that administers a multiple choice test to users. It delivers questions one at a time, from a predefined test file for the user to answer. It also marks and displays a score at the end of the test.
First, a QUESTION form verify's the user's registration status and access. The user provides a registration number and password and the program reads it from a "registration.txt" file to determine if the user is eligible to take the test (i.e., they are registered to take it). If it is correct, then the user presses the "Begin" button. If not, then a message appears and the student tries again to enter the information.
A read only text box will display the score at the end of the test (String with format correct/total) and the user can't retake the test.Second, a QUESTION form opens after clicking "Begin" on the entry form. The questions are going to be from a "testfile.txt" file.Each question is on multiple lines in the file. The first line consists of the question followed by possible answers followed by the correct answer ( 3 items are separated by "#"). The current question number and the question will be displayed in textboxes.'n'= possible answers; so each of the next 'n' lines provides a possible answer. All possible answers will be displayed in a Listbox.After the user selects an answer, an ''Enter'' button is pressed. This will submit and evaluate the answer. If nothing is selected a textbox should appear and display the error message (APPEARS ONLY IF THERE IS AN ERROR). After pressing ''Enter'', the next question is displayed.When all questions answered, the entry form is displayed again and displays the score.
I know that's a lot of information, but I wanted it to be really clear. Would it be best to cycle/loop the questions with a DoWhile loop? And how would I store the answers while the user goes through the test?
I'm trying to get the answer "dblcost" to go into 2 decimal spots. Sometimes it does, sometimes it doesn't.Also, I have to create something that continually adds each transaction to lblfinalcost. Mine seems to be a little buggy.Right not I have strfinalcost = strginalcost + dblcost. Another question i have is how do I make a number default into the textbox? I want it to say 1, but be able for the user to delete it and then replace it with their own number.[code]
if you are a constant answerer here on msdn, and do not have a unique signature, or no signature at all, please take a little time to create one... eason ..when quoting a post of a member, if no signature available, then it would have to be followed w/ "quoted from so and so's post", this so so said this, etc.
there are 8 text boxes where user should put 8 answers, but when he type one answer in one text box it cant be found in some other text box.Basically when button is clicked there should be check for repeated answers.
i have a login form and it has 3 user levels - admin, manager & accountant - which have limited privileges using the system. For ex., if admin logged in, this user can access the whole system; if manager logged in, this user can only access the employee records; & accountant user can only access the payroll.
i actually have the idea but because i lack knowledge about vb.net, i don't know how to code it.
[code..]
At the main menu, buttons are enabled & disabled depending on the user level that was entered.
When Score exam is clicked, the answers from the keys file is read using ReadLine method 6 times to fill the Answer Array. then the users' answers and the answers from the keys will be paired up by calling "Compare_Answers" function in the RMV Global Module. and calculate the score and it will show on the main form.
So far this forum has been awesome answering my questions in full. I am very new to Visual Basic but I enjoy learning about it greatly. My question now is I now need to get all of my answers lined up neatly in the listbox using "zoning." Now I have know clue how to start this. Basically I need to make this..
i'm developing a virtual OS in vb2010. i want to know how i can move objects in the mouse during the runtime of the project? ; like when we move icons in desktop(i saw it in a youtube video, so i know it is possible xd) my second doubt: how i can i can detect if a position is fulled with an object; i want to create the effect of windows superbar; .
hello everyone, i m using treeview control in vb .net . How do we usee a recursive function to add data at different levels from different tables in a database.
I'm looking for a recursive subroutine.I have the dataset from sql-server with in the datasource-table a parent- and a child-column. I made a routine to put the parent-nodes in the tree.The problem starts with the childs over so many levels.I can write it out but it is to much code, I'm sure it can be done more efficient with a recursive subroutine.
The tree will be about 25 levels deep.A few days ago I saw a recursive subroutine to fill the childnodes without the above difficulty to write alle the levels in code.That example I cannot find it any more, but it had a line of code more or less like this here below:
Dim Nodes As TreeNodeCollection = tv.Nodes(A).Nodes
Let's say I have three lists: Departments, Divisions, and Groups. A Department is made up of Divisions, which in turn is made up of Groups.The Divisions have the Department ID as a foreign key. The Groups have the Division ID as a foreign key.I'd like to produce a report that looks like this:
[code]...
But since I can't include a subreport within a subreport, I'll need to go about it some other way. Is there a way to do this?