Forum OpenACS Q&A: Re: New survey system

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
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'.