Skip to content

Commit

Permalink
Merge branch 'MOODLE_32_STABLE'
Browse files Browse the repository at this point in the history
  • Loading branch information
vfremaux committed Feb 20, 2017
2 parents f1d09d9 + 06c3667 commit 76ba2f0
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 14 deletions.
20 changes: 10 additions & 10 deletions externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,20 +109,20 @@ public static function validate_report_parameters($configparamdefs, $inputs) {
}

case 'idnumber': {
if (!$user = $DB->get_record('user', array('idnumber' => $inputs['userid']))) {
throw new invalid_parameter_exception('User not found by idnumber: '.$inputs['userid']);
}
$status['userid'] = $user->id;
break;
if (!$user = $DB->get_record('user', array('idnumber' => $inputs['userid']))) {
throw new invalid_parameter_exception('User not found by idnumber: '.$inputs['userid']);
}
$status['userid'] = $user->id;
break;
}

case 'email': {
if (!$user = $DB->get_record('user', array('email' => $inputs['userid']))) {
throw new invalid_parameter_exception('User not found by email: '.$inputs['userid']);
}
$status['userid'] = $user->id;
break;
if (!$user = $DB->get_record('user', array('email' => $inputs['userid']))) {
throw new invalid_parameter_exception('User not found by email: '.$inputs['userid']);
}
$status['userid'] = $user->id;
break;
}
}

return $status;
Expand Down
1 change: 1 addition & 0 deletions lang/en/report_trainingsessions.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
$string['csv'] = 'Text (CSV)';
$string['csvoutputtoiso'] = 'Iso CSV Output';
$string['currentcourse'] = 'Current course';
$string['debugmode'] = 'Debug mode on';
$string['disabled'] = '|--------- disabled -----------|';
$string['discrete'] = 'Discrete output';
$string['done'] = 'Performed: ';
Expand Down
1 change: 1 addition & 0 deletions lang/fr/report_trainingsessions.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
$string['csv'] = 'Texte (CSV)';
$string['csvoutputtoiso'] = 'CSV au format ISO';
$string['currentcourse'] = 'Cours courant';
$string['debugmode'] = 'Mode debuggage (admin)';
$string['disabled'] = '|--------- non actif -----------|';
$string['discrete'] = 'Sortie discrète';
$string['done'] = 'Visités ';
Expand Down
7 changes: 5 additions & 2 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ function report_trainingsessions_supports_feature($feature) {
'replay' => array('single', 'replay'),
),
);
$prefer = array();
$prefer = array('format' => array(
'xls' => 'community',
'csv' => 'community'
));
}

// Check existance of the 'pro' dir in plugin.
Expand Down Expand Up @@ -105,7 +108,7 @@ function report_trainingsessions_supports_feature($feature) {
return false;
}

if (in_array($feat, $supports['community'])) {
if (array_key_exists($feat, $supports['community'])) {
if (in_array($subfeat, $supports['community'][$feat])) {
// If community exists, default path points community code.
if (isset($prefer[$feat][$subfeat])) {
Expand Down
4 changes: 4 additions & 0 deletions selector_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,15 @@ public function definition() {
$updatestr2 = get_string('updatefromaccountstart', 'report_trainingsessions');
$updatefromstr = ($this->mode == 'user') ? $updatestr : $updatestr2;
$updatetostr = get_string('tonow', 'report_trainingsessions');
$debugmodestr = get_string('debugmode', 'report_trainingsessions');

$row[] = $mform->createElement('submit', 'go_btn', get_string('update'));

$row2[] = & $mform->createElement('checkbox', 'fromstart', '', $updatefromstr);
$row2[] = & $mform->createElement('checkbox', 'tonow', '', $updatetostr);
if (has_capability('moodle/site:config', $context)) {
$row2[] = & $mform->createElement('checkbox', 'debug', '', $debugmodestr);
}
$row2[] = $mform->createElement('html', ''); // This stands for an empty cell, but needs being a Quickform object.
$row2[] = $mform->createElement('html', ''); // This stands for an empty cell, but needs being a Quickform object.

Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@

defined('MOODLE_INTERNAL') || die;

$plugin->version = 2017020200; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2017021600; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2016120500; // Requires this Moodle version.
$plugin->component = 'report_trainingsessions'; // Full name of the plugin (used for diagnostics).
$plugin->maturity = MATURITY_STABLE;
$plugin->release = '3.2.0 (build 2017020200)';
$plugin->release = '3.2.0 (build 2017021600)';
$plugin->dependencies = array('block_use_stats' => '2016051700', 'auth_ticket' => '2012060400');

// Non moodle attributes.
Expand Down

0 comments on commit 76ba2f0

Please sign in to comment.