version 1.200, 2007/01/16 07:36:10
|
version 1.209, 2007/06/15 23:01:07
|
Line 265 sub fieldnames {
|
Line 265 sub fieldnames {
|
'correct' => 'Material appears to be correct', |
'correct' => 'Material appears to be correct', |
'technical' => 'Resource is technically correct', |
'technical' => 'Resource is technically correct', |
'avetries' => 'Average number of tries till solved', |
'avetries' => 'Average number of tries till solved', |
'stdno' => 'Total number of students who have worked on this problem', |
'stdno' => 'Statistics calculated for number of students', |
'difficulty' => 'Degree of difficulty', |
'difficulty' => 'Degree of difficulty', |
'disc' => 'Degree of discrimination', |
'disc' => 'Degree of discrimination', |
'dependencies' => 'Resources used by this resource', |
'dependencies' => 'Resources used by this resource', |
Line 631 sub prettyinput {
|
Line 631 sub prettyinput {
|
if ($meta_options{$item}) { |
if ($meta_options{$item}) { |
push(@cur_values_inst,$item); |
push(@cur_values_inst,$item); |
} else { |
} else { |
if ($item ne 'Not Specified') { |
if ($item ne '') { |
$cur_values_stu .= $item.','; |
$cur_values_stu .= $item.','; |
} |
} |
} |
} |
} |
} |
|
$cur_values_stu =~ s/,$//; |
my @key_order = sort(keys(%meta_options)); |
my @key_order = sort(keys(%meta_options)); |
unshift (@key_order,'Not Specified'); |
unshift(@key_order,''); |
$meta_options{'Not Specified'} = 'Not Specified'; |
$meta_options{''} = 'Not specified'; |
$meta_options{'select_form_order'} = \@key_order; |
$meta_options{'select_form_order'} = \@key_order; |
} else { |
} else { |
$cur_values_stu = $value; |
$cur_values_stu = $value; |
Line 803 sub handler {
|
Line 804 sub handler {
|
&present_editable_metadata($r,$uri,'groups'); |
&present_editable_metadata($r,$uri,'groups'); |
} elsif ($uri=~m|^/~|) { |
} elsif ($uri=~m|^/~|) { |
# Construction space |
# Construction space |
$r->print(&Apache::loncommon::start_page('Edit Catalog nformation', |
$r->print(&Apache::loncommon::start_page('Edit Catalog Information', |
undef, |
"\n".'<script type="text/javascript">'."\n". |
|
&Apache::loncommon::browser_and_searcher_javascript(). |
|
"\n".'</script>', |
{'domain' => $resdomain,})); |
{'domain' => $resdomain,})); |
&present_editable_metadata($r,$uri); |
&present_editable_metadata($r,$uri); |
} else { |
} else { |
Line 1023 sub print_dynamic_metadata {
|
Line 1026 sub print_dynamic_metadata {
|
# |
# |
# New assessment statistics |
# New assessment statistics |
$r->print('<h4>'. |
$r->print('<h4>'. |
&mt('Detailed Assessment Statistical Data'). |
&mt('Recent Detailed Assessment Statistical Data'). |
'</h4>'); |
'</h4>'); |
my $table = '<table cellspacing="2" border="0">'. |
my $table = '<table cellspacing="2" border="0">'. |
'<tr>'. |
'<tr>'. |
'<th>Course</th>'. |
'<th>'.&mt('Course').'</th>'. |
'<th>Section(s)</th>'. |
'<th>'.&mt('Section(s)').'</th>'. |
'<th>Num Students</th>'. |
'<th>'.&mt('Num Student').'s</th>'. |
'<th>Mean Tries</th>'. |
'<th>'.&mt('Mean Tries').'</th>'. |
'<th>Degree of Difficulty</th>'. |
'<th>'.&mt('Degree of Difficulty').'</th>'. |
'<th>Degree of Discrimination</th>'. |
'<th>'.&mt('Degree of Discrimination').'</th>'. |
'<th>Time of computation</th>'. |
'<th>'.&mt('Time of computation').'</th>'. |
'</tr>'.$/; |
'</tr>'.$/; |
foreach my $identifier (sort(keys(%{$dynmeta{'stats'}}))) { |
foreach my $identifier (sort(keys(%{$dynmeta{'stats'}}))) { |
my $data = $dynmeta{'stats'}->{$identifier}; |
my $data = $dynmeta{'stats'}->{$identifier}; |
Line 1209 ENDBOMBS
|
Line 1212 ENDBOMBS
|
<input type="submit" name="clearmsg" value="$clear" /> |
<input type="submit" name="clearmsg" value="$clear" /> |
ENDDEL |
ENDDEL |
} else { |
} else { |
$r->print('<a href="'.$disuri.'" />'.$goback.'</a>'); |
$r->print('<p><a href="'.$disuri.'">'.$goback.'</a></p>'); |
|
if ($env{'form.clearmsg'}) { |
|
my ($diruri) = ($disuri =~ m{(.*/)[^/]*}); |
|
$r->print('<p><a href="'.$diruri.'">'. |
|
&mt('Back To Directory').'</a></p>'); |
|
} |
} |
} |
$r->print('<br />'.$bombs); |
$r->print('<br />'.$bombs); |
} else { |
} else { |
Line 1249 ENDDEL
|
Line 1257 ENDDEL
|
<h1>$displayfile</h1> |
<h1>$displayfile</h1> |
<form method="post" action="" name="defaultmeta"> |
<form method="post" action="" name="defaultmeta"> |
ENDEDIT |
ENDEDIT |
$r->print('<script type="JavaScript">'. |
|
&Apache::loncommon::browser_and_searcher_javascript(). |
|
'</script>'); |
|
my %lt=&fieldnames($file_type); |
my %lt=&fieldnames($file_type); |
my $output; |
my $output; |
my @fields; |
my @fields; |
Line 1307 ENDEDIT
|
Line 1312 ENDEDIT
|
$Apache::lonpublisher::metadatafields{'owner'} = |
$Apache::lonpublisher::metadatafields{'owner'} = |
$env{'user.name'}.':'.$env{'user.domain'}; |
$env{'user.name'}.':'.$env{'user.domain'}; |
} |
} |
|
if (! $Apache::lonpublisher::metadatafields{'author'}) { |
|
$Apache::lonpublisher::metadatafields{'author'} = |
|
&Apache::loncommon::plainname($env{'user.name'}, |
|
$env{'user.domain'}); |
|
} |
if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') { |
if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none') { |
|
|
if ($file_type eq 'portfolio') { |
if ($file_type eq 'portfolio') { |
Line 1340 ENDEDIT
|
Line 1350 ENDEDIT
|
my $row_alt = 1; |
my $row_alt = 1; |
foreach my $field_name (@fields) { |
foreach my $field_name (@fields) { |
if (defined($env{'form.new_'.$field_name})) { |
if (defined($env{'form.new_'.$field_name})) { |
$Apache::lonpublisher::metadatafields{$field_name}= |
my @values = &Apache::loncommon::get_env_multiple('form.new_'.$field_name); |
join(',',&Apache::loncommon::get_env_multiple('form.new_'.$field_name)); |
my $newvalue = ''; |
|
foreach my $item (@values) { |
|
if ($item ne '') { |
|
$newvalue .= $item.','; |
|
} |
|
} |
|
$newvalue =~ s/,$//; |
|
$Apache::lonpublisher::metadatafields{$field_name}=$newvalue; |
} |
} |
if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none' |
if ($Apache::lonpublisher::metadatafields{'courserestricted'} ne 'none' |
&& exists($env{$Apache::lonpublisher::metadatafields{'courserestricted'}.'.metadata.'.$field_name.'.options'})) { |
&& exists($env{$Apache::lonpublisher::metadatafields{'courserestricted'}.'.metadata.'.$field_name.'.options'})) { |
Line 1374 ENDEDIT
|
Line 1391 ENDEDIT
|
$r->print($result); |
$r->print($result); |
} |
} |
$r->print($output.'<br /><input type="submit" name="store" value="'. |
$r->print($output.'<br /><input type="submit" name="store" value="'. |
&mt('Store Catalog Information').'" />'); |
&mt('Save Catalog Information').'" />'); |
|
|
if ($file_type eq 'portfolio' || $file_type eq 'groups') { |
if ($file_type eq 'portfolio' || $file_type eq 'groups') { |
my ($port_path,$group) = &get_port_path_and_group($uri); |
my ($port_path,$group) = &get_port_path_and_group($uri); |