version 1.104, 2006/06/16 22:37:10
|
version 1.107, 2006/06/20 03:13:08
|
Line 166 sub display_directory {
|
Line 166 sub display_directory {
|
} |
} |
my $href_location="/uploaded/$udom/$uname/$port_path".$current_path; |
my $href_location="/uploaded/$udom/$uname/$port_path".$current_path; |
my $href_edit_location="/editupload/$udom/$uname/$port_path".$current_path; |
my $href_edit_location="/editupload/$udom/$uname/$port_path".$current_path; |
|
my @dir_lines; |
|
my %versioned; |
foreach my $line (sort |
foreach my $line (sort |
{ |
{ |
my ($afile)=split('&',$a,2); |
my ($afile)=split('&',$a,2); |
Line 176 sub display_directory {
|
Line 178 sub display_directory {
|
#$dom |
#$dom |
my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16); |
my ($filename,$dom,undef,$testdir,undef,undef,undef,undef,$size,undef,$mtime,undef,undef,undef,$obs,undef)=split(/\&/,$line,16); |
$filename =~ s/\s+$//; |
$filename =~ s/\s+$//; |
|
my ($fname,$version,$extension) = &Apache::grades::file_name_version_ext($filename); |
|
if ($version) { |
|
$versioned{$fname} .= $version.","; |
|
} |
|
push(@dir_lines, [$filename,$dom,$testdir,$size,$mtime,$obs]); |
|
} |
|
foreach my $line (@dir_lines) { |
|
my ($filename,$dom,$testdir,$size,$mtime,$obs) = @$line; |
|
my ($fname,$version,$extension) = &Apache::grades::file_name_version_ext($filename); |
if (($filename ne '.') && ($filename ne '..') && ($filename !~ /\.meta$/ ) && ($filename !~ /(.*)\.(\d+)\.([^\.]*)$/)) { |
if (($filename ne '.') && ($filename ne '..') && ($filename !~ /\.meta$/ ) && ($filename !~ /(.*)\.(\d+)\.([^\.]*)$/)) { |
if ($dirptr&$testdir) { |
if ($dirptr&$testdir) { |
if ($select_mode eq 'true'){ |
if ($select_mode eq 'true'){ |
Line 188 sub display_directory {
|
Line 199 sub display_directory {
|
$r->print('</tr>'); |
$r->print('</tr>'); |
} else { |
} else { |
$r->print('<tr bgcolor="#CCCCFF">'); |
$r->print('<tr bgcolor="#CCCCFF">'); |
my $fullpath = $current_path.$filename; |
my $version_flag; |
|
if (exists($versioned{$fname})) { |
|
$version_flag = "*"; |
|
} else { |
|
$version_flag = ""; |
|
} |
|
my $fullpath = $current_path.$filename; |
$fullpath = &prepend_group($fullpath,$group); |
$fullpath = &prepend_group($fullpath,$group); |
if ($select_mode eq 'true'){ |
if ($select_mode eq 'true'){ |
$r->print('<td><input type="checkbox" name="checkfile" value="'.$filename.'"'); |
$r->print('<td><input type="checkbox" name="checkfile" value="'.$filename.'"'); |
Line 609 sub access_setting_table {
|
Line 626 sub access_setting_table {
|
if ($end == 0) { |
if ($end == 0) { |
$pub_noend = 'checked="checked"'; |
$pub_noend = 'checked="checked"'; |
} |
} |
$pub_action = '<td><input type="checkbox" name="delete" value="'.$num. |
$pub_action = '<td><label> |
'" />'.&mt('Delete').'<br /><input type="checkbox" '. |
<input type="checkbox" name="delete" value="'.$num. |
'name="update" value="'.$num.'" />'.&mt('Update'). |
'" />'.&mt('Delete').' |
|
</label> <br /> |
|
<label><input type="checkbox" name="update" value="'. |
|
$num.'" />'.&mt('Update'). |
|
'</label>'. |
'<input type="hidden" name="scope_'.$num.'"'. |
'<input type="hidden" name="scope_'.$num.'"'. |
' value="public" /></td>'; |
' value="public" /></td>'; |
$pub_startdate = &Apache::lonhtmlcommon::date_setter('portform', |
$pub_startdate = &Apache::lonhtmlcommon::date_setter('portform', |
Line 620 sub access_setting_table {
|
Line 641 sub access_setting_table {
|
$pub_enddate = &Apache::lonhtmlcommon::date_setter('portform', |
$pub_enddate = &Apache::lonhtmlcommon::date_setter('portform', |
'enddate_'.$num,$end,undef,undef,undef,1,undef, |
'enddate_'.$num,$end,undef,undef,undef,1,undef, |
undef,undef,1). |
undef,undef,1). |
' <nobr><input type="checkbox" name="noend_'. |
' <nobr><label> |
$num.'" '.$pub_noend.' />'.&mt('No end date').'</nobr>'; |
<input type="checkbox" name="noend_'. |
|
$num.'" '.$pub_noend.' />'.&mt('No end date'). |
|
'</label></nobr>'; |
} else { |
} else { |
$pub_action = '<input type="checkbox" name="activate" value="0" />'. |
$pub_action = '<label>'. |
&mt('Activate'). |
'<input type="checkbox" name="activate" value="0" />'. |
|
&mt('Activate').'</label>'. |
'<input type="hidden" name="scope_0" value="public" />'; |
'<input type="hidden" name="scope_0" value="public" />'; |
$pub_startdate = &Apache::lonhtmlcommon::date_setter('portform', |
$pub_startdate = &Apache::lonhtmlcommon::date_setter('portform', |
'startdate_0',$now,undef,undef,undef,1,undef, |
'startdate_0',$now,undef,undef,undef,1,undef, |
Line 632 sub access_setting_table {
|
Line 656 sub access_setting_table {
|
$pub_enddate = &Apache::lonhtmlcommon::date_setter('portform', |
$pub_enddate = &Apache::lonhtmlcommon::date_setter('portform', |
'enddate_0',$then,,undef,undef,undef,1,undef, |
'enddate_0',$then,,undef,undef,undef,1,undef, |
undef,undef,1). |
undef,undef,1). |
'  <nobr><input type="checkbox" '. |
'  <nobr><label><input type="checkbox" '. |
'name="noend_0" />'.&mt('No end date'). |
'name="noend_0" />'.&mt('No end date'). |
'</nobr>'; |
'</label></nobr>'; |
|
|
} |
} |
$r->print('<td>'.$pub_action.'</td><td>'.&mt('Start: ').$pub_startdate. |
$r->print('<td>'.$pub_action.'</td><td>'.&mt('Start: ').$pub_startdate. |