ÿØÿà JFIF    ÿÛ „  ( %!1"%)+...383-7(-.+  -%%--------+------------/----------------------------ÿÀ  ¶" ÿÄ     ÿÄ @    !1AQaq‘¡"±ÁÑð2’BRráS‚ñ3b¢CT²Ò #cÿÄ    ÿÄ '   1!AQ2a"‘±#ÿÚ   ? ò(/p‘—–¢·,M|¯G»R£üešT. ôŸEoCFñ‡ 4ÔkåóxR|µÁ¨ÓDà!Ç´µ˜‡p ÍQ‹§!þž^õWsŒy  åÁ§$á«%ºq˜™JyyË0y«^Ϗ -3ÃÏËÈ£Æ\P’ä„s&•‹Üs üô'àWt¹pñCp$bÚF`·7.^)¾!)ÒÙ˜–ÅÏš^h¾ø³·ìe±ŒaeÖ—Í,e=B}Jéߦ$$½—šÙÜCC¯¶è8β–Åkèwx LÉngT±æ¹£Ócœ¿Í/©Éÿ ‰ÚCÒ­mq;Tt¶–}0"zÖPcd1š­¤tˆ„ÐÓâqú[™öUCŠ2޿د­É(¸ßúçšmW,Ò ºf‹Ån™ÄLêÁ8üÁkÁ€L¥ÍuJ1œôrÂSŒÓöt!7EUíïb)AËi¬â-ÙHk8òÁiXYwÅ)O^"ÇØriÛô{»wRUKÙÏÚlÓ¬€‚’שT ] ªb—ÊîKC^×M“xùäñz¬zJ× {4[¹M'IÆeH1LCWÕ]œûº WDæà°OÅ‚¹c²ÞuA–rL`HšpCez‡V’— Ž‚Ë„–ñ­'µR0ÕÖ=À:±G»C\nÆÉ5*¢ †3šhQ4ýÒi$Õ1"Ü]¢p-q3zcQ$ªö¨¥æf›‘»´ÝÚHá„e²JÇ–iÊ:·à¬Øc5Åk»Laª*wi [0Ówk ¦a¦0Õ²ÅÅ‚T¸’³q:Æ<¹ú Ò˜Æ}2VE•Ѐp¡Ô3Úº …h³^LJºçì¥Ánó|˜ÖˆÎˆ+« ¦dø‘Mº–d\ªDðÛ„Ì×LÝ——Ð9Ç|•FèçVm™¨€™3õS–9Äå¢<̉Ìm¢±`·º˜&Z²ž Ë®D«¶»6™‰©­HÈ Àá«h­i³04æ’hxœi3ï¨(ÓL·†‹¶ËpŒ ƒÜÒ? :õdsÀ –3æÓ·Üjâ¬9—]8n¼&]I F£¼…ì–—Œ0v°LǐÅfÛ2TÖ’aµ˜N@ÖBSÏ^à´4-±°b×nÈÈœÆD=KdŒø…ÄÈK,›ÖR§fjü$^ÔÎ!„6^ s:Üun\ôkCÞò÷<—Lúl Í›G¹ÀPá¼Nc¡šÒ…ÙWͳœ±vÊáЄ×9‹P‰cEØ‘™›µŸP<×g1 º©Ø¬wiÁ^l5× I/';Ë+´Z‡ÓÄFÕp[Èð’ HÄ ó 9¬Dl4“é±Ï”V=^Hð;žLädÉa‚°Ë,#/Ž~²BÔÛ QãñQtIeórVB,ÏÂf‹4#Μc‹É3ZIÖ Œ¢¥·üxa‡Ãçè„jŠ[5 Ä!U?,3žÎ×…ðdÓ÷háŠA‰ìÄ4÷ÃÜZÃE{‰®+W\ZÍE[‰»µk»MÝ­`¢©†˜ÃV‹-f¢¡†¢a«eŠ%«Y¨©q%jâd,Ôq`) ¤¦…šˆ ¦E>0Ùb²t–Ÿ  ÷jsςҒKÈcø(é›;k(’#ôŒQ ™C> õ³M9óºÆµ¤çâ;uÀ)5>RÔ¸fÓ~Ȧ—’-$fe«"FâUˆÊwµPÏu w+"åÉó¨6s™Û9(À¨ù©hE°½†n`m~“@©›p!Vkhµ Á1šbEqqÊ@ºèl›2 –Yã%‘‚hÛ{a¶‡ÅÞM²¬çL34®Çl]®‹ŽØŒm'RÜe35æöˆ­Á­ cP9šeÁköo´L³Ì=p8]”‡B¶,šº|ɏdzXˆØk*ÇÚ{#ñ‰pã(€¶‡9ý'šÜ³½¯kƒ†Â’ëSOƒ•Å®H6+a¢µˆ‹Y¨b˜b+XˆÖ!°u!¢"µˆˆn2ˆ Å0Ä`Å Ô®c(ÓÜGº•Ä»Œ âWî%q.áÐÄ÷î%umÍ£+ÜQ,Vn¦-GphU¸¢X­&,Gt ·K¢ÅÅ·¥RÄÊÉbKn N­R2g$VµÕó Qr#–ÓZUÏð0ÎtÙÀœz ëöo“Îk¯n„T°"SÞ+³/…€½"ižãO%Í%&Δâ‘ËØ´IˆÓ°Ë‰ÞM3.™yçÁzit›`4C`k¢¼á!álÄï sÂ[×!¤l¾æo"ƒIÔ'@ªu)3›ô®“@Z à¾] üœ'‡4¸PÞkÁ-qÄH‰ÓÍBd´ÿ —¹°ÄA&ÊUC„öz‚‚RæŠtf¬>˜ÑidšEçÑL÷áý¡V±h§­c¿¥¨ƒ@g¼…Ýö^ÞËc.ž„æ“I[ ª+·zÐÒÚ,½Ð»¶€C›7jk$๖€Ž¾ÅÙpp¶ÍþéΤ ½ØÎŒq ñpæžÅ¥#Øâ49ÃÂK^MYV“,¶Éz_òæ:…;Õ«¦I3âJ£¤û5$7Èxün\â]Êe¯(Ÿ&Ž‹¶2<6Ćf× æ¢ƱqWı[(ÙÂŽç‚T7¨@ÈÉÍß‚ïÙ"&3TYlGށ†)†#5ŠA©^T2ÆÁ†)©†©†¤yGXÁ†©"†)©¼ÅV WS†#©]R–r‹q5ÕbâWþBh¯u+ªÅÄ×ü„nÑ^êkªÁj‰jeœWˆÕÕ`µDµ2Ì+Ä µDµµ5Ô{¤Þ0RF’H÷AÛ<ÊÁ§ ƈæ0Ñ£ê4 öÚµ[¬/1²€â<-¬šö²r×0o×w ´xÐÒË„ g01¬„åEM蛇Ã\6µE›‘fÙO k÷CºnÓ1`iîÒ² áÂ!ÑLÄÿ ³¬\õ*:M=Ç»c‹2[‰ØsÕLò\ŒK L^™üÄN\¶#» Ç\……ßïIœÉ$¸ÎñÍ®ÔHÇ Ûí/´>Li”„†g^$ 7NÍÑÑ2M2ªNg=k½Ð}Ÿl6‡ —JWˆ”ÞéT·+µ¦üÂFè¢Vs6ýÆ4»2+2IÝ9ô9®ÇGÙÇ1+Ä8;*Õ§ž½D*îÑWÚçá3Ma¤·ˆ¥t}š²Ü…Q+Æüµ8HíS”üxGéÁˆ¦Ël„éÈ 5 µÄƒ6äÜ(kIš¯S†fÖ&¸®×v|Äyˆ*禌Éù@7-®Ä[]ÎÖ¿ê`º…=:…žJVnݳvðÖKE¼‚ »mà ÷f®:Ë ™–4rð¡4` ܹçž~‹C=œ…¾Ïj|VDtK.ƒ"9 Ï ­–éXá³6WÒïIL-Ї Ç styles.css000064400000000741152266601430006610 0ustar00.block_myprofile img.profilepicture { height: 50px; width: 50px; } .block_myprofile .myprofileitem.fullname { font-size: 1.5em; font-weight: bold; margin-bottom: 0.5rem; } .block_myprofile .myprofileitem.edit { text-align: right; } .block_myprofile .content { display: flex; } .block_myprofile .myprofileitem.picture img { width: 50px; height: 50px; margin-right: 1rem; } .block_myprofile .myprofileitem span { font-weight: bold; } db/access.php000064400000003022152266601430007105 0ustar00. /** * My profile block caps. * * @package block_myprofile * @copyright Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $capabilities = array( 'block/myprofile:myaddinstance' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'archetypes' => array( 'user' => CAP_ALLOW ), 'clonepermissionsfrom' => 'moodle/my:manageblocks' ), 'block/myprofile:addinstance' => array( 'riskbitmask' => RISK_SPAM | RISK_XSS, 'captype' => 'write', 'contextlevel' => CONTEXT_BLOCK, 'archetypes' => array( 'editingteacher' => CAP_ALLOW, 'manager' => CAP_ALLOW ), 'clonepermissionsfrom' => 'moodle/site:manageblocks' ), ); lang/en/block_myprofile.php000064400000004152152266601430011767 0ustar00. /** * Strings for component 'block_myprofile', language 'en', branch 'MOODLE_20_STABLE' * * @package block_myprofile * @copyright 2010 Remote-Learner.net * @author Olav Jordan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['contentsettings'] = 'Display settings for content region'; $string['display_picture'] = 'Display picture'; $string['display_country'] = 'Display country'; $string['display_city'] = 'Display city'; $string['display_email'] = 'Display email'; $string['display_phone1'] = 'Display phone'; $string['display_phone2'] = 'Display mobile phone'; $string['display_idnumber'] = 'Display ID number'; $string['display_institution'] = 'Display institution'; $string['display_address'] = 'Display address'; $string['display_firstaccess'] = 'Display first access'; $string['display_lastaccess'] = 'Display last access'; $string['display_currentlogin'] = 'Display current login'; $string['display_lastip'] = 'Display last IP'; $string['display_lastlogin'] = 'Display last login'; $string['myprofile:addinstance'] = 'Add a new logged in user block'; $string['myprofile:myaddinstance'] = 'Add a new logged in user block to Dashboard'; $string['myprofile_settings'] = 'Visible user information'; $string['pluginname'] = 'Logged in user'; $string['privacy:metadata'] = 'The Logged in user block only shows information about the logged in user and does not store data itself.'; edit_form.php000064400000014441152266601430007236 0ustar00. defined('MOODLE_INTERNAL') || die(); /** * Form for editing profile block settings * * @package block_myprofile * @copyright 2010 Remote-Learner.net * @author Olav Jordan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class block_myprofile_edit_form extends block_edit_form { protected function specific_definition($mform) { global $CFG; $mform->addElement('header', 'configheader', get_string('myprofile_settings', 'block_myprofile')); $mform->addElement('selectyesno', 'config_display_picture', get_string('display_picture', 'block_myprofile')); if (isset($this->block->config->display_picture)) { $mform->setDefault('config_display_picture', $this->block->config->display_picture); } else { $mform->setDefault('config_display_picture', '1'); } $mform->addElement('selectyesno', 'config_display_country', get_string('display_country', 'block_myprofile')); if (isset($this->block->config->display_country)) { $mform->setDefault('config_display_country', $this->block->config->display_country); } else { $mform->setDefault('config_display_country', '1'); } $mform->addElement('selectyesno', 'config_display_city', get_string('display_city', 'block_myprofile')); if (isset($this->block->config->display_city)) { $mform->setDefault('config_display_city', $this->block->config->display_city); } else { $mform->setDefault('config_display_city', '1'); } $mform->addElement('selectyesno', 'config_display_email', get_string('display_email', 'block_myprofile')); if (isset($this->block->config->display_email)) { $mform->setDefault('config_display_email', $this->block->config->display_email); } else { $mform->setDefault('config_display_email', '1'); } $mform->addElement('selectyesno', 'config_display_phone1', get_string('display_phone1', 'block_myprofile')); if (isset($this->block->config->display_phone1)) { $mform->setDefault('config_display_phone1', $this->block->config->display_phone1); } else { $mform->setDefault('config_display_phone1', '0'); } $mform->addElement('selectyesno', 'config_display_phone2', get_string('display_phone2', 'block_myprofile')); if (isset($this->block->config->display_phone2)) { $mform->setDefault('config_display_phone2', $this->block->config->display_phone2); } else { $mform->setDefault('config_display_phone2', '0'); } $mform->addElement('selectyesno', 'config_display_institution', get_string('display_institution', 'block_myprofile')); if (isset($this->block->config->display_institution)) { $mform->setDefault('config_display_institution', $this->block->config->display_institution); } else { $mform->setDefault('config_display_institution', '0'); } $mform->addElement('selectyesno', 'config_display_address', get_string('display_address', 'block_myprofile')); if (isset($this->block->config->display_address)) { $mform->setDefault('config_display_address', $this->block->config->display_address); } else { $mform->setDefault('config_display_address', '0'); } $mform->addElement('selectyesno', 'config_display_idnumber', get_string('display_idnumber', 'block_myprofile')); if (isset($this->block->config->display_idnumber)) { $mform->setDefault('config_display_idnumber', $this->block->config->display_idnumber); } else { $mform->setDefault('config_display_idnumber', '0'); } $mform->addElement('selectyesno', 'config_display_firstaccess', get_string('display_firstaccess', 'block_myprofile')); if (isset($this->block->config->display_firstaccess)) { $mform->setDefault('config_display_firstaccess', $this->block->config->display_firstaccess); } else { $mform->setDefault('config_display_firstaccess', '0'); } $mform->addElement('selectyesno', 'config_display_lastaccess', get_string('display_lastaccess', 'block_myprofile')); if (isset($this->block->config->display_lastaccess)) { $mform->setDefault('config_display_lastaccess', $this->block->config->display_lastaccess); } else { $mform->setDefault('config_display_lastaccess', '0'); } $mform->addElement('selectyesno', 'config_display_currentlogin', get_string('display_currentlogin', 'block_myprofile')); if (isset($this->block->config->display_currentlogin)) { $mform->setDefault('config_display_currentlogin', $this->block->config->display_currentlogin); } else { $mform->setDefault('config_display_currentlogin', '0'); } $mform->addElement('selectyesno', 'config_display_lastip', get_string('display_lastip', 'block_myprofile')); if (isset($this->block->config->display_lastip)) { $mform->setDefault('config_display_lastip', $this->block->config->display_lastip); } else { $mform->setDefault('config_display_lastip', '0'); } $mform->addElement('selectyesno', 'config_display_lastlogin', get_string('display_lastlogin', 'block_myprofile')); if (isset($this->block->config->display_lastlogin)) { $mform->setDefault('config_display_lastlogin', $this->block->config->display_lastlogin); } else { $mform->setDefault('config_display_lastlogin', '0'); } } }version.php000064400000002306152266601430006750 0ustar00. /** * Current user info block. * * @package block_myprofile * @copyright 2010 Remote-Learner.net * @author Olav Jordan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $plugin->version = 2025041400; // The current plugin version (Date: YYYYMMDDXX). $plugin->requires = 2025040800; // Requires this Moodle version. $plugin->component = 'block_myprofile'; // Full name of the plugin (used for diagnostics) block_myprofile.php000064400000007451152266601430010451 0ustar00. /** * Block displaying information about current logged-in user. * * This block can be used as anti cheating measure, you * can easily check the logged-in user matches the person * operating the computer. * * @package block_myprofile * @copyright 2010 Remote-Learner.net * @author Olav Jordan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); /** * Displays the current user's profile information. * * @copyright 2010 Remote-Learner.net * @author Olav Jordan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class block_myprofile extends block_base { /** * block initializations */ public function init() { $this->title = get_string('pluginname', 'block_myprofile'); } /** * block contents * * @return object */ public function get_content() { if ($this->content !== NULL) { return $this->content; } if (!isloggedin() or isguestuser()) { // Only real users can access myprofile block. return; } $renderable = new \block_myprofile\output\myprofile($this->config); $renderer = $this->page->get_renderer('block_myprofile'); $this->content = new stdClass(); $this->content->text = $renderer->render($renderable); $this->content->footer = ''; return $this->content; } /** * allow the block to have a configuration page * * @return boolean */ public function has_config() { return false; } /** * allow more than one instance of the block on a page * * @return boolean */ public function instance_allow_multiple() { //allow more than one instance on a page return false; } /** * allow instances to have their own configuration * * @return boolean */ function instance_allow_config() { //allow instances to have their own configuration return false; } /** * instance specialisations (must have instance allow config true) * */ public function specialization() { } /** * locations where block can be displayed * * @return array */ public function applicable_formats() { return array('all'=>true); } /** * post install configurations * */ public function after_install() { } /** * post delete configurations * */ public function before_delete() { } /** * Return the plugin config settings for external functions. * * @return stdClass the configs for both the block instance and plugin * @since Moodle 3.8 */ public function get_config_for_external() { // Return all settings for all users since it is safe (no private keys, etc..). $configs = !empty($this->config) ? $this->config : new stdClass(); return (object) [ 'instance' => $configs, 'plugin' => new stdClass(), ]; } } classes/privacy/provider.php000064400000002754152266601430012236 0ustar00. /** * Privacy Subsystem implementation for block_myprofile. * * @package block_myprofile * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace block_myprofile\privacy; defined('MOODLE_INTERNAL') || die(); /** * Privacy Subsystem for block_myprofile implementing null_provider. * * @copyright 2018 Zig Tan * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class provider implements \core_privacy\local\metadata\null_provider { /** * Get the language string identifier with the component's language * file to explain why this plugin stores no data. * * @return string */ public static function get_reason(): string { return 'privacy:metadata'; } } classes/output/renderer.php000064400000003062152266601430012066 0ustar00. /** * myprofile block rendrer * * @package block_myprofile * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace block_myprofile\output; defined('MOODLE_INTERNAL') || die; use plugin_renderer_base; /** * myprofile block renderer * * @package block_myprofile * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class renderer extends plugin_renderer_base { /** * Return the main content for the block myprofile. * * @param myprofile $myprofile The myprofile renderable * @return string HTML string */ public function render_myprofile(myprofile $myprofile) { return $this->render_from_template('block_myprofile/myprofile', $myprofile->export_for_template($this)); } } classes/output/myprofile.php000064400000010467152266601430012275 0ustar00. /** * Class containing data for myprofile block. * * @package block_myprofile * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace block_myprofile\output; defined('MOODLE_INTERNAL') || die(); use renderable; use renderer_base; use templatable; /** * Class containing data for myprofile block. * * @copyright 2018 Mihail Geshoski * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class myprofile implements renderable, templatable { /** * @var object An object containing the configuration information for the current instance of this block. */ protected $config; /** * Constructor. * * @param object $config An object containing the configuration information for the current instance of this block. */ public function __construct($config) { $this->config = $config; } /** * Export this data so it can be used as the context for a mustache template. * * @param \renderer_base $output * @return \stdClass */ public function export_for_template(renderer_base $output) { global $USER, $OUTPUT; $data = new \stdClass(); if (!isset($this->config->display_picture) || $this->config->display_picture == 1) { $data->userpicture = $OUTPUT->user_picture($USER, array('class' => 'userpicture')); } $data->userfullname = fullname($USER); if (!isset($this->config->display_country) || $this->config->display_country == 1) { $countries = get_string_manager()->get_list_of_countries(true); if (isset($countries[$USER->country])) { $data->usercountry = $countries[$USER->country]; } } if (!isset($this->config->display_city) || $this->config->display_city == 1) { $data->usercity = $USER->city; } if (!isset($this->config->display_email) || $this->config->display_email == 1) { $data->useremail = obfuscate_mailto($USER->email, ''); } if (!empty($this->config->display_phone1) && !empty($USER->phone1)) { $data->userphone1 = s($USER->phone1); } if (!empty($this->config->display_phone2) && !empty($USER->phone2)) { $data->userphone2 = s($USER->phone2); } if (!empty($this->config->display_institution) && !empty($USER->institution)) { $data->userinstitution = format_string($USER->institution); } if (!empty($this->config->display_address) && !empty($USER->address)) { $data->useraddress = format_string($USER->address); } if (!empty($this->config->display_idnumber) && !empty($USER->idnumber)) { $data->useridnumber = s($USER->idnumber); } if (!empty($this->config->display_firstaccess) && !empty($USER->firstaccess)) { $data->userfirstaccess = userdate($USER->firstaccess); } if (!empty($this->config->display_lastaccess) && !empty($USER->lastaccess)) { $data->userlastaccess = userdate($USER->lastaccess); } if (!empty($this->config->display_currentlogin) && !empty($USER->currentlogin)) { $data->usercurrentlogin = userdate($USER->currentlogin); } if (!empty($this->config->display_lastip) && !empty($USER->lastip)) { $data->userlastip = $USER->lastip; } if (!empty($this->config->display_lastlogin) && !empty($USER->lastlogin)) { $data->userlastlogin = userdate($USER->lastlogin); } return $data; } } templates/myprofile.mustache000064400000011017152266601430012310 0ustar00{{! This file is part of Moodle - http://moodle.org/ Moodle is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Moodle is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Moodle. If not, see . }} {{! @template block_myprofile/myprofile This template renders the content of the myprofile block. Classes required for JS: * none Data attributes required for JS: * none Context variables required for this template: * userfullname Optional context variables for this template: * userpicture * usercountry * usercity * useremail * userphone1 * userphone2 * userinstitution * useraddress * useridnumber * userfirstaccess * userlastaccess * usercurrentlogin * userlastip * userlastlogin Example context (json): { "userpicture": "", "userfullname": "John Doe", "usercountry": "Australia", "usercity": "Perth", "useremail": "john.doe@example.com", "userphone1": "123456789", "userphone2": "123456789", "userinstitution": "Institution", "useraddress": "Address", "useridnumber": "12345", "userfirstaccess": "Friday, 6 July 2018, 9:03 AM", "userlastaccess": "Wednesday, 26 September 2018, 8:05 AM", "usercurrentlogin": "Wednesday, 26 September 2018, 7:17 AM", "userlastip": "0:0:0:0:0:0:0:1", "userlastlogin": "Wednesday, 25 September 2018, 9:01 AM" } }}
{{#userpicture}}
{{{ userpicture }}}
{{/userpicture}}
{{ userfullname }}
{{#usercountry}}
{{#str}} country {{/str}}: {{ usercountry }}
{{/usercountry}} {{#usercity}}
{{#str}} city {{/str}}: {{ usercity }}
{{/usercity}} {{#useremail}}
{{#str}} email {{/str}}: {{{ useremail }}}
{{/useremail}} {{#userphone1}}
{{#str}} phone1 {{/str}}: {{ userphone1 }}
{{/userphone1}} {{#userphone2}}
{{#str}} phone2 {{/str}}: {{ userphone2 }}
{{/userphone2}} {{#userinstitution}}
{{#str}} institution {{/str}}: {{ userinstitution }}
{{/userinstitution}} {{#useraddress}}
{{#str}} address {{/str}}: {{ useraddress }}
{{/useraddress}} {{#useridnumber}}
{{#str}} idnumber {{/str}}: {{{ useridnumber }}}
{{/useridnumber}} {{#userfirstaccess}}
{{#str}} firstaccess {{/str}}: {{ userfirstaccess }}
{{/userfirstaccess}} {{#userlastaccess}}
{{#str}} lastaccess {{/str}}: {{ userlastaccess }}
{{/userlastaccess}} {{#usercurrentlogin}}
{{#str}} login {{/str}}: {{ usercurrentlogin }}
{{/usercurrentlogin}} {{#userlastlogin}}
{{#str}} lastlogin {{/str}}: {{ userlastlogin }}
{{/userlastlogin}} {{#userlastip}}
IP: {{ userlastip }}
{{/userlastip}}
tests/behat/block_myprofile_frontpage.feature000064400000002024152266601430015576 0ustar00@block @block_myprofile Feature: The logged in user block allows users to view their profile information on the front page In order to enable the logged in user block on the frontpage As an admin I can add the logged in user block to the frontpage and view my information Background: Given the following "users" exist: | username | firstname | lastname | email | idnumber | | teacher1 | Teacher | One | teacher1@example.com | T1 | And the following "blocks" exist: | blockname | contextlevel | reference | pagetypepattern | defaultregion | | myprofile | System | 1 | site-index | side-pre | Scenario: Try to view the logged in user block as a guest Given I log in as "guest" When I am on site homepage Then I should not see "Logged in user" Scenario: View the logged in user block by a logged in user Given I log in as "teacher1" When I am on site homepage Then I should see "Teacher One" in the "Logged in user" "block" tests/behat/block_myprofile.feature000064400000027334152266601430013544 0ustar00@block @block_myprofile Feature: The logged in user block allows users to view their profile information In order to enable the logged in user block As a user I can add the logged in user block and configure it to show my information Scenario: Configure the logged in user block to show / hide the users country Given the following "users" exist: | username | firstname | lastname | email | country | | teacher1 | Teacher | One | teacher1@example.com | AU | And I log in as "teacher1" And I turn editing mode on When I add the "Logged in user" block And I configure the "Logged in user" block And I set the following fields to these values: | Display country | No | And I press "Save changes" Then I should see "Teacher One" in the "Logged in user" "block" And I should not see "Australia" in the "Logged in user" "block" And I configure the "Logged in user" block And I set the following fields to these values: | Display country | Yes | And I press "Save changes" And I should see "Australia" in the "Logged in user" "block" Scenario: Configure the logged in user block to show / hide the users city Given the following "users" exist: | username | firstname | lastname | email | city | | teacher1 | Teacher | One | teacher1@example.com | Perth | And I log in as "teacher1" And I turn editing mode on When I add the "Logged in user" block And I configure the "Logged in user" block And I set the following fields to these values: | Display city | No | And I press "Save changes" Then I should see "Teacher One" in the "Logged in user" "block" And I should not see "Perth" in the "Logged in user" "block" And I configure the "Logged in user" block And I set the following fields to these values: | Display city | Yes | And I press "Save changes" And I should see "Perth" in the "Logged in user" "block" Scenario: Configure the logged in user block to show / hide the users email Given the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | One | teacher1@example.com | And I log in as "teacher1" And I turn editing mode on When I add the "Logged in user" block And I configure the "Logged in user" block And I set the following fields to these values: | Display email | No | And I press "Save changes" Then I should see "Teacher One" in the "Logged in user" "block" And I should not see "teacher1@example.com" in the "Logged in user" "block" And I configure the "Logged in user" block And I set the following fields to these values: | Display email | Yes | And I press "Save changes" And I should see "teacher1@example.com" in the "Logged in user" "block" Scenario: Configure the logged in user block to show / hide the users phone Given the following "users" exist: | username | firstname | lastname | email | phone1 | | teacher1 | Teacher | One | teacher1@example.com | 555-5555 | And I log in as "teacher1" And I turn editing mode on When I add the "Logged in user" block And I configure the "Logged in user" block And I set the following fields to these values: | Display phone | No | And I press "Save changes" Then I should see "Teacher One" in the "Logged in user" "block" And I should not see "555-5555" in the "Logged in user" "block" And I configure the "Logged in user" block And I set the following fields to these values: | Display phone | Yes | And I press "Save changes" And I should see "555-5555" in the "Logged in user" "block" Scenario: Configure the logged in user block to show / hide the users mobile phone Given the following "users" exist: | username | firstname | lastname | email | phone2 | | teacher1 | Teacher | One | teacher1@example.com | 555-5555 | And I log in as "teacher1" And I turn editing mode on When I add the "Logged in user" block And I configure the "Logged in user" block And I set the following fields to these values: | Display mobile phone | No | And I press "Save changes" Then I should see "Teacher One" in the "Logged in user" "block" And I should not see "555-5555" in the "Logged in user" "block" And I configure the "Logged in user" block And I set the following fields to these values: | Display mobile phone | Yes | And I press "Save changes" And I should see "555-5555" in the "Logged in user" "block" Scenario: Configure the logged in user block to show / hide the users Institution Given the following "users" exist: | username | firstname | lastname | email | institution | | teacher1 | Teacher | One | teacher1@example.com | myinstitution | And I log in as "teacher1" And I turn editing mode on When I add the "Logged in user" block And I configure the "Logged in user" block And I set the following fields to these values: | Display institution | No | And I press "Save changes" Then I should see "Teacher One" in the "Logged in user" "block" And I should not see "myinstitution" in the "Logged in user" "block" And I configure the "Logged in user" block And I set the following fields to these values: | Display institution | Yes | And I press "Save changes" And I should see "myinstitution" in the "Logged in user" "block" Scenario: Configure the logged in user block to show / hide the users address Given the following "users" exist: | username | firstname | lastname | email | address | | teacher1 | Teacher | One | teacher1@example.com | myaddress | And I log in as "teacher1" And I turn editing mode on When I add the "Logged in user" block And I configure the "Logged in user" block And I set the following fields to these values: | Display address | No | And I press "Save changes" Then I should see "Teacher One" in the "Logged in user" "block" And I should not see "myaddress" in the "Logged in user" "block" And I configure the "Logged in user" block And I set the following fields to these values: | Display address | Yes | And I press "Save changes" And I should see "myaddress" in the "Logged in user" "block" Scenario: Configure the logged in user block to show / hide the users first access Given the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | One | teacher1@example.com | And I log in as "teacher1" And I turn editing mode on When I add the "Logged in user" block And I configure the "Logged in user" block And I set the following fields to these values: | Display first access | No | And I press "Save changes" Then I should see "Teacher One" in the "Logged in user" "block" And I should not see "First access:" in the "Logged in user" "block" And I configure the "Logged in user" block And I set the following fields to these values: | Display first access | Yes | And I press "Save changes" And I should see "First access:" in the "Logged in user" "block" Scenario: Configure the logged in user block to show / hide the users last access Given the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | One | teacher1@example.com | And I log in as "teacher1" And I turn editing mode on When I add the "Logged in user" block And I configure the "Logged in user" block And I set the following fields to these values: | Display last access | No | And I press "Save changes" Then I should see "Teacher One" in the "Logged in user" "block" And I should not see "Last access:" in the "Logged in user" "block" And I configure the "Logged in user" block And I set the following fields to these values: | Display last access | Yes | And I press "Save changes" And I should see "Last access:" in the "Logged in user" "block" Scenario: Configure the logged in user block to show / hide the users current login Given the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | One | teacher1@example.com | And I log in as "teacher1" And I turn editing mode on When I add the "Logged in user" block And I configure the "Logged in user" block And I set the following fields to these values: | Display current login | No | And I press "Save changes" Then I should see "Teacher One" in the "Logged in user" "block" And I should not see "Log in:" in the "Logged in user" "block" And I configure the "Logged in user" block And I set the following fields to these values: | Display current login | Yes | And I press "Save changes" And I should see "Log in:" in the "Logged in user" "block" Scenario: Configure the logged in user block to show / hide the users last ip Given the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | One | teacher1@example.com | And I log in as "teacher1" And I turn editing mode on When I add the "Logged in user" block And I configure the "Logged in user" block And I set the following fields to these values: | Display last IP | No | And I press "Save changes" Then I should see "Teacher One" in the "Logged in user" "block" And I should not see "IP:" in the "Logged in user" "block" And I configure the "Logged in user" block And I set the following fields to these values: | Display last IP | Yes | And I press "Save changes" And I should see "IP:" in the "Logged in user" "block" Scenario: Configure the logged in user block to show / hide the users idnumber Given the following "users" exist: | username | firstname | lastname | email | idnumber | | teacher1 | Teacher | One | teacher1@example.com | ID12345 | And I log in as "teacher1" And I turn editing mode on When I add the "Logged in user" block And I configure the "Logged in user" block And I set the following fields to these values: | Display ID number | No | And I press "Save changes" Then I should see "Teacher One" in the "Logged in user" "block" And I should not see "ID number:" in the "Logged in user" "block" And I configure the "Logged in user" block And I set the following fields to these values: | Display ID number | Yes | And I press "Save changes" And I should see "ID number:" in the "Logged in user" "block" Scenario: Configure the logged in user block to show / hide the users last login Given the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | One | teacher1@example.com | And I log in as "teacher1" And I turn editing mode on When I add the "Logged in user" block And I configure the "Logged in user" block And I set the following fields to these values: | Display last login | No | And I press "Save changes" Then I should see "Teacher One" in the "Logged in user" "block" And I should not see "Last login:" in the "Logged in user" "block" And I configure the "Logged in user" block And I set the following fields to these values: | Display last login | Yes | And I press "Save changes" And I log out And I log in as "teacher1" And I should see "Last login:" in the "Logged in user" "block" tests/behat/block_myprofile_course.feature000064400000001672152266601430015121 0ustar00@block @block_myprofile Feature: The logged in user block allows users to view their profile information in a course In order to enable the logged in user block in a course As a teacher I can add the logged in user block to a course and view my information Scenario: View the logged in user block by a user in a course Given the following "users" exist: | username | firstname | lastname | email | idnumber | | teacher1 | Teacher | One | teacher1@example.com | T1 | And the following "courses" exist: | fullname | shortname | category | | Course 1 | C1 | 0 | And the following "course enrolments" exist: | user | course | role | | teacher1 | C1 | editingteacher | When I log in as "teacher1" And I am on "Course 1" course homepage with editing mode on And I add the "Logged in user" block Then I should see "Teacher One" in the "Logged in user" "block" tests/behat/block_myprofile_activity.feature000064400000002412152266601430015446 0ustar00@block @block_myprofile Feature: The logged in user block allows users to view their profile information in an activity In order to enable the logged in user block in an activity As a teacher I can add the logged in user block to an activity and view my information Scenario: View the logged in user block by a user in an activity Given the following "users" exist: | username | firstname | lastname | email | idnumber | | teacher1 | Teacher | One | teacher1@example.com | T1 | And the following "courses" exist: | fullname | shortname | category | | Course 1 | C1 | 0 | And the following "course enrolments" exist: | user | course | role | | teacher1 | C1 | editingteacher | And the following "activities" exist: | activity | course | idnumber | name | intro | | page | C1 | page1 | Test page name | Test page description | And the following "blocks" exist: | blockname | contextlevel | reference | pagetypepattern | defaultregion | | myprofile | Activity module | page1 | mod-page-* | side-pre | When I am on the "Test page name" "page activity" page logged in as teacher1 Then I should see "Teacher One" in the "Logged in user" "block" tests/behat/block_myprofile_dashboard.feature000064400000001263152266601430015544 0ustar00@block @block_myprofile Feature: The logged in user block allows users to view their profile information in on the dashboard In order to enable the logged in user block on the dashboard As a user I can add the logged in user block to a the dashboard and view my information Scenario: View the logged in user block by a user on the dashboard Given the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | One | teacher1@example.com | And I log in as "teacher1" And I turn editing mode on When I add the "Logged in user" block Then I should see "Teacher One" in the "Logged in user" "block"