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

H. K. Ng lon-capa-dev@mail.lon-capa.org
Thu, 27 Feb 2003 15:23:48 -0500


At 10:13 AM 2/27/03 -0500, you wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>H. K. Ng wrote:
>| Two problems.
>|
>| 1.         my $parts = $curRes->parts();
>|
>| does not return anything?
>
>Returns a reference to a list containing the parts.
>
>On non-problems, it returns a reference to an empty list.
>
>I am not aware of any problems with this, so please let me know if you
>are still getting "nothing" back from ->parts(). (In perl, "nothing" is
>an ambiguous term. "undef"? Empty list? etc.)

I used
           for my $part (@{$parts}) {
             $result.='part='.$part.':<br>';
           }
and then print $result. Nothing is printed which implies that the list 
@{$parts} is empty.
It has to be as problem since it is tested with $curRes->is_problem().