[system] / trunk / webwork2 / lib / WeBWorK / ContentGenerator / Instructor / SetMaker.pm Repository:
ViewVC logotype

Diff of /trunk/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 3475 Revision 3478
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm,v 1.49 2005/08/10 18:02:31 sh002i Exp $ 4# $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm,v 1.50 2005/08/11 20:27:07 sh002i Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
292 my @active_modes = grep { exists $display_modes{$_} } 292 my @active_modes = grep { exists $display_modes{$_} }
293 @{$r->ce->{pg}->{displayModes}}; 293 @{$r->ce->{pg}->{displayModes}};
294 push @active_modes, 'None'; 294 push @active_modes, 'None';
295 # We have our own displayMode since its value may be None, which is illegal 295 # We have our own displayMode since its value may be None, which is illegal
296 # in other modules. 296 # in other modules.
297 my $displayMode = $r->param('displayMode') || $r->ce->{pg}->{options}->{displayMode}; 297 my $mydisplayMode = $r->param('mydisplayMode') || $r->ce->{pg}->{options}->{displayMode};
298 $result .= ' Display Mode: '.CGI::popup_menu(-name=> 'displayMode', 298 $result .= ' Display Mode: '.CGI::popup_menu(-name=> 'mydisplayMode',
299 -values=>\@active_modes, 299 -values=>\@active_modes,
300 -default=> $displayMode); 300 -default=> $mydisplayMode);
301 # Now we give a choice of the number of problems to show 301 # Now we give a choice of the number of problems to show
302 my $defaultMax = $r->param('max_shown') || MAX_SHOW_DEFAULT; 302 my $defaultMax = $r->param('max_shown') || MAX_SHOW_DEFAULT;
303 $result .= ' Max. Shown:&nbsp'. 303 $result .= ' Max. Shown:&nbsp'.
304 CGI::popup_menu(-name=> 'max_shown', 304 CGI::popup_menu(-name=> 'max_shown',
305 -values=>[5,10,15,20,25,30,50,'All'], 305 -values=>[5,10,15,20,25,30,50,'All'],
819 setID=>"Undefined_Set", 819 setID=>"Undefined_Set",
820 problemID=>"1"), 820 problemID=>"1"),
821 params=>{sourceFilePath => "$sourceFileName", problemSeed=> $problem_seed} 821 params=>{sourceFilePath => "$sourceFileName", problemSeed=> $problem_seed}
822 )}, "Edit it" ); 822 )}, "Edit it" );
823 823
824 my $displayMode = $self->r->param("displayMode"); 824 my $displayMode = $self->r->param("mydisplayMode");
825 $displayMode = $self->r->ce->{pg}->{options}->{displayMode} 825 $displayMode = $self->r->ce->{pg}->{options}->{displayMode}
826 if not defined $displayMode or $displayMode eq "None"; 826 if not defined $displayMode or $displayMode eq "None";
827 my $try_link = CGI::a({href=>$self->systemLink( 827 my $try_link = CGI::a({href=>$self->systemLink(
828 $urlpath->newFromModule("WeBWorK::ContentGenerator::Problem", 828 $urlpath->newFromModule("WeBWorK::ContentGenerator::Problem",
829 courseID =>$urlpath->arg("courseID"), 829 courseID =>$urlpath->arg("courseID"),
1250 1250
1251 my @pg_html=($last_shown>=$first_shown) ? 1251 my @pg_html=($last_shown>=$first_shown) ?
1252 renderProblems(r=> $r, 1252 renderProblems(r=> $r,
1253 user => $user, 1253 user => $user,
1254 problem_list => [@pg_files[$first_shown..$last_shown]], 1254 problem_list => [@pg_files[$first_shown..$last_shown]],
1255 displayMode => $r->param('displayMode')) : (); 1255 displayMode => $r->param('mydisplayMode')) : ();
1256 1256
1257 ########## Top part 1257 ########## Top part
1258 print CGI::startform({-method=>"POST", -action=>$r->uri, -name=>'mainform'}), 1258 print CGI::startform({-method=>"POST", -action=>$r->uri, -name=>'mainform'}),
1259 $self->hidden_authen_fields, 1259 $self->hidden_authen_fields,
1260 '<div align="center">', 1260 '<div align="center">',

Legend:
Removed from v.3475  
changed lines
  Added in v.3478

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9