[LON-CAPA-cvs] cvs: modules /gerd/gcistuff londocs.pm
www
www@source.lon-capa.org
Thu, 16 Jul 2009 07:26:08 -0000
www Thu Jul 16 07:26:08 2009 EDT
Modified files:
/modules/gerd/gcistuff londocs.pm
Log:
Item selection interface working
Index: modules/gerd/gcistuff/londocs.pm
diff -u modules/gerd/gcistuff/londocs.pm:1.4 modules/gerd/gcistuff/londocs.pm:1.5
--- modules/gerd/gcistuff/londocs.pm:1.4 Thu Jul 16 06:37:13 2009
+++ modules/gerd/gcistuff/londocs.pm Thu Jul 16 07:26:08 2009
@@ -2,7 +2,7 @@
# Documents
# Modified for GCI Concept Inventory Assemby
#
-# $Id: londocs.pm,v 1.4 2009/07/16 06:37:13 www Exp $
+# $Id: londocs.pm,v 1.5 2009/07/16 07:26:08 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -136,7 +136,8 @@
sub fullurl {
my ($item)=@_;
- return $path.'/'.$version.'/GCI_'.$item.'.problem';
+ unless ($item=~/\_/) { $item='_'.$item; }
+ return $path.'/'.$version.'/GCI'.$item.'.problem';
}
sub listresources {
@@ -145,6 +146,7 @@
foreach my $item (@chosen) {
$chosen{$item}=1;
}
+ $r->print('<form name="selecteditems" method="post">');
$r->print(&Apache::loncommon::start_data_table().
&Apache::loncommon::start_data_table_header_row().
'<th>'.&mt('Select').'</th><th>'.&mt('Problem').'</th><th>'.&mt('Category').'</th><th>'.&mt('Preview').'</th>'.
@@ -161,7 +163,8 @@
$r->print( &Apache::loncommon::end_data_table_row());
}
- $r->print(&Apache::loncommon::start_data_table());
+ $r->print(&Apache::loncommon::end_data_table());
+ $r->print('<input type="submit" value="'.&mt('Store Problem Selection').'" /></form>');
}
sub mapread {
@@ -2071,29 +2074,7 @@
$r->print(&Apache::loncommon::start_page('Assemble Test'));
-# No folderpath, no pagepath, see if we have something stored
- if ((!$env{'form.folderpath'}) && (!$env{'form.pagepath'})) {
- &Apache::loncommon::restore_course_settings('docs_folderpath',
- {'folderpath' => 'scalar'});
- }
- if (!$env{'form.folderpath'}) {
- &Apache::loncommon::restore_course_settings('docs_folderpath',
- {'pagepath' => 'scalar'});
- }
- if ($env{'form.pagepath'}) {
- $env{'form.folderpath'}='';
- }
- &Apache::loncommon::store_course_settings('docs_folderpath',
- {'pagepath' => 'scalar',
- 'folderpath' => 'scalar'});
- my $coursenum=$env{'course.'.$env{'request.course.id'}.'.num'};
- my $coursedom=$env{'course.'.$env{'request.course.id'}.'.domain'};
my $allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'});
-
-# get personal data
- my $uname=$env{'user.name'};
- my $udom=$env{'user.domain'};
- my $plainname=&escape(&Apache::loncommon::plainname($uname,$udom));
# graphics settings
$iconpath = &Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL') . "/");