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
bb2d9d96
Commit
bb2d9d96
authored
Nov 23, 2015
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Gustaf changes
parent
aaa8a3a0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
32 deletions
+32
-32
intranet-simple-survey-procs.tcl
tcl/intranet-simple-survey-procs.tcl
+5
-5
index.adp
www/admin/index.adp
+2
-2
index.tcl
www/admin/index.tcl
+4
-4
one-response.adp
www/one-response.adp
+5
-5
one-response.tcl
www/one-response.tcl
+2
-2
project-reports.adp
www/reporting/project-reports.adp
+6
-6
project-reports.tcl
www/reporting/project-reports.tcl
+3
-3
survsimp-results.tcl
www/reporting/survsimp-results.tcl
+5
-5
No files found.
tcl/intranet-simple-survey-procs.tcl
View file @
bb2d9d96
...
...
@@ -91,7 +91,7 @@ ad_proc im_survsimp_component { object_id } {
set som_gif
""
if
{
""
!=
$som
_note
}
{
set
som_gif
[
im_gif -translate_p 0 help
$som
_note
]}
append survsimp_html
"
<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)>
<tr
$bgcolor
(
[
expr
{
$ctr
% 2
}
]
)>
<td><a href=
\"
$survey
_url?survey_id=
$survey
_id
\"
>
$short
_name</a></td>
<td>
$som
_name
$som
_gif</td>
</tr>
...
...
@@ -200,12 +200,12 @@ ad_proc im_survsimp_component { object_id } {
order by sort_key
"
append survsimp_response_html
"
<tr
$bgcolor
(
[
expr
$response
_ctr % 2
]
)>
<td
$bgcolor
(
[
expr
$response
_ctr % 2
]
)>
<tr
$bgcolor
(
[
expr
{
$response
_ctr % 2
}
]
)>
<td
$bgcolor
(
[
expr
{
$response
_ctr % 2
}
]
)>
<a href=
[
export_vars -base
"/intranet/users/view"
{{
user_id
$creation
_user_id
}}]
>
$creation
_user_name</a>
</td>
<td
$bgcolor
(
[
expr
$response
_ctr % 2
]
)>
<td
$bgcolor
(
[
expr
{
$response
_ctr % 2
}
]
)>
<a href=
\"
$related
_context_url
$related
_context_id
\"
>
$related
_context_name</a>
</td>
...
...
@@ -213,7 +213,7 @@ ad_proc im_survsimp_component { object_id } {
db_foreach q
$questions
_sql
{
if
{[
string
length
$clob
_answer
]
==
$max
_clob_len
}
{
append clob_answer
" ..."
}
append survsimp_response_html
"
<td
$bgcolor
(
[
expr
$response
_ctr % 2
]
)>
<td
$bgcolor
(
[
expr
{
$response
_ctr % 2
}
]
)>
$choice
$boolean
_answer
$clob
_answer
$number
_answer
$varchar
_answer
$date
_answer
</td>
"
...
...
www/admin/index.adp
View file @
bb2d9d96
<master>
<property name="context">@context_bar@</property>
<property name="
title">@page_title
@</property>
<property name="context">@context_bar
;literal
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="admin_navbar_label">admin_dynfield</property>
<h3>Global Survey Permissions</h3>
...
...
www/admin/index.tcl
View file @
bb2d9d96
...
...
@@ -17,7 +17,7 @@ ad_page_contract {
# Defaults & Security
# ------------------------------------------------------
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
set
user_is_admin_p
[
im_is_user_site_wide_or_intranet_admin
$user
_id
]
if
{
!$user_is_admin_p
}
{
...
...
@@ -147,7 +147,7 @@ set ctr 0
set
old_package_name
""
db_foreach survsimp_query
$survsimp
_sql
{
incr ctr
append table
"
\n
<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)>
\n
"
append table
"
\n
<tr
$bgcolor
(
[
expr
{
$ctr
% 2
}
]
)>
\n
"
append table
"
<td>
<A href=
[
export_vars -base
$survsimp
_admin_url
{
survey_id return_url
}]
>
...
...
@@ -165,11 +165,11 @@ db_foreach survsimp_query $survsimp_sql {
set action
"add_readable"
set letter
"r"
if
{
$read
_p ==
"t"
}
{
set read
"<A href=
$toggle
_url?object_id=
$survey
_id&action=remove_readable&
[
export_vars
-url
{
horiz_group_id return_url
}]
><b>R</b></A>
\n
"
set read
"<A href=
$toggle
_url?object_id=
$survey
_id&action=remove_readable&
[
export_vars
{
horiz_group_id return_url
}]
><b>R</b></A>
\n
"
set action
"remove_readable"
set letter
"<b>R</b>"
}
set read
"<A href=
$toggle
_url?
[
export_vars -
url
{
horiz_group_id object_id action return_url
}]
>
$letter
</A>
\n
"
set read
"<A href=
[
export_vars -base
$toggle
_
url
{
horiz_group_id object_id action return_url
}]
>
$letter
</A>
\n
"
append table
"
<td align=center>
...
...
www/one-response.adp
View file @
bb2d9d96
<master>
<property name="
title">@page_title
@</property>
<property name="main_navbar_label">@main_navbar_label@</property>
<property name="sub_navbar">@sub_navbar;
noquote
@</property>
<property name="left_navbar">@left_navbar_html;
noquote
@</property>
<property name="show_context_help">@show_context_help_p;
noquote
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="main_navbar_label">@main_navbar_label
;literal
@</property>
<property name="sub_navbar">@sub_navbar;
literal
@</property>
<property name="left_navbar">@left_navbar_html;
literal
@</property>
<property name="show_context_help">@show_context_help_p;
literal
@</property>
@html;noquote@
www/one-response.tcl
View file @
bb2d9d96
...
...
@@ -13,7 +13,7 @@ ad_page_contract {
response_id:integer
}
set current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set current_user_id
[
a
uth::require_logi
n
]
# -----------------------------------------------------------------
# Basic survey information and security
...
...
@@ -47,7 +47,7 @@ if {"" == $related_object_id} {
# This is a survey response not related to a ]po
[
# object, so use the standard SurvSimp permissions:
ad_require_permission
$survey
_id
survsimp_admin_survey
permission::require_permission -object_id
$survey
_id -privilege
survsimp_admin_survey
}
else
{
...
...
www/reporting/project-reports.adp
View file @
bb2d9d96
<master>
<property name="
title">@page_title
@</property>
<property name="main_navbar_label">@main_navbar_label@</property>
<property name="sub_navbar">@sub_navbar;
noquote
@</property>
<property name="left_navbar">@left_navbar_html;
noquote
@</property>
<property name="show_context_help">@show_context_help_p;
noquote
@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="main_navbar_label">@main_navbar_label
;literal
@</property>
<property name="sub_navbar">@sub_navbar;
literal
@</property>
<property name="left_navbar">@left_navbar_html;
literal
@</property>
<property name="show_context_help">@show_context_help_p;
literal
@</property>
<table>
<tr valign=
top
>
<tr valign=
"top"
>
<td>
@html;noquote@
</td>
...
...
www/reporting/project-reports.tcl
View file @
bb2d9d96
...
...
@@ -31,14 +31,14 @@ ad_page_contract {
# ---------------------------------------------------------------
set
menu_label
"reporting_survsimp_results"
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
read_p
[
db_string report_perms
"
select im_object_permission_p(m.menu_id, :current_user_id, 'read')
from im_menus m
where m.label = :menu_label
"
-default 'f'
]
set
read_p
"t"
if
{
!
[
string
equal
"t"
$read
_p
]
}
{
if
{
"t"
ne
$read
_p
}
{
ad_return_complaint 1
"<li>
[
lang::message::lookup
""
intranet-reporting.You_dont_have_permissions
"You don't have the necessary permissions to view this page"
]
"
return
...
...
@@ -321,7 +321,7 @@ foreach project_tuple $left_dim {
set type_id
[
lindex
$project
_tuple 4
]
set type
[
lindex
$project
_tuple 5
]
set row_html
"<tr
$bgcolor
(
[
expr
$ctr
% 2
]
)><td><a href='
$project
_url
$project
_id'>
$project
_name</a></td>
\n
"
set row_html
"<tr
$bgcolor
(
[
expr
{
$ctr
% 2
}
]
)><td><a href='
$project
_url
$project
_id'>
$project
_name</a></td>
\n
"
foreach date_tuple
$top
_dim
{
set monday_julian
[
lindex
$date
_tuple 0
]
...
...
www/reporting/survsimp-results.tcl
View file @
bb2d9d96
...
...
@@ -22,13 +22,13 @@ ad_page_contract {
# ------------------------------------------------------------
set
menu_label
"reporting_survsimp_results"
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
read_p
[
db_string report_perms
"
select im_object_permission_p(m.menu_id, :current_user_id, 'read')
from im_menus m
where m.label = :menu_label
"
-default 'f'
]
if
{
!
[
string
equal
"t"
$read
_p
]
}
{
if
{
"t"
ne
$read
_p
}
{
ad_return_complaint 1
"<li>
[
lang::message::lookup
""
intranet-reporting.You_dont_have_permissions
"You don't have the necessary permissions to view this page"
]
"
return
...
...
@@ -102,16 +102,16 @@ if {[info exists evaluee_id] && 0 != $evaluee_id && "" != $evaluee_id} {
lappend criteria
"h.user_id = :evaluee_id"
}
if
{
[
exists_and_not_null start_date
]
}
{
if
{
([
info
exists start_date
]
&&
$start
_date ne
""
)
}
{
lappend criteria
"ro.creation_date >= :start_date::timestamptz"
}
if
{
[
exists_and_not_null end_date
]
}
{
if
{
([
info
exists end_date
]
&&
$end
_date ne
""
)
}
{
lappend criteria
"ro.creation_date <= :end_date::timestamptz"
}
set
where_clause
[
join
$criteria
" and
\n
"
]
if
{
!
[
empty_string_p
$where
_clause
]
}
{
if
{
$where
_clause ne
""
}
{
set where_clause
" and
$where
_clause"
}
...
...
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