Index: openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.en_US.ISO-8859-1.xml,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.en_US.ISO-8859-1.xml	16 Feb 2005 15:28:32 -0000	1.4
+++ openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.en_US.ISO-8859-1.xml	16 Feb 2005 22:21:30 -0000	1.5
@@ -2,7 +2,9 @@
 <message_catalog package_key="dotlrn-catalog" package_version="0.1a4" locale="en_US" charset="ISO-8859-1">
 
   <msg key="add_course_to">Add this course to one category.</msg>
+  <msg key="admin">Admin</msg>
   <msg key="admin_categories">Manage Category Tree</msg>
+  <msg key="admin_this">Admin This Course</msg>
   <msg key="and_has">and has</msg>
   <msg key="asm">Assessment</msg>
   <msg key="associate">Associate</msg>
@@ -27,6 +29,7 @@
   <msg key="course_list">Your Course List</msg>
   <msg key="course_name">Course Name:</msg>
   <msg key="courses">Courses</msg>
+  <msg key="create">Create</msg>
   <msg key="create_new_ver">Create a new version of</msg>
   <msg key="delete">Delete</msg>
   <msg key="delete_course">Delete Course</msg>
@@ -64,11 +67,15 @@
   <msg key="not_associate">Not Associate</msg>
   <msg key="not_associated">Not Associated</msg>
   <msg key="one_course_info">One Course Information</msg>
-  <msg key="permission">Permission:</msg>
+  <msg key="please_type">Please type a keyword</msg>
+  <msg key="privilege_on">Privilege on</msg>
+  <msg key="privilege_on_catalog">Privilege on dotLRN-Catalog:</msg>
   <msg key="rev_list">Revision List</msg>
   <msg key="revisions">Revisions</msg>
   <msg key="revoke">Revoke</msg>
   <msg key="revoke_per">Revoke Permissions</msg>
+  <msg key="search">Search</msg>
+  <msg key="search_courses">Search Course Name with :</msg>
   <msg key="search_email_help">search for entire email or just part of it</msg>
   <msg key="search_help">search for one first name or last name.</msg>
   <msg key="search_u">Search Users</msg>
Index: openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.es_ES.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.es_ES.ISO-8859-1.xml,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.es_ES.ISO-8859-1.xml	16 Feb 2005 15:28:32 -0000	1.2
+++ openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.es_ES.ISO-8859-1.xml	16 Feb 2005 22:21:30 -0000	1.3
@@ -2,7 +2,9 @@
 <message_catalog package_key="dotlrn-catalog" package_version="0.1a4" locale="es_ES" charset="ISO-8859-1">
 
   <msg key="add_course_to">Agregar este curso a una categoria.</msg>
+  <msg key="admin">Administrador</msg>
   <msg key="admin_categories">Administrar Arbol de Categorias</msg>
+  <msg key="admin_this">Administrar Este Courso</msg>
   <msg key="and_has">y tiene</msg>
   <msg key="asm">Assessment</msg>
   <msg key="associate">Asociar</msg>
@@ -22,11 +24,12 @@
   <msg key="course_admin">Administracion de Cursos</msg>
   <msg key="course_catalog">Indice del Catalogo dotLRN</msg>
   <msg key="course_details">Detalles del Curso</msg>
-  <msg key="course_info">Informacion del Curso:</msg>
+  <msg key="course_info">Descripcion:</msg>
   <msg key="course_key">Llave del Curso:</msg>
   <msg key="course_list">Su listado de Cursos</msg>
   <msg key="course_name">Nombre del Curso:</msg>
-  <msg key="courses">Corsos</msg>
+  <msg key="courses">Cursos</msg>
+  <msg key="create">Creacion</msg>
   <msg key="create_new_ver">Crear una nueva version de</msg>
   <msg key="delete">Borrar</msg>
   <msg key="delete_course">Borrar Cursos</msg>
@@ -64,11 +67,15 @@
   <msg key="not_associate">No Asociar</msg>
   <msg key="not_associated">No Asociado</msg>
   <msg key="one_course_info">Informacion de un Curso</msg>
-  <msg key="permission">Permisos:</msg>
+  <msg key="please_type">Ingrese una palabra</msg>
+  <msg key="privilege_on">Privilegio sobre</msg>
+  <msg key="privilege_on_catalog">Privilegio sobre dotLRN-Catalog:</msg>
   <msg key="rev_list">Listado de Revisiones</msg>
   <msg key="revisions">Revisiones</msg>
   <msg key="revoke">Remover</msg>
   <msg key="revoke_per">Remover Permisos</msg>
