/**
* Fetch and render dates from timestamps.
*
* @module core/user_date
* @copyright 2017 Ryan Wyllie <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("core/user_date",["jquery","core/ajax","core/sessionstorage","core/config"],(function($,Ajax,Storage,Config){var promisesCache={},getKey=function(request){return"core_user_date/"+$("html").attr("lang").replace(/-/g,"_")+"/"+Config.usertimezone+"/"+request.timestamp+"/"+request.format},loadDatesFromServer=function(dates){var args=dates.map((function(data){var fixDay=data.hasOwnProperty("fixday")?data.fixday:1,fixHour=data.hasOwnProperty("fixhour")?data.fixhour:1;return{timestamp:data.timestamp,format:data.format,type:data.type||null,fixday:fixDay,fixhour:fixHour}})),request={methodname:"core_get_user_dates",args:{contextid:Config.contextid,timestamps:args}};return Ajax.call([request],!0,!0)[0].then((function(results){results.dates.forEach((function(value,index){var date=dates[index];!function(key,value){Storage.set(key,value)}(getKey(date),value),date.deferred.resolve(value)}))})).catch((function(ex){dates.forEach((function(date){date.deferred.reject(ex)}))}))};return{get:function(requests){var ajaxRequests=[],promises=[];return requests.forEach((function(request){var key=getKey(request);if(function(key){return void 0!==promisesCache[key]}(key))promises.push(function(key){return promisesCache[key]}(key));else{var deferred=$.Deferred(),cached=function(key){return Storage.get(key)}(key);cached?deferred.resolve(cached):(request.deferred=deferred,ajaxRequests.push(request)),function(key,promise){promisesCache[key]=promise}(key,deferred.promise()),promises.push(deferred.promise())}})),ajaxRequests.length&&loadDatesFromServer(ajaxRequests),$.when.apply($,promises).then((function(){return 1===arguments.length?[arguments[0]]:Array.apply(null,arguments)}))},getUserMidnightForTimestamp:function(timestamp,todayMidnight){var future=timestamp>todayMidnight,diffSeconds=Math.abs(timestamp-todayMidnight),diffDaysInSeconds=86400*(future?Math.floor(diffSeconds/86400):Math.ceil(diffSeconds/86400));return future?todayMidnight+diffDaysInSeconds:todayMidnight-diffDaysInSeconds}}}));
define("core/usermenu",["exports","jquery","core/key_codes"],(function(_exports,_jquery,_key_codes){var obj;
/**
* Initializes and handles events in the user menu.
*
* @module core/usermenu
* @copyright 2021 Moodle
* @author Mihail Geshoski <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_jquery=(obj=_jquery)&&obj.__esModule?obj:{default:obj};const selectors_userMenu=".usermenu",selectors_userMenuCarousel=".usermenu #usermenu-carousel",selectors_userMenuCarouselItem=".usermenu #usermenu-carousel .carousel-item",selectors_userMenuCarouselItemActive=".usermenu #usermenu-carousel .carousel-item.active",selectors_userMenuCarouselNavigationLink=".usermenu #usermenu-carousel .carousel-navigation-link";var _default={init:()=>{(()=>{const userMenu=document.querySelector(selectors_userMenu);(0,_jquery.default)(selectors_userMenu).on("shown.bs.dropdown",(()=>{const activeCarouselItem=document.querySelector(selectors_userMenuCarouselItemActive);activeCarouselItem.focus(),userMenu.querySelectorAll(selectors_userMenuCarouselItem).forEach((element=>{element.classList.contains("active")||(element.style.width=activeCarouselItem.offsetWidth+"px",element.style.height=activeCarouselItem.offsetHeight+"px")}))})),userMenu.addEventListener("click",(e=>{e.target.matches(selectors_userMenuCarouselNavigationLink)&&carouselManagement(e)})),userMenu.addEventListener("keydown",(e=>{e.keyCode!==_key_codes.space&&e.keyCode!==_key_codes.enter||!e.target.matches(selectors_userMenuCarouselNavigationLink)||(e.preventDefault(),carouselManagement(e))}));const carouselManagement=e=>{e.stopPropagation();const targetedCarouselItemId=e.target.dataset.carouselTargetId,targetedCarouselItem=userMenu.querySelector("#"+targetedCarouselItemId),index=Array.from(targetedCarouselItem.parentNode.children).indexOf(targetedCarouselItem);(0,_jquery.default)(selectors_userMenuCarousel).carousel(index)};(0,_jquery.default)(selectors_userMenu).on("hide.bs.dropdown",(()=>{(0,_jquery.default)(selectors_userMenuCarousel).carousel(0)})),(0,_jquery.default)(selectors_userMenuCarousel).on("slid.bs.carousel",(()=>{userMenu.querySelector(selectors_userMenuCarouselItemActive).focus()}))})()}};return _exports.default=_default,_exports.default}));
/**
* This is an empty module, that is required before all other modules.
* Because every module is returned from a request for any other module, this
* forces the loading of all modules with a single request.
*
* @module core/log
* @copyright 2015 Andrew Nicols <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define("core/log",["core/loglevel"],(function(log){var originalFactory=log.methodFactory;return log.methodFactory=function(methodName,logLevel){var rawMethod=originalFactory(methodName,logLevel);return function(message,source){rawMethod(source?source+": "+message:message)}},log.setConfig=function(config){void 0!==config.level&&log.setLevel(config.level)},log}));
/**
* Chart pie.
*
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @module core/chart_pie
*/
define("core/chart_pie",["core/chart_base"],(function(Base){function Pie(){Base.prototype.constructor.apply(this,arguments)}return Pie.prototype=Object.create(Base.prototype),Pie.prototype.TYPE="pie",Pie.prototype._doughnut=null,Pie.prototype.create=function(Klass,data){var chart=Base.prototype.create.apply(this,arguments);return chart.setDoughnut(data.doughnut),chart},Pie.prototype.addSeries=function(series){if(null===series.getColor()){for(var colors=[],configColorSet=this.getConfigColorSet()||Base.prototype.COLORSET,i=0;i<series.getCount();i++)colors.push(configColorSet[i%configColorSet.length]);series.setColors(colors)}return Base.prototype.addSeries.apply(this,arguments)},Pie.prototype.getDoughnut=function(){return this._doughnut},Pie.prototype.setDoughnut=function(doughnut){this._doughnut=Boolean(doughnut)},Pie.prototype._validateSeries=function(){if(this._series.length>=1)throw new Error("Pie charts only support one serie.");return Base.prototype._validateSeries.apply(this,arguments)},Pie}));
define("core/copy_to_clipboard",["core/str","core/toast","core/prefetch"],(function(_str,_toast,_prefetch){
/**
* A JavaScript module that enhances a button and text container to support copy-to-clipboard functionality.
*
* This module needs to be loaded by pages/templates/modules that require this functionality.
*
* To enable copy-to-clipboard functionality, we need a trigger element (usually a button) and a copy target element
* (e.g. a div, span, text input, or text area).
*
* In the trigger element, we need to declare the <code>data-action="copytoclipboard"</code> attribute and set the
* <code>data-clipboard-target</code> attribute which is the CSS selector that points to the target element that contains the text
* to be copied.
*
* When the text is successfully copied to the clipboard, a toast message that indicates that the copy operation was a success
* will be shown. This success message can be customised by setting the <code>data-clipboard-success-message</code> attribute in the
* trigger element.
*
* @module core/copy_to_clipboard
* @copyright 2021 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*
* @example <caption>Markup for the trigger and target elements</caption>
* <input type="text" id="textinputtocopy" class="form-control" value="Copy me!" readonly />
* <button id="copybutton" data-action="copytoclipboard" data-clipboard-target="#textinput
没有合适的资源?快使用搜索试试~ 我知道了~
quiz4.zip
共39个文件
php:15个
下载:6个
png:5个
需积分: 0 1 下载量 153 浏览量
2023-10-13
17:49:57
上传
评论
收藏 2.25MB ZIP 举报
温馨提示
quiz4.zip
资源推荐
资源详情
资源评论
收起资源包目录
quiz4.zip (39个子文件)
quiz4
Continuous Assessment-W4_ Attempt review _ Learning Mall Core.html 917KB
Continuous Assessment-W4_ Attempt review _ Learning Mall Core_files
javascript(11).php 5KB
style.css 706B
combo(2) 24KB
arrow-left.svg 348B
image.png 18KB
javascript(6).php 21KB
player.js.下载 37KB
javascript(8).php 481KB
combo(3) 1KB
monologo.svg 869B
javascript(10).php 5KB
javascript(7).php 17KB
javascript(5).php 195KB
enlighterjs.min.js.下载 57KB
javascript(4).php 13KB
javascript(3).php 88KB
video.min.js.下载 569KB
combo(4) 15KB
unflagged.svg 348B
javascript(2).php 7KB
MathJax.js(1).下载 62KB
image(1).png 18KB
javascript(9).php 51KB
requirejs.php 5.87MB
LearningMallCore.png 8KB
javascript(1).php 3KB
enlighterjs.enlighter.min.css 14KB
combo 4KB
combo(5) 276KB
arrow-right.svg 350B
javascript(12).php 1KB
piwik.js.下载 64KB
combo(1) 5KB
MathJax.js.下载 62KB
styles.php 1.12MB
javascript.php 3KB
1696902648211.png 2KB
image (2).png 2KB
共 39 条
- 1
资源评论
zhuanquanquan_
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功