Minor - hide unused options for "meeting" survey type

pull/2729/head
Julio Montoya 7 years ago
parent 2f2ecfbc08
commit df7c04b54e
  1. 7
      main/survey/surveyUtil.class.php

@ -2878,6 +2878,8 @@ class SurveyUtil
return $hideReportingButton ? '-' : $reportingLink; return $hideReportingButton ? '-' : $reportingLink;
} }
$type = $survey->getSurveyType();
// Coach can see that only if the survey is in his session // Coach can see that only if the survey is in his session
if (api_is_allowed_to_edit() || if (api_is_allowed_to_edit() ||
api_is_element_in_the_session(TOOL_SURVEY, $survey_id) api_is_element_in_the_session(TOOL_SURVEY, $survey_id)
@ -2893,6 +2895,8 @@ class SurveyUtil
$codePath.'survey/generate_link.php?'.http_build_query($params + ['survey_id' => $survey_id]) $codePath.'survey/generate_link.php?'.http_build_query($params + ['survey_id' => $survey_id])
); );
} }
if ($type != 3) {
$actions[] = Display::url( $actions[] = Display::url(
Display::return_icon('backup.png', get_lang('CopySurvey')), Display::return_icon('backup.png', get_lang('CopySurvey')),
$codePath.'survey/copy_survey.php?'.http_build_query($params + ['survey_id' => $survey_id]) $codePath.'survey/copy_survey.php?'.http_build_query($params + ['survey_id' => $survey_id])
@ -2913,10 +2917,13 @@ class SurveyUtil
] ]
); );
} }
}
if ($type != 3) {
$actions[] = Display::url( $actions[] = Display::url(
Display::return_icon('preview_view.png', get_lang('Preview')), Display::return_icon('preview_view.png', get_lang('Preview')),
$codePath.'survey/preview.php?'.http_build_query($params + ['survey_id' => $survey_id]) $codePath.'survey/preview.php?'.http_build_query($params + ['survey_id' => $survey_id])
); );
}
$actions[] = Display::url( $actions[] = Display::url(
Display::return_icon('mail_send.png', get_lang('Publish')), Display::return_icon('mail_send.png', get_lang('Publish')),
$codePath.'survey/survey_invite.php?'.http_build_query($params + ['survey_id' => $survey_id]) $codePath.'survey/survey_invite.php?'.http_build_query($params + ['survey_id' => $survey_id])

Loading…
Cancel
Save