$lt{'hd'}
- ');
$r->print(<
$closebutton $groupimportbutton
@@ -527,7 +549,7 @@ END
# -------------------------------------------------------- Resource Home Button
my $reshome=$env{'course.'.$env{'request.course.id'}.'.reshome'};
if ($reshome) {
- $r->print("print('javascript:document.forms.fileattr.action="'.&Apache::loncommon::inhibit_menu_check($reshome).'";document.forms.fileattr.submit();');
} else {
@@ -541,15 +563,15 @@ END
&Apache::lonhtmlcommon::store_recent('residx',$storeuri,$storeuri);
# -------------------------------------------------- Check All and Uncheck all
if ($env{'form.catalogmode'} eq 'import') {
- $r->print(' ');
- $r->print(' ');
+ $r->print(' ');
+ $r->print(' ');
}
# ----------------- output starting row to the indexed file/directory hierarchy
#$r->print(&initdebug());
#$r->print(&writedebug("Omit:@Omit")) if (@Omit);
#$r->print(&writedebug("Only:@Only")) if (@Only);
$r->print(' ');
- $r->print(&Apache::loncommon::start_data_table("LC_tableOfContent")
+ $r->print(&Apache::loncommon::start_data_table("LC_tableBrowseRes")
.&Apache::loncommon::start_data_table_header_row());
$r->print(" ".&mt('Name')." \n");
$r->print("".&mt('Title')." \n")
@@ -581,6 +603,10 @@ END
if ($hash{'display_attrs_13'} == 1);
$r->print("".&mt("Abstract")." \n")
if ($hash{'display_attrs_14'} == 1);
+ $r->print("".&mt("Grade Level")." \n")
+ if ($hash{'display_attrs_15'} == 1);
+ $r->print("".&mt("Standards")." \n")
+ if ($hash{'display_attrs_16'} == 1);
$r->print(&Apache::loncommon::end_data_table_header_row());
@@ -850,7 +876,7 @@ sub display_line {
my $tabtag='';
my $i=0;
- while ($i<=14) {
+ while ($i<=16) {
$tabtag=join('',$tabtag," ")
if ($i != 9 &&
$hash{'display_attrs_'.$i} == 1);
@@ -871,24 +897,23 @@ sub display_line {
$r->print("\n");
$r->print ('$tabtag");
$r->print(&Apache::loncommon::end_data_table_row());
return OK;
}
# Do we have permission to look at this?
-
- if($filecom[15] ne '1') { return OK if (!&Apache::lonnet::allowed('bre',$pathprefix.$filecom[0])); }
+ if($filecom[15] ne '1') { return OK if ((!&Apache::lonnet::allowed('bre',$pathprefix.$filecom[0])) && (!&Apache::lonnet::allowed('bro',$pathprefix.$filecom[0]))); }
# make absolute links appear on different background
#SB if ($absolute) { $fileclr='#ccdd99'; }
@@ -906,16 +931,16 @@ sub display_line {
$anchor =~ s/\W//g;
$r->print (' ');
$r->print (' ');
- $r->print (' print (' name="'.$msg.'" type="image" class="LC_icon" /> '.
+ $r->print (' print (' alt="'.$msg.'" class="LC_fileicon" /> '.
"\n");
my $quotable_filecom = &Apache::loncommon::escape_single($filecom[0]);
$r->print (' print (' class="LC_icon" />'."\n");
+ $r->print (' class="LC_fileicon" />'."\n");
$r->print (&mt("Domain")." - $listname ");
if (&Apache::lonnet::domain($listname,'description')) {
- $r->print("(".&Apache::lonnet::domain($listname,'description').
+ $r->print(" (".&Apache::lonnet::domain($listname,'description').
")");
}
$r->print("$tabtag");
@@ -936,15 +961,15 @@ $r->print (' '."\n");
$r->print (' ');
- $r->print ('');
+ $r->print (' ');
$r->print (' print (' name="'.$msg.'" type="image" class="LC_indexer_icon" /> '.
+ '.gif" class="LC_fileicon"');
+ $r->print (' alt="'.$msg.'"/>'.
"\n");
my $quotable_curdir = &Apache::loncommon::escape_single($curdir);
$r->print (' ');
+ $iconpath.'quill.gif" class="LC_fileicon" />');
my $domain=(split(m|/|,$startdir))[2];
my $plainname=&Apache::loncommon::plainname($listname,$domain);
$r->print ($listname.' ');
@@ -984,17 +1009,17 @@ $r->print (' ");
$r->print(" ".
"\n");
- $r->print(' ');
+ $r->print(' ');
} elsif ($env{'form.catalogmode'} eq 'import') {
$r->print(" ');
+ $r->print(' ');
$hash{"pre_${fnum}_link"}=$filelink;
$hash{"pre_${fnum}_title"}=$title;
if (!$hash{"pre_${fnum}_title"}) {
@@ -1011,8 +1036,8 @@ $r->print (' \n");
+ $r->print(' ');
$count++;
}
# Sequence open/close icon
@@ -1022,14 +1047,14 @@ $r->print (' ');
$r->print (' ');
- $r->print ('');
+ $r->print (' ');
$r->print (' print (' name="'.$msg.'" type="image" class="LC_icon" /> '.
+ '.gif" class="LC_fileicon"');
+ $r->print (' alt="'.$msg.'" />'.
"\n");
}
# Filetype icons
- $r->print(" \n");
+ $r->print(" \n");
my $quotable_filelink = &Apache::loncommon::escape_single($filelink);
$r->print (" print (' \n");
+ $r->print("\n");
if ($hash{'display_attrs_0'} == 1) {
$r->print(' '.($title eq '' ? ' ' : $title).
' '."\n");
@@ -1081,17 +1106,13 @@ $r->print (' ");
- &dynmetaprint($r,$filelink,'count');
- &dynmetaprint($r,$filelink,'course');
- &dynmetaprint($r,$filelink,'stdno');
- &dynmetaprint($r,$filelink,'avetries');
- &dynmetaprint($r,$filelink,'difficulty');
- &dynmetaprint($r,$filelink,'disc');
- &dynmetaprint($r,$filelink,'clear');
- &dynmetaprint($r,$filelink,'technical');
- &dynmetaprint($r,$filelink,'correct');
- &dynmetaprint($r,$filelink,'helpful');
- &dynmetaprint($r,$filelink,'depth');
+
+ for (qw(count course stdno avetries difficulty disc clear technical
+ correct helpful depth)) {
+
+ dynmetaprint($r,$filelink,$_);
+ }
+
$r->print(" \n");
}
@@ -1114,11 +1135,9 @@ $r->print (' '.($output eq '' ? ' ':$output).
" \n");
}
@@ -1149,6 +1168,18 @@ $r->print (' \n");
}
+ if ($hash{'display_attrs_15'} == 1) {
+ my $gradelevel = &Apache::lonnet::metadata($filelink,'gradelevel');
+ $r->print(' '.($gradelevel eq '' ? ' ' : $gradelevel).
+ " \n");
+ }
+
+ if ($hash{'display_attrs_16'} == 1) {
+ my $standards = &Apache::lonnet::metadata($filelink,'standards');
+ $r->print(' '.($standards eq '' ? ' ' : $standards).
+ " \n");
+ }
+
$r->print(&Apache::loncommon::end_data_table_row());
}
@@ -1167,15 +1198,15 @@ $r->print (' \n");
+ $r->print (' ');
$count++;
}
$r->print (' ');
$r->print (' ');
- $r->print (' print (' name="'.$msg.'" class="LC_icon" /> '.
+ $r->print (' alt="'.$msg.'" class="LC_fileicon" />'.
"\n");
my $quotable_curdir = &Apache::loncommon::escape_single($curdir);
@@ -1183,7 +1214,7 @@ $r->print (' print (''
- .' '.
"\n");
$r->print ("$listname \n");
@@ -1252,6 +1283,19 @@ $r->print (' \n");
}
+ if ($hash{'display_attrs_15'} == 1) {
+ my $gradelevel = &Apache::lonnet::metadata($filelink,'gradelevel');
+ $r->print(' '.($gradelevel eq '' ? ' ' : $gradelevel).
+ " \n");
+ }
+
+ if ($hash{'display_attrs_16'} == 1) {
+ my $standards = &Apache::lonnet::metadata($filelink,'standards');
+ $r->print(' '.($standards eq '' ? ' ' : $standards).
+ " \n");
+ }
+
+
$r->print(&Apache::loncommon::end_data_table_row());
}
@@ -1301,7 +1345,6 @@ sub showpreview {
close(FH);
}
}
- $output=''.$output.' ';
} elsif ($embstyle eq 'img') {
$output=' ';
} elsif ($filelink=~m{^/res/($match_domain)/($match_username)/}) {
@@ -1332,7 +1375,7 @@ sub begin_form {
$uri=&Apache::loncommon::escape_single($uri);
$r->print ('