version 1.271, 2007/01/29 21:18:53
|
version 1.275, 2007/06/11 21:27:23
|
Line 936 sub group_import {
|
Line 936 sub group_import {
|
$LONCAPA::map::order[$#LONCAPA::map::order+1]=$idx; |
$LONCAPA::map::order[$#LONCAPA::map::order+1]=$idx; |
my $ext = 'false'; |
my $ext = 'false'; |
if ($url=~m{^http://} || $url=~m{^https://}) { $ext = 'true'; } |
if ($url=~m{^http://} || $url=~m{^https://}) { $ext = 'true'; } |
$url =~ &LONCAPA::map::qtunescape($url); |
$url = &LONCAPA::map::qtunescape($url); |
$name =~ &LONCAPA::map::qtunescape($name); |
$name = &LONCAPA::map::qtunescape($name); |
$LONCAPA::map::resources[$idx] = |
$LONCAPA::map::resources[$idx] = |
join ':', ($name, $url, $ext, 'normal', 'res'); |
join ':', ($name, $url, $ext, 'normal', 'res'); |
} |
} |
Line 1586 sub ask_for_embedded_content {
|
Line 1586 sub ask_for_embedded_content {
|
foreach my $embed_file (keys(%{$allfiles})) { |
foreach my $embed_file (keys(%{$allfiles})) { |
$upload_output .= &Apache::loncommon::start_data_table_row(). |
$upload_output .= &Apache::loncommon::start_data_table_row(). |
'<td>'.$embed_file.'</td><td>'; |
'<td>'.$embed_file.'</td><td>'; |
if ($args->{'error_on_invalid_names'} |
if ($args->{'ignore_remote_references'} |
|
&& $embed_file =~ m{^\w+://}) { |
|
$upload_output.='<span class="LC_warning">'.&mt("URL points to other server.").'</span>'; |
|
} elsif ($args->{'error_on_invalid_names'} |
&& $embed_file ne &Apache::lonnet::clean_filename($embed_file,{'keep_path' => 1,})) { |
&& $embed_file ne &Apache::lonnet::clean_filename($embed_file,{'keep_path' => 1,})) { |
|
|
$upload_output.='<span class="LC_warning">'.&mt("Invalid characters").'</span>'; |
$upload_output.='<span class="LC_warning">'.&mt("Invalid characters").'</span>'; |
|
|
} else { |
} else { |
|
|
$upload_output .=' |
$upload_output .=' |
<input name="embedded_item_'.$num.'" type="file" value="bob" /> |
<input name="embedded_item_'.$num.'" type="file" value="bob" /> |
<input name="embedded_orig_'.$num.'" type="hidden" value="'.&escape($embed_file).'" />'; |
<input name="embedded_orig_'.$num.'" type="hidden" value="'.&escape($embed_file).'" />'; |
Line 1611 sub ask_for_embedded_content {
|
Line 1616 sub ask_for_embedded_content {
|
} |
} |
$upload_output .= &Apache::loncommon::end_data_table().'<br /> |
$upload_output .= &Apache::loncommon::end_data_table().'<br /> |
<input type ="hidden" name="number_embedded_items" value="'.$num.'" /> |
<input type ="hidden" name="number_embedded_items" value="'.$num.'" /> |
<input type ="submit" value="Complete upload" /> |
<input type ="submit" value="'.&mt('Upload Listed Files').'" /> |
|
'.&mt('(only files for which a location has been provided will be uploaded)').' |
</form>'; |
</form>'; |
return $upload_output; |
return $upload_output; |
} |
} |
Line 1880 END
|
Line 1886 END
|
(&LONCAPA::map::getparameter($orderidx, |
(&LONCAPA::map::getparameter($orderidx, |
'parameter_randompick'))[0]. |
'parameter_randompick'))[0]. |
'" />'. |
'" />'. |
'<font size="-2"><a href="javascript:void(0)">'.&mt('Store').'</a></font></label>'; |
'<font size="-2"><a href="javascript:void(0)">'.&mt('Save').'</a></font></label>'; |
|
|
} |
} |
if ($ispage) { |
if ($ispage) { |
Line 2139 sub checkversions {
|
Line 2145 sub checkversions {
|
if (&Apache::lonnet::put('resourceversions',\%newsetversions, |
if (&Apache::lonnet::put('resourceversions',\%newsetversions, |
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$env{'course.'.$env{'request.course.id'}.'.num'}) eq 'ok') { |
$env{'course.'.$env{'request.course.id'}.'.num'}) eq 'ok') { |
$r->print('<h1>'.&mt('Your Version Settings have been Stored').'</h1>'); |
$r->print('<h1>'.&mt('Your Version Settings have been Saved').'</h1>'); |
} else { |
} else { |
$r->print('<h1><font color="red">'.&mt('An Error Occured while Attempting to Store your Version Settings').'</font></h1>'); |
$r->print('<h1><font color="red">'.&mt('An Error Occured while Attempting to Save your Version Settings').'</font></h1>'); |
} |
} |
&mark_hash_old(); |
&mark_hash_old(); |
} |
} |