--- loncom/interface/lonhtmlcommon.pm 2008/11/26 17:11:55 1.185 +++ loncom/interface/lonhtmlcommon.pm 2009/04/25 20:22:07 1.209 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.185 2008/11/26 17:11:55 schafran Exp $ +# $Id: lonhtmlcommon.pm,v 1.209 2009/04/25 20:22:07 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -62,6 +62,29 @@ use Apache::lonlocal; use Apache::lonnet; use LONCAPA; +############################################## +############################################## + +=pod + +=item confirm_success + +Successful completion of an operation message + +=cut + +sub confirm_success { + my ($message,$failure)=@_; + if ($failure) { + return ''. + $message. + ' '; + } else { + return ''. + $message. + ' '; + } +} ############################################## ############################################## @@ -285,7 +308,7 @@ sub checkbox { $Str .= 'value="'.$value.'"'; } if ($checked) { - $Str .= ' checked="1"'; + $Str .= ' checked="checked"'; } $Str .= ' />'; return $Str; @@ -307,7 +330,7 @@ sub radio { $Str .= 'value="'.$value.'"'; } if ($checked eq $value) { - $Str .= ' checked="1"'; + $Str .= ' checked="checked"'; } $Str .= ' />'; return $Str; @@ -467,7 +490,7 @@ document.$formname.$dname\_year.value, } ENDJS - $result .= ' '; + $result .= ' '; my $monthselector = qq{\n|; + \n|; +