ÿØÿà 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-Ї Ç home/smkb8269/public_html/lms.smk-almanshuriyah.sch.id/backup/util/ui/backup_ui.class.php000064400000016635152266772270025332 0ustar00. /** * This file contains the backup user interface class * * @package core_backup * @copyright 2010 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ /** * This is the backup user interface class * * The backup user interface class manages the user interface and backup for Moodle. * * @package core_backup * @copyright 2010 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class backup_ui extends base_ui { /** * The stages of the backup user interface. * The initial stage of the backup - settings are here. */ const STAGE_INITIAL = 1; /** * The stages of the backup user interface. * The schema stage of the backup - here you choose the bits you include. */ const STAGE_SCHEMA = 2; /** * The stages of the backup user interface. * The confirmation stage of the backup. */ const STAGE_CONFIRMATION = 4; /** * The stages of the backup user interface. * The final stage of the backup - where it is being processed. */ const STAGE_FINAL = 8; /** * The stages of the backup user interface. * The backup is now complete. */ const STAGE_COMPLETE = 16; /** * If set to true the current stage is skipped. * @var bool */ protected static $skipcurrentstage = false; /** * Intialises what ever stage is requested. If none are requested we check * params for 'stage' and default to initial * * @param int $stage The desired stage to intialise or null for the default * @param array $params * @return backup_ui_stage_initial|backup_ui_stage_schema|backup_ui_stage_confirmation|backup_ui_stage_final */ protected function initialise_stage($stage = null, ?array $params = null) { if ($stage == null) { $stage = optional_param('stage', self::STAGE_INITIAL, PARAM_INT); } if (self::$skipcurrentstage) { $stage *= 2; } switch ($stage) { case backup_ui::STAGE_INITIAL: $stage = new backup_ui_stage_initial($this, $params); break; case backup_ui::STAGE_SCHEMA: $stage = new backup_ui_stage_schema($this, $params); break; case backup_ui::STAGE_CONFIRMATION: $stage = new backup_ui_stage_confirmation($this, $params); break; case backup_ui::STAGE_FINAL: $stage = new backup_ui_stage_final($this, $params); break; default: $stage = false; break; } return $stage; } /** * Returns the backup id * @return string */ public function get_uniqueid() { return $this->get_backupid(); } /** * Gets the backup id from the controller * @return string */ public function get_backupid() { return $this->controller->get_backupid(); } /** * Executes the backup plan * @throws backup_ui_exception when the steps are wrong. * @return bool */ public function execute() { if ($this->progress >= self::PROGRESS_EXECUTED) { throw new backup_ui_exception('backupuialreadyexecuted'); } if ($this->stage->get_stage() < self::STAGE_FINAL) { throw new backup_ui_exception('backupuifinalisedbeforeexecute'); } $this->progress = self::PROGRESS_EXECUTED; $this->controller->finish_ui(); $this->controller->execute_plan(); $this->stage = new backup_ui_stage_complete($this, $this->stage->get_params(), $this->controller->get_results()); return true; } /** * Loads the backup controller if we are tracking one * @param string $backupid * @return backup_controller|false */ final public static function load_controller($backupid = false) { // Get the backup id optional param. if ($backupid) { try { // Try to load the controller with it. // If it fails at this point it is likely because this is the first load. $controller = backup_controller::load_controller($backupid); return $controller; } catch (Exception $e) { return false; } } return $backupid; } /** * Gets an array of progress bar items that can be displayed through the backup renderer. * @return array Array of items for the progress bar */ public function get_progress_bar() { global $PAGE; $stage = self::STAGE_COMPLETE; $currentstage = $this->stage->get_stage(); $items = array(); while ($stage > 0) { $classes = array('backup_stage'); if (floor($stage / 2) == $currentstage) { $classes[] = 'backup_stage_next'; } else if ($stage == $currentstage) { $classes[] = 'backup_stage_current'; } else if ($stage < $currentstage) { $classes[] = 'backup_stage_complete'; } $item = array('text' => strlen(decbin($stage)).'. '.get_string('currentstage'.$stage, 'backup'), 'class' => join(' ', $classes)); if ($stage < $currentstage && $currentstage < self::STAGE_COMPLETE && (!self::$skipcurrentstage || ($stage * 2) != $currentstage)) { $params = $this->stage->get_params(); if (empty($params)) { $params = array(); } $params = array_merge($params, array('backup' => $this->get_backupid(), 'stage' => $stage)); $item['link'] = new moodle_url($PAGE->url, $params); } array_unshift($items, $item); $stage = floor($stage / 2); } return $items; } /** * Gets the name related to the operation of this UI * @return string */ public function get_name() { return 'backup'; } /** * Gets the id of the first stage this UI is reponsible for * @return int */ public function get_first_stage_id() { return self::STAGE_INITIAL; } /** * If called with default arg the current stage gets skipped. * @static * @param bool $setting Set to true (default) if you want to skip this stage, false otherwise. */ public static function skip_current_stage($setting = true) { self::$skipcurrentstage = $setting; } } /** * Backup user interface exception. Modelled off the backup_exception class * * @package core_backup * @copyright 2010 Sam Hemelryk * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class backup_ui_exception extends base_ui_exception {}