воскресенье, 21 августа 2016 г.

Настройка Moodle

Настройка Moodle и отключение разных "лишних" кнопочек пользователям...


Отключаем кнопку настройки личной страницы

В документации вот тут:

Preventing users from customizing their Dashboard
By default, users can customize their Dashboard and add blocks. An admin can prevent this as follows:
  1. Go to Administration > Site administration > Users > Permissions > Define roles
  2. Edit the authenticated user role and untick the Manage Dashboard blocks capability

и там же про настройку личной страницы у всех пользователей.
Там же можно отключить возможность редактировать профайл, создавать записи блогов и форумов. И вообще отключить все возможности где стоят какие нибудь значки. 

Отключаем блоки "Навигация" и "Настройка"

Нужно зайти на свою Домашнюю страницу (Dashboard) включить настройку, затем в блоке Навигация (или Настройка) ткнуть в шестеренку и выбрать пункт "Права" (Permissions), далее в табличке добавить роли с столбец кому дано право или кто лишен права

Настройка блоков по умолчанию для новых курсов

И скриптик для существующих

В документации вот тут:

Default block layout for new courses

To amend the default block layout for new courses, one or more of the following lines (omitting the forward slashes) from config-dist.php may be added to config.php, amending the block names as required.
// These variables define DEFAULT block variables for new courses
// If this one is set it overrides all others and is the only one used.
//      $CFG->defaultblocks_override =    'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';
//
// These variables define the specific settings for defined course formats.
// They override any settings defined in the formats own config file.
//      $CFG->defaultblocks_site = 'site_main_menu,course_list:course_summary,calendar_month';
//      $CFG->defaultblocks_social =  'participants,search_forums,calendar_month,calendar_upcoming,social_activities,recent_activity,course_list';
//      $CFG->defaultblocks_topics =  'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';
//      $CFG->defaultblocks_weeks =  'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';
// These blocks are used when no other default setting is found.
//      $CFG->defaultblocks = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';

For example, to set the default block layout for topics format courses to People, Tags and Administration on the left, and Messages, Online users and Recent activity on the right, simply add the following line to your config.php file:
$CFG->defaultblocks_topics =  'participants,tags:messages,online_users,recent_activity';

Note how the colon is used to separate those blocks appearing on the left, from those appearing on the right.

Resetting the block layout for existing courses

The block layout for existing courses may be reset by copying the following script into a text file, saving it as resetblocks.php, copying it into the Moodle root directory, then visiting 
http://yourmoodlesite.org/resetblocks.php
.
Warning: This script may change the layout of your course pages and also remove blocks from those pages if they have not been specified in the config.php line. Check which of your courses has blocks which are not in the config.php line and be prepared to spend time adding blocks to your course pages again. Please note that a database backup is recommended before using the script.
M2.2 and later:
<?php
//moodle 2.2+
require_once('config.php');
require_once($CFG->libdir.'/blocklib.php');
$courses = get_courses();//can be feed categoryid to just effect one category
foreach($courses as $course) {
   $context = context_course::instance($course->id);
   blocks_delete_all_for_context($context->id);
   blocks_add_default_course_blocks($course);
} 
?>

и небольшой комментарий: кажется если указать $CFG->defaultblocks = '' пустой строкой то выставляются блоки по умолчанию. Чтобы убрать все блоки можно указать какой-нибудь блок (например участники - Participants), а потом запретить его показывать другими средствами (способ отключения в след. пункте).

Управление блоками

Цель: Отключить видимость блоков у пользователя на страницах курса (для домашней страницы отдельный способ выше)

В документации тут:
https://docs.moodle.org/31/en/Managing_blocks


Manage blocksAn administrator can manage Moodle's blocks for the site in Administration > Site administration > Plugins > Blocks > Manage blocks, including any contributed blocks that have been added.

Hiding a blockThe hide/show column allows selected blocks to be hidden i.e. they do not appear in any course "Add a block" dropdown menu and cannot be used in any course. To hide a block, click the eye icon so that it changes to a closed eye.
To reduce the length of course "Add a block" dropdown menus, you should hide blocks which will not be used, such as mentees (unless you have added a mentor role) and network servers (unless you are using Moodle Networking).



Маленький хак по отключению форума


https://moodle.org/mod/forum/discuss.php?d=105471

You can actually do this through a URL hack. Go to the page where you would normally hide activities ( admin/modules.php) and look at the links for the other hide buttons (?hide=<activity>&sesskey=<yoursesskey>) You'll need to grab your sesskey from the link, but then you can write the URL:
<yourdomain>/admin/modules.php?hide=forum&sesskey=<yoursesskey>
т.е. у форума нет кнопочки скрыть, но можно взять за образец соседний УРЛ и подставить туда слово forum  


Отключить блог

Пишут что можно, а на самом деле в 3.1 нет пункта "Отключить блоги совсем"
https://docs.moodle.org/31/en/Blogs_FAQ
In Administration > Site administration > Appearance > Blog set bloglevel to 'Disable blogs completely'.

Отключить возможность видеть участников курса
 Site administration->Users->Permissions->Define roles, edit the "Student" role, and set 'moodle/course:viewparticipants'

отключить "moodle/course:viewparticipants"

Комментариев нет:

Отправить комментарий