version 1.181, 2017/01/18 21:07:31
|
version 1.184.2.1, 2017/11/01 02:51:07
|
Line 1121 sub print_upload_manager_form {
|
Line 1121 sub print_upload_manager_form {
|
if (!$env{'form.datatoken'}) { |
if (!$env{'form.datatoken'}) { |
$datatoken=&Apache::loncommon::upfile_store($r); |
$datatoken=&Apache::loncommon::upfile_store($r); |
} else { |
} else { |
$datatoken=$env{'form.datatoken'}; |
$datatoken=&Apache::loncommon::valid_datatoken($env{'form.datatoken'}); |
&Apache::loncommon::load_tmp_file($r); |
if ($datatoken ne '') { |
|
&Apache::loncommon::load_tmp_file($r,$datatoken); |
|
} |
} |
} |
my @records=&Apache::loncommon::upfile_record_sep(); |
my @records=&Apache::loncommon::upfile_record_sep(); |
if($env{'form.noFirstLine'}){ |
if($env{'form.noFirstLine'}){ |
Line 2757 END
|
Line 2759 END
|
.'<input type="checkbox" name="userwin" value="1"'.$checkwin.' />'.$lt{'owin'} |
.'<input type="checkbox" name="userwin" value="1"'.$checkwin.' />'.$lt{'owin'} |
.'</label></span></td></tr></table></fieldset></div>'; |
.'</label></span></td></tr></table></fieldset></div>'; |
} |
} |
$output .= "\n".'<br clear="all" />'."\n". |
$output .= "\n".'<div style="padding:0;clear:both;margin:0;border:0"></div>'."\n". |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table_header_row(); |
&Apache::loncommon::start_data_table_header_row(); |
if ($mode eq 'autoenroll') { |
if ($mode eq 'autoenroll') { |
Line 3101 END
|
Line 3103 END
|
} |
} |
if ($showcheckbox) { |
if ($showcheckbox) { |
$r->print('<td><input type="checkbox" name="'. |
$r->print('<td><input type="checkbox" name="'. |
'actionlist" value="'.&HTML::Entities::encode($checkval,'&<>"').'" /></td>'); |
'actionlist" value="'. |
|
&HTML::Entities::encode($checkval,'&<>"').'" />'); |
|
foreach my $item ('start','end') { |
|
$r->print('<input type="hidden" name="'. |
|
&HTML::Entities::encode($checkval.'_'.$item,'&<>"').'"'. |
|
' value="'.$sdata->[$index{$item}].'" />'); |
|
} |
|
$r->print('</td>'); |
} else { |
} else { |
$r->print('<td> </td>'); |
$r->print('<td> </td>'); |
} |
} |
Line 3115 END
|
Line 3124 END
|
foreach my $item (@cols) { |
foreach my $item (@cols) { |
if ($item eq 'username') { |
if ($item eq 'username') { |
$r->print('<td>'.&print_username_link($mode,\%in).'</td>'); |
$r->print('<td>'.&print_username_link($mode,\%in).'</td>'); |
} elsif (($item eq 'start' || $item eq 'end') && ($actionselect)) { |
|
$r->print('<td>'.$in{$item}.'<input type="hidden" name="'.&HTML::Entities::encode($checkval.'_'.$item.'" value="'.$sdata->[$index{$item}],'&<>"').'" /></td>'."\n"); |
|
} elsif ($item eq 'status') { |
} elsif ($item eq 'status') { |
my $showitem = $in{$item}; |
my $showitem = $in{$item}; |
if (defined($ltstatus{$in{$item}})) { |
if (defined($ltstatus{$in{$item}})) { |
Line 4102 sub print_first_users_upload_form {
|
Line 4109 sub print_first_users_upload_form {
|
# ================================================= Drop/Add from uploaded file |
# ================================================= Drop/Add from uploaded file |
sub upfile_drop_add { |
sub upfile_drop_add { |
my ($r,$context,$permission,$showcredits) = @_; |
my ($r,$context,$permission,$showcredits) = @_; |
&Apache::loncommon::load_tmp_file($r); |
my $datatoken = &Apache::loncommon::valid_datatoken($env{'form.datatoken'}); |
|
if ($datatoken ne '') { |
|
&Apache::loncommon::load_tmp_file($r,$datatoken); |
|
} |
my @userdata=&Apache::loncommon::upfile_record_sep(); |
my @userdata=&Apache::loncommon::upfile_record_sep(); |
if($env{'form.noFirstLine'}){shift(@userdata);} |
if($env{'form.noFirstLine'}){shift(@userdata);} |
my @keyfields = split(/\,/,$env{'form.keyfields'}); |
my @keyfields = split(/\,/,$env{'form.keyfields'}); |
Line 5833 sub roles_by_context {
|
Line 5843 sub roles_by_context {
|
} elsif ($context eq 'author') { |
} elsif ($context eq 'author') { |
@allroles = ('ca','aa'); |
@allroles = ('ca','aa'); |
} elsif ($context eq 'domain') { |
} elsif ($context eq 'domain') { |
@allroles = ('li','ad','dg','dh','sc','au','dc'); |
@allroles = ('li','ad','dg','dh','da','sc','au','dc'); |
} |
} |
return @allroles; |
return @allroles; |
} |
} |