version 1.196, 2015/08/16 00:21:21
|
version 1.197.2.3, 2024/07/02 04:07:23
|
Line 1800 sub render {
|
Line 1800 sub render {
|
if (lc($time) eq 'anytime') { |
if (lc($time) eq 'anytime') { |
$anytime=1; |
$anytime=1; |
$date = &get_date_object(time); |
$date = &get_date_object(time); |
$date->min(0); |
$date->set_minute(0); |
} elsif (defined($time) && $time ne 0) { |
} elsif (defined($time) && $time ne 0) { |
$date = &get_date_object($time); |
$date = &get_date_object($time); |
} else { |
} else { |
Line 1810 sub render {
|
Line 1810 sub render {
|
|
|
if (!defined($date)) { |
if (!defined($date)) { |
$date = &get_date_object(time); |
$date = &get_date_object(time); |
$date->min(0); |
$date->set_minute(0); |
} |
} |
|
|
if ($anytime) { |
if ($anytime) { |
Line 2047 be filtered out. The 'addstatus' attribu
|
Line 2047 be filtered out. The 'addstatus' attribu
|
and long status display columns to the display. The 'addparts' |
and long status display columns to the display. The 'addparts' |
attribute will add in a part selector beside problems that have more |
attribute will add in a part selector beside problems that have more |
than 1 part. The 'includecourse' attribute if true, will include |
than 1 part. The 'includecourse' attribute if true, will include |
the toplevel default.sequence in the results. |
the toplevel default.sequence in the results. The 'modalLink' attribute, |
|
if true, will cause links to be launched as modal pop-ups, instead of |
|
replacing the resource selection listing, currently being displayed. |
|
|
=head3 SUB-TAGS |
=head3 SUB-TAGS |
|
|
Line 2159 sub start_resource {
|
Line 2161 sub start_resource {
|
$paramHash->{'toponly'} = $token->[2]{'toponly'}; |
$paramHash->{'toponly'} = $token->[2]{'toponly'}; |
$paramHash->{'addstatus'} = $token->[2]{'addstatus'}; |
$paramHash->{'addstatus'} = $token->[2]{'addstatus'}; |
$paramHash->{'addparts'} = $token->[2]{'addparts'}; |
$paramHash->{'addparts'} = $token->[2]{'addparts'}; |
|
$paramHash->{'modalLink'} = $token->[2]{'modallink'}; |
|
$paramHash->{'nocurrloc'} = $token->[2]{'nocurrloc'}; |
|
$paramHash->{'suppressNavmap'} = $token->[2]{'suppressNavmap'}; |
if ($paramHash->{'addparts'}) { |
if ($paramHash->{'addparts'}) { |
$helper->declareVar($paramHash->{'variable'}.'_part'); |
$helper->declareVar($paramHash->{'variable'}.'_part'); |
} |
} |
Line 2365 BUTTONS
|
Line 2370 BUTTONS
|
my $option_texts = $self->{OPTION_TEXTS}; |
my $option_texts = $self->{OPTION_TEXTS}; |
my $option_types = $self->{OPTION_TYPES}; |
my $option_types = $self->{OPTION_TYPES}; |
my $addparts = $self->{'addparts'}; |
my $addparts = $self->{'addparts'}; |
|
my $modalLink = $self->{'modalLink'}; |
my $headings_done = 0; |
my $headings_done = 0; |
|
|
# Evaluate the map url as needed |
# Evaluate the map url as needed |
Line 2464 BUTTONS
|
Line 2470 BUTTONS
|
$resource_name . "'/> </td>"; |
$resource_name . "'/> </td>"; |
} else { |
} else { |
$col .= |
$col .= |
"<td align='center'><input type=$option_type name ='$option_var". |
"<td align='center'><input type='$option_type' name ='$option_var". |
"_forminput' value='". |
"_forminput' value='". |
$resource_name . "' $checked /> </td>"; |
$resource_name . "' $checked /> </td>"; |
} |
} |
Line 2549 RADIO
|
Line 2555 RADIO
|
'suppressEmptySequences' => $self->{'suppressEmptySequences'}, |
'suppressEmptySequences' => $self->{'suppressEmptySequences'}, |
'include_top_level_map' => $self->{'include_top_level_map'}, |
'include_top_level_map' => $self->{'include_top_level_map'}, |
'iterator_map' => $mapUrl, |
'iterator_map' => $mapUrl, |
'map_no_edit_link' => 1, } |
'map_no_edit_link' => 1, |
|
'modalLink' => $modalLink, |
|
'nocurrloc' => $self->{'nocurrloc'}, |
|
'suppressNavmap' => $self->{'suppressNavmap'}, } |
); |
); |
|
|
$result .= $buttons; |
$result .= $buttons; |
Line 3183 It takes the standard attributes "variab
|
Line 3192 It takes the standard attributes "variab
|
"allowempty" and "nextstate", meaning what they do for most other |
"allowempty" and "nextstate", meaning what they do for most other |
elements. |
elements. |
|
|
also takes a boolean 'onlysections' whcih will restrict this to only |
also takes a boolean 'onlysections' which will restrict this to only |
have sections and not include groups |
have sections and not include groups |
|
|
=cut |
=cut |
Line 3277 It takes the standard attributes "variab
|
Line 3286 It takes the standard attributes "variab
|
"allowempty" and "nextstate", meaning what they do for most other |
"allowempty" and "nextstate", meaning what they do for most other |
elements. |
elements. |
|
|
|
also takes a boolean grouponly, which if true, will restrict choice to |
|
groups in which user is a member, unless user has the mdg priv in the course, |
|
in which case all groups will be possible choices. Defaults to false. |
|
|
=cut |
=cut |
|
|
no strict; |
no strict; |
Line 3306 sub start_group {
|
Line 3319 sub start_group {
|
$helper->declareVar($paramHash->{'variable'}); |
$helper->declareVar($paramHash->{'variable'}); |
$paramHash->{'multichoice'} = $token->[2]{'multichoice'}; |
$paramHash->{'multichoice'} = $token->[2]{'multichoice'}; |
$paramHash->{'allowempty'} = $token->[2]{'allowempty'}; |
$paramHash->{'allowempty'} = $token->[2]{'allowempty'}; |
|
$paramHash->{'grouponly'} = $token->[2]{'grouponly'}; |
if (defined($token->[2]{'nextstate'})) { |
if (defined($token->[2]{'nextstate'})) { |
$paramHash->{NEXTSTATE} = $token->[2]{'nextstate'}; |
$paramHash->{NEXTSTATE} = $token->[2]{'nextstate'}; |
} |
} |
Line 3313 sub start_group {
|
Line 3327 sub start_group {
|
# Populate the CHOICES element |
# Populate the CHOICES element |
my %choices; |
my %choices; |
|
|
my %curr_groups = &Apache::longroup::coursegroups(); |
my %curr_groups; |
|
if ((!$paramHash->{'grouponly'}) || (&Apache::lonnet::allowed('mdg',$Apache::lonnet::env{'request.course.id'}))) { |
|
%curr_groups = &Apache::longroup::coursegroups(); |
|
} elsif ($Apache::lonnet::env{'request.course.groups'} ne '') { |
|
map { $curr_groups{$_} = 1; } split(/:/,$Apache::lonnet::env{'request.course.groups'}); |
|
} |
foreach my $group_name (sort {lc($a) cmp lc($b)} (keys(%curr_groups))) { |
foreach my $group_name (sort {lc($a) cmp lc($b)} (keys(%curr_groups))) { |
push(@{$paramHash->{CHOICES}}, [$group_name, $group_name]); |
push(@{$paramHash->{CHOICES}}, [$group_name, $group_name]); |
} |
} |