5 CLS:KEY OFF:SCREEN 0,0,0:WIDTH 80:CLEAR:FOR I=1 TO 10:KEY I,"":NEXT:KEY 2,"GOTO 60"+CHR$(13):KEY 10,"RUN"+CHR$(34)+"BLUEMENU"+CHR$(34)+CHR$(13):LIST 10-57
10 '******************* EDUCATOR'S TOOLBOX SPECIAL ****************************
16 '??????????????????????????????????????????????????????????????????????????
18 '?         TEACHER'S / EDUCATOR'S TESTWRITER & GRADE SHEET PROGRAM         ?
20 '?                                                                         ?
22 '?     This program was written and developed over a period of several     ?
24 '? years by Bill Alton, 4201 W Carol Avenue. Phoenix, AZ  85021.  It is    ?
26 '? a superbly crafted and implemented program with application far be-     ?
28 '? ond test writing and grading. The program is expanded on the 360K disc. ?
30 '? Big Blueberry Pie purchasers may examine the programming techniques in- ?
31 '? volved.  Please call up the TESTWRIT.DOC program with a "type" command  ?
32 '? in DOS.  Load the SAMPLE.TWD program when running this program for an   ?
33 '? example of the TESTWRITERS capability. Bill Alton will welcome letters  ?
34 '? with comments and applications of this program from educators or other  ?
35 '? users. The program has been modified to work on Drive A. To use the     ?
36 '? program for production, change Drive A references in Lines 1840, 2410,  ?
37 '? and 3200 to Drive B. DO NOT OVERWRITE THE DRIVE A DISK. USE WRITE TAB!  ?
38 '? NOTE:!  If you distribute this program, please leave Bill Alton's name  ?
39 '? in the lead-in REMARKS as shown.                                        ?
40 '?     An expanded version is on the 320K disk as TEST2WRT.BAS             ?
41 '?                       (c) G I N A C O -- 1983       Ver 5.3/320         ?
50 '??????????????????????????????????????????????????????????????????????????
55 '        *****  < F2 > to RUN  *******  < F10 > For BLUEMENU  *****
57 ' ====== To avoid DOCUMENTATION BOX each time, REM or DELETE  line 5 ======
60 CLS:SCREEN 0,0,0:WIDTH 80:CLEAR:FOR I=1 TO 10:KEY I,"":NEXT
100 COLOR 7,0
110 '***    T E S T W R I T E R    ***
120 '***      BILL ALTON        ***
130 '***    VERSION 1.0  05/15/83    ***
140 '*** FOR EPSON FX-80 PRINTER ***
160 CLEAR 1000:DIM Q$(100),Q1$(100),Q2$(100),A$(100,4),B$(100,4):UU$="##.":CLS:GOSUB 3230:LOCATE 12,26:PRINT"*** TESTWRITER ***":FOR X=1 TO 500:NEXT X:PG=2:GOTO 2280
270 ' *** WRITE TEST ***
280 CLS:LOCATE 8,15:LINE INPUT"SUBJECT ";TT$:IF TT$=""THEN TT$="U. S. HISTORY":CLS
320 CLS:LOCATE 10,1:PRINT"INPUT A REFERENCE CODE (EG. CHAPTER 12 SECTON 1 --> ";:COLOR 1:PRINT"C12S1";:COLOR 7:PRINT" ) ";:LINE INPUT;S$:N=100:M=1
420 FOR A=M TO N
430 CLS:LOCATE 8,15:PRINT"(TYPE 'END' IF LAST QUESTION)":PRINT"***  TYPE OUT QUESTION # ";A;"  ***":PRINT STRING$(80,196):LOCATE 11,10:COLOR 0,7:PRINT SPACE$(62):COLOR 7,0:LOCATE 11,10:LINE INPUT Q$(A):IF Q$(A)="END"THEN N=A-1:GOTO 2280
550 LOCATE 12,10:COLOR 0,7:PRINT SPACE$(62):COLOR 7,0:LOCATE 12,10:LINE INPUT Q1$(A):IF Q1$(A)=""THEN Q1$(A)="XX
620 IF Q$(A)="X"THEN A=(A-1):Q$(A)="  ":CLS:GOTO 430
630 IF Q1$(A)="XX"THEN Q2$(A)="XX"ELSE LOCATE 13,10:COLOR 0,7:PRINT SPACE$(62):COLOR 7,0:LOCATE 13,10:LINE INPUT Q2$(A)
640 IF Q2$(A)=""THEN Q2$(A)="XX
650 IF Q1$(A)="X"THEN PRINT"RETYPING LAST QUESTION ";A:Q1$(A)="  ":CLS:GOTO 430
660 IF Q2$(A)="X"THEN Q2$(A)="  ":GOTO 430
670 FOR B=1 TO 4
680 CLS:PRINT"QUESTION #";A:PRINT STRING$(80,223):PRINT Q$(A):IF Q1$(A)<>"XX"THEN PRINT Q1$(A)
730 IF Q2$(A)<>"XX"THEN PRINT Q2$(A)
740 PRINT STRING$(80,177):PRINT"ANSWER # ";B;:IF B=1 THEN COLOR 17:PRINT"   *** ENTER CORRECT ANSWER *** ":COLOR 7,0
770 PRINT:PRINT"TYPE 'X' TO REDO ANSWERS":LOCATE 14,15:COLOR 0,7:PRINT SPACE$(12):COLOR 7,0:LOCATE 14,15:LINE INPUT A$(A,B):IF A$(A,B)="X"THEN B=1:CLS:GOTO 680
870 IF B=1 THEN A$(A,1)="*"+A$(A,1)
880 CLS:NEXT B,A:GOTO 2280
910 ' *** START OF PRINT ROUTINE ***
920 CLS:X$="":INPUT"HIT ENTER TO PRINT -- 'R' TO RETURN TO MENU";X$:IF X$="R"OR X$="r"THEN 2280
960 PRINT:PRINT:PRINT:INPUT"DO YOU WANT TO RANDOMIZE THE ANSWERS ";X$:IF LEFT$(X$,1)="Y"OR LEFT$(X$,1)="y"THEN V=1ELSE V=0
1010 PRINT:INPUT"INPUT 'CODE' SYMBOL TO SEPERATE TEST VERSIONS (EG. #,*,@)";KK$:CLS:REM *** START PRINTING TO PRINTER ***
1050 PRINT"PRINTING":LPRINT DATE$;TAB(57)"Name ";STRING$(16,95):LPRINT S$;KK$;:LPRINT TAB(57)"Date/Rm _________ (   )":LPRINT STRING$(79,61):Y=40-(LEN(TT$)/2):LPRINT TAB(Y)TT$:LPRINT STRING$(79,CHR$(42))
1130 LPRINT SU$;"INSTRUCTIONS:";EU$;SI$;" Choose the best answer and fill in the letter of the answer in":LPRINT TAB(15)"the blank to the left of the question.";EI$:LPRINT" ":LC=8:FOR A=1 TO N:CLS:IF Q$(A)=""THEN 1360
1200 PRINT"WORKING ON QUESTION ";A;TAB(65)"LINECOUNT = ";LC:LPRINT STRING$(5,95);:LPRINT TAB(7)USING UU$;A;:LPRINT TAB(11)Q$(A):LC=LC+1:IF Q1$(A)<>"XX"THEN LPRINT TAB(11)Q1$(A):LC=LC+1
1260 IF Q2$(A)<>"XX"THEN LPRINT TAB(11)Q2$(A):LC=LC+1
1270 IF V=1 THEN GOSUB 2510
1280 CLS:IF LEFT$(A$(A,1),1)="*"THEN LPRINT TAB(9);"A) ";RIGHT$(A$(A,1),(LEN(A$(A,1))-1));ELSE LPRINT TAB(9)"A) ";A$(A,1);
1300 IF LEFT$(A$(A,2),1)="*"THEN LPRINT TAB(45);"B) ";RIGHT$(A$(A,2),(LEN(A$(A,2))-1))ELSE LPRINT TAB(45)"B) ";A$(A,2)
1310 IF LEFT$(A$(A,3),1)="*"THEN LPRINT TAB(9);"C) ";RIGHT$(A$(A,3),(LEN(A$(A,3))-1));ELSE LPRINT TAB(9)"C) ";A$(A,3);
1320 IF LEFT$(A$(A,4),1)="*"THEN LPRINT TAB(45);"D) ";RIGHT$(A$(A,4),(LEN(A$(A,4))-1))ELSE LPRINT TAB(45)"D) ";A$(A,4)
1330 LPRINT" ":LC=LC+4:IF LC>62 THEN GOSUB 3100
1360 NEXT A:LPRINT CHR$(12):CLS:PG=2:PRINT"DO YOU WANT AN ANSWER KEY ":X$=INPUT$(1):IF LEFT$(X$,1)="N"OR LEFT$(X$,1)="n"THEN 2280
1430 CLS:PRINT CHR$(23):PRINT"PRINTING ANSWER KEY":LPRINT DATE$;TAB(45)SEC$"* T E A C H E R'S  C O P Y *";EEC$:LPRINT S$;:IF V=1 THEN LPRINT KK$;
1490 LPRINT TAB(50)SEX$;"---> K E Y <---";EEX$:LPRINT STRING$(79,"*"):Y=40-(LEN(TT$)/2):LPRINT TAB(Y)TT$:LPRINT STRING$(79,"*"):LPRINT" ":LPRINT" ":LPRINT" ":LC=10:FOR A=1 TO N:IF Q$(A)=""THEN 2280
1600 PRINT"WORKING ON QUESTION ";A:IF LEFT$(A$(A,1),1)="*"THEN LPRINT TAB(3);"A <--";:GOTO 1660
1620 IF LEFT$(A$(A,2),1)="*"THEN LPRINT TAB(3);"B <--";:GOTO 1660
1630 IF LEFT$(A$(A,3),1)="*"THEN LPRINT TAB(3);"C <--";:GOTO 1660
1640 IF LEFT$(A$(A,4),1)="*"THEN LPRINT TAB(3);"D <--";:GOTO 1660
1650 LPRINT TAB(3)"- <--";
1660 LPRINT A;". ";:LPRINT Q$(A):LC=LC+1:IF Q1$(A)<>"XX"THEN LPRINT TAB(15)Q1$(A):LC=LC+1
1700 IF Q2$(A)<>"XX"THEN LPRINT TAB(15)Q2$(A):LC=LC+1
1710 LPRINT TAB(9)"A) ";A$(A,1);TAB(45)"B) ";A$(A,2):LPRINT TAB(9)"C) ";A$(A,3);TAB(45)"D) ";A$(A,4):LPRINT" ":LC=LC+4:IF LC>60 THEN GOSUB 3100
1760 NEXT A:LPRINT" ":LPRINT TAB(40)"EACH QUESTION IS WORTH ";100/N;" POINTS":LPRINT CHR$(12):GOTO 2280
1810 ' *** INPUT SAVED TEST ***
1820 CLS:ON ERROR GOTO 3400
1840 FILES"A:*.TWD":LINE INPUT"INPUT FILE NAME  (NO .TWD)";DF$:IF DF$=""THEN 2280
1870 DF$=DF$+".TWD":OPEN"I",1, DF$:INPUT#1,N:LINE INPUT#1,TT$:LINE INPUT#1,S$:LOCATE 1,10:PRINT TT$,S$:FOR A=1 TO N:INPUT#1,Q$(A),Q1$(A),Q2$(A),A$(A,1),A$(A,2),A$(A,3),A$(A,4):LOCATE 24,5:PRINT Q$(A):NEXT A:CLOSE
2000 INPUT"DO YOU WANT TO ADD ON TO THIS TEST ";X$:IF LEFT$(X$,1)<>"Y"THEN 920
2020 M=N:M=M+1:CLS:PRINT"GET READY TO ADD TO TEST":FOR X=1 TO 300:NEXT X:N=100:GOTO 420
2100 ' *** SAVE PROGRAM ***
2110 CLS:LINE INPUT"OUTPUT FILE NAME # ";DF$:DF$=DF$+".TWD":OPEN"O",1, DF$:PRINT#1,N:PRINT#1,TT$:PRINT#1,S$:FOR A=1 TO N
2190 PRINT#1,CHR$(34);Q$(A);CHR$(34);CHR$(34);Q1$(A);CHR$(34);CHR$(34);Q2$(A);CHR$(34);CHR$(34);A$(A,1);CHR$(34);CHR$(34);A$(A,2);CHR$(34);CHR$(34);A$(A,3);CHR$(34);CHR$(34);A$(A,4)CHR$(34):PRINT TT$,Q$(A):NEXT A:CLOSE:CLS:PRINT"THE TEST HAS BEEN SAVED
2250 FOR X=1 TO 300:NEXT X:REM *** MENU ***
2280 CLS
2290 PRINT TAB(60)N" QUESTIONS READY
2300 PRINT STRING$(80,205):PRINT:PRINT TAB(23);:COLOR 0,7:PRINT" M A K E  A  S E L E C T I O N ":COLOR 7,0:PRINT:PRINT:PRINT TAB(25)"1  -  WRITE TEST":PRINT TAB(25)"2  -  INPUT SAVED TEST":PRINT TAB(25)"3  -  SAVE PROGRAM
2410 PRINT TAB(25)"4  -  PRINT TEST":PRINT TAB(25)"5  -  RECALL TEST QUESTION":PRINT TAB(25)"6  -  READ DIRECTORY ON DISK A
2440 W$=INKEY$:IF W$=""GOTO 2440
2460 W=VAL(W$):IF W<1 OR W>6 THEN 2440
2480 ON W GOTO 280,1820,2110,920,2780,3200
2490 '*** RANDOMIZE ANSWERS ROUTINE ***
2500 X=VAL(RIGHT$(TIME$,2))+VAL(MID$(TIME$,4,2))
2510 RANDOMIZE X
2520 X=INT(RND*(5)):IF X=0 THEN 2520
2540 N(1)=X
2550 X=INT(RND*(5)):IF X=0 THEN 2550
2570 N(2)=X:IF N(2)=N(1)THEN 2550
2590 X=INT(RND*(5)):IF X=0 THEN 2590
2610 N(3)=X:IF N(3)=N(2)OR N(3)=N(1)THEN 2590
2630 X=INT(RND*(5)):IF X=0 THEN 2630
2650 N(4)=X:IF N(4)=N(3)OR N(4)=N(2)OR N(4)=N(1)THEN 2630
2670 PRINT N(1),N(2),N(3),N(4):B$(A,N(1))=A$(A,1):B$(A,N(2))=A$(A,2):B$(A,N(3))=A$(A,3):B$(A,N(4))=A$(A,4):A$(A,1)=B$(A,1):A$(A,2)=B$(A,2):A$(A,3)=B$(A,3):A$(A,4)=B$(A,4):RETURN
2770 ' *** RECALL TEST QUESTION ***
2780 PRINT"INPUT QUESTION # ...
2790 INPUT ;V
2810 LOCATE 5,30:PRINT"QUESTION #";V:PRINT STRING$(80,177):CLS:PRINT Q$(V):PRINT Q1$(V):PRINT Q2$(V):PRINT STRING$(80,205):PRINT TAB(15)A$(V,1);TAB(40)A$(V,2):PRINT TAB(15)A$(V,3);TAB(40)A$(V,4):PRINT"NEW QUESTION # ";V:PRINT:PRINT
2950 INPUT"--> ";QQ$(V):IF QQ$(V)=""THEN 2300
2970 Q$(V)=QQ$(V):INPUT Q1$(V):IF Q1$(V)=""THEN Q1$(V)="XX
3000 IF Q1$(V)="XX"THEN Q2$(V)="XX"ELSE INPUT Q2$(V)
3010 IF Q2$(V)=""THEN Q2$(V)="XX
3020 FOR B=1 TO 4:CLS:PRINT"ANSWER #  ";B:PRINT STRING$(12,140):INPUT A$(V,B):IF A$(V,B)="X"THEN B=1:CLS:GOTO 3020
3080 NEXT B:GOTO 2300
3100 LPRINT CHR$(12):LPRINT STRING$(79,"="):LPRINT TT$;TAB(70)"PAGE ";PG:LPRINT STRING$(79,"*"):LPRINT:LPRINT:PG=PG+1:LC=8:RETURN
3190 ' *** READ DIR FOR DISK A ***
3200 FILES"A:*.*":GOTO 2290
3220 REM **** PRINTER SUBROUTINES ***
3230 SC$=CHR$(15):EC$=CHR$(18):SEC$=CHR$(14)+CHR$(15):EEC$=CHR$(18)+CHR$(20):SE$=CHR$(14):EE$=CHR$(20):SLG$=CHR$(27)+CHR$(32):SI$=CHR$(27)+CHR$(52):EI$=CHR$(27)+CHR$(53):SU$=CHR$(27)+CHR$(45)+CHR$(1):EU$=CHR$(27)+CHR$(45)+CHR$(0)
3340 SEX$=CHR$(27)+CHR$(87)+CHR$(1):EEX$=CHR$(27)+CHR$(87)+CHR$(0):SD$=CHR$(27)+CHR$(71):ED$=CHR$(27)+CHR$(72):RETURN
3390 ' *** ERROR RECOVERY FROM NULL FILES ***
3400 LOCATE 12,30:COLOR 26:PRINT"NO TESTWRITER FILES ON DISK A":FOR X=1 TO 1400:NEXT X:COLOR 7:GOTO 2280
65000 '*********************** SAVE ROUTINE **********************************
65100 SAVE"B:TESTWRIT.BAS"