version 1.369.2.17, 2012/08/03 17:35:32
|
version 1.369.2.18, 2012/08/03 22:38:35
|
Line 569 sub innerregister {
|
Line 569 sub innerregister {
|
my $timesync = ( $noremote ? '' : 'swmenu.syncclock(1000*'.time.');' ); |
my $timesync = ( $noremote ? '' : 'swmenu.syncclock(1000*'.time.');' ); |
# ============================================================================= |
# ============================================================================= |
# ============================ This is for URLs that actually can be registered |
# ============================ This is for URLs that actually can be registered |
unless ( ($env{'request.noversionuri'}!~m{^/(res/)*adm/}) |
if ( ($env{'request.noversionuri'}!~m{^/(res/)*adm/}) |
|| ($forcereg)) { |
|| ($forcereg)) { |
unless ($noremote) { |
|
# Not registered, graphical |
|
return (<<ENDDONOTREGTHIS); |
|
|
|
<script type="text/javascript"> |
|
// <![CDATA[ |
|
// BEGIN LON-CAPA Internal |
|
var swmenu=null; |
|
|
|
function LONCAPAreg() { |
|
swmenu=$reopen |
|
$timesync |
|
swmenu.currentStale=1; |
|
swmenu.clearbut(2,1); |
|
swmenu.clearbut(2,3); |
|
swmenu.clearbut(8,1); |
|
swmenu.clearbut(8,2); |
|
swmenu.clearbut(8,3); |
|
if (swmenu.currentURL) { |
|
swmenu.switchbutton |
|
(3,1,'reload.gif','return','location','go(currentURL)'); |
|
} else { |
|
swmenu.clearbut(3,1); |
|
} |
|
} |
|
|
|
function LONCAPAstale() { |
|
} |
|
|
|
// END LON-CAPA Internal |
|
// ]]> |
|
</script> |
|
ENDDONOTREGTHIS |
|
|
|
} |
|
return ''; |
|
} |
|
|
|
# -- This applies to homework problems for users with grading privileges |
# -- This applies to homework problems for users with grading privileges |
my $crs='/'.$env{'request.course.id'}; |
my $crs='/'.$env{'request.course.id'}; |
if ($env{'request.course.sec'}) { |
if ($env{'request.course.sec'}) { |
Line 635 ENDDONOTREGTHIS
|
Line 597 ENDDONOTREGTHIS
|
"gocmd('/adm/parmset','set')", |
"gocmd('/adm/parmset','set')", |
'Content Settings'); |
'Content Settings'); |
} |
} |
if ($env{'request.symb'}=~/^uploaded/ && |
if ($noremote) { |
&Apache::lonnet::allowed('mdc',$crs)) { |
if ($env{'request.symb'}=~/^uploaded/ && |
$hwkadd.=&switch('','',7,4,'docs.png','Folder/Page Content','parms[_2]', |
&Apache::lonnet::allowed('mdc',$crs)) { |
"gocmd('/adm/coursedocs','direct')", |
$hwkadd.=&switch('','',7,4,'docs.png','Folder/Page Content','parms[_2]', |
'Folder/Page Content'); |
"gocmd('/adm/coursedocs','direct')", |
|
'Folder/Page Content'); |
|
} |
} |
} |
# -- End Homework |
# -- End Homework |
### |
### |
Line 947 ENDMENUITEMS
|
Line 911 ENDMENUITEMS
|
} |
} |
} |
} |
} |
} |
|
return &Apache::lonhtmlcommon::scripttag('', 'start') |
|
. &Apache::lonhtmlcommon::breadcrumbs(undef,undef,0) |
|
. &Apache::lonhtmlcommon::scripttag('', 'end'); |
|
|
} else { |
} else { |
my $requri=&Apache::lonnet::clutter(&Apache::lonnet::fixversion((split(/\?/,$env{'request.noversionuri'}))[0])); |
my $requri=&Apache::lonnet::clutter(&Apache::lonnet::fixversion((split(/\?/,$env{'request.noversionuri'}))[0])); |
$requri=&Apache::lonenc::check_encrypt(&unescape($requri)); |
$requri=&Apache::lonenc::check_encrypt(&unescape($requri)); |
Line 998 var swmenu=null;
|
Line 966 var swmenu=null;
|
</script> |
</script> |
ENDREGTHIS |
ENDREGTHIS |
} |
} |
|
} else { |
|
unless ($noremote) { |
|
# Not registered, graphical |
|
return (<<ENDDONOTREGTHIS); |
|
|
|
<script type="text/javascript"> |
|
// <![CDATA[ |
|
// BEGIN LON-CAPA Internal |
|
var swmenu=null; |
|
|
return &Apache::lonhtmlcommon::scripttag('', 'start') |
function LONCAPAreg() { |
. &Apache::lonhtmlcommon::breadcrumbs(undef,undef,0) |
swmenu=$reopen |
. &Apache::lonhtmlcommon::scripttag('', 'end'); |
$timesync |
|
swmenu.currentStale=1; |
|
swmenu.clearbut(2,1); |
|
swmenu.clearbut(2,3); |
|
swmenu.clearbut(8,1); |
|
swmenu.clearbut(8,2); |
|
swmenu.clearbut(8,3); |
|
if (swmenu.currentURL) { |
|
swmenu.switchbutton |
|
(3,1,'reload.gif','return','location','go(currentURL)'); |
|
} else { |
|
swmenu.clearbut(3,1); |
|
} |
|
} |
|
|
|
function LONCAPAstale() { |
|
} |
|
|
|
// END LON-CAPA Internal |
|
// ]]> |
|
</script> |
|
ENDDONOTREGTHIS |
|
|
|
} |
|
return ''; |
|
} |
} |
} |
|
|
sub is_course_upload { |
sub is_course_upload { |