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.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.en_US.ISO-8859-1.xml 14 Feb 2005 22:46:11 -0000 1.1
+++ openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.en_US.ISO-8859-1.xml 16 Feb 2005 00:22:12 -0000 1.2
@@ -13,14 +13,15 @@
Categories
Categorize
Categorized Courses
+ Category
Class
Class Name
Community Name:
Community
Confirm Delete Of
Course Administration
DotLRN Catalog Index
- Course Info:
+ Description:
Course Key:
Your Course List
Course Name:
@@ -48,6 +49,7 @@
Grant/Revoke
and has <b>No</b> associations to dotLRN class or community
has one association to dotLRN class or community
+ Course Information
is associated to:
Check/uncheck all rows
Make This Course Live
@@ -78,6 +80,7 @@
Check/uncheck this row, and select an action to perform below
To
associations to dotLRN classes or communities
+ Uncategorized
Uncategorized Courses
User Name:
users to grant permissions that match that search
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
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.es_ES.ISO-8859-1.xml 16 Feb 2005 00:22:46 -0000 1.1
@@ -0,0 +1,93 @@
+
+
+
+ Agregar este curso a una categoria.
+ Administrar Arbol de Categorias
+ y tiene
+ Assessment
+ Asociar
+ Asociar este curso
+ Asociar a esta clase
+ Asociar a esta comunidad
+ Asociado
+ Categorias
+ Categorizar
+ Cursos Categorizados
+ Categoria
+ Clase
+ Nombre de la Clase
+ Nombre de la Comunidad
+ Comunidad
+ Corfirmar borrado de
+ Administracion de Cursos
+ Indice del Catalogo dotLRN
+ Informacion del Curso:
+ Llave del Curso:
+ Su listado de Cursos
+ Nombre del Curso:
+ Corsos
+ Crear una nueva version de
+ Borrar
+ Borrar Cursos
+ Borrar este Curso
+ Nombre del Departamento
+ Descripcion
+ Aun quiere borrarlo?
+ dotLRN
+ Clases de dotLRN
+ Comunidades de dotLRN
+ Listado de dotLRN
+ Nueva version del Curso
+ Correo electronico:
+ Inscribirse
+ Inscripcion no disponible
+ Otorgar
+ Usuarios a otorgar permisos
+ Otorgar Permisos
+ Otorgar permisos a otros usuarios
+ Otorgado
+ Otorgar/Remover
+ y <b>No</b> posee asociaciones a clases o comunidades de dotLRN
+ posee una asociacion a una clase o comunidad de dotLRN
+ esta asociado a:
+ Marcar/Desmarcar todas las filas
+ Hacer este Curso Disponible
+ Administrar Permisos
+ <b>La llave del curso ya existe</b>
+ Nuevo Curso
+ Nueva Version del Curso
+ No
+ No permitido
+ No Asociar
+ No Asociado
+ Informacion de un Curso
+ Permisos:
+ Listado de Revisiones
+ Revisiones
+ Remover
+ Remover Permisos
+ buscar por direccion de correo electronico o parte de ella
+ buscar por nombre o apellido.
+ Busqueda de Usuarios
+ Busqueda por Nombre del Usuario:
+ Busqueda por direccion de correo electronico:
+ Busqueda de usuarios para otrogar permisos
+ Ver todas las versiones
+ Nombre de la Materia
+ Nombre del periodo
+ Este curso posee
+ Marcar/Desmarcar esta fila, y seleccionar una accion a realizar
+ Para
+ Asociaciones a clases o comunidades de dotLRN
+ Sin categoria
+ Cursos No Categorizados
+ Nombre del Usuario:
+ usuarios que a otorgar permiso que coinciden con la busqueda
+ Version
+ Versiones
+ Observar
+ Observar Asociaciones
+ Si
+
+
+
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.2 -r1.3
--- openacs-4/packages/dotlrn-catalog/lib/course-chunk.adp 14 Feb 2005 22:55:39 -0000 1.2
+++ openacs-4/packages/dotlrn-catalog/lib/course-chunk.adp 16 Feb 2005 00:22:12 -0000 1.3
@@ -1,4 +1,5 @@
+#dotlrn-catalog.info#:
@@ -20,12 +21,10 @@
#dotlrn-catalog.course_name# | @name@ |
|
|
- #dotlrn-catalog.course_info# | @info@ |
+ #dotlrn-catalog.course_info# | @info;noquote@ |
+
|
- #dotlrn-catalog.asm#: | @asm@ |
-
- |
#dotlrn-catalog.dotlrn#:
|
@@ -47,6 +46,12 @@
+
+
+ |
+ #dotlrn-catalog.asm#: | @asm@ |
+
+
|
@@ -88,4 +93,17 @@
+
+
+#dotlrn-catalog.dotlrn_assoc#:
+
+
+
+
+
+
+
+
+
+
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.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/lib/course-chunk.tcl 14 Feb 2005 22:46:11 -0000 1.1
+++ openacs-4/packages/dotlrn-catalog/lib/course-chunk.tcl 16 Feb 2005 00:22:12 -0000 1.2
@@ -16,10 +16,20 @@
set asmid "-1"
}
+if { ![info exists revision] } {
+ set revision "no"
+}
+
set category_p [db_string get_category { } -default -1]
+set info [ad_html_text_convert -from text/enhanced -to text/plain $info]
+
set cc_package_id [apm_package_id_from_key "dotlrn-catalog"]
set tree_id [db_string get_tree_id { } -default "-1"]
# Get the category name
-set category_name "[category::get_name [category::get_mapped_categories $course_id]]"
\ No newline at end of file
+set category_name "[category::get_name [category::get_mapped_categories $course_id]]"
+
+
+# For dotlrn associations
+db_multirow relations relation { }
\ No newline at end of file
Index: openacs-4/packages/dotlrn-catalog/lib/course-chunk.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/lib/course-chunk.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/lib/course-chunk.xql 14 Feb 2005 22:46:11 -0000 1.1
+++ openacs-4/packages/dotlrn-catalog/lib/course-chunk.xql 16 Feb 2005 00:22:12 -0000 1.2
@@ -13,4 +13,11 @@
+
+
+ select object_id_two as object_id, rel_type as type from acs_rels
+ where object_id_one = :course_id order by type
+
+
+
\ No newline at end of file
Index: openacs-4/packages/dotlrn-catalog/sql/oracle/dotlrn-catalog-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/sql/oracle/dotlrn-catalog-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/sql/oracle/dotlrn-catalog-create.sql 14 Feb 2005 22:46:11 -0000 1.1
+++ openacs-4/packages/dotlrn-catalog/sql/oracle/dotlrn-catalog-create.sql 16 Feb 2005 00:22:12 -0000 1.2
@@ -3,9 +3,9 @@
-- creation-date 2005-01-31
begin
- acs_rel_type.create_role(''d_catalog_role'', ''DotLRN Course Catalog Role'', ''DotLRN Course Catalog Role'');
- acs_rel_type.create_role(''dotlrn_class_role'', ''dotLRN Class Role'', ''dotLRN Class Role'');
- acs_rel_type.create_role(''dotlrn_com_role'', ''dotLRN Community Role'', ''dotLRN Community Role'');
+ acs_rel_type.create_role('d_catalog_role', 'DotLRN Course Catalog Role', 'DotLRN Course Catalog Role');
+ acs_rel_type.create_role('dotlrn_class_role', 'dotLRN Class Role', 'dotLRN Class Role');
+ acs_rel_type.create_role('dotlrn_com_role', 'dotLRN Community Role', 'dotLRN Community Role');
commit;
end;
Index: openacs-4/packages/dotlrn-catalog/www/admin/grant-users.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/admin/grant-users.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/www/admin/grant-users.tcl 14 Feb 2005 22:46:11 -0000 1.1
+++ openacs-4/packages/dotlrn-catalog/www/admin/grant-users.tcl 16 Feb 2005 00:22:12 -0000 1.2
@@ -13,20 +13,9 @@
# dotlrn_catalog package_id
set cc_package_id [apm_package_id_from_key "dotlrn-catalog"]
-# The tree id from categories
-set tree_list [category_tree::get_mapped_trees $cc_package_id]
-if { [string equal [lindex [lindex $tree_list 0] 1] "dotlrn-course-catalog"] } {
- set tree_id [lindex [lindex $tree_list 0] 0]
-} else {
- set tree_id ""
-}
-
-
# Grants Permission for all the users in p_user_id
foreach user $p_user_id {
permission::grant -party_id $user -object_id $cc_package_id -privilege "create"
- permission::grant -party_id $user -object_id $tree_id -privilege category_tree_read
- permission::grant -party_id $user -object_id $tree_id -privilege category_tree_write
}
Index: openacs-4/packages/dotlrn-catalog/www/admin/revoke-users.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/admin/revoke-users.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/www/admin/revoke-users.tcl 14 Feb 2005 22:46:11 -0000 1.1
+++ openacs-4/packages/dotlrn-catalog/www/admin/revoke-users.tcl 16 Feb 2005 00:22:12 -0000 1.2
@@ -13,20 +13,9 @@
# dotlrn_catalog package_id
set cc_package_id [apm_package_id_from_key "dotlrn-catalog"]
-# The tree id from categories
-set tree_list [category_tree::get_mapped_trees $cc_package_id]
-if { [string equal [lindex [lindex $tree_list 0] 1] "dotlrn-course-catalog"] } {
- set tree_id [lindex [lindex $tree_list 0] 0]
-} else {
- set tree_id ""
-}
-
-
# Grants Permission for all the users in p_user_id
foreach user $p_user_id {
permission::revoke -party_id $user -object_id $cc_package_id -privilege "create"
- permission::revoke -party_id $user -object_id $tree_id -privilege "category_tree_read"
- permission::revoke -party_id $user -object_id $tree_id -privilege "category_tree_write"
}
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.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/course-add-edit.tcl 14 Feb 2005 22:46:11 -0000 1.1
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-add-edit.tcl 16 Feb 2005 00:22:12 -0000 1.2
@@ -24,16 +24,15 @@
# Check for create permissions over dotlrn-catalog package
permission::require_permission -party_id $user_id -object_id $cc_package_id -privilege "create"
-if { [info exists mode] } {
- # Check if users has admin permission to edit the course
- permission::require_permission -object_id $course_id -privilege "create"
- # To disable the element course_key
- set mode display
+if { [info exist mode] } {
+ if { [string equal $mode 1] } {
+ permission::require_permission -object_id $course_id -privilege "create"
+ }
+ set mode_p display
} else {
- set mode edit
+ set mode_p edit
}
-
# Get assessments
set asm_package_id [apm_package_id_from_key assessment]
set asm_list [list [list "[_ dotlrn-catalog.not_associate]" "-1"]]
@@ -49,21 +48,20 @@
# Creates the elements to show with ad_form
-
foreach attribute $attribute_list {
set element_mode ""
set aditional_type ""
set aditional_elements ""
switch [lindex $attribute 4] {
string {
if { [string equal [lindex $attribute 2] "assessment_id"]} {
- set aditional_type "(select)"
- set aditional_elements [list options $asm_list]
- } else {
- if { [string equal [lindex $attribute 2] "course_key"]} {
- set element_mode [list mode edit]
- }
- }
+ set aditional_type "(select)"
+ set aditional_elements [list options $asm_list]
+ } else {
+ if { [string equal [lindex $attribute 2] "course_key"]} {
+ set element_mode [list mode $mode_p]
+ }
+ }
}
text {
set aditional_type "(textarea)"
@@ -77,14 +75,11 @@
}
}
set element [list [lindex $attribute 2]:text${aditional_type} [list label [lindex $attribute 3]] $aditional_elements $element_mode]
-
lappend elements $element
-
}
-
# Create the form
-ad_form -name add_course -export {return_url $return_url } -form {
+ad_form -name add_course -export {return_url $return_url mode $mode} -form {
course_id:key
}
@@ -99,25 +94,21 @@
}
}
-ad_form -extend -name add_course -validate {
- { course_key
- { [dotlrn_catalog::check_name -name $course_key] }
- "[_ dotlrn-catalog.name_already]"
- }
-} -new_data {
+ad_form -extend -name add_course -new_data {
# New item and revision in the CR
set folder_id [dotlrn_catalog::get_folder_id]
set attribute_list [package_object_attribute_list -start_with dotlrn_catalog dotlrn_catalog]
set form_attributes [list]
+
foreach attribute $attribute_list {
set attr_name [lindex $attribute 2]
lappend form_attributes [list $attr_name [set $attr_name]]
}
-
- 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]
-
+ 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] } errmsg] } {
+ ad_return_complaint 1 "\#dotlrn-catalog.name_already\#"
+ }
# Grant admin privileges to the user over the item in the CR
permission::grant -party_id $user_id -object_id $item_id -privilege "admin"
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
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-info.adp 16 Feb 2005 00:22:46 -0000 1.1
@@ -0,0 +1,6 @@
+
+@page_title@
+@context;noquote@
+
+
+
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
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-info.tcl 16 Feb 2005 00:22:46 -0000 1.1
@@ -0,0 +1,23 @@
+ad_page_contract {
+ Displays information of one course
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+ @creation-date 15-02-2005
+} {
+ course_id:notnull
+ course_key:notnull
+ course_name:notnull
+}
+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 { }
+
+set asm_name [db_string get_asm_name { } -default "[_ dotlrn-catalog.not_associated]"]
+set item_id [dotlrn_catalog::get_item_id -revision_id $course_id]
+set creation_user [dotlrn_catalog::get_creation_user -object_id $item_id]
+set rel [dotlrn_catalog::has_relation -course_id $course_id]
+
Index: openacs-4/packages/dotlrn-catalog/www/dt-admin/course-info.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/dt-admin/course-info.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-info.xql 16 Feb 2005 00:22:46 -0000 1.1
@@ -0,0 +1,23 @@
+
+
+
+
+
+ select dc.course_info, dc.assessment_id, cr.item_id
+ from dotlrn_catalog dc, cr_revisions cr
+ where cr.revision_id = :course_id and dc.course_id = :course_id
+
+
+
+
+
+ select cr.title from
+ cr_folders cf, cr_items ci, cr_revisions cr, as_assessments a
+ where cr.revision_id = ci.latest_revision and a.assessment_id = cr.revision_id and
+ ci.parent_id = cf.folder_id and cf.package_id = :asm_package_id and
+ ci.item_id = :assessment_id order by cr.title
+
+
+
+
+
\ No newline at end of file
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.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.adp 14 Feb 2005 22:46:11 -0000 1.1
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.adp 16 Feb 2005 00:22:12 -0000 1.2
@@ -2,13 +2,13 @@
@page_title@
@context;noquote@
#dotlrn-catalog.new_course#
-
-| #dotlrn-catalog.admin_categories#
-
+
+ | #dotlrn-catalog.admin_categories#
+
| #dotlrn-catalog.grant_per#
-
-
-
+
+
+
\ 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.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.tcl 14 Feb 2005 22:46:11 -0000 1.1
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.tcl 16 Feb 2005 00:22:12 -0000 1.2
@@ -4,7 +4,7 @@
@author Viaro Networks www.viaro.net
@creation-date 28-01-2005
} {
-
+ page:optional
}
set user_id [ad_conn user_id]
@@ -35,15 +35,86 @@
if { [acs_user::site_wide_admin_p] } {
set query get_course_info_site_wide
+ set paginator_query site_wide_paginator
} else {
set query get_course_info
+ set paginator_query paginator
}
+template::list::create \
+ -name course_list \
+ -multirow course_list \
+ -key course_id \
+ -page_groupsize 5 \
+ -page_flush_p t \
+ -page_query_name $query \
+ -bulk_action_method post \
+ -bulk_action_export_vars {
+ }\
+ -row_pretty_plural "[_ dotlrn-catalog.courses]" \
+ -elements {
+ key {
+ label "[_ dotlrn-catalog.course_key]"
+ display_template {
+ \
+
+ @course_list.course_key@
+ }
+ }
+ name {
+ label "[_ dotlrn-catalog.course_name]"
+ display_template {
+ @course_list.course_name@
+ }
+ }
+ assessment_id {
+ label "[_ dotlrn-catalog.asm]:"
+ display_template {
+ @course_list.asm_name@
+ }
+ }
+ dotlrn {
+ label "[_ dotlrn-catalog.dotlrn]"
+ display_template {
+
+ #dotlrn-catalog.no# (#dotlrn-catalog.associate#)
+
+
+ #dotlrn-catalog.yes# (#dotlrn-catalog.watch#)
+
+ }
+ }
+ category {
+ label "[_ dotlrn-catalog.category]"
+ display_template {
+
+
+ @course_list.category_name@
+
+
+ #dotlrn-catalog.uncat#
+
+
+ }
+ }
+ permissions {
+ label "[_ dotlrn-catalog.permission]"
+ display_template {
+ \#dotlrn-catalog.manage_per\#
+ }
+ }
+ delete {
+ display_template {
+
+ }
+ }
+ }
-db_multirow -extend { asm_name rel item_id creation_user } course_list $query {} {
+db_multirow -extend { asm_name rel item_id creation_user category_name } course_list $query {} {
set asm_name [db_string get_asm_name { } -default "[_ dotlrn-catalog.not_associated]"]
set item_id [dotlrn_catalog::get_item_id -revision_id $course_id]
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]]"
}
-
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.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.xql 14 Feb 2005 22:46:11 -0000 1.1
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/course-list.xql 16 Feb 2005 00:22:12 -0000 1.2
@@ -9,7 +9,6 @@
ci.item_id in (
select object_id from acs_permissions where grantee_id = :user_id and
privilege = 'admin')
-
@@ -31,5 +30,24 @@
+
+
+ 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
+ ci.item_id in (
+ select object_id from acs_permissions where grantee_id = :user_id and
+ privilege = 'admin')
+
+
+
+
+ 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
+
+
+
+
Index: openacs-4/packages/dotlrn-catalog/www/dt-admin/revision-list.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/dt-admin/revision-list.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/www/dt-admin/revision-list.adp 14 Feb 2005 22:46:11 -0000 1.1
+++ openacs-4/packages/dotlrn-catalog/www/dt-admin/revision-list.adp 16 Feb 2005 00:22:12 -0000 1.2
@@ -4,6 +4,6 @@
-
+