Re: CellAutoDelete
- To: mathgroup at smc.vnet.net
- Subject: [mg25188] Re: CellAutoDelete
- From: paulh at wolfram.com (P.J. Hinton)
- Date: Tue, 12 Sep 2000 21:24:30 -0400 (EDT)
- Organization: "Wolfram Research, Inc."
- References: <8pkki5$m3q@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <8pkki5$m3q at smc.vnet.net>,
"Tom De Vries" <tdevries at shop.westworld.ca> writes:
> I am using some Mathematica programs to generate math tests for my classes.
> They create questions and answers "randomly" so I can create different
> versions of the same test to avoid students comparing answers.
>
> I wonder if anyone could help with this small problem. Since the tests are
> created by Mathematica, the cells all have the attribute
> CellAutoOverwrite->True. When a student tries to do a calculation in the
> test file, the cells below the calculation get deleted, or the output cell
> ends up in a different place in the file than expected.
>
> I tried selecting all the cells in the file and changing this cell attribute
> to False, but when the student opens the file, it is changed back to True
> again...!? I have my file with all the cells set to
> CellAutoOverwrite->False and a student just sent me back their work and
> all the cells are CellAutoOverwrite->True!! Has anyone had any experience
> with this, or could anyone suggest how to deal with this? The low tech
> solution has been to put a new text cell at the end of each question, and
> calculations done above this work fine.
I suspect that you are using CellPrint[] to create your cells. If you
are, then don't use it. Use NotebookWrite[] instead. This will spare
you the fate of CellAutoOverwrite.
NotebookWrite[
EvaluationNotebook[],
Cell["2+2",
"Input",
GeneratedCell -> False
]
]
creates a cell that looks like this:
Cell["2+2", "Input",
GeneratedCell->False]
--
P.J. Hinton
User Interface Programmer paulh at wolfram.com
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.