public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/classes/courseprogress.php
/**
		 * Create a dropdown box using the list of values provided and select a value if $selected is specified.
		 *
		 * @param $name String The name of the drop down box.
		 * @param $values String  The values to use for the drop down box.
		 * @param $selected String  If specified, the value of the drop down box to mark as selected.
		 * @param $cssid String The CSS ID of the drop down list.
		 * @param $cssclass String The CSS class for the drop down list.
		 *
		 * @return String The HTML for the select box.
		 */
Create a dropdown box using the list of values provided and select a value if $selected is specified.
@param $name String The name of the drop down box.
@param $values String  The values to use for the drop down box.
@param $selected String  If specified, the value of the drop down box to mark as selected.
@param $cssid String The CSS ID of the drop down list.
@param $cssclass String The CSS class for the drop down list.

@return String The HTML for the select box.
Create a dropdown box using the list of values provided and select a value if $selected is specified . @param $name String The name of the drop down box . @param $values String The values to use for the drop down box . @param $selected String If specified the value of the drop down box to mark as selected . @param $cssid String The CSS ID of the drop down list . @param $cssclass String The CSS class for the drop down list . @return String The HTML for the select box .
static function createDropdown( $name, $values, $selected, $cssid = false, $cssclass = false ) {
			if ( ! $values ) {
				return false;
			}
			$selectedhtml = 'selected="selected" ';
			$css_attrib = false;
			if ( $cssid ) {
				$css_attrib = "id=\"$cssid\" ";
			}
			if ( $cssclass ) {
				$css_attrib .= "class=\"$cssclass\" ";
			}
			$html = sprintf( '<select name="%s" %s>', $name, $css_attrib );
			foreach ( $values as $key => $label ) {
				$html .= sprintf( '<option value="%s" %s>%s&nbsp;&nbsp;</option>', $key, ( $key == $selected ? $selectedhtml : '' ), $label );
			}
			return $html . '</select>';
		}
static function createDropdown ( $ name , $ values , $ selected , $ cssid = false , $ cssclass = false ) { if ( ! $ values ) { return false ; } $ selectedhtml = 'selected="selected" ' ; $ css_attrib = false ; if ( $ cssid ) { $ css_attrib = " id= \" $ cssid \" " ; } if ( $ cssclass ) { $ css_attrib .= " class= \" $ cssclass \" " ; } $ html = sprintf ( '<select name="%s" %s>' , $ name , $ css_attrib ) ; foreach ( $ values as $ key => $ label ) { $ html .= sprintf ( '<option value="%s" %s>%s&nbsp;&nbsp;</option>' , $ key , ( $ key == $ selected ? $ selectedhtml : '' ) , $ label ) ; } return $ html . '</select>' ; }
Create a dropdown box using the list of values provided and select a value if $selected is specified.
Create a dropdown box using the list of values provided and select a value if $selected is specified .
// CSS Attributes