@@ -334,9 +334,14 @@ discard block |
||
| 334 | 334 | |
| 335 | 335 | $length = ((($builder == 'builder') && ($icon == 'nolink')) ? 65 : 32); |
| 336 | 336 | |
| 337 | - if ($builder != 'builder') $origin = 'learnpath'; //origin = learnpath in student view |
|
| 337 | + if ($builder != 'builder') { |
|
| 338 | + $origin = 'learnpath'; |
|
| 339 | + } |
|
| 340 | + //origin = learnpath in student view |
|
| 338 | 341 | $linktype = $type; |
| 339 | - if (($type == 'Link _self') or ($type == 'Link _blank')) $type = 'Link'; |
|
| 342 | + if (($type == 'Link _self') or ($type == 'Link _blank')) { |
|
| 343 | + $type = 'Link'; |
|
| 344 | + } |
|
| 340 | 345 | |
| 341 | 346 | // YW switched litteral tool names to use of constants declared in main_api.lib.php |
| 342 | 347 | switch ($type) { |
@@ -356,7 +361,7 @@ discard block |
||
| 356 | 361 | if ($icon != 'nolink') { |
| 357 | 362 | if ($completed == 'completed') { |
| 358 | 363 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>"; |
| 359 | - } else { |
|
| 364 | + } else { |
|
| 360 | 365 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>"; |
| 361 | 366 | //echo " "; |
| 362 | 367 | } |
@@ -407,7 +412,7 @@ discard block |
||
| 407 | 412 | if ($icon != 'nolink') { |
| 408 | 413 | if ($completed == 'completed') { |
| 409 | 414 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>"; |
| 410 | - } else { |
|
| 415 | + } else { |
|
| 411 | 416 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>"; |
| 412 | 417 | //echo " "; |
| 413 | 418 | } |
@@ -454,7 +459,7 @@ discard block |
||
| 454 | 459 | if ($icon != 'nolink') { |
| 455 | 460 | if ($completed == 'completed') { |
| 456 | 461 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>"; |
| 457 | - } else { |
|
| 462 | + } else { |
|
| 458 | 463 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>"; |
| 459 | 464 | //echo " "; |
| 460 | 465 | } |
@@ -468,8 +473,7 @@ discard block |
||
| 468 | 473 | |
| 469 | 474 | if ($icon == 'nolink') { return(shorten($myrow['title'], $length)); } |
| 470 | 475 | if ($icon == 'icon') { |
| 471 | - if ($linktype == 'Link _self') { echo "<img src='../img/links.gif' align=\"absmiddle\" alt='links'>"; } |
|
| 472 | - else { echo "<img src='../img/link_blank.gif' align=\"absmiddle\" alt='blank links'>"; } |
|
| 476 | + if ($linktype == 'Link _self') { echo "<img src='../img/links.gif' align=\"absmiddle\" alt='links'>"; } else { echo "<img src='../img/link_blank.gif' align=\"absmiddle\" alt='blank links'>"; } |
|
| 473 | 477 | } |
| 474 | 478 | $thelink = $myrow['url']; |
| 475 | 479 | if ($builder != 'builder') { |
@@ -558,7 +562,7 @@ discard block |
||
| 558 | 562 | if ($icon != 'nolink') { |
| 559 | 563 | if ($completed == 'completed') { |
| 560 | 564 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>"; |
| 561 | - } else { |
|
| 565 | + } else { |
|
| 562 | 566 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>"; |
| 563 | 567 | //echo " "; |
| 564 | 568 | } |
@@ -603,7 +607,7 @@ discard block |
||
| 603 | 607 | if ($icon != 'nolink') { |
| 604 | 608 | if ($completed == 'completed') { |
| 605 | 609 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>"; |
| 606 | - } else { |
|
| 610 | + } else { |
|
| 607 | 611 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>"; |
| 608 | 612 | //echo " "; |
| 609 | 613 | } |
@@ -647,7 +651,7 @@ discard block |
||
| 647 | 651 | if ($icon != 'nolink') { |
| 648 | 652 | if ($completed == 'completed') { |
| 649 | 653 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>"; |
| 650 | - } else { |
|
| 654 | + } else { |
|
| 651 | 655 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>"; |
| 652 | 656 | //echo " "; |
| 653 | 657 | } |
@@ -698,7 +702,7 @@ discard block |
||
| 698 | 702 | if ($icon != 'nolink') { |
| 699 | 703 | if ($completed == 'completed') { |
| 700 | 704 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>"; |
| 701 | - } else { |
|
| 705 | + } else { |
|
| 702 | 706 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>"; |
| 703 | 707 | //echo " "; |
| 704 | 708 | } |
@@ -801,7 +805,7 @@ discard block |
||
| 801 | 805 | if ($icon != 'nolink') { |
| 802 | 806 | if ($completed == 'completed') { |
| 803 | 807 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>"; |
| 804 | - } else { |
|
| 808 | + } else { |
|
| 805 | 809 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>"; |
| 806 | 810 | //echo " "; |
| 807 | 811 | } |
@@ -842,7 +846,7 @@ discard block |
||
| 842 | 846 | if ($icon != 'nolink') { |
| 843 | 847 | if ($completed == 'completed') { |
| 844 | 848 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>"; |
| 845 | - } else { |
|
| 849 | + } else { |
|
| 846 | 850 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>"; |
| 847 | 851 | //echo " "; |
| 848 | 852 | } |
@@ -858,8 +862,7 @@ discard block |
||
| 858 | 862 | echo "<a href=\"".api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Dropbox&origin=$origin#$id_in_path\" class='$completed'>".shorten($name,($length-3*$level))."</a>"; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Dropbox&origin=$origin#$id_in_path"; |
| 859 | 863 | if ($desc != '') { |
| 860 | 864 | if ($icon != 'wrap') { |
| 861 | - echo "</tr><tr><td></td><td></td><td><div class='description'> ".shorten($desc, ($length-3*$level))."</div></td></tr>"; } |
|
| 862 | - else { |
|
| 865 | + echo "</tr><tr><td></td><td></td><td><div class='description'> ".shorten($desc, ($length-3*$level))."</div></td></tr>"; } else { |
|
| 863 | 866 | echo "<div class='description'> ".shorten($desc, ($length-3*$level))."</div>"; } |
| 864 | 867 | } |
| 865 | 868 | } else { |
@@ -897,8 +900,7 @@ discard block |
||
| 897 | 900 | $items[] = api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Introduction_text&origin=$origin#$id_in_path"; |
| 898 | 901 | if ($desc != '') { |
| 899 | 902 | if ($icon != 'wrap') { |
| 900 | - echo "</tr><tr><td></td><td></td><td><div class='description'> ".shorten($desc, ($length-3*$level))."</div></td></tr>"; } |
|
| 901 | - else { |
|
| 903 | + echo "</tr><tr><td></td><td></td><td><div class='description'> ".shorten($desc, ($length-3*$level))."</div></td></tr>"; } else { |
|
| 902 | 904 | echo "<div class='description'> ".shorten($desc, ($length-3*$level))."</div>"; } |
| 903 | 905 | } |
| 904 | 906 | } else { |
@@ -920,7 +922,7 @@ discard block |
||
| 920 | 922 | if ($icon != 'nolink') { |
| 921 | 923 | if ($completed == 'completed') { |
| 922 | 924 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on'>"; |
| 923 | - } else { |
|
| 925 | + } else { |
|
| 924 | 926 | echo "<img src='../img/checkbox_on2.gif' border='0' width='13' height='11' alt='on' style='visibility: hidden'>"; |
| 925 | 927 | //echo " "; |
| 926 | 928 | } |
@@ -936,8 +938,7 @@ discard block |
||
| 936 | 938 | echo "<a href=\"".api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Course_description&origin=$origin#$id_in_path\" class='$completed'>".shorten($name,($length-3*$level))."</a>"; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Course_description&origin=$origin#$id_in_path"; |
| 937 | 939 | if ($desc != '') { |
| 938 | 940 | if ($icon != 'wrap') { |
| 939 | - echo "</tr><tr><td></td><td></td><td><div class='description'> ".shorten($desc, ($length-3*$level))."</div></td></tr>"; } |
|
| 940 | - else { |
|
| 941 | + echo "</tr><tr><td></td><td></td><td><div class='description'> ".shorten($desc, ($length-3*$level))."</div></td></tr>"; } else { |
|
| 941 | 942 | echo "<div class='description'> ".shorten($desc, ($length-3*$level))."</div>"; } |
| 942 | 943 | } |
| 943 | 944 | } else { |
@@ -976,8 +977,7 @@ discard block |
||
| 976 | 977 | echo "<a href=\"".api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Groups&origin=$origin#$id_in_path\" class='$completed'>".shorten($name,($length-3*$level))."</a>"; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Groups&origin=$origin#$id_in_path"; |
| 977 | 978 | if ($desc != '') { |
| 978 | 979 | if ($icon != 'wrap') { |
| 979 | - echo "</tr><tr><td></td><td></td><td><div class='description'> ".shorten($desc, ($length-3*$level))."</div></td></tr>"; } |
|
| 980 | - else { |
|
| 980 | + echo "</tr><tr><td></td><td></td><td><div class='description'> ".shorten($desc, ($length-3*$level))."</div></td></tr>"; } else { |
|
| 981 | 981 | echo "<div class='description'> ".shorten($desc, ($length-3*$level))."</div>"; } |
| 982 | 982 | } |
| 983 | 983 | } else { |
@@ -1015,8 +1015,7 @@ discard block |
||
| 1015 | 1015 | echo "<a href=\"".api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Users&origin=$origin#$id_in_path\" class='$completed'>".shorten($name,($length-3*$level))."</a>"; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Users&origin=$origin#$id_in_path"; |
| 1016 | 1016 | if ($desc != '') { |
| 1017 | 1017 | if ($icon != 'wrap') { |
| 1018 | - echo "</tr><tr><td></td><td></td><td><div class='description'> ".shorten($desc, ($length-3*$level))."</div></td></tr>"; } |
|
| 1019 | - else { |
|
| 1018 | + echo "</tr><tr><td></td><td></td><td><div class='description'> ".shorten($desc, ($length-3*$level))."</div></td></tr>"; } else { |
|
| 1020 | 1019 | echo "<div class='description'> ".shorten($desc, ($length-3*$level))."</div>"; } |
| 1021 | 1020 | } |
| 1022 | 1021 | } else { |
@@ -1346,11 +1345,12 @@ discard block |
||
| 1346 | 1345 | WHERE c_id = $course_id AND source_type='$type' and source_id='$id'"; |
| 1347 | 1346 | $result = Database::query($sql); |
| 1348 | 1347 | $number_added = Database::num_rows($result); |
| 1349 | - if ($number_added != 0) |
|
| 1350 | - return true; |
|
| 1351 | - else |
|
| 1352 | - return false; |
|
| 1353 | -} |
|
| 1348 | + if ($number_added != 0) { |
|
| 1349 | + return true; |
|
| 1350 | + } else { |
|
| 1351 | + return false; |
|
| 1352 | + } |
|
| 1353 | + } |
|
| 1354 | 1354 | |
| 1355 | 1355 | /** |
| 1356 | 1356 | * this function is to load the resources that were added to a specific item |
@@ -1459,8 +1459,7 @@ discard block |
||
| 1459 | 1459 | next($addedresource); |
| 1460 | 1460 | } |
| 1461 | 1461 | echo '</table>'; |
| 1462 | - } |
|
| 1463 | - else { // it is a string |
|
| 1462 | + } else { // it is a string |
|
| 1464 | 1463 | echo ''; |
| 1465 | 1464 | } |
| 1466 | 1465 | } // end of the display_resources function |
@@ -1492,8 +1491,7 @@ discard block |
||
| 1492 | 1491 | echo "<a href='".api_get_self()."?content=".$type."&source_forum=".$_GET['source_forum']."&add=".$id."&source_id=$source_id&action=$action&lp_id=$learnpath_id&parent_item_id=$chapter_id&originalresource=no&target=$target'>".$lang_add_it_or_resource."</a>"; |
| 1493 | 1492 | } |
| 1494 | 1493 | } |
| 1495 | - } |
|
| 1496 | - else { // if it is not an array, it is a string |
|
| 1494 | + } else { // if it is not an array, it is a string |
|
| 1497 | 1495 | if ($_SESSION['addedresource'] !== $type || $_SESSION['addedresourceid'] !== $id) { |
| 1498 | 1496 | if ($from_learnpath) { $lang_add_it_or_resource = get_lang('AddIt'); } else { $lang_add_it_or_resource = get_lang('AddResource'); } |
| 1499 | 1497 | echo "<a href='".api_get_self()."?content=".$type."&folder=".$folder."&source_forum=".$_GET['source_forum']."&add=".$id."&source_id=$source_id&action=$action&lp_id=$learnpath_id&parent_item_id=$chapter_id&originalresource=no&target=$target'>".$lang_add_it_or_resource."</a>"; |
@@ -1519,7 +1517,9 @@ discard block |
||
| 1519 | 1517 | $course_id = api_get_course_int_id(); |
| 1520 | 1518 | |
| 1521 | 1519 | // Styling the link of the added resource |
| 1522 | - if ($style != '') $styling = ' class="'.$style.'"'; |
|
| 1520 | + if ($style != '') { |
|
| 1521 | + $styling = ' class="'.$style.'"'; |
|
| 1522 | + } |
|
| 1523 | 1523 | if ($new_window) { $target = ' target = "_blank" '; } else { $target = ' target = "_self" '; } |
| 1524 | 1524 | |
| 1525 | 1525 | $output = ''; |
@@ -119,8 +119,9 @@ |
||
| 119 | 119 | |
| 120 | 120 | for ($i = 0; $i<count($matches[0]); $i++) { |
| 121 | 121 | |
| 122 | - if (empty($matches[1][$i])) |
|
| 123 | - continue; |
|
| 122 | + if (empty($matches[1][$i])) { |
|
| 123 | + continue; |
|
| 124 | + } |
|
| 124 | 125 | |
| 125 | 126 | $content = api_strstr($content, $matches[0][$i]); |
| 126 | 127 | if ($i + 1 !== count($matches[0])) { |
@@ -341,8 +341,7 @@ |
||
| 341 | 341 | case '1': // coming from Agenda |
| 342 | 342 | if ($action == 'edit') { |
| 343 | 343 | $url = "../calendar/agenda.php?action=edit&id=49&originalresource=$originalresource"; |
| 344 | - } |
|
| 345 | - elseif ($action == 'add') { |
|
| 344 | + } elseif ($action == 'add') { |
|
| 346 | 345 | $url = "../calendar/agenda.php?action=add&originalresource=$originalresource"; |
| 347 | 346 | } else { |
| 348 | 347 | $url = "../calendar/agenda.php?action=add"; |
@@ -459,11 +459,12 @@ discard block |
||
| 459 | 459 | } |
| 460 | 460 | } |
| 461 | 461 | |
| 462 | - if ($package_type == '' || !$mandatory) |
|
| 463 | - // && defined('CHECK_FOR_AICC') && CHECK_FOR_AICC) |
|
| 462 | + if ($package_type == '' || !$mandatory) { |
|
| 463 | + // && defined('CHECK_FOR_AICC') && CHECK_FOR_AICC) |
|
| 464 | 464 | { |
| 465 | 465 | return api_failure::set_failure('not_aicc_content'); |
| 466 | 466 | } |
| 467 | + } |
|
| 467 | 468 | |
| 468 | 469 | if (!enough_size($realFileSize, $course_sys_dir, $maxFilledSpace)) { |
| 469 | 470 | return api_failure::set_failure('not_enough_space'); |
@@ -511,7 +512,9 @@ discard block |
||
| 511 | 512 | if ($file != '.' && $file != '..') { |
| 512 | 513 | $filetype = 'file'; |
| 513 | 514 | |
| 514 | - if (is_dir($course_sys_dir.$new_dir.$file)) $filetype = 'folder'; |
|
| 515 | + if (is_dir($course_sys_dir.$new_dir.$file)) { |
|
| 516 | + $filetype = 'folder'; |
|
| 517 | + } |
|
| 515 | 518 | |
| 516 | 519 | // TODO: RENAMING FILES CAN BE VERY DANGEROUS AICC-WISE, avoid that as much as possible! |
| 517 | 520 | //$safe_file = api_replace_dangerous_char($file, 'strict'); |
@@ -910,37 +913,43 @@ discard block |
||
| 910 | 913 | if ($enclosed && $data{$i+1} == $enclosure) { |
| 911 | 914 | $fldval .= $chr; |
| 912 | 915 | ++$i; // Skip the next character. |
| 913 | - } else |
|
| 914 | - $enclosed = !$enclosed; |
|
| 916 | + } else { |
|
| 917 | + $enclosed = !$enclosed; |
|
| 918 | + } |
|
| 915 | 919 | break; |
| 916 | 920 | case $delim: |
| 917 | 921 | if (!$enclosed) { |
| 918 | 922 | $ret_array[$linecount][$fldcount++] = $fldval; |
| 919 | 923 | $fldval = ''; |
| 920 | - } else |
|
| 921 | - $fldval .= $chr; |
|
| 924 | + } else { |
|
| 925 | + $fldval .= $chr; |
|
| 926 | + } |
|
| 922 | 927 | break; |
| 923 | 928 | case "\r": |
| 924 | - if (!$enclosed&&$data{$i+1} == "\n") |
|
| 925 | - continue; |
|
| 929 | + if (!$enclosed&&$data{$i+1} == "\n") { |
|
| 930 | + continue; |
|
| 931 | + } |
|
| 926 | 932 | case "\n": |
| 927 | 933 | if (!$enclosed) { |
| 928 | 934 | $ret_array[$linecount++][$fldcount] = $fldval; |
| 929 | 935 | $fldcount = 0; |
| 930 | 936 | $fldval = ''; |
| 931 | - } else |
|
| 932 | - $fldval .= $chr; |
|
| 937 | + } else { |
|
| 938 | + $fldval .= $chr; |
|
| 939 | + } |
|
| 933 | 940 | break; |
| 934 | 941 | case "\\r": |
| 935 | - if (!$enclosed&&$data{$i+1} == "\\n") |
|
| 936 | - continue; |
|
| 942 | + if (!$enclosed&&$data{$i+1} == "\\n") { |
|
| 943 | + continue; |
|
| 944 | + } |
|
| 937 | 945 | case "\\n": |
| 938 | 946 | if (!$enclosed) { |
| 939 | 947 | $ret_array[$linecount++][$fldcount] = $fldval; |
| 940 | 948 | $fldcount = 0; |
| 941 | 949 | $fldval = ''; |
| 942 | - } else |
|
| 943 | - $fldval .= $chr; |
|
| 950 | + } else { |
|
| 951 | + $fldval .= $chr; |
|
| 952 | + } |
|
| 944 | 953 | break; |
| 945 | 954 | default: |
| 946 | 955 | $fldval .= $chr; |
@@ -48,7 +48,9 @@ discard block |
||
| 48 | 48 | foreach ($dashboard_blocks as $block) { |
| 49 | 49 | |
| 50 | 50 | // display only user blocks |
| 51 | - if (!in_array($block['id'], $user_blocks_id)) continue; |
|
| 51 | + if (!in_array($block['id'], $user_blocks_id)) { |
|
| 52 | + continue; |
|
| 53 | + } |
|
| 52 | 54 | |
| 53 | 55 | $path = $block['path']; |
| 54 | 56 | $controller_class = $block['controller']; |
@@ -61,7 +63,9 @@ discard block |
||
| 61 | 63 | // check if user is allowed to see the block |
| 62 | 64 | if (method_exists($obj, 'is_block_visible_for_user')) { |
| 63 | 65 | $is_block_visible_for_user = $obj->is_block_visible_for_user($user_id); |
| 64 | - if (!$is_block_visible_for_user) continue; |
|
| 66 | + if (!$is_block_visible_for_user) { |
|
| 67 | + continue; |
|
| 68 | + } |
|
| 65 | 69 | } |
| 66 | 70 | |
| 67 | 71 | $data_block[$path] = $obj->get_block(); |
@@ -40,7 +40,9 @@ |
||
| 40 | 40 | //if the rewrite rule asks for a directory, we redirect to the course view |
| 41 | 41 | if (is_dir($full_file_name)) { |
| 42 | 42 | //remove last slash if present |
| 43 | - while ($doc_url{$dul = strlen($doc_url)-1}=='/') $doc_url = substr($doc_url,0,$dul); |
|
| 43 | + while ($doc_url{$dul = strlen($doc_url)-1}=='/') { |
|
| 44 | + $doc_url = substr($doc_url,0,$dul); |
|
| 45 | + } |
|
| 44 | 46 | //create the path |
| 45 | 47 | $document_explorer = api_get_path(WEB_COURSE_PATH).api_get_course_path(); // home course path |
| 46 | 48 | //redirect |
@@ -379,9 +379,10 @@ discard block |
||
| 379 | 379 | $result = Database::query($sql); |
| 380 | 380 | $row = Database::fetch_array($result); |
| 381 | 381 | |
| 382 | - if ($row['number'] == 1) |
|
| 383 | - $user_task = true; |
|
| 384 | -} |
|
| 382 | + if ($row['number'] == 1) { |
|
| 383 | + $user_task = true; |
|
| 384 | + } |
|
| 385 | + } |
|
| 385 | 386 | |
| 386 | 387 | switch ($action) { |
| 387 | 388 | case 'new_post': |
@@ -468,16 +469,17 @@ discard block |
||
| 468 | 469 | echo '<br /><br />'; |
| 469 | 470 | Blog :: display_assigned_task_list($blog_id); |
| 470 | 471 | echo '<br /><br />'; |
| 472 | + } else { |
|
| 473 | + api_not_allowed(); |
|
| 471 | 474 | } |
| 472 | - else |
|
| 473 | - api_not_allowed(); |
|
| 474 | 475 | |
| 475 | 476 | break; |
| 476 | 477 | case 'execute_task' : |
| 477 | - if (isset ($_GET['post_id'])) |
|
| 478 | - Blog :: display_post($blog_id, intval($_GET['post_id'])); |
|
| 479 | - else |
|
| 480 | - Blog :: display_select_task_post($blog_id, intval($_GET['task_id'])); |
|
| 478 | + if (isset ($_GET['post_id'])) { |
|
| 479 | + Blog :: display_post($blog_id, intval($_GET['post_id'])); |
|
| 480 | + } else { |
|
| 481 | + Blog :: display_select_task_post($blog_id, intval($_GET['task_id'])); |
|
| 482 | + } |
|
| 481 | 483 | |
| 482 | 484 | break; |
| 483 | 485 | case 'view_search_result' : |
@@ -400,8 +400,9 @@ |
||
| 400 | 400 | $extra .= $form->return_form(); |
| 401 | 401 | $extra .= '</div>'; |
| 402 | 402 | |
| 403 | -if ($is_allowedToEdit) |
|
| 403 | +if ($is_allowedToEdit) { |
|
| 404 | 404 | echo $extra; |
| 405 | +} |
|
| 405 | 406 | |
| 406 | 407 | echo $actions; |
| 407 | 408 | |
@@ -250,8 +250,7 @@ |
||
| 250 | 250 | case RESULT_DISABLE_SHOW_SCORE_ONLY: |
| 251 | 251 | if ($objExercise->feedback_type != EXERCISE_FEEDBACK_TYPE_END) { |
| 252 | 252 | $header_names = array(get_lang('Attempt'), get_lang('StartDate'), get_lang('IP'), get_lang('Score')); |
| 253 | - } |
|
| 254 | - else { |
|
| 253 | + } else { |
|
| 255 | 254 | $header_names = array(get_lang('Attempt'), get_lang('StartDate'), get_lang('IP'), get_lang('Score'), get_lang('Details')); |
| 256 | 255 | } |
| 257 | 256 | break; |