+  <msg key="search">Buscar</msg>
+  <msg key="search_courses">Buscar nombre del curso que contiene :</msg>
   <msg key="search_email_help">buscar por direccion de correo electronico o parte de ella</msg>
   <msg key="search_help">buscar por nombre o apellido.</msg>
   <msg key="search_u">Busqueda de Usuarios</msg>
Index: openacs-4/packages/dotlrn-catalog/lib/course-chunk.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/lib/course-chunk.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/dotlrn-catalog/lib/course-chunk.adp	16 Feb 2005 15:28:32 -0000	1.4
+++ openacs-4/packages/dotlrn-catalog/lib/course-chunk.adp	16 Feb 2005 22:21:30 -0000	1.5
@@ -1,11 +1,17 @@
 <table>
+<if @index@ eq "yes">
+   <if @admin_p@ eq 1>
+   <div align=right>
+        <a href="dt-admin/course-info?course_id=@course_id@&course_name=@name@&course_key=@course_key@&index=yes" title="#dotlrn-catalog.admin_this#"><img border=0 src=images/admin.gif></a> 
+   </div>
+   </if>
+</if>
 <h3>#dotlrn-catalog.info#:</h3>
 <tr>
    <td>
    <if @edit@ eq yes>
    <div align="right">
-	<a href=course-add-edit?course_id=@course_id@&return_url=@return_url@&mode=edit \
-	title="#dotlrn-catalog.new_ver#"><img border=0 src=/resources/Edit16.gif></a>
+	<a href=course-add-edit?course_id=@course_id@&return_url=course-info&mode=1&index=@to_index@ title="#dotlrn-catalog.new_ver#"><img border=0 src=/resources/Edit16.gif></a>
    </div>
    </if>
    </td>
@@ -96,7 +102,9 @@
 
 <br>
 <if @revision@ not eq yes>
-<h3>#dotlrn-catalog.dotlrn_assoc#:</h3>
+<if @obj_n@ not eq "0">
+   <h3>#dotlrn-catalog.dotlrn_assoc#:</h3>
+</if>
 <multiple name="relations">
     <if @relations.type@ eq "dotlrn_catalog_class_rel">
     	<include src="/packages/dotlrn-catalog/lib/dotlrn-chunk" class_id=@relations.object_id@>
Index: openacs-4/packages/dotlrn-catalog/lib/course-chunk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/lib/course-chunk.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn-catalog/lib/course-chunk.tcl	16 Feb 2005 00:22:12 -0000	1.2
+++ openacs-4/packages/dotlrn-catalog/lib/course-chunk.tcl	16 Feb 2005 22:21:30 -0000	1.3
@@ -12,6 +12,16 @@
     set index ""
 }
 
+if { ![info exists to_index] } {
+    set to_index ""
+}
+
+if { [info exist return_url] } {
+    set return_url $return_url
+} else {
+    set return_url "course-info?course_id=$course_id&course_name=$name&course_key=$course_key"
+}
+
 if { ![info exists asmid] } {
     set asmid "-1"
 }
@@ -30,6 +40,16 @@
 # Get the category name
 set category_name "[category::get_name [category::get_mapped_categories $course_id]]"
 
+# Check if user has admin permission over course_id
+if { [permission::permission_p -object_id $cc_package_id -privilege "create"] } { 
+    set item_id [dotlrn_catalog::get_item_id -revision_id $course_id]
+    set admin_p [permission::permission_p -object_id $item_id -privilege "admin"]
+} else {
+    set admin_p 0
+}
 
+set obj_n 0
 # For dotlrn associations
