dse323222 2016-08-22 10:38
浏览 104
已采纳

将Moodle更新为最新的安全版本

I bacame from my colleague an old but very custome Moodle 2.7.3 version, which wasn't updated until now. Even the security updates weren't made. Because the version is highly customize, it won't be possible to just copy-paste the code and make it to the newest 2.7.x stable version. Should I begin to compare it as follows:

  • 2.7.3 VS 2.7.4 (adjust the newest code)
  • 2.7.4 VS 2.7.5 (adjust the newest code)
  • ... (adjust the newest code)
  • 2.7.14 VS 2.7.15 (adjust the newest code)

And by each compare to adjust the newest code with the code snippets, without changing version in the means of standard update?

  • 写回答

1条回答 默认 最新

  • dtbhp60824 2016-08-22 11:17
    关注

    I would advise using git to manage future updates.

    Make a clone of the main git repo:

    git clone git@github.com:moodle/moodle.git
    

    Then create a new branch based on the version of Moodle that your site was based on (tagged v2.7.3):

    git checkout v2.7.3
    git checkout -b [name of branch to create]
    

    Once that is done, copy your current site's code over the top of this. Now look through and commit each of the custom changes (tools such as gitk or IDEs, such as PHPStorm, with built-in git support can help with this).

    Once all the changes have been committed in sensible chunks, it is time to upgrade to the latest Moodle 2.7, by creating another new branch and rebasing it on top of the latest Moodle code:

    git checkout MOODLE_27_STABLE
    git pull
    git checkout [name of branch created above]
    git checkout -b [a new branch name for your upgraded code]
    git rebase -i MOODLE_27_STABLE
    

    This may work cleanly, or you may need to resolve some conflicts as you go along (depending on what was changed in the original and what changes have happened in Moodle).

    Any future upgrades (even between major versions) can be completed using the last set of git commands (but, when upgrading between major versions, you will need to trim out any core Moodle commits during the 'rebase' step).

    I would also advise coming up with some sort of consistent naming convention for your site branches (e.g. based on the Moodle version number).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 删除虚拟显示器驱动 删除所有 Xorg 配置文件 删除显示器缓存文件 重启系统 可是依旧无法退出虚拟显示器
  • ¥15 vscode程序一直报同样的错,如何解决?
  • ¥15 关于使用unity中遇到的问题
  • ¥15 开放世界如何写线性关卡的用例(类似原神)
  • ¥15 关于并联谐振电磁感应加热
  • ¥60 请查询全国几个煤炭大省近十年的煤炭铁路及公路的货物周转量
  • ¥15 请帮我看看我这道c语言题到底漏了哪种情况吧!
  • ¥66 如何制作支付宝扫码跳转到发红包界面
  • ¥15 pnpm 下载element-plus
  • ¥15 解决编写PyDracula时遇到的问题