--- loncom/interface/lonhelper.pm 2006/12/12 20:41:08 1.159 +++ loncom/interface/lonhelper.pm 2006/12/18 21:48:47 1.160 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # .helper XML handler to implement the LON-CAPA helper # -# $Id: lonhelper.pm,v 1.159 2006/12/12 20:41:08 albertel Exp $ +# $Id: lonhelper.pm,v 1.160 2006/12/18 21:48:47 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -81,25 +81,28 @@ State tags are also required to have an human name of the state, and will be displayed as the header on top of the screen for the user. +State tags may also optionally have an attribute "help" which should be +the filename of a help file, this will add a blue ? to the title. + =head2 Example Helper Skeleton An example of the tags so far: - + -Of course this does nothing. In order for the wizard to do something, it is -necessary to put actual elements into the wizard. Documentation for each +Of course this does nothing. In order for the helper to do something, it is +necessary to put actual elements into the helper. Documentation for each of these elements follows. =head1 Creating a Helper With Code, Not XML -In some situations, such as the printing wizard (see lonprintout.pm), +In some situations, such as the printing helper (see lonprintout.pm), writing the helper in XML would be too complicated, because of scope issues or the fact that the code actually outweighs the XML. It is possible to create a helper via code, though it is a little odd. @@ -334,7 +337,8 @@ sub start_state { } Apache::lonhelper::state->new($token->[2]{'name'}, - $token->[2]{'title'}); + $token->[2]{'title'}, + $token->[2]{'help'}); return ''; } @@ -577,6 +581,7 @@ sub display { # Phase 4: Display. my $stateTitle=&mt($state->title()); + my $stateHelp= $state->help(); my $browser_searcher_js = '