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

www www@source.lon-capa.org
Mon, 17 Jan 2011 22:56:27 -0000


www		Mon Jan 17 22:56:27 2011 EDT

  Modified files:              
    /loncom/interface	lonsearchcourse.pm 
  Log:
  Interface looks
  
  
Index: loncom/interface/lonsearchcourse.pm
diff -u loncom/interface/lonsearchcourse.pm:1.2 loncom/interface/lonsearchcourse.pm:1.3
--- loncom/interface/lonsearchcourse.pm:1.2	Mon Jan 17 20:43:09 2011
+++ loncom/interface/lonsearchcourse.pm	Mon Jan 17 22:56:27 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Search Course
 #
-# $Id: lonsearchcourse.pm,v 1.2 2011/01/17 20:43:09 www Exp $
+# $Id: lonsearchcourse.pm,v 1.3 2011/01/17 22:56:27 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -54,47 +54,32 @@
 sub menu {
     my $scrout='';
     if ($env{'request.course.id'}) {
-        my %lt=&Apache::lonlocal::texthash('srch' => 'Search',
-                                           'header' => 'Course Search',
-         'note' => 'Enter terms or phrases, then press "Search" below',
+        my %lt=&Apache::lonlocal::texthash(
+         'srch' => 'Search',
+         'note' => 'Search terms',
+         'options' => 'Options',
          'use' => 'use related words',
          'full' =>'fulltext search (time consuming)',
          'disc' => 'search discussion postings (resources and discussion boards)',
                                            );
         $scrout.=(<<ENDCOURSESEARCH);
 <form name="loncapa_search" method="post" action="/adm/searchcourse">
-<center>
-<hr />
-<h1>$lt{'header'}</h1>    
 <input type="hidden" name="phase" value="results" />
-<p>
-$lt{'note'}.
-</p>
-<table>
-<tr><td>
 ENDCOURSESEARCH
-        $scrout.='&nbsp;'.
-            &Apache::lonhtmlcommon::textbox('courseexp',
-                                  $env{'form.courseexp'},40);
-        my $crscheckbox =
-            &Apache::lonhtmlcommon::checkbox('crsfulltext',
-                                   $env{'form.crsfulltext'});
-        my $relcheckbox =
-            &Apache::lonhtmlcommon::checkbox('crsrelated',
-                                   $env{'form.crsrelated'});
-        my $discheckbox =
-            &Apache::lonhtmlcommon::checkbox('crsdiscuss',
-                                   $env{'form.crsrelated'});
+       $scrout.=&Apache::lonhtmlcommon::start_pick_box().
+                &Apache::lonhtmlcommon::row_title($lt{'note'}).
+                &Apache::lonhtmlcommon::textbox('courseexp',
+                                  $env{'form.courseexp'},40).
+                &Apache::lonhtmlcommon::row_closure().
+                &Apache::lonhtmlcommon::row_title($lt{'options'}).
+                '<label>'.&Apache::lonhtmlcommon::checkbox('crsfulltext',$env{'form.crsfulltext'}).$lt{'full'}."</label><br />\n".
+                '<label>'.&Apache::lonhtmlcommon::checkbox('crsrelated',$env{'form.crsrelated'}).$lt{'use'}."</label><br />\n".
+                '<label>'.&Apache::lonhtmlcommon::checkbox('crsdiscuss',$env{'form.crsdiscuss'}).$lt{'disc'}."</label><br />\n".
+                &Apache::lonhtmlcommon::end_pick_box();
         $scrout.=(<<ENDENDCOURSE);
-</td></tr>
-<tr><td><label>$relcheckbox $lt{'use'}</label></td><td></td></tr>
-<tr><td><label>$crscheckbox $lt{'full'}</label></td><td></td></tr>
-<tr><td><label>$discheckbox $lt{'disc'}</label></td><td></td></tr>
-</table>
 <p>
 <input type="submit" name="coursesubmit" value='$lt{'srch'}' />
 </p>
-</center>
 </form>
 ENDENDCOURSE
     }
@@ -243,9 +228,6 @@
             $r->print('<div class="LC_error">'.&mt('An error occurred retrieving information about resources in the course.').'<br />'.&mt('It is recommended that you [_1]re-initialize the course[_2] and then try your search again.','<a href="/adm/roles">','</a>').'</div>');
         }
     }
-
-# =================================================== Done going through course
-    $r->print(&Apache::loncommon::end_page());
 }
 
 # =============================== This pulls up a resource and its dependencies