--- loncom/interface/londocs.pm 2010/02/02 01:30:46 1.325.2.7 +++ loncom/interface/londocs.pm 2009/09/24 22:15:27 1.325.4.2 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.325.2.7 2010/02/02 01:30:46 raeburn Exp $ +# $Id: londocs.pm,v 1.325.4.2 2009/09/24 22:15:27 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -44,6 +44,7 @@ use HTML::Entities; use GDBM_File; use Apache::lonlocal; use Cwd; +use Apache::londocsgci(); use LONCAPA qw(:DEFAULT :match); my $iconpath; @@ -117,17 +118,17 @@ sub authorhosts { sub dumpbutton { my ($home,$other,%outhash)=&authorhosts(); - my $crstype = &Apache::loncommon::course_type(); + my $type = &Apache::loncommon::course_type(); if ($home+$other==0) { return ''; } if ($home) { return '
'. ''. + &mt('Dump '.$type.' DOCS to Construction Space').'" />'. &Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs'). '
'; } else { return '
'. - &mt('Dump '.$crstype. + &mt('Dump '.$type. ' DOCS to Construction Space: available on other servers'). '
'; } @@ -143,10 +144,10 @@ sub clean { sub dumpcourse { my ($r) = @_; - my $crstype = &Apache::loncommon::course_type(); - $r->print(&Apache::loncommon::start_page('Dump '.$crstype.' DOCS to Construction Space'). - '
'); - $r->print(&Apache::lonhtmlcommon::breadcrumbs('Dump '.$crstype.' DOCS to Construction Space')); + my $type = &Apache::loncommon::course_type(); + $r->print(&Apache::loncommon::start_page('Dump '.$type.' DOCS to Construction Space'). + ''); + $r->print(&Apache::lonhtmlcommon::breadcrumbs('Dump '.$type.' DOCS to Construction Space')); my ($home,$other,%outhash)=&authorhosts(); unless ($home) { return ''; } my $origcrsid=$env{'request.course.id'}; @@ -257,46 +258,36 @@ sub dumpcourse { $r->print(&Apache::loncommon::end_data_table()); &untiehash(); $r->print( - '

'); + '

'); } } sub exportbutton { - my $crstype = &Apache::loncommon::course_type(); - return ''. - &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'
'; + my $type = &Apache::loncommon::course_type(); + return '
'. + ''. + &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'
'; } sub exportcourse { my $r=shift; - my $crstype = &Apache::loncommon::course_type(); + my $type = &Apache::loncommon::course_type(); my %discussiontime = &Apache::lonnet::dump('discussiontimes', $env{'course.'.$env{'request.course.id'}.'.domain'}, $env{'course.'.$env{'request.course.id'}.'.num'}); my $numdisc = keys(%discussiontime); my $navmap = Apache::lonnavmaps::navmap->new(); if (!defined($navmap)) { - $r->print(&Apache::loncommon::start_page('Export '.$crstype.' to IMS Package'). - '

'.&mt('IMS Export Failed').'

'. - '
'); - if ($crstype eq 'Community') { - $r->print(&mt('Unable to retrieve information about community contents')); - } else { - $r->print(&mt('Unable to retrieve information about course contents')); - } - $r->print('
'); - if ($crstype eq 'Community') { - $r->print(&mt('Return to Community Editor')); - } else { - $r->print(&mt('Return to Course Editor')); - } - $r->print(''); - &Apache::lonnet::logthis('IMS export failed - could not create navmap object in '.lc($crstype).':'.$env{'request.course.id'}); + $r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package'). + '

IMS Export Failed

'. + '
'. + &mt('Unable to retrieve information about course contents'). + '
'.&mt('Return to Course Editor').''); + &Apache::lonnet::logthis('IMS export failed - could not create navmap object in '.lc($type).':'.$env{'request.course.id'}); return; } my $it=$navmap->getIterator(undef,undef,undef,1,undef,undef); @@ -312,17 +303,7 @@ sub exportcourse { my @exportitems = &Apache::loncommon::get_env_multiple('form.archive'); my @discussions = &Apache::loncommon::get_env_multiple('form.discussion'); if (@exportitems == 0 && @discussions == 0) { - $outcome = - '

' - .&mt('As you did not select any content items or discussions' - .' for export, an IMS package has not been created.') - .'

' - .'

' - .&mt('Please [_1]go back[_2] to select either content items' - .' or discussions for export.' - ,'' - ,'') - .'

