version 1.132, 2005/11/15 22:06:50
|
version 1.135, 2006/02/07 16:21:26
|
Line 172 sub print_main_menu {
|
Line 172 sub print_main_menu {
|
permission => &Apache::lonnet::auto_run($cnum,$cdom), |
permission => &Apache::lonnet::auto_run($cnum,$cdom), |
url => '/adm/populate', |
url => '/adm/populate', |
}, |
}, |
{ text => 'Create a new group', |
# { text => 'Create a new group', |
help => 'Course_Create_Group', |
# help => 'Course_Create_Group', |
permission => $grp_manage_permission, |
# permission => $grp_manage_permission, |
url => '/adm/coursegroups?refpage=enrl&action=create', |
# url => '/adm/coursegroups?refpage=enrl&action=create', |
}, |
# }, |
{ text => 'Modify an existing group', |
# { text => 'Modify an existing group', |
help => 'Course_Modify_Group', |
# help => 'Course_Modify_Group', |
permission => $grp_manage_permission, |
# permission => $grp_manage_permission, |
url => '/adm/coursegroups?refpage=enrl&action=modify', |
# url => '/adm/coursegroups?refpage=enrl&action=modify', |
}, |
# }, |
{ text => 'Delete an existing group', |
# { text => 'Delete an existing group', |
help => 'Course_Delete_Group', |
# help => 'Course_Delete_Group', |
permission => $grp_manage_permission, |
# permission => $grp_manage_permission, |
url => '/adm/coursegroups?refpage=enrl&action=delete', |
# url => '/adm/coursegroups?refpage=enrl&action=delete', |
}, |
# }, |
{ text => 'Enter an existing group', |
# { text => 'Enter an existing group', |
help => 'Course_Display_Group', |
# help => 'Course_Display_Group', |
permission => $grp_view_permission, |
# permission => $grp_view_permission, |
url => '/adm/coursegroups?refpage=enrl&action=view', |
# url => '/adm/coursegroups?refpage=enrl&action=view', |
}, |
# }, |
); |
); |
my $menu_html = ''; |
my $menu_html = ''; |
foreach my $menu_item (@menu) { |
foreach my $menu_item (@menu) { |
Line 1258 sub show_class_list {
|
Line 1258 sub show_class_list {
|
if ($sortby !~ /^(username|domain|section|fullname|id|start|end|type)$/) { |
if ($sortby !~ /^(username|domain|section|fullname|id|start|end|type)$/) { |
$sortby = 'username'; |
$sortby = 'username'; |
} |
} |
|
if (! exists($env{'form.displayphotos'})) { |
|
$env{'form.displayphotos'} = 'off'; |
|
} |
|
my $displayphotos = $env{'form.displayphotos'}; |
|
|
# Print out header |
# Print out header |
unless ($mode eq 'autoenroll') { |
unless ($mode eq 'autoenroll') { |
$r->print(<<END); |
$r->print(<<END); |
Line 1266 END
|
Line 1271 END
|
} |
} |
$r->print(<<END); |
$r->print(<<END); |
<input type="hidden" name="sortby" value="$sortby" /> |
<input type="hidden" name="sortby" value="$sortby" /> |
|
<input type="hidden" name="displayphotos" value="$displayphotos" /> |
END |
END |
if ($mode eq 'html' || $mode eq 'view' || $mode eq 'autoenroll') { |
if ($mode eq 'html' || $mode eq 'view' || $mode eq 'autoenroll') { |
if ($linkto eq 'aboutme') { |
if ($linkto eq 'aboutme') { |
Line 1280 END
|
Line 1286 END
|
'sec' => "section", |
'sec' => "section", |
'start' => "start date", |
'start' => "start date", |
'end' => "end date", |
'end' => "end date", |
'type' => "enroll type/action" |
'type' => "enroll type/action", |
|
'photo' => "photo", |
); |
); |
unless ($mode eq 'autoenroll') { |
unless ($mode eq 'autoenroll') { |
$r->print(<<END); |
$r->print(<<END); |
Line 1288 END
|
Line 1295 END
|
<input type="hidden" name="sdom" value="" /> |
<input type="hidden" name="sdom" value="" /> |
END |
END |
} |
} |
|
if ($env{'course.'.$env{'request.course.id'}.'.internal.showphotos'}) { |
|
$r->print(' |
|
<script type="text/javascript"> |
|
function photowindow(photolink) { |
|
var title = "Photo_Viewer"; |
|
var options = "scrollbars=1,resizable=1,menubar=0"; |
|
options += ",width=240,height=240"; |
|
stdeditbrowser = open(photolink,title,options,"1"); |
|
stdeditbrowser.focus(); |
|
} |
|
</script> |
|
'); |
|
} |
$r->print(" |
$r->print(" |
<p> |
<p> |
<table border=2> |
<table border=2> |
Line 1318 END
|
Line 1338 END
|
</th><th> |
</th><th> |
<a href="javascript:document.studentform.sortby.value='end';document.studentform.submit();">$lt{'end'}</a> |
<a href="javascript:document.studentform.sortby.value='end';document.studentform.submit();">$lt{'end'}</a> |
</th> |
</th> |
</tr> |
|
END |
END |
|
if ($env{'course.'.$env{'request.course.id'}.'.internal.showphotos'}) { |
|
my %photo_options = &Apache::lonlocal::texthash( |
|
'on' => 'Show', |
|
'off' => 'Hide', |
|
); |
|
my $photochg = 'on'; |
|
if ($displayphotos eq 'on') { |
|
$photochg = 'off'; |
|
} |
|
$r->print(' <th>'."\n".' '. |
|
'<a href="javascript:document.studentform.displayphotos.value='. |
|
"'".$photochg."'".';document.studentform.submit();">'. |
|
$photo_options{$photochg}.'</a> '.$lt{'photo'}."\n". |
|
' </th>'."\n"); |
|
} |
|
$r->print(" </tr>\n"); |
} elsif ($mode eq 'csv') { |
} elsif ($mode eq 'csv') { |
# |
# |
# Open a file |
# Open a file |
Line 1457 END
|
Line 1492 END
|
<td>$section</td> |
<td>$section</td> |
<td>$start</td> |
<td>$start</td> |
<td>$end</td> |
<td>$end</td> |
</tr> |
|
END |
END |
|
if ($env{'course.'.$env{'request.course.id'}. |
|
'.internal.showphotos'}) { |
|
if ($displayphotos eq 'on') { |
|
my $imgurl = |
|
&Apache::lonnet::retrievestudentphoto($domain, |
|
$username,'gif', |
|
'thumbnail'); |
|
|
|
$r->print(' <td align="right"><a href="javascript:photowindow('."'".&Apache::lonnet::studentphoto($domain,$username,'jpg')."'".')"><img src="'.$imgurl.'" border="1"></a></td>'); |
|
} else { |
|
$r->print(' <td> </td> '); |
|
} |
|
} |
|
$r->print(' </tr> '); |
} elsif ($mode eq 'csv') { |
} elsif ($mode eq 'csv') { |
next if (! defined($CSVfile)); |
next if (! defined($CSVfile)); |
# no need to bother with $linkto |
# no need to bother with $linkto |