Forum .LRN Q&A: dotLRN class attendance

Collapse
Posted by Al Guyer on
Hello,

Is there an attendance package? I found this:
http://cvs.openacs.org/cvs/openacs-4/packages/dotlrn-attendance/

I did not find it in the repository. I am using the dotLRN
2.1.3 tarball:

https://openacs.org/projects/dotlrn/download/download/dotlrn-2.1.3.tar.gz

Thanks,

-al

Collapse
Posted by Rocael Hernández Rizzardini on
hey, we have just finished our attendance pkg, we are about to commit this week, more comming soon...
Collapse
Posted by Al Guyer on
Wonderful! THANKS!!!

-al

Collapse
Posted by Carl Robert Blesius on
dotlrn-attendance was checked into HEAD almost 8 months ago and we are using it in production at MGH (I talked with Rocael and he was not aware of the package). Based on a quick discussion it seems the package we are using at MGH has more features than what he was planning on releasing and he might use this one instead.

I took a few screen shots to show how some of the features work.

1. Add/Edit a session where attendance is tracked:

http://dotlrn.org/photo-album/photo?photo_id=130888

2. Admin portlet with some of the options (we need to add some links to additional admin/reporting pages)

http://dotlrn.org/photo-album/base-photo?photo_id=130901

3. Mark attendance on the web:

http://dotlrn.org/photo-album/base-photo?photo_id=130915

4. Mark attendance on paper (and enter it in the web UI later)

http://dotlrn.org/photo-album/base-photo?photo_id=130955

5. Send emails per session

http://dotlrn.org/photo-album/base-photo?photo_id=130968

All I have time for right now. Please download from HEAD or wait for .LRN 2.2 (we will be adding this package).

Hope this helps you both.

Collapse
Posted by Al Guyer on
Hello Carl,

Thank you for your reply!

When you say "dotlrn-attendance was checked into HEAD", do you mean:

http://cvs.openacs.org/cvs/openacs-4/packages/attendance/?only_with_tag=HEAD

What would be the cvs command to download the correct version?

I tried:
cvs -z3 -d :pserver:mailto:anonymous@cvs.openacs.org:/cvsroot co -r oacs-5-2 attendance

and:
cvs -z3 -d :pserver:mailto:anonymous@cvs.openacs.org:/cvsroot co -r head attendance

