Annotation of loncom/homework/essayresponse.pm, revision 1.1
1.1 ! albertel 1: # The LearningOnline Network with CAPA
! 2: # essay (ungraded) style responses
! 3: # 4/3 Guy
! 4: package Apache::essayresponse;
! 5: use strict;
! 6:
! 7: sub BEGIN {
! 8: &Apache::lonxml::register('Apache::essayresponse',('essayresponse'));
! 9: }
! 10:
! 11: sub start_essayresponse {
! 12: my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
! 13: my $id = &Apache::response::start_response($parstack,$safeeval);
! 14: return '';
! 15: }
! 16:
! 17: sub end_essayresponse {
! 18: my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
! 19: if ( $target eq 'grade' ) {
! 20: if ( defined $ENV{'form.submitted'}) {
! 21: my $id = $Apache::inputtags::response['-1'];
! 22: $Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.submission"}=$response;
! 23: $Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.awarddetail"}="SUBMITTED";
! 24:
! 25: }
! 26: }
! 27:
! 28: &Apache::response::end_response;
! 29: return '';
! 30: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>