Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-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
intranet-simple-survey
Commits
cfff5508
Commit
cfff5508
authored
Nov 28, 2007
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fixed survey component - colspan
parent
23b0f914
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
intranet-simple-survey-procs.tcl
tcl/intranet-simple-survey-procs.tcl
+12
-9
No files found.
tcl/intranet-simple-survey-procs.tcl
View file @
cfff5508
...
...
@@ -43,6 +43,8 @@ ad_proc im_survsimp_component { object_id } {
set bgcolor
(
1
)
"class=rowodd"
set survey_url
"/simple-survey/one"
set max_header_len
[
parameter::get_from_package_key -package_key
"intranet-simple-survey"
-parameter
"MaxTableHeaderLen"
-default 12
]
set current_user_id
[
ad_get_user_id
]
# Get information about object type
...
...
@@ -123,6 +125,7 @@ ad_proc im_survsimp_component { object_id } {
set survsimp_response_html
""
set old_survey_id 0
set response_ctr 0
set colspan 0
db_foreach survsimp_responses
$survsimp
_responses_sql
{
# Create new headers for new surveys
...
...
@@ -131,23 +134,23 @@ ad_proc im_survsimp_component { object_id } {
# Close the last table
append survsimp_response_html
"</table>
\n
"
}
append survsimp_response_html
"
<table>
<tr class=rowtitle><td class=rowtitle colspan=2>
$name
</td></tr>
"
set questions_sql
"
select substring(question_text for
20
) as question_text
select substring(question_text for
$max
_header_len
) as question_text
from survsimp_questions
where survey_id = :survey_id
order by sort_key
"
append survsimp_response_html
"<tr class=rowtitle>
\n
"
append survey_header
"<tr class=rowtitle>
\n
"
set colspan 0
db_foreach q
$questions
_sql
{
if
{[
string
length
$question
_text
]
== 20
}
{
append question_text
"..."
}
append survsimp_response_html
"<td class=rowtitle>
$question
_text</td>
\n
"
if
{[
string
length
$question
_text
]
==
$max
_header_len
}
{
append question_text
"..."
}
append survey_header
"<td class=rowtitle>
$question
_text</td>
\n
"
incr colspan
}
append survsimp_response_html
"</tr>
\n
"
append survey_header
"</tr>
\n
"
append survsimp_response_html
"<table><tr class=rowtitle><td class=rowtitle colspan=
$colspan
>
$name
</td></tr>"
append survsimp_response_html
$survey
_header
set old_survey_id
$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