RE: Fw: [Aimmath-developers] copying questions
Brought to you by:
gustav_delius,
npstrick
From: Greg G. <gr...@ma...> - 2003-09-14 07:18:10
|
On Sun, 14 Sep 2003, Gustav W Delius wrote: > > > Maybe I am doing something awfully wrong but the problem is that the > > > subject files (the .m ones at least) because (I guess) they are > > > written from Maple as a blob when you change the directory using a > > > ascii manipulation the size is messed up and ... when > > > Maple tries to read them again it cant. > > This is a very weird effect that I can not reproduce on my Windows machines. > I can change from one directory to a different one with a filename of a > different length and there are no problems. Maybe it is a Unix only problem? > What symptoms do you observe that indicate that Maple can't read the > modified files? Has anyone with Windows got a similar problem with renaming? Just to be clear, this is the sort of thing one *can* do: Suppose you have a quiz in a subject called test. Then one can do: 1. Let's say the subject is subj. Then in WEB-INF/root/subjects/subj/quizzes one can do a recursive copy of test/ to tes2/, say: cp -r test tes2 2. Now one has a directory tes2/ with identical contects to test/ There is a .m file in tes2/ now called test.m This needs to be tes2.m. So do: mv test.m tes2.m 3. Now this will work already but address thinks in the test/ directory So you need to edit the (appropriate) occurrences of test in tes2.m to be tes2 I3Cache/FileContents=%)aim/QuizG%&falseGE\[l-%(RootDirGQ`o/usr/local/tomcat/web apps/AiM/WEB-INF/root/subjects/subj/quizzes/test6"%.QuestionNamesG7(Q*Question1 ^^^^ F)Q*Question2F)Q,Symboltest1F)Q,Symboltest2F)Q'test_3F)Q'test_4F)%(DueDateGF)%' AccessGQ$allF)%)SelectorGF)%,SubjectNameGQ%testF)%%NameGF7%1ModificationTimeG"+ ^^^^ `F^j5%&TitleGF7%%ModeGQ)practiceF)%2RandQuestionOrderGF%%'WeightG$"#5!""F) The ones underlined need to be changed to tes2. Observe that each of these lines has 79 characters exactly. I guess the 80th is an invisible newline character. You will find that doing this at least on Linux all you have to do is unhide the quiz and it works. However if you try the same procedure but with a new directory name that is of a different length to test then AIM says it can't load the quiz, and that's even if you adjust each line to have exactly 79 characters in it. It seems that the length of the file is recorded somewhere or something. Manolis's message referred to copying a whole subject, but I'm sure the same mechanism applies at the subject level as it does at the quiz level. Regards, Greg |