# Some way to identify the source of a notebook file?

Is there a way to tell where a Mathematica file came from, meaning some type of machine ID (yes, I know about \$MachineID). I want to be able to identify students who are sharing files, i.e. one student creating the file and giving it to others. Anti-cheating is what I'm trying to accomplish.

-

Mathematica notebook files are plain text files. This means that you can open them up with a text editor and check their contents.

Notebook files don't seem to contain any information that could be used to track their source (the computer on which they were created). What it does contain, and you might be able to use, is the creation and modification dates of all cells (CellChangeTimes cell option).

You can access this information using the Front End as well. Go to Cell -> Notebook History.... It will give you a window that will show the modification times of each cell (an interval for each single edit that happened in the notebook's lifetime), to 1-second precision. You can click a line in the graph view to select that cell and see the creation and last modification time, or you can click "Copy raw data" to get all the data (use DateList to convert them to something more human readable from the AbsoluteTime format).

If two homework submissions have the same modification times, up to the second, then it's likely they have a common source.

With a bit of programming you can automate the process of checking all submissions against each other, and selecting those whose first few modification times coincide.

-
I tend to turn this feature off (together file the file outline cache) for those notebooks that I keep under version control. So if the file is missing this information, that's no proof of cheating. –  Szabolcs May 4 '12 at 13:35
Of course, all that checking will not help against classic Copy&Paste ... –  celtschk May 4 '12 at 13:36
@celtschk I just tried, and it seems that cell modification times are copied as well. So if full cells are copied, the time stamps are preserved. If only the contents of cells are copied, then they're not. –  Szabolcs May 4 '12 at 13:38