|
@@ -79,8 +79,13 @@ $people_filled = survey_manager::get_people_who_filled_survey(
|
|
|
SurveyUtil::check_parameters($people_filled);
|
|
|
|
|
|
$survey_data = survey_manager::get_survey($survey_id);
|
|
|
+
|
|
|
+$isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh(
|
|
|
+ api_get_user_id(),
|
|
|
+ api_get_course_info()
|
|
|
+);
|
|
|
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
|
|
|
-if (!api_is_allowed_to_edit(false, true)) {
|
|
|
+if (!api_is_allowed_to_edit(false, true) || $isDrhOfCourse) {
|
|
|
Display :: display_header(get_lang('ToolSurvey'));
|
|
|
// Show error message if the survey can be seen only by tutors
|
|
|
if ($survey_data['visible_results'] != SURVEY_VISIBLE_TUTOR) {
|
|
@@ -151,13 +156,19 @@ echo '<a href="'.api_get_path(WEB_CODE_PATH).'survey/survey.php?survey_id='.$sur
|
|
|
echo '</div>';
|
|
|
|
|
|
// Content
|
|
|
-
|
|
|
-if (!isset($_GET['action']) || isset($_GET['action']) && $_GET['action'] == 'overview') {
|
|
|
- $myweb_survey_id = $survey_id;
|
|
|
- echo '<div class="sectiontitle"><a href="'.api_get_path(WEB_CODE_PATH).'survey/reporting.php?action=questionreport&'.$cidReq.'&survey_id='.$myweb_survey_id.'">'.Display::return_icon('survey_reporting_question.gif',get_lang('DetailedReportByQuestion')).' '.get_lang('DetailedReportByQuestion').'</a></div><div class="sectioncomment">'.get_lang('DetailedReportByQuestionDetail').' </div>';
|
|
|
- echo '<div class="sectiontitle"><a href="'.api_get_path(WEB_CODE_PATH).'survey/reporting.php?action=userreport&'.$cidReq.'&survey_id='.$myweb_survey_id.'">'.Display::return_icon('survey_reporting_user.gif',get_lang('DetailedReportByUser')).' '.get_lang('DetailedReportByUser').'</a></div><div class="sectioncomment">'.get_lang('DetailedReportByUserDetail').'.</div>';
|
|
|
- echo '<div class="sectiontitle"><a href="'.api_get_path(WEB_CODE_PATH).'survey/reporting.php?action=comparativereport&'.$cidReq.'&survey_id='.$myweb_survey_id.'">'.Display::return_icon('survey_reporting_comparative.gif',get_lang('ComparativeReport')).' '.get_lang('ComparativeReport').'</a></div><div class="sectioncomment">'.get_lang('ComparativeReportDetail').'.</div>';
|
|
|
- echo '<div class="sectiontitle"><a href="reporting.php?action=completereport&'.$cidReq.'&survey_id='.$myweb_survey_id.'">'.Display::return_icon('survey_reporting_complete.gif',get_lang('CompleteReport')).' '.get_lang('CompleteReport').'</a></div><div class="sectioncomment">'.get_lang('CompleteReportDetail').'</div>';
|
|
|
+if (!isset($_GET['action']) ||
|
|
|
+ isset($_GET['action']) &&
|
|
|
+ $_GET['action'] == 'overview'
|
|
|
+) {
|
|
|
+ $myweb_survey_id = $survey_id;
|
|
|
+ echo '<div class="sectiontitle"><a href="'.api_get_path(WEB_CODE_PATH).'survey/reporting.php?action=questionreport&survey_id='.$myweb_survey_id.'&'.api_get_cidreq().'">'.
|
|
|
+ Display::return_icon('survey_reporting_question.gif',get_lang('DetailedReportByQuestion')).' '.get_lang('DetailedReportByQuestion').'</a></div><div class="sectioncomment">'.get_lang('DetailedReportByQuestionDetail').' </div>';
|
|
|
+ echo '<div class="sectiontitle"><a href="'.api_get_path(WEB_CODE_PATH).'survey/reporting.php?action=userreport&survey_id='.$myweb_survey_id.'&'.api_get_cidreq().'">'.
|
|
|
+ Display::return_icon('survey_reporting_user.gif',get_lang('DetailedReportByUser')).' '.get_lang('DetailedReportByUser').'</a></div><div class="sectioncomment">'.get_lang('DetailedReportByUserDetail').'.</div>';
|
|
|
+ echo '<div class="sectiontitle"><a href="'.api_get_path(WEB_CODE_PATH).'survey/reporting.php?action=comparativereport&survey_id='.$myweb_survey_id.'&'.api_get_cidreq().'">'.
|
|
|
+ Display::return_icon('survey_reporting_comparative.gif',get_lang('ComparativeReport')).' '.get_lang('ComparativeReport').'</a></div><div class="sectioncomment">'.get_lang('ComparativeReportDetail').'.</div>';
|
|
|
+ echo '<div class="sectiontitle"><a href="reporting.php?action=completereport&survey_id='.$myweb_survey_id.'&'.api_get_cidreq().'">'.
|
|
|
+ Display::return_icon('survey_reporting_complete.gif',get_lang('CompleteReport')).' '.get_lang('CompleteReport').'</a></div><div class="sectioncomment">'.get_lang('CompleteReportDetail').'</div>';
|
|
|
}
|
|
|
|
|
|
// Footer
|