*/
function print_headline($text, $size=2, $return=false) {
global $OUTPUT;
+ debugging('print_headline() has been deprecated. Please change your code to use $OUTPUT->heading().');
$output = $OUTPUT->heading($text, $size);
if ($return) {
return $output;
*/
function print_heading($text, $deprecated = '', $size = 2, $class = 'main', $return = false, $id = '') {
global $OUTPUT;
+ debugging('print_heading() has been deprecated. Please change your code to use $OUTPUT->heading().');
if (!empty($deprecated)) {
debugging('Use of deprecated align attribute of print_heading. ' .
'Please do not specify styling in PHP code like that.', DEBUG_DEVELOPER);
*/
function print_heading_block($heading, $class='', $return=false) {
global $OUTPUT;
+ debugging('print_heading_with_block() has been deprecated. Please change your code to use $OUTPUT->heading().');
$output = $OUTPUT->heading($heading, 2, 'headingblock header ' . moodle_renderer_base::prepare_classes($class));
if ($return) {
return $output;
*/
function print_box($message, $classes='generalbox', $ids='', $return=false) {
global $OUTPUT;
+ debugging('print_box() has been deprecated. Please change your code to use $OUTPUT->box().');
$output = $OUTPUT->box($message, $classes, $ids);
if ($return) {
return $output;
*/
function print_box_start($classes='generalbox', $ids='', $return=false) {
global $OUTPUT;
+ debugging('print_box_start() has been deprecated. Please change your code to use $OUTPUT->box_start().');
$output = $OUTPUT->box_start($classes, $ids);
if ($return) {
return $output;
*/
function print_box_end($return=false) {
global $OUTPUT;
+ debugging('print_box_end() has been deprecated. Please change your code to use $OUTPUT->box_end().');
$output = $OUTPUT->box_end();
if ($return) {
return $output;
function print_footer($course = NULL, $usercourse = NULL, $return = false) {
global $PAGE, $OUTPUT;
+ debugging('print_footer() has been deprecated. Please change your code to use $OUTPUT->footer().');
// TODO check arguments.
if (is_string($course)) {
debugging("Magic values like 'home', 'empty' passed to print_footer no longer have any effect. " .
$options=null, $return=false) {
global $OUTPUT;
- // debugging('link_to_popup_window() has been deprecated. Please change your code to use $OUTPUT->link_to_popup().');
+ // debugging('link_to_popup_window() has been deprecated. Please change your code to use $OUTPUT->link().');
if ($options == 'none') {
$options = null;
$link->add_action($popupaction);
// Call the output method
- $output = $OUTPUT->link_to_popup($link);
+ $output = $OUTPUT->link($link);
if ($return) {
return $output;
$id=null, $class=null) {
global $OUTPUT;
- // debugging('link_to_popup_window() has been deprecated. Please change your code to use $OUTPUT->link_to_popup().');
+ debugging('link_to_popup_window() has been deprecated. Please change your code to use $OUTPUT->link_to_popup().');
if ($options == 'none') {
$options = null;
function print_spacer($height=1, $width=1, $br=true, $return=false) {
global $CFG, $OUTPUT;
- // debugging('print_spacer() has been deprecated. Please change your code to use $OUTPUT->spacer().');
+ debugging('print_spacer() has been deprecated. Please change your code to use $OUTPUT->spacer().');
$spacer = new html_image();
$spacer->height = $height;
/// $width and height are legacy fields and no longer used as pixels like they used to be.
/// However, you can set them to zero to override the mincols and minrows values below.
- // debugging('print_textarea() has been deprecated. Please change your code to use $OUTPUT->textarea().');
+ debugging('print_textarea() has been deprecated. Please change your code to use $OUTPUT->textarea().');
global $CFG;
function doc_link($path='', $text='', $iconpath='') {
global $CFG, $OUTPUT;
- // debugging('doc_link() has been deprecated. Please change your code to use $OUTPUT->doc_link().');
+ debugging('doc_link() has been deprecated. Please change your code to use $OUTPUT->doc_link().');
if (empty($CFG->docroot)) {
return '';
function print_paging_bar($totalcount, $page, $perpage, $baseurl, $pagevar='page',$nocurr=false, $return=false) {
global $OUTPUT;
- // debugging('print_paging_bar() has been deprecated. Please change your code to use $OUTPUT->paging_bar($pagingbar).');
+ debugging('print_paging_bar() has been deprecated. Please change your code to use $OUTPUT->paging_bar($pagingbar).');
$pagingbar = moodle_paging_bar::make($totalcount, $page, $perpage, $baseurl);
$pagingbar->pagevar = $pagevar;
* @return string|void If $return=true returns string, else echo's and returns void
*/
function choose_from_menu_yesno($name, $selected, $script = '', $return = false, $disabled = false, $tabindex = 0) {
- // debugging('choose_from_menu_yesno() has been deprecated. Please change your code to use $OUTPUT->select($select).');
+ debugging('choose_from_menu_yesno() has been deprecated. Please change your code to use $OUTPUT->select($select).');
global $OUTPUT;
if ($script) {
function choose_from_menu_nested($options,$name,$selected='',$nothing='choose',$script = '',
$nothingvalue=0,$return=false,$disabled=false,$tabindex=0) {
- // debugging('choose_from_menu_nested() has been deprecated. Please change your code to use $OUTPUT->select($select).');
+ debugging('choose_from_menu_nested() has been deprecated. Please change your code to use $OUTPUT->select($select).');
global $OUTPUT;
if ($script) {
* @return string|bool Depending on value of $return
*/
function print_time_selector($hour, $minute, $currenttime=0, $step=5, $return=false) {
- // debugging('print_time_selector() has been deprecated. Please change your code to use $OUTPUT->select($timeselector).');
+ debugging('print_time_selector() has been deprecated. Please change your code to use $OUTPUT->select($timeselector).');
global $OUTPUT;
$hourselector = html_select::make_time_selector('hours', $hour, $currenttime);
$minuteselector = html_select::make_time_selector('minutes', $minute, $currenttime, $step);
*/
function print_date_selector($day, $month, $year, $currenttime=0, $return=false) {
- // debugging('print_date_selector() has been deprecated. Please change your code to use $OUTPUT->select($dateselector).');
+ debugging('print_date_selector() has been deprecated. Please change your code to use $OUTPUT->select($dateselector).');
global $OUTPUT;
$dayselector = html_select::make_time_selector('days', $day, $currenttime);
$targetwindow='self', $selectlabel='', $optionsextra=NULL, $submitvalue='', $disabled=false, $showbutton=false) {
global $OUTPUT;
- // debugging('popup_form() has been deprecated. Please change your code to use $OUTPUT->select($select).');
+ debugging('popup_form() has been deprecated. Please change your code to use $OUTPUT->select($select).');
if (empty($options)) {
return '';
function close_window_button($name='closewindow', $return=false, $reloadopener = false) {
global $OUTPUT;
- // debugging('close_window_button() has been deprecated. Please change your code to use $OUTPUT->close_window_button().');
+ debugging('close_window_button() has been deprecated. Please change your code to use $OUTPUT->close_window_button().');
$output = $OUTPUT->close_window_button(get_string($name));
if ($return) {
*/
function choose_from_radio ($options, $name, $checked='', $return=false) {
- // debugging('choose_from_radio() has been deprecated. Please change your code to use $OUTPUT->select($select).');
+ debugging('choose_from_radio() has been deprecated. Please change your code to use $OUTPUT->select($select).');
global $OUTPUT;
$select = html_select::make($options, $name, $checked);
*/
function print_heading_with_help($text, $helppage, $module='moodle', $icon=false, $return=false) {
- // debugging('print_heading_with_help() has been deprecated. Please change your code to use $OUTPUT->textfield($field).');
+ debugging('print_heading_with_help() has been deprecated. Please change your code to use $OUTPUT->textfield($field).');
global $OUTPUT;
* @return string
*/
function update_tag_button($tagid) {
- // debugging('update_tag_button() has been deprecated. Please change your code to use $OUTPUT->edit_button(moodle_url).');
+ debugging('update_tag_button() has been deprecated. Please change your code to use $OUTPUT->edit_button(moodle_url).');
return $OUTPUT->edit_button(new moodle_url($CFG->wwwroot.'/tag/index.php', array('id' => $tagid)));
}
function update_course_icon($courseid) {
global $CFG, $OUTPUT;
- // debugging('update_course_button() has been deprecated. Please change your code to use $OUTPUT->edit_button(moodle_url).');
+ debugging('update_course_button() has been deprecated. Please change your code to use $OUTPUT->edit_button(moodle_url).');
return $OUTPUT->edit_button(new moodle_url($CFG->wwwroot.'/course/view.php', array('id' => $courseid)));
}