I am getting the error:
cvs server: cannot find module `attendance' - ignored
cvs [checkout aborted]: cannot expand modules

Thanks,

-al

Collapse
Posted by Rocael Hernández Rizzardini on
cvs -z3 -d :pserver:mailto:anonymous@cvs.openacs.org:/cvsroot co openacs-4/packages/attendance
Collapse
Posted by Al Guyer on
That worked, thanks!

Is attendance then associated with classes? or communities? I did not see it show up in the "manage appletts" for communities or classes.

So, I mounted it but get a nasty tcl error when going to that url.

The error starts with:
No argument to switch -community_id
while executing

Which makes sense that it would error because I am opening that page directly and NOT from a class or community.

I, obviously, am doing something wrong. :)

Thanks,

-al

Collapse
Posted by Dave Bauer on
Attendance likely should not be mounted.

Also install dotlrn-attendance which is applet you need in add applets.

cvs -z3 -d :pserver:mailto:anonymous@cvs.openacs.org:/cvsroot co openacs-4/packages/dotlrn-attendance

Collapse
Posted by Al Guyer on
Thank you very much. I was able to install dotlrn-attendance, add the applet to a class, and add an event, or session.

But, when I click the "attendance" link:
http://localhost/dotlrn/classes/dep01/dep01.sub01/class01/attendance/admin/mark?item_id=3427&return_url=/dotlrn/classes/dep01/dep01.sub01/class01/one-community-admin?

I received the server error below. It looks like I am missing another applett that has additional user info?

Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR: Relation "person_info" does not exist

SQL: select allergies from person_info where person_id =1958
while executing
"ns_pg_bind 0or1row nsdb0 {select allergies from person_info where person_id =1958}"
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
("postgresql" arm line 2)
invoked from within
"switch $driverkey {
oracle {
return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
}
..."
invoked from within
"db_exec 0or1row $db $full_name $sql"
invoked from within
"set selection [db_exec 0or1row $db $full_name $sql]"
("uplevel" body line 2)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
set selection [db_exec 0or1row $db $full_name $sql]
}"
(procedure "db_string" line 8)
invoked from within
"db_string "get_medical_issues" "select allergies from person_info where person_id =[ns_set get $user user_id]" -default """
("foreach" body line 2)
invoked from within
"foreach user $users {
set medical_needs [db_string "get_medical_issues" "select allergies from person_info where person_id =[ns_set get $user user_id..."
("uplevel" body line 64)
invoked from within
"uplevel {
ad_page_contract {

Mark attendance for a given attendance task

@author mailto:hamilton.chua@gmail.com
@creation-date May ..."
(procedure "code::tcl::/var/www/oacs/packages/attendance/www/admin/mark" line 2)
invoked from within
"code::tcl::$__adp_stub"
invoked from within
"if { [file exists $__adp_stub.tcl] } {

# ensure that data source preparation procedure exists and is up-to-date
adp_init tcl $__adp_stub
..."
("uplevel" body line 3)
invoked from within
"uplevel {

if { [file exists $__adp_stub.tcl] } {

# ensure that data source preparation procedure exists and is up-to-date
adp_init t..."
(procedure "adp_prepare" line 2)
invoked from within
"adp_prepare "
(procedure "template::adp_parse" line 30)
invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
(procedure "adp_parse_ad_conn_file" line 5)
invoked from within
"$handler"
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
$handler
} ad_script_abort val {
# do nothing
}"
invoked from within
"rp_serve_concrete_file [ad_conn file]"
(procedure "rp_serve_abstract_file" line 60)
invoked from within
"rp_serve_abstract_file "$root/$path""
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
rp_serve_abstract_file "$root/$path"
set tcl_url2file([ad_conn url]) [ad_conn file]
set tcl_url2path_info..."

Collapse
Posted by Hamilton Chua on
Please checkout the latest copy of the attendance package from cvs.

There was a minor dependency to the dotlrn-ecommerce package that I had to remove.

Let me know if the modifications have fixed your problem.

Collapse
Posted by Al Guyer on
Hello,

Hamilton, Thank you for working on attendance! First off, just so you know, this is a development server. I am the only user, I am still in the process of researching whether dotLRN/OpenACS will work for my organization(s). So, I plan to fix the problems I ran in to below, by just wiping the server and starting over. Which, is currently perfectly acceptable. Eventually, though, once I go into production, that will definately NOT be acceptable! So, my questions are merely fact finding on how an administrator such as myself should have properly managed an update. Here goes:

In applying the update, I thought it would be best to uninstall attendance, and then re-install it. That was probably the wrong approach... Upon attempting to un-install,
I received this error:

Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR: cr_fldr_pkg_id_fk referential integrity violation - key in apm_packages still referenced from cr_folders

SQL:
select apm_package__delete('2801');

Which makes sense because attendance, and dotlrn-attendance were added to a class under "mangage applets" in the class control panel. The server is now kinda wedged though... The APM thinks the packages are installed. (I also tried to un-install dotlrn-attendance, and received the same type of error) but they no longer show up under "Manage Applets" for the class, but the applets are apparently bound to a class, so I can't un-install them.

This behavior all makes sense, having to due with referential integrity in the DB and all. But, as an administrator, if this were actually a live, production site, I'd be in a world of hurt.

It doesn't appear to be a way to remove attendance, dotLRN-attendance, or really, any managed applet from a class. In fact, they say "(cannot be removed)".

Is this a dotLRN or OpenACS design issue, or is it just my level of knowledge in the product?

As always, I really apprecitate the work done, and the help received from this community. Thanks in advance for your input,

-al

Collapse
Posted by Al Guyer on
To answer my own question, stopping the website, and vacuuming the db removed attendance, and dotlrn-attendance from the db; in that they are no longer listed by the apm as installed. Now I can just re-install them...
Collapse
Posted by Al Guyer on
I was able to un-install and then re-install attendance, but not dotlrn-attendance. I archived the classes, hoping maybe that would remove the referential integrity violation, but that didn't seem to work. Any ideas?

Deleting dotlrn-attendance...The database returned the following error message

Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.") ERROR: dotlrn_applets_package_key_fk referential integrity violation - key in apm_package_types still referenced from dotlrn_applets SQL: select apm_package_type__drop_type( 'dotlrn-attendance', 't' );

Collapse
Posted by Al Guyer on
Hello Hamilton,

From a fresh install, attendance, and dotlrn-attendance appear to work just fine now.

Thank you!

-al