PDA

View Full Version : PPT Quiz



johnwatkins3
11-15-2012, 10:00 PM
Hey all need help im trying to create a PPT Quiz with 48 questions. i would like the person taking the quiz to hit an answer then it goes to next question until your done. then i would like a slide at the end give the number right/wrong and a percentage. then i would like to have another slide to the certificate. Slide 1 is where the user enters his name also have that placed onto the certificate. but also when the test is closed i would like it when it is reopened the questions to be shuffled. can anyone help me? i don't want a message to tell me if the question is right or wrong just go to the next question

Const NOOFQS = 48

'Used to manipulated the unicode values of bulleted lists
Const UD_CODE_1 = 111
Const UD_CODE_2 = 8226

Public QNo As Integer
Public ExitFlag As Boolean
Public Qs() As String
Public Choices() As String
Public Ans() As Integer
Public UserAns() As Integer

Sub NextSlide()
' Store the ans for later
'UserAns(QNo - 1) = 1
If QNo < NOOFQS Then
QNo = QNo + 1
SlideShowWindows(1).Presentation.Slides("QSlide").Shapes(1).TextFrame.TextRange.Text = Qs(QNo - 1)
AssignValues
Else
Call StopQuiz
End If
DoEvents
End Sub
Sub PreviousSlide()
Static X As Integer
If QNo > 1 Then
QNo = QNo - 1
AssignValues
End If
End Sub
Sub StopQuiz(Optional EndType As Boolean = False)
' EndType is used as a boolean Flag to indicate whether the user ran out of time
' or whether it was normal exit
Dim ScoreCard As Integer
Dim Ctr As Integer
ExitFlag = True
With SlideShowWindows(1)
For Ctr = 0 To NOOFQS - 1
If Ans(Ctr) = UserAns(Ctr) Then ScoreCard = ScoreCard + 1
Next Ctr
If EndType = False Then
.Presentation.Slides("EndSlide").Shapes("Closing").TextFrame.TextRange.Text = "Your score is : " & ScoreCard & " correct out of " & NOOFQS
Else
.Presentation.Slides("EndSlide").Shapes("Closing").TextFrame.TextRange.Text = "Sorry!!! Either you ran out of time or you chickened out" _
& vbCrLf & "Better luck next time." & vbCrLf _
& "Your score is: " & ScoreCard & " correct out of " & NOOFQS
End If
.View.GotoSlide (.Presentation.Slides("EndSlide").SlideIndex)
End With
End Sub

Sub StopIt()
Call StopQuiz(True)
End Sub


Sub BeginQuiz()
Dim Ctr As Integer
ReDim Qs(NOOFQS)
ReDim Ans(NOOFQS)
ReDim UserAns(NOOFQS)
ReDim Choices(NOOFQS, 5)

