';
$aditionalButtons .= isset($certificateLinkInfo['certificate_link']) ? $certificateLinkInfo['certificate_link'] : '';
$aditionalButtons .= isset($certificateLinkInfo['badge_link']) ? $certificateLinkInfo['badge_link'] : '';
$aditionalButtons .= '
';
}
Display :: display_normal_message($scoreinfo, false);
@@ -539,15 +539,15 @@ class DisplayGradebook
}
// for course admin & platform admin add item buttons are added to the header
- $header .= '
';
-
+
+ $actionsLeft = '';
$my_category = $catobj->shows_all_information_an_category($catobj->get_id());
$user_id = api_get_user_id();
$my_api_cidreq = api_get_cidreq();
if (api_is_allowed_to_edit(null, true)) {
if (empty($grade_model_id) || $grade_model_id == -1) {
- $header .= '
' .
+ $actionsLeft .= '' .
Display::return_icon('new_folder.png', get_lang('AddGradebook'), array(), ICON_SIZE_MEDIUM) . '';
}
if ($selectcat == '0') {
@@ -558,70 +558,66 @@ class DisplayGradebook
$my_api_cidreq = 'cidReq=' . $my_category['course_code'];
}
if ($show_add_link && !$message_resource) {
- $header .= '
' .
+ $actionsLeft .= '' .
Display::return_icon('new_evaluation.png', get_lang('NewEvaluation'), '', ICON_SIZE_MEDIUM) . '';
$cats = Category :: load($selectcat);
if ($cats[0]->get_course_code() != null && !$message_resource) {
- $header .= ' | ' .
+ $actionsLeft .= '' .
Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM) . '';
} else {
- $header .= ' | ' .
+ $actionsLeft .= '' .
Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM) . '';
}
}
if (!$message_resource) {
- $header .= ' | ' .
+ $actionsLeft .= '' .
Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '';
if ($my_category['generate_certificates'] == 1) {
- $header .= " | "
- . Display::url(
+ $actionsLeft .= Display::url(
Display::return_icon(
- 'certificate_list.png',
- get_lang('GradebookSeeListOfStudentsCertificates'),
- '',
- ICON_SIZE_MEDIUM
- ),
+ 'certificate_list.png',
+ get_lang('GradebookSeeListOfStudentsCertificates'),
+ '',
+ ICON_SIZE_MEDIUM
+ ),
"gradebook_display_certificate.php?$my_api_cidreq&cat_id=" . intval($_GET['selectcat'])
- )
- . " | ";
+ );
}
- $header .= "
"
- . Display::url(
+ $actionsLeft .= Display::url(
Display::return_icon(
- 'user.png',
- get_lang('GradebookListOfStudentsReports'),
- '',
- ICON_SIZE_MEDIUM
- ),
+ 'user.png',
+ get_lang('GradebookListOfStudentsReports'),
+ '',
+ ICON_SIZE_MEDIUM
+ ),
"gradebook_display_summary.php?$my_api_cidreq&selectcat=" . intval($_GET['selectcat'])
- )
- . " | ";
+ );
// Right icons
- $modify_icons = '
' .
+ $actionsRight = '' .
Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM) . '';
- $modify_icons .= '
' .
+ $actionsRight .= '' .
Display::return_icon('certificate.png', get_lang('AttachCertificate'), '', ICON_SIZE_MEDIUM) . '';
if (empty($categories)) {
- $modify_icons .= '
' .
+ $actionsRight .= '' .
Display::return_icon('percentage.png', get_lang('EditAllWeights'), '', ICON_SIZE_MEDIUM) . '';
}
$score_display_custom = api_get_setting('gradebook_score_display_custom');
if (api_get_setting('teachers_can_change_score_settings') == 'true' && $score_display_custom['my_display_custom'] == 'true') {
- $modify_icons .= '
' .
+ $actionsRight .= '' .
Display::return_icon('ranking.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM) . '';
}
- $header .= Display::div($modify_icons, array('class' => 'right'));
+
}
}
} elseif (isset($_GET['search'])) {
- $header .= '
' . get_lang('SearchResults') . ' :';
+ echo $header = '
' . get_lang('SearchResults') . ' :';
}
$isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh(
@@ -630,24 +626,24 @@ class DisplayGradebook
);
if ($isDrhOfCourse) {
- $header .= '
' .
+ $$actionsLeft .= '' .
Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '';
}
- $header .= '';
-
- echo $header;
+ if (api_is_allowed_to_edit(null, true)){
+ echo $toolbar = Display::toolbarAction('gradebook-actions', array(0 => $actionsLeft, 1 => $actionsRight ));
+ }
if (api_is_allowed_to_edit(null, true)) {
$weight = intval($catobj->get_weight()) > 0 ? $catobj->get_weight() : 0;
- $weight = get_lang('TotalWeight') . ' : ' . $weight;
+ $weight = '' . get_lang('TotalWeight') . ' : ' . $weight;
$min_certification = (intval($catobj->get_certificate_min_score() > 0) ? $catobj->get_certificate_min_score() : 0);
$min_certification = get_lang('CertificateMinScore') . ' : ' . $min_certification;
- $edit_icon = '' .
+ $edit_icon = '' .
Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '';
//$msg = Display::tag('h3', $weight.' - '.$min_certification);
- $msg = Display::tag('h4', $weight . ' - ' . $min_certification . $edit_icon);
+ $msg = $weight . ' - ' . $min_certification . $edit_icon;
//@todo show description
$description = (($catobj->get_description() == "" || is_null($catobj->get_description())) ? '' : '' . get_lang('GradebookDescriptionLog') . '' . ': ' . $catobj->get_description());
Display::display_normal_message($msg, false);
diff --git a/main/gradebook/lib/fe/gradebooktable.class.php b/main/gradebook/lib/fe/gradebooktable.class.php
index b88bba37da..d18bb3bef7 100755
--- a/main/gradebook/lib/fe/gradebooktable.class.php
+++ b/main/gradebook/lib/fe/gradebooktable.class.php
@@ -279,7 +279,7 @@ class GradebookTable extends SortableTable
// Name.
if (get_class($item) == 'Category') {
- $row[] = $invisibility_span_open.''.$item->get_name().''.$invisibility_span_close;
+ $row[] = $invisibility_span_open.''.$item->get_name().''.$invisibility_span_close;
$main_categories[$item->get_id()]['name'] = $item->get_name();
} else {
$name = $this->build_name_link($item, $type);
@@ -309,7 +309,7 @@ class GradebookTable extends SortableTable
);
if ($this->teacherView) {
- $row[] = $invisibility_span_open .Display::tag('h4', $weight).$invisibility_span_close;
+ $row[] = $invisibility_span_open .Display::tag('p', $weight, array('class' => 'score')).$invisibility_span_close;
} else {
$row[] = $invisibility_span_open .$weight.$invisibility_span_close;
}
@@ -593,7 +593,7 @@ class GradebookTable extends SortableTable
$row = array(
null,
null,
- '' . get_lang('Total') . '',
+ '' . get_lang('Total') . '',
null,
$total
);
@@ -708,7 +708,7 @@ class GradebookTable extends SortableTable
$weight_total_links > $weight_category
) {
$warning_message = sprintf(get_lang('TotalWeightMustBeX'), $weight_category);
- $modify_icons = ''.
+ $modify_icons = ''.
Display::return_icon('edit.png', $warning_message, array(), ICON_SIZE_SMALL).'';
$warning_message .= $modify_icons;
Display::display_warning_message($warning_message, false);
|