version 1.248, 2006/11/12 06:29:33
|
version 1.250, 2006/11/13 15:02:58
|
Line 1001 sub log_docs {
|
Line 1001 sub log_docs {
|
my $parmidx; |
my $parmidx; |
my %parmaction=(); |
my %parmaction=(); |
my %parmvalue=(); |
my %parmvalue=(); |
|
my $changedflag; |
|
|
sub snapshotbefore { |
sub snapshotbefore { |
@oldresources=@LONCAPA::map::resources; |
@oldresources=@LONCAPA::map::resources; |
Line 1008 sub log_docs {
|
Line 1009 sub log_docs {
|
$parmidx=undef; |
$parmidx=undef; |
%parmaction=(); |
%parmaction=(); |
%parmvalue=(); |
%parmvalue=(); |
|
$changedflag=0; |
} |
} |
|
|
sub remember_parms { |
sub remember_parms { |
Line 1015 sub log_docs {
|
Line 1017 sub log_docs {
|
$parmidx=$idx; |
$parmidx=$idx; |
$parmaction{$parameter}=$action; |
$parmaction{$parameter}=$action; |
$parmvalue{$parameter}=$value; |
$parmvalue{$parameter}=$value; |
|
$changedflag=1; |
} |
} |
|
|
sub log_differences { |
sub log_differences { |
my $r=shift; |
my ($coursenum,$coursedom,$folder)=@_; |
my %storehash=('folder' => $env{'form.folder'}); |
my %storehash=('folder' => '/uploaded/'.$coursedom.'/'.$coursenum.'/userfiles/'.$folder); |
if ($parmidx) { |
if ($parmidx) { |
$storehash{'parameter_idx'}=$parmidx; |
$storehash{'parameter_idx'}=$parmidx; |
$storehash{'parameter_res'}=$oldresources[$parmidx]; |
$storehash{'parameter_res'}=$oldresources[$parmidx]; |
Line 1036 sub log_docs {
|
Line 1039 sub log_docs {
|
if ($LONCAPA::map::resources[$idx] ne $oldresources[$idx]) { |
if ($LONCAPA::map::resources[$idx] ne $oldresources[$idx]) { |
$storehash{'before_resources_'.$idx}=$oldresources[$idx]; |
$storehash{'before_resources_'.$idx}=$oldresources[$idx]; |
$storehash{'after_resources_'.$idx}=$LONCAPA::map::resources[$idx]; |
$storehash{'after_resources_'.$idx}=$LONCAPA::map::resources[$idx]; |
|
$changedflag=1; |
} |
} |
if ($LONCAPA::map::order[$idx] ne $oldorder[$idx]) { |
if ($LONCAPA::map::order[$idx] ne $oldorder[$idx]) { |
$storehash{'before_order_'.$idx}=$oldorder[$idx]; |
$storehash{'before_order_'.$idx}=$oldorder[$idx]; |
$storehash{'after_order_'.$idx}=$LONCAPA::map::order[$idx]; |
$storehash{'after_order_'.$idx}=$LONCAPA::map::order[$idx]; |
$storehash{'before_order_res_'.$idx}=$oldresources[$idx]; |
$storehash{'before_order_res_'.$idx}=$oldresources[$idx]; |
$storehash{'after_order_res_'.$idx}=$LONCAPA::map::resources[$idx]; |
$storehash{'after_order_res_'.$idx}=$LONCAPA::map::resources[$idx]; |
|
$changedflag=1; |
} |
} |
} |
} |
&log_docs(\%storehash); |
if ($changedflag) { &log_docs(\%storehash); } |
} |
} |
} |
} |
|
|
Line 1080 sub docs_change_log {
|
Line 1085 sub docs_change_log {
|
$r->print('<nobr>'.&mt('[_1] Records',$countselect).'</nobr>'. |
$r->print('<nobr>'.&mt('[_1] Records',$countselect).'</nobr>'. |
'<input type="submit" value="'.&mt('Display').'" /></form>'); |
'<input type="submit" value="'.&mt('Display').'" /></form>'); |
$r->print(&Apache::loncommon::start_data_table().&Apache::loncommon::start_data_table_header_row(). |
$r->print(&Apache::loncommon::start_data_table().&Apache::loncommon::start_data_table_header_row(). |
'<th>'.&mt('Time').'</th><th>'.&mt('User').'</th><th>'.&mt('Extent').'</th><th>'.&mt('Users').'</th><th>'. |
'<th>'.&mt('Time').'</th><th>'.&mt('User').'</th><th>'.&mt('Folder').'</th><th>'.&mt('Users').'</th><th>'. |
&mt('Parameter').'</th><th>'.&mt('Part').'</th><th>'.&mt('New Value').'</th><th>'.&mt('Announce').'</th>'. |
&mt('Parameter').'</th><th>'.&mt('Part').'</th><th>'.&mt('New Value').'</th><th>'.&mt('Announce').'</th>'. |
&Apache::loncommon::end_data_table_header_row()); |
&Apache::loncommon::end_data_table_header_row()); |
my $shown=0; |
my $shown=0; |
Line 1109 sub docs_change_log {
|
Line 1114 sub docs_change_log {
|
<td>'.$about_me_link. |
<td>'.$about_me_link. |
'<br /><tt>'.$docslog{$id}{'exe_uname'}. |
'<br /><tt>'.$docslog{$id}{'exe_uname'}. |
':'.$docslog{$id}{'exe_udom'}.'</tt>'. |
':'.$docslog{$id}{'exe_udom'}.'</tt>'. |
$send_msg_link.'</td>'); |
$send_msg_link.'</td><td>'. |
|
&Apache::lonnet::gettitle($docslog{$id}{'logentry'}{'folder'}).'</td>'); |
|
|
$r->print(&Apache::loncommon::end_data_table_row()); |
$r->print(&Apache::loncommon::end_data_table_row()); |
$shown++; |
$shown++; |
Line 1177 sub editor {
|
Line 1183 sub editor {
|
&LONCAPA::map::delparameter($idx,'parameter_encrypturl'); |
&LONCAPA::map::delparameter($idx,'parameter_encrypturl'); |
&remember_parms($idx,'encrypturl','del'); |
&remember_parms($idx,'encrypturl','del'); |
} |
} |
|
# store the changed version |
|
($errtext,$fatal)=&storemap($coursenum,$coursedom,$folder.'.'.$container); |
|
if ($fatal) { |
|
$r->print('<p><font color="red">'.$errtext.'</font></p>'); |
|
return; |
|
} |
} |
} |
|
|
if ($env{'form.newpos'}) { |
if ($env{'form.newpos'}) { |
Line 1329 sub editor {
|
Line 1341 sub editor {
|
} |
} |
} |
} |
# Store the changed version |
# Store the changed version |
($errtext,$fatal)=group_import($coursenum, $coursedom, $folder, |
($errtext,$fatal)=&group_import($coursenum, $coursedom, $folder, |
$container,'londocs',@imports); |
$container,'londocs',@imports); |
if ($fatal) { |
if ($fatal) { |
$r->print('<p><font color="red">'.$errtext.'</font></p>'); |
$r->print('<p><font color="red">'.$errtext.'</font></p>'); |
Line 1356 sub editor {
|
Line 1368 sub editor {
|
$r->print('<p><font color="red">'.&mt('No map selected.').'</font></p>'); |
$r->print('<p><font color="red">'.&mt('No map selected.').'</font></p>'); |
} |
} |
} |
} |
&log_differences($r); |
&log_differences($coursenum,$coursedom, |
|
$folder.'.'.$container); |
} |
} |
# ---------------------------------------------------------------- End commands |
# ---------------------------------------------------------------- End commands |
# ---------------------------------------------------------------- Print screen |
# ---------------------------------------------------------------- Print screen |