Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
simple-survey
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
simple-survey
Commits
f8444719
Commit
f8444719
authored
Sep 16, 2015
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Simple Survey:
Added functionality to edit an existing reply independent of the creation user
parent
584074d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
27 deletions
+23
-27
edit-logic-2.tcl
www/admin/edit-logic-2.tcl
+6
-6
edit-logic.tcl
www/admin/edit-logic.tcl
+8
-7
survey-create-2.tcl
www/admin/survey-create-2.tcl
+9
-14
No files found.
www/admin/edit-logic-2.tcl
View file @
f8444719
...
...
@@ -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"
www/admin/edit-logic.tcl
View file @
f8444719
...
...
@@ -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
\"
>
...
...
www/admin/survey-create-2.tcl
View file @
f8444719
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment