Hi HK,
Is there a function call that returns the problem type (like problem, exam,
survey ...)?
You can call the ¶meter_setting() function.
It takes two arguments: $which and $partid (the first is required, the
second is optional), and returns the value currently in effect for
$which.
To retrieve the problem type, the first argument passed to the
function will be 'type'.
If you do not pass a partID, it will default to using the partID for
the problem (i.e., part 0).
So, put this in a script block within a problem part:
$type = ¶meter_setting('type',$external::part);
if you will be setting a part-specific question type, or in a script
block outside any part tags if you will be setting a specific question
type for the problem as a whole.
Note: this is equivalent to the &EXT call:
$type = &EXT("resource.$external::part.type");
Stuart Raeburn
LON-CAPA Academic Consortium
Quoting "H. K. Ng" <h...@fsu.edu>:
Hi,
Is there a function call that returns the problem type (like problem, exam,
survey ...)?
Regards,
-hk
_______________________________________________
LON-CAPA-users mailing list
LON-CAPA-users@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-users