diff --git a/lib/WebGUI/Asset/Wobject/Survey.pm b/lib/WebGUI/Asset/Wobject/Survey.pm index 55d370bb6..47f55e55c 100644 --- a/lib/WebGUI/Asset/Wobject/Survey.pm +++ b/lib/WebGUI/Asset/Wobject/Survey.pm @@ -677,6 +677,15 @@ sub www_editSurvey { return $self->processTemplate( {}, $self->get('surveyEditTemplateId') ); } +#------------------------------------------------------------------- + +=head2 getAdminConsole + +Extends the base class to add in survey controls like edit, view graph, run tests, and +test suite. + +=cut + sub getAdminConsole { my $self = shift; my $ac = $self->SUPER::getAdminConsole; @@ -2360,6 +2369,13 @@ sub www_exportTransposedResults { #------------------------------------------------------------------- +=head2 www_exportStructure + +Exports the surveyJSON as either HTML or a downloadable CSV file, based on the +C form variable. + +=cut + sub www_exportStructure { my $self = shift; @@ -2543,7 +2559,7 @@ sub www_editDefaultQuestions{ #------------------------------------------------------------------- -=head2 www_downloadDefaulQuestions +=head2 www_downloadDefaultQuestionTypes Sends the user a json file of the default question types, which can be imported to other WebGUI instances. diff --git a/lib/WebGUI/Asset/Wobject/Survey/Test.pm b/lib/WebGUI/Asset/Wobject/Survey/Test.pm index cd3abaef8..f4381bae6 100644 --- a/lib/WebGUI/Asset/Wobject/Survey/Test.pm +++ b/lib/WebGUI/Asset/Wobject/Survey/Test.pm @@ -757,6 +757,14 @@ END_WHY } +#------------------------------------------------------------------- + +=head2 pass + +Output TAP for a passing test. + +=cut + sub pass { my ($testCount, $name, $extra) = @_; my $out = $name ? "ok $testCount - $name" : "ok $testCount"; @@ -767,6 +775,14 @@ sub pass { return $out; } +#------------------------------------------------------------------- + +=head2 fail + +Output TAP for a failing test, along with diagnostics. + +=cut + sub fail { my ($testCount, $name, $extra) = @_; my $out = $name ? "not ok $testCount - $name" : "not ok $testCount"; diff --git a/lib/WebGUI/Form/Keywords.pm b/lib/WebGUI/Form/Keywords.pm index 9f80b3eda..b2e24b39a 100644 --- a/lib/WebGUI/Form/Keywords.pm +++ b/lib/WebGUI/Form/Keywords.pm @@ -123,6 +123,14 @@ END_SCRIPT return $output; } +#------------------------------------------------------------------- + +=head2 www_searchAsJSON + +Returns search results in the form variable C as JSON. + +=cut + sub www_searchAsJSON { my $session = shift; my $search = $session->form->param('search'); @@ -134,16 +142,40 @@ sub www_searchAsJSON { return JSON::to_json({keywords => $keywords}); } +#------------------------------------------------------------------- + +=head2 getDefaultValue + +Extends the base method to return keywords in a comma delimited string. + +=cut + sub getDefaultValue { my $self = shift; return _formatKeywordsAsWanted($self->SUPER::getDefaultValue(@_)); } +#------------------------------------------------------------------- + +=head2 getOriginalValue + +Extends the base method to return keywords in a comma delimited string. + +=cut + sub getOriginalValue { my $self = shift; return _formatKeywordsAsWanted($self->SUPER::getOriginalValue(@_)); } +#------------------------------------------------------------------- + +=head2 getValue + +Extends the base method to return keywords in a comma delimited string. + +=cut + sub getValue { my $self = shift; return _formatKeywordsAsWanted($self->SUPER::getValue(@_));