-db_multirow relations relation { }
\ No newline at end of file
+db_multirow -extend { obj_n admin_p } relations relation { } {
+    set obj_n 1
+}
\ No newline at end of file
Index: openacs-4/packages/dotlrn-catalog/tcl/dotlrn-catalog-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/tcl/dotlrn-catalog-procs.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/tcl/dotlrn-catalog-procs.tcl	14 Feb 2005 22:46:11 -0000	1.1
+++ openacs-4/packages/dotlrn-catalog/tcl/dotlrn-catalog-procs.tcl	16 Feb 2005 22:21:30 -0000	1.2
@@ -47,7 +47,7 @@
 ad_proc -private dotlrn_catalog::check_name {
     -name:required
 } {
-    Checks if @name@ already exists in dotlrn_catalog table
+    Checks if @name@ already exists in cr_item table
     @name@        The name of the course_key
 } {
     if { [string equal [db_string check_item_name { } -default -1] "-1"] } {
Index: openacs-4/packages/dotlrn-catalog/tcl/dotlrn-catalog-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/tcl/dotlrn-catalog-procs.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/tcl/dotlrn-catalog-procs.xql	14 Feb 2005 22:46:11 -0000	1.1
+++ openacs-4/packages/dotlrn-catalog/tcl/dotlrn-catalog-procs.xql	16 Feb 2005 22:21:30 -0000	1.2
@@ -33,7 +33,7 @@
 
 <fullquery name="dotlrn_catalog::check_name.check_item_name">      
       <querytext>
-	    select course_id from dotlrn_catalog where course_key = :name
+	    select item_id from cr_items where name = :name
       </querytext>
 </fullquery>
 
Index: openacs-4/packages/dotlrn-catalog/www/admin/grant-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/admin/grant-list.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn-catalog/www/admin/grant-list.tcl	14 Feb 2005 22:55:39 -0000	1.2
+++ openacs-4/packages/dotlrn-catalog/www/admin/grant-list.tcl	16 Feb 2005 22:21:30 -0000	1.3
@@ -83,14 +83,16 @@
 	    }
 	}
 	permission {
-	    label "[_ dotlrn-catalog.permission]"
+	    label "[_ dotlrn-catalog.privilege_on_catalog]"
 	    display_template {
+		<div align=center>
 		<if @grant_list.privilege@ eq 1>
-		   [_ dotlrn-catalog.granted]
+		   [_ dotlrn-catalog.create]
 		</if>
 		<else>
 		   <i>[_ dotlrn-catalog.not_allowed]</i>
 		</else>
+		</div>
 	    }
 	}
     }
Index: openacs-4/packages/dotlrn-catalog/www/admin/grant-list.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/admin/grant-list.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/www/admin/grant-list.xql	14 Feb 2005 22:46:11 -0000	1.1
+++ openacs-4/packages/dotlrn-catalog/www/admin/grant-list.xql	16 Feb 2005 22:21:30 -0000	1.2
@@ -14,8 +14,8 @@
 <fullquery name="select_users_name">      
       <querytext>
 	  select first_names, last_name, user_id as p_user_id, email as db_email
-	  from cc_users where user_id <> :user_id and lower(first_names) like lower('%$user_name%')
-	  or lower(last_name) like lower('%$user_name%') order by first_names, last_name
+	  from cc_users where user_id <> :user_id and (lower(first_names) like lower('%$user_name%')
+	  or lower(last_name) like lower('%$user_name%')) order by first_names, last_name
       </querytext>
 </fullquery>
 
Index: openacs-4/packages/dotlrn-catalog/www/dt-admin/course-add-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/dt-admin/course-add-edit.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/course-add-edit.adp	14 Feb 2005 22:46:11 -0000	1.1
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-add-edit.adp	16 Feb 2005 22:21:30 -0000	1.2
@@ -2,4 +2,5 @@
 <property name=title>@page_title@</property>
 <property name="context">@context;noquote@</property>
 
-<formtemplate id="add_course"></formtemplate>
\ No newline at end of file
+<formtemplate id="add_course"></formtemplate>
+
Index: openacs-4/packages/dotlrn-catalog/www/dt-admin/course-add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/dt-admin/course-add-edit.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/course-add-edit.tcl	16 Feb 2005 15:28:32 -0000	1.4
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-add-edit.tcl	16 Feb 2005 22:21:30 -0000	1.5
@@ -9,10 +9,13 @@
     course_id:optional
     mode:optional
     { return_url "" }
+    { index "" }
 }
 
