Annotation of loncom/interface/portfolio.pm, revision 1.1

1.1     ! banghart    1: package Apache::portfolio;
        !             2: use strict;
        !             3: use Apache::Constants qw(:common :http);
        !             4: # use Apache::loncommon;
        !             5: use Apache::lonnet;
        !             6: # use Apache::lontexconvert;
        !             7: # use Apache::lonfeedback;
        !             8: # use Apache::lonlocal;
        !             9: 
        !            10: sub handler {
        !            11: 	my $r=@_[0];
        !            12: 	$r->content_type('text/html');
        !            13: 	$r->send_http_header;
        !            14: 	return OK if $r->header_only;
        !            15: 	$r->print("the portfolio handler is in use by $ENV{'user.name'} looking for "
        !            16: 		.$r->uri."<br />");
        !            17: 	my $file=&Apache::lonnet::filelocation("",$r->uri);	
        !            18: 	my $contents=&Apache::lonnet::getfile($file);
        !            19: #	$r->print($contents);
        !            20: 
        !            21: 	$r->print("here's the form<br />");
        !            22: 	$r->print('<form method=post enctype="multipart/form-data" action="'.$r->uri.'">');
        !            23: 	$r->print('<input type=submit value="upload">');
        !            24: 	$r->print('<input name="saywhat" type="file">');
        !            25: 	$r->print('</form>');
        !            26: 	return OK;
        !            27: #	my $something = "this is something<br />";
        !            28: #	my (undef,undef,$cdom,$cnum)=split(/\//,$r->uri);
        !            29: # Is this even a user?
        !            30: #    if (&Apache::lonnet::homeserver($cnum,$cdom) eq 'no_host') {
        !            31: #	$r->print('</head><body>'.
        !            32: #		  &mt('No user information available').'</body></html>');
        !            33: #       return OK;
        !            34: #    }
        !            35: 
        !            36: 
        !            37: 
        !            38: #	$r->print($something);
        !            39: #	$r->print($r);
        !            40: #	$r->print($ENV{'user.name'});
        !            41: #	$r->print("<br />should have printed username above<br />");
        !            42: #	my $key = "";
        !            43: #	foreach my $key (sort(keys(%ENV))) {
        !            44: #		$r->print("$key is $ENV{$key} <br />\n");
        !            45: #	}
        !            46: #
        !            47: #	my @envkeys = keys(%ENV);	
        !            48: #	my $i = 0;
        !            49: #	for ($i = 0; $i < 30; $i++){
        !            50: #		$r->print("Key $i is $envkeys[$i] <br />");
        !            51: #	}
        !            52: #	return OK;
        !            53: }
        !            54: 1;
        !            55: __END__

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>