How to change URL for update (repository check source)

How to change URL for update (repository check source)

by Moja Edukacja -
Number of replies: 4

Hi

Is there any way to change the url referenced by moodle when checking for updates?

I would like moodle to check for updates in my local directory. Like Windows local WSUS smile


Where can I find the correct parameter. Does my own repository have to meet any requirements or can it be a regular repository such as gitHub?

Average of ratings: -
In reply to Moja Edukacja

Re: How to change URL for update (repository check source)

by Ken Task -
Picture of Particularly helpful Moodlers

The place to look is in the hidden .git directory of present code.

There is a config file that contains:

cat config

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    ignorecase = true
    precomposeunicode = true
[remote "origin"]
    url = git://git.moodle.org/moodle.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[branch "MOODLE_39_STABLE"]
    remote = origin
    merge = refs/heads/MOODLE_39_STABLE

Although you would probably be best off creating your own project on git hub and using that.

'SoS', Ken

In reply to Ken Task

Re: How to change URL for update (repository check source)

by Moja Edukacja -
Maybe I was wrong, but I mean the place in the source code of the Moodle application, not the GIT system. In other words, I mean the "Check for updates" action itself after pressing "Check for Updates" on the Moodle notification page (also moodle cron task).
This action / function references an external repository somewhere, with or without returning information about an available update.
In reply to Moja Edukacja

Re: How to change URL for update (repository check source)

by Ken Task -
Picture of Particularly helpful Moodlers

Ohhhhh ... would assume moodle.org is TLD domain ... you could watch traffic from your moodle outbound ... do a notifications check in your moodle ... then see in outbound traffic where that request went!

Not sure one could web whack those servers to clone to some Windows WUS if that's what you are seeking.

Might wanna read up on git anyway - Git for Developers:

https://docs.moodle.org/dev/Git_for_developers

Maybe a true programmer of Moodle core code could provide more info.   Anyone else?

'SoS', Ken


In reply to Ken Task

Re: How to change URL for update (repository check source)

by Moja Edukacja -
I think we didn't understand each other.

IMO. It seems like a better way to find in the source code the function / method responsible for calling the trigger checking for updates. Probably the destination address of the update check location is passed as a parameter or constant. still looking for ...