Moodle

new mnet code does not use SITEID to find out if course is site

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.8
  • Fix Version/s: STABLE backlog
  • Component/s: MNet
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE

Description

around line 117 in course/report/log/lib.php
if (1 == $cc->course) {
does not seem to be correct because site course is not guarateed to have id 1

I am going to commit fix for if($cc->category) which was obsoleted loong ago, correct way is to compare course id with SITEID, the problem is I do not know how to find out the correct SITEID from remote site...

Issue Links

Activity

Hide
Petr Škoda (skodak) added a comment -

there is one more
(empty($course->category)
around line 225

Show
Petr Škoda (skodak) added a comment - there is one more (empty($course->category) around line 225
Hide
Martín Langhoff added a comment -

This needs a bit of review. If we care about "remote" sitecourses, the remote site should tell us which one it is

Show
Martín Langhoff added a comment - This needs a bit of review. If we care about "remote" sitecourses, the remote site should tell us which one it is
Hide
Martín Langhoff added a comment -

Donal - review?

Show
Martín Langhoff added a comment - Donal - review?
Hide
Penny Leach added a comment -

petr, is this issue able to be closed now ?

I'm not sure about this remote site issue....

Show
Penny Leach added a comment - petr, is this issue able to be closed now ? I'm not sure about this remote site issue....
Hide
Petr Škoda (skodak) added a comment -
if (1 == $cc->course) { // TODO: this might be wrong - site course may have another id
                            $sites["$hostid/$cc->course"]   = $cc->coursename.' ('.get_string('site').')';
                        } else {
                            $courses["$hostid/$cc->course"] = $cc->coursename;
                        }

is still there and is wrong

Show
Petr Škoda (skodak) added a comment -
if (1 == $cc->course) { // TODO: this might be wrong - site course may have another id
                            $sites["$hostid/$cc->course"]   = $cc->coursename.' ('.get_string('site').')';
                        } else {
                            $courses["$hostid/$cc->course"] = $cc->coursename;
                        }
is still there and is wrong
Hide
Penny Leach added a comment -

Oh I see now.... that's tricky, I don't think there's anything in the mnet protocol that tells you which course is the site course on a remote site.

Perhaps the best thing to do is just to remove this check and remove the ( site ) thing completely.

Show
Penny Leach added a comment - Oh I see now.... that's tricky, I don't think there's anything in the mnet protocol that tells you which course is the site course on a remote site. Perhaps the best thing to do is just to remove this check and remove the ( site ) thing completely.
Hide
Penny Leach added a comment -

any thoughts?

Show
Penny Leach added a comment - any thoughts?

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated: