+ @context;noquote@
+ @page_title;noquote@
+ authority.pretty_name
+
+
+
+ » Configure drivers for this authority
+
+
+
+
+
+
+
+ » Configure drivers for this authority
+
+
+
+
+ » Show users in this authority (@num_users@ users)
+
+
+
+ Batch Jobs
+
+
+
+ » Run new batch job now
+
+
+
+
+
Index: openacs-4/packages/ims-ent/www/admin/authority.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ims-ent/www/admin/authority.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ims-ent/www/admin/authority.tcl 9 Jun 2004 18:08:07 -0000 1.1
@@ -0,0 +1,328 @@
+ad_page_contract {
+ Page for adding and editing an authority.
+
+ @author Peter Marklund
+ @creation-date 2003-09-08
+} {
+ authority_id:integer,optional
+ bj_orderby:optional
+ {ad_form_mode display}
+}
+
+set page_title ""
+if { [exists_and_not_null authority_id] } {
+ # Initial request in display or edit mode or a submit of the form
+ set authority_exists_p [db_string authority_exists_p {
+ select count(*)
+ from auth_authorities
+ where authority_id = :authority_id
+ }]
+} else {
+ # Initial request in add mode
+ set page_title "New Authority"
+ set ad_form_mode edit
+ set authority_exists_p 0
+}
+
+set form_widgets_full {
+
+ authority_id:key(acs_object_id_seq)
+
+ {pretty_name:text
+ {html {size 50}}
+ {label "Name"}
+ {section "General"}
+ }
+
+ {short_name:text,optional
+ {html {size 50}}
+ {label "Short Name"}
+ {mode {[ad_decode $local_authority_p 1 "display" ""]}}
+ {help_text "This is used when referring to the authority in parameters etc. Even if you need to change the display name above, this should stay unchanged."}
+ }
+
+ {enabled_p:text(radio)
+ {label "Enabled"}
+ {options {{Yes t} {No f}}}
+ }
+
+ {help_contact_text:richtext,optional
+ {html {cols 60 rows 13}}
+ {label "Help contact text"}
+ {help_text "Contact information (phone, email, etc.) to be displayed as a last resort when people are having problems with an authority."}
+ }
+ {auth_impl_id:integer(select),optional
+ {label "Authentication"}
+ {section "Authentication"}
+ {options {[acs_sc::impl::get_options -empty_label "--Disabled--" -contract_name auth_authentication]}}
+ }
+
+ {pwd_impl_id:integer(select),optional
+ {label "Password management"}
+ {section "Password Management"}
+ {options {[acs_sc::impl::get_options -empty_label "--Disabled--" -contract_name auth_password]}}
+ }
+
+ {forgotten_pwd_url:text,optional
+ {html {size 50}}
+ {label "Recover password URL"}
+ {help_text "Instead of a password management driver, you may provide a URL to which users are sent when they need help recovering their password. Any username in this url must be on the syntax foo={username} and {username} will be replaced with the real username."}
+ }
+ {change_pwd_url:text,optional
+ {html {size 50}}
+ {label "Change password URL"}
+ {help_text "Instead of a password management driver, you may provide a URL to which users are sent when they want to change their password. Any username in this url must be on the syntax foo={username} and {username} will be replaced with the real username."}
+ }
+
+ {register_impl_id:integer(select),optional
+ {label "Account registration"}
+ {section "Account Registration"}
+ {options {[acs_sc::impl::get_options -empty_label "--Disabled--" -contract_name auth_registration]}}
+ }
+
+ {register_url:text,optional
+ {html {size 50}}
+ {label "Account registration URL"}
+ {help_text "URL where users register for a new account."}
+ }
+
+ {user_info_impl_id:integer(select),optional
+ {label "User Info"}
+ {section "On-Demand Sync"}
+ {options {[acs_sc::impl::get_options -empty_label "--Disabled--" -contract_name auth_user_info]}}
+ {help_text "The implementation for getting user information from the authority in real-time"}
+ }
+
+ {batch_sync_enabled_p:text(radio)
+ {label "Batch sync enabled"}
+ {options {{Yes t} {No f}}}
+ {section {Batch Synchronization}}
+ }
+
+ {get_doc_impl_id:integer(select),optional
+ {label "GetDocument implementation"}
+ {options {[acs_sc::impl::get_options -empty_label "--Disabled--" -contract_name auth_sync_retrieve]}}
+ }
+
+ {process_doc_impl_id:integer(select),optional
+ {label "ProcessDocument implementation"}
+ {options {[acs_sc::impl::get_options -empty_label "--Disabled--" -contract_name auth_sync_process]}}
+ }
+}
+
+# For the local authority we allow only limited editing
+# Is this the local authority?
+set local_authority_p 0
+if { $authority_exists_p && [string equal $authority_id [auth::authority::local]] } {
+ set local_authority_p 1
+}
+
+if { $local_authority_p } {
+ # Local authority
+ # The form elements we use for local authority
+ set local_editable_elements {
+ authority_id
+ pretty_name
+ short_name
+ forgotten_pwd_url
+ change_pwd_url
+ register_url
+ }
+
+ foreach element $form_widgets_full {
+ regexp {^[a-zA-Z_]+} [lindex $element 0] element_name
+
+ if { [lsearch -exact $local_editable_elements $element_name] != -1 } {
+ lappend form_widgets $element
+ }
+ }
+} else {
+ # Not local authority - use full form
+ set form_widgets $form_widgets_full
+}
+
+ad_form -name authority \
+ -mode $ad_form_mode \
+ -form $form_widgets \
+ -cancel_url "." \
+ -new_request {
+ set enabled_p t
+ set batch_sync_enabled_p f
+ } \
+ -edit_request {
+
+ auth::authority::get -authority_id $authority_id -array element_array
+
+ set page_title $element_array(pretty_name)
+
+ foreach element_name [array names element_array] {
+ set $element_name $element_array($element_name)
+ }
+
+ if { !$local_authority_p } {
+ # Set the value of the help_contact_text element - both contents and format attributes
+ set help_contact_text [template::util::richtext::create]
+ set help_contact_text [template::util::richtext::set_property contents $help_contact_text $element_array(help_contact_text)]
+ if { [empty_string_p $element_array(help_contact_text_format)] } {
+ set element_array(help_contact_text_format) "text/enhanced"
+ }
+ set help_contact_text [template::util::richtext::set_property format $help_contact_text $element_array(help_contact_text_format)]
+ }
+
+} -new_data {
+
+ set page_title $pretty_name
+
+ foreach var_name [template::form::get_elements -no_api authority] {
+ set element_array($var_name) [set $var_name]
+ }
+
+ set element_array(sort_order) ""
+
+ if { !$local_authority_p } {
+ set element_array(help_contact_text) [template::util::richtext::get_property contents $help_contact_text]
+ set element_array(help_contact_text_format) [template::util::richtext::get_property format $help_contact_text]
+ }
+
+ auth::authority::create \
+ -authority_id $authority_id \
+ -array element_array
+
+} -edit_data {
+
+ foreach var_name [template::form::get_elements -no_api authority] {
+ if { ![string equal $var_name "authority_id"] } {
+ set element_array($var_name) [set $var_name]
+ }
+ }
+
+ if { !$local_authority_p } {
+ set element_array(help_contact_text) [template::util::richtext::get_property contents $help_contact_text]
+ set element_array(help_contact_text_format) [template::util::richtext::get_property format $help_contact_text]
+ if { [info exists element_array(short_name)] } {
+ unset element_array(short_name)
+ }
+ }
+
+ auth::authority::edit \
+ -authority_id $authority_id \
+ -array element_array
+} -after_submit {
+ ad_returnredirect [export_vars -base [ad_conn url] { authority_id }]
+}
+
+# Show recent batch jobs for existing authorities
+
+list::create \
+ -name batch_jobs \
+ -multirow batch_jobs \
+ -key job_id \
+ -elements {
+ start_time_pretty {
+ label "Start time"
+ link_url_eval {$job_url}
+ }
+ end_time_pretty {
+ label "End time"
+ }
+ run_time {
+ label "Run time"
+ html { align right }
+ }
+ num_actions {
+ label "Actions"
+ html { align right }
+ }
+ num_problems {
+ label "Problems"
+ html { align right }
+ }
+ actions_per_minute {
+ label "Actions/Minute"
+ html { align right }
+ }
+ short_message {
+ label "Message"
+ }
+ interactive_pretty {
+ label "Interactive"
+ html { align center }
+ }
+ } -filters {
+ authority_id {}
+ } -orderby {
+ default_value start_time_pretty,asc
+ start_time_pretty {
+ label "Start time"
+ orderby_desc "job_start_time desc"
+ orderby_asc "job_start_time asc"
+ default_direction asc
+ }
+ } -orderby_name bj_orderby
+
+set display_batch_history_p [expr $authority_exists_p && [string equal $ad_form_mode "display"]]
+if { $display_batch_history_p } {
+
+ db_multirow -extend {
+ job_url
+ start_time_pretty
+ end_time_pretty
+ interactive_pretty
+ short_message
+ actions_per_minute
+ run_time
+ } batch_jobs select_batch_jobs {} {
+ set job_url [export_vars -base batch-job { job_id }]
+
+ set start_time_pretty [lc_time_fmt $start_time_ansi "%x %X"]
+ set end_time_pretty [lc_time_fmt $end_time_ansi "%x %X"]
+
+ set interactive_pretty [ad_decode $interactive_p "t" "Yes" "No"]
+
+ set short_message [string_truncate -len 30 -- $message]
+
+ set actions_per_minute {}
+ if { $run_time_seconds > 0 && $num_actions > 0 } {
+ set actions_per_minute [expr round(60.0 * $num_actions / $run_time_seconds)]
+ }
+ set run_time [util::interval_pretty -seconds $run_time_seconds]
+ }
+ if { [exists_and_not_null get_doc_impl_id] && [exists_and_not_null process_doc_impl_id] } {
+ set batch_sync_run_url [export_vars -base batch-job-run { authority_id }]
+ } else {
+ # If there's neither a driver, nor any log history to display, hide any mention of batch jobs
+ if { ${batch_jobs:rowcount} == 0 } {
+ set display_batch_history_p 0
+ }
+ }
+}
+
+set context [list $page_title]
+
+if { [exists_and_not_null authority_id] } {
+ set num_users [lc_numeric [db_string num_users_in_auhtority { select count(*) from users where authority_id = :authority_id }]]
+} else {
+ set num_users 0
+}
+set show_users_url [export_vars -base ../users/complex-search { authority_id { target one } }]
+
+
+# This code should be executed for non-local authorities in the following types of requests:
+# - initial request of the form (display mode)
+# - The form is being submitted (display mode)
+set initial_request_p [empty_string_p [form get_action authority]]
+set submit_p [form is_valid authority]
+if { ($initial_request_p || $submit_p) && !$local_authority_p } {
+
+ # Add parameter links for implementations in display mode
+ foreach element_name [auth::authority::get_sc_impl_columns] {
+ # Only offer link if there is an implementation chosen and that implementation has
+ # parameters to configure
+ if { [exists_and_not_null element_array($element_name)] &&
+ ![empty_string_p [auth::driver::get_parameters -impl_id $element_array($element_name)]]} {
+
+ set configure_url [export_vars -base authority-parameters { authority_id }]
+ break
+ }
+ }
+}
Index: openacs-4/packages/ims-ent/www/admin/batch-action.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ims-ent/www/admin/batch-action.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ims-ent/www/admin/batch-action.adp 9 Jun 2004 18:08:07 -0000 1.1
@@ -0,0 +1,5 @@
+
+@context;noquote@
+@page_title;noquote@
+
+
Index: openacs-4/packages/ims-ent/www/admin/batch-action.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ims-ent/www/admin/batch-action.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ims-ent/www/admin/batch-action.tcl 9 Jun 2004 18:08:07 -0000 1.1
@@ -0,0 +1,94 @@
+ad_page_contract {
+ Display all information about a certain batch import operation.
+
+ @author Peter marklund (peter@collaboraid.biz)
+ @creation-date 2003-09-10
+} {
+ entry_id:integer
+}
+
+ims_enterprise::sync::job::get_entry -entry_id $entry_id -array batch_action
+auth::sync::job::get -job_id $batch_action(job_id) -array batch_job
+
+set page_title "One batch action"
+
+set context [list \
+ [list [export_vars -base authority { {authority_id $batch_action(authority_id)} }] \
+ "$batch_job(authority_pretty_name)"] \
+ [list [export_vars -base batch-job {{job_id $batch_action(job_id)}}] "One batch job"] \
+ $page_title]
+
+ad_form -name batch_action_form \
+ -mode display \
+ -display_buttons {} \
+ -form {
+ {entry_time:text(inform)
+ {label "Timestamp"}
+ }
+ {operation:text(inform)
+ {label "Action type"}
+ }
+ {username:text(inform)
+ {label "Username"}
+ }
+ {user_id:text(inform)
+ {label "User"}
+ }
+ {community_key:text(inform)
+ {label "Community Key"}
+ }
+ {department_key:text(inform)
+ {label "Department Key"}
+ }
+ {subject_key:text(inform)
+ {label "Subject Key"}
+ }
+ {class_key:text(inform)
+ {label "Class Key"}
+ }
+ {class_instance_key:text(inform)
+ {label "Class Instance Key"}
+ }
+ {success_p:text(inform)
+ {label "Success"}
+ }
+ {message:text(inform)
+ {label "Message"}
+ }
+ {element_messages:text(inform)
+ {label "Element messages"}
+ }
+ } -on_request {
+ foreach element_name [array names batch_action] {
+ # Prettify certain elements
+ if { [regexp {_p$} $element_name] } {
+ set $element_name [ad_decode $batch_action($element_name) "t" "Yes" "No"]
+ } elseif { [string equal $element_name "user_id"] && ![empty_string_p $batch_action($element_name)] } {
+ if { [catch {set $element_name [acs_community_member_link -user_id $batch_action($element_name)]}] } {
+ set $element_name $batch_action($element_name)
+ }
+ } elseif { [string equal $element_name "element_messages"] && ![empty_string_p $batch_action($element_name)] } {
+ array set messages_array $batch_action($element_name)
+ append $element_name ""
+ foreach message_name [array names messages_array] {
+ append $element_name "- $message_name - $messages_array($message_name)
"
+ }
+ append $element_name "
"
+ } elseif { [string equal $element_name "department_key"] && ![empty_string_p $batch_action($element_name)] } {
+ set dep_key $batch_action($element_name)
+ if { [catch {set $element_name "$batch_action($element_name)"}] } {
+ set $element_name $batch_action($element_name)
+ }
+ } elseif { [string equal $element_name "subject_key"] && ![empty_string_p $batch_action($element_name)] } {
+ if { [catch {set $element_name "$batch_action($element_name)"}] } {
+ set $element_name $batch_action($element_name)
+ }
+ } elseif { [string equal $element_name "class_instance_key"] && ![empty_string_p $batch_action($element_name)] } {
+ if { [catch {set $element_name "$batch_action($element_name)"}] } {
+ set $element_name $batch_action($element_name)
+ }
+ } else {
+ set $element_name $batch_action($element_name)
+ }
+ }
+ }
Index: openacs-4/packages/ims-ent/www/admin/batch-document-download.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ims-ent/www/admin/batch-document-download.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ims-ent/www/admin/batch-document-download.tcl 9 Jun 2004 18:08:07 -0000 1.1
@@ -0,0 +1,15 @@
+ad_page_contract {
+ Download a whole batch xml document.
+
+ @author Peter Marklund
+} {
+ job_id:integer
+}
+
+set document [db_string select_document {
+ select document
+ from auth_batch_jobs
+ where job_id = :job_id
+}]
+
+ns_return 200 text/plain $document
Index: openacs-4/packages/ims-ent/www/admin/batch-job-run.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ims-ent/www/admin/batch-job-run.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ims-ent/www/admin/batch-job-run.adp 9 Jun 2004 18:08:07 -0000 1.1
@@ -0,0 +1,9 @@
+
+ @context;noquote@
+ @page_title;noquote@
+
+ Batch sync completed.
+
+
+ » View job results
+
Index: openacs-4/packages/ims-ent/www/admin/batch-job-run.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ims-ent/www/admin/batch-job-run.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ims-ent/www/admin/batch-job-run.tcl 9 Jun 2004 18:08:07 -0000 1.1
@@ -0,0 +1,18 @@
+ad_page_contract {
+ Manually runs a batch synchronization.
+
+ @author Peter Marklund
+ @creation-date 2003-09-11
+} {
+ authority_id:integer
+}
+
+auth::authority::get -authority_id $authority_id -array authority
+
+set page_title "Run batch job"
+set authority_page_url [export_vars -base authority { {authority_id $authority(authority_id)} }]
+set context [list [list "." "Authentication"] [list $authority_page_url "$authority(pretty_name)"] $page_title]
+
+set job_id [auth::authority::batch_sync -authority_id $authority_id]
+
+set job_url [export_vars -base batch-job { job_id }]
Index: openacs-4/packages/ims-ent/www/admin/batch-job.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ims-ent/www/admin/batch-job.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ims-ent/www/admin/batch-job.adp 9 Jun 2004 18:08:07 -0000 1.1
@@ -0,0 +1,15 @@
+
+@context;noquote@
+@page_title;noquote@
+
+
+
+
+
+
+
+
+
+
+
+
Index: openacs-4/packages/ims-ent/www/admin/batch-job.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ims-ent/www/admin/batch-job.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ims-ent/www/admin/batch-job.tcl 9 Jun 2004 18:08:07 -0000 1.1
@@ -0,0 +1,256 @@
+ad_page_contract {
+ Page displaying info about a single batch job.
+
+ @author Peter Marklund
+ @creation-date 2003-09-09
+} {
+ job_id
+ page:optional
+ success_p:boolean,optional
+ ba_orderby:optional
+}
+
+auth::sync::job::get -job_id $job_id -array batch_job
+
+set page_title "One batch job"
+set context [list \
+ [list [export_vars -base authority { {authority_id $batch_job(authority_id)} }] "$batch_job(authority_pretty_name)"] $page_title]
+
+ad_form \
+ -name batch_job_form \
+ -mode display \
+ -display_buttons {} \
+ -form {
+ {authority_pretty_name:text(inform)
+ {label "Authority name"}
+ }
+ {job_start_time:text(inform)
+ {label "Start time"}
+ }
+ {job_end_time:text(inform)
+ {label "End time"}
+ }
+ {run_time_seconds:text(inform)
+ {label "Running time"}
+ {after_html " seconds"}
+ }
+ {interactive_p:text(inform)
+ {label "Interactive"}
+ }
+ {snapshot_p:text(inform)
+ {label "Snapshot"}
+ }
+ {message:text(inform)
+ {label "Message"}
+ }
+ {creation_user:text(inform)
+ {label "Creation user"}
+ }
+ {doc_start_time:text(inform)
+ {label "Document start time"}
+ }
+ {doc_end_time:text(inform)
+ {label "Document end time"}
+ }
+ {doc_status:text(inform)
+ {label "Document status"}
+ }
+ {doc_message:text(inform)
+ {label "Document message"}
+ }
+ {document_download:text(inform)
+ {label "Document"}
+ }
+ {num_actions:text(inform)
+ {label "Number of actions"}
+ }
+ {num_problems:text(inform)
+ {label "Number of problems"}
+ }
+ } -on_request {
+ foreach element_name [array names batch_job] {
+ # Make certain columns pretty for display
+ if { [regexp {_p$} $element_name] } {
+ set $element_name [ad_decode $batch_job($element_name) "t" "Yes" "No"]
+ } elseif { [string equal $element_name "creation_user"] && ![empty_string_p $batch_job($element_name)] } {
+ set $element_name [acs_community_member_link -user_id $batch_job($element_name)]
+ } else {
+ set $element_name [ad_quotehtml $batch_job($element_name)]
+ }
+ }
+
+ set job_start_time [lc_time_fmt $batch_job(job_start_time) "%x %X"]
+ set job_end_time [lc_time_fmt $batch_job(job_end_time) "%x %X"]
+
+ set document_download "download"
+ }
+
+list::create \
+ -name batch_actions \
+ -multirow batch_actions \
+ -key entry_id \
+ -page_size 100 \
+ -page_query_name pagination \
+ -elements {
+ entry_time_pretty {
+ label "Timestamp"
+ link_url_eval {$entry_url}
+ link_html { title "View log entry" }
+ }
+ operation {
+ label "Operation"
+ }
+ username {
+ label "Username"
+ link_url_col user_url
+ }
+ department_key {
+ label "Department Key"
+ link_url_col dep_url
+ }
+ subject_key {
+ label "Subject Key"
+ link_url_col sub_url
+ }
+ class_instance_key {
+ label "Class Instance Key"
+ link_url_col class_url
+ }
+ success_p {
+ label "Success"
+ display_template {
+
+ Yes
+
+
+ No
+
+ }
+ }
+ short_message {
+ label "Message"
+ }
+ } -filters {
+ job_id {
+ hide_p 1
+ }
+ entry_time_pretty {
+ label "Timestamp"
+ hide_p 1
+ }
+ username {
+ label "Username"
+ hide_p 1
+ }
+ success_p {
+ label "Success"
+ values {
+ { Success t }
+ { Failure f }
+ }
+ where_clause {
+ success_p = :success_p
+ }
+ default_value f
+ }
+ } -orderby {
+ default_value entry_time_pretty,asc
+ entry_time_pretty {
+ label "Timestamp"
+ orderby_desc "entry_time desc"
+ orderby_asc "entry_time asc"
+ default_direction asc
+ }
+ username {
+ label "Username"
+ orderby_desc "upper(username) desc"
+ orderby_asc "upper(username) asc"
+ default_direction asc
+ }
+ department_key {
+ label "Department Key"
+ orderby_desc "upper(department_key) desc"
+ orderby_asc "upper(department_key) asc"
+ default_direction asc
+ }
+ subject_key {
+ label "Subject Key"
+ orderby_desc "upper(subject_key) desc"
+ orderby_asc "upper(subject_key) asc"
+ default_direction asc
+ }
+ class_instance_key {
+ label "Class Instance Key"
+ orderby_desc "upper(class_instance_key) desc"
+ orderby_asc "upper(class_instance_key) asc"
+ default_direction asc
+ }
+ short_message {
+ label "Message"
+ orderby_desc "upper(message) desc"
+ orderby_asc "upper(message) asc"
+ default_direction asc
+ }
+ } -orderby_name ba_orderby
+
+
+db_multirow -extend { entry_url short_message entry_time_pretty user_url dep_url sub_url class_url } batch_actions select_batch_actions "
+ select entry_id,
+ to_char(entry_time, 'YYYY-MM-DD HH24:MI:SS') as entry_time_ansi,
+ operation,
+ username,
+ user_id,
+ department_key,
+ subject_key,
+ class_instance_key,
+ success_p,
+ message,
+ element_messages,
+ (select count(*) from users u2 where u2.user_id = user_id) as user_exists_p
+ from auth_batch_job_entries
+ where [template::list::page_where_clause -name batch_actions]
+ [template::list::filter_where_clauses -and -name batch_actions]
+ [template::list::orderby_clause -orderby -name batch_actions]
+" {
+ set entry_url [export_vars -base batch-action { entry_id }]
+
+ # Use message and element_messages to display one short message in the table
+ if { ![empty_string_p $message] } {
+ set short_message $message
+ } elseif { [llength $element_messages] == 2 } {
+ # Only one element message - use it
+ set short_message $element_messages
+ } elseif { [llength $element_messages] > 0 } {
+ # Several element messages
+ set short_message "Problems with elements"
+ } else {
+ set short_message ""
+ }
+ set short_message [string_truncate -len 75 -- $short_message]
+
+ if { $user_exists_p && ![empty_string_p $user_id] } {
+ set user_url [acs_community_member_admin_url -user_id $user_id]
+ } else {
+ set user_url {}
+ }
+
+ if ![empty_string_p $department_key] {
+ set dep_url "[dotlrn::get_url]/admin/department?department_key=$department_key"
+ } else {
+ set dep_url {}
+ }
+
+ if ![empty_string_p $subject_key] {
+ set sub_url "[dotlrn::get_url]/admin/class?class_key=${department_key}.$subject_key"
+ } else {
+ set sub_url {}
+ }
+
+ if ![empty_string_p $class_instance_key] {
+ set class_url "[dotlrn_community::get_community_url [ims_enterprise::ims_dotlrn::get_community_id $class_instance_key]]"
+ } else {
+ set class_url {}
+ }
+
+ set entry_time_pretty [lc_time_fmt $entry_time_ansi "%x %X"]
+}
Index: openacs-4/packages/ims-ent/www/admin/batch-job.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ims-ent/www/admin/batch-job.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ims-ent/www/admin/batch-job.xql 9 Jun 2004 18:08:07 -0000 1.1
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+ select entry_id
+ from auth_batch_job_entries
+ where job_id = :job_id
+ [template::list::filter_where_clauses -and -name batch_actions]
+ order by entry_id
+
+
+
+
+
Index: openacs-4/packages/ims-ent/www/admin/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ims-ent/www/admin/index.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ims-ent/www/admin/index.adp 9 Jun 2004 18:08:08 -0000 1.1
@@ -0,0 +1,11 @@
+
+@context;noquote@
+@page_title;noquote@
+
+Authorities
+
+
+
+
+ » Create new authority
+
Index: openacs-4/packages/ims-ent/www/admin/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ims-ent/www/admin/index.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ims-ent/www/admin/index.tcl 9 Jun 2004 18:08:08 -0000 1.1
@@ -0,0 +1,95 @@
+ad_page_contract {
+ Index page for External Authentication listing
+ available authorities.
+
+ @author Peter Marklund
+ @creation-date 2003-09-08
+}
+
+set page_title "Authentication"
+set context [list $page_title]
+
+list::create \
+ -name "authorities" \
+ -multirow "authorities" \
+ -key authority_id \
+ -elements {
+ pretty_name {
+ label "Name"
+ link_url_eval {[export_vars -base authority { authority_id }]}
+ }
+ enabled {
+ label "Enabled"
+ html { align center }
+ display_template {
+
+
+
+
+
+
+ }
+ }
+ delete {
+ label ""
+ display_template {
+
+
+
+
+
+ }
+ sub_class narrow
+ }
+ }
+
+# The authority currently selected for registering users
+set register_authority_id [auth::get_register_authority]
+
+db_multirow -extend {
+ enabled_p_url
+ sort_order_url_up
+ sort_order_url_down
+ delete_url
+ registration_url
+ registration_status
+} authorities authorities_select {
+ select authority_id,
+ short_name,
+ pretty_name,
+ enabled_p,
+ sort_order,
+ (select max(sort_order) from auth_authorities) as lowest_sort_order,
+ (select min(sort_order) from auth_authorities) as highest_sort_order,
+ (select impl_pretty_name from acs_sc_impls where impl_id = auth_impl_id) as auth_impl,
+ (select impl_pretty_name from acs_sc_impls where impl_id = pwd_impl_id) as pwd_impl,
+ (select impl_pretty_name from acs_sc_impls where impl_id = register_impl_id) as reg_impl
+ from auth_authorities
+ where process_doc_impl_id =
+ (select asi.impl_id from acs_sc_impls asi
+ where asi.impl_contract_name = 'auth_sync_process')
+ order by sort_order
+} {
+ set toggle_enabled_p [ad_decode $enabled_p "t" "f" "t"]
+ set enabled_p_url "authority-set-enabled-p?[export_vars { authority_id {enabled_p $toggle_enabled_p} }]"
+ set delete_url [export_vars -base authority-delete { authority_id }]
+ set sort_order_url_up "authority-set-sort-order?[export_vars { authority_id {direction up} }]"
+ set sort_order_url_down "authority-set-sort-order?[export_vars { authority_id {direction down} }]"
+
+ if { [string equal $authority_id $register_authority_id] } {
+ # The authority is selected as register authority
+ set registration_status "selected"
+ } elseif { ![empty_string_p $reg_impl] } {
+ # The authority can be selected as register authority
+ set registration_status "can_select"
+ set registration_url [export_vars -base authority-registration-select { authority_id }]
+ } else {
+ # This authority has no account creation driver
+ set registration_status "cannot_select"
+ }
+}
+
+set auth_package_id [apm_package_id_from_key "acs-authentication"]
+set parameter_url [export_vars -base /shared/parameters { { package_id $auth_package_id } { return_url [ad_return_url] } }]