Development:Voice Changelog: Difference between revisions
From MoodleDocs
mayank jain (talk | contribs) (→Weblib) |
Helen Foster (talk | contribs) m (template removed) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Voice}} | {{Voice}} | ||
= Moodle Code = | = Moodle Code = | ||
Line 13: | Line 11: | ||
* Returns true/false. | * Returns true/false. | ||
post_process_voice() | post_process_voice($output = '', $alllinksvoiceenabled = true) | ||
* Added | * Added | ||
* Post processes xhtml code | * Post processes xhtml code | ||
* $alllinksvoiceenabled = true : By default all links will be made voice enabled | |||
* $alllinksvoiceenabled = false : By default no link will be made voice enabled | |||
* Parses the xhtml and generates voice code and puts in the head. | * Parses the xhtml and generates voice code and puts in the head. | ||
* Also gets voice code from body and places it in the head. | * Also gets voice code from body and places it in the head. |
Latest revision as of 14:19, 16 May 2008
Moodle Code
Lib
Voicexmllib
voicexmlenabled()
- Added
- Checks the browser version. If "greater than Opera 9.0 and voicexml is enabled" it returns true.
- Returns true/false.
post_process_voice($output = , $alllinksvoiceenabled = true)
- Added
- Post processes xhtml code
- $alllinksvoiceenabled = true : By default all links will be made voice enabled
- $alllinksvoiceenabled = false : By default no link will be made voice enabled
- Parses the xhtml and generates voice code and puts in the head.
- Also gets voice code from body and places it in the head.
Weblib
Includes voicexmllib.php
print_header()
- Modified
- Code for checking if voicexml is enabled and printing corresponding header information.
- Code for checking if voicexml is enabled. If it is "ob_start()"
print_footer()
- Modified
- Code for checking if voicexml is enabled. If it is "ob_end_clean()"
createlink()
- Added
- Outputs a HTML Link (A Tag) code and correspondingly also outputs
- the voice code for it if $voice is true.
- @param string $href Link Location
- @param string $onclick script on link click( otherwise can be included with $otherattribute)
- @param string $otherattribute For Links A tag
- @param string $anchorhtml Data between opening and closing tags Anchor Text and Image etc:
- @param boolean $voice Whether to output voice code
- @param string $voiceruletext Rule for the anchor text
- @param string $voicetext voice text for some vague reason if it is different from anchor text
- @param string $voicelink Link action for voice
- @param string $voicescript Script action in voice
- @return string
generatevoicetag()
- Added
- Outputs a Voice Tag code
- @param string $type Possible Values are voice(true/false), voiceruletext, voicetext, voicelink, voicescript
- @return string