Accessing to markbook weighting

Hi folks,

I noticed a problem in regard to accessing markbook weighting.

The assigned teachers can access the weighting menu without problems. However, the administrator does not and gets the following message:

The selected record does not exist, or you do not have access to it.

I assume I could add the administrator to all classes and things would work fine. However, as far as I know, by default, the administrator has all rights in regard to the markbook allowing him e.g. to create new markbook columns, etc. Why is he restricted with markbook weighting?

Kind regards,
Roman

@skuipers any ideas on this one? I guess we might need more granular permissions to allow admins to edit all? Thanks : ) Ross

There are granular permissions actually, Manage Weightings_everything and Manage Weightings_single class. The problem is I initially got the order reversed when setting the precedence on those actions (back almost a year ago when I was less familiar with the system). It’s since been fixed in v13, if you run the following SQL line on your database it should fix it for you in v12:

UPDATE gibbonAction SET precedence=0 WHERE gibbonModuleID=(SELECT gibbonModuleID FROM gibbonModule WHERE name=‘Markbook’) AND name=‘Manage Weightings_singleClass’;`

Hope this helps!

Amazing, thanks Sandra! I should have gone back and looked at the permission before commenting ; ) Ross

Thanks Sandra, works perfectly!

Hi guys!

Sorry, I should have tested more thoroughly the other day before reporting back.

Accessing markbook weighting works but the administrator cannot create new weightings. The add icon is missing. It seems adding new weightings is limited to teachers.

How can I fix this?

Kind regards,
Roman

Ross, Sandra, anybody? I’m still stuck here… Any ideas?

Hi Roman,

Looks like there have been a few other changes to that script since v12. The issue has already been fixed in v13+, I went back and tested it out on v12 and have a fix for you. Since it’s an older version code patches will need to be made manually. If you update the following line of weighting_manage.php it will allow you to access the Add button, and the other permissions updated earlier will also allow you to access the Edit and Delete options.

Change Line 123 of modules/Markbook/weighting_manage.php:

From:
if ($teaching) {`

To:
if ($teaching || $highestAction == ‘Manage Weightings_everything’) {`

Hope this helps!

Works like a charm!!!
Thanks, Sandra