* along with Codendi. If not, see <http://www.gnu.org/licenses/>.
*/
-require_once('Widget.class.php');
+require_once 'Widget.class.php';
//require_once('common/survey/SurveySingleton.class.php');
-require_once ('common/survey/SurveyFactory.class.php');
+require_once 'common/survey/SurveyFactory.class.php';
/**
* Widget_MySurveys
* This needs to be updated manually to display any given survey
* Default behavior: get first survey from group #1
*/
+
class Widget_MySurveys extends Widget {
var $content;
var $can_be_displayed;
- function Widget_MySurveys() {
+ function __construct() {
$this->Widget('mysurveys');
$no_survey = true;
global $HTML;
$request =& HTTPRequest::instance();
$html_my_surveys .= '<table style="width:100%">';
- $j = 0;
foreach ($projects as $project) {
- $j++;
$group_id = $project->getID() ;
$surveyfacto = new SurveyFactory($project);
$surveys = $surveyfacto->getSurveys();
list($hide_now,$count_diff,$hide_url) = my_hide_url('survey',$group_id,$hide_item_id,count($surveys),$hide_survey);
- $html_hdr = ($j ? '<tr class="boxitem"><td colspan="2">' : '').
+ $html_hdr = '<tr class="boxitem"><td colspan="2">'.
$hide_url.'<a href="/survey/?group_id='.$group_id.'">'.
$project->getPublicName().'</a> ';
return _("List the surveys you have not answered.");
}
}
-
-?>