Diff for /loncom/imspackages/imsimportdocs.pm between versions 1.3 and 1.6

version 1.3, 2004/03/16 19:20:58 version 1.6, 2004/04/08 09:19:39
Line 44  function setOptions(caller,itemnum) { Line 44  function setOptions(caller,itemnum) {
     if (caller == "board") {      if (caller == "board") {
       opForm.elements[menu].options[0] = new Option("Select","-1",true,true)        opForm.elements[menu].options[0] = new Option("Select","-1",true,true)
       opForm.elements[menu].options[1] = new Option("Import topics only","topics",true,true)        opForm.elements[menu].options[1] = new Option("Import topics only","topics",true,true)
       opForm.elements[menu].options[2] = new Option("Import topics & posts (with author)","allpost",true,true)        opForm.elements[menu].options[2] = new Option("Import topics + posts (with author)","allpost",true,true)
       opForm.elements[menu].options[3] = new Option("Import topics & posts (no author)","allanon",true,true)        opForm.elements[menu].options[3] = new Option("Import topics + posts (no author)","allanon",true,true)
     }      }
     else {       else { 
       if (caller == "users") {        if (caller == "users") {
Line 505  sub display_three { Line 505  sub display_three {
     my $timenow = time;      my $timenow = time;
   
     my $destdir = $Apache::lonnet::perlvar{'lonDocRoot'}.'/userfiles/'.$cdom.'/'.$crs.'/'.$timenow;      my $destdir = $Apache::lonnet::perlvar{'lonDocRoot'}.'/userfiles/'.$cdom.'/'.$crs.'/'.$timenow;
     my $dirname = $cdom.'/'.$crs.'/'.$timenow;  
     my $seqstem = "/uploaded/$cdom/$crs/$timenow";      my $seqstem = "/uploaded/$cdom/$crs/$timenow";
     my $db_handling = '';      my $db_handling = '';
     my $user_handling = '';      my $user_handling = '';
Line 539  sub display_three { Line 538  sub display_three {
         
     my $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo);      my $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo);
     if ($manifest_result eq 'ok') {      if ($manifest_result eq 'ok') {
           my @path = ($cdom,$crs,$timenow);
           my $fullpath = $Apache::lonnet::perlvar{'lonDocRoot'}.'/userfiles';
           foreach my $item (@path) {
               $fullpath .= '/'.$item;
               if (!-e "$fullpath") {
                   mkdir("$fullpath",0770);
               }
           }
           my @namedirs = ("resfiles","sequences","pages","problems");
           foreach my $name (@namedirs) {
               if (!-e "$fullpath/$name") {
                   mkdir("$fullpath/$name",0770);
               }
           }
         &Apache::imsprocessor::target_resources(\%resources,\%imports,\@targets);          &Apache::imsprocessor::target_resources(\%resources,\%imports,\@targets);
         my $copy_result = &Apache::imsprocessor::copy_resources('DOCS',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$chome,$destdir,$timenow);          my $copy_result = &Apache::imsprocessor::copy_resources('DOCS',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$chome,$destdir,$timenow);
   
Line 553  sub display_three { Line 566  sub display_three {
         my @topurls = ();          my @topurls = ();
         my @topnames = ();          my @topnames = ();
   
         &Apache::imsprocessor::process_resinfo($cms,$tempdir,$destdir,\%items,\%resources,\@boards,\@announcements,\@quizzes,\@surveys,\@groups,\%messages,\@timestamp,\%boardnum,\%resinfo,$udom,$uname,$cdom,$crs,$db_handling,$user_handling,\%total,$dirname,$seqstem,\@resrcfiles);          &Apache::imsprocessor::process_resinfo($cms,'DOCS',$tempdir,$destdir,\%items,\%resources,\@boards,\@announcements,\@quizzes,\@surveys,\@groups,\%messages,\@timestamp,\%boardnum,\%resinfo,$udom,$uname,$cdom,$crs,$db_handling,$user_handling,\%total,$seqstem,$seqstem,\@resrcfiles);
   
         &Apache::imsprocessor::build_structure($cms,'DOCS',$destdir,\%items,\%resinfo,\%resources,\%hrefs,$udom,$uname,'',$timenow,$cdom,$crs,\@timestamp,\%total,\@boards,\@announcements,\@quizzes,\@surveys,\%boardnum,\@pages,\@sequences,\@topurls,\@topnames);          &Apache::imsprocessor::build_structure($cms,'DOCS',$destdir,\%items,\%resinfo,\%resources,\%hrefs,$udom,$uname,'',$timenow,$cdom,$crs,\@timestamp,\%total,\@boards,\@announcements,\@quizzes,\@surveys,\%boardnum,\@pages,\@sequences,\@topurls,\@topnames);
     

Removed from v.1.3  
changed lines
  Added in v.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>