计算机毕业设计介绍:
(1)启发式组卷
此模块可以通过选择题型、输入试题数量和总分数,点击生成按钮,系统启发式生成A卷和B卷。
以下是引用片段: 其关键代码实现过程如下: Private Sub btnDel_Click() '对于要组卷的题型 进行分数判断 If Me.Check1(0).Value = 1 Then If txtFs1.Text Mod txtsl1.Text <> 0 Then MsgBox "单选题的分数应该是题目的整数倍" Exit Sub End If End If On Error Resume Next If Me.Check1(1).Value = 1 Then If Val(txtFs2.Text) Mod Val(txtSl2.Text) <> 0 Then MsgBox "判断题的分数应该是题目的整数倍" Exit Sub End If End If If Me.Check1(2).Value = 1 Then If txtFs3.Text Mod txtSl3.Text <> 0 Then MsgBox "多选题的分数应该是题目的整数倍" Exit Sub End If End If On Error GoTo 0 Dim tmpPaper As Paper Dim intFs As Long Dim intIdList As String Dim tmprs As New ADODB.Recordset Dim i As Long i = 1 '单选题组卷程序逻辑 If Me.Check1(0).Value = 1 Then intFs = txtFs1 / txtsl1 Set tmprs = ExecSql("select top " & txtsl1.Text & " * from SingleProblem order by newid() ") With tmprs If .RecordCount > 0 Then '卷头 tmpPaper.strPaperA = "------------------------------A卷------------------------------" & vbCrLf & vbCrLf tmpPaper.strPaperA = tmpPaper.strPaperA & "单选题(选择正确答案:)" & vbCrLf & vbCrLf tmpPaper.strPaperA_Da = "----------------------------答案----------------------------" & vbCrLf & vbCrLf tmpPaper.strPaperA_Da = tmpPaper.strPaperA_Da & "单选题(答案:)" & vbCrLf & vbCrLf '题目 Do Until .EOF tmpPaper.strPaperA = tmpPaper.strPaperA & "第" & i & "题:" & .Fields("title").Value & ":(" & intFs & "分)" & vbCrLf & vbCrLf tmpPaper.strPaperA = tmpPaper.strPaperA & "(A) " & .Fields("AnswerA").Value & vbCrLf tmpPaper.strPaperA = tmpPaper.strPaperA & "(B) " & .Fields("AnswerB").Value & vbCrLf tmpPaper.strPaperA = tmpPaper.strPaperA & "(C) " & .Fields("AnswerC").Value & vbCrLf tmpPaper.strPaperA = tmpPaper.strPaperA & "(D) " & .Fields("AnswerD").Value & vbCrLf & vbCrLf tmpPaper.strPaperA_Da = tmpPaper.strPaperA_Da & "第" & i & "题:" & .Fields("Answer").Value & vbCrLf i = i + 1 intIdList = intIdList & .Fields("id").Value & "," .MoveNext Loop
|
〖资料来源:计算机毕业论文 www.xiaoniu168.com〗
第9页为计算机毕业论文部分......