--- loncom/interface/lonrequestcourse.pm 2018/03/23 01:01:21 1.103 +++ loncom/interface/lonrequestcourse.pm 2019/01/27 15:46:26 1.106 @@ -1,7 +1,7 @@ # The LearningOnline Network # Request a course # -# $Id: lonrequestcourse.pm,v 1.103 2018/03/23 01:01:21 raeburn Exp $ +# $Id: lonrequestcourse.pm,v 1.106 2019/01/27 15:46:26 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3371,14 +3371,14 @@ sub get_course_dom { return $env{'user.domain'}; } } - my (@possible_doms,%willtrust,%trustchecked); + my (@possible_doms,%willtrust); foreach my $type (@{$types}) { my $dom_str = $env{'environment.reqcrsotherdom.'.$type}; if ($dom_str ne '') { my @domains = split(',',$dom_str); foreach my $entry (@domains) { my ($extdom,$extopt) = split(':',$entry); - unless ($trustchecked{$extdom}) { + unless (exists($willtrust{$extdom})) { $willtrust{$extdom} = &Apache::lonnet::will_trust('reqcrs',$env{'user.domain'},$extdom); } if ($willtrust{$extdom}) { @@ -4330,9 +4330,10 @@ sub pending_validation_form { $buttontext = &mt('Create course'); } } + my $hostname = &Apache::lonnet::hostname($lonhost); my $protocol = $Apache::lonnet::protocol{$lonhost}; $protocol = 'http' if ($protocol ne 'https'); - my $crscreator = $protocol.'://'.&Apache::lonnet::hostname($lonhost).'/cgi-bin/createpending.pl'; + my $crscreator = $protocol.'://'.$hostname.'/cgi-bin/createpending.pl'; $output .= ''."\n". ''."\n". ''."\n". @@ -5098,6 +5099,9 @@ sub process_textbook_request { } else { $details->{dateshift} = ''; } + } elsif (($reqtype eq 'textbook') || ($reqtype eq 'template')) { + $details->{datemode} = 'delete'; + $details->{dateshift} = ''; } if ($details->{dateshift} ne '') { $details->{dateshift} =~ s/[^\d\.]+//g;