--- loncom/homework/structuretags.pm 2008/12/11 04:43:34 1.437
+++ loncom/homework/structuretags.pm 2009/03/18 13:46:26 1.440
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.437 2008/12/11 04:43:34 raeburn Exp $
+# $Id: structuretags.pm,v 1.440 2009/03/18 13:46:26 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -423,8 +423,8 @@ sub problem_web_to_edit_header {
&mt(' Show All Instances')
: &mt(' Show All Foils');
- my $show_all= '';
@@ -904,9 +904,9 @@ sub start_problem {
}
if ($env{'request.role.adv'}) {
$form_tag_start.=
- ' '.&mt(' Show All Foils').
'';
@@ -1599,6 +1599,20 @@ sub start_randomlist {
my $showarg=&Apache::lonxml::get_param('show',$parstack,$safeeval);
$showarg--;
if ( ($showarg >= 0) && ($showarg < $show) ) { $show = $showarg; }
+ if (($target eq 'analyze') && ($env{'form.check_parts_withrandomlist'})) {
+ my @currlist;
+ my $part = $Apache::inputtags::part;
+ if ($part ne '') {
+ if (ref($Apache::lonhomework::analyze{'parts_withrandomlist'}) eq 'ARRAY') {
+ my @currlist = @{$Apache::lonhomework::analyze{'parts_withrandomlist'}};
+ if (!(grep(/^\Q$part\E$/,@currlist))) {
+ push(@{$Apache::lonhomework::analyze{'parts_withrandomlist'}},$part);
+ }
+ } else {
+ push(@{$Apache::lonhomework::analyze{'parts_withrandomlist'}},$part);
+ }
+ }
+ }
for(0 .. $show) {
$bodytext .= "$randomlist[ $idx_arr[$_] ]";
}
@@ -1943,7 +1957,7 @@ sub end_startouttext {
my $areaid = 'homework_edit_'.$Apache::lonxml::curdepth;
$text=&Apache::lonxml::get_all_text("endouttext",$parser,$style);
$result.=&Apache::edit::start_table($token)."
".&mt('Text Block')." | "
- .''.&mt('Delete?').' '
+ .' | '.&mt('Delete?').' '
.&Apache::edit::deletelist($target,$token)
.' | ';
unless ($env{'environment.wysiwygeditor'} eq 'on') {