' All the questions
Qs(0) = "Which of the following statements is NOT a Cold Steel Imperative?"
Qs(1) = "What is an OC/T's first priority?"
Qs(2) = "Which of the following statements is NOT part of Brigade and Division West's Big 5?"
Qs(3) = "According to the SROE / XROE, pyrotechnics will never be used or thrown closer than __________ to any role players."
Qs(4) = "How many parts of an AAR are there?"
Qs(5) = "When a soldier has a weapon and full basic load on his person, with a magazine inserted into the weapon but no rounds chambered, what weapon arming status is the soldier in?"
Qs(6) = "How many uniform postures are there?"
Qs(7) = "Which of the following is categorized as a victim operated IED?"
Qs(8) = "Line 4 of the UXO 9 Line is what?"
Qs(9) = "You are more likely to spot an IED than you are to spot the indicators? (THIS MIGHT BE TRUE BUT IS IT IN THE HANDBOOK??)"
Qs(10) = "The keys to a successful opening talk of a KLE are?"
Qs(11) = "What is NOT one of the five steps to a success in the KEY Leader Engagement Preparation?"
Qs(12) = "What are some of the needs of the aviator in Air Ground Integration?"
Qs(13) = "When numbering walls in urban environments, which direction do you number from?"
Qs(14) = "Which is NOT used for marking an LZ at night?"
Qs(15) = "What are the three types of convoys?"
Qs(16) = "Convoys must rehearse reaction drills frequently to in order to be able to fight as a ________?"
Qs(17) = "What are the types of attacks involving IED's and VBIED's?"
Qs(18) = "Which is NOT a special team in a convoy element?"
Qs(19) = "What are some of the things that are considered before conducting convoy operations?"
Qs(20) = "How many golden force protection rules are there?"
Qs(21) = "What is NOT one of the golden force protection rules for convoys?"
Qs(22) = "Who ensures a detailed Standard Operating Procedures (SOP) is provided and consistently updated as needed for an ECP and FOB security guidelines?"
Qs(23) = "Under the Force Protection guidelines for unit tasks, which is NOT a unit task?"
Qs(24) = "When clearing an M4 / M16A2 rifle, what is the 7th step?"
Qs(25) = "An M249 is considered a hot weapon when?"
Qs(26) = "With any weapon what is the first step in maintenance?"
Qs(27) = "How many steps are there when clearing an MR (.50 cal) machine gun?"
Qs(28) = "If a round cooks off while the weapon is on your shoulder, and the feed tray cover is open, you could suffer injury or death?"
Qs(29) = "According to the OC/T Handbook, what device is used for a far recognition signal when guiding a rotary wing to its site during hours of limited visibility?"
Qs(30) = "On a WRENCH 1 Report, what is the NLT each day that deadlinable faults must be reported to the BDE?"
Qs(31) = "On a sensitive items report, what is the pro word used to denote 100% accountability of personnel and equipment?"
Qs(32) = "Who do Team Leaders notify of a Level 2 CCIR incident within 2 hours?"
Qs(33) = "What is the reporting time for a level 1 CCIR report?"
Qs(34) = "What is the common name of the AN/PRC-148 radio?"
Qs(35) = "Which of the following is NOT a priority of patients on Line 3 of Nine Line MEDEVAC?"
Qs(36) = "Which steps of the TLP's must be completed in sequence?"
Qs(37) = "Pre Combat Checks (PCC's) are conducted after which of the TLP's?"
Qs(38) = "Some of the steps of the TLP's may go on continuously throughout the operation?"
Qs(39) = "Conducting a detailed mission analysis and comparing courses of action fall under which step of the TLP's?"
Qs(40) = "Conducting a recon can assist of which of the following procedures?"
Qs(41) = "The five step, cyclical process of CRM includes?"
Qs(42) = "One of the single best methods leaders can implement to reduce the chance of accidents is to?"
Qs(43) = "The five levels of probability in the risk assessment matrix are?"
Qs(44) = "In the event of an accident, a completed DA Form 285 - AB-R or DA Form 2397-AB-R must be submitted within ________ calendar days and will serve as the official accident report?"
Qs(45) = "Cold injury prevention is a command responsibility?"
Qs(46) = "What is the work / rest plan for moderate work during Heat Category 5 conditions?"
Qs(47) = "An Army accident in which the resulting total cost of property lost is $50,000 or more but less than $500,000 is classified as?"


' Set all user answers to negative
For Ctr = 0 To NOOFQS - 1
UserAns(Ctr) = -1
Next Ctr

