Annotation of loncom/homework/response.pm, revision 1.3
1.1 albertel 1: # The LearningOnline Network with CAPA
2: # various response type definitons response definition
3:
4: package Apache::response;
5: use strict;
6:
7: sub BEGIN {
1.3 ! albertel 8: &Apache::lonxml::register('Apache::response',('responseparam','caparesponse'));
1.1 albertel 9: }
10:
11: sub start_caparesponse {
12: require Apache::caparesponse;
13: import Apache::caparesponse;
14: my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
1.2 albertel 15: # print "\n<br>\nsimple caparesponse\n";
1.1 albertel 16: Apache::caparesponse::start_caparesponse($target,$token,$parstack,$parser,$safeeval,$style);;
1.2 albertel 17: return "";
1.3 ! albertel 18: }
! 19:
! 20: sub start_responseparam {
! 21: my ($target,$token,$parstack,$parser,$safeeval)=@_;
! 22: my $args='';
! 23: if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; }
! 24: my $default = &Apache::run::run("{$args;".'return $default}',$safeeval);
! 25: my $type = &Apache::run::run("{$args;".'return $type}',$safeeval);
! 26: my $value = &Apache::lonnet::EXT("resource.param.$type");
! 27: &Apache::lonxml::debug("$type has value :$value: and default :$default:");
! 28: if (!$value) {
! 29: $Apache::inputtags::params{$type}=$default;
! 30: } else {
! 31: $Apache::inputtags::params{$type}=$value;
! 32: }
! 33: return '';
! 34: }
! 35:
! 36: sub end_responseparam {
1.1 albertel 37: }
1.2 albertel 38:
1.1 albertel 39: 1;
40: __END__
41:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>