-if { [string equal $return_url ""]} {
+if { [string equal $return_url ""] } {
     set return_url "course-list"
+} else { 
+    set return_url $return_url 
 }
 
 set page_title ""
@@ -26,7 +29,7 @@
 
 if { [info exist mode] } {
     if { [string equal $mode 1] } {
-	permission::require_permission -object_id $course_id -privilege "create"
+	permission::require_permission -object_id $course_id -privilege "admin"
     } 
     set mode_p edit
 } else {
@@ -79,8 +82,9 @@
 }
 
 # Create the form
-ad_form -name add_course -export {return_url $return_url mode $mode} -form {
+ad_form -name add_course -export {mode $mode} -form {
     course_id:key
+    {return_url:text(hidden)}
 }
 
 
@@ -104,11 +108,14 @@
 	set attr_name [lindex $attribute 2]
 	lappend form_attributes [list $attr_name [set $attr_name]]
     }
-    if { [catch { set item_id [content::item::new -name $course_key -parent_id $folder_id \
-				   -content_type "dotlrn_catalog" -creation_user $user_id \
-				   -attributes $form_attributes -is_live t -title $course_key] } errmsg] } {
+    if { [dotlrn_catalog::check_name -name $course_key] } {
+	set item_id [content::item::new -name $course_key -parent_id $folder_id \
+			 -content_type "dotlrn_catalog" -creation_user $user_id \
+			 -attributes $form_attributes -is_live t -title $course_key]
+    } else {
 	ad_return_complaint 1 "\#dotlrn-catalog.name_already\#"
-    } 
+	ad_script_abort
+    }
     # Grant admin privileges to the user over the item in the CR
     permission::grant -party_id $user_id -object_id $item_id  -privilege "admin"
     
@@ -137,15 +144,13 @@
 } -new_request {
     set context [list [list course-list "[_ dotlrn-catalog.course_list]"] "[_ dotlrn-catalog.new_course]"]
     set page_title "[_ dotlrn-catalog.new_course]"
-    set return_url "$return_url"
 
 } -edit_request {
     set context [list [list course-list "[_ dotlrn-catalog.course_list]"] "[_ dotlrn-catalog.edit_course]"]
     set page_title "[_ dotlrn-catalog.edit_course]"
-    set return_url "$return_url"
     db_1row get_course_info { }
     db_string get_course_assessment { } -default "[_ dotlrn-catalog.not_associated]"
-
+    set return_url "$return_url?course_id=$course_id&course_name=$course_name&course_key=$course_key&index=$index"
 } -after_submit {
     ad_returnredirect "$return_url"
 }
Index: openacs-4/packages/dotlrn-catalog/www/dt-admin/course-details.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/dt-admin/course-details.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/course-details.tcl	16 Feb 2005 15:28:32 -0000	1.1
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-details.tcl	16 Feb 2005 22:21:30 -0000	1.2
@@ -10,6 +10,8 @@
     { course_name "" }
 }
 
+permission::require_permission -object_id $course_id -privilege "admin"
+
 if { [string equal $return_url "index"] } {
     set context [list [list ../course-info?course_id=$course_id&course_key=$course_key&course_name=$course_name  "[_ dotlrn-catalog.one_course_info]"] "[_ dotlrn-catalog.course_details]"]
 } else {
Index: openacs-4/packages/dotlrn-catalog/www/dt-admin/course-info.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/dt-admin/course-info.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/course-info.adp	16 Feb 2005 00:22:46 -0000	1.1
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-info.adp	16 Feb 2005 22:21:30 -0000	1.2
@@ -3,4 +3,4 @@
 <property name="context">@context;noquote@</property>
 <br>
 
-<include src="/packages/dotlrn-catalog/lib/course-chunk" course_id=@course_id@ course_key=@course_key@ name=@course_name@ info=@course_info@ asm=@asm_name@ rel=@rel@ return_url=@return_url@ edit=yes live_revision="" item_id=@item_id@ creation_user=@creation_user@>
+<include src="/packages/dotlrn-catalog/lib/course-chunk" course_id=@course_id@ course_key=@course_key@ name=@course_name@ info=@course_info@ asm=@asm_name@ rel=@rel@ return_url=@return_url@ edit=yes live_revision="" item_id=@item_id@ creation_user=@creation_user@ to_index=@index@>
Index: openacs-4/packages/dotlrn-catalog/www/dt-admin/course-info.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/dt-admin/course-info.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/course-info.tcl	16 Feb 2005 00:22:46 -0000	1.1
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-info.tcl	16 Feb 2005 22:21:30 -0000	1.2
@@ -7,11 +7,23 @@
     course_id:notnull
     course_key:notnull
     course_name:notnull
+    { index "" }
+    { return_url "" }
 }
+
+if { [string equal $index ""] } {
+    set context [list [list "course-list" "[_ dotlrn-catalog.course_list]"] "[_ dotlrn-catalog.one_course_info]"]
+} else {
+    set context [list [list "../course-info?course_id=$course_id&course_name=$course_name&course_key=$course_key" "[_ dotlrn-catalog.one_course_info]"] "$course_name [_ dotlrn-catalog.course_info]"]
+    set return_url "${return_url}&index=yes"
+}
+
+# Check permission over course_id
+permission::require_permission -object_id $course_id -privilege "admin"
+
 set page_title "$course_key [_ dotlrn-catalog.course_info]"
