Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ethikis_survey_export_results
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le Filament
Ethikis
ethikis_survey_export_results
Commits
0e714d52
Commit
0e714d52
authored
4 years ago
by
Juliana
Browse files
Options
Downloads
Patches
Plain Diff
Change export reponses sort
parent
241ba87c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
models/ethikis_survey_export.py
+6
-2
6 additions, 2 deletions
models/ethikis_survey_export.py
with
6 additions
and
2 deletions
models/ethikis_survey_export.py
+
6
−
2
View file @
0e714d52
...
...
@@ -13,9 +13,13 @@ class Survey(models.Model):
workbook
=
xlwt
.
Workbook
()
worksheet
=
workbook
.
add_sheet
(
filename_
)
question_append_ids
=
survey
.
env
[
'
survey.question
'
]
question_ids
=
[]
page_ids
=
survey
.
page_ids
.
mapped
(
'
id
'
)
# pages du questionnaire
question_ids
=
survey
.
env
[
'
survey.question
'
].
search
([(
'
page_id
'
,
'
in
'
,
page_ids
)])
# questions
for
page
in
page_ids
:
question_append_ids
=
survey
.
env
[
'
survey.question
'
].
search
([(
'
page_id
'
,
'
=
'
,
page
)],
order
=
"
sequence asc
"
)
# questions
question_ids
+=
question_append_ids
columns
=
[]
for
question_id
in
question_ids
:
columns
.
append
(
question_id
.
question
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment