'.
+ $item->{'print'}->('bottom',$dom,$settings,\$rowtotal);
} elsif ($action eq 'login') {
if ($numheaders == 4) {
$output .= &print_login('page',$dom,$confname,$phase,$settings,\$rowtotal).'
@@ -956,7 +1061,7 @@ sub print_config_box {
if ($action eq 'quotas') {
$output .= &print_quotas($dom,$settings,\$rowtotal,$action);
} elsif (($action eq 'autoenroll') || ($action eq 'autocreate') ||
- ($action eq 'serverstatuses') || ($action eq 'loadbalancing') ||
+ ($action eq 'serverstatuses') || ($action eq 'loadbalancing') ||
($action eq 'ltitools')) {
$output .= $item->{'print'}->($dom,$settings,\$rowtotal);
} elsif ($action eq 'scantron') {
@@ -1761,7 +1866,7 @@ sub print_quotas {
my $typecount = 0;
my ($css_class,%titles);
if ($context eq 'requestcourses') {
- @usertools = ('official','unofficial','community','textbook');
+ @usertools = ('official','unofficial','community','textbook','placement');
@options =('norequest','approval','validate','autolimit');
%validations = &Apache::lonnet::auto_courserequest_checks($dom);
%titles = &courserequest_titles();
@@ -2213,7 +2318,7 @@ sub print_studentcode {
my ($settings,$rowtotal) = @_;
my $rownum = 0;
my ($output,%current);
- my @crstypes = ('official','unofficial','community','textbook');
+ my @crstypes = ('official','unofficial','community','textbook','placement');
if (ref($settings) eq 'HASH') {
if (ref($settings->{'uniquecode'}) eq 'HASH') {
foreach my $type (@crstypes) {
@@ -2309,8 +2414,7 @@ sub print_textbookcourses {
(' 'x2).
''.&mt('Thumbnail:');
if ($image) {
- $datatable .= ''.
- $imgsrc.
+ $datatable .= $imgsrc.
' '.
' '.&mt('Replace:').' ';
@@ -2466,10 +2570,7 @@ ENDSCRIPT
sub ltitools_javascript {
my ($settings) = @_;
- my $togglejs = <itools_toggle_js();
- unless (ref($settings) eq 'HASH') {
- return $togglejs;
- }
+ return unless(ref($settings) eq 'HASH');
my (%ordered,$total,%jstext);
$total = 0;
foreach my $item (keys(%{$settings})) {
@@ -2487,7 +2588,7 @@ sub ltitools_javascript {
return <<"ENDSCRIPT";
-$togglejs
-
-ENDSCRIPT
-}
-
-sub ltitools_toggle_js {
- return <<"ENDSCRIPT";
-
-
ENDSCRIPT
}
@@ -3191,10 +3261,8 @@ sub print_helpsettings {
my $css_class;
my %existing=&Apache::lonnet::dump('roles',$dom,$confname,'rolesdef_');
my (%customroles,%ordered,%current);
- if (ref($settings) eq 'HASH') {
- if (ref($settings->{'adhoc'}) eq 'HASH') {
- %current = %{$settings->{'adhoc'}};
- }
+ if (ref($settings->{'adhoc'}) eq 'HASH') {
+ %current = %{$settings->{'adhoc'}};
}
my $count = 0;
foreach my $key (sort(keys(%existing))) {
@@ -3628,34 +3696,28 @@ sub print_ltitools {
my $confname = $dom.'-domainconfig';
my $switchserver = &check_switchserver($dom,$confname);
my $maxnum = scalar(keys(%ordered));
- my $datatable;
+ my $datatable = <itools_javascript($settings);
my %lt = <itools_names();
my @courseroles = ('cc','in','ta','ep','st');
my @ltiroles = qw(Instructor ContentDeveloper TeachingAssistant Learner);
- my @fields = ('fullname','firstname','lastname','email','roles','user');
+ my @fields = ('fullname','firstname','lastname','email','user','roles');
if (keys(%ordered)) {
my @items = sort { $a <=> $b } keys(%ordered);
for (my $i=0; $i<@items; $i++) {
$css_class = $itemcount%2?' class="LC_odd_row"':'';
my $item = $ordered{$items[$i]};
- my ($title,$key,$secret,$url,$lifetime,$imgsrc,%sigsel);
+ my ($title,$key,$secret,$url,$imgsrc,$version);
if (ref($settings->{$item}) eq 'HASH') {
$title = $settings->{$item}->{'title'};
$url = $settings->{$item}->{'url'};
$key = $settings->{$item}->{'key'};
$secret = $settings->{$item}->{'secret'};
- $lifetime = $settings->{$item}->{'lifetime'};
my $image = $settings->{$item}->{'image'};
if ($image ne '') {
$imgsrc = '';
}
- if ($settings->{$item}->{'sigmethod'} eq 'HMAC-256') {
- $sigsel{'HMAC-256'} = ' selected="selected"';
- } else {
- $sigsel{'HMAC-SHA1'} = ' selected="selected"';
- }
}
- my $chgstr = ' onchange="javascript:reorderLTITools(this.form,'."'ltitools_".$item."'".');"';
+ my $chgstr = ' onchange="javascript:reorderLTI(this.form,'."'ltitools_".$item."'".');"';
$datatable .= '
'
.'
'.
'
'.
'';
- my (%checkedfields,%rolemaps,$userincdom);
+ my (%checkedfields,%rolemaps);
if (ref($settings->{$item}) eq 'HASH') {
if (ref($settings->{$item}->{'fields'}) eq 'HASH') {
%checkedfields = %{$settings->{$item}->{'fields'}};
}
- $userincdom = $settings->{$item}->{'incdom'};
if (ref($settings->{$item}->{'roles'}) eq 'HASH') {
%rolemaps = %{$settings->{$item}->{'roles'}};
$checkedfields{'roles'} = 1;
@@ -3765,47 +3831,23 @@ sub print_ltitools {
}
$datatable .= ''.
+ $datatable .= ''.
'
'."\n".
''."\n".
''."\n";
$itemcount ++;
@@ -3987,13 +4016,11 @@ sub ltitools_names {
'title' => 'Title',
'version' => 'Version',
'msgtype' => 'Message Type',
- 'sigmethod' => 'Signature Method',
'url' => 'URL',
'key' => 'Key',
- 'lifetime' => 'Nonce lifetime (s)',
'secret' => 'Secret',
- 'icon' => 'Icon',
- 'user' => 'User',
+ 'icon' => 'Icon',
+ 'user' => 'Username:domain',
'fullname' => 'Full Name',
'firstname' => 'First Name',
'lastname' => 'Last Name',
@@ -4006,14 +4033,14 @@ sub ltitools_names {
'width' => 'Width',
'linktext' => 'Default Link Text',
'explanation' => 'Default Explanation',
+ 'passback' => 'Tool can return grades:',
+ 'roster' => 'Tool can retrieve roster:',
'crstarget' => 'Display target',
'crslabel' => 'Course label',
- 'crstitle' => 'Course title',
+ 'crstitle' => 'Course title',
'crslinktext' => 'Link Text',
'crsexplanation' => 'Explanation',
- 'crsappend' => 'Provider URL',
);
-
return %lt;
}
@@ -4022,6 +4049,7 @@ sub print_coursedefaults {
my ($css_class,$datatable,%checkedon,%checkedoff,%defaultchecked,@toggles);
my $itemcount = 1;
my %choices = &Apache::lonlocal::texthash (
+ canuse_pdfforms => 'Course/Community users can create/upload PDF forms',
uploadquota => 'Default quota for files uploaded directly to course/community using Course Editor (MB)',
anonsurvey_threshold => 'Responder count needed before showing submissions for anonymous surveys',
coursecredits => 'Credits can be specified for courses',
@@ -4039,11 +4067,12 @@ sub print_coursedefaults {
);
if ($position eq 'top') {
%defaultchecked = (
+ 'canuse_pdfforms' => 'off',
'uselcmath' => 'on',
'usejsme' => 'on',
'canclone' => 'none',
);
- @toggles = ('uselcmath','usejsme');
+ @toggles = ('canuse_pdfforms','uselcmath','usejsme');
($datatable,$itemcount) = &radiobutton_prefs($settings,\@toggles,\%defaultchecked,
\%choices,$itemcount);
$css_class = $itemcount%2?' class="LC_odd_row"':'';
@@ -4122,7 +4151,7 @@ sub print_coursedefaults {
my ($currdefresponder,%defcredits,%curruploadquota,%deftimeout,%currmysql);
my $currusecredits = 0;
my $postsubmitclient = 1;
- my @types = ('official','unofficial','community','textbook');
+ my @types = ('official','unofficial','community','textbook','placement');
if (ref($settings) eq 'HASH') {
$currdefresponder = $settings->{'anonsurvey_threshold'};
if (ref($settings->{'uploadquota'}) eq 'HASH') {
@@ -4279,7 +4308,7 @@ sub print_selfenrollment {
my ($position,$dom,$settings,$rowtotal) = @_;
my ($css_class,$datatable);
my $itemcount = 1;
- my @types = ('official','unofficial','community','textbook');
+ my @types = ('official','unofficial','community','textbook','placement');
if (($position eq 'top') || ($position eq 'middle')) {
my ($rowsref,$titlesref) = &Apache::lonuserutils::get_selfenroll_titles();
my %descs = &Apache::lonuserutils::selfenroll_default_descs();
@@ -4502,15 +4531,14 @@ sub print_validation_rows {
sub print_usersessions {
my ($position,$dom,$settings,$rowtotal) = @_;
- my ($css_class,$datatable,%checked,%choices);
- my (%by_ip,%by_location,@intdoms);
- &build_location_hashes(\@intdoms,\%by_ip,\%by_location);
+ my ($css_class,$datatable,$itemcount,%checked,%choices);
+ my (%by_ip,%by_location,@intdoms,@instdoms);
+ &build_location_hashes(\@intdoms,\%by_ip,\%by_location,\@instdoms);
my @alldoms = &Apache::lonnet::all_domains();
my %serverhomes = %Apache::lonnet::serverhomeIDs;
my %servers = &Apache::lonnet::internet_dom_servers($dom);
my %altids = &id_for_thisdom(%servers);
- my $itemcount = 1;
if ($position eq 'top') {
if (keys(%serverhomes) > 1) {
my %spareid = ¤t_offloads_to($dom,$settings,\%servers);
@@ -4523,118 +4551,256 @@ sub print_usersessions {
$datatable .= &spares_row($dom,\%servers,\%spareid,\%serverhomes,\%altids,$curroffloadnow,$rowtotal);
} else {
$datatable .= '
'.
- &mt('Nothing to set here, as the cluster to which this domain belongs only contains one server.');
+ &mt('Nothing to set here, as the cluster to which this domain belongs only contains one server.').
+ '
';
$rownum ++;
@@ -6425,6 +6649,10 @@ sub print_coursecategories {
my $toggle_catscomm_dom = ' checked="checked" ';
my $can_catcomm_comm = ' ';
my $can_catcomm_dom = ' checked="checked" ';
+ my $toggle_catsplace_place = ' ';
+ my $toggle_catsplace_dom = ' checked="checked" ';
+ my $can_catplace_place = ' ';
+ my $can_catplace_dom = ' checked="checked" ';
if (ref($settings) eq 'HASH') {
if ($settings->{'togglecats'} eq 'crs') {
@@ -6443,17 +6671,28 @@ sub print_coursecategories {
$can_catcomm_comm = $can_catcomm_dom;
$can_catcomm_dom = ' ';
}
+ if ($settings->{'togglecatsplace'} eq 'place') {
+ $toggle_catsplace_place = $toggle_catsplace_dom;
+ $toggle_catsplace_dom = ' ';
+ }
+ if ($settings->{'categorizeplace'} eq 'place') {
+ $can_catplace_place = $can_catplace_dom;
+ $can_catplace_dom = ' ';
+ }
}
my %title = &Apache::lonlocal::texthash (
- togglecats => 'Show/Hide a course in catalog',
- togglecatscomm => 'Show/Hide a community in catalog',
- categorize => 'Assign a category to a course',
- categorizecomm => 'Assign a category to a community',
+ togglecats => 'Show/Hide a course in catalog',
+ togglecatscomm => 'Show/Hide a community in catalog',
+ togglecatsplace => 'Show/Hide a placement test in catalog',
+ categorize => 'Assign a category to a course',
+ categorizecomm => 'Assign a category to a community',
+ categorizeplace => 'Assign a category to a placement test',
);
my %level = &Apache::lonlocal::texthash (
- dom => 'Set in Domain',
- crs => 'Set in Course',
- comm => 'Set in Community',
+ dom => 'Set in Domain',
+ crs => 'Set in Course',
+ comm => 'Set in Community',
+ place => 'Set in Placement Test',
);
$datatable = '
';
}
$datatable .= '';
@@ -6590,7 +6846,7 @@ sub print_coursecategories {
.''
.''."\n";
$itemcount ++;
- foreach my $default ('instcode','communities') {
+ foreach my $default ('instcode','communities','placement') {
if ((!grep(/^\Q$default\E$/,@{$cats[0]})) || ($cathash->{$default.'::0'} eq '')) {
$css_class = $itemcount%2?' class="LC_odd_row"':'';
my $chgstr = ' onchange="javascript:reorderCats(this.form,'."'','$default"."_pos','$lastidx'".');"';
@@ -6679,9 +6935,9 @@ sub print_serverstatuses {
sub serverstatus_pages {
return ('userstatus','lonstatus','loncron','server-status','codeversions',
- 'checksums','clusterstatus','metadata_keywords','metadata_harvest',
- 'takeoffline','takeonline','showenv','toggledebug','ping','domconf',
- 'uniquecodes','diskusage','coursecatalog');
+ 'checksums','clusterstatus','certstatus','metadata_keywords',
+ 'metadata_harvest','takeoffline','takeonline','showenv','toggledebug',
+ 'ping','domconf','uniquecodes','diskusage','coursecatalog');
}
sub defaults_javascript {
@@ -6803,9 +7059,11 @@ sub coursecategories_javascript {
}
my $instcode_reserved = &mt('The name: [_1] is a reserved category.','"instcode"');
my $communities_reserved = &mt('The name: [_1] is a reserved category.','"communities"');
+ my $placement_reserved = &mt('The name: [_1] is a reserved category.','"placement"');
my $choose_again = "\n".&mt('Please use a different name for the new top level category.');
&js_escape(\$instcode_reserved);
&js_escape(\$communities_reserved);
+ &js_escape(\$placement_reserved);
&js_escape(\$choose_again);
$output = <<"ENDSCRIPT";