АБ
Size: a a a
АБ
VK
VK
АБ
АБ
VK
VK
VK
АБ
АБ
VK
АБ
K
АБ
ц
АБ
services.moodle.package = let
plugins = [
(pkgs.moodle-utils.buildMoodlePlugin {
name = "bigbluebuttonbn";
src = pkgs.fetchzip {
name = "bbb-moodle-plugin";
url =
" https://moodle.org/plugins/download.php/23293/mod_bigbluebuttonbn_moodle310_2019042011.zip";
sha256 = "12aclcjm3wq8lz7ks3nk1pb0is2a2wljy7db6qjc2v4hjnybhrlq";
extraPostFetch = ''
echo fix perm: $out
chmod a-w -R $out
'';
};
pluginType = "quizaccess";
})
];
in pkgs.moodle.overrideAttrs (oa: {
installPhase = ''
runHook preInstall
mkdir -p $out/share/moodle
cp -r . $out/share/moodle
cp ${oa.phpConfig} $out/share/moodle/config.php
${lib.concatStringsSep "\n" (map (p:
let
dir = if p.pluginType == "mod" then
"mod"
else if p.pluginType == "theme" then
"theme"
else if p.pluginType == "block" then
"blocks"
else if p.pluginType == "question" then
"question/type"
else if p.pluginType == "course" then
"course/format"
else if p.pluginType == "report" then
"admin/report"
else if p.pluginType == "quizaccess" then
"quizaccess" # Fix this part if it doesn't work
else
throw "unknown moodle plugin type";
# we have to copy it, because the plugins have refrences to .. inside
in ''
mkdir -p $out/share/moodle/${dir}/${p.name}
cp -r ${p}/* $out/share/moodle/${dir}/${p.name}/
'') plugins)}
runHook postInstall
'';
});
АБ
VK