--- loncom/interface/loncommon.pm 2014/03/17 02:45:25 1.1182 +++ loncom/interface/loncommon.pm 2014/04/25 17:56:43 1.1187 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1182 2014/03/17 02:45:25 raeburn Exp $ +# $Id: loncommon.pm,v 1.1187 2014/04/25 17:56:43 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1316,8 +1316,10 @@ sub helpLatexCheatsheet { .&help_open_topic('Other_Symbols',&mt('Other Symbols'),$stayOnPage,undef,600) .''; unless ($not_author) { - $out .= ' ' - .&help_open_topic('Authoring_Output_Tags',&mt('Output Tags'),$stayOnPage,undef,600) + $out .= '' + .&help_open_topic('Authoring_Output_Tags',&mt('Output Tags'),$stayOnPage,undef,600) + .' ' + .&help_open_topic('Authoring_Multilingual_Problems',&mt('How to create problems in different languages'),$stayOnPage,undef,600) .''; } $out .= ''; # End cheatsheet @@ -9427,7 +9429,14 @@ sub personal_data_fieldtitles { sub sorted_inst_types { my ($dom) = @_; - my ($usertypes,$order) = &Apache::lonnet::retrieve_inst_usertypes($dom); + my ($usertypes,$order); + my %domdefaults = &Apache::lonnet::get_domain_defaults($dom); + if (ref($domdefaults{'inststatus'}) eq 'HASH') { + $usertypes = $domdefaults{'inststatus'}{'inststatustypes'}; + $order = $domdefaults{'inststatus'}{'inststatusorder'}; + } else { + ($usertypes,$order) = &Apache::lonnet::retrieve_inst_usertypes($dom); + } my $othertitle = &mt('All users'); if ($env{'request.course.id'}) { $othertitle = &mt('Any users'); @@ -10936,7 +10945,7 @@ sub check_for_upload { if (($current_disk_usage + $filesize) > $disk_quota){ my $msg = '

'. &mt('Unable to upload [_1]. (size = [_2] kilobytes). Disk quota will be exceeded.',''.$fname.'',$filesize).'

'. - '
'.&mt('Disk quota is [_1] kilobytes. Your current disk usage is [_2] kilobytes.',$disk_quota,$current_disk_usage); + '

'.&mt('Disk quota is [_1] kilobytes. Your current disk usage is [_2] kilobytes.',$disk_quota,$current_disk_usage).'

'; return ('will_exceed_quota',$msg); } elsif ($found_file) { if ($locked_file) { @@ -14873,7 +14882,7 @@ sub build_filters { } $cloneableonlyform = ''.(' 'x3).''; if ($formname eq 'ccrs') { - $cloneabletitle = &mt('Cloneable for').' '.$cloneruname.':'.$clonerudom; + $cloneabletitle = &mt('Cloneable for [_1]',$cloneruname.':'.$clonerudom); } else { $cloneabletitle = &mt('Cloneable by you'); } @@ -15054,11 +15063,12 @@ sub timebased_select_form { =item * &js_changer() Create script tag containing Javascript used to submit course search form -when course type or domain is changed. +when course type or domain is changed, and also to hide 'Searching ...' on +page load completion for page showing search result. Inputs: None -Returns: markup containing updateFilters() javascript function. +Returns: markup containing updateFilters() and hideSearching() javascript functions. Side Effects: None @@ -15074,6 +15084,14 @@ function updateFilters(caller) { } document.filterpicker.submit(); } + +function hideSearching() { + if (document.getElementById('searching')) { + document.getElementById('searching').style.display = 'none'; + } + return; +} + // ]]>