' All the multiple choices for each question
Choices(0, 0) = " Every Soldier is a competent, fit, and professional trainer "
Choices(0, 1) = " Train to tough, relevant, and realistic Army Standards in a safe and disciplined "
manner ""
Choices(0, 2) = " Conduct AAR's in order to allow the training unit to identify its strengths and weaknesses "
Choices(0, 3) = " Build the team-internally and externally where everyone is valued and dignity and respect are the watchwords"
Choices(1, 0) = " Safety "
Choices(1, 1) = " Training to standards "
Choices(1, 2) = " Preparing a composite risk management worksheet "
Choices(2, 0) = " Get better everyday "
Choices(2, 1) = " No accidents or serious injuries "
Choices(2, 2) = " Maintain the Warrior Ethos "
Choices(2, 3) = " Remain in proper uniform when in the training unit's presence "
Choices(3, 0) = " 10 meters "
Choices(3, 1) = " 25 feet "
Choices(3, 2) = " 25 meters "
Choices(3, 3) = " 50 feet "
Choices(4, 0) = " 2"
Choices(4, 1) = " 3"
Choices(4, 2) = " 4"
Choices(4, 3) = " 5"
Choices(5, 0) = " Red "
Choices(5, 1) = " Green "
Choices(5, 2) = " Amber "
Choices(5, 3) = " Black "
Choices(6, 0) = " 2"
Choices(6, 1) = " 3"
Choices(6, 2) = " 4"
Choices(6, 3) = " 5"
Choices(7, 0) = " Command wire "
Choices(7, 1) = " Radio controlled IED "
Choices(7, 2) = " Electrical timed IED "
Choices(7, 3) = " Pressure plate IED "
Choices(8, 0) = " Type of IED / Ordnance "
Choices(8, 1) = " Size of crater "
Choices(8, 2) = " Size of explosion "
Choices(8, 3) = " Recommended priority "
Choices(9, 0) = " TRUE"
Choices(9, 1) = " FALSE"
Choices(10, 0) = " Exchange small talk "
Choices(10, 1) = " Remember your local habits and respect them "
Choices(10, 2) = " Use some friendly words in a local language "
Choices(10, 3) = " Take your time and be patient "
Choices(10, 4) = " All of the above"
Choices(11, 0) = " Mission analysis "
Choices(11, 1) = " Develop intended outcome strategy "
Choices(11, 2) = " Issue OPORD "
Choices(11, 3) = " Review of agreements / issues "
Choices(12, 0) = " Clear task and purpose for aircrews "
Choices(12, 1) = " Call sign and frequency (PACE -- primary, alternate, contingency, emergency)"
Choices(12, 2) = " Issue 9 Line "
Choices(12, 3) = " Both A and B "
Choices(13, 0) = " Clockwise "
Choices(13, 1) = " Front to Back "
Choices(13, 2) = " Counter Clockwise "
Choices(13, 3) = " None of the above "
Choices(14, 0) = " IR Chemlight "
Choices(14, 1) = " IR Strobe "
Choices(14, 2) = " Normal Strobe "
Choices(14, 3) = " Smoke "
Choices(15, 0) = " Trucks / trailers, civilian cars, and general support "
Choices(15, 1) = " Long haul (replacement forces), civilian cars, and general support "
Choices(15, 2) = " Long haul (replacement forces), general support, and local (Brigade support area to the unit)"
Choices(15, 3) = " Local (Brigade support to the unit), trucks/trailers, and general support "
Choices(16, 0) = " Collective Team "
Choices(16, 1) = " Cohesive Team "
Choices(16, 2) = " Well oiled machine "
Choices(16, 3) = " Unit "
Choices(17, 0) = " Basic, multiple IED's, change of traffic"
Choices(17, 1) = " Counter attack, basic, ambush "
Choices(17, 2) = " Change of traffic, ambush, complex "
Choices(17, 3) = " Multiple IED's, basic, complex "
Choices(18, 0) = " Aid and litter "
Choices(18, 1) = " Barrier Breaching "
Choices(18, 2) = " Search team "
Choices(18, 3) = " Escort "
Choices(19, 0) = " Planning, medical, SP, RP "
Choices(19, 1) = " Predictability, contingency plans, TLP's, communication, medical "
Choices(19, 2) = " Equipped to fight, aid and litter, collective team "
Choices(19, 3) = " Long haul, civilian cars, basic "
Choices(20, 0) = " 1"
Choices(20, 1) = " 7"
Choices(20, 2) = " 10"
Choices(20, 3) = " 5"
Choices(21, 0) = " Do not set patterns "
Choices(21, 1) = " Know how to ask for help "
Choices(21, 2) = " Understand the threat "
Choices(21, 3) = " Know how to react to threat situations "
Choices(22, 0) = " OIC "
Choices(22, 1) = " S1"
Choices(22, 2) = " BDOC "
Choices(22, 3) = " NCOIC "
Choices(23, 0) = " Employ QRF "
Choices(23, 1) = " Establish base operations "
Choices(23, 2) = " Conduct area surveillance "
Choices(23, 3) = " Create a civil disturbance "
Choices(24, 0) = " Place the selector lever on semi and squeeze the trigger "
Choices(24, 1) = " Close the ejection port cover "
Choices(24, 2) = " Remove the magazine "
Choices(24, 3) = " Point the muzzle in a safe direction or in a clearing barrel "
Choices(25, 0) = " When it is 84 degrees outside "
Choices(25, 1) = " If it is fired with dummy rounds "
Choices(25, 2) = " 125 or more successive rounds have been fired "
Choices(25, 3) = " 200 or more successive rounds have been fired "
Choices(26, 0) = " Wipe it down outside "
Choices(26, 1) = " Clear it "
Choices(26, 2) = " Put the weapon on fire "
Choices(26, 3) = " Start taking it apart "
Choices(27, 0) = " 12"
Choices(27, 1) = " 10"
Choices(27, 2) = " 14"
Choices(27, 3) = " 9"
Choices(28, 0) = " TRUE"
Choices(28, 1) = " FALSE"
Choices(29, 0) = " Strobe Light "
Choices(29, 1) = " Flashlight "
Choices(29, 2) = " Chemlight buzz saw "
Choices(29, 3) = " Vehicle headlights "
Choices(30, 0) = " 0600 hrs "
Choices(30, 1) = " 1200 hrs "
Choices(30, 2) = " 1800 hrs "
Choices(30, 3) = " 1900 hrs "
Choices(31, 0) = " Green "
Choices(31, 1) = " Up "
Choices(31, 2) = " Good "
Choices(31, 3) = " Roger "
Choices(32, 0) = " BN CDR, BN XO, BN S3, BN CSM "
Choices(32, 1) = " BDE CDR, BN CDR, BDE CSM "
Choices(32, 2) = " Local Police "
Choices(32, 3) = " Military Police "
Choices(33, 0) = " 15 min "
Choices(33, 1) = " 30 min "
Choices(33, 2) = " 45 min "
Choices(33, 3) = " 1 hour "
Choices(34, 0) = " Walkie Talkie "
Choices(34, 1) = " Motorola "
Choices(34, 2) = " EF Johnson "
Choices(34, 3) = " MBTIR "
Choices(35, 0) = " Urgent "
Choices(35, 1) = " Routine "
Choices(35, 2) = " Convenience "
Choices(35, 3) = " Emergency "
Choices(36, 0) = " Conduct recon, complete the plan "
Choices(36, 1) = " Receive the mission, issue the warning order BUT WHERE DO WE FIND THIS ANSWER?"
Choices(36, 2) = " Make a tentative plan "
Choices(36, 3) = " Complete the plan, issue the order "
Choices(37, 0) = " Complete the plan "
Choices(37, 1) = " Receive the mission "
Choices(37, 2) = " Initiate Movement "
Choices(37, 3) = " Issue the warning order "
Choices(38, 0) = " TRUE"
Choices(38, 1) = " FALSE"
Choices(39, 0) = " Make a tentative plan SOUNDS REASONABLE BUT IS IT IN THE HANDBOOK?"
Choices(39, 1) = " Receive the mission "
Choices(39, 2) = " Supervise preparation "
Choices(39, 3) = " Issue OPORD "
Choices(40, 0) = " Map recon "
Choices(40, 1) = " Site recon "
Choices(40, 2) = " Route verification "
Choices(40, 3) = " All of the above SOUNDS REASONABLE BUT IS IT IN THE HANDBOOK?"
Choices(41, 0) = " Identify hazards, assess hazards, develop a plan, implement a plan, assess the plan "
Choices(41, 1) = " Identify hazards, develop a plan, implement plan, assess the plan, implement controls "
Choices(41, 2) = " Identify hazards, assess hazards, develop controls and make decisions, implement controls supervise and evaluate"
Choices(41, 3) = " Identify hazards, assess hazards, develop a plan, make decisions based on the plan, supervise and evaluate"
Choices(42, 0) = " Establish controls "
Choices(42, 1) = " Establish a buddy system "
Choices(42, 2) = " Establish a comprehensive risk management plan "
Choices(42, 3) = " Establish safety standards "
Choices(43, 0) = " Severity, catastrophic, critical, marginal, negligible "
Choices(43, 1) = " Frequent, likely, occasional, seldom, unlikely "
Choices(43, 2) = " Extremely high, moderate, low, extremely low "
Choices(43, 3) = " Frequent, moderate, high, marginal, low"
Choices(44, 0) = " 15"
Choices(44, 1) = " 30"
Choices(44, 2) = " 10"
Choices(44, 3) = " 5"
Choices(45, 0) = " TRUE"
Choices(45, 1) = " FALSE"
Choices(46, 0) = " 50 min work / 10 min rest "
Choices(46, 1) = " 10 min work / 50 min rest "
Choices(46, 2) = " 40 min work / 20 min rest "
Choices(46, 3) = " 20 min work / 40 min rest "
Choices(47, 0) = " Class A "
Choices(47, 1) = " Class B "
Choices(47, 2) = " Class C "
Choices(47, 3) = " Class D "


