-
-
Save jethac/fdffa8374e67e63a0ef5 to your computer and use it in GitHub Desktop.
MDL-41608 Tester
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once('config.php'); | |
global $CFG; | |
$courseid = 1; | |
$course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST); | |
$context = context_course::instance($courseid); | |
$PAGE->set_course($course); | |
$PAGE->set_context($context); | |
$PAGE->set_pagelayout('embedded'); | |
echo $OUTPUT->doctype(); ?> | |
<html <?php echo $OUTPUT->htmlattributes(); ?>> | |
<head> | |
<title><?php echo $OUTPUT->page_title(); ?></title> | |
<link rel="shortcut icon" href="<?php echo $OUTPUT->favicon(); ?>" /> | |
<?php echo $OUTPUT->standard_head_html(); ?> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
.examples li { margin-bottom: 2em; } | |
.examples li > div { margin-bottom: 10px; } | |
.examples .classes { font-weight: bold; } | |
</style> | |
</head> | |
<body> | |
<div style="padding: 1em;"> | |
<h2>Basic notification() usage</h2> | |
<ul class="examples"> | |
<li> | |
<pre>echo $OUTPUT->notification("Success", "notifysuccess");</pre> | |
<?php | |
echo $OUTPUT->notification("Success", "notifysuccess"); | |
?> | |
</li> | |
<li> | |
<pre>echo $OUTPUT->notification("Tiny", "notifytiny");</pre> | |
<?php | |
echo $OUTPUT->notification("Tiny", "notifytiny"); | |
?> | |
</li> | |
<li> | |
<pre>echo $OUTPUT->notification("Problem", "notifyproblem");</pre> | |
<?php | |
echo $OUTPUT->notification("Problem", "notifyproblem"); | |
?> | |
</li> | |
<li> | |
<pre>echo $OUTPUT->notification("Message", "notifymessage");</pre> | |
<?php | |
echo $OUTPUT->notification("Message", "notifymessage"); | |
?> | |
</li> | |
</ul> | |
<h2>Using multiple classes with notification()</h2> | |
<ul class="examples"> | |
<li> | |
<pre>echo $OUTPUT->notification("Success", "notifysuccess foo bar");</pre> | |
<?php | |
echo $OUTPUT->notification("Success", "notifysuccess foo bar"); | |
?> | |
</li> | |
<li> | |
<pre>echo $OUTPUT->notification("Tiny", "notifytiny foo bar");</pre> | |
<?php | |
echo $OUTPUT->notification("Tiny", "notifytiny foo bar"); | |
?> | |
</li> | |
<li> | |
<pre>echo $OUTPUT->notification("Problem", "notifyproblem foo bar", "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");</pre> | |
<?php | |
echo $OUTPUT->notification("Problem", "notifyproblem foo bar", "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."); | |
?> | |
</li> | |
<li> | |
<pre>echo $OUTPUT->notification("Message", "notifymessage foo bar");</pre> | |
<?php | |
echo $OUTPUT->notification("Message", "notifymessage foo bar"); | |
?> | |
</li> | |
</ul> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment