Moodle

problem in define userrole

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8.3
  • Fix Version/s: 1.8.5, 1.9
  • Component/s: General
  • Labels:
    None
  • Environment:
    O.S : Fedora core 6, webserver : apache 2.2.6, php 5.2.5, Mysql 5.0
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

Hi,
I have problem with define UserRole, the problem is

Though i set the option View hidden activities (moodle/course:viewhiddenactivities):Allow
for the user role there is no effect in the course.

If the user having the role navigates the course. it's showing the message
"Sorry, this activity is currently hidden".
Then i changed the code in the moodle/mod/scrom/view.php by changing the code...

if (empty($cm->visible) and !has_capability('moodle/course:manageactivities', $context)) {
notice(get_string("activityiscurrentlyhidden"));
}

to

if (empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities', $context)) {
notice(get_string("activityiscurrentlyhidden"));
}

its working fine....
I hope it's a bug..check this out

Issue Links

Activity

Hide
Dan Poltawski added a comment -

Thanks for the report. I've fixed this in CVS.

require_login() does this check for us (with correct capability) so we dont need to do it, so i've removed it.

Show
Dan Poltawski added a comment - Thanks for the report. I've fixed this in CVS. require_login() does this check for us (with correct capability) so we dont need to do it, so i've removed it.
Hide
Madhan Ponnusamy added a comment -

is it fixed in moodle 1.9?

Show
Madhan Ponnusamy added a comment - is it fixed in moodle 1.9?
Hide
Dan Marsden added a comment -

yes - this is fixed in 1.8.5 and 1.9

Show
Dan Marsden added a comment - yes - this is fixed in 1.8.5 and 1.9

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: