dokeos-survey
[ class tree: dokeos-survey ] [ index: dokeos-survey ] [ all elements ]

Procedural File: reporting.php

Source Location: /main/survey/reporting.php



Page Details:



Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts of the code
author:  unknown, the initial survey that did not make it in 1.8 because of bad code
version:  $Id: reporting.php 12586 2007-06-12 13:39:57Z elixir_julian $
todo:  The question has to be more clearly indicated (same style as when filling the survey)


Includes:

require('../inc/global.inc.php') [line 33]


Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts of the code
author:  unknown, the initial survey that did not make it in 1.8 because of bad code
version:  $Id: reporting.php 12586 2007-06-12 13:39:57Z elixir_julian $
todo:  The question has to be more clearly indicated (same style as when filling the survey)
require_once(api_get_path(LIBRARY_PATH)."/course.lib.php") [line 72]
require_once('survey.lib.php') [line 71]


Tags:

todo:  use export_table_csv($data, $filename = 'export')






check_parameters [line 158]

the check_parameters( )

This function checks the parameters that are used in this page



Tags:

return:  header, an error and the footer if any parameter fails, else it returns true
author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
version:  February 2007


[ Top ]



comparative_check [line 1156]

integer comparative_check( array $answers_x, array $answers_y, integer $option_x, integer $option_y, [ $value_x = 0], [ $value_y = 0])

count the number of users who answer positively on both options



Tags:

return:  the number of users who have answered positively on both options
author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
version:  February 2007


Parameters

array   $answers_x   all the answers of the x axis
array   $answers_y   all the answers of the y axis
integer   $option_x   the x axis value (= the option_id of the first question)
integer   $option_y   the y axis value (= the option_id of the second question)
   $value_x  
   $value_y  
[ Top ]



display_comparative_report [line 917]

html display_comparative_report( )

This function displays the comparative report which allows you to compare two questions A comparative report creates a table where one question is on the x axis and a second question is on the y axis.

In the intersection is the number of people who have answerd positive on both options.




Tags:

return:  code
author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
version:  February 2007


[ Top ]



display_complete_report [line 618]

html display_complete_report( )

This functions displays the complete reporting



Tags:

return:  code
author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
version:  February 2007
todo:  open questions are not in the complete report yet.


[ Top ]



display_complete_report_row [line 741]

void display_complete_report_row( array $possible_answers, array $answers_of_user, string $user)

This function displays a row (= a user and his/her answers) in the table of the complete report.



Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
version:  February 2007
todo:  rename $possible_answers to $possible_options ?


Parameters

array   $possible_answers   all the possible options
array   $answers_of_user   the answers of the user
string   $user   the user
[ Top ]



display_question_report [line 375]

html display_question_report( array $survey_data)

This function displays the report by question.

It displays a table with all the options of the question and the number of users who have answered positively on the option. The number of users who answered positive on a given option is expressed in an absolute number, in a percentage of the total and graphically using bars By clicking on the absolute number you get a list with the persons who have answered this. You can then click on the name of the person and you will then go to the report by user where you see all the answers of that user.




Tags:

return:  code that displays the report by question
author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
version:  February 2007
todo:  allow switching between horizontal and vertical.
todo:  multiple response: percentage are probably not OK
todo:  the question and option text have to be shortened and should expand when the user clicks on it.
todo:  the pagebreak and comment question types should not be shown => removed from $survey_data before


Parameters

array   $survey_data   all the data of the survey
[ Top ]



display_question_report_score [line 533]

void display_question_report_score( $survey_data, $question, $offset)



Parameters

   $survey_data  
   $question  
   $offset  
[ Top ]



display_user_report [line 258]

html display_user_report( )

This function displays the user report which is basically nothing more than a one-page display of all the questions of the survey that is filled with the answers of the person who filled the survey.



Tags:

return:  code of the one-page survey with the answers of the selected user
author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
version:  February 2007


[ Top ]



export_complete_report [line 790]

string export_complete_report( )

the function is quite similar to display_complete_report and return a html string that can be used in a csv file



Tags:

return:  the content of a csv file
author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
version:  February 2007
todo:  consider merging this function with display_complete_report


[ Top ]



export_complete_report_row [line 888]

string export_complete_report_row( array $possible_answers, array $answers_of_user, string $user)

add a line to the csv file



Tags:

return:  line of the csv file
author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
version:  February 2007
todo:  rename $possible_answers to $possible_options ?


Parameters

array   $possible_answers   all the possible answers
array   $answers_of_user   the answers of the user
string   $user   the user
[ Top ]



get_answers_of_question_by_user [line 1116]

array get_answers_of_question_by_user( integer $survey_id, integer $question_id)

get all the answers of a question grouped by user



Tags:

return:  an array countaining all the answers of all the users grouped by user
author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
version:  February 2007


Parameters

integer   $survey_id   the id of the survey
integer   $question_id   the id of the question
[ Top ]



handle_reporting_actions [line 214]

void handle_reporting_actions( )

This function deals with the action handling



Tags:

author:  Patrick Cool <patrick.cool@UGent.be>, Ghent University
version:  February 2007


[ Top ]



Documentation generated on Wed, 05 Sep 2007 06:15:04 +0200 by phpDocumentor 1.4.0