Merge branch 'master' into survey

* master: (127 commits)
  Prefill in the email address in the ITransact credentials form from the user's Shop address.
  fixed Matrix best/worst rated lists
  Fix bad form variable for phone number in EMS Badge address info.
  - Added a switch to allow the use of non-WebGUI objects with the Workflow
  fixing a problem with previous survey fix
  fixed #9671: Survey - breaks admin bar
  fixed a Matrix sql problem
  i18n the image labels and title for the asset manager, manage screen.
  Prevent an imported package from changing the a current asset's status from pending to anything else.
  Remove trailing comma in Shop/Transaction JS so IE6 works.
  fixed documentation
  fixed a bug when a matrix listing didn't have a forum attached
  small char encoding fix to merged upgrade
  fix small issue in addChild
  adding merge point
  Fix a problem with purging an EMS.
  Update this template so that it passes the template i18n test.
  Fix a broken i18n label in answer edit template for the Survey.
  Unify all Survey CSS into 1 file, and use it.
  Adding/fixing Survey i18n and Help
  ...

Conflicts:
	lib/WebGUI/Asset/Wobject/Survey.pm
	lib/WebGUI/Asset/Wobject/Survey/ResponseJSON.pm
	lib/WebGUI/i18n/English/Asset_Survey.pm
	www/extras/wobject/Survey/editsurvey/object.js
This commit is contained in:
Patrick Donelan 2009-02-10 07:57:42 +00:00
commit b0c5c09461
127 changed files with 5481 additions and 677 deletions

View file

@ -1253,6 +1253,25 @@ sub question {
return $self->sections->[ $address->[0] ]->{questions}->[ $address->[1] ];
}
#-------------------------------------------------------------------
=head2 questionCount (){
Return the total number of questions in this survey.
=cut
sub questionCount {
my $self = shift;
my $count;
for ( my $s = 0; $s <= $#{ $self->sections() }; $s++ ) {
$count = $count + scalar @{$self->questions( [$s] )};
}
return $count;
}
#-------------------------------------------------------------------
=head2 answers ($address)
Return a reference to all answers from a particular question.