[system] / branches / rel-2-4-patches / webwork-modperl / lib / WeBWorK / ContentGenerator / CourseAdmin.pm Repository:
ViewVC logotype

Diff of /branches/rel-2-4-patches/webwork-modperl/lib/WeBWorK/ContentGenerator/CourseAdmin.pm

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

Revision 4294 Revision 4295
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v 1.51 2006/07/13 14:55:46 gage Exp $ 4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v 1.52 2006/07/18 13:10:54 gage 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.
504 ), 504 ),
505 ), 505 ),
506 ); 506 );
507 507
508 print CGI::p("Select a database layout below."); 508 print CGI::p("Select a database layout below.");
509 509 print CGI::start_table({class=>"FormLayout"});
510 foreach my $dbLayout (@dbLayouts) { 510 foreach my $dbLayout (@dbLayouts) {
511 print CGI::start_table({class=>"FormLayout"}); 511
512 512
513 my $dbLayoutLabel = (defined $ce->{dbLayout_descr}{$dbLayout}) 513 my $dbLayoutLabel = (defined $ce->{dbLayout_descr}{$dbLayout})
514 ? "$dbLayout - " . $ce->{dbLayout_descr}{$dbLayout} 514 ? "$dbLayout - " . $ce->{dbLayout_descr}{$dbLayout}
515 : $dbLayout; 515 : "$dbLayout - no description provided in global.conf";
516 516
517 # we generate singleton radio button tags ourselves because it's too much of a pain to do it with CGI.pm 517 # we generate singleton radio button tags ourselves because it's too much of a pain to do it with CGI.pm
518 print CGI::Tr({}, 518 print CGI::Tr({},
519 CGI::td({style=>"text-align: right"}, 519 CGI::td({width=>'20%'},
520# why did this not work? because values aren't escaped? 520# why did this not work? because values aren't escaped?
521# '<input type="radio" name="add_dbLayout" value="' . $dbLayout . '"' 521# '<input type="radio" name="add_dbLayout" value="' . $dbLayout . '"'
522# . ($add_dbLayout eq $dbLayout ? 'checked=>"1"' : '') . ' />', 522# . ($add_dbLayout eq $dbLayout ? 'checked=>"1"' : '') . ' />',
523 CGI::radio(-name =>"add_dbLayout", 523 CGI::radio_group(-name =>"add_dbLayout",
524 -value => $dbLayout, 524 -value => [$dbLayout],
525 -checked => ($add_dbLayout eq $dbLayout) ? 1 : 0, 525 -default => $dbLayout,
526 ), 526 ),
527 527
528 ), 528 ),
529 CGI::td($dbLayoutLabel), 529 CGI::td($dbLayoutLabel),
530 ); 530 );
531 531
532
533 }
532 print CGI::end_table(); 534 print CGI::end_table();
533 }
534
535 print CGI::p({style=>"text-align: center"}, CGI::submit(-name=>"add_course", -label=>"Add Course")); 535 print CGI::p({style=>"text-align: left"}, CGI::submit(-name=>"add_course", -label=>"Add Course"));
536 536
537 print CGI::end_form(); 537 print CGI::end_form();
538} 538}
539 539
540sub add_course_validate { 540sub add_course_validate {

Legend:
Removed from v.4294  
changed lines
  Added in v.4295

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9