'
+ .&mt('Changes for [quant,_1,parameter] saved.',$totalstored)
+ .'
'
.&mt('Changes can take up to 10 minutes before being active for all students.')
.&Apache::loncommon::help_open_topic('Caching')
.'
';
+ } else {
+ $message.='';
+ if ($uhome eq 'no_host') {
+ $message .= &mt('Changes for [quant,_1,user-specific parameter] not saved because the username or ID was invalid.',
+ $totalskippeduser);
+ } elsif ($env{'form.userroles'} eq 'any') {
+ $message .= &mt('Changes for [quant,_1,user-specific parameter] not saved because the user does not have a course role.',
+ $totalskippeduser);
+ } else {
+ $message .= &mt('Changes for [quant,_1,user-specific parameter] not saved because the user is not a student.',
+ $totalskippeduser);
+ }
+ $message .= '
';
}
}
@@ -3409,7 +3888,7 @@ sub assessparms {
'date_interval','int','float','string','string_lenient',
'string_examcode','string_deeplink','string_discussvote',
'string_useslots','string_problemstatus','string_ip',
- 'string_questiontype') {
+ 'string_questiontype','string_tex','string_grace') {
$r->print('
//
@@ -3450,7 +3936,7 @@ ENDPARMSELSCRIPT
$r->print(&Apache::lonhtmlcommon::start_pick_box(undef,'parmlevel'));
&levelmenu($r,\%alllevs,$parmlev);
$r->print(&Apache::lonhtmlcommon::row_closure());
- &mapmenu($r,\%allmaps,$pschp,\%maptitles, \%symbp);
+ &mapmenu($r,\%allmaps,$pschp,\%maptitles,\%symbp,$parmlev);
$r->print(&Apache::lonhtmlcommon::row_closure());
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Select Parts to View')));
&partmenu($r,\%allparts,\@psprt);
@@ -3530,6 +4016,7 @@ ENDPARMSELSCRIPT
if ($parm_permission->{'edit'}) {
undef($readonly);
}
+ $r->print('');
if ($parmlev eq 'full') {
#
@@ -3746,7 +4233,7 @@ ENDTABLEHEADFOUR
#-------------------------------------------- for each map, gather information
my $mapid;
- foreach $mapid (sort {$maplist{$a} cmp $maplist{$b}} keys(%maplist)) {
+ foreach $mapid (sort { $a <=> $b } keys(%maplist)) {
my $maptitle = $maplist{$mapid};
#----------------------- loop through ids and get all parameter types for map
@@ -3963,6 +4450,7 @@ ENDMAPONE
.''
);
} # end of $parmlev eq general
+ $r->print('
');
}
$r->print('');
if ($numreclinks) {
@@ -4069,7 +4557,7 @@ sub readdata {
# Stores parameter data, using form parameters directly.
#
# Uses the following form parameters. The variable part in the names is a resourcedata key (except for a modification for user data).
-# set_* (except settext, setipallow, setipdeny, setdeeplink) - set a parameter value
+# set_* (except settext, setipallow, setipdeny, setdeeplink, setgrace) - set a parameter value
# del_* - remove a parameter
# datepointer_* - set a date parameter (value is key_* refering to a set of other form parameters)
# dateinterval_* - set a date interval parameter (value refers to more form parameters)
@@ -4102,7 +4590,7 @@ sub storedata {
my $cmd=$1;
my $thiskey=$2;
my ($altkey,$recursive,$tkey,$tkeyrec,$tkeynonrec);
- next if ($cmd eq 'rec' || $cmd eq 'settext' || $cmd eq 'setipallow' || $cmd eq 'setipdeny' || $cmd eq 'setdeeplink');
+ next if ($cmd eq 'rec' || $cmd eq 'settext' || $cmd eq 'setipallow' || $cmd eq 'setipdeny' || $cmd eq 'setdeeplink' || $cmd eq 'setgrace');
if ((($cmd eq 'set') || ($cmd eq 'datepointer') || ($cmd eq 'dateinterval') || ($cmd eq 'del')) &&
($thiskey =~ /(?:sequence|page)\Q___(all)\E/)) {
unless ($thiskey =~ /(encrypturl|hiddenresource)$/) {
@@ -4161,6 +4649,8 @@ sub storedata {
if ($thiskey =~ /\.retrypartial$/) {
$name = 'retrypartial';
}
+ } elsif ($typeof eq 'string_tex') {
+ $name = 'texdisplay';
}
} elsif ($cmd eq 'datepointer') {
$data=&Apache::lonhtmlcommon::get_date_from_form($env{$key});
@@ -4500,9 +4990,12 @@ sub parse_listdata_key {
# @param {string} $caller - name of the calling sub (overview|newoverview)
# @param {hash reference} $classlist - from loncoursedata::get_classlist
# @param {boolean} $readonly - true if editing not allowed
+# @param {string} $parmlev - full|map
+# @param {hash reference} $hash_for_realm - keys: realm, values: numeric order
+# @param {string} $pschp - selected map pc, or 'all'
# @returns{integer} - number of $listdata parameters processed
sub listdata {
- my ($r,$resourcedata,$listdata,$sortorder,$caller,$classlist,$readonly)=@_;
+ my ($r,$resourcedata,$listdata,$sortorder,$caller,$classlist,$readonly,$parmlev,$hash_for_realm,$pschp)=@_;
# Start list output
@@ -4528,6 +5021,20 @@ sub listdata {
foreach my $key (sort {
my ($astudent,$ares,$apart,$aparm) = &parse_listdata_key($a,$listdata);
my ($bstudent,$bres,$bpart,$bparm) = &parse_listdata_key($b,$listdata);
+ my ($aid,$bid);
+ if ($caller eq 'newoverview') {
+ if (ref($hash_for_realm) eq 'HASH') {
+ if (($parmlev eq 'map') && ($pschp eq 'all')) {
+ my ($aurl) = ($ares =~ /^(.+\.(?:sequence|page))___\(all\)$/);
+ my ($burl) = ($bres =~ /^(.+\.(?:sequence|page))___\(all\)$/);
+ $aid = $hash_for_realm->{$aurl};
+ $bid = $hash_for_realm->{$burl};
+ } elsif ($parmlev eq 'full') {
+ $aid = $hash_for_realm->{$ares};
+ $bid = $hash_for_realm->{$bres};
+ }
+ }
+ }
# get the numerical order for the param
$aparm=$keyorder{'parameter_0_'.$aparm};
@@ -4537,7 +5044,21 @@ sub listdata {
if ($sortorder eq 'realmstudent') {
if ($ares ne $bres ) {
- $result = ($ares cmp $bres);
+ if ($caller eq 'newoverview') {
+ if (ref($hash_for_realm) eq 'HASH') {
+ if (($parmlev eq 'map') && ($pschp eq 'all')) {
+ $result = ($aid <=> $bid);
+ } elsif ($parmlev eq 'full') {
+ $result = ($aid <=> $bid);
+ } else {
+ $result = ($ares cmp $bres);
+ }
+ } else {
+ $result = ($ares cmp $bres);
+ }
+ } else {
+ $result = ($ares cmp $bres);
+ }
} elsif ($astudent ne $bstudent) {
$result = ($astudent cmp $bstudent);
} elsif ($apart ne $bpart ) {
@@ -4547,7 +5068,21 @@ sub listdata {
if ($astudent ne $bstudent) {
$result = ($astudent cmp $bstudent);
} elsif ($ares ne $bres ) {
- $result = ($ares cmp $bres);
+ if ($caller eq 'newoverview') {
+ if (ref($hash_for_realm) eq 'HASH') {
+ if (($parmlev eq 'map') && ($pschp eq 'all')) {
+ $result = ($aid <=> $bid);
+ } elsif ($parmlev eq 'full') {
+ $result = ($aid <=> $bid);
+ } else {
+ $result = ($ares cmp $bres);
+ }
+ } else {
+ $result = ($ares cmp $bres);
+ }
+ } else {
+ $result = ($ares cmp $bres);
+ }
} elsif ($apart ne $bpart ) {
$result = ($apart cmp $bpart);
}
@@ -4576,6 +5111,7 @@ sub listdata {
($thiskey=~/^$env{'request.course.id'}\.(?:(.+)\.)*([\w\s\-]+)\.(\w+)$/);
my $section=&mt('All Students');
$readonly = $readonlyall;
+ my $userscope;
my $showval = $$resourcedata{$thiskey};
if ($middle=~/^\[(.*)\]/) {
my $issection=$1;
@@ -4589,6 +5125,7 @@ sub listdata {
}
}
$section=&mt('User').": ".&Apache::loncommon::plainname($stuname,$studom);
+ $userscope = 1;
} else {
if (($env{'request.course.sec'} ne '') && ($caller eq 'overview')) {
if (exists($grouphash{$issection})) {
@@ -4625,6 +5162,12 @@ sub listdata {
}
if ($is_map) {
my $leveltitle = &mt('Folder/Map');
+ my $title = &Apache::lonnet::gettitle($mapurl);
+ if (ref($hash_for_realm) eq 'HASH') {
+ if ($hash_for_realm->{$mapurl} eq '1') {
+ $title = &mt('Main Content');
+ }
+ }
unless (($name eq 'hiddenresource') || ($name eq 'encrypturl')) {
if ($caller eq 'newoverview') {
my $altkey = $thiskey;
@@ -4641,9 +5184,10 @@ sub listdata {
$is_recursive = 1;
}
}
- $realm=''.$leveltitle.': '.&Apache::lonnet::gettitle($mapurl).'
('.$mapurl.')';
+ $realm=''.$leveltitle.': '.$title.'
('.$mapurl.')';
} elsif ($middle) {
my ($map,$id,$url)=&Apache::lonnet::decode_symb($middle);
+ next if (($url =~ /\.(page|sequence)$/) && ($parmlev eq 'full') && ($caller eq 'newoverview'));
$realm=''.&mt('Resource').
': '.&Apache::lonnet::gettitle($middle).
'
('.$url.' in '.$map.' id: '.
@@ -4681,13 +5225,29 @@ sub listdata {
# Ready to print
#
my $parmitem = &standard_parameter_names($name);
+ my $advice;
+ if (($name eq 'mapalias') && ($middle) && (!$is_map)) {
+ if ($middle =~ m{^uploaded/}) {
+ $advice = &mt('Use Course Editor to set this.');
+ } else {
+ $advice = &mt('Use Resource Assembly Tool to set this.');
+ }
+ $advice = '
'.$advice.'';
+ }
$r->print(&tablestart($readonly,$is_map).
&Apache::loncommon::start_data_table_row().
''.&mt($parmitem).
- ' | ');
+ ''.$advice.'');
unless ($readonly) {
+ my $disabled;
+ if (($name eq 'availablestudent') &&
+ (($showval eq '') || ($userscope))) {
+ $disabled = ' disabled="disabled"';
+ } elsif (($name eq 'mapalias') && ($showval eq '')) {
+ $disabled = ' disabled="disabled"';
+ }
$r->print(' | ');
+ $thiskey.'"'.$disabled.' />');
}
$r->print('');
$foundkeys++;
@@ -4715,6 +5275,11 @@ sub listdata {
$r->print(&date_interval_selector($thiskey,$name,
$showval,$readonly));
} elsif ($thistype =~ m/^string/) {
+ if ($name eq 'availablestudent') {
+ $readonly = 1;
+ } elsif (($name eq 'mapalias') && ($showval eq '')) {
+ $readonly = 1;
+ }
$r->print(&string_selector($thistype,$thiskey,
$showval,$name,$readonly));
} else {
@@ -4757,13 +5322,17 @@ sub listdata {
sub get_date_interval_from_form {
my ($key) = @_;
my $seconds = 0;
+ my $numnotnull = 0;
foreach my $which (['days', 86400],
['hours', 3600],
['minutes', 60],
['seconds', 1]) {
my ($name, $factor) = @{ $which };
if (defined($env{'form.'.$name.'_'.$key})) {
- $seconds += $env{'form.'.$name.'_'.$key} * $factor;
+ unless ($env{'form.'.$name.'_'.$key} eq '') {
+ $numnotnull ++;
+ $seconds += $env{'form.'.$name.'_'.$key} * $factor;
+ }
}
}
if (($key =~ /\.interval$/) &&
@@ -4782,10 +5351,10 @@ sub get_date_interval_from_form {
$seconds .= '_'.$env{'form.done_'.$key.'_proctorkey'};
}
}
+ return if (!$numnotnull);
return $seconds;
}
-
# Returns HTML to enter a text value for a parameter.
#
# @param {string} $thiskey - parameter key
@@ -4869,19 +5438,39 @@ sub string_ip_selector {
sub string_deeplink_selector {
my ($thiskey, $showval, $readonly) = @_;
- my (@components,%values,@current,%titles,%options,%optiontext,%defaults,%posslti);
- @components = ('listing','scope','urls');
+ my (@tables,%values,@current,%titles,%options,%optiontext,%defaults,
+ %selectnull,%domlti,%crslti,@possmenus,%components);
+ @tables = ('upper','lower');
+ %components = (
+ upper => ['state','others','listing','scope'],
+ lower => ['protect','menus','target','exit'],
+ );
%titles = &Apache::lonlocal::texthash (
+ state => 'Access status',
+ others => 'Hide other resources',
listing => 'In Contents and/or Gradebook',
scope => 'Access scope for link',
- urls => 'Supported link types',
+ protect => 'Link protection',
+ menus => 'Menu Items Displayed',
+ target => 'Embedded?',
+ exit => 'Exit Tool Button?',
);
%options = (
+ state => ['only','off','both'],
+ others => ['hide','unhide'],
listing => ['full','absent','grades','details','datestatus'],
scope => ['res','map','rec'],
- urls => ['any','only','key','lti'],
+ protect => ['none','key','ltid','ltic'],
+ menus => ['std','colls'],
+ target => ['_self','_top'],
+ exit => ['no','yes','url'],
);
%optiontext = &Apache::lonlocal::texthash (
+ only => 'deep only',
+ off => 'deeplink off',
+ both => 'regular + deep',
+ hide => 'Hidden',
+ unhide => 'Unhidden',
full => 'Listed (linked) in both',
absent => 'Not listed',
grades => 'Listed in grades only',
@@ -4890,116 +5479,304 @@ sub string_deeplink_selector {
res => 'resource only',
map => 'enclosing map/folder',
rec => 'recursive map/folder',
- any => 'regular + deep',
- only => 'deep only',
- key => 'deep with key',
- lti => 'deep with LTI launch',
+ none => 'not in use',
+ key => 'key access',
+ ltic => 'LTI access (course)',
+ ltid => 'LTI access (domain)' ,
+ std => 'Standard (all menus)',
+ colls => 'Numbered collection',
+ _self => 'Embedded',
+ _top => 'Not embedded',
+ no => 'Not in use',
+ yes => 'In use, no URL redirect',
+ url => 'In use, redirect to URL',
+ );
+ %selectnull = &Apache::lonlocal::texthash (
+ ltic => 'Select Launcher',
+ ltid => 'Select Launcher',
+ colls => 'Select',
);
if ($showval =~ /,/) {
+ %values=();
@current = split(/,/,$showval);
- ($values{'listing'}) = ($current[0] =~ /^(full|absent|grades|details|datestatus)$/);
- ($values{'scope'}) = ($current[1] =~ /^(res|map|rec)$/);
- ($values{'urls'}) = ($current[2] =~ /^(any|only|key:\w+|lti:\d+)$/);
+ ($values{'state'}) = ($current[0] =~ /^(only|off|both)$/);
+ ($values{'others'}) = ($current[1] =~ /^(hide|unhide)$/);
+ ($values{'listing'}) = ($current[2] =~ /^(full|absent|grades|details|datestatus)$/);
+ ($values{'scope'}) = ($current[3] =~ /^(res|map|rec)$/);
+ ($values{'protect'}) = ($current[4] =~ /^(key:[a-zA-Z\d_.!\@#\$%^&*()+=-]+|ltic:\d+|ltid:\d+)$/);
+ ($values{'menus'}) = ($current[5] =~ /^(\d+)$/);
+ ($values{'target'}) = ($current[6] =~ /^(_self|_top)$/);
+ ($values{'exit'}) = ($current[7] =~ /^((?:(?:yes|url)(?:|\:[^:;"',]+))|no)$/);
} else {
+ $defaults{'state'} = 'off',
+ $defaults{'others'} = 'unhide',
$defaults{'listing'} = 'full';
$defaults{'scope'} = 'res';
- $defaults{'urls'} = 'any';
+ $defaults{'protect'} = 'none';
+ $defaults{'menus'} = '0';
+ $defaults{'target'} = '_top';
+ $defaults{'exit'} = 'yes';
}
my $disabled;
if ($readonly) {
$disabled=' disabled="disabled"';
}
- my %lti =
- &Apache::lonnet::get_domain_lti($env{'course.'.$env{'request.course.id'}.'.domain'},
+ my %courselti =
+ &Apache::lonnet::get_course_lti($env{'course.'.$env{'request.course.id'}.'.num'},
+ $env{'course.'.$env{'request.course.id'}.'.domain'},
'provider');
+ foreach my $item (keys(%courselti)) {
+ if (ref($courselti{$item}) eq 'HASH') {
+ $crslti{$item} = $courselti{$item}{'name'};
+ }
+ }
+ my %lti =
+ &Apache::lonnet::get_domain_lti($env{'course.'.$env{'request.course.id'}.'.domain'},
+ 'linkprot');
foreach my $item (keys(%lti)) {
- if (ref($lti{$item}) eq 'HASH') {
- unless ($lti{$item}{'requser'}) {
- $posslti{$item} = $lti{$item}{'consumer'};
+ if (($item =~ /^\d+$/) && (ref($lti{$item}) eq 'HASH')) {
+ $domlti{$item} = $lti{$item}{'name'};
+ }
+ }
+ if ($env{'course.'.$env{'request.course.id'}.'.menucollections'}) {
+ foreach my $item (split(/;/,$env{'course.'.$env{'request.course.id'}.'.menucollections'})) {
+ my ($num,$value) = split(/\%/,$item);
+ if ($num =~ /^\d+$/) {
+ push(@possmenus,$num);
}
}
}
- my $output = '';
- foreach my $item ('listing','scope','urls') {
- $output .= ''.$titles{$item}.' | ';
- }
- $output .= ' ';
- foreach my $item (@components) {
- $output .= '';
- if ($item eq 'urls') {
- my $selected = $values{$item};
- foreach my $option (@{$options{$item}}) {
- if ($option eq 'lti') {
- next unless (keys(%posslti));
- }
- my $checked;
- if ($selected =~ /^\Q$option\E/) {
- $checked = ' checked="checked"';
- }
- my $onclick;
- unless ($readonly) {
- my $esc_key = &js_escape($thiskey);
- $onclick = ' onclick="toggleDeepLink(this.form,'."'$item','$esc_key'".');"';
- }
- $output .= '';
- if ($option eq 'key') {
- my $visibility="hidden";
- my $currkey;
- if ($checked) {
- $visibility = "text";
- $currkey = (split(/\:/,$values{$item}))[1];
- }
- $output .= ' '.
- '';
- } elsif ($option eq 'lti') {
- my $display="none";
- my ($currlti,$blankcheck);
- if ($checked) {
- $display = 'inline-block';
- $currlti = (split(/\:/,$values{$item}))[1];
- } else {
- $blankcheck = ' selected="selected"';
+
+ my $output = '';
+ foreach my $table ('upper','lower') {
+ next unless (ref($components{$table}) eq 'ARRAY');
+ $output .= ''."\n";
+ if ($table eq 'upper') {
+ $output .= ' ';
+ }
+ }
+ return $output;
+}
+
+sub string_grace_selector {
+ my ($thiskey, $showval, $readonly) = @_;
+ my $addmore;
+ unless ($readonly) {
+ $addmore = "\n".'';
+ }
+ my $output = ''.
+ ''."\n".
+ ' '."\n";
+ if ($showval ne '') {
+ my @current;
+ if ($showval =~ /,/) {
+ @current = split(/,/,$showval);
} else {
- my $selected = $values{$item};
- my $defsel;
- if ($selected eq '') {
- $defsel = ' selected="selected"';
- }
- $output .= '';
}
- $output .= ' | ';
+ } elsif (!$readonly) {
+ $output .= &grace_form($thiskey,'','','',$readonly);
+ }
+ $output .= ''.$addmore.'';
+ return $output;
+}
+
+sub grace_form {
+ my ($thiskey,$delta,$fraction,$gradchkon,$readonly) = @_;
+ my $disabled;
+ if ($readonly) {
+ $disabled = ' disabled="disabled"';
+ }
+ my %lt = &grace_titles();
+ my $output = ''.
+ ' '.
+ ' ';
+ unless ($readonly) {
+ $output .= ' '.$lt{'remo'}.'';
}
- $output .= ' '."\n";
+ $output .= ''."\n";
return $output;
}
+sub grace_titles {
+ return &Apache::lonlocal::texthash (
+ sinc => 'Time past due',
+ remo => 'Remove',
+ pcr => 'Partial credit',
+ grad => 'gradual',
+ weeks => 'weeks',
+ days => 'days',
+ hours => 'hours',
+ minutes => 'minutes',
+ );
+}
{ # block using some constants related to parameter types (overview mode)
@@ -5035,7 +5812,12 @@ my %strings =
=> [['_allowfrom_','Hostname(s), or IP(s) from which access is allowed'],
['_denyfrom_','Hostname(s) or IP(s) from which access is disallowed']],
'string_deeplink'
- => [['on','Set choices for link protection, resource listing, and access scope']],
+ => [['on','Set choices for link protection, resource listing, access scope, shown menu items, embedding, and exit link']],
+ 'string_tex'
+ => [['tth', 'tth (TeX to HTML)'],
+ ['mathjax', 'MathJax']],
+ 'string_grace'
+ => [['on','Set grading scale and grace period for submissions after due date']],
);
@@ -5046,7 +5828,9 @@ my %stringmatches = (
=> [['_allowfrom_','[^\!]+'],
['_denyfrom_','\!']],
'string_deeplink'
- => [['on','^(full|absent|grades|details|datestatus)\,(res|map|rec)\,(any|only|key\:\w+|lti\:\d+)$']],
+ => [['on','^(only|off|both)\,(hide|unhide)\,(full|absent|grades|details|datestatus)\,(res|map|rec)\,(none|key\:\w+|ltic\:\d+|ltid\:\d+)\,(\d+|)\,_(self|top),(yes|url|no)(|:[^:;\'",]+)$']],
+ 'string_grace'
+ => [['on','^\d+,(0|1)\.?\d*,(0|1)']],
);
my %stringtypes = (
@@ -5057,6 +5841,8 @@ my %stringtypes = (
examcode => 'string_examcode',
acc => 'string_ip',
deeplink => 'string_deeplink',
+ grace => 'string_grace',
+ texdisplay => 'string_tex',
);
# Returns the possible values and titles for a given string type, or undef if there are none.
@@ -5117,6 +5903,8 @@ sub string_selector {
($thistype eq 'string_discussvote') ||
($thistype eq 'string_ip') ||
($thistype eq 'string_deeplink') ||
+ ($thistype eq 'string_tex') ||
+ ($thistype eq 'string_grace') ||
($name eq 'retrypartial')) {
my ($got_chostname,$chostname,$cmajor,$cminor);
foreach my $possibilities (@{ $strings{$thistype} }) {
@@ -5154,7 +5942,9 @@ sub string_selector {
}
if ($thistype eq 'string_ip') {
- return &string_ip_selector($thiskey,$showval,$readonly);
+ return &string_ip_selector($thiskey,$showval,$readonly);
+ } elsif ($thistype eq 'string_grace') {
+ return &string_grace_selector($thiskey,$showval,$readonly);
} elsif ($thistype eq 'string_deeplink') {
return &string_deeplink_selector($thiskey,$showval,$readonly);
}
@@ -5366,6 +6156,11 @@ sub date_interval_selector {
$showval %= $factor;
my %select = ((map {$_ => $_} (0..$max)),
'select_form_order' => [0..$max]);
+ if ($currval eq '') {
+ unshift(@{$select{'select_form_order'}},'');
+ $select{''} = '';
+ $amount = '';
+ }
$result .= &Apache::loncommon::select_form($amount,$name.'_'.$thiskey,
\%select,'',$readonly);
$result .= ' '.&mt($name);
@@ -5373,29 +6168,29 @@ sub date_interval_selector {
if ($name eq 'interval') {
unless ($skipval{'done'}) {
my $checkedon = '';
+ my $checkedoff = '';
my $checkedproc = '';
my $currproctorkey = '';
my $currprocdisplay = 'hidden';
my $currdonetext = &mt('Done');
- my $checkedoff = ' checked="checked"';
if ($currval =~ /^(?:\d+)_done$/) {
$checkedon = ' checked="checked"';
- $checkedoff = '';
} elsif ($currval =~ /^(?:\d+)_done\:([^\:]+)\:$/) {
$currdonetext = $1;
$checkedon = ' checked="checked"';
- $checkedoff = '';
} elsif ($currval =~ /^(?:\d+)_done_proctor_(.+)$/) {
$currproctorkey = $1;
$checkedproc = ' checked="checked"';
- $checkedoff = '';
$currprocdisplay = 'text';
} elsif ($currval =~ /^(?:\d+)_done\:([^\:]+)\:_proctor_(.+)$/) {
$currdonetext = $1;
$currproctorkey = $2;
$checkedproc = ' checked="checked"';
- $checkedoff = '';
$currprocdisplay = 'text';
+ } elsif ($currval ne '') {
+ $checkedoff = ' checked="checked"';
+ } else {
+ $currdonetext = '';
}
my $onclick = ' onclick="toggleSecret(this.form,'."'done_','$thiskey'".');"';
my $disabled;
@@ -5412,7 +6207,8 @@ sub date_interval_selector {
'&').'"'.$disabled.' /> '.
''.&mt('Button text').': '.
- '&').'"'.$disabled.' />';
+ '&').'"'.$disabled.' />';
}
}
unless ($readonly) {
@@ -5587,6 +6383,7 @@ sub newoverview {
&toggleparmtextbox_js()."\n".
&validateparms_js()."\n".
&ipacc_boxes_js()."\n".
+ &grace_js()."\n".
&done_proctor_js()."\n".
&deeplink_js()."\n".
'// ]]>
@@ -5599,7 +6396,8 @@ sub newoverview {
$r->print($start_page.$breadcrumbs);
&startSettingsScreen($r,'parmset',$crstype);
$r->print(<
+');
+ if ($env{'form.newoverviewsubm'}) {
+ $r->print(<<"END");
+
+
+END
+ }
&endSettingsScreen($r);
$r->print(&Apache::loncommon::end_page());
}
@@ -5809,6 +6677,7 @@ sub overview {
&toggleparmtextbox_js()."\n".
&validateparms_js()."\n".
&ipacc_boxes_js()."\n".
+ &grace_js()."\n".
&done_proctor_js()."\n".
&deeplink_js()."\n".
'// ]]>'."\n".
@@ -5838,7 +6707,7 @@ sub overview {
my $sortorder=$env{'form.sortorder'};
unless ($sortorder) { $sortorder='realmstudent'; }
- &sortmenu($r,$sortorder);
+ &sortmenu($r,$sortorder,'overview');
my $submitbutton = '';
@@ -7098,6 +7967,9 @@ sub parm_change_log {
} else {
if (&isdateparm($istype{$parmname})) {
$showvalue = &Apache::lonlocal::locallocaltime($value);
+ } elsif (($istype{$parmname} eq 'string_grace') ||
+ ($istype{$parmname} eq 'string_ip')) {
+ $showvalue =~ s/,/, /g;
}
}
$output .= $showvalue;
|