Skip to content

Commit

Permalink
version 1.01
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlees authored and gaborcsardi committed Nov 2, 2007
1 parent 119bf44 commit 1f02b99
Show file tree
Hide file tree
Showing 65 changed files with 3,606 additions and 1,230 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
@@ -1,12 +1,12 @@
Package: ProfessR
Type: Package
Title: Grades Setting and Exam Maker
Version: 1.0-8
Date: 2008-09-15
Version: 1.01
Date: 2007-11-02
Author: Jonathan M. Lees
Maintainer: Jonathan M. Lees<jonathan.lees@unc.edu>
Description: Programs to determine student grades and create
examinations from Question banks. Programs will create numerous
multiple choice exams, randomly shuffled, for different versions of same question list.
License: GPL
Packaged: Fri Feb 13 10:33:12 2009; lees
Packaged: Mon Dec 10 08:45:55 2007; lees
16 changes: 0 additions & 16 deletions R/CHECKbank.R

This file was deleted.

15 changes: 1 addition & 14 deletions R/DUMPbank.R
@@ -1,19 +1,7 @@
DUMPbank<-function(ofile, QB, sep="\n", append=TRUE)
DUMPbank<-function(ofile, QB, sep="\n")
{
if(missing(sep)) sep=NULL
if(missing(append)) append=TRUE

######### dump out an ascii version of an exam question bank

if(append==FALSE)
{
gg = deparse(substitute(QB))

cat(file=ofile,paste(sep="", "############## ", gg) , append=FALSE, sep="\n")
}



for(i in 1:length(QB))
{
Q1 = QB[[i]]
Expand All @@ -30,7 +18,6 @@ if(append==FALSE)

}
####### example: DUMPbank("dafinal", QBFINAL)
#######

}

23 changes: 0 additions & 23 deletions R/DUMPgrades.R

This file was deleted.

43 changes: 0 additions & 43 deletions R/DUPbank.R

This file was deleted.

68 changes: 5 additions & 63 deletions R/Get.testbank.R
@@ -1,28 +1,10 @@
`Get.testbank` <-
function(fn)
function(fn)
{

########## this takes an ASCII text file of questions
######### and returns a list of questions lists.
######### blank lines are stripped.
ALLQ = scan(file=fn, what="", sep="\n")


######### the key word QUESTION: must appear at the beginning of the lne
######### same for the the key word ANSWER:

## there should be a blank after the keys words but the program tries
## to compensate for no blanks.

### there should be no blank lines or lines with NO alphanumeric information:
####### the program tries to get rid of these also




ALLQ = scan(file=fn, what="", sep="\n", quiet=TRUE)


q1 = grep("^QUESTION:", ALLQ)
q1 = grep("QUESTION:", ALLQ)


Qbank = list()
Expand All @@ -36,31 +18,11 @@

## print(paste(sep=" ", "#####", i, i1, i2))
## print(ALLQ[i1:i2])


az1 = substring(ALLQ[i1], 10, 10)

if(identical(az1, " "))
{
quest = substring(ALLQ[i1], 11, nchar(ALLQ[i1]))

}else{

quest = substring(ALLQ[i1], 10, nchar(ALLQ[i1]))
}




#################### try to eliminate any line that has no content
quest = substring(ALLQ[i1], 11, nchar(ALLQ[i1]))


ans1 = ALLQ[(i1+1):i2]


ww=grep("[a-z,A-Z]", ans1)
ans1 = ans1[ww]

grfig = grep("FIG:", ans1)
if(length(grfig)>=1)
{
Expand All @@ -80,33 +42,13 @@

a1 = grep("ANSWER:", ans1)
fa1 = ans1[a1]

az1 = substring(fa1, 8, 8)

if(identical(az1, " "))
{
a2 = substring(fa1, 9, nchar(fa1))

}
else
{

a2 = substring(fa1, 8, nchar(fa1))
}





### a2 = substring(fa1, 9, nchar(fa1))
a2 = substring(fa1, 9, nchar(fa1))
ans1[a1] = a2

Qbank[[i]] = list(Q=quest, A=ans1, a=fa1, numANS=a1, FIG=fignewt)

}

attr(Qbank, "fn")<-fn

return(Qbank)


Expand Down
42 changes: 0 additions & 42 deletions R/IDandEM.R

This file was deleted.

47 changes: 0 additions & 47 deletions R/autoemail.R

This file was deleted.

23 changes: 0 additions & 23 deletions R/checkgrades.R

This file was deleted.

0 comments on commit 1f02b99

Please sign in to comment.