version 1.157, 2007/07/20 23:52:55
|
version 1.159, 2007/07/20 23:57:06
|
Line 65 use Apache::lonnet;
|
Line 65 use Apache::lonnet;
|
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::longroup; |
use Apache::longroup; |
use lib '/home/httpd/lib/perl/'; |
|
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
|
|
my $loginscript; # piece of javascript used in two separate instances |
my $loginscript; # piece of javascript used in two separate instances |
Line 429 ENDSCRIPT
|
Line 428 ENDSCRIPT
|
var checkcurr = str.match(re1); |
var checkcurr = str.match(re1); |
if (checkcurr != null) { |
if (checkcurr != null) { |
if (document.cu.elements[i-1].checked == true) { |
if (document.cu.elements[i-1].checked == true) { |
var re2 = /^currsec_[a-zA-Z0-9]+_[a-zA-Z0-9]+_(\\w+)\$/; |
var match = str.split('_'); |
match = re2.exec(str); |
var role = match[3]; |
var role = match[1]; |
|
if (role == 'cc') { |
if (role == 'cc') { |
alert("Section designations do not apply to Course Coordinator roles.\\nA course coordinator role will be added with access to all sections."); |
alert("Section designations do not apply to Course Coordinator roles.\\nA course coordinator role will be added with access to all sections."); |
} |
} |
Line 1346 END
|
Line 1344 END
|
if ($2 eq 'st') { |
if ($2 eq 'st') { |
$1=~m{^/($match_domain)/($match_courseid)}; |
$1=~m{^/($match_domain)/($match_courseid)}; |
my $cid=$1.'_'.$2; |
my $cid=$1.'_'.$2; |
$r->print(&mt('Drop from classlist').': <b>'. |
my $user = $env{'form.ccuname'}.':'.$env{'form.ccdomain'}; |
&Apache::lonnet::critical('put:'. |
my $result = |
$env{'course.'.$cid.'.domain'}.':'. |
&Apache::lonnet::cput('classlist', |
$env{'course.'.$cid.'.num'}.':classlist:'. |
{ $user => $now }, |
&escape($env{'form.ccuname'}.':'. |
$env{'course.'.$cid.'.domain'}, |
$env{'form.ccdomain'}).'='. |
$env{'course.'.$cid.'.num'}); |
&escape($now.':'), |
$r->print(&mt('Drop from classlist: [_1]', |
$env{'course.'.$cid.'.home'}).'</b><br />'); |
'<b>'.$result.'</b>').'<br />'); |
} |
} |
} |
} |
if ($key=~m{^form\.rev\:([^_]+)_cr\.cr/($match_domain)/($match_username)/(\w+)$}) { |
if ($key=~m{^form\.rev\:([^_]+)_cr\.cr/($match_domain)/($match_username)/(\w+)$}) { |
Line 1373 END
|
Line 1371 END
|
if ($2 eq 'st') { |
if ($2 eq 'st') { |
$1=~m{^/($match_domain)/($match_courseid)}; |
$1=~m{^/($match_domain)/($match_courseid)}; |
my $cid=$1.'_'.$2; |
my $cid=$1.'_'.$2; |
$r->print(&mt('Drop from classlist').': <b>'. |
my $user = $env{'form.ccuname'}.':'.$env{'form.ccdomain'}; |
&Apache::lonnet::critical('put:'. |
my $result = |
$env{'course.'.$cid.'.domain'}.':'. |
&Apache::lonnet::cput('classlist', |
$env{'course.'.$cid.'.num'}.':classlist:'. |
{ $user => $now }, |
&escape($env{'form.ccuname'}.':'. |
$env{'course.'.$cid.'.domain'}, |
$env{'form.ccdomain'}).'='. |
$env{'course.'.$cid.'.num'}); |
&escape($now.':'), |
$r->print(&mt('Drop from classlist: [_1]', |
$env{'course.'.$cid.'.home'}).'</b><br />'); |
'<b>'.$result.'</b>').'<br />'); |
} |
} |
} |
} |
if ($key=~m{^form\.del\:([^_]+)_cr\.cr/($match_domain)/($match_username)/(\w+)$}) { |
if ($key=~m{^form\.del\:([^_]+)_cr\.cr/($match_domain)/($match_username)/(\w+)$}) { |