version 1.1075.2.75, 2014/06/09 20:40:11
|
version 1.1075.2.83, 2014/12/21 16:42:38
|
Line 1293 sub helpLatexCheatsheet {
|
Line 1293 sub helpLatexCheatsheet {
|
$out .= ' <span>' |
$out .= ' <span>' |
.&help_open_topic('Authoring_Output_Tags',&mt('Output Tags'),$stayOnPage,undef,600) |
.&help_open_topic('Authoring_Output_Tags',&mt('Output Tags'),$stayOnPage,undef,600) |
.'</span> <span>' |
.'</span> <span>' |
.&help_open_topic('Authoring_Multilingual_Problems',&mt('How to create problems in different languages'),$stayOnPage,undef,600) |
.&help_open_topic('Authoring_Multilingual_Problems',&mt('Languages'),$stayOnPage,undef,600) |
.'</span>'; |
.'</span>'; |
} |
} |
$out .= '</span>'; # End cheatsheet |
$out .= '</span>'; # End cheatsheet |
Line 2341 Outputs:
|
Line 2341 Outputs:
|
|
|
=item * $clientinfo |
=item * $clientinfo |
|
|
|
=item * $clientosversion |
|
|
=back |
=back |
|
|
=back |
=back |
Line 2360 sub decode_user_agent {
|
Line 2362 sub decode_user_agent {
|
my $clientmathml=''; |
my $clientmathml=''; |
my $clientunicode='0'; |
my $clientunicode='0'; |
my $clientmobile=0; |
my $clientmobile=0; |
|
my $clientosversion=''; |
for (my $i=0;$i<=$#browsertype;$i++) { |
for (my $i=0;$i<=$#browsertype;$i++) { |
my ($bname,$match,$notmatch,$vreg,$minv,$univ)=split(/\:/,$browsertype[$i]); |
my ($bname,$match,$notmatch,$vreg,$minv,$univ)=split(/\%/,$browsertype[$i]); |
if (($httpbrowser=~/$match/i) && ($httpbrowser!~/$notmatch/i)) { |
if (($httpbrowser=~/$match/i) && ($httpbrowser!~/$notmatch/i)) { |
$clientbrowser=$bname; |
$clientbrowser=$bname; |
$httpbrowser=~/$vreg/i; |
$httpbrowser=~/$vreg/i; |
Line 2381 sub decode_user_agent {
|
Line 2384 sub decode_user_agent {
|
if ($httpbrowser=~/next/i) { $clientos='next'; } |
if ($httpbrowser=~/next/i) { $clientos='next'; } |
if (($httpbrowser=~/mac/i) || |
if (($httpbrowser=~/mac/i) || |
($httpbrowser=~/powerpc/i)) { $clientos='mac'; } |
($httpbrowser=~/powerpc/i)) { $clientos='mac'; } |
if ($httpbrowser=~/win/i) { $clientos='win'; } |
if ($httpbrowser=~/win/i) { |
|
$clientos='win'; |
|
if ($httpbrowser =~/Windows\s+NT\s+(\d+\.\d+)/i) { |
|
$clientosversion = $1; |
|
} |
|
} |
if ($httpbrowser=~/embed/i) { $clientos='pda'; } |
if ($httpbrowser=~/embed/i) { $clientos='pda'; } |
if ($httpbrowser=~/(Android|iPod|iPad|iPhone|webOS|Blackberry|Windows Phone|Opera m(?:ob|in)|Fennec)/i) { |
if ($httpbrowser=~/(Android|iPod|iPad|iPhone|webOS|Blackberry|Windows Phone|Opera m(?:ob|in)|Fennec)/i) { |
$clientmobile=lc($1); |
$clientmobile=lc($1); |
Line 2392 sub decode_user_agent {
|
Line 2400 sub decode_user_agent {
|
$clientinfo = 'chromeframe-'.$1; |
$clientinfo = 'chromeframe-'.$1; |
} |
} |
return ($httpbrowser,$clientbrowser,$clientversion,$clientmathml, |
return ($httpbrowser,$clientbrowser,$clientversion,$clientmathml, |
$clientunicode,$clientos,$clientmobile,$clientinfo); |
$clientunicode,$clientos,$clientmobile,$clientinfo, |
|
$clientosversion); |
} |
} |
|
|
############################################################### |
############################################################### |
Line 7663 function set_wishlistlink(title, path) {
|
Line 7672 function set_wishlistlink(title, path) {
|
title = title.replace(/^LON-CAPA /,''); |
title = title.replace(/^LON-CAPA /,''); |
} |
} |
title = encodeURIComponent(title); |
title = encodeURIComponent(title); |
|
title = title.replace("'","\\\'"); |
if (!path) { |
if (!path) { |
path = location.pathname; |
path = location.pathname; |
} |
} |
path = encodeURIComponent(path); |
path = encodeURIComponent(path); |
|
path = path.replace("'","\\\'"); |
Win = window.open('/adm/wishlist?mode=newLink&setTitle='+title+'&setPath='+path, |
Win = window.open('/adm/wishlist?mode=newLink&setTitle='+title+'&setPath='+path, |
'wishlistNewLink','width=560,height=350,scrollbars=0'); |
'wishlistNewLink','width=560,height=350,scrollbars=0'); |
} |
} |
Line 7709 var modalWindow = {
|
Line 7720 var modalWindow = {
|
}; |
}; |
var openMyModal = function(source,width,height,scrolling,transparency,style) |
var openMyModal = function(source,width,height,scrolling,transparency,style) |
{ |
{ |
|
source = source.replace("'","'"); |
modalWindow.windowId = "myModal"; |
modalWindow.windowId = "myModal"; |
modalWindow.width = width; |
modalWindow.width = width; |
modalWindow.height = height; |
modalWindow.height = height; |
modalWindow.content = "<iframe width='"+width+"' height='"+height+"' frameborder='0' scrolling='"+scrolling+"' allowtransparency='"+transparency+"' src='" + source + "' style='"+style+"'></iframe>"; |
modalWindow.content = "<iframe width='"+width+"' height='"+height+"' frameborder='0' scrolling='"+scrolling+"' allowtransparency='"+transparency+"' src='" + source + "' style='"+style+"'></iframe>"; |
modalWindow.open(); |
modalWindow.open(); |
}; |
}; |
// END LON-CAPA Internal --> |
// END LON-CAPA Internal --> |
Line 9897 sub ask_for_embedded_content {
|
Line 9909 sub ask_for_embedded_content {
|
($path) = |
($path) = |
($toplevel =~ m{^(\Q/uploaded/$cdom/$cnum/\E(?:docs|supplemental)/(?:default|\d+)/\d+)/}); |
($toplevel =~ m{^(\Q/uploaded/$cdom/$cnum/\E(?:docs|supplemental)/(?:default|\d+)/\d+)/}); |
} |
} |
$fileloc = &Apache::lonnet::filelocation('',$toplevel); |
if ($toplevel=~/^\/*(uploaded|editupload)/) { |
|
$fileloc = $toplevel; |
|
$fileloc=~ s/^\s*(\S+)\s*$/$1/; |
|
my ($udom,$uname,$fname) = |
|
($fileloc=~ m{^/+(?:uploaded|editupload)/+($match_domain)/+($match_name)/+(.*)$}); |
|
$fileloc = propath($udom,$uname).'/userfiles/'.$fname; |
|
} else { |
|
$fileloc = &Apache::lonnet::filelocation('',$toplevel); |
|
} |
$fileloc =~ s{^/}{}; |
$fileloc =~ s{^/}{}; |
($filename) = ($fileloc =~ m{.+/([^/]+)$}); |
($filename) = ($fileloc =~ m{.+/([^/]+)$}); |
$heading = &mt('Status of dependencies in [_1]',"$title ($filename)"); |
$heading = &mt('Status of dependencies in [_1]',"$title ($filename)"); |
Line 11053 sub decompress_form {
|
Line 11073 sub decompress_form {
|
"$topdir/media/player.swf", |
"$topdir/media/player.swf", |
"$topdir/media/swfobject.js", |
"$topdir/media/swfobject.js", |
"$topdir/media/expressInstall.swf"); |
"$topdir/media/expressInstall.swf"); |
my @camtasia8 = ("$topdir/","$topdir/$topdir.html", |
my @camtasia8_1 = ("$topdir/","$topdir/$topdir.html", |
"$topdir/$topdir.mp4", |
"$topdir/$topdir.mp4", |
"$topdir/$topdir\_config.xml", |
"$topdir/$topdir\_config.xml", |
"$topdir/$topdir\_controller.swf", |
"$topdir/$topdir\_controller.swf", |
Line 11075 sub decompress_form {
|
Line 11095 sub decompress_form {
|
"$topdir/skins/express_show/", |
"$topdir/skins/express_show/", |
"$topdir/skins/express_show/player-min.css", |
"$topdir/skins/express_show/player-min.css", |
"$topdir/skins/express_show/spritesheet.png"); |
"$topdir/skins/express_show/spritesheet.png"); |
|
my @camtasia8_4 = ("$topdir/","$topdir/$topdir.html", |
|
"$topdir/$topdir.mp4", |
|
"$topdir/$topdir\_config.xml", |
|
"$topdir/$topdir\_controller.swf", |
|
"$topdir/$topdir\_embed.css", |
|
"$topdir/$topdir\_First_Frame.png", |
|
"$topdir/$topdir\_player.html", |
|
"$topdir/$topdir\_Thumbnails.png", |
|
"$topdir/playerProductInstall.swf", |
|
"$topdir/scripts/", |
|
"$topdir/scripts/config_xml.js", |
|
"$topdir/scripts/techsmith-smart-player.min.js", |
|
"$topdir/skins/", |
|
"$topdir/skins/configuration_express.xml", |
|
"$topdir/skins/express_show/", |
|
"$topdir/skins/express_show/spritesheet.min.css", |
|
"$topdir/skins/express_show/spritesheet.png", |
|
"$topdir/skins/express_show/techsmith-smart-player.min.css"); |
my @diffs = &compare_arrays(\@paths,\@camtasia6); |
my @diffs = &compare_arrays(\@paths,\@camtasia6); |
if (@diffs == 0) { |
if (@diffs == 0) { |
$is_camtasia = 6; |
$is_camtasia = 6; |
} else { |
} else { |
@diffs = &compare_arrays(\@paths,\@camtasia8); |
@diffs = &compare_arrays(\@paths,\@camtasia8_1); |
if (@diffs == 0) { |
if (@diffs == 0) { |
$is_camtasia = 8; |
$is_camtasia = 8; |
|
} else { |
|
@diffs = &compare_arrays(\@paths,\@camtasia8_4); |
|
if (@diffs == 0) { |
|
$is_camtasia = 8; |
|
} |
} |
} |
} |
} |
} |
} |
Line 14448 sub escape_url {
|
Line 14491 sub escape_url {
|
my ($url) = @_; |
my ($url) = @_; |
my @urlslices = split(/\//, $url,-1); |
my @urlslices = split(/\//, $url,-1); |
my $lastitem = &escape(pop(@urlslices)); |
my $lastitem = &escape(pop(@urlslices)); |
return join('/',@urlslices).'/'.$lastitem; |
return &HTML::Entities::encode(join('/',@urlslices),"'").'/'.$lastitem; |
} |
} |
|
|
sub compare_arrays { |
sub compare_arrays { |
Line 14519 sub init_user_environment {
|
Line 14562 sub init_user_environment {
|
} |
} |
# ------------------------------------ Check browser type and MathML capability |
# ------------------------------------ Check browser type and MathML capability |
|
|
my ($httpbrowser,$clientbrowser,$clientversion,$clientmathml, |
my ($httpbrowser,$clientbrowser,$clientversion,$clientmathml,$clientunicode, |
$clientunicode,$clientos,$clientmobile,$clientinfo) = &decode_user_agent($r); |
$clientos,$clientmobile,$clientinfo,$clientosversion) = &decode_user_agent($r); |
|
|
# ------------------------------------------------------------- Get environment |
# ------------------------------------------------------------- Get environment |
|
|
Line 14553 sub init_user_environment {
|
Line 14596 sub init_user_environment {
|
"browser.os" => $clientos, |
"browser.os" => $clientos, |
"browser.mobile" => $clientmobile, |
"browser.mobile" => $clientmobile, |
"browser.info" => $clientinfo, |
"browser.info" => $clientinfo, |
|
"browser.osversion" => $clientosversion, |
"server.domain" => $Apache::lonnet::perlvar{'lonDefDomain'}, |
"server.domain" => $Apache::lonnet::perlvar{'lonDefDomain'}, |
"request.course.fn" => '', |
"request.course.fn" => '', |
"request.course.uri" => '', |
"request.course.uri" => '', |
Line 14923 sub build_filters {
|
Line 14967 sub build_filters {
|
$output .= '<input type="hidden" name="phase" value="courselist" />'."\n". |
$output .= '<input type="hidden" name="phase" value="courselist" />'."\n". |
'<input type="hidden" name="prevphase" value="'. |
'<input type="hidden" name="prevphase" value="'. |
$prevphase.'" />'."\n"; |
$prevphase.'" />'."\n"; |
} elsif ($formname ne 'quotacheck') { |
} elsif ($formname eq 'quotacheck') { |
|
$output .= qq| |
|
<input type="hidden" name="sortby" value="" /> |
|
<input type="hidden" name="sortorder" value="" /> |
|
|; |
|
} else { |
my $name_input; |
my $name_input; |
if ($cnameelement ne '') { |
if ($cnameelement ne '') { |
$name_input = '<input type="hidden" name="cnameelement" value="'. |
$name_input = '<input type="hidden" name="cnameelement" value="'. |