[open-ils-commits] r13306 - branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jun 3 12:05:52 EDT 2009
Author: erickson
Date: 2009-06-03 12:05:49 -0400 (Wed, 03 Jun 2009)
New Revision: 13306
Modified:
branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm
Log:
removed and old pile of 'warn' statements used for debugging
Modified: branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm
===================================================================
--- branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm 2009-06-03 16:05:36 UTC (rev 13305)
+++ branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm 2009-06-03 16:05:49 UTC (rev 13306)
@@ -37,9 +37,7 @@
my $session = $apputils->start_db_session();
my $err = undef; my $id;
- warn "Creating new survey\n" . Dumper($survey) . "\n";
-
try {
$survey = _add_survey($session, $survey);
@@ -72,7 +70,6 @@
("Unable to create new survey " . $survey->name());
}
- warn "Created new survey with id $id\n";
$survey->id($id);
return $survey;
}
@@ -93,9 +90,6 @@
$question->clear_id();
- warn "Creating new question: " . $question->question() . "\n";
- warn Dumper $question;
-
my $req = $session->request(
'open-ils.storage.direct.action.survey_question.create',
$question );
@@ -106,8 +100,6 @@
("Error creating new survey question " . $question->question() . "\n")
}
- warn "added new question with id $new_id\n";
-
# now update the responses to this question
if($question->answers()) {
for my $answer (@{$question->answers()}) {
@@ -122,7 +114,6 @@
sub _add_answer {
my($session, $answer) = @_;
- warn "Adding answer " . $answer->answer() . "\n";
$answer->clear_id();
my $req = $session->request(
"open-ils.storage.direct.action.survey_answer.create",
@@ -133,7 +124,6 @@
("Error creating survey answer " . $answer->answer() );
}
- warn "Added new answer with id $id\n";
}
@@ -146,7 +136,6 @@
sub get_required_surveys {
my( $self, $client, $user_session ) = @_;
- warn "Retrieving required surveys\n";
my $user_obj = $apputils->check_user_session($user_session);
my $orgid = $user_obj->ws_ou() ? $user_obj->ws_ou() : $user_obj->home_ou();
@@ -155,10 +144,6 @@
"open-ils.storage.action.survey.required.atomic",
$orgid );
- if($surveys) {
- warn "Retrieved " . scalar(@$surveys)." required surveys\n";
- }
-
my @fleshed;
for my $survey (@$surveys) {
push(@fleshed, get_fleshed_survey($self, $client, $survey));
@@ -174,7 +159,6 @@
sub get_survey_responses {
my( $self, $client, $user_session, $survey_id, $user_id ) = @_;
- warn "retrieing responses $user_session $survey_id $user_id\n";
if(!$user_id) {
my $user_obj = $apputils->check_user_session($user_session);
$user_id = $user_obj->id;
@@ -185,8 +169,6 @@
"open-ils.cstore.direct.action.survey_response.search.atomic",
{ usr => $user_id, survey => $survey_id } );
- warn "Surveys: " . Dumper($res);
-
if( $res && ref($res) and $res->[0]) {
return [ sort { $a->id() <=> $b->id() } @$res ];
}
@@ -227,8 +209,6 @@
my $session = OpenSRF::AppSession->create("open-ils.storage");
- warn "Searching for survey $survey_id\n";
-
my $survey;
if( ref($survey_id) and
(ref($survey_id) =~ /^Fieldmapper/)) {
@@ -246,7 +226,6 @@
$survey->questions([]);
- warn "Grabbing survey questions\n";
my $qreq = $session->request(
"open-ils.storage.direct.action.survey_question.search.survey.atomic",
$survey->id() );
@@ -261,7 +240,6 @@
# add this question to the survey
push( @{$survey->questions()}, $question );
- warn "Grabbing question answers\n";
my $ans_req = $session->request(
"open-ils.storage.direct.action.survey_answer.search.question.atomic",
@@ -301,8 +279,6 @@
("No survey object sent in update");
}
- use Data::Dumper;
- warn "Submitting survey " . Dumper($responses) . "\n";
if(!ref($responses)) { $responses = [$responses]; }
@@ -327,15 +303,11 @@
$res->clear_usr();
}
- warn "Submitting response with question " .
- $res->question . " and group $group_id \n";
-
$res->response_group_id($group_id);
my $req = $session->request(
"open-ils.storage.direct.action.survey_response.create",
$res );
my $newid = $req->gather(1);
- warn "New response id: $newid\n";
if(!$newid) {
throw OpenSRF::EX::ERROR
@@ -344,7 +316,6 @@
}
$apputils->commit_db_session($session);
- warn "survey response update completed\n";
return 1;
}
@@ -357,7 +328,6 @@
sub get_random_survey {
my( $self, $client, $user_session ) = @_;
- warn "retrieving random survey\n";
my $user_obj = $apputils->check_user_session($user_session);
my $surveys = $apputils->simple_scalar_request(
"open-ils.storage",
@@ -365,7 +335,6 @@
$user_obj->home_ou() );
my $random = int(rand(scalar(@$surveys)));
- warn "Random survey index for process $$ is $random\n";
my $surv = $surveys->[$random];
return get_fleshed_survey($self, $client, $surv);
@@ -379,7 +348,6 @@
sub get_random_survey_global {
my( $self, $client ) = @_;
- warn "retrieving random global survey\n";
my $surveys = $apputils->simple_scalar_request(
"open-ils.storage",
"open-ils.storage.direct.action.survey.search.atomic",
@@ -387,7 +355,6 @@
{ owner => 1, opac => 't' } );
my $random = int(rand(scalar(@$surveys)));
- warn "Random survey index for process $$ is $random\n";
my $surv = $surveys->[$random];
return get_fleshed_survey($self, $client, $surv);
More information about the open-ils-commits
mailing list