adding more infos on overview-tab
adding a preview-icon on header adding a missing help-string
This commit is contained in:
@@ -117,6 +117,8 @@ $string['import_successfully'] = 'Import successfully';
|
||||
$string['info'] = 'Information';
|
||||
$string['infotype'] = 'Information-Type';
|
||||
$string['insufficient_responses_for_this_group'] = 'There are insufficient responses for this group';
|
||||
$string['insufficient_responses'] = 'insufficient responses';
|
||||
$string['insufficient_responses_help'] = 'There are insufficient responses for this group.<br />To keep feedbacks anonymous a minimum of 2 responses must be done.';
|
||||
$string['item_label'] = 'Label';
|
||||
$string['item_name'] = 'Question';
|
||||
$string['items_are_required'] = 'Answers are required to starred questions.';
|
||||
|
||||
@@ -33,7 +33,8 @@ if (!$context = get_context_instance(CONTEXT_MODULE, $cm->id)) {
|
||||
|
||||
require_login($course->id, true, $cm);
|
||||
|
||||
require_capability('mod/feedback:edititems', $context);
|
||||
require_capability('mod/feedback:view', $context);
|
||||
$PAGE->set_pagelayout('embedded');
|
||||
|
||||
/// Print the page header
|
||||
$strfeedbacks = get_string("modulenameplural", "feedback");
|
||||
@@ -51,14 +52,13 @@ echo $OUTPUT->header();
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
echo $OUTPUT->heading(format_text($feedback->name));
|
||||
|
||||
feedback_print_errors();
|
||||
|
||||
$feedbackitems = $DB->get_records('feedback_item', array('feedback'=>$feedback->id), 'position');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
echo $OUTPUT->continue_button('view.php?id='.$id);
|
||||
if(is_array($feedbackitems)){
|
||||
$itemnr = 0;
|
||||
$align = right_to_left() ? 'right' : 'left';
|
||||
|
||||
// echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
echo $OUTPUT->box_start('feedback_items printview');
|
||||
//check, if there exists required-elements
|
||||
$countreq = $DB->count_records('feedback_item', array('feedback'=>$feedback->id, 'required'=>1));
|
||||
@@ -93,6 +93,7 @@ if(is_array($feedbackitems)){
|
||||
echo $OUTPUT->box(get_string('no_items_available_yet','feedback'),'generalbox boxaligncenter boxwidthwide');
|
||||
}
|
||||
echo $OUTPUT->continue_button('view.php?id='.$id);
|
||||
echo $OUTPUT->box_end();
|
||||
/// Finish the page
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -10,6 +10,9 @@ div.missingrequire {
|
||||
background:#FFAAAA;
|
||||
}
|
||||
|
||||
span.feedback_info {
|
||||
font-weight:bold;
|
||||
}
|
||||
div.feedback_item_box_left, div.feedback_item_box_right {
|
||||
}
|
||||
|
||||
|
||||
+37
-1
@@ -114,8 +114,44 @@ if ((empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities
|
||||
/// print the tabs
|
||||
include('tabs.php');
|
||||
|
||||
echo $OUTPUT->heading(format_text($feedback->name));
|
||||
$previewimg = $OUTPUT->pix_icon('t/preview', get_string('preview'));
|
||||
$previewlnk = '<a href="'.$CFG->wwwroot.'/mod/feedback/print.php?id='.$id.'">'.$previewimg.'</a>';
|
||||
|
||||
echo $OUTPUT->heading(format_text($feedback->name.' '.$previewlnk));
|
||||
|
||||
//show some infos to the feedback
|
||||
if(has_capability('mod/feedback:edititems', $context)) {
|
||||
//get the groupid
|
||||
$groupselect = groups_print_activity_menu($cm, $CFG->wwwroot . '/mod/feedback/view.php?id=' . $cm->id, true);
|
||||
$mygroupid = groups_get_activity_group($cm);
|
||||
|
||||
echo $OUTPUT->box_start('boxaligncenter boxwidthwide');
|
||||
echo $groupselect.'<div class="clearer"> </div>';
|
||||
$completedscount = feedback_get_completeds_group_count($feedback, $mygroupid);
|
||||
echo $OUTPUT->box_start('feedback_info');
|
||||
echo '<span class="feedback_info">'.get_string('completed_feedbacks', 'feedback').': </span><span class="feedback_info_value">'.$completedscount. '</span>';
|
||||
echo $OUTPUT->box_end();
|
||||
$itemscount = $DB->count_records('feedback_item', array('feedback'=>$feedback->id, 'hasvalue'=>1));
|
||||
echo $OUTPUT->box_start('feedback_info');
|
||||
echo '<span class="feedback_info">'.get_string('questions', 'feedback').': </span><span class="feedback_info_value">' .$itemscount. '</span>';
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
if($feedback->timeopen) {
|
||||
echo $OUTPUT->box_start('feedback_info');
|
||||
echo '<span class="feedback_info">'.get_string('feedbackopen', 'feedback').': </span><span class="feedback_info_value">' .UserDate($feedback->timeopen). '</span>';
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
if($feedback->timeclose) {
|
||||
echo $OUTPUT->box_start('feedback_info');
|
||||
echo '<span class="feedback_info">'.get_string('timeclose', 'feedback').': </span><span class="feedback_info_value">' .UserDate($feedback->timeclose). '</span>';
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
echo $OUTPUT->box_end();
|
||||
}
|
||||
|
||||
if(has_capability('mod/feedback:edititems', $context)) {
|
||||
echo $OUTPUT->heading(get_string('description', 'feedback'), 4);
|
||||
}
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter boxwidthwide');
|
||||
$options = (object)array('noclean'=>true);
|
||||
echo format_module_intro('feedback', $feedback, $cm->id);
|
||||
|
||||
Reference in New Issue
Block a user