[LON-CAPA-cvs] cvs: loncom /interface loncreatecourse.pm lonindexer.pm

www lon-capa-cvs@mail.lon-capa.org
Tue, 04 May 2004 20:43:22 -0000


www		Tue May  4 16:43:22 2004 EDT

  Modified files:              
    /loncom/interface	loncreatecourse.pm lonindexer.pm 
  Log:
  Bug #2969: HOME in Resource Space for Publishers.
  
  Also moved CC on course creation screen down to the bottom - it had gotten
  lost between all of the other settings.
  
  
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.54 loncom/interface/loncreatecourse.pm:1.55
--- loncom/interface/loncreatecourse.pm:1.54	Fri Apr 16 09:33:41 2004
+++ loncom/interface/loncreatecourse.pm	Tue May  4 16:43:21 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Create a course
 #
-# $Id: loncreatecourse.pm,v 1.54 2004/04/16 13:33:41 albertel Exp $
+# $Id: loncreatecourse.pm,v 1.55 2004/05/04 20:43:21 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -301,6 +301,7 @@
                     'nech' => "Notification of enrollment changes",
                     'nccl' => "Notification to course coordinator via LON-CAPA message when enrollment changes occur during the automated update?",
                     'irsp' => "Include retrieval of student photographs?",
+		    'rshm' => 'Resource Space Home',
                     'opco' => "Open Course"
 				       );
     $r->print(<<ENDDOCUMENT);
@@ -396,7 +397,7 @@
 <p>
 <b>$lt{'scpf'}: </b>
 <input type="checkbox" name="setpolicy" checked>
-</p><p>
+<br />
 <b>$lt{'scfc'}: </b>
 <input type="checkbox" name="setcontent" checked>
 </p>
@@ -412,15 +413,12 @@
 <b>$lt{'snak'}: </b>
 <input type="checkbox" name="setkeys" />
 </p>
-<h2>$lt{'cc'}</h2>
+<h2>$lt{'rshm'}</h2>
+<p>
+<b>$lt{'rshm'}: </b>
+<input type="text" name="reshome" size="30" value="/res/$defdom/" />
+</p>
 <p>
-<b>$lt{'user'}:</b> <input type="text" size="15" name="ccuname" />
-</p><p>
-<b>$lt{'dmn'}:</b> $domform
-</p><p>
-<b>$lt{'ierc'}:</b>
-<input type="checkbox" name="expireown" checked>
-</p><p>
 <h2>$lt{'aens'}</h2>
 $lt{'aesc'}
 </p>
@@ -449,7 +447,18 @@
 value="0" checked="true" />$lt{'no'}
 </p><p>
 <b>$lt{'irsp'}</b> <input type="radio" name="showphotos" value="1" />$lt{'yes'} <input type="radio" name="showphotos" value="0" checked="true" />$lt{'no'}
+</p>
+<hr />
+<h2>$lt{'cc'}</h2>
+<p>
+<b>$lt{'user'}:</b> <input type="text" size="15" name="ccuname" />
+</p><p>
+<b>$lt{'dmn'}:</b> $domform
 </p><p>
+<b>$lt{'ierc'}:</b>
+<input type="checkbox" name="expireown" checked>
+</p>
+<p>
 <input type="hidden" name="phase" value="two" />
 <input type="button" onClick="verify_message(this.form)" value="$lt{'opco'}">
 </p>
@@ -664,6 +673,10 @@
        if ($ENV{'form.setcontent'}) {
            $cenv{'question.email'}=$ccuname.':'.$ccdomain;
        }
+    }
+    if ($ENV{'form.reshome'}) {
+	$cenv{'reshome'}=$ENV{'form.reshome'}.'/';
+	$cenv{'reshome'}=~s/\/+$/\//;
     }
     if ($ENV{'form.setkeys'}) {
        $cenv{'keyaccess'}='yes';
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.99 loncom/interface/lonindexer.pm:1.100
--- loncom/interface/lonindexer.pm:1.99	Wed Mar 31 00:24:00 2004
+++ loncom/interface/lonindexer.pm	Tue May  4 16:43:21 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Directory Indexer
 #
-# $Id: lonindexer.pm,v 1.99 2004/03/31 05:24:00 albertel Exp $
+# $Id: lonindexer.pm,v 1.100 2004/05/04 20:43:21 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -452,8 +452,19 @@
 				(($ENV{'form.catalogmode'} eq 'groupimport')?
 				 'document.forms.fileattr':'')).
 		  &Apache::lonhtmlcommon::select_recent('residx','resrecent',
-'this.form.action=this.form.resrecent.options[this.form.resrecent.selectedIndex].value;this.form.submit();').
-		  '</form>');
+'this.form.action=this.form.resrecent.options[this.form.resrecent.selectedIndex].value;this.form.submit();'));
+# -------------------------------------------------------- Resource Home Button
+	my $reshome=$ENV{'course.'.$ENV{'request.course.id'}.'.reshome'};
+	if ($reshome) {
+	    $r->print("<font size='+2'><a href='");
+	    if ($ENV{'form.catalogmode'} eq 'groupimport') {
+		$r->print('javascript:document.forms.fileattr.action="'.$reshome.'";document.forms.fileattr.submit();');
+	    } else {
+		$r->print($reshome);
+	    }
+	    $r->print("'>".&mt('Home').'</a></font>');
+	}
+	$r->print('</form>');
 # ------------------------------------------------------ Remember where we were
 	&Apache::loncommon::storeresurl($storeuri);
 	&Apache::lonhtmlcommon::store_recent('residx',$storeuri,$storeuri);