-set context [list "[_ dotlrn-catalog.one_course_info]"]
 
-set return_url "index"
+
 set asm_package_id [apm_package_id_from_key assessment]
 
 db_1row get_course_info { } 
Index: openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.adp	16 Feb 2005 00:22:12 -0000	1.2
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.adp	16 Feb 2005 22:21:30 -0000	1.3
@@ -8,7 +8,15 @@
     </if>
 | <a href="../admin/grant-list?return_url=@return_url@">#dotlrn-catalog.grant_per#</a>
 </if>
-<br><br>
+<br><br><br>
 <center>
+
+<form action="course-list" method="GET">
+    #dotlrn-catalog.search_courses# 
+    <input name="keyword" onfocus="if(this.value=='Please type a keyword')this.value='';" onblur="if(this.value=='')this.value='#dotlrn-catalog.please_type#';" value="#dotlrn-catalog.please_type#" />
+    <input type="submit" value="#dotlrn-catalog.search#" />
+</form>
+<br>
 <listtemplate name=course_list></listtemplate>
+
 </center>
\ No newline at end of file
Index: openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.tcl	16 Feb 2005 15:28:32 -0000	1.3
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.tcl	16 Feb 2005 22:21:30 -0000	1.4
@@ -5,6 +5,7 @@
     @creation-date   28-01-2005
 } {
     page:optional
+    keyword:optional
 }
 
 set user_id [ad_conn user_id]
@@ -34,11 +35,21 @@
 set asm_package_id [apm_package_id_from_key assessment]
 
 if { [acs_user::site_wide_admin_p] } {
-    set query get_course_info_site_wide
-    set paginator_query site_wide_paginator
+    if { [info exist keyword] } {
+	set query get_course_info_site_wide_keyword
+	set paginator_query site_wide_paginator_keyword
+    } else {
+	set query get_course_info_site_wide
+	set paginator_query site_wide_paginator
+    }
 } else {
-    set query get_course_info
-    set paginator_query paginator
+    if { [info exist keyword] } {
+	set query get_course_info_keyword
+	set paginator_query site_wide_paginator_keyword
+    } else {
+	set query get_course_info
+	set paginator_query paginator
+    }
 }
 
 template::list::create \
@@ -56,16 +67,20 @@
 	key {
 	    label "[_ dotlrn-catalog.course_key]"
 	    display_template {
+		<div align=left>
 		<a href=course-add-edit?course_id=@course_list.course_id@&return_url=$return_url&mode=1 \
 		    title="[_ dotlrn-catalog.new_ver]">\
 		        <img border=0 src=/resources/Edit16.gif></a>
 		<a href="revision-list?course_key=@course_list.course_key@&return_url=$return_url&course_id=@course_list.course_id@" title="[_ dotlrn-catalog.see_all_rev]">@course_list.course_key@</a>
+		</div>
 	    }
 	}
 	name  {
 	    label "[_ dotlrn-catalog.course_name]"
 	    display_template {
+		<div align=left>
 		<a href="course-info?course_id=@course_list.course_id@&course_name=@course_list.course_name@&course_key=@course_list.course_key@">@course_list.course_name@</a>
+		</div>
 	    }
 	}
 	assessment_id  {
@@ -117,4 +132,4 @@
     set creation_user [dotlrn_catalog::get_creation_user -object_id $item_id]
     set rel [dotlrn_catalog::has_relation -course_id $course_id]
     set category_name "[category::get_name [category::get_mapped_categories $course_id]]"
-}
+}
\ No newline at end of file
Index: openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.xql	16 Feb 2005 00:22:12 -0000	1.2
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.xql	16 Feb 2005 22:21:30 -0000	1.3
@@ -20,6 +20,26 @@
       </querytext>
 </fullquery>
 
+<fullquery name="get_course_info_keyword">      
+      <querytext>
+            select cc.course_id, cc.course_key, cc.course_name, cc.course_info, cc.assessment_id, ci.item_id
+	    from dotlrn_catalog cc, cr_items ci
+ 	    where cc.course_id = ci.live_revision and  
+	    lower(cc.course_name) like lower('%$keyword%') and
+	    ci.item_id in (
+		select object_id from acs_permissions where grantee_id = :user_id and
+		privilege = 'admin')
+      </querytext>
+</fullquery>
+
+<fullquery name="get_course_info_site_wide_keyword">      
+      <querytext>
+            select cc.course_id, cc.course_key, cc.course_name, cc.course_info, cc.assessment_id, ci.item_id
+	    from dotlrn_catalog cc, cr_items ci
+ 	    where cc.course_id = ci.live_revision and lower(cc.course_name) like lower('%$keyword%')
+      </querytext>
+</fullquery>
+
 <fullquery name="get_asm_name">
       <querytext>
             select cr.title from
