Forum OpenACS Q&A: New survey system

Collapse
Posted by Malte Sussdorff on
I took the liberty of uploading the new survey system to contrib and included an (yet untested) upgrade script for Oracle. This is the HEAD version, if anyone wants, I can upload the 4-6-3 version as well.

The survey system is v0.2 and is a considerable improvement with a couple of bugfixes compared to the original version currently in packages.

So why not move it to packages ?

- No upgrade script for postgres
- Not internationalized

The first item should be easy, the second one most likely a worker bee task.

What I'm wondering now: What is more important, Internationalization or bug-fixes and feature enhancements?

OTOH, it can linger around in contrib indefinitly ;).

Collapse
2: Re: New survey system (response to 1)
Posted by Caroline Meeks on
I am considering using the question catalog feature of this survey package to oollect information including address information such as "State".  Has ayone done that previously or have any examples of how to use existing widgets?

thanks

Collapse
3: Re: New survey system (response to 1)
Posted by Don Baccus on
Well, we want this to replace the simple survey package before long, right?  So I'd think the prioritization should be working upgrade scripts, internationalization, and bug fixes unless there are enhancements that are crucial in the near term.
Collapse
4: Re: New survey system (response to 3)
Posted by Caroline Meeks on
Actually my priority today is launching a simple site that happens to include asking a users for a variety of information including what state they are in. I don't get paid for the job till it launches. :)

My question is really to Malte and the AISEC guys to see if they happen to have already done this but I figured I'd ask on the board incase someone else had done it or someone else wants to.

But yes Don, we definitely want to replace simple survey with this package and Don your priorities are good ones.

I would encourage anyone who wants to do anything interesting with survey/polls/assessments/testing to use the contrib survey. Such people should also be aware that there is an active group continueing to develop survey for both dotLRN and nondotLRN uses and that development priorities are being driven by specific client needs. Participation is more then welcome.

There is extensive documentation on the "assessment" project here.

https://openacs.org/projects/openacs/packages/assessment/index

Collapse
5: Re: New survey system (response to 2)
Posted by Denis Roy on
We are not using the survey package for collecting address info or anything like that on a site-wide level for AIESEC. The package is just installed and for use in any community so I guess we can't help out here.
Collapse
6: Re: New survey system (response to 4)
Posted by Malte Sussdorff on
Greenpeace international is using the survey system within it's user-register system (still in need of cleaning up), for collecting data about the users when they register to a mailing list (but could be used anywhere). For this you can use the predefined database questions, that will store the result not only in the survey system but also in the database table (e.g for changing first_name and last_name on the same page as state, gender, you name it).

The assessment project will keep this ability of the current (complex/contrib) survey system to act as a collection point of user data.

As for internationalization and bug-fixes. I internationalized the /contrib version (well, most of it), provided upgrade scripts (that someone should test please) and am curious if other people are using it as well.

Collapse
7: Re: New survey system (response to 1)
Posted by Nima Mazloumi on
Hi Malte,
when do you think will it be also available in dotLRN as a replacement for simple survey?
Greetings,
Nima
Collapse
8: Re: New survey system (response to 7)
Posted by Malte Sussdorff on
It will replace simple survey if:

a) Upgrade scripts work
b) Internationalization of all words is done (and a check has been made that the keys used in the complex survey version are the same as in the simple survey one)
c) .LRN portlet has been made to work.

What is the status

a) Someone has to test them with live data.
b) This is tedious work. I might be able to work on it during bug bash, but may not.
c) According to my knowledge this should not be an issue at all as nothing changed that would break the portlet. Again testing required.

Plan is to get this done by the end of next week, but I'm head over heels in work, therefore not sure if I will manage before feature freeze. It would be of tremendous help if someone could install a fresh .LRN installation with the new survey system and test if the portlet works. Steps involved:

- Checkout the code
- Remove /packages/survey
- Move /contrib/packages/survey to /packages/survey
- Install the system

Expected results:

- .LRN is installed without errors
- The .LRN survey portlet works as it did before.

With the current movement behind assessment this is only an intermediary solution for the next 6 months or so, which might explain the reluctance to do the aforementioned work (as assessment is bound to replace survey).

Collapse
9: Re: New survey system (response to 1)
Posted by Carl Robert Blesius on
In Heidelberg we need both the complex survey (soon to be renamed assessment) and a registration tool (a way to collect additional user information from users that register site-wide or on a group level before letting them in).

I know Sloan is getting ready to do additional work on the profiles package that Jeff wrote (which we hope we can collaborate on).

Anyone have any suggestions on how these two pieces might fit together (Profiles and the use of Survey to collect user data)?

In addition we have to display more information about users (based on collected data and contributions) on the profile page in OpenACS 4.x.

Collapse
10: Re: New survey system (response to 1)
Posted by Nima Mazloumi on
I will test the package right away. If you want I can also help out with the i18n.

Greetings to you all on the bug fest that I couldn't attend :(

Hopefully next time ;)

Collapse
11: Re: New survey system (response to 1)
Posted by Nima Mazloumi on
I created a new instance on

134.155.51.151:8443

user: nmazloum
passwd: test

But when I tried to add the survey portlet to the course Suvey Test I got the following:

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

ERROR:  acs_permissions_priv_fk referential integrity violation - key referenced from acs_permissions not found in acs_privileges

