Permalink
Browse files

MDL-42122 block_community: Dont show install option without capability

  • Loading branch information...
1 parent d45e65c commit e7dbb03978a593fd907f9d8b47087ca1397d3921 @aolley aolley committed Oct 3, 2013
Showing with 2 additions and 1 deletion.
  1. +1 −1 blocks/community/communitycourse.php
  2. +1 −0 blocks/community/forms.php
@@ -142,7 +142,7 @@
$fromformdata['audience'] = optional_param('audience', 'all', PARAM_ALPHANUMEXT);
$fromformdata['language'] = optional_param('language', current_language(), PARAM_ALPHANUMEXT);
$fromformdata['educationallevel'] = optional_param('educationallevel', 'all', PARAM_ALPHANUMEXT);
-$fromformdata['downloadable'] = optional_param('downloadable', 1, PARAM_ALPHANUM);
+$fromformdata['downloadable'] = optional_param('downloadable', $usercandownload, PARAM_ALPHANUM);
$fromformdata['orderby'] = optional_param('orderby', 'newest', PARAM_ALPHA);
$fromformdata['huburl'] = optional_param('huburl', HUB_MOODLEORGHUBURL, PARAM_URL);
$fromformdata['search'] = $search;
@@ -213,6 +213,7 @@ public function definition() {
} else {
$mform->addElement('hidden', 'downloadable', 0);
}
+ $mform->setType('downloadable', PARAM_INT);
$options = array();
$options['all'] = get_string('any');

0 comments on commit e7dbb03

Please sign in to comment.