--- loncom/interface/loncommon.pm 2013/03/19 00:49:27 1.1075.2.32
+++ loncom/interface/loncommon.pm 2012/05/24 14:20:53 1.1078
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1075.2.32 2013/03/19 00:49:27 raeburn Exp $
+# $Id: loncommon.pm,v 1.1078 2012/05/24 14:20:53 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -67,13 +67,9 @@ use Apache::lonhtmlcommon();
use Apache::loncoursedata();
use Apache::lontexconvert();
use Apache::lonclonecourse();
-use Apache::lonuserutils();
-use Apache::lonuserstate();
use LONCAPA qw(:DEFAULT :match);
use DateTime::TimeZone;
use DateTime::Locale::Catalog;
-use Authen::Captcha;
-use Captcha::reCAPTCHA;
# ---------------------------------------------- Designs
use vars qw(%defaultdesign);
@@ -528,8 +524,7 @@ ENDAUTHORBRW
}
sub coursebrowser_javascript {
- my ($domainfilter,$sec_element,$formname,$role_element,$crstype,
- $credits_element) = @_;
+ my ($domainfilter,$sec_element,$formname,$role_element,$crstype) = @_;
my $wintitle = 'Course_Browser';
if ($crstype eq 'Community') {
$wintitle = 'Community_Browser';
@@ -592,9 +587,8 @@ sub coursebrowser_javascript {
}
$id_functions
ENDSTDBRW
- if (($sec_element ne '') || ($role_element ne '') || ($credits_element ne '')) {
- $output .= &setsec_javascript($sec_element,$formname,$role_element,
- $credits_element);
+ if (($sec_element ne '') || ($role_element ne '')) {
+ $output .= &setsec_javascript($sec_element,$formname,$role_element);
}
$output .= '
// ]]>
@@ -751,7 +745,7 @@ ENDUSERBRW
}
sub setsec_javascript {
- my ($sec_element,$formname,$role_element,$credits_element) = @_;
+ my ($sec_element,$formname,$role_element) = @_;
my (@courserolenames,@communityrolenames,$rolestr,$courserolestr,
$communityrolestr);
if ($role_element ne '') {
@@ -846,14 +840,6 @@ function setRole(crstype) {
}
|;
}
- if ($credits_element) {
- $setsections .= qq|
-function setCredits(defaultcredits) {
- document.$formname.$credits_element.value = defaultcredits;
- return;
-}
-|;
- }
return $setsections;
}
@@ -899,14 +885,10 @@ sub check_uncheck_jscript {
function checkAll(field) {
if (field.length > 0) {
for (i = 0; i < field.length; i++) {
- if (!field[i].disabled) {
- field[i].checked = true;
- }
+ field[i].checked = true ;
}
} else {
- if (!field.disabled) {
- field.checked = true;
- }
+ field.checked = true
}
}
@@ -1008,7 +990,6 @@ sub select_language {
$langchoices{$code} = &plainlanguagedescription($id);
}
}
- %langchoices = &Apache::lonlocal::texthash(%langchoices);
return &select_form($selected,$name,\%langchoices);
}
@@ -1040,12 +1021,6 @@ linked_select_forms takes the following
=item * $menuorder, the order of values in the first menu
-=item * $onchangefirst, additional javascript call to execute for an onchange
- event for the first
generation
- no_inline_link -> if true and in remote mode, don't show the
- 'Switch To Inline Menu' link
no_auto_mt_title -> prevent &mt()ing the title arg
inherit_jsmath -> when creating popup window in a page,
should it have jsmath forced on by the
current page
bread_crumbs -> Array containing breadcrumbs
bread_crumbs_component -> if exists show it as headline else show only the breadcrumbs
- group -> includes the current group, if page is for a
- specific group
=back
@@ -7460,7 +7281,7 @@ sub start_page {
#&Apache::lonnet::logthis("start_page ".join(':',caller(0)));
$env{'internal.start_page'}++;
- my ($result,@advtools);
+ my $result;
if (! exists($args->{'skip_phases'}{'head'}) ) {
$result .= &xml_begin() . &headtag($title, $head_extra, $args);
@@ -7477,8 +7298,7 @@ sub start_page {
$args->{'function'}, $args->{'add_entries'},
$args->{'only_body'}, $args->{'domain'},
$args->{'force_register'}, $args->{'no_nav_bar'},
- $args->{'bgcolor'}, $args->{'no_inline_link'},
- $args, \@advtools);
+ $args->{'bgcolor'}, $args);
}
}
@@ -7507,10 +7327,6 @@ sub start_page {
&Apache::lonhtmlcommon::add_breadcrumb($crumb);
}
}
- # if @advtools array contains items add then to the breadcrumbs
- if (@advtools > 0) {
- &Apache::lonmenu::advtools_crumbs(@advtools);
- }
#if bread_crumbs_component exists show it as headline else show only the breadcrumbs
if(exists($args->{'bread_crumbs_component'})){
@@ -7518,11 +7334,6 @@ sub start_page {
}else{
$result .= &Apache::lonhtmlcommon::breadcrumbs();
}
- } elsif (($env{'environment.remote'} eq 'on') &&
- ($env{'form.inhibitmenu'} ne 'yes') &&
- ($env{'request.noversionuri'} =~ m{^/res/}) &&
- ($env{'request.noversionuri'} !~ m{^/res/adm/pages/})) {
- $result .= '