Moodle

admin ui setting to disable simple "text type" resource

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.4
  • Fix Version/s: 2.0
  • Component/s: Resource
  • Labels:
    None
  • Environment:
    php 5, moodle 1.9.4, apache 2,mysql 5
  • Database:
    MySQL
  • Difficulty:
    Easy
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

on popular demand (of our teachers) over the last year...
we have disabled the plain old simple text resource
that was confusing teachers and now we all use only html resource

btw, it could be more readable if we called it "rich format layout" and that way
it will not scare off teachers that think it has something to do with HTML coding

to the patch...
i added a new parameter at the end of mod/resource/setting.php

$settings->add(new admin_setting_configcheckbox('resource_disabletexttype', get_string('disabletexttype', 'resource'),
get_string('configdisabletexttype', 'resource'), 1));

and translated it to the proper installed languages.
( example; lang/en_utf8/resource.php )
$string['disabletexttype'] = 'disable simple Text resource';
$string['configdisabletexttype'] = 'enableing this will show plain simple Text resource in the resource listbox (edit mode)';

change mod/resource/lib.php (function : resource_get_types() ) line 532~

from:
$standardresources = array('text','html','file','directory');

to:
if ($CFG->resource_disabletexttype == 1) { // disable 'text' simple and un-used resource type (nadavkav) $standardresources = array('html','file','directory'); } else { $standardresources = array('text','html','file','directory'); }

hope you all like it and think it's awesome too

Activity

Hide
Nadav Kavalerchik added a comment -

i have also added a parallel folder (mod/resource/type.disabled)
to the original (mod/resource/type) resources extra plugged in folder
into which i moved "text" and "ims" resource types (as requested by our teachers).
(novice teachers to the Moodle system where using those resources which got them confused )

maybe an enable/disable listbox inside the "resource setting page" could help choose
what is displayed to the teachers and what is not?

Show
Nadav Kavalerchik added a comment - i have also added a parallel folder (mod/resource/type.disabled) to the original (mod/resource/type) resources extra plugged in folder into which i moved "text" and "ims" resource types (as requested by our teachers). (novice teachers to the Moodle system where using those resources which got them confused ) maybe an enable/disable listbox inside the "resource setting page" could help choose what is displayed to the teachers and what is not?
Hide
Karrie added a comment -

Can you provide me with instructions on how to add a paralll folder with the information I need as this is a big problem for my teachers as well. I would also LOVE to hide the summary box as they dont really need it My email is kvitti@verizon.net Thanks!

Show
Karrie added a comment - Can you provide me with instructions on how to add a paralll folder with the information I need as this is a big problem for my teachers as well. I would also LOVE to hide the summary box as they dont really need it My email is kvitti@verizon.net Thanks!
Hide
Nadav Kavalerchik added a comment -

Hi Karrie

To disable the SUMMARY HTML <DIV> element in the page all you have to do is
find out which theme you are using. inside the theme's folder...open the file styles_layout.css
and add the following lines at the end of the css file. and save it. (of course)

.content .summary {
display:none;
}

Which will hide the element from the screen but still have it enabled, functional and useful
for other parts of the Moodle framework. since allot of blocks and other elements
depend on this element.

Actually, I advise you to use it. funny that you are asking to hide it.

Some block elements draw the title of the menu they generate
from the SUMMARY element.

Show
Nadav Kavalerchik added a comment - Hi Karrie To disable the SUMMARY HTML <DIV> element in the page all you have to do is find out which theme you are using. inside the theme's folder...open the file styles_layout.css and add the following lines at the end of the css file. and save it. (of course)
.content .summary {
display:none;
}
Which will hide the element from the screen but still have it enabled, functional and useful for other parts of the Moodle framework. since allot of blocks and other elements depend on this element. Actually, I advise you to use it. funny that you are asking to hide it. Some block elements draw the title of the menu they generate from the SUMMARY element.
Hide
Petr Škoda (skodak) added a comment -

The new mod/page should finally solve these problems, thank you for the report.

Petr Skoda

Show
Petr Škoda (skodak) added a comment - The new mod/page should finally solve these problems, thank you for the report. Petr Skoda

People

Vote (6)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: