Voice Changelog: Difference between revisions
From MoodleDocs
GSoC 07
Development
Project Management
mayank jain (talk | contribs) |
(Note about plan not to migrate this page to the new developer resources. See template for more info.) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Template:WillNotMigrate}} | |||
{{Voice}} | {{Voice}} | ||
= Moodle Code = | = Moodle Code = | ||
==Lib== | ==Lib== | ||
=== | ===Voicexmllib=== | ||
voicexmlenabled() | voicexmlenabled() | ||
* Added | * Added | ||
* | * Checks the browser version. If "greater than Opera 9.0 and voicexml is enabled" it returns true. | ||
* 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. | |||
* Also gets voice code from body and places it in the head. | |||
===Weblib=== | ===Weblib=== | ||
Includes voicexmllib.php | |||
print_header() | print_header() | ||
Line 24: | Line 29: | ||
* Modified | * Modified | ||
* Code for checking if voicexml is enabled and printing corresponding header information. | * 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() | createlink() | ||
Line 30: | Line 43: | ||
* Outputs a HTML Link (A Tag) code and correspondingly also outputs | * Outputs a HTML Link (A Tag) code and correspondingly also outputs | ||
* the voice code for it if $voice is true. | * the voice code for it if $voice is true. | ||
* @ | * @param string $href Link Location | ||
* @param string $ | * @param string $onclick script on link click( otherwise can be included with $otherattribute) | ||
* @param string $ | * @param string $otherattribute For Links A tag | ||
* @param string $ | * @param string $anchorhtml Data between opening and closing tags Anchor Text and Image etc: | ||
* @param boolean $voice Whether to output voice code | * @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 | * @return string | ||
generatevoicetag() | |||
* | * Added | ||
* Outputs a Voice Tag code | |||
* @param string $type Possible Values are voice(true/false), voiceruletext, voicetext, voicelink, voicescript | |||
* @return string | |||
* | |||
Latest revision as of 13:50, 24 June 2022
Warning: This page is no longer in use. The information contained on the page should NOT be seen as relevant or reliable. |
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