[LON-CAPA-users] accessing timestamps in problems

Guy Albertelli II lon-capa-users@mail.lon-capa.org
Thu, 27 May 2004 13:11:12 -0400 (EDT)

Hi Hon-Kie,

> > > > &EXT("user.resource.resource.1:timestamp");
> >
> >Ooops, should be:
> >
> >&EXT("user.resource.1:timestamp");
> How do you specify a partid? Seems to be missing in the above call. -hk 

Aye, that is why I said it would be difficult to acheive what he

The timestamps are for when a submission occured. (Actually when it
was stored, but those should be nearly the same.)

So you need to figure out on which submission the got it correct. And
then you use the timestamp of that submission.


my $whichversion;
for (my $version=1;$version<&EXT('user.resource.version');$version++) {
    my $solved=&EXT("user.resource.resource.$partid.solved");
    if ($solved =~ /^correct/) {

my $timestamp;
if ($whichversion) { $timestamp=&EXT("user.resource.$version:timestamp"); }

But once again if this is do interval based time control, I really
really really really urge not to do this.

I got about 70% of the functionality done last night. It _will_ be in

If it is for someother functionality, I am curious to know what it is,
it might be easy for me to extend how an existing tag already works.

guy@albertelli.com  LON-CAPA Developer  0-7-4-3-