'
+ .&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')
.'
'.&mt('No parameter changes saved.').'
'; + } + if ($totalskippeduser) { + $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 .= '
'; } } @@ -3554,7 +3906,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(''). '" name="recent_'.$item.'" />'); @@ -3562,13 +3914,20 @@ sub assessparms { # ----- Start Parameter Selection - # Hide parm selection? + # Hide parm selection and possibly table? + my ($tablejs,$tabledivsty); + if (((($env{'form.uname'} ne '') || ($env{'form.id'} ne '')) && ($uname eq '')) && + ($env{'form.dis'}) && ($pssymb eq '')) { + $tablejs = 'document.getElementById('."'parmtable'".').style.display = "";'; + $tabledivsty = ' style="display:none"'; + } $r->print(<'.$titles{$item}.' | '; - } - $output .= '||
---|---|---|
';
- if (($item eq 'protect') || ($item eq 'menus')) {
- my $selected = $values{$item};
- foreach my $option (@{$options{$item}}) {
- if ($item eq 'protect') {
- if ($option eq 'ltid') {
- next unless (keys(%domlti));
- } elsif ($option eq 'ltic') {
- next unless (keys(%crslti));
- }
- } elsif (($item eq 'menus') && ($option eq 'colls')) {
- next unless (@possmenus);
- }
- my $checked;
- if ($item eq 'menus') {
- if (($selected =~ /^\d+$/) && (@possmenus) &&
- (grep(/^\Q$selected\E$/,@possmenus))) {
- if ($option eq 'colls') {
+ my $output = '';
+ foreach my $table ('upper','lower') {
+ next unless (ref($components{$table}) eq 'ARRAY');
+ $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 .= ' | ';
+ } 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 = '