' Provide the answer list here.
' Ans(0) = 0 means that the correct answer to the 1st question is the 1st choice.
' Ans(1) = 1 means that the correct answer to the 2nd question is the 2nd choice.
' Ans(2) = 1 means that the correct answer to the 3rd question is the 2nd choice.

Ans(0) = 2
Ans(1) = 0
Ans(2) = 3
Ans(3) = 2
Ans(4) = 2
Ans(5) = 2
Ans(6) = 2
Ans(7) = 3
Ans(8) = 0
Ans(9) = 1
Ans(10) = 4
Ans(11) = 2
Ans(12) = 3
Ans(13) = 0
Ans(14) = 3
Ans(15) = 1
Ans(16) = 1
Ans(17) = 0
Ans(18) = 2
Ans(19) = 1
Ans(20) = 3
Ans(21) = 0
Ans(22) = 2
Ans(23) = 3
Ans(24) = 0
Ans(25) = 3
Ans(26) = 1
Ans(27) = 0
Ans(28) = 0
Ans(29) = 2
Ans(30) = 3
Ans(31) = 0
Ans(32) = 0
Ans(33) = 2
Ans(34) = 3
Ans(35) = 3
Ans(36) = 1
Ans(37) = 1
Ans(38) = 0
Ans(39) = 0
Ans(40) = 0
Ans(41) = 2
Ans(42) = 1
Ans(43) = 1
Ans(44) = 0
Ans(45) = 0
Ans(46) = 3
Ans(47) = 2

