使用ppt的交互式测验

编程入门 行业动态 更新时间:2024-10-24 02:27:19
本文介绍了使用ppt的交互式测验的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我之前发布了一个关于此的垃圾问题,并且已经离开并做了一些工作以重新提问.基本上我做了一个ppt测验,计算一个人给出了多少正确和错误的答案.然后在最后将这些信息反馈给用户.但是,我现在想要发生的是我希望存储结果,以便我可以返回并查看每个用户在测验中的表现.理想情况下,我希望它可以在 6 台联网计算机上工作,将所有测验结果存储在一个地方.但如果需要,我可以从 6 台计算机中的每台计算机中取出一个文件.

I posted a rubbish question about this before and have gone away and done some work on it to re-ask. Basically I've made a ppt quiz that counts how many correct and incorrect answers a person has given. It then feeds this information back to the user at the end. However what I want to happen now is I want the results to be stored so that I can go back in and see how each user has performed in the quiz. Ideally I would like it to work over 6 networked computers storing all the quiz results in one place. But if need be I can just take a file from each of the 6 computers.

到目前为止我的代码是这样的:

My code so far looks like this:

Dim username As String Dim numberCorrect As Integer Dim numberWrong As Integer Sub YourName() username = InputBox(prompt:="Type your Name") MsgBox " Get Ready to begin " + username, vbApplicationModal, " Orange 1C Book 7" End Sub Sub correct() numberCorrect = numberCorrect + 1 ActivePresentation.SlideShowWindow.View.Next End Sub Sub incorrect() numberWrong = numberWrong + 1 ActivePresentation.SlideShowWindow.View.Next End Sub Sub Start() numberCorrect = 0 numberWrong = 0 YourName ActivePresentation.SlideShowWindow.View.Next End Sub Sub Results() MsgBox "Well done " & username & " You got " & numberCorrect & " out of " & numberCorrect + numberWrong, vbApplicationModal, "Orange 1C Book 7" End Sub'

任何帮助将不胜感激.不知道从哪里开始下一步.

Any help would be greatly appreciated. Not sure where to begin with the next step.

推荐答案

这里有一个选项供您选择...但首先要进行一些解释.此代码将创建 TXT 文件.每次有人到达 Results 宏时,它都会将结果添加到文件中.因此,一个文件将保留所有结果,直到您不删除它们(或文件).因此,我添加了分隔线和日期/时间信息,以便您轻松找到合适的结果.

Here goes one option for you... But some explanation first. This code will create TXT file. Each time someone will reach Results macro it will add results to the file. So, one file will keep all the results until you don't delete them (or the file). Therefore I've added separation line and date/time information for you to easily find appropriate results.

Sub Save_Results_To_Txt() 'set file results location to activepresentation path 'or could be changed to any path string Dim strWhere As String strWhere = ActivePresentation.Path 'let's set name of the file separately Dim strName As String strName = "\results.txt" Dim ff As Long ff = FreeFile Open strWhere & strName For Append As #ff Write #ff, Now & vbTab & username Write #ff, numberCorrect & vbTab & vbTab & numberWrong Write #ff, String(30, "-") Close #ff End Sub

您需要将 Save_Results_To_Txt 添加到您的 Results 子中,可能在 MsgBox 行之前.

You need to add Save_Results_To_Txt to your Results sub, possibly before MsgBox line.

您的 results.txt 文件将如下所示:

Your results.txt file will look like:

"2013-04-25 16:11:05 Tom" "10 11" "------------------------------" "2013-04-25 16:11:23 Mark" "11 10" "------------------------------"

更多推荐

使用ppt的交互式测验

本文发布于:2023-11-10 01:01:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573932.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:测验   ppt

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!