Skip to content

Commit

Permalink
prepare release (#5)
Browse files Browse the repository at this point in the history
* 19818 set grademax during grade_item_update

* 19818 removed debugging info

* WIP upgrade db to include maxgrade

* 19818 fixed migration

* 19818 removed migration and added to changelog

* updated changelog and version
  • Loading branch information
jtgoltz authored Sep 16, 2020
1 parent 6e0cb01 commit b27329c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All important changes to this plugin will be documented in this file.

## [v1.3.5] - 2020-09-16
### Fixed
- Fixed an issue where max grade was always displayed as 100 in grade book

## [v1.3.4] - 2020-08-04
### Fixed
- Fixed an issue where you couldn't link an entire course in a language for which there is no regular task defined.
Expand Down
4 changes: 2 additions & 2 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ function mumie_grade_item_update($mumie, $grades = null) {
} else {
$params = array('itemname' => $mumie->name);
}
if (isset($mumie->grade) && $mumie->grade > 0) {
$params['grademax'] = $mumie->grade;
if (isset($mumie->points) && $mumie->points > 0) {
$params['grademax'] = $mumie->points;
$params['grademin'] = 0;
}
if ($grades === 'reset') {
Expand Down
21 changes: 14 additions & 7 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,26 @@ private static function get_browser_name() {

if (preg_match('/MSIE/i', $useragent) && !preg_match('/Opera/i', $useragent)) {
return 'Internet Explorer';
} else if (preg_match('/Firefox/i', $useragent)) {
}
if (preg_match('/Firefox/i', $useragent)) {
return 'Mozilla Firefox';
} else if (preg_match('/OPR/i', $useragent)) {
}
if (preg_match('/OPR/i', $useragent)) {
return 'Opera';
} else if (preg_match('/Chrome/i', $useragent) && !preg_match('/Edge/i', $useragent)) {
}
if (preg_match('/Chrome/i', $useragent) && !preg_match('/Edge/i', $useragent)) {
return 'Google Chrome';
} else if (preg_match('/Safari/i', $useragent) && !preg_match('/Edge/i', $useragent)) {
}
if (preg_match('/Safari/i', $useragent) && !preg_match('/Edge/i', $useragent)) {
return 'Apple Safari';
} else if (preg_match('/Netscape/i', $useragent)) {
}
if (preg_match('/Netscape/i', $useragent)) {
return 'Netscape';
} else if (preg_match('/Edge/i', $useragent)) {
}
if (preg_match('/Edge/i', $useragent)) {
return 'Edge';
} else if (preg_match('/Trident/i', $useragent)) {
}
if (preg_match('/Trident/i', $useragent)) {
return 'Internet Explorer';
}
return '';
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@

defined('MOODLE_INTERNAL') || die;

$plugin->version = 2020080409; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2020091600; // The current module version (Date: YYYYMMDDXX).
$plugin->component = 'mod_mumie'; // Full name of the plugin (used for diagnostics).
$plugin->requires = 2015041700;
$plugin->release = "v1.3.4";
$plugin->release = "v1.3.5";
$plugin->maturity = MATURITY_STABLE;
$plugin->dependencies = array(
'auth_mumie' => 2020061705,
Expand Down

0 comments on commit b27329c

Please sign in to comment.