Skip to content

Commit

Permalink
fix language selection
Browse files Browse the repository at this point in the history
  • Loading branch information
prowebat committed Jul 25, 2016
1 parent 7d9f2ac commit 8639221
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion category.php
Expand Up @@ -25,7 +25,7 @@
block_exaport_setup_default_categories();

$url = '/blocks/exaport/category.php';
$PAGE->set_url($url, ['courseid' => $courseid]);
$PAGE->set_url($url, ['courseid' => $courseid, 'action' => optional_param('action', '', PARAM_ALPHA), 'id' => optional_param('id', '', PARAM_INT)]);

// Get userlist for sharing category
if (optional_param('action', '', PARAM_ALPHA) == 'userlist') {
Expand Down
5 changes: 2 additions & 3 deletions item.php
Expand Up @@ -27,23 +27,22 @@
$backtype = block_exaport_check_item_type($backtype, true);
$categoryid = optional_param('categoryid', 0, PARAM_INT);
$descriptorselection = optional_param('descriptorselection',true,PARAM_BOOL);
$id = optional_param('id', 0, PARAM_INT);

$context = context_system::instance();

require_login($courseid);
require_capability('block/exaport:use', $context);

$url = '/blocks/exaport/item.php';
$PAGE->set_url($url, ['courseid' => $courseid]);
$PAGE->set_url($url, ['courseid' => $courseid, 'id' => $id, 'action'=>$action]);

$conditions = array("id" => $courseid);

if (!$course = $DB->get_record("course", $conditions)) {
print_error("invalidcourseid", "block_exaport");
}

$id = optional_param('id', 0, PARAM_INT);

if ($CFG->branch < 31)
include($CFG->dirroot.'/tag/lib.php');

Expand Down

0 comments on commit 8639221

Please sign in to comment.