[LON-CAPA-dev] Extracting problems from page or sequence

Jerf lon-capa-dev@mail.lon-capa.org
Thu, 20 Feb 2003 11:48:49 -0500


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I wrote:
| I am indeed referring to the 'bighash' numbers, but I *think* that they
| are both the same thing, so extracting the ID from the symbolic name
| might work too.

Nope, I was wrong. They aren't the same, as I just found out in my own work.

If you have the source of the map, and the bighash tied into %hash, you
want something like this:

$map_id = $hash{'ids_' . &Apache::lonnet::clutter($mapSrc)};
my $map = $navmap->getById($map_id);

After that, $map->map_start() and $map->map_finish() will give the start
and end resources, which can be passed to the iterator, as described
before. I'm doing something similar right now so I'm reasonably certain
this will work. ;-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+VQbxPaYWE58at8cRAjq4AKCtZ+6W/CAPbI3lfNTVh4lVDcPNWgCeKUIB
B2us1CuDiw8teGzCE2ghzPU=
=tlEx
-----END PGP SIGNATURE-----