'; + $outcome = '
As you did not select any content items or discussions for export, an IMS package has not been created. Please go back to select either content items or discussions for export'; } else { my $now = time; my %symbs; @@ -345,53 +326,35 @@ sub exportcourse { open(OUTPUT, "zip -r $imszip * 2> /dev/null |"); close(OUTPUT); chdir $cwd; - $outcome .= '

' - .&mt('[_1]Your IMS package[_2] is ready for download.' - ,'','') - .'

'; + $outcome .= &mt('Download the zip file from IMS '.lc($type).' archive
',$imszipfile,); if ($copyresult) { - $outcome .= '

' - .&mt('The following errors occurred during export - [_1]' - ,$copyresult) - .'

'; + $outcome .= &mt('The following errors occurred during export - [_1]',$copyresult); } } else { - $outcome = '

' - .&mt('Unfortunately you will not be able to retrieve' - .' an IMS archive of this posts at this time,' - .' because there was a problem creating a' - .' manifest file.') - .'

' - .'

' - .&mt('Go Back') - .'

'; + $outcome = '
'.&mt('Unfortunately you will not be able to retrieve an IMS archive of this posts at this time, because there was a problem creating a manifest file.').'
'; } } - $r->print(&Apache::loncommon::start_page('Export '.$crstype.' to IMS Package')); - $r->print(&Apache::lonhtmlcommon::breadcrumbs('IMS Export')); + $r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package')); + $r->print(&Apache::lonhtmlcommon::breadcrumbs('Export '.lc($type).' to IMS content package')); $r->print($outcome); $r->print(&Apache::loncommon::end_page()); } else { - my $display='
'."\n". - '

'. - &mt('Choose which items you wish to export from your '.$crstype.'.'). - '

'. - '
'. - ''.&mt('Content items').''. - '
'); + $display .= ''. + ''. + ''. + ''. + '
 Content items'. + ''. - '  
'; - if ($numdisc > 0) { - $display .= '
'. - ''.&mt('Discussion posts').''. - ''. - '  '. - '
'; - } - $display .= ''; + '  
  
 Discussion posts'. + ''. + '  
'; my $curRes; my $depth = 0; my $count = 0; @@ -400,13 +363,13 @@ sub exportcourse { my %parent = (); my %children = (); my $lastcontainer = $startcount; - $display .= &Apache::loncommon::start_data_table() - .&Apache::loncommon::start_data_table_header_row() - .''.&mt('Export content item?').''; + my @bgcolors = ('#F6F6F6','#FFFFFF'); + $display .= ''. + ''; + $display.='Export discussion posts?'."\n"; } - $display .= &Apache::loncommon::end_data_table_header_row(); + $display.=' '; while ($curRes = $it->next()) { if (ref($curRes)) { $count ++; @@ -427,43 +390,38 @@ sub exportcourse { $ressymb = 'bulletin___'.$3.'___adm/wrapper/adm/'.$1.'/'.$2.'/'.$3.'/bulletinboard'; } } - my $currelem = $count+$boards+$startcount; - $display .= &Apache::loncommon::start_data_table_row() - .''."\n"; - - # Existing discussion posts? - + $display .= ' '.$curRes->title().''; if ($discussiontime{$ressymb} > 0) { $boards ++; - $display .= ''."\n"; + $currelem = $count+$boards+$startcount; + $display .= ''."\n"; } else { - $display .= ''."\n"; + $display .= ''."\n"; } - $display .= &Apache::loncommon::end_data_table_row(); } } - $display .= &Apache::loncommon::end_data_table(); my $scripttag = qq| - |; - $r->print(&Apache::loncommon::start_page('Export '.$crstype.' to IMS Package', - $scripttag)); - $r->print(&Apache::lonhtmlcommon::breadcrumbs('Export '.lc($crstype).' to IMS content package')); - $r->print($display. + $r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package', + $scripttag)); + $r->print(&Apache::lonhtmlcommon::breadcrumbs('Export '.lc($type).' to IMS content package')); + $r->print($display.'
Export content item?
 '."\n"; if ($numdisc > 0) { - $display .= ''.&mt('Export discussion posts?').'
'."\n" - .''."\n". + 'is_sequence()) || ($curRes->is_page())) { - $lastcontainer = $currelem; - $display .= 'onclick="javascript:propagateCheck('."'$currelem'".')"'; + my $checkitem = $count + $boards + $startcount; + $display .= 'onClick="javascript:propagateCheck('."'$checkitem'".')"'; } $display .= ' />'."\n"; for (my $i=0; $i<$depth; $i++) { - $display .= ('' x2)."\n"; + $display .= ''."\n"; } if ($curRes->is_sequence()) { $display .= ' '."\n"; + $lastcontainer = $count + $startcount + $boards; } elsif ($curRes->is_page()) { $display .= ' '."\n"; + $lastcontainer = $count + $startcount + $boards; } + my $currelem = $count+$boards+$startcount; $children{$parent{$depth}} .= $currelem.':'; - $display .= ' '.$curRes->title().'' - .'' - .'    
'. '

