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
16ad5953
Commit
16ad5953
authored
Feb 09, 2009
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Merged diff from V3.3
parent
34dcf76c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
question-swap.tcl
www/admin/question-swap.tcl
+8
-6
process-response.tcl
www/process-response.tcl
+0
-2
No files found.
www/admin/question-swap.tcl
View file @
16ad5953
...
...
@@ -22,15 +22,17 @@ ad_require_permission $survey_id survsimp_modify_survey
set
next_sort_key
[
expr
{
$sort
_key - 1
}]
db_transaction
{
db_dml swap_sort_keys
"update survsimp_questions
set sort_key = decode(sort_key, :sort_key, :next_sort_key, :next_sort_key, :sort_key)
where survey_id = :survey_id
and sort_key in (:sort_key, :next_sort_key)"
ad_returnredirect
"one?
[
export_url_vars survey_id
]
"
db_dml swap_sort_keys
"
update survsimp_questions
set sort_key = decode(sort_key, :sort_key, :next_sort_key, :next_sort_key, :sort_key)
where survey_id = :survey_id and sort_key in (:sort_key, :next_sort_key)
"
ad_returnredirect
"one?
[
export_url_vars survey_id
]
"
}
on_error
{
ad_return_error
"Database error"
"A database error occured while trying
to swap your questions. Here's the error:
<pre>
...
...
www/process-response.tcl
View file @
16ad5953
...
...
@@ -14,13 +14,11 @@ ad_page_contract {
@creation-date 28th September 2000
@cvs-id $Id$
}
{
survey_id:integer,notnull
{
related_object_id:integer
""
}
{
related_context_id:integer
""
}
return_url:optional
response_to_question:array,optional,multiple,html
}
-validate
{
survey_exists -requires
{
survey_id
}
{
...
...
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