[open-ils-commits] r13304 - trunk/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:14 EDT 2009
Author: erickson
Date: 2009-06-03 12:05:12 -0400 (Wed, 03 Jun 2009)
New Revision: 13304
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm
Log:
removed and old pile of 'warn' statements used for debugging
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm 2009-06-03 15:53:50 UTC (rev 13303)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Survey.pm 2009-06-03 16:05:12 UTC (rev 13304)
@@ -38,9 +38,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);
@@ -73,7 +71,6 @@
("Unable to create new survey " . $survey->name());
}
- warn "Created new survey with id $id\n";
$survey->id($id);
return $survey;
}
@@ -94,9 +91,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 );
@@ -107,8 +101,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()}) {
@@ -123,7 +115,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",
@@ -134,7 +125,6 @@
("Error creating survey answer " . $answer->answer() );
}
- warn "Added new answer with id $id\n";
}
@@ -147,7 +137,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();
@@ -156,10 +145,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));
@@ -175,7 +160,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;
@@ -186,8 +170,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 ];
}
@@ -228,8 +210,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/)) {
@@ -247,7 +227,6 @@
$survey->questions([]);
- warn "Grabbing survey questions\n";
my $qreq = $session->request(
"open-ils.storage.direct.action.survey_question.search.survey.atomic",
$survey->id() );
@@ -262,7 +241,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",
@@ -302,8 +280,6 @@
("No survey object sent in update");
}
- use Data::Dumper;
- warn "Submitting survey " . Dumper($responses) . "\n";
if(!ref($responses)) { $responses = [$responses]; }
@@ -328,15 +304,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
@@ -345,7 +317,6 @@
}
$apputils->commit_db_session($session);
- warn "survey response update completed\n";
return 1;
}
@@ -358,7 +329,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",
@@ -366,7 +336,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);
@@ -380,7 +349,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",
@@ -388,7 +356,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