Module mod_survey

Survey module.

Copyright © 2010-2012 Marc Worrell

Authors: Marc Worrell (marc@worrell.nl).

Description

Survey module. Define surveys and let people fill them in.

Function Index

collect_answers/3Collect all answers, report any missing answers.
do_submit/4Collect all answers per question, save to the database.
event/2
get_page/3
go_button_target/4
manage_schema/2Schema for mod_survey lives in separate module.
module_name/1
observe_admin_edit_blocks/3Append the possible blocks for a survey's edit page.
observe_admin_rscform/3Redo the page jumps into correct page break blocks.
observe_export_resource_data/2Fetch all ids making up the export, handles collections and search queries.
observe_export_resource_filename/2Fetch the filename for the export.
observe_export_resource_header/2Fetch the header for the survey download.
observe_rsc_merge/2Rename the answers of the loser to the winner.
observe_survey_is_submit/2Check if the given block is a survey question with submit button.
render_next_page/7Fetch the next page from the survey, update the page view.

Function Details

collect_answers/3

collect_answers(Qs::list(), Answers::proplist(), Context) -> {AnswerList, MissingNames}

Collect all answers, report any missing answers.

do_submit/4

do_submit(SurveyId, Questions, Answers, Context) -> any()

Collect all answers per question, save to the database.

event/2

event(Postback, Context) -> any()

get_page/3

get_page(Id, Nr, Context) -> any()

go_button_target/4

go_button_target(Submitter, Questions, Answers, Context) -> any()

manage_schema/2

manage_schema(What, Context) -> any()

Schema for mod_survey lives in separate module

module_name/1

module_name(A) -> any()

observe_admin_edit_blocks/3

observe_admin_edit_blocks(Admin_edit_blocks, Menu, Context) -> any()

Append the possible blocks for a survey's edit page.

observe_admin_rscform/3

observe_admin_rscform(Admin_rscform, Post, Context) -> any()

Redo the page jumps into correct page break blocks

observe_export_resource_data/2

observe_export_resource_data(Export_resource_data, Context) -> any()

Fetch all ids making up the export, handles collections and search queries.

observe_export_resource_filename/2

observe_export_resource_filename(Export_resource_filename, Context) -> any()

Fetch the filename for the export

observe_export_resource_header/2

observe_export_resource_header(Export_resource_header, Context) -> any()

Fetch the header for the survey download

observe_rsc_merge/2

observe_rsc_merge(Rsc_merge, Context) -> any()

Rename the answers of the loser to the winner

observe_survey_is_submit/2

observe_survey_is_submit(Survey_is_submit, Context) -> any()

Check if the given block is a survey question with submit button

render_next_page/7

render_next_page(Id::integer(), PageNr::integer(), Direction::exact | forward, Answers::list(), History::list(), Editing::term() | undefined, Context::z:context()) -> #render{} | z:context()

Fetch the next page from the survey, update the page view


Generated by EDoc