Commit f8444719 authored by Frank Bergmann's avatar Frank Bergmann

- Simple Survey:

  Added functionality to edit an existing reply independent
  of the creation user
parent 584074d6
......@@ -10,19 +10,19 @@ ad_page_contract {
@creation-date September 14, 2000
@cvs-id $Id$
} {
logic_id:integer,notnull
survey_id:integer,notnull
logic:allhtml,notnull
}
ad_require_permission $survey_id survsimp_modify_survey
db_dml update_logic "update survsimp_logic
set logic = empty_clob()
where logic_id = :logic_id
returning logic into :1" -clobs [list $logic]
db_dml update_logic "
update survsimp_logic
set logic = empty_clob()
where logic_id = :logic_id
returning logic into :1
" -clobs [list $logic]
db_release_unused_handles
ad_returnredirect "one?survey_id=$survey_id"
......@@ -29,20 +29,21 @@ if { $exception_count > 0 } {
}
# get the existing logic
set survey_name [db_string set_survey_name "select name from survsimp_surveys where survey_id = :survey_id"]
db_1row get_logic "select logic, survsimp_logic.logic_id from survsimp_logic, survsimp_logic_surveys_map
where survsimp_logic.logic_id = survsimp_logic_surveys_map.logic_id
and survey_id = :survey_id"
db_1row get_logic "
select logic,
survsimp_logic.logic_id
from survsimp_logic,
survsimp_logic_surveys_map
where survsimp_logic.logic_id = survsimp_logic_surveys_map.logic_id and
survey_id = :survey_id
"
db_release_unused_handles
doc_return 200 text/html "[ad_header "Edit Survey Logic"]
<h2>$survey_name</h2>
[ad_context_bar [list "./" "Simple Survey Admin"] [list "one?[export_url_vars survey_id]" "Administer Survey"] "Edit Logic"]
<hr>
<form method=post action=\"edit-logic-2\">
......
......@@ -15,17 +15,15 @@ ad_page_contract {
@cvs-id $Id$
} {
survey_id:integer,optional
name
description:allhtml
desc_html
{checked_p "f"}
type:notnull
{display_type "list"}
{variable_names ""}
{logic:allhtml ""}
survey_id:integer,optional
name
description:allhtml
desc_html
{checked_p "f"}
type:notnull
{display_type "list"}
{variable_names ""}
{logic:allhtml ""}
}
set package_id [ad_conn package_id]
......@@ -134,9 +132,6 @@ if {$checked_p == "f"} {
}
set logic_id [db_string next_logic_id "select survsimp_logic_id_sequence.nextval from dual"]
### added to support postgresql
### oracle query also edited
db_dml add_logic "insert into survsimp_logic
(logic_id, logic)
values
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment