version 1.76, 2003/06/06 02:24:49
|
version 1.83, 2003/08/15 13:25:28
|
Line 178 sub registerurl {
|
Line 178 sub registerurl {
|
if (($ENV{'browser.interface'} eq 'textual') || |
if (($ENV{'browser.interface'} eq 'textual') || |
($ENV{'environment.remote'} eq 'off') || |
($ENV{'environment.remote'} eq 'off') || |
((($ENV{'request.publicaccess'}) || |
((($ENV{'request.publicaccess'}) || |
(!&Apache::lonnet::is_on_map($ENV{'REQUEST_URI'}))) && |
(!&Apache::lonnet::is_on_map( |
|
&Apache::lonnet::unescape($ENV{'REQUEST_URI'})))) && |
(!$forcereg))) { |
(!$forcereg))) { |
return $result. |
return $result. |
'<script type="text/javascript">function LONCAPAreg(){;} function LONCAPAstale(){}</script>'.$force_title; |
'<script type="text/javascript">function LONCAPAreg(){;} function LONCAPAstale(){}</script>'.$force_title; |
Line 229 sub innerregister {
|
Line 230 sub innerregister {
|
} |
} |
if (&Apache::lonmsg::newmail()) { |
if (&Apache::lonmsg::newmail()) { |
$newmail=($textual? |
$newmail=($textual? |
'<b><a href="/adm/communicate">You have new messages</a></b><br />': |
'<b><a href="/adm/communicate" target="_top">You have new messages</a></b><br />': |
'swmenu.setstatus("you have","messages");'); |
'swmenu.setstatus("you have","messages");'); |
} |
} |
if ($noremote) { |
if ($noremote) { |
Line 245 sub innerregister {
|
Line 246 sub innerregister {
|
my $hwkadd=''; |
my $hwkadd=''; |
if |
if |
($ENV{'request.filename'}=~/\.(problem|exam|quiz|assess|survey|form)$/) { |
($ENV{'request.filename'}=~/\.(problem|exam|quiz|assess|survey|form)$/) { |
if (&Apache::lonnet::allowed('vgr',$ENV{'request.course.id'})) { |
my $crs='/'.$ENV{'request.course.id'}; |
$hwkadd.=&switch('','',7,1,'subm.gif','view sub','missions', |
if ($ENV{'request.course.sec'}) { |
|
$crs.='_'.$ENV{'request.course.sec'}; |
|
} |
|
$crs=~s/\_/\//g; |
|
|
|
if (&Apache::lonnet::allowed('vgr',$crs)) { |
|
$hwkadd.=&switch('','',7,1,'subm.gif','view sub-','missions', |
"gocmd('/adm/grades','submission')", |
"gocmd('/adm/grades','submission')", |
'View user submissions for this assessment resource'); |
'View user submissions for this assessment resource'); |
} |
} |
if (&Apache::lonnet::allowed('mgr',$ENV{'request.course.id'})) { |
if (&Apache::lonnet::allowed('mgr',$crs)) { |
$hwkadd.=&switch('','',7,2,'pgrd.gif','problem','grades', |
$hwkadd.=&switch('','',7,2,'pgrd.gif','problem','grades', |
"gocmd('/adm/grades','gradingmenu')", |
"gocmd('/adm/grades','gradingmenu')", |
'Modify user grades for this assessment resource'); |
'Modify user grades for this assessment resource'); |
} |
} |
if (&Apache::lonnet::allowed('opa',$ENV{'request.course.id'})) { |
if (&Apache::lonnet::allowed('opa',$crs)) { |
$hwkadd.=&switch('','',7,3,'pparm.gif','problem','parms', |
$hwkadd.=&switch('','',7,3,'pparm.gif','problem','parms', |
"gocmd('/adm/parmset','set')", |
"gocmd('/adm/parmset','set')", |
'Modify deadlines, etc, for this assessment resource'); |
'Modify deadlines, etc, for this assessment resource'); |
Line 323 sub innerregister {
|
Line 330 sub innerregister {
|
c&3&1 |
c&3&1 |
s&2&1&back.gif&backward&&gopost('/adm/flip','back:'+currentURL)&Go to the previous resource in the course sequence&1 |
s&2&1&back.gif&backward&&gopost('/adm/flip','back:'+currentURL)&Go to the previous resource in the course sequence&1 |
s&2&3&forw.gif&forward&&gopost('/adm/flip','forward:'+currentURL)&Go to the next resource in the course sequence&3 |
s&2&3&forw.gif&forward&&gopost('/adm/flip','forward:'+currentURL)&Go to the next resource in the course sequence&3 |
s&6&3&catalog.gif&catalog&info&catalog_info()&Show catalog information |
c&6&3 |
s&8&1&eval.gif&evaluate&this&gopost('/adm/evaluate',currentURL)&Provide my evaluation of this resource |
c&8&1 |
s&8&2&fdbk.gif&feedback&discuss&gopost('/adm/feedback',currentURL)&Provide feedback messages or contribute to the course discussion about this resource |
c&8&2 |
s&8&3&prt.gif&prepare&printout&gopost('/adm/printout',currentURL)&Prepare a printable document |
s&8&3&prt.gif&prepare&printout&gopost('/adm/printout',currentURL)&Prepare a printable document |
s&9&1&sbkm.gif&set&bookmark&set_bookmark()&Set a bookmark for this resource&2 |
s&9&1&sbkm.gif&set&bookmark&set_bookmark()&Set a bookmark for this resource&2 |
s&9&2&vbkm.gif&view&bookmark&edit_bookmarks()&Use or edit my bookmark collection&2 |
|
s&9&3&anot.gif&anno-&tations&annotate()&Make notes and annotations about this resource&2 |
s&9&3&anot.gif&anno-&tations&annotate()&Make notes and annotations about this resource&2 |
ENDMENUITEMS |
ENDMENUITEMS |
|
unless ($ENV{'REQUEST_URI'}=~/\/(bulletinboard|smppg|navmaps|syllabus|aboutme)(\?|$)/) { |
|
$menuitems.=(<<ENDREALRES); |
|
s&6&3&catalog.gif&catalog&info&catalog_info()&Show catalog information |
|
s&8&1&eval.gif&evaluate&this&gopost('/adm/evaluate',currentURL,1)&Provide my evaluation of this resource |
|
s&8&2&fdbk.gif&feedback&discuss&gopost('/adm/feedback',currentURL,1)&Provide feedback messages or contribute to the course discussion about this resource |
|
ENDREALRES |
|
} |
my $buttons=''; |
my $buttons=''; |
foreach (split(/\n/,$menuitems)) { |
foreach (split(/\n/,$menuitems)) { |
my ($command,@rest)=split(/\&/,$_); |
my ($command,@rest)=split(/\&/,$_); |
Line 604 sub switch {
|
Line 617 sub switch {
|
# Accessibility |
# Accessibility |
if ($nobreak==2) { return ''; } |
if ($nobreak==2) { return ''; } |
my $text=$top.' '.$bot; |
my $text=$top.' '.$bot; |
$text=~s/\- //; |
$text=~s/\s*\-\s*//gs; |
$inlineremote[10*$row+$col]="\n".($nobreak?' ':'<br />'). |
$inlineremote[10*$row+$col]="\n".($nobreak?' ':'<br />'). |
'<a href="javascript:'.$act.';">'.$text.'</a> '. |
'<a href="javascript:'.$act.';">'.$text.'</a> '. |
($nobreak?'':$desc); |
($nobreak?'':$desc); |
Line 612 sub switch {
|
Line 625 sub switch {
|
# Inline Remote |
# Inline Remote |
if ($nobreak==2) { return ''; } |
if ($nobreak==2) { return ''; } |
my $text=$top.' '.$bot; |
my $text=$top.' '.$bot; |
$text=~s/\- //; |
$text=~s/\s*\-\s*//gs; |
$inlineremote[10*$row+$col]="\n". |
$inlineremote[10*$row+$col]="\n". |
($nobreak==3?'<td width="50%" colspan="2" align="right"':'<tr><td'). |
($nobreak==3?'<td width="50%" colspan="2" align="right"':'<tr><td'). |
' bgcolor="'.$tabbg.'"'.($nobreak==1?' width="50%" colspan="2"':''). |
' bgcolor="'.$tabbg.'"'.($nobreak==1?' width="50%" colspan="2"':''). |
Line 701 sub rawconfig {
|
Line 714 sub rawconfig {
|
$output.=&secondlevel( |
$output.=&secondlevel( |
$uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc); |
$uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc); |
} |
} |
} elsif (($pro=~/p(\w+)/) && ($prt)) { |
} elsif (($pro=~/^p(\w+)/) && ($prt)) { |
if (&Apache::lonnet::allowed($1,$prt)) { |
if (&Apache::lonnet::allowed($1,$prt)) { |
$output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc); |
$output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc); |
} |
} |
Line 709 sub rawconfig {
|
Line 722 sub rawconfig {
|
if ($ENV{'request.course.fn'}) { |
if ($ENV{'request.course.fn'}) { |
$output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc); |
$output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc); |
} |
} |
|
} elsif ($pro =~ /^course_(.*)$/) { |
|
# Check for permissions inside of a course |
|
if (($ENV{'request.course.id'}) && |
|
(&Apache::lonnet::allowed($1,$ENV{'request.course.id'}. |
|
($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:'')) |
|
)) { |
|
$output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc); |
|
} |
} elsif ($pro eq 'author') { |
} elsif ($pro eq 'author') { |
if ($author) { |
if ($author) { |
if ((($prt eq 'rca') && ($ENV{'request.role'}=~/^ca/)) || |
if ((($prt eq 'rca') && ($ENV{'request.role'}=~/^ca/)) || |