QNo = 1
AssignValues

With SlideShowWindows(1)
.View.GotoSlide (.Presentation.Slides("QSlide").SlideIndex)
End With
' Comment the line below to stop the timer.
' Call Tmr
End Sub

Sub SetBulletUnicode(ShapeName As String, Code As Integer)
With SlideShowWindows(1).Presentation.Slides("QSlide").Shapes(ShapeName).TextFrame.TextRange.ParagraphFormat.Bullet
.UseTextFont = msoTrue
.Character = Code
End With
End Sub
Sub ButtonChoice1()
UserAns(QNo - 1) = 0
AssignValues
End Sub
Sub ButtonChoice2()
UserAns(QNo - 1) = 1
AssignValues
End Sub
Sub ButtonChoice3()
UserAns(QNo - 1) = 2
AssignValues
End Sub
Sub ButtonChoice3()
UserAns(QNo - 1) = 3
AssignValues
End Sub
Sub ButtonChoice3()
UserAns(QNo - 1) = 4
AssignValues
End Sub

Sub Tmr()

'Just in the eventuality that you click the start button twice
'isRunning stores the current state of the macro
'TRUE = Running; FALSE = Idle
ExitFlag = False
Static isRunning As Boolean
If isRunning = True Then
End
Else
isRunning = True
Dim TMinus As Integer
Dim xtime As Date
xtime = Now

With ActivePresentation.Slides(2).Shapes("Timer")

'Countdown in seconds
TMinus = 59

Do While (TMinus > -1)
DoEvents
' Rather crude way to determine if a second has elapsed
If ExitFlag = True Then
.TextFrame.TextRange.Text = "00:00:00"
isRunning = False
Exit Sub
End If
If Format(Now, "ss") <> Format(xtime, "ss") Then
xtime = Now

.TextFrame.TextRange.Text = Format(TimeValue(Format(Now, "hh:mm:ss")) - _
TimeSerial(Hour(Now), Minute(Now), Second(Now) + TMinus), "hh:mm:ss")
TMinus = TMinus - 1
' Let the display refresh itself
End If
Loop
End With
Debug.Print "came here"
isRunning = False
StopQuiz True
End
End If
End Sub
Sub AssignValues()
SetBulletUnicode "Choice1", UD_CODE_1
SetBulletUnicode "Choice2", UD_CODE_1
SetBulletUnicode "Choice3", UD_CODE_1
SetBulletUnicode "Choice4", UD_CODE_1

Select Case UserAns(QNo - 1)
Case 0
SetBulletUnicode "Choice1", UD_CODE_2
Case 1
SetBulletUnicode "Choice2", UD_CODE_2
Case 2
SetBulletUnicode "Choice3", UD_CODE_2
End Select
With SlideShowWindows(1).Presentation.Slides("QSlide")
.Shapes(1).TextFrame.TextRange.Text = Qs(QNo - 1)
.Shapes("Choice1").TextFrame.TextRange.Text = Choices(QNo - 1, 0)
.Shapes("Choice2").TextFrame.TextRange.Text = Choices(QNo - 1, 1)
.Shapes("Choice3").TextFrame.TextRange.Text = Choices(QNo - 1, 2)
.Shapes("Choice4").TextFrame.TextRange.Text = Choices(QNo - 1, 3)
End With
End Sub
Sub ShowAnswers()
Dim AnsList As String
AnsList = "The answers are as follows:" & vbCrLf
For X = 0 To NOOFQS - 1
AnsList = AnsList & Qs(X) & vbTab & " Answer:" & Choices(X, Ans(X)) & vbCrLf
Next X
MsgBox AnsList, vbOKOnly, "Correct answers"
End Sub