version 1.109, 2005/09/13 19:13:22
|
version 1.125.2.3, 2006/07/19 10:10:40
|
Line 64 use Apache::Constants qw(:common :http);
|
Line 64 use Apache::Constants qw(:common :http);
|
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Apache::longroup; |
|
use lib '/home/httpd/lib/perl/'; |
|
use LONCAPA; |
|
|
my $loginscript; # piece of javascript used in two separate instances |
my $loginscript; # piece of javascript used in two separate instances |
my $generalrule; |
my $generalrule; |
Line 116 sub authorpriv {
|
Line 119 sub authorpriv {
|
# =================================================================== Phase one |
# =================================================================== Phase one |
|
|
sub print_username_entry_form { |
sub print_username_entry_form { |
my $r=shift; |
my ($r) = @_; |
my $defdom=$env{'request.role.domain'}; |
my $defdom=$env{'request.role.domain'}; |
my @domains = &Apache::loncommon::get_domains(); |
my @domains = &Apache::loncommon::get_domains(); |
my $domform = &Apache::loncommon::select_dom_form($defdom,'ccdomain'); |
my $domform = &Apache::loncommon::select_dom_form($defdom,'ccdomain'); |
my $html=&Apache::lonxml::xmlbegin(); |
|
my $bodytag =&Apache::loncommon::bodytag('Create Users, Change User Privileges').&Apache::loncommon::help_open_menu('',undef,undef,'',282,'Instructor Interface'); |
|
my $selscript=&Apache::loncommon::studentbrowser_javascript(); |
my $selscript=&Apache::loncommon::studentbrowser_javascript(); |
|
my $start_page = |
|
&Apache::loncommon::start_page('Create Users, Change User Privileges', |
|
$selscript); |
|
|
my $sellink=&Apache::loncommon::selectstudent_link |
my $sellink=&Apache::loncommon::selectstudent_link |
('crtuser','ccuname','ccdomain'); |
('crtuser','ccuname','ccdomain'); |
my %existingroles=&my_custom_roles(); |
my %existingroles=&my_custom_roles(); |
Line 137 sub print_username_entry_form {
|
Line 142 sub print_username_entry_form {
|
'nr' => "Name of Role", |
'nr' => "Name of Role", |
'cre' => "Custom Role Editor" |
'cre' => "Custom Role Editor" |
); |
); |
|
my $help = &Apache::loncommon::help_open_menu(undef,undef,282,'Instructor Interface'); |
my $helpsiur=&Apache::loncommon::help_open_topic('Course_Change_Privileges'); |
my $helpsiur=&Apache::loncommon::help_open_topic('Course_Change_Privileges'); |
my $helpecpr=&Apache::loncommon::help_open_topic('Course_Editing_Custom_Roles'); |
my $helpecpr=&Apache::loncommon::help_open_topic('Course_Editing_Custom_Roles'); |
$r->print(<<"ENDDOCUMENT"); |
$r->print(<<"ENDDOCUMENT"); |
$html |
$start_page |
<head> |
|
<title>The LearningOnline Network with CAPA</title> |
|
$selscript |
|
</head> |
|
$bodytag |
|
<form action="/adm/createuser" method="post" name="crtuser"> |
<form action="/adm/createuser" method="post" name="crtuser"> |
<input type="hidden" name="phase" value="get_user_info"> |
<input type="hidden" name="phase" value="get_user_info"> |
<h2>$lt{siur}$helpsiur</h2> |
<h2>$lt{siur}$helpsiur</h2> |
Line 167 $lt{'nr'}: $choice <input type="text" si
|
Line 168 $lt{'nr'}: $choice <input type="text" si
|
</form> |
</form> |
ENDCUSTOM |
ENDCUSTOM |
} |
} |
$r->print('</body></html>'); |
$r->print(&Apache::loncommon::end_page()); |
|
} |
|
|
|
|
|
sub user_modification_js { |
|
my ($pjump_def,$dc_setcourse_code,$nondc_setsection_code,$groupslist)=@_; |
|
|
|
return <<END; |
|
<script type="text/javascript" language="Javascript"> |
|
|
|
function pclose() { |
|
parmwin=window.open("/adm/rat/empty.html","LONCAPAparms", |
|
"height=350,width=350,scrollbars=no,menubar=no"); |
|
parmwin.close(); |
|
} |
|
|
|
$pjump_def |
|
$dc_setcourse_code |
|
|
|
function dateset() { |
|
eval("document.cu."+document.cu.pres_marker.value+ |
|
".value=document.cu.pres_value.value"); |
|
pclose(); |
|
} |
|
|
|
$nondc_setsection_code |
|
|
|
</script> |
|
END |
} |
} |
|
|
# =================================================================== Phase two |
# =================================================================== Phase two |
Line 200 sub print_user_modification_page {
|
Line 229 sub print_user_modification_page {
|
$ccdomain=~s/\W//g; |
$ccdomain=~s/\W//g; |
my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition(); |
my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition(); |
my $dc_setcourse_code = ''; |
my $dc_setcourse_code = ''; |
my $loaditem; |
my $nondc_setsection_code = ''; |
|
|
|
my %loaditem; |
|
|
|
my $groupslist; |
|
my %curr_groups = &Apache::longroup::coursegroups(); |
|
if (%curr_groups) { |
|
$groupslist = join('","',sort(keys(%curr_groups))); |
|
$groupslist = '"'.$groupslist.'"'; |
|
} |
|
|
if ($env{'request.role'} =~ m-^dc\./(\w+)/$-) { |
if ($env{'request.role'} =~ m-^dc\./(\w+)/$-) { |
my $dcdom = $1; |
my $dcdom = $1; |
$loaditem = qq|OnLoad="document.cu.coursedesc.value=''"|; |
$loaditem{'onload'} = "document.cu.coursedesc.value='';"; |
|
my @rolevals = ('st','ta','ep','in','cc'); |
|
my (@crsroles,@grproles); |
|
for (my $i=0; $i<@rolevals; $i++) { |
|
$crsroles[$i]=&Apache::lonnet::plaintext($rolevals[$i],'Course'); |
|
$grproles[$i]=&Apache::lonnet::plaintext($rolevals[$i],'Group'); |
|
} |
|
my $rolevalslist = join('","',@rolevals); |
|
my $crsrolenameslist = join('","',@crsroles); |
|
my $grprolenameslist = join('","',@grproles); |
|
my $pickcrsfirst = '<--'.&mt('Pick course first'); |
|
my $pickgrpfirst = '<--'.&mt('Pick group first'); |
$dc_setcourse_code = <<"ENDSCRIPT"; |
$dc_setcourse_code = <<"ENDSCRIPT"; |
function setCourse() { |
function setCourse() { |
var course = document.cu.dccourse.value; |
var course = document.cu.dccourse.value; |
Line 215 sub print_user_modification_page {
|
Line 265 sub print_user_modification_page {
|
var userrole = document.cu.role.options[document.cu.role.selectedIndex].value |
var userrole = document.cu.role.options[document.cu.role.selectedIndex].value |
var section=""; |
var section=""; |
var numsections = 0; |
var numsections = 0; |
|
var newsecs = new Array(); |
for (var i=0; i<document.cu.currsec.length; i++) { |
for (var i=0; i<document.cu.currsec.length; i++) { |
if (document.cu.currsec.options[i].selected == true ) { |
if (document.cu.currsec.options[i].selected == true ) { |
if (document.cu.currsec.options[i].value != "" && document.cu.currsec.options[i].value != null) { |
if (document.cu.currsec.options[i].value != "" && document.cu.currsec.options[i].value != null) { |
Line 236 sub print_user_modification_page {
|
Line 287 sub print_user_modification_page {
|
else { |
else { |
section = section + "," + document.cu.newsec.value |
section = section + "," + document.cu.newsec.value |
} |
} |
var numsplit = document.cu.newsec.value.split(/,/g); |
newsecs = document.cu.newsec.value.split(/,/g); |
numsections = numsections + numsplit.length; |
numsections = numsections + newsecs.length; |
} |
} |
if ((userrole == 'st') && (numsections > 1)) { |
if ((userrole == 'st') && (numsections > 1)) { |
alert("In each course, each user may only have one student role at a time. You had selected "+numsections+" sections.\\nPlease modify your selections so they include no more than one section.") |
alert("In each course, each user may only have one student role at a time. You had selected "+numsections+" sections.\\nPlease modify your selections so they include no more than one section.") |
return; |
return; |
} |
} |
|
for (var j=0; j<newsecs.length; j++) { |
|
if ((newsecs[j] == 'all') || (newsecs[j] == 'none')) { |
|
alert("'"+newsecs[j]+"' may not be used as the name for a section, as it is a reserved word.\\nPlease choose a different section name."); |
|
return; |
|
} |
|
if (document.cu.groups.value != '') { |
|
var groups = document.cu.groups.value.split(/,/g); |
|
for (var k=0; k<groups.length; k++) { |
|
if (newsecs[j] == groups[k]) { |
|
alert("'"+newsecs[j]+"' may not be used as the name for a section, as it is the name of a course group.\\nSection names and group names must be distinct. Please choose a different section name."); |
|
return; |
|
} |
|
} |
|
} |
|
} |
if ((userrole == 'cc') && (numsections > 0)) { |
if ((userrole == 'cc') && (numsections > 0)) { |
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."); |
section = ""; |
section = ""; |
Line 255 sub print_user_modification_page {
|
Line 321 sub print_user_modification_page {
|
else { |
else { |
var coursename = "_$dcdom"+"_"+course+"_"+userrole |
var coursename = "_$dcdom"+"_"+course+"_"+userrole |
document.cu.elements[numcourse].name = "act"+coursename |
document.cu.elements[numcourse].name = "act"+coursename |
document.cu.elements[numcourse+4].name = "sec"+coursename |
document.cu.elements[numcourse+5].name = "sec"+coursename |
document.cu.elements[numcourse+4].value = section |
document.cu.elements[numcourse+5].value = section |
document.cu.elements[numcourse+5].name = "start"+coursename |
document.cu.elements[numcourse+7].name = "start"+coursename |
document.cu.elements[numcourse+6].name = "end"+coursename |
document.cu.elements[numcourse+8].name = "end"+coursename |
} |
} |
} |
} |
document.cu.submit(); |
document.cu.submit(); |
Line 272 sub print_user_modification_page {
|
Line 338 sub print_user_modification_page {
|
} |
} |
return -1; |
return -1; |
} |
} |
ENDSCRIPT |
|
} |
|
my $html=&Apache::lonxml::xmlbegin(); |
|
my $dochead =<<"ENDDOCHEAD"; |
|
$html |
|
<head> |
|
<title>The LearningOnline Network with CAPA</title> |
|
<script type="text/javascript" language="Javascript"> |
|
|
|
function pclose() { |
function setType() { |
parmwin=window.open("/adm/rat/empty.html","LONCAPAparms", |
var crstype = 'Course' |
"height=350,width=350,scrollbars=no,menubar=no"); |
rolevals = new Array("$rolevalslist"); |
parmwin.close(); |
if (crstype == 'Group') { |
} |
if (document.cu.currsec.options[0].text == "$pickcrsfirst") { |
|
document.cu.currsec.options[0].text = "$pickgrpfirst"; |
$pjump_def |
} |
$dc_setcourse_code |
grprolenames = new Array("$grprolenameslist"); |
|
for (var i=0; i<rolevals.length; i++) { |
function dateset() { |
if (document.cu.role.selectedIndex == i) { |
eval("document.cu."+document.cu.pres_marker.value+ |
document.cu.role.options[i] = new Option(grprolenames[i],rolevals[i],true,false); |
".value=document.cu.pres_value.value"); |
} else { |
pclose(); |
document.cu.role.options[i] = new Option(grprolenames[i],rolevals[i],false,false); |
|
} |
|
} |
|
} else { |
|
if (document.cu.currsec.options[0].text == "$pickgrpfirst") { |
|
document.cu.currsec.options[0].text = "$pickcrsfirst"; |
|
} |
|
crsrolenames = new Array("$crsrolenameslist"); |
|
for (var i=0; i<rolevals.length; i++) { |
|
if (document.cu.role.selectedIndex == i) { |
|
document.cu.role.options[i] = new Option(crsrolenames[i],rolevals[i],true,false); |
|
} else { |
|
document.cu.role.options[i] = new Option(crsrolenames[i],rolevals[i],false,false); |
|
} |
|
} |
|
} |
} |
} |
|
ENDSCRIPT |
|
} else { |
|
$nondc_setsection_code = <<"ENDSECCODE"; |
function setSections() { |
function setSections() { |
var re1 = /^currsec_/; |
var re1 = /^currsec_/; |
|
var groups = new Array($groupslist); |
for (var i=0;i<document.cu.elements.length;i++) { |
for (var i=0;i<document.cu.elements.length;i++) { |
var str = document.cu.elements[i].name; |
var str = document.cu.elements[i].name; |
var checkcurr = str.match(re1); |
var checkcurr = str.match(re1); |
if (checkcurr != null) { |
if (checkcurr != null) { |
var re2 = /^currsec_[a-zA-Z0-9]+_[a-zA-Z0-9]+_(\\w+)\$/; |
|
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 re2 = /^currsec_[a-zA-Z0-9]+_[a-zA-Z0-9]+_(\\w+)\$/; |
match = re2.exec(str); |
match = re2.exec(str); |
Line 333 $html
|
Line 408 $html
|
if (numsec > 0) { |
if (numsec > 0) { |
if (document.cu.elements[i+1].value != "" && document.cu.elements[i+1].value != null) { |
if (document.cu.elements[i+1].value != "" && document.cu.elements[i+1].value != null) { |
sections = sections + "," + document.cu.elements[i+1].value; |
sections = sections + "," + document.cu.elements[i+1].value; |
} |
} |
} |
} |
else { |
else { |
sections = document.cu.elements[i+1].value; |
sections = document.cu.elements[i+1].value; |
} |
} |
var newsecs = document.cu.elements[i+1].value; |
var newsecs = document.cu.elements[i+1].value; |
|
var numsplit; |
if (newsecs != null && newsecs != "") { |
if (newsecs != null && newsecs != "") { |
var numsplit = newsecs.split(/,/g); |
numsplit = newsecs.split(/,/g); |
numsec = numsec + numsplit.length; |
numsec = numsec + numsplit.length; |
} |
} |
|
|
if ((role == 'st') && (numsec > 1)) { |
if ((role == 'st') && (numsec > 1)) { |
alert("In each course, each user may only have one student role at a time. You had selected "+numsec+" sections.\\nPlease modify your selections so they include no more than one section.") |
alert("In each course, each user may only have one student role at a time. You had selected "+numsec+" sections.\\nPlease modify your selections so they include no more than one section.") |
return; |
return; |
} |
} |
else { |
else if (numsplit != null) { |
document.cu.elements[i+2].value = sections; |
for (var j=0; j<numsplit.length; j++) { |
|
if ((numsplit[j] == 'all') || |
|
(numsplit[j] == 'none')) { |
|
alert("'"+numsplit[j]+"' may not be used as the name for a section, as it is a reserved word.\\nPlease choose a different section name."); |
|
return; |
|
} |
|
for (var k=0; k<groups.length; k++) { |
|
if (numsplit[j] == groups[k]) { |
|
alert("'"+numsplit[j]+"' may not be used as a section name, as it is the name of a course group.\\nSection names and group names must be distinct. Please choose a different section name."); |
|
return; |
|
} |
|
} |
|
} |
} |
} |
|
document.cu.elements[i+2].value = sections; |
} |
} |
} |
} |
} |
} |
} |
} |
document.cu.submit(); |
document.cu.submit(); |
} |
} |
</script> |
ENDSECCODE |
</head> |
} |
ENDDOCHEAD |
my $js = &user_modification_js($pjump_def,$dc_setcourse_code, |
$r->print(&Apache::loncommon::bodytag( |
$nondc_setsection_code,$groupslist); |
'Create Users, Change User Privileges',undef,$loaditem)); |
my $start_page = |
|
&Apache::loncommon::start_page('Create Users, Change User Privileges', |
|
$js,{'add_entries' => \%loaditem,}); |
|
|
my $forminfo =<<"ENDFORMINFO"; |
my $forminfo =<<"ENDFORMINFO"; |
<form action="/adm/createuser" method="post" name="cu"> |
<form action="/adm/createuser" method="post" name="cu"> |
<input type="hidden" name="phase" value="update_user_data"> |
<input type="hidden" name="phase" value="update_user_data"> |
Line 402 ENDFORMINFO
|
Line 495 ENDFORMINFO
|
my $genhelp=&Apache::loncommon::help_open_topic('Generation'); |
my $genhelp=&Apache::loncommon::help_open_topic('Generation'); |
&initialize_authen_forms(); |
&initialize_authen_forms(); |
$r->print(<<ENDNEWUSER); |
$r->print(<<ENDNEWUSER); |
$dochead |
$start_page |
<h1>$lt{'cnu'}</h1> |
<h1>$lt{'cnu'}</h1> |
$forminfo |
$forminfo |
<h2>$lt{'nu'} "$ccuname" $lt{'id'} $ccdomain</h2> |
<h2>$lt{'nu'} "$ccuname" $lt{'id'} $ccdomain</h2> |
Line 443 ENDNEWUSER
|
Line 536 ENDNEWUSER
|
'gen' => "generation" |
'gen' => "generation" |
); |
); |
$r->print(<<ENDCHANGEUSER); |
$r->print(<<ENDCHANGEUSER); |
$dochead |
$start_page |
<h1>$lt{'cup'}</h1> |
<h1>$lt{'cup'}</h1> |
$forminfo |
$forminfo |
<h2>$lt{'usr'} "$ccuname" $lt{'id'} "$ccdomain"</h2> |
<h2>$lt{'usr'} "$ccuname" $lt{'id'} "$ccdomain"</h2> |
Line 521 END
|
Line 614 END
|
'<br />'.&mt('Domain').': '.$coursedom.(' 'x8). |
'<br />'.&mt('Domain').': '.$coursedom.(' 'x8). |
&Apache::loncommon::syllabuswrapper('Syllabus',$coursedir,$coursedom); |
&Apache::loncommon::syllabuswrapper('Syllabus',$coursedir,$coursedom); |
$sortkey.="\0".$coursedata{'description'}; |
$sortkey.="\0".$coursedata{'description'}; |
|
$class=$coursedata{'type'}; |
} else { |
} else { |
$carea=&mt('Unavailable course').': '.$area; |
$carea=&mt('Unavailable course').': '.$area; |
$sortkey.="\0".&mt('Unavailable course').': '.$area; |
$sortkey.="\0".&mt('Unavailable course').': '.$area; |
Line 546 END
|
Line 640 END
|
$bgcol=~s/[^7-9a-e]//g; |
$bgcol=~s/[^7-9a-e]//g; |
$bgcol=substr($bgcol.$bgcol.$bgcol.'ffffff',2,6); |
$bgcol=substr($bgcol.$bgcol.$bgcol.'ffffff',2,6); |
if ($area=~/^\/(\w+)\/(\d\w+)\/(\w+)/) { |
if ($area=~/^\/(\w+)\/(\d\w+)\/(\w+)/) { |
$carea.='<br />Section/Group: '.$3; |
$carea.='<br />Section: '.$3; |
$sortkey.="\0$3"; |
$sortkey.="\0$3"; |
} |
} |
$area=$carea; |
$area=$carea; |
Line 612 END
|
Line 706 END
|
} |
} |
my $plaintext=''; |
my $plaintext=''; |
unless ($croletitle) { |
unless ($croletitle) { |
$plaintext=&Apache::lonnet::plaintext($role_code); |
$plaintext=&Apache::lonnet::plaintext($role_code,$class) |
} else { |
} else { |
$plaintext= |
$plaintext= |
"Customrole '$croletitle' defined by $croleuname\@$croleudom"; |
"Customrole '$croletitle' defined by $croleuname\@$croleudom"; |
Line 632 END
|
Line 726 END
|
} # end of foreach (table building loop) |
} # end of foreach (table building loop) |
my $rolesdisplay = 0; |
my $rolesdisplay = 0; |
my %output = (); |
my %output = (); |
foreach my $type ('Construction Space','Course','Domain','System','Unknown') { |
foreach my $type ('Construction Space','Course','Group','Domain','System','Unknown') { |
$output{$type} = ''; |
$output{$type} = ''; |
foreach my $which (sort {uc($a) cmp uc($b)} (keys(%sortrole))) { |
foreach my $which (sort {uc($a) cmp uc($b)} (keys(%sortrole))) { |
if ( ($roleclass{$sortrole{$which}} =~ /^\Q$type\E/ ) && ($rolepriv{$sortrole{$which}}) ) { |
if ( ($roleclass{$sortrole{$which}} =~ /^\Q$type\E/ ) && ($rolepriv{$sortrole{$which}}) ) { |
Line 654 END
|
Line 748 END
|
<tr><th>$lt{'rev'}</th><th>$lt{'ren'}</th><th>$lt{'del'}</th><th>$lt{'rol'}</th><th>$lt{'e |
<tr><th>$lt{'rev'}</th><th>$lt{'ren'}</th><th>$lt{'del'}</th><th>$lt{'rol'}</th><th>$lt{'e |
xt'}</th><th>$lt{'sta'}</th><th>$lt{'end'}</th> |
xt'}</th><th>$lt{'sta'}</th><th>$lt{'end'}</th> |
END |
END |
foreach my $type ('Construction Space','Course','Domain','System','Unknown') { |
foreach my $type ('Construction Space','Course','Group','Domain','System','Unknown') { |
if ($output{$type}) { |
if ($output{$type}) { |
$r->print($output{$type}."\n"); |
$r->print($output{$type}."\n"); |
} |
} |
Line 852 ENDDROW
|
Line 946 ENDDROW
|
$r->print($domaintext); |
$r->print($domaintext); |
} |
} |
# |
# |
# Course level |
# Course and group levels |
# |
# |
my $num_sections; |
|
|
|
if ($env{'request.role'} =~ m-^dc\./(\w+)/$-) { |
if ($env{'request.role'} =~ m-^dc\./(\w+)/$-) { |
$r->print(&course_level_dc($1)); |
$r->print(&course_level_dc($1,'Course')); |
$r->print('<hr /><input type="button" value="'.&mt('Modify User').'" onClick="setCourse()">'."\n"); |
$r->print('<hr /><input type="button" value="'.&mt('Modify User').'" onClick="setCourse()">'."\n"); |
} else { |
} else { |
$r->print(&course_level_table(%inccourses)); |
$r->print(&course_level_table(%inccourses)); |
$r->print('<hr /><input type="button" value="'.&mt('Modify User').'" onClick="setSections()">'."\n"); |
$r->print('<hr /><input type="button" value="'.&mt('Modify User').'" onClick="setSections()">'."\n"); |
} |
} |
$r->print("</form></body></html>"); |
$r->print("</form>".&Apache::loncommon::end_page()); |
} |
} |
|
|
# ================================================================= Phase Three |
# ================================================================= Phase Three |
Line 873 sub update_user_data {
|
Line 966 sub update_user_data {
|
$env{'form.ccdomain'}); |
$env{'form.ccdomain'}); |
# Error messages |
# Error messages |
my $error = '<font color="#ff0000">'.&mt('Error').':</font>'; |
my $error = '<font color="#ff0000">'.&mt('Error').':</font>'; |
my $end = '</body></html>'; |
my $end = &Apache::loncommon::end_page(); |
# Print header |
|
my $html=&Apache::lonxml::xmlbegin(); |
|
$r->print(<<ENDTHREEHEAD); |
|
$html |
|
<head> |
|
<title>The LearningOnline Network with CAPA</title> |
|
</head> |
|
ENDTHREEHEAD |
|
my $title; |
my $title; |
if (exists($env{'form.makeuser'})) { |
if (exists($env{'form.makeuser'})) { |
$title='Set Privileges for New User'; |
$title='Set Privileges for New User'; |
} else { |
} else { |
$title='Modify User Privileges'; |
$title='Modify User Privileges'; |
} |
} |
$r->print(&Apache::loncommon::bodytag($title)); |
$r->print(&Apache::loncommon::start_page($title)); |
|
my %disallowed; |
# Check Inputs |
# Check Inputs |
if (! $env{'form.ccuname'} ) { |
if (! $env{'form.ccuname'} ) { |
$r->print($error.&mt('No login name specified').'.'.$end); |
$r->print($error.&mt('No login name specified').'.'.$end); |
Line 1110 END
|
Line 1197 END
|
&Apache::lonnet::critical('put:'. |
&Apache::lonnet::critical('put:'. |
$env{'course.'.$cid.'.domain'}.':'. |
$env{'course.'.$cid.'.domain'}.':'. |
$env{'course.'.$cid.'.num'}.':classlist:'. |
$env{'course.'.$cid.'.num'}.':classlist:'. |
&Apache::lonnet::escape($env{'form.ccuname'}.':'. |
&escape($env{'form.ccuname'}.':'. |
$env{'form.ccdomain'}).'='. |
$env{'form.ccdomain'}).'='. |
&Apache::lonnet::escape($now.':'), |
&escape($now.':'), |
$env{'course.'.$cid.'.home'}).'</b><br />'); |
$env{'course.'.$cid.'.home'}).'</b><br />'); |
} |
} |
} |
} |
if ($_=~/^form\.rev\:([^\_]+)\_cr\.cr\/(\w+)\/(\w+)\/(\w+)$/) { |
if ($_=~/^form\.rev\:([^\_]+)\_cr\.cr\/(\w+)\/(\w+)\/(\w+)$/) { |
# Revoke custom role |
# Revoke custom role |
$r->print(&mt('Revoking custom role'). |
$r->print(&mt('Revoking custom role:'). |
' '.$4.' by '.$3.'@'.$2.' in '.$1.': <b>'. |
' '.$4.' by '.$3.'@'.$2.' in '.$1.': <b>'. |
&Apache::lonnet::revokecustomrole($env{'form.ccdomain'}, |
&Apache::lonnet::revokecustomrole($env{'form.ccdomain'}, |
$env{'form.ccuname'},$1,$2,$3,$4). |
$env{'form.ccuname'},$1,$2,$3,$4). |
'</b><br />'); |
'</b><br />'); |
} |
} |
} elsif ($_=~/^form\.del/) { |
} elsif ($_=~/^form\.del/) { |
if ($_=~/^form\.del\:([^\_]+)\_([^\_]+)$/) { |
if ($_=~/^form\.del\:([^\_]+)\_([^\_\.]+)$/) { |
|
# Delete standard role |
$r->print(&mt('Deleting').' '.$2.' in '.$1.': '. |
$r->print(&mt('Deleting').' '.$2.' in '.$1.': '. |
&Apache::lonnet::assignrole($env{'form.ccdomain'}, |
&Apache::lonnet::assignrole($env{'form.ccdomain'}, |
$env{'form.ccuname'},$1,$2,$now,0,1).'<br />'); |
$env{'form.ccuname'},$1,$2,$now,0,1).'<br />'); |
Line 1136 END
|
Line 1224 END
|
&Apache::lonnet::critical('put:'. |
&Apache::lonnet::critical('put:'. |
$env{'course.'.$cid.'.domain'}.':'. |
$env{'course.'.$cid.'.domain'}.':'. |
$env{'course.'.$cid.'.num'}.':classlist:'. |
$env{'course.'.$cid.'.num'}.':classlist:'. |
&Apache::lonnet::escape($env{'form.ccuname'}.':'. |
&escape($env{'form.ccuname'}.':'. |
$env{'form.ccdomain'}).'='. |
$env{'form.ccdomain'}).'='. |
&Apache::lonnet::escape($now.':'), |
&escape($now.':'), |
$env{'course.'.$cid.'.home'}).'</b><br />'); |
$env{'course.'.$cid.'.home'}).'</b><br />'); |
} |
} |
} |
} |
|
if ($_=~/^form\.del\:([^\_]+)\_cr\.cr\/(\w+)\/(\w+)\/(\w+)$/) { |
|
my ($url,$rdom,$rnam,$rolename) = ($1,$2,$3,$4); |
|
# Delete custom role |
|
$r->print(&mt('Deleting custom role [_1] by [_2]@[_3] in [_4]', |
|
$rolename,$rnam,$rdom,$url).': <b>'. |
|
&Apache::lonnet::assigncustomrole($env{'form.ccdomain'}, |
|
$env{'form.ccuname'},$url,$rdom,$rnam,$rolename,$now, |
|
0,1).'</b><br />'); |
|
} |
} elsif ($_=~/^form\.ren/) { |
} elsif ($_=~/^form\.ren/) { |
my $udom = $env{'form.ccdomain'}; |
my $udom = $env{'form.ccdomain'}; |
my $uname = $env{'form.ccuname'}; |
my $uname = $env{'form.ccuname'}; |
if ($_=~/^form\.ren\:([^\_]+)\_([^\_]+)$/) { |
# Re-enable standard role |
|
if ($_=~/^form\.ren\:([^\_]+)\_([^\_\.]+)$/) { |
my $url = $1; |
my $url = $1; |
my $role = $2; |
my $role = $2; |
my $logmsg; |
my $logmsg; |
Line 1165 END
|
Line 1263 END
|
} else { |
} else { |
my $result=&Apache::lonnet::assignrole($env{'form.ccdomain'}, |
my $result=&Apache::lonnet::assignrole($env{'form.ccdomain'}, |
$env{'form.ccuname'},$url,$role,0,$now); |
$env{'form.ccuname'},$url,$role,0,$now); |
$output = &mt('Re-Enabling [_1] in [_2]: [_3]', |
$output = &mt('Re-enabling [_1] in [_2]: <b>[_3]</b>', |
$role,$url,$result).'<br />'; |
$role,$url,$result).'<br />'; |
} |
} |
$r->print($output); |
$r->print($output); |
} |
} |
|
# Re-enable custom role |
|
if ($_=~/^form\.ren\:([^\_]+)\_cr\.cr\/(\w+)\/(\w+)\/(\w+)$/) { |
|
my ($url,$rdom,$rnam,$rolename) = ($1,$2,$3,$4); |
|
my $result = &Apache::lonnet::assigncustomrole( |
|
$env{'form.ccdomain'}, $env{'form.ccuname'}, |
|
$url,$rdom,$rnam,$rolename,0,$now); |
|
$r->print(&mt('Re-enabling custom role [_1] by [_2]@[_3] in [_4] : <b>[_5]</b>', |
|
$rolename,$rnam,$rdom,$url,$result).'<br />'); |
|
} |
} elsif ($_=~/^form\.act/) { |
} elsif ($_=~/^form\.act/) { |
my $udom = $env{'form.ccdomain'}; |
my $udom = $env{'form.ccdomain'}; |
my $uname = $env{'form.ccuname'}; |
my $uname = $env{'form.ccuname'}; |
Line 1192 END
|
Line 1299 END
|
if ($num_sections == 0) { |
if ($num_sections == 0) { |
$r->print(&commit_customrole($udom,$uname,$url,$three,$four,$five,$start,$end)); |
$r->print(&commit_customrole($udom,$uname,$url,$three,$four,$five,$start,$end)); |
} else { |
} else { |
foreach (sort {$a cmp $b} keys %sections) { |
my %curr_groups = |
my $securl = $url.'/'.$_; |
&Apache::longroup::coursegroups($one,$two); |
|
foreach my $sec (sort {$a cmp $b} keys %sections) { |
|
if (($sec eq 'none') || ($sec eq 'all') || |
|
exists($curr_groups{$sec})) { |
|
$disallowed{$sec} = $url; |
|
next; |
|
} |
|
my $securl = $url.'/'.$sec; |
$r->print(&commit_customrole($udom,$uname,$securl,$three,$four,$five,$start,$end)); |
$r->print(&commit_customrole($udom,$uname,$securl,$three,$four,$five,$start,$end)); |
} |
} |
} |
} |
Line 1215 END
|
Line 1329 END
|
if ($num_sections == 0) { |
if ($num_sections == 0) { |
$r->print(&commit_standardrole($udom,$uname,$url,$three,$start,$end,$one,$two,'')); |
$r->print(&commit_standardrole($udom,$uname,$url,$three,$start,$end,$one,$two,'')); |
} else { |
} else { |
|
my %curr_groups = |
|
&Apache::longroup::coursegroups($one,$two); |
my $emptysec = 0; |
my $emptysec = 0; |
foreach my $sec (sort {$a cmp $b} keys %sections) { |
foreach my $sec (sort {$a cmp $b} keys %sections) { |
$sec =~ s/\W//g; |
$sec =~ s/\W//g; |
if ($sec ne '') { |
if ($sec ne '') { |
|
if (($sec eq 'none') || ($sec eq 'all') || |
|
exists($curr_groups{$sec})) { |
|
$disallowed{$sec} = $url; |
|
next; |
|
} |
my $securl = $url.'/'.$sec; |
my $securl = $url.'/'.$sec; |
$r->print(&commit_standardrole($udom,$uname,$securl,$three,$start,$end,$one,$two,$sec)); |
$r->print(&commit_standardrole($udom,$uname,$securl,$three,$start,$end,$one,$two,$sec)); |
} else { |
} else { |
Line 1261 END
|
Line 1382 END
|
} else { |
} else { |
$r->print('<p>'.&mt('ERROR').': '.&mt('Unknown command').' <tt>'.$_.'</tt></p><br />'); |
$r->print('<p>'.&mt('ERROR').': '.&mt('Unknown command').' <tt>'.$_.'</tt></p><br />'); |
} |
} |
} |
foreach my $key (sort(keys(%disallowed))) { |
|
if (($key eq 'none') || ($key eq 'all')) { |
|
$r->print('<p>'.&mt('[_1] may not be used as the name for a section, as it is a reserved word.',$key)); |
|
} else { |
|
$r->print('<p>'.&mt('[_1] may not be used as the name for a section, as it is the name of a course group.',$key)); |
|
} |
|
$r->print(' '.&mt('Please <a href="javascript:history.go(-1)">go back</a> and choose a different section name.').'</p><br />'); |
|
} |
|
} |
} # End of foreach (keys(%env)) |
} # End of foreach (keys(%env)) |
# Flush the course logs so reverse user roles immediately updated |
# Flush the course logs so reverse user roles immediately updated |
&Apache::lonnet::flushcourselogs(); |
&Apache::lonnet::flushcourselogs(); |
$r->print('<p><a href="/adm/createuser">Create/Modify Another User</a></p>'); |
$r->print('<p><a href="/adm/createuser">Create/Modify Another User</a></p>'); |
$r->print('</body></html>'); |
$r->print(&Apache::loncommon::end_page()); |
} |
} |
|
|
sub commit_customrole { |
sub commit_customrole { |
Line 1347 sub commit_studentrole {
|
Line 1476 sub commit_studentrole {
|
} |
} |
} else { |
} else { |
$$logmsg .= "Incomplete course id defined. Addition of user $uname from domain $udom to course $one\_$two, section $sec not completed.$linefeed"; |
$$logmsg .= "Incomplete course id defined. Addition of user $uname from domain $udom to course $one\_$two, section $sec not completed.$linefeed"; |
$result = "Error: incomplete course id\n"; |
$result = "error: incomplete course id\n"; |
} |
} |
return $result; |
return $result; |
} |
} |
Line 1402 sub custom_role_editor {
|
Line 1531 sub custom_role_editor {
|
return; |
return; |
} |
} |
|
|
$r->print(&Apache::loncommon::bodytag( |
$r->print(&Apache::loncommon::start_page('Custom Role Editor')); |
'Create Users, Change User Privileges').'<h2>'); |
|
my $syspriv=''; |
my $syspriv=''; |
my $dompriv=''; |
my $dompriv=''; |
my $coursepriv=''; |
my $coursepriv=''; |
my ($rdummy,$roledef)= |
my ($rdummy,$roledef)= |
&Apache::lonnet::get('roles',["rolesdef_$rolename"]); |
&Apache::lonnet::get('roles',["rolesdef_$rolename"]); |
# ------------------------------------------------------- Does this role exist? |
# ------------------------------------------------------- Does this role exist? |
|
$r->print('<h2>'); |
if (($rdummy ne 'con_lost') && ($roledef ne '')) { |
if (($rdummy ne 'con_lost') && ($roledef ne '')) { |
$r->print(&mt('Existing Role').' "'); |
$r->print(&mt('Existing Role').' "'); |
# ------------------------------------------------- Get current role privileges |
# ------------------------------------------------- Get current role privileges |
Line 1468 sub custom_role_editor {
|
Line 1597 sub custom_role_editor {
|
<tr><th>$lt{'prv'}</th><th>$lt{'crl'}</th><th>$lt{'dml'}</th> |
<tr><th>$lt{'prv'}</th><th>$lt{'crl'}</th><th>$lt{'dml'}</th> |
<th>$lt{'ssl'}</th></tr> |
<th>$lt{'ssl'}</th></tr> |
ENDCCF |
ENDCCF |
foreach (sort keys %full) { |
foreach my $priv (sort keys %full) { |
$r->print('<tr><td>'.&Apache::lonnet::plaintext($_).'</td><td>'. |
my $privtext = &Apache::lonnet::plaintext($priv); |
($courselevel{$_}?'<input type="checkbox" name="'.$_.':c" '. |
$r->print('<tr><td>'.$privtext.'</td><td>'. |
($courselevelcurrent{$_}?'checked="1"':'').' />':' '). |
($courselevel{$priv}?'<input type="checkbox" name="'.$priv.':c" '. |
|
($courselevelcurrent{$priv}?'checked="1"':'').' />':' '). |
'</td><td>'. |
'</td><td>'. |
($domainlevel{$_}?'<input type="checkbox" name="'.$_.':d" '. |
($domainlevel{$priv}?'<input type="checkbox" name="'.$priv.':d" '. |
($domainlevelcurrent{$_}?'checked="1"':'').' />':' '). |
($domainlevelcurrent{$priv}?'checked="1"':'').' />':' '). |
'</td><td>'. |
'</td><td>'. |
($systemlevel{$_}?'<input type="checkbox" name="'.$_.':s" '. |
($systemlevel{$priv}?'<input type="checkbox" name="'.$priv.':s" '. |
($systemlevelcurrent{$_}?'checked="1"':'').' />':' '). |
($systemlevelcurrent{$priv}?'checked="1"':'').' />':' '). |
'</td></tr>'); |
'</td></tr>'); |
} |
} |
$r->print( |
$r->print( |
'<table><input type="submit" value="'.&mt('Define Role').'" /></form></body></html>'); |
'<table><input type="submit" value="'.&mt('Define Role').'" /></form>'. |
|
&Apache::loncommon::end_page()); |
} |
} |
|
|
# ---------------------------------------------------------- Call to definerole |
# ---------------------------------------------------------- Call to definerole |
sub set_custom_role { |
sub set_custom_role { |
my $r=shift; |
my ($r) = @_; |
|
|
my $rolename=$env{'form.rolename'}; |
my $rolename=$env{'form.rolename'}; |
|
|
Line 1497 sub set_custom_role {
|
Line 1628 sub set_custom_role {
|
return; |
return; |
} |
} |
|
|
$r->print(&Apache::loncommon::bodytag( |
$r->print(&Apache::loncommon::start_page('Save Custom Role').'<h2>'); |
'Create Users, Change User Privileges').'<h2>'); |
|
my ($rdummy,$roledef)= |
my ($rdummy,$roledef)= |
&Apache::lonnet::get('roles',["rolesdef_$rolename"]); |
&Apache::lonnet::get('roles',["rolesdef_$rolename"]); |
|
|
# ------------------------------------------------------- Does this role exist? |
# ------------------------------------------------------- Does this role exist? |
if (($rdummy ne 'con_lost') && ($roledef ne '')) { |
if (($rdummy ne 'con_lost') && ($roledef ne '')) { |
$r->print(&mt('Existing Role').' "'); |
$r->print(&mt('Existing Role').' "'); |
Line 1551 sub set_custom_role {
|
Line 1682 sub set_custom_role {
|
$rolename)); |
$rolename)); |
} |
} |
$r->print('<p><a href="/adm/createuser">Create another role, or Create/Modify a user.</a></p>'); |
$r->print('<p><a href="/adm/createuser">Create another role, or Create/Modify a user.</a></p>'); |
$r->print('</body></html>'); |
$r->print(&Apache::loncommon::end_page()); |
} |
} |
|
|
# ================================================================ Main Handler |
# ================================================================ Main Handler |
Line 1608 sub course_level_table {
|
Line 1739 sub course_level_table {
|
'act' => "Activate", |
'act' => "Activate", |
'rol' => "Role", |
'rol' => "Role", |
'ext' => "Extent", |
'ext' => "Extent", |
'grs' => "Group/Section", |
'grs' => "Section", |
'sta' => "Start", |
'sta' => "Start", |
'end' => "End" |
'end' => "End" |
); |
); |
Line 1619 sub course_level_table {
|
Line 1750 sub course_level_table {
|
$thiscourse=~s:_:/:g; |
$thiscourse=~s:_:/:g; |
my %coursedata=&Apache::lonnet::coursedescription($thiscourse); |
my %coursedata=&Apache::lonnet::coursedescription($thiscourse); |
my $area=$coursedata{'description'}; |
my $area=$coursedata{'description'}; |
|
my $type=$coursedata{'type'}; |
if (!defined($area)) { $area=&mt('Unavailable course').': '.$_; } |
if (!defined($area)) { $area=&mt('Unavailable course').': '.$_; } |
my $bgcol=$thiscourse; |
my $bgcol=$thiscourse; |
$bgcol=~s/[^7-9a-e]//g; |
$bgcol=~s/[^7-9a-e]//g; |
$bgcol=substr($bgcol.$bgcol.$bgcol.'ffffff',2,6); |
$bgcol=substr($bgcol.$bgcol.$bgcol.'ffffff',2,6); |
my ($domain,$cnum)=split(/\//,$thiscourse); |
my ($domain,$cnum)=split(/\//,$thiscourse); |
my %sections_count = (); |
my %sections_count; |
my $num_sections = 0; |
|
if (defined($env{'request.course.id'})) { |
if (defined($env{'request.course.id'})) { |
if ($env{'request.course.id'} eq $domain.'_'.$cnum) { |
if ($env{'request.course.id'} eq $domain.'_'.$cnum) { |
$num_sections = &Apache::loncommon::get_sections($domain,$cnum,\%sections_count); |
%sections_count = |
|
&Apache::loncommon::get_sections($domain,$cnum); |
} |
} |
} |
} |
foreach ('st','ta','ep','ad','in','cc') { |
foreach ('st','ta','ep','in','cc') { |
if (&Apache::lonnet::allowed('c'.$_,$thiscourse)) { |
if (&Apache::lonnet::allowed('c'.$_,$thiscourse)) { |
my $plrole=&Apache::lonnet::plaintext($_); |
my $plrole=&Apache::lonnet::plaintext($_); |
$table .= <<ENDEXTENT; |
$table .= <<ENDEXTENT; |
Line 1641 sub course_level_table {
|
Line 1773 sub course_level_table {
|
<td>$area<br />Domain: $domain</td> |
<td>$area<br />Domain: $domain</td> |
ENDEXTENT |
ENDEXTENT |
if ($_ ne 'cc') { |
if ($_ ne 'cc') { |
if ($num_sections > 0) { |
if (%sections_count) { |
my $currsec = &course_sections($num_sections,\%sections_count,$protectedcourse.'_'.$_); |
my $currsec = &course_sections(\%sections_count,$protectedcourse.'_'.$_); |
$table .= |
$table .= |
'<td><table border="0" cellspacing="0" cellpadding="0">'. |
'<td><table border="0" cellspacing="0" cellpadding="0">'. |
'<tr><td valign="top">'.$lt{'exs'}.'<br />'. |
'<tr><td valign="top">'.$lt{'exs'}.'<br />'. |
Line 1682 ENDTIMEENTRY
|
Line 1814 ENDTIMEENTRY
|
<td>$plrole</td> |
<td>$plrole</td> |
<td>$area</td> |
<td>$area</td> |
END |
END |
if ($num_sections > 0) { |
if (%sections_count) { |
my $currsec = &course_sections($num_sections,\%sections_count,$customrole); |
my $currsec = &course_sections(\%sections_count,$customrole); |
$table.= |
$table.= |
'<td><table border="0" cellspacing="0" cellpadding="0">'. |
'<td><table border="0" cellspacing="0" cellpadding="0">'. |
'<tr><td valign="top">'.$lt{'exs'}.'<br />'. |
'<tr><td valign="top">'.$lt{'exs'}.'<br />'. |
Line 1722 ENDTABLE
|
Line 1854 ENDTABLE
|
} |
} |
|
|
sub course_sections { |
sub course_sections { |
my ($num_sections,$sections_count,$role) = @_; |
my ($sections_count,$role) = @_; |
my $output = ''; |
my $output = ''; |
my @sections = (sort {$a <=> $b} keys %{$sections_count}); |
my @sections = (sort {$a <=> $b} keys %{$sections_count}); |
if ($num_sections == 1) { |
if (scalar(@sections) == 1) { |
$output = '<select name="currsec_'.$role.'" >'."\n". |
$output = '<select name="currsec_'.$role.'" >'."\n". |
' <option value="">Select</option>'."\n". |
' <option value="">Select</option>'."\n". |
' <option value="">No section</option>'."\n". |
' <option value="">No section</option>'."\n". |
Line 1733 sub course_sections {
|
Line 1865 sub course_sections {
|
} else { |
} else { |
$output = '<select name="currsec_'.$role.'" '; |
$output = '<select name="currsec_'.$role.'" '; |
my $multiple = 4; |
my $multiple = 4; |
if ($num_sections <4) { $multiple = $num_sections; } |
if (scalar(@sections) < 4) { $multiple = scalar(@sections); } |
$output .= '"multiple" size="'.$multiple.'">'."\n"; |
$output .= '"multiple" size="'.$multiple.'">'."\n"; |
foreach (@sections) { |
foreach (@sections) { |
$output .= '<option value="'.$_.'">'.$_."</option>\n"; |
$output .= '<option value="'.$_.'">'.$_."</option>\n"; |
Line 1750 sub course_level_dc {
|
Line 1882 sub course_level_dc {
|
'<input type="hidden" name="origdom" value="'.$dcdom.'" />'. |
'<input type="hidden" name="origdom" value="'.$dcdom.'" />'. |
'<input type="hidden" name="dccourse" value="" />'; |
'<input type="hidden" name="dccourse" value="" />'; |
my $courseform='<b>'.&Apache::loncommon::selectcourse_link |
my $courseform='<b>'.&Apache::loncommon::selectcourse_link |
('cu','dccourse','dcdomain','coursedesc').'</b>'; |
('cu','dccourse','dcdomain','coursedesc',undef,undef,'Course').'</b>'; |
|
my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom); |
my $cb_jscript = &Apache::loncommon::coursebrowser_javascript($dcdom,$dcdom); |
|
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'crl' => "Course Level", |
'typ' => "Type", |
'crt' => "Course Title", |
|
'rol' => "Role", |
'rol' => "Role", |
'grs' => "Group/Section", |
'grs' => "Section", |
'exs' => "Existing sections", |
'exs' => "Existing sections", |
'new' => "Define new section", |
'new' => "Define new section", |
'sta' => "Start", |
'sta' => "Start", |
Line 1765 sub course_level_dc {
|
Line 1895 sub course_level_dc {
|
'ssd' => "Set Start Date", |
'ssd' => "Set Start Date", |
'sed' => "Set End Date" |
'sed' => "Set End Date" |
); |
); |
my $header = '<h4>'.$lt{'crl'}.'</h4>'. |
my $header = '<h4>'.&mt('Course Level').'</h4>'. |
'<table border="2"><tr><th>'.$courseform.'</th><th>'.$lt{'rol'}.'</th><th>'.$lt{'grs'}.'</th><th>'.$lt{'sta'}.'</th><th>'.$lt{'end'}.'</th></tr>'; |
'<table border="2"><tr><th>'.$courseform.'</th><th>'.$lt{'rol'}.'</th><th>'.$lt{'grs'}.'</th><th>'.$lt{'sta'}.'</th><th>'.$lt{'end'}.'</th></tr>'; |
my $otheritems = '<tr><td><input type="text" name="coursedesc" value="" onFocus="this.blur();opencrsbrowser('."'".'cu'."'".','."'".'dccourse'."'".','."'".'dcdomain'."'".','."'".'coursedesc'."',''".')" /></td>'. |
my $otheritems = '<tr><td><input type="text" name="coursedesc" value="" onFocus="this.blur();opencrsbrowser('."'cu','dccourse','dcdomain','coursedesc',".')" /></td>'."\n". |
'<td><select name="role">'."\n"; |
'<td><select name="role">'."\n"; |
foreach ('st','ta','ep','ad','in','cc') { |
foreach ('st','ta','ep','in','cc') { |
my $plrole=&Apache::lonnet::plaintext($_); |
my $plrole=&Apache::lonnet::plaintext($_); |
$otheritems .= ' <option value="'.$_.'">'.$plrole; |
$otheritems .= ' <option value="'.$_.'">'.$plrole; |
} |
} |
Line 1786 sub course_level_dc {
|
Line 1916 sub course_level_dc {
|
' <option value=""><--'.&mt('Pick course first').'</select></td>'. |
' <option value=""><--'.&mt('Pick course first').'</select></td>'. |
'<td> </td>'. |
'<td> </td>'. |
'<td valign="top"> <b>'.$lt{'new'}.'</b><br />'. |
'<td valign="top"> <b>'.$lt{'new'}.'</b><br />'. |
'<input type="text" name="newsec" value="" /></td>'. |
'<input type="text" name="newsec" value="" />'. |
|
'<input type="hidden" name="groups" value="" /></td>'. |
'</tr></table></td>'; |
'</tr></table></td>'; |
$otheritems .= <<ENDTIMEENTRY; |
$otheritems .= <<ENDTIMEENTRY; |
<td><input type=hidden name="start" value=''> |
<td><input type=hidden name="start" value=''> |