+');
foreach my $task (@{$tasksref}) {
- if ($task eq $action) {
- $r->print("
+ if (($task eq $action) && ($state eq 'choose')) {
+ $r->print('
-
- $$tasklongref{$task}
-
- $$tasklongref{$task}
|
- "); + | ');
}
###############################################################
sub print_main_frame {
- my ($r,$realm,$dom,$crs,$tasktitleref) = @_;
+ my ($r,$realm,$dom,$crs,$tasktitleref,$permref) = @_;
my $action = "information";
if (exists($env{'form.action'}) ) {
$action = $env{'form.action'};
}
+ my ($disabled,$readonly);
+ unless ($permref->{'edit'}) {
+ $disabled = ' disabled="disabled"';
+ $readonly = 1;
+ }
# Get course settings
my %enrollvar;
- my @bgcolors=("#eeeeee","#cccccc");
my %settings = &Apache::lonnet::dump('environment',$dom,$crs);
- foreach my $item (keys %settings) {
+ foreach my $item (keys(%settings)) {
if ($item =~ m/^internal\.(.+)$/) {
$enrollvar{$1} = $settings{$item};
} elsif ($item =~ /^default_enrollment_(start|end)_date$/) {
@@ -296,124 +358,314 @@ sub print_main_frame {
}
}
- if ($action eq "information") {
- $r->print(<
+ Warning. Currently NO first enrollment or last enrollment dates are set. You must use this menu to set a start date and an end date if you plan to utilise automated adds and/or drops in this course.\n"; + $dateshow = ' '.&mt('Warning.').' '.&mt('Currently [_1]NO[_2] first enrollment or last enrollment dates are set.','','').' '. + &mt('You [_1]must[_2] use this menu to set a start date and an end date if you plan to utilise automated adds and/or drops in this course.','','')."\n"; } else { - $dateshow = "Currently: First enrollment: $oldstartshow, Last enrollment: $oldendshow\n"; + $dateshow = &mt('Currently: First enrollment[_1] Last enrollment[_2]', + " -- $oldstartshow"," -- $oldendshow")."\n"; } - $r->print(< + $r->print(' + |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If automated adds and/or drops are enabled, then your class roster will be automatically updated nightly, once the first enrollment date has been reached. Prior to this date, the class roster will only contain students you have added directly using the standard LON-CAPA enrollment tools | +'. + &mt('If automated adds and/or drops are enabled, then your class roster will be automatically updated nightly, once the first enrollment date has been reached. Prior to this date, the class roster will only contain students you have added directly using the standard LON-CAPA enrollment tools.').' | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
If automated adds and/or drops are enabled, then your class roster will be automatically updated nightly, until the last enrollment date has been reached. |
+ '.&mt('If automated adds and/or drops are enabled, then your class roster will be automatically updated nightly, until the last enrollment date has been reached.').' |
|