Skip to content

Commit

Permalink
V2.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Dec 11, 2014
1 parent b957a8f commit a9856e7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
8 changes: 6 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,13 @@ can be really useful in visualising the issue along with any files you consider

Version Information
===================
5th December 2014 Version 2.7.2
11th December 2014 Version 2.7.2
1. New 'Show section summary when collapsed' feature gratefully funded by 'Te Rito Maioha Early Childhood New Zealand - https://ecnz.ac.nz'.
2. Fix CONTRIB-5472.
3. Integrated 'Use core required_param for toggle parameters.': https://github.com/gjb2048/moodle-format_topcoll/pull/12
"This work was made possible through funding from Te Rito Maioha Early Childhood New Zealand".
Improves on work instigated in CONTRIB-5211 and related to MDL-46754.
4. Improved HTTP protocol handling in 'settopcollpref.php'.

20th September 2014 Version 2.7.1.5
1. Fixed issue where a debug message was being written to the PHP error log.
Expand Down Expand Up @@ -1130,6 +1134,6 @@ Desired Enhancements

Me
==
G J Barnard MSc. BSc(Hons)(Sndw). MBCS. CEng. CITP. PGCE. - 20th September 2014.
G J Barnard MSc. BSc(Hons)(Sndw). MBCS. CEng. CITP. PGCE.
Moodle profile: http://moodle.org/user/profile.php?id=442195.
Web profile : http://about.me/gjbarnard
12 changes: 8 additions & 4 deletions settopcollpref.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@
// Get and set the value.
$value = required_topcoll_param('value');
// Update
if (!set_user_preference($name, $value)) {
print_error('errorsettinguserpref');
if ($value) {
if (!set_user_preference($name, $value)) {
print_error('errorsettinguserpref');
}
echo 'OK';
} else {
header('HTTP/1.1 406 Not Acceptable');
echo 'Not Acceptable';
}

echo 'OK';
2 changes: 1 addition & 1 deletion togglelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ function clean_topcoll_param($param) {
for ($i = 0; $i < $chars; $i++) {
$charval = ord($param[$i]);
if (($charval < 58) || ($charval > 121)) {
return '';
return false;
}
}
return $param;
Expand Down

0 comments on commit a9856e7

Please sign in to comment.