SQL:
                select acs_permission__grant_permission(
                    '2435',
                    '2243',
                    'survey_take_survey'
                );

    while executing
"ns_pg_bind 0or1row nsdb0 {
                select acs_permission__grant_permission(
                    :object_id,
                    :party_id,
  ..."
    ("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_statement_name $sql"
    invoked from within
"if {[regexp -nocase -- {^\s*select} $test_sql match]} {
                ns_log Debug "PLPGSQL: bypassed anon function"
                set selection [..."
    ("uplevel" body line 6)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle -dbn $dbn db {
            # plsql calls that are simple selects bypass the plpgsql
            # mechanism for creating anonymous fun..."
    (procedure "db_exec_plsql" line 57)
    invoked from within
"db_exec_plsql grant_permission {}"
    (procedure "permission::grant" line 3)
    invoked from within
"permission::grant -party_id $members -object_id $package_id -privilege survey_take_survey"
    (procedure "dotlrn_survey::add_applet_to_community" line 32)
    invoked from within
"dotlrn_survey::add_applet_to_community $community_id"
    (procedure "AcsSc.dotlrn_applet.addapplettocommunity.dotlrn_survey" line 1)
    invoked from within
"AcsSc.dotlrn_applet.addapplettocommunity.dotlrn_survey 2124"
    ("uplevel" body line 1)
    invoked from within
"uplevel $func_and_args"
    (procedure "apply" line 3)
    invoked from within
"apply $proc_name $arguments"
    (procedure "acs_sc_call" line 6)
    invoked from within
"acs_sc_call dotlrn_applet $op $list_args $applet_key"
    (procedure "applet_call" line 2)
    invoked from within
"applet_call  $applet_key  AddAppletToCommunity  [list $community_id]"
    invoked from within
"set package_id [applet_call  $applet_key  AddAppletToCommunity  [list $community_id]]"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $transaction_code "
    (procedure "db_transaction" line 1)
    invoked from within
"db_transaction {
            set package_id [applet_call  $applet_key  AddAppletToCommunity  [list $community_id]]

            register_a..."
    (procedure "dotlrn_community::add_applet_to_community" line 2)
    invoked from within
"dotlrn_community::add_applet_to_community $community_id $applet_key"
    ("uplevel" body line 39)
    invoked from within
"uplevel {
          #
#  Copyright (C) 2001, 2002 MIT
#
#  This file is part of dotLRN.
#
#  dotLRN is free software; you can redistribute it and/or modi..."
    (procedure "code::tcl::/www/unima1/packages/dotlrn/www/applet-add" 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 7)
    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([ad_conn url]) [ad_conn path_inf..."

Collapse
12: Re: New survey system (response to 1)
Posted by Nima Mazloumi on
sorry.. user is nmazloum @ unimannheim.de
Collapse
13: Re: New survey system (response to 11)
Posted by Caroline Meeks on
The new complex survey does not create its own permissions. It uses Read and Write.

It looks to me like you want to grep for 'Survey_take_survey' and change that to 'write'.

Collapse
14: Re: New survey system (response to 1)
Posted by Nima Mazloumi on
I changed the privilege to write created a fresh dotlrn installation and tried to add the survey package to a class. Here is the error:

Request Error
No value specified for argument package_key
    while executing
"instantiate_and_mount__arg_parser"
    (procedure "dotlrn::instantiate_and_mount" line 1)
    invoked from within
"dotlrn::instantiate_and_mount \
"
    (procedure "dotlrn_survey::add_applet_to_community" line 3)
    invoked from within
"dotlrn_survey::add_applet_to_community $community_id"
    (procedure "AcsSc.dotlrn_applet.addapplettocommunity.dotlrn_survey" line 1)
    invoked from within
"AcsSc.dotlrn_applet.addapplettocommunity.dotlrn_survey 2055"
    ("uplevel" body line 1)
    invoked from within
"uplevel $func_and_args"
    (procedure "apply" line 3)
    invoked from within
"apply $proc_name $arguments"
    (procedure "acs_sc_call" line 6)
    invoked from within
"acs_sc_call dotlrn_applet $op $list_args $applet_key"
    (procedure "applet_call" line 2)
    invoked from within
"applet_call  $applet_key  AddAppletToCommunity  [list $community_id]"
    invoked from within
"set package_id [applet_call  $applet_key  AddAppletToCommunity  [list $community_id]]"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $transaction_code "
    (procedure "db_transaction" line 1)
    invoked from within
"db_transaction {
            set package_id [applet_call  $applet_key  AddAppletToCommunity  [list $community_id]]

            register_a..."
    (procedure "dotlrn_community::add_applet_to_community" line 2)
    invoked from within
"dotlrn_community::add_applet_to_community $community_id $applet_key"
    ("uplevel" body line 39)
    invoked from within
"uplevel {
          #
#  Copyright (C) 2001, 2002 MIT
#
#  This file is part of dotLRN.
#
#  dotLRN is free software; you can redistribute it and/or modi..."
    (procedure "code::tcl::/www/unima1/packages/dotlrn/www/applet-add" 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 7)
    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([ad_conn url]) [ad_conn path_inf..."

Collapse
15: Re: New survey system (response to 10)
Posted by Malte Sussdorff on
Hi Nima,

great to hear you are on it. I have finished and committed i18n the package. Please check it out (again). As for your bugs, I will look at them once I'm back in Hamburg (tomorrow).