plugins/reports/reviews/ReviewReportDAO.inc.php

Go to the documentation of this file.
00001 <?php
00002 
00016 //$Id$
00017 
00018 
00019 import('classes.paper.PaperComment');
00020 import('db.DBRowIterator');
00021 
00022 class ReviewReportDAO extends DAO {
00029    function getReviewReport($schedConfId) {
00030       $primaryLocale = AppLocale::getPrimaryLocale();
00031       $locale = AppLocale::getLocale();
00032 
00033       $result =& $this->retrieve(
00034          'SELECT  paper_id,
00035             comments,
00036             author_id
00037          FROM  paper_comments
00038          WHERE comment_type = ?',
00039          array(
00040             COMMENT_TYPE_PEER_REVIEW
00041          )
00042       );
00043       import('db.DBRowIterator');
00044       $commentsReturner = new DBRowIterator($result);
00045 
00046       $result =& $this->retrieve(
00047          'SELECT  r.stage AS reviewStage,
00048             COALESCE(psl.setting_value, pspl.setting_value) AS paper,
00049             p.paper_id AS paperId,
00050             u.user_id AS reviewerId,
00051             u.username AS reviewer,
00052             u.first_name AS firstName,
00053             u.middle_name AS middleName,
00054             u.last_name AS lastName,
00055             r.date_assigned AS dateAssigned,
00056             r.date_notified AS dateNotified,
00057             r.date_confirmed AS dateConfirmed,
00058             r.date_completed AS dateCompleted,
00059             r.date_reminded AS dateReminded,
00060             (r.declined=1) AS declined,
00061             (r.cancelled=1) AS cancelled,
00062             r.recommendation AS recommendation
00063          FROM  review_assignments r
00064             LEFT JOIN papers p ON r.paper_id=p.paper_id
00065             LEFT JOIN paper_settings psl ON (p.paper_id=psl.paper_id AND psl.locale=? AND psl.setting_name=?)
00066             LEFT JOIN paper_settings pspl ON (p.paper_id=pspl.paper_id AND pspl.locale=? AND pspl.setting_name=?),
00067             users u
00068          WHERE u.user_id=r.reviewer_id AND p.sched_conf_id= ?
00069          ORDER BY paper',
00070          array(
00071             $locale,
00072             'title',
00073             $primaryLocale,
00074             'title',
00075             $schedConfId
00076          )
00077       );
00078       $reviewsReturner = new DBRowIterator($result);
00079 
00080       return array($commentsReturner, $reviewsReturner);
00081    }
00082 }
00083 
00084 ?>

Generated on 25 Jul 2013 for Open Conference Systems by  doxygen 1.4.7