Опубликовано David Scotson

Moodle in English -> Mathematics tools -> Bugs in TeX -> Re: Bugs in TeX

от David Scotson -
I have encountered a similar problem and think it is neither a TeX, mimeTex or HTMLeditor problem since I wasn't using any of them when I encountered it.

I was trying to backslash escape a backslash using the Markdown format i.e. enter \\ . It worked as expected until I tried to edit whereupon double backslashes were replaced with single ones.

Could it be something to do with the code for storing or retrieving strings from the database? Some brief testing suggests that the bug doesn't occur in the Forums but does in the resources.


(I didn't realise this thread was a year old when I posted, has anything happened in the last year?)

That's what happens when you don't have any languages defined for an element of Moodle. Every time there's a bit of code like this:

get_string('google', 'block_google');

It looks for the first string in a php file named for the second string (block_google.php in this case). A range of these files can be seen in the /lang/en/ (for english) directory.

So you could create a block_google.php file and add your own text, however, I believe that Martin's implementation of Google search, as seen on Moodle.org, is in CVS so you may prefer to use that.

And there is also a more advanced version that takes advantage of the Google API to display the search results within your Moodle that you may like to have a look at. There's [a post about it here].

In case anyone is intersted I discoverd a way around one of the drawbacks I listed above, namely that you can search within subdomains by using *inurl e.g. seaching for the following on Google

site:moodle.org inurl:moodle.org/mod/forum/

only returns hits from Moodle.org that have `moodle.org/mod/forum in the URL i.e. the content of forums and:

site:moodle.gla.ac.uk inurl:/guide/moodle

only returns hits (though not many because it's not open to the public) from one of the several moodle's hosted at moodle.gla.ac.uk with different urls of the form moodle.gla.ac.uk//moodle

If you have downloaded the Firefox browser and its Web Developer Extension then you can select the following from the Images menu:

  • Outline images with empty alt attributes
  • Outline images without alt attributes

To see where there may be issues of text needing to be added to alt attributes.

There is also:

  • replace images with alt attributes

Which will show up inappropriate use of alt text, usually needless duplication, that can be fixed by using empty alt attributes instead. I note that when I use this functionality in Moodle, e.g. on the forum entry page I'm currently using, the replacement text is often quite ambiguous грущу

By the way, could someone approve my glossary addition of Web Developer Extension? I recommend it quite a lot and it's a chore to look up the info each time. Thanks!

Web Developer Extension for Firefox info

There's a couple of issues interacting here;

  1. The alt and title are two different things, any browser that used one in the place of the other would be utterly braindead. Needless to say Internet Explorer does this, which has led to general confusion about their purpose. In brief: alt (short for alternative) is displayed when the image isn't, title expands upon the image/alt text and is generally displayed when you hover over the image. In depth: joe clark on accessible images (warning: that book chapter includes, for no obvious reason, a link to a site of an adult nature)

  2. It is not possible for a computer to check the accessibility of a webpage, just as it is impossible for a computer to check the spelling of your word processed document. Yes, it can underline Moodle in red because it's not in its list of words, but it will remain silent about using 'there' instead of 'their'. Similarly, accessibility checkers are usually explicit that they are only the first step in a process that requires human intervention.

In this particular example, the empty alt tags are actually the correct response since Moodle has many spacer gifs (it's been a while since I've needed to use that phrase!). Such images have no meaning and therefore should not show up in text/audio browsers. Lazy developers don't add any tags at all and so they show up as the filename by default (e.g. "spacer.gif") in text/audio browsers. Moodle developers have therefore actually put the effort in to add empty alt tags to improve the accessibility of the site. On the other hand, the icons for the info, guest access and enrolment key do all have appropriate alt texts already ("Summary", "This course allows guest users to enter" and "This course requires an enrolment key" respectively).

So Moodle gets a gold star for accessibility (in this case at least).

The failure by the way is a missing alt attribute for the slashdot logo in the RSS block.

Well one problem is that the PHP hasn't been processed into HTML so there is still PHP code embedded in it.

For the first error I would probably simply remove the valign="absmiddle" and see how it looks.

Also, the alt text of "image" is pretty useless. If it's not adding any information then it should just be alt="".