[LON-CAPA-cvs] cvs: loncom /interface lonprintout.pm
foxr
lon-capa-cvs@mail.lon-capa.org
Tue, 06 Sep 2005 09:54:24 -0000
foxr Tue Sep 6 05:54:24 2005 EDT
Modified files:
/loncom/interface lonprintout.pm
Log:
Add choicefunc to filter out sequences that don't have selectable
reseources from print in selected sequence.
For enhancement request 2736
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.390 loncom/interface/lonprintout.pm:1.391
--- loncom/interface/lonprintout.pm:1.390 Thu Sep 1 14:35:15 2005
+++ loncom/interface/lonprintout.pm Tue Sep 6 05:54:21 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.390 2005/09/01 18:35:15 albertel Exp $
+# $Id: lonprintout.pm,v 1.391 2005/09/06 09:54:21 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2322,6 +2322,8 @@
<nextstate>CHOOSE_FROM_ANY_SEQUENCE</nextstate>
<filterfunc>return \$res->is_sequence;</filterfunc>
<valuefunc>return $urlValue;</valuefunc>
+ <choicefunc>return \$res->hasResource(\$res,sub { return !\$_[0]->is_sequence() },0,0);
+ </choicefunc>
<option text='Newpage' variable='FINISHPAGE' />
</resource>
</state>