'.
&mt('Dump '.$type.
@@ -141,7 +135,8 @@ sub clean {
$title=~s/[^\w\/\!\$\%\^\*\-\_\=\+\;\:\,\\\|\`\~]+/\_/gs;
return $title;
}
-# -------------------------------------------------------- Actually dump course
+
+
sub dumpcourse {
my ($r) = @_;
@@ -161,15 +156,15 @@ sub dumpcourse {
my $title=$env{'form.authorfolder'};
$title=&clean($title);
my %replacehash=();
- foreach (keys %env) {
- if ($_=~/^form\.namefor\_(.+)/) {
- $replacehash{$1}=$env{$_};
+ foreach my $key (keys(%env)) {
+ if ($key=~/^form\.namefor\_(.+)/) {
+ $replacehash{$1}=$env{$key};
}
}
my $crs='/uploaded/'.$env{'request.course.id'}.'/';
$crs=~s/\_/\//g;
- foreach (keys %replacehash) {
- my $newfilename=$title.'/'.$replacehash{$_};
+ foreach my $item (keys(%replacehash)) {
+ my $newfilename=$title.'/'.$replacehash{$item};
$newfilename=~s/\.(\w+)$//;
my $ext=$1;
$newfilename=&clean($newfilename);
@@ -184,16 +179,16 @@ sub dumpcourse {
unless(mkdir($makepath,0777)) { $fail=1; }
}
}
- $r->print(' '.$_.' => '.$newfilename.': ');
+ $r->print(' '.$item.' => '.$newfilename.': ');
if (my $fh=Apache::File->new('>'.$path.'/'.$newfilename)) {
- if ($_=~/\.(sequence|page|html|htm|xml|xhtml)$/) {
+ if ($item=~/\.(sequence|page|html|htm|xml|xhtml)$/) {
print $fh &Apache::lonclonecourse::rewritefile(
- &Apache::lonclonecourse::readfile($env{'request.course.id'},$_),
+ &Apache::lonclonecourse::readfile($env{'request.course.id'},$item),
(%replacehash,$crs => '')
);
} else {
print $fh
- &Apache::lonclonecourse::readfile($env{'request.course.id'},$_);
+ &Apache::lonclonecourse::readfile($env{'request.course.id'},$item);
}
$fh->close();
} else {
@@ -211,8 +206,8 @@ sub dumpcourse {
$r->print(
'
'.&mt('Select the Construction Space').'
print('');
if ($allowed) {
$r->print('
+
+
+
+ENDOPTIONFORM
+
+}
+
+
+sub generate_edit_table {
+ my ($tid,$content,$navigation,$varcd,$namehash_ref,$orderhash_ref) = @_;
+ my %namehash = %{$namehash_ref}; #name verlinkt mit id
+ my %orderhash = %{$orderhash_ref}; #name mit kürzel verlinkt mit name
+ my $form;
+
+
+
+ $form = '
';
+ foreach my $field (keys(%namehash)){
+ $form .= '
'.$namehash{$field}.'
';
+ }
+ $form .= '
';
+
+ return $form;
+}
sub editing_js {
my ($udom,$uname) = @_;
my $now = time();
+ my %lt = &Apache::lonlocal::texthash(
+ p_mnf => 'Name of New Folder',
+ t_mnf => 'New Folder',
+ p_mnp => 'Name of New Page',
+ t_mnp => 'New Page',
+ p_mxu => 'Title for the Uploaded Score',
+ p_msp => 'Title for the Page',
+ p_msb => 'Title for the Problem',
+ p_mdb => 'Title for the Drop Box',
+ p_mbb => 'Title for the Discussion Board',
+ p_mab => "Enter user:domain for User's 'About Me' Page",
+ p_mab2 => "About [_99]",
+ p_mab_alrt1 => 'Not a valid user:domain',
+ p_mab_alrt2 => 'Please enter both user and domain in the format user:domain',
+ p_chn => 'New Title',
+ p_rmr1 => 'WARNING: Removing a resource makes associated grades and scores inaccessible!',
+ p_rmr2a => 'Remove[_99]',
+ p_rmr2b => '?[_99]',
+ p_ctr1a => 'WARNING: Cutting a resource makes associated grades and scores inaccessible!',
+ p_ctr1b => 'Grades remain inaccessible if resource is pasted into another folder.',
+ p_ctr2a => 'Cut[_98]',
+ p_ctr2b => '?[_98]'
+ );
return <