|
|
|
@ -24,7 +24,7 @@ |
|
|
|
|
* @package dokeos.survey |
|
|
|
|
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts (if not all) of the code |
|
|
|
|
@author Julio Montoya Armas <gugli100@gmail.com>, Dokeos: Personality Test modification and rewriting large parts of the code |
|
|
|
|
* @version $Id: survey.lib.php 16042 2008-08-21 16:47:15Z juliomontoya $ |
|
|
|
|
* @version $Id: survey.lib.php 16046 2008-08-21 22:24:17Z juliomontoya $ |
|
|
|
|
* |
|
|
|
|
* @todo move this file to inc/lib |
|
|
|
|
* @todo use consistent naming for the functions (save vs store for instance) |
|
|
|
@ -4225,11 +4225,12 @@ class SurveyUtil { |
|
|
|
|
$table->set_header(10, get_lang('Modify'), false,'width="120"'); |
|
|
|
|
$table->set_column_filter(9, 'anonymous_filter'); |
|
|
|
|
$table->set_column_filter(10, 'modify_filter'); |
|
|
|
|
$table->set_form_actions(array ('delete' => get_lang('DeleteSurvey'))); |
|
|
|
|
$table->display(); |
|
|
|
|
|
|
|
|
|
if (!api_is_course_coach()) |
|
|
|
|
$table->set_form_actions(array ('delete' => get_lang('DeleteSurvey'))); |
|
|
|
|
$table->display(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* This function changes the modify column of the sortable table |
|
|
|
|
* |
|
|
|
@ -4243,14 +4244,19 @@ class SurveyUtil { |
|
|
|
|
{ |
|
|
|
|
global $charset; |
|
|
|
|
$survey_id = Security::remove_XSS($survey_id); |
|
|
|
|
$return = '<a href="create_new_survey.php?'.api_get_cidreq().'&action=edit&survey_id='.$survey_id.'">'.Display::return_icon('edit.gif', get_lang('Edit')).'</a>'; |
|
|
|
|
$return .= '<a href="survey_list.php?'.api_get_cidreq().'&action=delete&survey_id='.$survey_id.'" onclick="javascript:if(!confirm(\''.addslashes(htmlentities(get_lang("DeleteSurvey").'?',ENT_QUOTES,$charset)).'\')) return false;">'.Display::return_icon('delete.gif', get_lang('Delete')).'</a>'; |
|
|
|
|
if (!api_is_course_coach()) |
|
|
|
|
$return = '<a href="create_new_survey.php?'.api_get_cidreq().'&action=edit&survey_id='.$survey_id.'">'.Display::return_icon('edit.gif', get_lang('Edit')).'</a>'; |
|
|
|
|
|
|
|
|
|
if (!api_is_course_coach()) |
|
|
|
|
$return .= '<a href="survey_list.php?'.api_get_cidreq().'&action=delete&survey_id='.$survey_id.'" onclick="javascript:if(!confirm(\''.addslashes(htmlentities(get_lang("DeleteSurvey").'?',ENT_QUOTES,$charset)).'\')) return false;">'.Display::return_icon('delete.gif', get_lang('Delete')).'</a>'; |
|
|
|
|
//$return .= '<a href="create_survey_in_another_language.php?id_survey='.$survey_id.'">'.Display::return_icon('copy.gif', get_lang('Copy')).'</a>'; |
|
|
|
|
//$return .= '<a href="survey.php?survey_id='.$survey_id.'">'.Display::return_icon('add.gif', get_lang('Add')).'</a>'; |
|
|
|
|
$return .= '<a href="preview.php?'.api_get_cidreq().'&survey_id='.$survey_id.'">'.Display::return_icon('preview.gif', get_lang('Preview')).'</a>'; |
|
|
|
|
$return .= '<a href="survey_invite.php?'.api_get_cidreq().'&survey_id='.$survey_id.'">'.Display::return_icon('survey_publish.gif', get_lang('Publish')).'</a>'; |
|
|
|
|
$return .= '<a href="survey_list.php?'.api_get_cidreq().'&action=empty&survey_id='.$survey_id.'" onclick="javascript:if(!confirm(\''.addslashes(htmlentities(get_lang("EmptySurvey").'?')).'\')) return false;">'.Display::return_icon('empty.gif', get_lang('EmptySurvey')).'</a>'; |
|
|
|
|
$return .= '<a href="reporting.php?'.api_get_cidreq().'&survey_id='.$survey_id.'">'.Display::return_icon('statistics.gif', get_lang('Reporting')).'</a>'; |
|
|
|
|
|
|
|
|
|
if (!api_is_course_coach()) |
|
|
|
|
$return .= '<a href="reporting.php?'.api_get_cidreq().'&survey_id='.$survey_id.'">'.Display::return_icon('statistics.gif', get_lang('Reporting')).'</a>'; |
|
|
|
|
return $return; |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|