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 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制