[Aimmath-commit] AIM/WEB-INF/maple Aim.mpl,1.6,1.6.2.1
Brought to you by:
gustav_delius,
npstrick
From: Neil S. <nps...@us...> - 2004-10-14 10:59:07
|
Update of /cvsroot/aimmath/AIM/WEB-INF/maple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15359/WEB-INF/maple Modified Files: Tag: aim-xml Aim.mpl Log Message: Cosmetic tidying and an `aim/DoSOAP` stub Index: Aim.mpl =================================================================== RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/Aim.mpl,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** Aim.mpl 11 Mar 2004 13:39:42 -0000 1.6 --- Aim.mpl 14 Oct 2004 10:58:46 -0000 1.6.2.1 *************** *** 480,487 **** fi; - ### GWD - # DIST RETURN(subj['HomePage',accesslevel,"StudentID" = id,"Password" = password]); RETURN(subj['HomePageWithMarks',accesslevel,id,"StudentID" = id,"Password" = password]); - ### END GWD end ): --- 480,484 ---- *************** *** 500,508 **** param::table) local quizcontext,isguest,command,mode,notstrict,showsol,showmark, - # KM - # DIST focuslabel,oldfocuslabel; focuslabel,oldfocuslabel,history,historyfile,seed,seedfile, solnRevealed; - # END KM command := param["Command"]; --- 497,502 ---- *************** *** 513,525 **** quizcontext['QueryLink'] := subj['QueryLink']; - # KM solnRevealed := false; - # END KM if subj['IsRegistered',id] then quizcontext['Student'] := eval(subj['GetStudent',id]); quizcontext['StudentID'] := id; ! # KM ! # check if the student has previously shown the solutions on ! # this quiz, show them again until he requests a new version seedfile := cat(quiz['RootDir'],"/records/",id,"/seed.m"); if `OS/FileExists`(seedfile) and not command="NewQuizVersion" then --- 507,517 ---- quizcontext['QueryLink'] := subj['QueryLink']; solnRevealed := false; if subj['IsRegistered',id] then quizcontext['Student'] := eval(subj['GetStudent',id]); quizcontext['StudentID'] := id; ! ! # check if the student has previously shown the solutions on ! # this quiz, show them again until he requests a new version seedfile := cat(quiz['RootDir'],"/records/",id,"/seed.m"); if `OS/FileExists`(seedfile) and not command="NewQuizVersion" then *************** *** 533,537 **** end: fi: ! # END KM else quizcontext['Student'] := NULL; --- 525,529 ---- end: fi: ! else quizcontext['Student'] := NULL; *************** *** 554,565 **** quizcontext['Focused'] := evalb( - # KM - # DIST param["Focused"] = "true" and - # DIST command <> "NewQuizVersion" and - # DIST command <> "ShowQuizSolutions" param["Focused"] = "true") and not (isguest and member(command,{"ShowQuizSolutions","NewQuizVersion"})); - # END KM focuslabel := param["FocusLabel"]; --- 546,552 ---- *************** *** 567,575 **** focuslabel := ""; fi; - # KM if command = "NewQuizVersion" then focuslabel := "1"; fi: - # END KM quizcontext['FocusLabel'] := focuslabel; --- 554,560 ---- *************** *** 601,608 **** mode := quiz['Mode']; notstrict := evalb(mode <> "strict"); - # KM - # DIST showsol := evalb(command = "ShowQuizSolutions"); showsol := evalb((command = "ShowQuizSolutions") or solnRevealed); - # END KM if quizcontext['AfterDueDate'] then # If a guest visits after the due date, we just show the questions --- 586,590 ---- *************** *** 642,665 **** quizcontext['UseRecordedSeed'] := evalb(not(isguest or (command = "NewQuizVersion"))); - # KM - # DIST quizcontext['UseSeedParameter'] := isguest; quizcontext['UseSeedParameter'] := evalb(isguest and not(command = "NewQuizVersion")); - # END KM quizcontext['GenerateSeed'] := evalb(isguest or (command = "NewQuizVersion")); quizcontext['ReportSeed'] := isguest; ! quizcontext['RecordSeed'] := ! # KM ! # DIST evalb(not(isguest) and (command = "NewQuizVersion")); ! not isguest; ! # DIST quizcontext['DeleteSeed'] := showsol; quizcontext['DeleteSeed'] := evalb(command = "NewQuizVersion"); - # END KM ! # GWD: If the optional parameter "SeedPassword" is set to ! # the subject password then the seed given by the parameter ! # "Seed" should be used. if (assigned(param["SeedPassword"]) and assigned(param["Seed"])) then if (subj['AdminPassword'] = param["SeedPassword"]) then --- 624,639 ---- quizcontext['UseRecordedSeed'] := evalb(not(isguest or (command = "NewQuizVersion"))); quizcontext['UseSeedParameter'] := evalb(isguest and not(command = "NewQuizVersion")); quizcontext['GenerateSeed'] := evalb(isguest or (command = "NewQuizVersion")); quizcontext['ReportSeed'] := isguest; ! quizcontext['RecordSeed'] := not(isguest); quizcontext['DeleteSeed'] := evalb(command = "NewQuizVersion"); ! # GWD: If the optional parameter "SeedPassword" is set to ! # the subject password then the seed given by the parameter ! # "Seed" should be used. if (assigned(param["SeedPassword"]) and assigned(param["Seed"])) then if (subj['AdminPassword'] = param["SeedPassword"]) then *************** *** 676,694 **** quizcontext['InviteSolutions'] := evalb(mode = "practice" and not(showsol)); ! # KM ! # This line has no effect ! # DIST quizcontext['InviteNewVersion'] := ! # DIST evalb(mode = "practice"); ! # END KM quizcontext['InviteNewVersion'] := showsol; quizcontext['InviteNewQuiz'] := true; ########### - # KM if command = "NewQuizVersion" then quizcontext['AcceptAnswers'] := false; quizcontext['UseRecordedAnswers'] := false; elif solnRevealed or command = "ShowQuizPage" then - # DIST if command = "ShowQuizPage" then - # END KM quizcontext['AcceptAnswers'] := false; quizcontext['UseRecordedAnswers'] := not(isguest); --- 650,661 ---- quizcontext['InviteSolutions'] := evalb(mode = "practice" and not(showsol)); ! quizcontext['InviteNewVersion'] := showsol; quizcontext['InviteNewQuiz'] := true; ########### if command = "NewQuizVersion" then quizcontext['AcceptAnswers'] := false; quizcontext['UseRecordedAnswers'] := false; elif solnRevealed or command = "ShowQuizPage" then quizcontext['AcceptAnswers'] := false; quizcontext['UseRecordedAnswers'] := not(isguest); *************** *** 710,717 **** quizcontext['ShowPrevious'] := true; quizcontext['ShowFeedback'] := showmark; - # KM - # DIST quizcontext['ShowMark'] := showmark; quizcontext['ShowMark'] := showmark and not isguest; - # END KM quizcontext['ShowRightAnswer'] := showsol; quizcontext['ShowSolution'] := showsol; --- 677,681 ---- *************** *** 759,765 **** eval(`aim/MakeQuizContext`(subj,quiz,id,password,param)); - # KM - # had to move these lines from the bottom of the proc - # to here in order to accomodate SolutionsRevealed modes if quizcontext['DeleteSeed'] then traperror( --- 723,726 ---- *************** *** 767,771 **** sprintf("%s/records/%s/oldseed.m",quiz['RootDir'],id))); fi; - # END KM # find the seed to use for randomization --- 728,731 ---- *************** *** 843,850 **** od; fi; - # KM elif not quizcontext['AcceptAnswers'] then rawtable := table([]); - # END KM else rawtable := eval(param); --- 803,808 ---- *************** *** 858,866 **** if quizcontext['SaveHistory'] then - # KM if command = "ShowQuizSolutions" then eval(quizinstance['History'])['SolutionsRevealed'] := true; fi: - # END KM historyfile := sprintf("%s/records/%s/%A.m",quiz['RootDir'],id,seed); --- 816,822 ---- *************** *** 868,878 **** fi; - # KM - # DIST if quizcontext['DeleteSeed'] then - # DIST traperror( - # DIST `OS/Rename`(sprintf("%s/records/%s/seed.m",quiz['RootDir'],id), - # DIST sprintf("%s/records/%s/oldseed.m",quiz['RootDir'],id))); - # DIST fi; - # END KM RETURN(quizinstance['Show',quizcontext]); end --- 824,827 ---- *************** *** 890,893 **** --- 839,850 ---- ###################################################################### + `Package/Assign`( + `aim/DoSOAP`::string, + "", + proc(s::string) + printf("<aim-response>\n%s\n</aim-response>\n",s); + end + ): + EndPackage(): |