'. '

'); + &mt('Export '.$type.' DOCS').'" />

'); } } @@ -551,7 +508,7 @@ sub create_ims_store { my $manifestfilename = $$tempexport.$manifest; if ($ims_manifest = Apache::File->new('>'.$manifestfilename)) { $$manifestok=1; - print $ims_manifest + print $ims_manifest ''."\n". 'print($breadcrumbtrail); # ------------------------------------------------------------ Process commands @@ -1619,7 +1576,7 @@ sub editor { unless ($name) { $name=(split(/\//,$url))[-1]; } unless ($name) { $idx++; next; } $r->print(&entryline($idx,$name,$url,$folder,$allowed,$res, - $coursenum,$crstype)); + $coursenum)); $idx++; $shown++; } @@ -1697,7 +1654,7 @@ sub process_file_upload { return 'failed'; } else { if ($parseaction eq 'parse') { - my $total_embedded = scalar(keys(%{$allfiles})); + my $total_embedded = keys(%{$allfiles}); if ($total_embedded > 0) { my $num = 0; my $state = ' @@ -1758,7 +1715,6 @@ sub parse_supplemental_title { $foldertitle=&Apache::lontexconvert::msgtexconverted($4); my $name = &Apache::loncommon::plainname($uname,$udom); $name = &HTML::Entities::encode($name,'"<>&\''); - $renametitle = &HTML::Entities::encode($renametitle,'"<>&\''); $title=''.&Apache::lonlocal::locallocaltime($time).' '. $name.':
'.$foldertitle; } @@ -1771,7 +1727,7 @@ sub parse_supplemental_title { # --------------------------------------------------------------- An entry line sub entryline { - my ($index,$title,$url,$folder,$allowed,$residx,$coursenum,$crstype)=@_; + my ($index,$title,$url,$folder,$allowed,$residx,$coursenum)=@_; my ($foldertitle,$pagetitle,$renametitle); if (&is_supplemental_title($title)) { @@ -2011,7 +1967,7 @@ END my $ro_set= ((&LONCAPA::map::getparameter($orderidx,'parameter_randomorder'))[0]=~/^yes$/i?' checked="checked"':''); $rand_order_text =' -'; +'; } if ($ispage) { my $pagename=&escape($pagetitle); @@ -2037,18 +1993,12 @@ END } else { undef($external); } - my $reinit; - if ($crstype eq 'Community') { - $reinit = &mt('(re-initialize community to access)'); - } else { - $reinit = &mt('(re-initialize course to access)'); - } $line.=' '.($url?'':'').''.($url?'':'').' - '.($url?"":'').$title.($url?'':' '.$reinit.'').$external." + '.($url?"":'').$title.($url?'':' '.&mt('(re-initialize course to access)').'').$external." "; if (($allowed) && ($folder!~/^supplemental/)) { my %lt=&Apache::lonlocal::texthash( @@ -2061,12 +2011,12 @@ END $line.=(< $form_start - + $form_end $form_start - + $form_end $form_start $rand_order_text $form_end @@ -2149,7 +2099,7 @@ sub checkonthis { if (($errorcount) || ($warningcount)) { if ($errorcount) { - $r->print(''.&mt('bomb').''. + $r->print(''. &mt('[quant,_1,error]',$errorcount).''); } if ($warningcount) { @@ -2196,7 +2146,7 @@ List Symbs sub list_symbs { my ($r) = @_; - my $crstype = &Apache::loncommon::course_type(); + my $type = &Apache::loncommon::course_type(); $r->print(&Apache::loncommon::start_page('Symb List')); $r->print(&Apache::lonhtmlcommon::breadcrumbs('Symb List')); my $navmap = Apache::lonnavmaps::navmap->new(); @@ -2205,7 +2155,7 @@ sub list_symbs { '
'. &mt('Unable to retrieve information about course contents'). '
'); - &Apache::lonnet::logthis('Symb list failed - could not create navmap object in '.lc($crstype).':'.$env{'request.course.id'}); + &Apache::lonnet::logthis('Symb list failed - could not create navmap object in '.lc($type).':'.$env{'request.course.id'}); } else { $r->print("
\n");
         foreach my $res ($navmap->retrieveResources()) {
@@ -2219,11 +2169,11 @@ sub list_symbs {
 
 sub verifycontent {
     my ($r) = @_;
-    my $crstype = &Apache::loncommon::course_type();
+    my $type = &Apache::loncommon::course_type();
    my $loaderror=&Apache::lonnet::overloaderror($r);
    if ($loaderror) { return $loaderror; }
-   $r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Documents'));
-   $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Documents'));
+   $r->print(&Apache::loncommon::start_page('Verify '.$type.' Documents'));
+   $r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$type.' Documents'));
    $hashtied=0;
    undef %alreadyseen;
    %alreadyseen=();
@@ -2232,7 +2182,7 @@ sub verifycontent {
        if ($hash{$key}=~/\.(page|sequence)$/) {
 	   if (($key=~/^src_/) && ($alreadyseen{&unescape($hash{$key})})) {
 	       $r->print('
'. - &mt('The following sequence or page is included more than once in your '.$crstype.': '). + &mt('The following sequence or page is included more than once in your '.$type.': '). &unescape($hash{$key}).'
'. &mt('Note that grading records for problems included in this sequence or folder will overlap.
')); } @@ -2255,9 +2205,9 @@ sub devalidateversioncache { sub checkversions { my ($r) = @_; - my $crstype = &Apache::loncommon::course_type(); - $r->print(&Apache::loncommon::start_page("Check $crstype Document Versions")); - $r->print(&Apache::lonhtmlcommon::breadcrumbs("Check $crstype Document Versions")); + my $type = &Apache::loncommon::course_type(); + $r->print(&Apache::loncommon::start_page("Check $type Document Versions")); + $r->print(&Apache::lonhtmlcommon::breadcrumbs("Check $type Document Versions")); my $header=''; my $startsel=''; my $monthsel=''; @@ -2318,7 +2268,7 @@ sub checkversions { &changewarning($r,''); if ($env{'form.timerange'} eq 'all') { # show all documents - $header=&mt('All Documents in '.$crstype); + $header=&mt('All Documents in '.$type); $allsel=1; foreach my $key (keys(%hash)) { if ($key=~/^ids\_(\/res\/.+)$/) { @@ -2363,7 +2313,7 @@ sub checkversions { $env{'course.'.$env{'request.course.id'}.'.domain'}, $env{'course.'.$env{'request.course.id'}.'.num'}); my %lt=&Apache::lonlocal::texthash - ('st' => 'Version changes since start of '.$crstype, + ('st' => 'Version changes since start of '.$type, 'lm' => 'Version changes since last Month', 'lw' => 'Version changes since last Week', 'sy' => 'Version changes since Yesterday', @@ -2372,9 +2322,9 @@ sub checkversions { 'fi' => 'File', 'md' => 'Modification Date', 'mr' => 'Most recently published Version', - 've' => 'Version used in '.$crstype, - 'vu' => 'Set Version to be used in '.$crstype, -'sv' => 'Set Versions to be used in '.$crstype.' according to Selections below', + 've' => 'Version used in '.$type, + 'vu' => 'Set Version to be used in '.$type, +'sv' => 'Set Versions to be used in '.$type.' according to Selections below', 'sm' => 'Keep all Resources up-to-date with most recent Versions (default)', 'sc' => 'Set all Resource Versions to current Version (Fix Versions)', 'di' => 'Differences'); @@ -2421,7 +2371,7 @@ ENDHEADERS 'Most Recent: '. ''.$currentversion.''. ''. - 'In '.$crstype.': '. + 'In '.$type.': '. ''); # Used in course my $usedversion=$hash{'version_'.$linkurl}; @@ -2438,7 +2388,7 @@ ENDHEADERS ('select_form_order' => ['',1..$currentversion,'mostrecent'], '' => '', - 'mostrecent' => &mt('most recent'), + 'mostrecent' => 'most recent', map {$_,$_} (1..$currentversion)))); $r->print(''); my $lastold=1; @@ -2539,19 +2489,14 @@ sub changewarning { $message='Changes will become active for your current session after [_1], or the next time you log in.'; } $r->print("\n\n". -''."\n". +''."\n". '
'. '

'. +'" />

'. &mt($message,' '). -$help{'Caching'}.'

'."\n\n"); - + &mt('re-initializing '.$course_type).'" onClick="reinit(this.form)" />'). +$help{'Caching'}.'

'."\n\n"); } @@ -2559,7 +2504,7 @@ sub init_breadcrumbs { my ($form,$text)=@_; &Apache::lonhtmlcommon::clear_breadcrumbs(); &Apache::lonhtmlcommon::add_breadcrumb({href=>"/adm/coursedocs", - text=>&Apache::loncommon::course_type().' Editor', + text=>"Edit ".&Apache::loncommon::course_type(), faq=>273, bug=>'Instructor Interface', help => 'Docs_Adding_Course_Doc'}); @@ -2577,7 +2522,16 @@ sub handler { &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; return OK if $r->header_only; - my $crstype = &Apache::loncommon::course_type(); + my $type = &Apache::loncommon::course_type(); + + my $coursedom=$env{'course.'.$env{'request.course.id'}.'.domain'}; + if ($coursedom eq 'gcitest') { + my $allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'}); + if ($allowed) { + &concept_test_builder($r); + return OK; + } + } # --------------------------------------------- Initialize help topics for this foreach my $topic ('Adding_Course_Doc','Main_Course_Documents', @@ -2620,7 +2574,7 @@ sub handler { &init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' DOCS to Construction Space'); &dumpcourse($r); } elsif ($allowed && $env{'form.exportcourse'}) { - &init_breadcrumbs('exportcourse','IMS Export'); + &init_breadcrumbs('exportcourse','Export '.&Apache::loncommon::course_type().' to IMS'); &exportcourse($r); } else { # is this a standard course? @@ -2649,7 +2603,7 @@ sub handler { } if ($env{'form.folderpath'} =~ /^supplemental_\d+/) { $env{'form.folderpath'} = 'supplemental&'. - &escape(&mt('Supplemental '.$crstype.' Documents')).'&'. + &escape(&mt('Supplemental '.$type.' Documents')).'&'. $env{'form.folderpath'}; } &Apache::loncommon::store_course_settings('docs_folderpath', @@ -2704,13 +2658,9 @@ sub handler { $script .= &editing_js($udom,$uname); } # -------------------------------------------------------------------- Body tag - $script = ''."\n"; - my $brcrum = [{href=>"/adm/createuser",text=>"$crstype Documents"}]; - $r->print(&Apache::loncommon::start_page("$crstype Documents", $script, + $script = ''; + my $brcrum = [{href=>"/adm/createuser",text=>"$type Documents"}]; + $r->print(&Apache::loncommon::start_page("$type Documents", $script, {'force_register' => $showdoc, 'bread_crumbs' => $brcrum}). &Apache::loncommon::help_open_menu('','',273,'RAT')); @@ -2805,8 +2755,8 @@ sub handler { unless ($showdoc || $upload_result eq 'phasetwo') { # ----------------------------------------------------------------------------- my %lt=&Apache::lonlocal::texthash( - 'uplm' => 'Upload a new main '.lc($crstype).' document', - 'upls' => 'Upload a new supplemental '.lc($crstype).' document', + 'uplm' => 'Upload a new main '.lc($type).' document', + 'upls' => 'Upload a new supplemental '.lc($type).' document', 'impp' => 'Import a document', 'pubd' => 'Published documents', 'copm' => 'All documents out of a published map into this folder', @@ -2832,24 +2782,13 @@ sub handler { 'grpo' => 'Group Portfolios', 'rost' => 'Course Roster', 'abou' => 'About User', - 'imsf' => 'IMS Import', - 'imsl' => 'Import IMS package', + 'imsf' => 'Import IMS package', 'file' => 'File', 'title' => 'Title', 'comment' => 'Comment', 'parse' => 'If HTML file, upload embedded images/multimedia files' ); # ----------------------------------------------------------------------------- - my %tabtitles = ( - main => { - Course => &mt('Main Course Documents'), - Community => &mt('Main Community Documents'), - }, - supplemental => { - Course => &mt('Supplemental Course Documents'), - Community => &mt('Supplemental Community Documents'), - }, - ); if ($allowed) { &update_paste_buffer($coursenum,$coursedom); my $dumpbut=&dumpbutton(); @@ -2865,7 +2804,8 @@ sub handler { if (!$folderpath) { if ($env{'form.folder'} eq '' || $env{'form.folder'} eq 'supplemental') { - $folderpath='default&'.&escape($tabtitles{'main'}{$crstype}); + $folderpath='default&'. + &escape(&mt('Main '.$type.' Documents')); } } unless ($env{'form.pagepath'}) { @@ -2908,7 +2848,7 @@ sub handler {
 
ENDCOURSEVERIFY $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc', - &mt('Editing the Table of Contents for your '.$crstype))); + &mt('Editing the Table of Contents for your '.$type))); } # --------------------------------------------------------- Standard documents $r->print(''); @@ -2920,24 +2860,19 @@ ENDCOURSEVERIFY my $folder=$env{'form.folder'}; if ($folder eq '' || $folder eq 'supplemental') { $folder='default'; - $env{'form.folderpath'}='default&'.&escape(&mt('Main '.$crstype.' Documents')); + $env{'form.folderpath'}='default&'.&escape(&mt('Main '.$type.' Documents')); $uploadtag = ''; } my $postexec=''; if ($folder eq 'default') { - $r->print(''."\n" - ); + $r->print(''); } else { #$postexec='self.close();'; } $hadchanges=0; my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed, - $upload_output,$crstype); + $upload_output,$type); if ($error) { $r->print('

'.$error.'

'); } @@ -2989,27 +2924,27 @@ $uploadtag $lt{'pubd'}
$uploadtag - +
- + $help{'Importing_LON-CAPA_Resource'}
- +

$lt{'copm'}

$help{'Load_Map'}


- + ENDFORM unless ($env{'form.pagepath'}) { @@ -3019,13 +2954,13 @@ ENDFORM $uploadtag - $help{'Adding_External_Resource'}
- + ENDFORM } @@ -3038,7 +2973,7 @@ ENDFORM $help{'Adding_Folders'} @@ -3047,7 +2982,7 @@ value="$lt{'newf'}" />$help{'Adding_Fold $help{'Adding_Pages'} @@ -3074,7 +3009,7 @@ $uploadtag $help{'Simple Page'} +onClick="javascript:makesmppage();" /> $help{'Simple Page'}
@@ -3082,7 +3017,7 @@ $uploadtag $help{'Simple Problem'} +onClick="javascript:makesmpproblem();" />$help{'Simple Problem'}
@@ -3090,7 +3025,7 @@ $uploadtag +onClick="javascript:makedropbox();" />
@@ -3098,7 +3033,7 @@ $uploadtag +onClick="javascript:makeexamupload();" /> $help{'Score_Upload_Form'} @@ -3107,7 +3042,7 @@ $uploadtag +onClick="javascript:makebulboard();" /> $help{'Bulletin Board'} @@ -3125,7 +3060,7 @@ $uploadtag +onClick="javascript:makeabout();" />
@@ -3155,7 +3090,7 @@ $uploadtag $help{'Simple Problem'} +onClick="javascript:makesmpproblem();" />$help{'Simple Problem'}
@@ -3163,7 +3098,7 @@ $uploadtag +onClick="javascript:makeexamupload();" /> $help{'Score_Upload_Form'} @@ -3185,9 +3120,9 @@ ENDBLOCK if ($folder =~ /^supplemental$/ && (($env{'form.folderpath'} =~ /^default\&/) || ($env{'form.folderpath'} eq ''))) { $env{'form.folderpath'} = 'supplemental&'. - &escape($tabtitles{'supplemental'}{$crstype}); + &escape(&mt('Supplemental '.$type.' Documents')); } - my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$crstype); + my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); if ($error) { $r->print('

'.$error.'

'); } @@ -3231,7 +3166,7 @@ $lt{'comment'}:
$help{'Adding_Folders'} @@ -3240,7 +3175,7 @@ value="$lt{'newf'}" /> $help{'Adding_Fol $help{'Adding_External_Resource'} @@ -3289,8 +3224,21 @@ ENDSUPFORM } $r->print(&Apache::loncommon::end_page()); return OK; -} +} +sub concept_test_builder { + my ($r) = @_; + $r->print(&Apache::loncommon::start_page('Assemble Test')); + &Apache::londocsgci::setdefaults(); + if ($env{'form.phase'} eq 'storemap') { + &Apache::londocsgci::evaluate(); + &Apache::londocsgci::store($r); + } + &Apache::londocsgci::load(); + &Apache::londocsgci::listresources($r); + $r->print(&Apache::loncommon::end_page()); + return; +} sub editing_js { my ($udom,$uname) = @_;