Annotation of loncom/homework/essayresponse.pm, revision 1.2
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'];
1.2 ! albertel 22: my $response = $ENV{'form.HWVAL'.$Apache::inputtags::response['-1']};
! 23: if ( $response =~ /[^\s]/) {
! 24: $Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.submission"}=$response;
! 25: $Apache::lonhomework::results{"resource.$Apache::inputtags::part.$id.awarddetail"}="SUBMITTED";
! 26: }
1.1 albertel 27: }
28: }
29: &Apache::response::end_response;
30: return '';
31: }
1.2 ! albertel 32:
! 33: 1;
! 34: __END__
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>