Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Voice Changelog: Difference between revisions

From MoodleDocs
(Note about plan not to migrate this page to the new developer resources. See template for more info.)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:WillNotMigrate}}
{{Voice}}
{{Voice}}
{{Moodle 2.0}}
= Moodle Code =
= Moodle Code =


Line 10: Line 9:


* Added
* Added
* Returns whether voicexml feature is enabled/allowed or not.
* 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
* Gets voice code from body and places it in the head (correct location).
* $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.
* @usage print_location_comment(__FILE__, __LINE__);
* @param string  $href Link Location
* @param string $href Link Location
* @param string $onclick script on link click( otherwise can be included with $otherattribute)
* @param string $linktext Link Text
* @param string $otherattribute For Links A tag
* @param string $otherattributes
* @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
generatevoicetag()
* Added
* Outputs a Voice Tag code
* @param string  $type Possible Values are voice(true/false), voiceruletext, voicetext, voicelink, voicescript
* @return string
* @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