@@ -34,7 +54,7 @@
       <querytext>
 	    select cc.course_id, cc.course_key, cc.course_name, cc.course_info, cc.assessment_id, ci.item_id
 	    from dotlrn_catalog cc, cr_items ci
- 	    where cc.course_id = ci.live_revision and  
+ 	    where cc.course_id = ci.live_revision and 
 	    ci.item_id in (
 		select object_id from acs_permissions where grantee_id = :user_id and
 		privilege = 'admin')
@@ -49,5 +69,23 @@
       </querytext>
 </fullquery>
 
+<fullquery name="paginator_keyword">      
+      <querytext>
+	    select cc.course_id, cc.course_key, cc.course_name, cc.course_info, cc.assessment_id, ci.item_id
+	    from dotlrn_catalog cc, cr_items ci
+ 	    where cc.course_id = ci.live_revision and lower(cc.course_name) like lower('%$keyword%') and 
+	    ci.item_id in (
+		select object_id from acs_permissions where grantee_id = :user_id and
+		privilege = 'admin')
+      </querytext>
+</fullquery>
 
+<fullquery name="site_wide_paginator_keyword">      
+      <querytext>
+            select cc.course_id, cc.course_key, cc.course_name, cc.course_info, cc.assessment_id, ci.item_id
+	    from dotlrn_catalog cc, cr_items ci
+ 	    where cc.course_id = ci.live_revision lower(cc.course_name) like lower('%$keyword%') and
+      </querytext>
+</fullquery>
+
 </queryset>
Index: openacs-4/packages/dotlrn-catalog/www/dt-admin/grant-user-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/dt-admin/grant-user-list.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/grant-user-list.tcl	14 Feb 2005 22:46:11 -0000	1.1
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/grant-user-list.tcl	16 Feb 2005 22:21:30 -0000	1.2
@@ -97,14 +97,16 @@
 	    }
 	}
 	permission {
-	    label "[_ dotlrn-catalog.permission]"
+	    label "[_ dotlrn-catalog.privilege_on] $course_key:"
 	    display_template {
+		<div align=center>
 		<if @grant_list.privilege@ eq 1>
-		[_ dotlrn-catalog.granted]
+		[_ dotlrn-catalog.admin]
 		</if>
 		<else>
 		<i>[_ dotlrn-catalog.not_allowed]</i>
 		</else>
+		</div>
 	    }
 	}
     }
Index: openacs-4/packages/dotlrn-catalog/www/dt-admin/grant-user-list.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/dt-admin/grant-user-list.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/grant-user-list.xql	14 Feb 2005 22:46:11 -0000	1.1
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/grant-user-list.xql	16 Feb 2005 22:21:30 -0000	1.2
@@ -14,7 +14,7 @@
       <querytext>
 	  select first_names, last_name, user_id as p_user_id, email as db_email
 	  from cc_users where user_id <> :user_id
-	  and (lower(first_names) like '%$user_name%'
+	  and (lower(first_names) like lower('%$user_name%')
    	  or lower(last_name) like '%$user_name%') order by first_names, last_name
       </querytext>
 </fullquery>
@@ -23,16 +23,16 @@
       <querytext>
 	  select first_names, last_name, user_id as p_user_id, email as db_email
 	  from cc_users where user_id <> :user_id 
-	  and lower(email) like '%$user_email%' order by email
+	  and lower(email) like lower('%$user_email%') order by email
       </querytext>
 </fullquery>
 
 <fullquery name="select_users_name_email">      
       <querytext>
 	  select first_names, last_name, user_id as p_user_id, email as db_email
-	  from cc_users where user_id <> :user_id 
-	  lower(first_names) like '%$user_name%' or lower(last_name) like '%$user_name%')
-	  and lower(email) like '%$user_email%' order by email
+	  from cc_users where user_id <> :user_id and (
+	  lower(first_names) like lower('%$user_name%') or lower(last_name) like lower('%$user_name%'))
+	  and lower(email) like lower('%$user_email%') order by email
       </querytext>
 </fullquery>