Skip to content

Commit 4235e46

Browse files
committed
Minor - Format code.
1 parent 8f8c35b commit 4235e46

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

main/gradebook/gradebook_flatview.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,15 +280,11 @@
280280
$simple_search_form
281281
);
282282

283-
// main graph
283+
// Table
284284
$flatviewtable->display();
285-
// @todo this needs a fix
286-
//$image_file = $flatviewtable->display_graph();
285+
287286
//@todo load images with jquery
288287
echo '<div id="contentArea" style="text-align: center;" >';
289-
if (!empty($image_file)) {
290-
echo '<img src="'.$image_file.'">';
291-
}
292288
$flatviewtable->display_graph_by_resource();
293289
echo '</div>';
294290
}

main/gradebook/lib/fe/linkaddeditform.class.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ public function LinkAddEditForm(
6767
if (count($category_object) == 1) {
6868
$this->addElement('hidden', 'select_gradebook', $category_object[0]->get_id());
6969
} else {
70-
$select_gradebook = $this->addElement('select', 'select_gradebook', get_lang('SelectGradebook'), array(), array('id' => 'hide_category_id'));
70+
$select_gradebook = $this->addElement(
71+
'select',
72+
'select_gradebook',
73+
get_lang('SelectGradebook'),
74+
array(),
75+
array('id' => 'hide_category_id')
76+
);
7177
$this->addRule('select_gradebook', get_lang('ThisFieldIsRequired'), 'nonzero');
7278

7379
$default_weight = 0;

main/gradebook/lib/flatview_data_generator.class.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ public function get_data(
438438
}
439439

440440
if (!isset($this->params['only_total_category']) ||
441-
(isset($this->params['only_total_category']) && $this->params['only_total_category'] == false)
441+
(isset($this->params['only_total_category']) &&
442+
$this->params['only_total_category'] == false)
442443
) {
443444
if (!$show_all) {
444445
$row[] = $temp_score.' ';
@@ -533,7 +534,7 @@ public function parseEvaluations(
533534

534535
$evaluationsAdded = array();
535536

536-
for ($count = 0; ($count < $items_count) && ($items_start + $count < count($this->evals_links)); $count++) {
537+
for ($count = 0; $count < $items_count && ($items_start + $count < count($this->evals_links)); $count++) {
537538
/** @var AbstractLink $item */
538539
$item = $this->evals_links[$count + $items_start];
539540

@@ -591,14 +592,14 @@ public function parseEvaluations(
591592
) {
592593
if (!$show_all) {
593594
if (in_array($item->get_type(), array(
594-
LINK_EXERCISE,
595-
LINK_DROPBOX,
596-
LINK_STUDENTPUBLICATION,
597-
LINK_LEARNPATH,
598-
LINK_FORUM_THREAD,
599-
LINK_ATTENDANCE,
600-
LINK_SURVEY,
601-
LINK_HOTPOTATOES)
595+
LINK_EXERCISE,
596+
LINK_DROPBOX,
597+
LINK_STUDENTPUBLICATION,
598+
LINK_LEARNPATH,
599+
LINK_FORUM_THREAD,
600+
LINK_ATTENDANCE,
601+
LINK_SURVEY,
602+
LINK_HOTPOTATOES)
602603
)
603604
) {
604605
if (!empty($score[0])) {

0 commit comments

Comments
 (0)