Index: openacs-4/packages/xolp/tcl/xolp-apm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xolp/tcl/xolp-apm-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/xolp/tcl/xolp-apm-procs.tcl 29 Jun 2018 17:27:19 -0000 1.2 +++ openacs-4/packages/xolp/tcl/xolp-apm-procs.tcl 11 Apr 2019 11:32:04 -0000 1.3 @@ -8,7 +8,7 @@ namespace eval ::xolp {} namespace eval ::xolp::apm { - ad_proc -public ::xolp::apm::after_install {} { + ad_proc -private ::xolp::apm::after_install {} { ::xolp::EvaluationSchema require \ -iri "https://dotlrn.org/xolp/evaluation-schemas/at-five-to-one" \ -title "5 to 1" \ Index: openacs-4/packages/xolp/tcl/xolp-evaluation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xolp/tcl/xolp-evaluation-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/xolp/tcl/xolp-evaluation-procs.tcl 29 Jun 2018 17:27:19 -0000 1.3 +++ openacs-4/packages/xolp/tcl/xolp-evaluation-procs.tcl 11 Apr 2019 11:32:04 -0000 1.4 @@ -31,7 +31,9 @@ e.g. grades. } - ::xolp::EvaluationSchema ad_proc new_persistent_object {args} {} { + ::xolp::EvaluationSchema ad_proc new_persistent_object {args} { + Create new persistent object + } { array set argsarray $args if {[llength [array get argsarray "-level_names"]] > 0 && [llength [array get argsarray "-positive_threshold_index"]] > 0 @@ -80,7 +82,9 @@ " } - ::xolp::EvaluationScale ad_instproc initialize_loaded_object {} {} { + ::xolp::EvaluationScale ad_instproc initialize_loaded_object {} { + Initialize loaded object + } { my levels } Index: openacs-4/packages/xolp/tcl/xolp-indicator-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xolp/tcl/xolp-indicator-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/xolp/tcl/xolp-indicator-procs.tcl 29 Jun 2018 17:27:19 -0000 1.6 +++ openacs-4/packages/xolp/tcl/xolp-indicator-procs.tcl 11 Apr 2019 11:32:04 -0000 1.7 @@ -38,14 +38,18 @@ Primary Fact Table Abstraction } - ::xolp::Indicator ad_proc essential_attributes {} {} { + ::xolp::Indicator ad_proc essential_attributes {} { + Return essential attributes + } { set attributes [::xolp::util::lremove [my info parameter] { indicator_id begin_date_id end_date_id begin_time_id end_time_id storage_date_id storage_time_id }] return $attributes } - ::xolp::Indicator ad_instproc init args {} { + ::xolp::Indicator ad_instproc init args { + Init class + } { next my destroy_on_cleanup } @@ -108,15 +112,19 @@ ::xolp::Indicator ad_proc exists_in_db { {-indicator_id:required} - } {} { + } { + Checks for objects existance in the database + } { ::xo::dc get_value [my qn select_object] "select 1 from xolp_indicator_facts where indicator_id = :indicator_id" 0 } ::xolp::Indicator ad_proc delete { {-indicator_id ""} {-user_ids ""} {-activity_version_ids ""} - } {} { + } { + Delete object + } { if {$indicator_id ne ""} { ::xo::dc dml [my qn delete] "DELETE FROM xolp_indicator_facts WHERE indicator_id = :indicator_id" } elseif {$user_id ne "" and $activity_version_ids ne ""} { @@ -351,7 +359,9 @@ } - ::xolp::Indicator ad_instproc save {} {} { + ::xolp::Indicator ad_instproc save {} { + Save object + } { set attributes [[my info class] essential_attributes] my instvar indicator_id {*}$attributes foreach a $attributes { Index: openacs-4/packages/xolp/tcl/xolp-user-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xolp/tcl/xolp-user-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/xolp/tcl/xolp-user-procs.tcl 29 Jun 2018 17:27:19 -0000 1.2 +++ openacs-4/packages/xolp/tcl/xolp-user-procs.tcl 11 Apr 2019 11:32:04 -0000 1.3 @@ -44,7 +44,9 @@ {-context_iri ""} {-policy "best"} {-null_as_zero false} - } {} { + } { + Get evaluation + } { set activity_version_id [lindex [::xolp::Activity get_object_ids -iri $iri] 0] set evalscale [::xolp::EvaluationScale get_evalscales_from_activity_version_id -activity_version_id $activity_version_id] if {$evalscale eq ""} { @@ -143,7 +145,9 @@ {-policy "best"} {-format "%.2f"} {-null_as_zero false} - } {} { + } { + Get competency result + } { set agg [string map -nocase {best max worst min average avg} $policy] if {$agg ni "min max avg"} {error "Unknown policy."} set sql "SELECT xolp_weighted_competency_result(:user_id::INTEGER,:competency_iri::TEXT,:agg::TEXT)" @@ -158,7 +162,9 @@ {-policy "best"} {-format "%.2f"} {-null_as_zero false} - } {} { + } { + Get competency evaluation + } { set result [my get_competency_result \ -format "%s" \ -user_id $user_id \ Index: openacs-4/packages/xolp/tcl/xolp-util-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xolp/tcl/xolp-util-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/xolp/tcl/xolp-util-procs.tcl 29 Jun 2018 17:27:19 -0000 1.2 +++ openacs-4/packages/xolp/tcl/xolp-util-procs.tcl 11 Apr 2019 11:32:04 -0000 1.3 @@ -15,20 +15,20 @@ namespace eval ::xolp::util { - ad_proc lcontains {list1 list2} { + ad_proc -private lcontains {list1 list2} { foreach pattern $list2 { if {[lsearch $list1 $pattern] ne -1} {return 1} } return 0 } - ad_proc ltransform {{-prefix ":"} {-suffix ""} list} { + ad_proc -private ltransform {{-prefix ":"} {-suffix ""} list} { set transformed_list {} foreach e $list {lappend transformed_list ${prefix}${e}${suffix}} return $transformed_list } - ad_proc lremove {list elements_to_be_removed} { + ad_proc -private lremove {list elements_to_be_removed} { foreach e $elements_to_be_removed { set list [lsearch -all -inline -not -exact $list $e] }