You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(486) |
Jul
(201) |
Aug
(194) |
Sep
(87) |
Oct
(72) |
Nov
(72) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(6) |
Feb
(41) |
Mar
(22) |
Apr
(4) |
May
(12) |
Jun
|
Jul
|
Aug
(42) |
Sep
(21) |
Oct
(14) |
Nov
(10) |
Dec
|
2007 |
Jan
(14) |
Feb
(34) |
Mar
(61) |
Apr
(54) |
May
(140) |
Jun
(184) |
Jul
(164) |
Aug
(130) |
Sep
(241) |
Oct
(175) |
Nov
(148) |
Dec
(96) |
2008 |
Jan
(5) |
Feb
(38) |
Mar
(30) |
Apr
(46) |
May
(25) |
Jun
(22) |
Jul
(5) |
Aug
(17) |
Sep
(2) |
Oct
(100) |
Nov
(83) |
Dec
(33) |
2009 |
Jan
(127) |
Feb
(43) |
Mar
(86) |
Apr
(34) |
May
(50) |
Jun
(168) |
Jul
(48) |
Aug
(66) |
Sep
(38) |
Oct
(75) |
Nov
(113) |
Dec
(72) |
2010 |
Jan
(123) |
Feb
(68) |
Mar
(26) |
Apr
(11) |
May
(39) |
Jun
(131) |
Jul
(56) |
Aug
(79) |
Sep
(69) |
Oct
(17) |
Nov
(166) |
Dec
(32) |
2011 |
Jan
(21) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
(1) |
Nov
(8) |
Dec
|
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Update of /cvsroot/stack/stack-dev/other/jqplot In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/other/jqplot Added Files: Tag: item_state_separation jquery.jqplot.min.js jquery-1.3.2.min.js copyright.txt MIT-LICENSE.txt jquery.jqplot.min.css usage.txt jqPlotCssStyling.txt jquery.jqplot.css jquery.jqplot.js excanvas.js changes.txt jqPlotOptions.txt README.txt excanvas.min.js optionsTutorial.txt gpl-2.0.txt Log Message: Brought back up to date with big HEAD merge. --- NEW FILE: jquery.jqplot.css --- /*rules for the plot target div. These will be cascaded down to all plot elements according to css rules*/ .jqplot-target { position: relative; color: #666666; font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-size: 1em; /* height: 300px; width: 400px;*/ } /*rules applied to all axes*/ .jqplot-axis { font-size: 0.75em; } .jqplot-xaxis { margin-top: 10px; } .jqplot-x2axis { margin-bottom: 10px; } .jqplot-yaxis { margin-right: 10px; } .jqplot-y2axis, .jqplot-y3axis, .jqplot-y4axis, .jqplot-y5axis, .jqplot-y6axis, .jqplot-y7axis, .jqplot-y8axis, .jqplot-y9axis { margin-left: 10px; margin-right: 10px; } /*rules applied to all axis tick divs*/ .jqplot-axis-tick, .jqplot-xaxis-tick, .jqplot-yaxis-tick, .jqplot-x2axis-tick, .jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick { position: absolute; } .jqplot-xaxis-tick { top: 0px; /* initial position untill tick is drawn in proper place */ left: 15px; /* padding-top: 10px;*/ vertical-align: top; } .jqplot-x2axis-tick { bottom: 0px; /* initial position untill tick is drawn in proper place */ left: 15px; /* padding-bottom: 10px;*/ vertical-align: bottom; } .jqplot-yaxis-tick { right: 0px; /* initial position untill tick is drawn in proper place */ top: 15px; /* padding-right: 10px;*/ text-align: right; } .jqplot-y2axis-tick, .jqplot-y3axis-tick, .jqplot-y4axis-tick, .jqplot-y5axis-tick, .jqplot-y6axis-tick, .jqplot-y7axis-tick, .jqplot-y8axis-tick, .jqplot-y9axis-tick { left: 0px; /* initial position untill tick is drawn in proper place */ top: 15px; /* padding-left: 10px;*/ /* padding-right: 15px;*/ text-align: left; } .jqplot-xaxis-label { margin-top: 10px; font-size: 11pt; position: absolute; } .jqplot-x2axis-label { margin-bottom: 10px; font-size: 11pt; position: absolute; } .jqplot-yaxis-label { margin-right: 10px; /* text-align: center;*/ font-size: 11pt; position: absolute; } .jqplot-y2axis-label, .jqplot-y3axis-label, .jqplot-y4axis-label, .jqplot-y5axis-label, .jqplot-y6axis-label, .jqplot-y7axis-label, .jqplot-y8axis-label, .jqplot-y9axis-label { /* text-align: center;*/ font-size: 11pt; position: absolute; } table.jqplot-table-legend, table.jqplot-cursor-legend { background-color: rgba(255,255,255,0.6); border: 1px solid #cccccc; position: absolute; font-size: 0.75em; } td.jqplot-table-legend { vertical-align:middle; } td.jqplot-table-legend > div { border:1px solid #cccccc; padding:0.2em; } div.jqplot-table-legend-swatch { width:0px; height:0px; border-top-width: 0.35em; border-bottom-width: 0.35em; border-left-width: 0.6em; border-right-width: 0.6em; border-top-style: solid; border-bottom-style: solid; border-left-style: solid; border-right-style: solid; } .jqplot-title { top: 0px; left: 0px; padding-bottom: 0.5em; font-size: 1.2em; } table.jqplot-cursor-tooltip { border: 1px solid #cccccc; font-size: 0.75em; } .jqplot-cursor-tooltip { border: 1px solid #cccccc; font-size: 0.75em; white-space: nowrap; background: rgba(208,208,208,0.5); padding: 1px; } .jqplot-highlighter-tooltip { border: 1px solid #cccccc; font-size: 0.75em; white-space: nowrap; background: rgba(208,208,208,0.5); padding: 1px; } .jqplot-point-label { font-size: 0.75em; } td.jqplot-cursor-legend-swatch { vertical-align:middle; text-align:center; } div.jqplot-cursor-legend-swatch { width:1.2em; height:0.7em; } --- NEW FILE: jqPlotCssStyling.txt --- Title: jqPlot CSS Customization Much of the styling of jqPlot is done by css. The jqPlot css file is, unremarkably, jquery.jqplot.css and resides in the same directory as jqPlot itself. There exist some styling related javascript properties on the plot objects themselves (like fontStyle, fontSize, etc.). These can be set with the options object at plot creation. Generally, setting these options is *NOT* the preferred way to customize the look of the plot. Use the css file instead. *These options are deprecated and may disappear*. The exceptions are certain background and color options which control attributes of something renderered on a canvas. This would be line color, grid background, etc. These must be set by the options object. For a list of available options, see <jqPlot Options>. Objects in the plot that can be customized by css are given a css class like ".jqplot-*". For example, the plot title will have a ".jqplot-title" class, the axes ".jqplot-axis", etc. Currently assigned classes in jqPlot are as follows: .jqplot-target - Styles for the plot target div. These will be cascaded down to all plot elements according to css rules. .jqplot-axis - Styles for all axes .jqplot-xaxis - Styles applied to the primary x axis only. .jqplot-yaxis - Styles applied to the primary y axis only. .jqplot-x2axis, .jqplot-x3axis, ... - Styles applied to the 2nd, 3rd, etc. x axis only. .jqplot-y2axis, .jqplot-y3axis, ... - Styles applied to the 2nd, 3rd, etc.y axis only. .jqplot-axis-tick - Styles applied to all axis ticks .jqplot-xaxis-tick - Styles applied to primary x axis ticks only. .jqplot-x2axis-tick - Styles applied to secondary x axis ticks only. .jqplot-yaxis-tick - Styles applied to primary y axis ticks only. .jqplot-y2axis-tick - Styles applied to secondary y axis ticks only. table.jqplot-table-legend - Styles applied to the legend box table. .jqplot-title - Styles applied to the title. .jqplot-cursor-tooltip - Styles applied to the cursor tooltip .jqplot-highlighter-tooltip - Styles applied to the highlighter tooltip. div.jqplot-table-legend-swatch - the div element used for the colored swatch on the legend. Note that axes will be assigned 2 classes like: class=".jqplot-axis .jqplot-xaxis". --- NEW FILE: jqPlotOptions.txt --- Title: jqPlot Options **This document is out of date. While the options described here should still be relavent and valid, it has not been updated for many new options. Sorry for this inconvenience.** This document describes the options available to jqPlot. These are set with the third argument to the $.jqplot('target', data, options) function. Options are using the following convention: {{{ property: default, // notes }}} This document is not complete! Not all options are shown! Also, Options marked with ** in the notes are post 0.7.1 additions. They will be available in the next release. Further information about the options can be found in the online API documentation. For details on how the options relate to the API documentation, see the <Options Tutorial> in the optionsTutorial.txt file. {{{ options = { seriesColors: [ "#4bb2c5", "#c5b47f", "#EAA228", "#579575", "#839557", "#958c12", "#953579", "#4b5de4", "#d8b83f", "#ff5800", "#0085cc"], // colors that will // be assigned to the series. If there are more series than colors, colors // will wrap around and start at the beginning again. stackSeries: false, // if true, will create a stack plot. // Currently supported by line and bar graphs. title: '', // Title for the plot. Can also be specified as an object like: title: { text: '', // title for the plot, show: true, }, axesDefaults: { show: false, // wether or not to renderer the axis. Determined automatically. min: null, // minimum numerical value of the axis. Determined automatically. max: null, // maximum numverical value of the axis. Determined automatically. pad: 1.2, // a factor multiplied by the data range on the axis to give the // axis range so that data points don't fall on the edges of the axis. ticks: [], // a 1D [val1, val2, ...], or 2D [[val, label], [val, label], ...] // array of ticks to use. Computed automatically. numberTicks: undefined, renderer: $.jqplot.LinearAxisRenderer, // renderer to use to draw the axis, rendererOptions: {}, // options to pass to the renderer. LinearAxisRenderer // has no options, tickOptions: { mark: 'outside', // Where to put the tick mark on the axis // 'outside', 'inside' or 'cross', showMark: true, showGridline: true, // wether to draw a gridline (across the whole grid) at this tick, markSize: 4, // length the tick will extend beyond the grid in pixels. For // 'cross', length will be added above and below the grid boundary, show: true, // wether to show the tick (mark and label), showLabel: true, // wether to show the text label at the tick, formatString: '', // format string to use with the axis tick formatter } showTicks: true, // wether or not to show the tick labels, showTickMarks: true, // wether or not to show the tick marks }, axes: { xaxis: { // same options as axesDefaults }, yaxis: { // same options as axesDefaults }, x2axis: { // same options as axesDefaults }, y2axis: { // same options as axesDefaults } }, seriesDefaults: { show: true, // wether to render the series. xaxis: 'xaxis', // either 'xaxis' or 'x2axis'. yaxis: 'yaxis', // either 'yaxis' or 'y2axis'. label: '', // label to use in the legend for this line. color: '', // CSS color spec to use for the line. Determined automatically. lineWidth: 2.5, // Width of the line in pixels. shadow: true, // show shadow or not. shadowAngle: 45, // angle (degrees) of the shadow, clockwise from x axis. shadowOffset: 1.25, // offset from the line of the shadow. shadowDepth: 3, // Number of strokes to make when drawing shadow. Each // stroke offset by shadowOffset from the last. shadowAlpha: 0.1, // Opacity of the shadow. showLine: true, // whether to render the line segments or not. showMarker: true, // render the data point markers or not. fill: false, // fill under the line, fillAndStroke: false, // **stroke a line at top of fill area. fillColor: undefined, // **custom fill color for filled lines (default is line color). fillAlpha: undefined, // **custom alpha to apply to fillColor. renderer: $.jqplot.LineRenderer], // renderer used to draw the series. rendererOptions: {}, // options passed to the renderer. LineRenderer has no options. markerRenderer: $.jqplot.MarkerRenderer, // renderer to use to draw the data // point markers. markerOptions: { show: true, // wether to show data point markers. style: 'filledCircle', // circle, diamond, square, filledCircle. // filledDiamond or filledSquare. lineWidth: 2, // width of the stroke drawing the marker. size: 9, // size (diameter, edge length, etc.) of the marker. color: '#666666' // color of marker, set to color of line by default. shadow: true, // wether to draw shadow on marker or not. shadowAngle: 45, // angle of the shadow. Clockwise from x axis. shadowOffset: 1, // offset from the line of the shadow, shadowDepth: 3, // Number of strokes to make when drawing shadow. Each stroke // offset by shadowOffset from the last. shadowAlpha: 0.07 // Opacity of the shadow } }, series:[ {Each series has same options as seriesDefaults}, {You can override each series individually here} ], legend: { show: false, location: 'ne', // compass direction, nw, n, ne, e, se, s, sw, w. xoffset: 12, // pixel offset of the legend box from the x (or x2) axis. yoffset: 12, // pixel offset of the legend box from the y (or y2) axis. }, grid: { drawGridLines: true, // wether to draw lines across the grid or not. gridLineColor: '#cccccc' // **Color of the grid lines. background: '#fffdf6', // CSS color spec for background color of grid. borderColor: '#999999', // CSS color spec for border around grid. borderWidth: 2.0, // pixel width of border around grid. shadow: true, // draw a shadow for grid. shadowAngle: 45, // angle of the shadow. Clockwise from x axis. shadowOffset: 1.5, // offset from the line of the shadow. shadowWidth: 3, // width of the stroke for the shadow. shadowDepth: 3, // Number of strokes to make when drawing shadow. // Each stroke offset by shadowOffset from the last. shadowAlpha: 0.07 // Opacity of the shadow renderer: $.jqplot.CanvasGridRenderer, // renderer to use to draw the grid. rendererOptions: {} // options to pass to the renderer. Note, the default // CanvasGridRenderer takes no additional options. }, // Plugin and renderer options. // BarRenderer. // With BarRenderer, you can specify additional options in the rendererOptions object // on the series or on the seriesDefaults object. Note, some options are respecified // (like shadowDepth) to override lineRenderer defaults from which BarRenderer inherits. seriesDefaults: { rendererOptions: { barPadding: 8, // number of pixels between adjacent bars in the same // group (same category or bin). barMargin: 10, // number of pixels between adjacent groups of bars. barDirection: 'vertical', // vertical or horizontal. barWidth: null, // width of the bars. null to calculate automatically. shadowOffset: 2, // offset from the bar edge to stroke the shadow. shadowDepth: 5, // nuber of strokes to make for the shadow. shadowAlpha: 0.8, // transparency of the shadow. } }, // Cursor // Options are passed to the cursor plugin through the "cursor" object at the top // level of the options object. cursor: { style: 'crosshair', // A CSS spec for the cursor type to change the // cursor to when over plot. show: true, showTooltip: true, // show a tooltip showing cursor position. followMouse: false, // wether tooltip should follow the mouse or be stationary. tooltipLocation: 'se', // location of the tooltip either relative to the mouse // (followMouse=true) or relative to the plot. One of // the compass directions, n, ne, e, se, etc. tooltipOffset: 6, // pixel offset of the tooltip from the mouse or the axes. showTooltipGridPosition: false, // show the grid pixel coordinates of the mouse // in the tooltip. showTooltipUnitPosition: true, // show the coordinates in data units of the mouse // in the tooltip. tooltipFormatString: '%.4P', // sprintf style format string for tooltip values. useAxesFormatters: true, // wether to use the same formatter and formatStrings // as used by the axes, or to use the formatString // specified on the cursor with sprintf. tooltipAxesGroups: [], // show only specified axes groups in tooltip. Would specify like: // [['xaxis', 'yaxis'], ['xaxis', 'y2axis']]. By default, all axes // combinations with for the series in the plot are shown. }, // Dragable // Dragable options are specified with the "dragable" object at the top level // of the options object. dragable: { color: undefined, // custom color to use for the dragged point and dragged line // section. default will use a transparent variant of the line color. constrainTo: 'none', // Constrain dragging motion to an axis: 'x', 'y', or 'none'. }, // Highlighter // Highlighter options are specified with the "highlighter" object at the top level // of the options object. highlighter: { lineWidthAdjust: 2.5, // pixels to add to the size line stroking the data point marker // when showing highlight. Only affects non filled data point markers. sizeAdjust: 5, // pixels to add to the size of filled markers when drawing highlight. showTooltip: true, // show a tooltip with data point values. tooltipLocation: 'nw', // location of tooltip: n, ne, e, se, s, sw, w, nw. fadeTooltip: true, // use fade effect to show/hide tooltip. tooltipFadeSpeed: "fast"// slow, def, fast, or a number of milliseconds. tooltipOffset: 2, // pixel offset of tooltip from the highlight. tooltipAxes: 'both', // which axis values to display in the tooltip, x, y or both. tooltipSeparator: ', ' // separator between values in the tooltip. useAxesFormatters: true // use the same format string and formatters as used in the axes to // display values in the tooltip. tooltipFormatString: '%.5P' // sprintf format string for the tooltip. only used if // useAxesFormatters is false. Will use sprintf formatter with // this string, not the axes formatters. }, // LogAxisRenderer // LogAxisRenderer add 2 options to the axes object. These options are specified directly on // the axes or axesDefaults object. axesDefaults: { base: 10, // the logarithmic base. tickDistribution: 'even', // 'even' or 'power'. 'even' will produce with even visiual (pixel) // spacing on the axis. 'power' will produce ticks spaced by // increasing powers of the log base. }, // PieRenderer // PieRenderer accepts options from the rendererOptions object of the series or seriesDefaults object. seriesDefaults: { rendererOptions: { diameter: undefined, // diameter of pie, auto computed by default. padding: 20, // padding between pie and neighboring legend or plot margin. sliceMargin: 0, // gap between slices. fill: true, // render solid (filled) slices. shadowOffset: 2, // offset of the shadow from the chart. shadowDepth: 5, // Number of strokes to make when drawing shadow. Each stroke // offset by shadowOffset from the last. shadowAlpha: 0.07 // Opacity of the shadow } }, // Trendline // Trendline takes options on the trendline object of the series or seriesDefaults object. seriesDefaults: { trendline: { show: true, // show the trend line color: '#666666', // CSS color spec for the trend line. label: '', // label for the trend line. type: 'linear', // 'linear', 'exponential' or 'exp' shadow: true, // show the trend line shadow. lineWidth: 1.5, // width of the trend line. shadowAngle: 45, // angle of the shadow. Clockwise from x axis. shadowOffset: 1.5, // offset from the line of the shadow. shadowDepth: 3, // Number of strokes to make when drawing shadow. // Each stroke offset by shadowOffset from the last. shadowAlpha: 0.07 // Opacity of the shadow } } } }}} --- NEW FILE: jquery.jqplot.min.css --- .jqplot-target{position:relative;color:#666;font-family:"Trebuchet MS",Arial,Helvetica,sans-serif;font-size:1em;}.jqplot-axis{font-size:.75em;}.jqplot-xaxis{margin-top:10px;}.jqplot-x2axis{margin-bottom:10px;}.jqplot-yaxis{margin-right:10px;}.jqplot-y2axis,.jqplot-y3axis,.jqplot-y4axis,.jqplot-y5axis,.jqplot-y6axis,.jqplot-y7axis,.jqplot-y8axis,.jqplot-y9axis{margin-left:10px;margin-right:10px;}.jqplot-axis-tick,.jqplot-xaxis-tick,.jqplot-yaxis-tick,.jqplot-x2axis-tick,.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick{position:absolute;}.jqplot-xaxis-tick{top:0;left:15px;vertical-align:top;}.jqplot-x2axis-tick{bottom:0;left:15px;vertical-align:bottom;}.jqplot-yaxis-tick{right:0;top:15px;text-align:right;}.jqplot-y2axis-tick,.jqplot-y3axis-tick,.jqplot-y4axis-tick,.jqplot-y5axis-tick,.jqplot-y6axis-tick,.jqplot-y7axis-tick,.jqplot-y8axis-tick,.jqplot-y9axis-tick{left:0;top:15px;text-align:left;}.jqplot-xaxis-label{margin-top:10px;font-size:11pt;position:absolute;}.jqplot-x2axis-label{margin-bottom:10px;font-size:11pt;position:absolute;}.jqplot-yaxis-label{margin-right:10px;font-size:11pt;position:absolute;}.jqplot-y2axis-label,.jqplot-y3axis-label,.jqplot-y4axis-label,.jqplot-y5axis-label,.jqplot-y6axis-label,.jqplot-y7axis-label,.jqplot-y8axis-label,.jqplot-y9axis-label{font-size:11pt;position:absolute;}table.jqplot-table-legend,table.jqplot-cursor-legend{background-color:rgba(255,255,255,0.6);border:1px solid #ccc;position:absolute;font-size:.75em;}td.jqplot-table-legend{vertical-align:middle;}td.jqplot-table-legend>div{border:1px solid #ccc;padding:.2em;}div.jqplot-table-legend-swatch{width:0;height:0;border-top-width:.35em;border-bottom-width:.35em;border-left-width:.6em;border-right-width:.6em;border-top-style:solid;border-bottom-style:solid;border-left-style:solid;border-right-style:solid;}.jqplot-title{top:0;left:0;padding-bottom:.5em;font-size:1.2em;}table.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em;}.jqplot-cursor-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px;}.jqplot-highlighter-tooltip{border:1px solid #ccc;font-size:.75em;white-space:nowrap;background:rgba(208,208,208,0.5);padding:1px;}.jqplot-point-label{font-size:.75em;}td.jqplot-cursor-legend-swatch{vertical-align:middle;text-align:center;}div.jqplot-cursor-legend-swatch{width:1.2em;height:.7em;} --- NEW FILE: excanvas.min.js --- if(!document.createElement("canvas").getContext){(function(){var Y=Math;var q=Y.round;var o=Y.sin;var B=Y.cos;var H=Y.abs;var N=Y.sqrt;var d=10;var f=d/2;function A(){return this.context_||(this.context_=new D(this))}var v=Array.prototype.slice;function g(j,m,p){var i=v.call(arguments,2);return function(){return j.apply(m,i.concat(v.call(arguments)))}}function ad(i){return String(i).replace(/&/g,"&").replace(/"/g,""")}function R(j){if(!j.namespaces.g_vml_){j.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML")}if(!j.namespaces.g_o_){j.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML")}if(!j.styleSheets.ex_canvas_){var i=j.createStyleSheet();i.owningElement.id="ex_canvas_";i.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}R(document);var e={init:function(i){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var j=i||document;j.createElement("canvas");j.attachEvent("onreadystatechange",g(this.init_,this,j))}},init_:function(p){var m=p.getElementsByTagName("canvas");for(var j=0;j<m.length;j++){this.initElement(m[j])}},initElement:function(j){if(!j.getContext){j.getContext=A;R(j.ownerDocument);j.innerHTML="";j.attachEvent("onpropertychange",z);j.attachEvent("onresize",V);var i=j.attributes;if(i.width&&i.width.specified){j.style.width=i.width.nodeValue+"px"}else{j.width=j.clientWidth}if(i.height&&i.height.specified){j.style.height=i.height.nodeValue+"px"}else{j.height=j.clientHeight}}return j}};function z(j){var i=j.srcElement;switch(j.propertyName){case"width":i.getContext().clearRect();i.style.width=i.attributes.width.nodeValue+"px";i.firstChild.style.width=i.clientWidth+"px";break;case"height":i.getContext().clearRect();i.style.height=i.attributes.height.nodeValue+"px";i.firstChild.style.height=i.clientHeight+"px";break}}function V(j){var i=j.srcElement;if(i.firstChild){i.firstChild.style.width=i.clientWidth+"px";i.firstChild.style.height=i.clientHeight+"px"}}e.init();var n=[];for(var ac=0;ac<16;ac++){for(var ab=0;ab<16;ab++){n[ac*16+ab]=ac.toString(16)+ab.toString(16)}}function C(){return[[1,0,0],[0,1,0],[0,0,1]]}function J(p,m){var j=C();for(var i=0;i<3;i++){for(var af=0;af<3;af++){var Z=0;for(var ae=0;ae<3;ae++){Z+=p[i][ae]*m[ae][af]}j[i][af]=Z}}return j}function x(j,i){i.fillStyle=j.fillStyle;i.lineCap=j.lineCap;i.lineJoin=j.lineJoin;i.lineWidth=j.lineWidth;i.miterLimit=j.miterLimit;i.shadowBlur=j.shadowBlur;i.shadowColor=j.shadowColor;i.shadowOffsetX=j.shadowOffsetX;i.shadowOffsetY=j.shadowOffsetY;i.strokeStyle=j.strokeStyle;i.globalAlpha=j.globalAlpha;i.font=j.font;i.textAlign=j.textAlign;i.textBaseline=j.textBaseline;i.arcScaleX_=j.arcScaleX_;i.arcScaleY_=j.arcScaleY_;i.lineScale_=j.lineScale_}var b={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"};function M(j){var p=j.indexOf("(",3);var i=j.indexOf(")",p+1);var m=j.substring(p+1,i).split(",");if(m.length==4&&j.substr(3,1)=="a"){alpha=Number(m[3])}else{m[3]=1}return m}function c(i){return parseFloat(i)/100}function u(j,m,i){return Math.min(i,Math.max(m,j))}function I(af){var m,j,i;h=parseFloat(af[0])/360%360;if(h<0){h++}s=u(c(af[1]),0,1);l=u(c(af[2]),0,1);if(s==0){m=j=i=l}else{var Z=l<0.5?l*(1+s):l+s-l*s;var ae=2*l-Z;m=a(ae,Z,h+1/3);j=a(ae,Z,h);i=a(ae,Z,h-1/3)}return"#"+n[Math.floor(m*255)]+n[Math.floor(j*255)]+n[Math.floor(i*255)]}function a(j,i,m){if(m<0){m++}if(m>1){m--}if(6*m<1){return j+(i-j)*6*m}else{if(2*m<1){return i}else{if(3*m<2){return j+(i-j)*(2/3-m)*6}else{return j}}}}function F(j){var ae,Z=1;j=String(j);if(j.charAt(0)=="#"){ae=j}else{if(/^rgb/.test(j)){var p=M(j);var ae="#",af;for(var m=0;m<3;m++){if(p[m].indexOf("%")!=-1){af=Math.floor(c(p[m])*255)}else{af=Number(p[m])}ae+=n[u(af,0,255)]}Z=p[3]}else{if(/^hsl/.test(j)){var p=M(j);ae=I(p);Z=p[3]}else{ae=b[j]||j}}}return{color:ae,alpha:Z}}var r={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"};var L={};function E(i){if(L[i]){return L[i]}var p=document.createElement("div");var m=p.style;try{m.font=i}catch(j){}return L[i]={style:m.fontStyle||r.style,variant:m.fontVariant||r.variant,weight:m.fontWeight||r.weight,size:m.fontSize||r.size,family:m.fontFamily||r.family}}function w(m,j){var i={};for(var af in m){i[af]=m[af]}var ae=parseFloat(j.currentStyle.fontSize),Z=parseFloat(m.size);if(typeof m.size=="number"){i.size=m.size}else{if(m.size.indexOf("px")!=-1){i.size=Z}else{if(m.size.indexOf("em")!=-1){i.size=ae*Z}else{if(m.size.indexOf("%")!=-1){i.size=(ae/100)*Z}else{if(m.size.indexOf("pt")!=-1){i.size=ae*(4/3)*Z}else{i.size=ae}}}}}i.size*=0.981;return i}function aa(i){return i.style+" "+i.variant+" "+i.weight+" "+i.size+"px "+i.family}function S(i){switch(i){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function D(j){this.m_=C();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=d*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=j;var i=j.ownerDocument.createElement("div");i.style.width=j.clientWidth+"px";i.style.height=j.clientHeight+"px";i.style.overflow="hidden";i.style.position="absolute";j.appendChild(i);this.element_=i;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var t=D.prototype;t.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_=null}this.element_.innerHTML=""};t.beginPath=function(){this.currentPath_=[]};t.moveTo=function(j,i){var m=this.getCoords_(j,i);this.currentPath_.push({type:"moveTo",x:m.x,y:m.y});this.currentX_=m.x;this.currentY_=m.y};t.lineTo=function(j,i){var m=this.getCoords_(j,i);this.currentPath_.push({type:"lineTo",x:m.x,y:m.y});this.currentX_=m.x;this.currentY_=m.y};t.bezierCurveTo=function(m,j,ai,ah,ag,ae){var i=this.getCoords_(ag,ae);var af=this.getCoords_(m,j);var Z=this.getCoords_(ai,ah);K(this,af,Z,i)};function K(i,Z,m,j){i.currentPath_.push({type:"bezierCurveTo",cp1x:Z.x,cp1y:Z.y,cp2x:m.x,cp2y:m.y,x:j.x,y:j.y});i.currentX_=j.x;i.currentY_=j.y}t.quadraticCurveTo=function(ag,m,j,i){var af=this.getCoords_(ag,m);var ae=this.getCoords_(j,i);var ah={x:this.currentX_+2/3*(af.x-this.currentX_),y:this.currentY_+2/3*(af.y-this.currentY_)};var Z={x:ah.x+(ae.x-this.currentX_)/3,y:ah.y+(ae.y-this.currentY_)/3};K(this,ah,Z,ae)};t.arc=function(aj,ah,ai,ae,j,m){ai*=d;var an=m?"at":"wa";var ak=aj+B(ae)*ai-f;var am=ah+o(ae)*ai-f;var i=aj+B(j)*ai-f;var al=ah+o(j)*ai-f;if(ak==i&&!m){ak+=0.125}var Z=this.getCoords_(aj,ah);var ag=this.getCoords_(ak,am);var af=this.getCoords_(i,al);this.currentPath_.push({type:an,x:Z.x,y:Z.y,radius:ai,xStart:ag.x,yStart:ag.y,xEnd:af.x,yEnd:af.y})};t.rect=function(m,j,i,p){this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath()};t.strokeRect=function(m,j,i,p){var Z=this.currentPath_;this.beginPath();this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath();this.stroke();this.currentPath_=Z};t.fillRect=function(m,j,i,p){var Z=this.currentPath_;this.beginPath();this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath();this.fill();this.currentPath_=Z};t.createLinearGradient=function(j,p,i,m){var Z=new U("gradient");Z.x0_=j;Z.y0_=p;Z.x1_=i;Z.y1_=m;return Z};t.createRadialGradient=function(p,ae,m,j,Z,i){var af=new U("gradientradial");af.x0_=p;af.y0_=ae;af.r0_=m;af.x1_=j;af.y1_=Z;af.r1_=i;return af};t.drawImage=function(ao,m){var ah,af,aj,aw,am,ak,aq,ay;var ai=ao.runtimeStyle.width;var an=ao.runtimeStyle.height;ao.runtimeStyle.width="auto";ao.runtimeStyle.height="auto";var ag=ao.width;var au=ao.height;ao.runtimeStyle.width=ai;ao.runtimeStyle.height=an;if(arguments.length==3){ah=arguments[1];af=arguments[2];am=ak=0;aq=aj=ag;ay=aw=au}else{if(arguments.length==5){ah=arguments[1];af=arguments[2];aj=arguments[3];aw=arguments[4];am=ak=0;aq=ag;ay=au}else{if(arguments.length==9){am=arguments[1];ak=arguments[2];aq=arguments[3];ay=arguments[4];ah=arguments[5];af=arguments[6];aj=arguments[7];aw=arguments[8]}else{throw Error("Invalid number of arguments")}}}var ax=this.getCoords_(ah,af);var p=aq/2;var j=ay/2;var av=[];var i=10;var ae=10;av.push(" <g_vml_:group",' coordsize="',d*i,",",d*ae,'"',' coordorigin="0,0"',' style="width:',i,"px;height:",ae,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]||this.m_[1][1]!=1||this.m_[1][0]){var Z=[];Z.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",q(ax.x/d),",","Dy=",q(ax.y/d),"");var at=ax;var ar=this.getCoords_(ah+aj,af);var ap=this.getCoords_(ah,af+aw);var al=this.getCoords_(ah+aj,af+aw);at.x=Y.max(at.x,ar.x,ap.x,al.x);at.y=Y.max(at.y,ar.y,ap.y,al.y);av.push("padding:0 ",q(at.x/d),"px ",q(at.y/d),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",Z.join(""),", sizingmethod='clip');")}else{av.push("top:",q(ax.y/d),"px;left:",q(ax.x/d),"px;")}av.push(' ">','<g_vml_:image src="',ao.src,'"',' style="width:',d*aj,"px;"," height:",d*aw,'px"',' cropleft="',am/ag,'"',' croptop="',ak/au,'"',' cropright="',(ag-am-aq)/ag,'"',' cropbottom="',(au-ak-ay)/au,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",av.join(""))};t.stroke=function(aj){var ah=[];var Z=false;var m=10;var ak=10;ah.push("<g_vml_:shape",' filled="',!!aj,'"',' style="position:absolute;width:',m,"px;height:",ak,'px;"',' coordorigin="0,0"',' coordsize="',d*m,",",d*ak,'"',' stroked="',!aj,'"',' path="');var al=false;var ae={x:null,y:null};var ai={x:null,y:null};for(var af=0;af<this.currentPath_.length;af++){var j=this.currentPath_[af];var ag;switch(j.type){case"moveTo":ag=j;ah.push(" m ",q(j.x),",",q(j.y));break;case"lineTo":ah.push(" l ",q(j.x),",",q(j.y));break;case"close":ah.push(" x ");j=null;break;case"bezierCurveTo":ah.push(" c ",q(j.cp1x),",",q(j.cp1y),",",q(j.cp2x),",",q(j.cp2y),",",q(j.x),",",q(j.y));break;case"at":case"wa":ah.push(" ",j.type," ",q(j.x-this.arcScaleX_*j.radius),",",q(j.y-this.arcScaleY_*j.radius)," ",q(j.x+this.arcScaleX_*j.radius),",",q(j.y+this.arcScaleY_*j.radius)," ",q(j.xStart),",",q(j.yStart)," ",q(j.xEnd),",",q(j.yEnd));break}if(j){if(ae.x==null||j.x<ae.x){ae.x=j.x}if(ai.x==null||j.x>ai.x){ai.x=j.x}if(ae.y==null||j.y<ae.y){ae.y=j.y}if(ai.y==null||j.y>ai.y){ai.y=j.y}}}ah.push(' ">');if(!aj){y(this,ah)}else{G(this,ah,ae,ai)}ah.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",ah.join(""))};function y(m,ae){var j=F(m.strokeStyle);var p=j.color;var Z=j.alpha*m.globalAlpha;var i=m.lineScale_*m.lineWidth;if(i<1){Z*=i}ae.push("<g_vml_:stroke",' opacity="',Z,'"',' joinstyle="',m.lineJoin,'"',' miterlimit="',m.miterLimit,'"',' endcap="',S(m.lineCap),'"',' weight="',i,'px"',' color="',p,'" />')}function G(ao,ag,aI,ap){var ah=ao.fillStyle;var az=ao.arcScaleX_;var ay=ao.arcScaleY_;var j=ap.x-aI.x;var p=ap.y-aI.y;if(ah instanceof U){var al=0;var aD={x:0,y:0};var av=0;var ak=1;if(ah.type_=="gradient"){var aj=ah.x0_/az;var m=ah.y0_/ay;var ai=ah.x1_/az;var aK=ah.y1_/ay;var aH=ao.getCoords_(aj,m);var aG=ao.getCoords_(ai,aK);var ae=aG.x-aH.x;var Z=aG.y-aH.y;al=Math.atan2(ae,Z)*180/Math.PI;if(al<0){al+=360}if(al<0.000001){al=0}}else{var aH=ao.getCoords_(ah.x0_,ah.y0_);aD={x:(aH.x-aI.x)/j,y:(aH.y-aI.y)/p};j/=az*d;p/=ay*d;var aB=Y.max(j,p);av=2*ah.r0_/aB;ak=2*ah.r1_/aB-av}var at=ah.colors_;at.sort(function(aL,i){return aL.offset-i.offset});var an=at.length;var ar=at[0].color;var aq=at[an-1].color;var ax=at[0].alpha*ao.globalAlpha;var aw=at[an-1].alpha*ao.globalAlpha;var aC=[];for(var aF=0;aF<an;aF++){var am=at[aF];aC.push(am.offset*ak+av+" "+am.color)}ag.push('<g_vml_:fill type="',ah.type_,'"',' method="none" focus="100%"',' color="',ar,'"',' color2="',aq,'"',' colors="',aC.join(","),'"',' opacity="',aw,'"',' g_o_:opacity2="',ax,'"',' angle="',al,'"',' focusposition="',aD.x,",",aD.y,'" />')}else{if(ah instanceof T){if(j&&p){var af=-aI.x;var aA=-aI.y;ag.push("<g_vml_:fill",' position="',af/j*az*az,",",aA/p*ay*ay,'"',' type="tile"',' src="',ah.src_,'" />')}}else{var aJ=F(ao.fillStyle);var au=aJ.color;var aE=aJ.alpha*ao.globalAlpha;ag.push('<g_vml_:fill color="',au,'" opacity="',aE,'" />')}}}t.fill=function(){this.stroke(true)};t.closePath=function(){this.currentPath_.push({type:"close"})};t.getCoords_=function(p,j){var i=this.m_;return{x:d*(p*i[0][0]+j*i[1][0]+i[2][0])-f,y:d*(p*i[0][1]+j*i[1][1]+i[2][1])-f}};t.save=function(){var i={};x(this,i);this.aStack_.push(i);this.mStack_.push(this.m_);this.m_=J(C(),this.m_)};t.restore=function(){if(this.aStack_.length){x(this.aStack_.pop(),this);this.m_=this.mStack_.pop()}};function k(i){return isFinite(i[0][0])&&isFinite(i[0][1])&&isFinite(i[1][0])&&isFinite(i[1][1])&&isFinite(i[2][0])&&isFinite(i[2][1])}function X(j,i,p){if(!k(i)){return}j.m_=i;if(p){var Z=i[0][0]*i[1][1]-i[0][1]*i[1][0];j.lineScale_=N(H(Z))}}t.translate=function(m,j){var i=[[1,0,0],[0,1,0],[m,j,1]];X(this,J(i,this.m_),false)};t.rotate=function(j){var p=B(j);var m=o(j);var i=[[p,m,0],[-m,p,0],[0,0,1]];X(this,J(i,this.m_),false)};t.scale=function(m,j){this.arcScaleX_*=m;this.arcScaleY_*=j;var i=[[m,0,0],[0,j,0],[0,0,1]];X(this,J(i,this.m_),true)};t.transform=function(Z,p,af,ae,j,i){var m=[[Z,p,0],[af,ae,0],[j,i,1]];X(this,J(m,this.m_),true)};t.setTransform=function(ae,Z,ag,af,p,j){var i=[[ae,Z,0],[ag,af,0],[p,j,1]];X(this,i,true)};t.drawText_=function(ak,ai,ah,an,ag){var am=this.m_,aq=1000,j=0,ap=aq,af={x:0,y:0},ae=[];var i=w(E(this.font),this.element_);var p=aa(i);var ar=this.element_.currentStyle;var Z=this.textAlign.toLowerCase();switch(Z){case"left":case"center":case"right":break;case"end":Z=ar.direction=="ltr"?"right":"left";break;case"start":Z=ar.direction=="rtl"?"right":"left";break;default:Z="left"}switch(this.textBaseline){case"hanging":case"top":af.y=i.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":af.y=-i.size/2.25;break}switch(Z){case"right":j=aq;ap=0.05;break;case"center":j=ap=aq/2;break}var ao=this.getCoords_(ai+af.x,ah+af.y);ae.push('<g_vml_:line from="',-j,' 0" to="',ap,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!ag,'" stroked="',!!ag,'" style="position:absolute;width:1px;height:1px;">');if(ag){y(this,ae)}else{G(this,ae,{x:-j,y:0},{x:ap,y:i.size})}var al=am[0][0].toFixed(3)+","+am[1][0].toFixed(3)+","+am[0][1].toFixed(3)+","+am[1][1].toFixed(3)+",0,0";var aj=q(ao.x/d)+","+q(ao.y/d);ae.push('<g_vml_:skew on="t" matrix="',al,'" ',' offset="',aj,'" origin="',j,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',ad(ak),'" style="v-text-align:',Z,";font:",ad(p),'" /></g_vml_:line>');this.element_.insertAdjacentHTML("beforeEnd",ae.join(""))};t.fillText=function(m,i,p,j){this.drawText_(m,i,p,j,false)};t.strokeText=function(m,i,p,j){this.drawText_(m,i,p,j,true)};t.measureText=function(m){if(!this.textMeasureEl_){var i='<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>';this.element_.insertAdjacentHTML("beforeEnd",i);this.textMeasureEl_=this.element_.lastChild}var j=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(j.createTextNode(m));return{width:this.textMeasureEl_.offsetWidth}};t.clip=function(){};t.arcTo=function(){};t.createPattern=function(j,i){return new T(j,i)};function U(i){this.type_=i;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}U.prototype.addColorStop=function(j,i){i=F(i);this.colors_.push({offset:j,color:i.color,alpha:i.alpha})};function T(j,i){Q(j);switch(i){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=i;break;default:O("SYNTAX_ERR")}this.src_=j.src;this.width_=j.width;this.height_=j.height}function O(i){throw new P(i)}function Q(i){if(!i||i.nodeType!=1||i.tagName!="IMG"){O("TYPE_MISMATCH_ERR")}if(i.readyState!="complete"){O("INVALID_STATE_ERR")}}function P(i){this.code=this[i];this.message=i+": DOM Exception "+this.code}var W=P.prototype=new Error;W.INDEX_SIZE_ERR=1;W.DOMSTRING_SIZE_ERR=2;W.HIERARCHY_REQUEST_ERR=3;W.WRONG_DOCUMENT_ERR=4;W.INVALID_CHARACTER_ERR=5;W.NO_DATA_ALLOWED_ERR=6;W.NO_MODIFICATION_ALLOWED_ERR=7;W.NOT_FOUND_ERR=8;W.NOT_SUPPORTED_ERR=9;W.INUSE_ATTRIBUTE_ERR=10;W.INVALID_STATE_ERR=11;W.SYNTAX_ERR=12;W.INVALID_MODIFICATION_ERR=13;W.NAMESPACE_ERR=14;W.INVALID_ACCESS_ERR=15;W.VALIDATION_ERR=16;W.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=e;CanvasRenderingContext2D=D;CanvasGradient=U;CanvasPattern=T;DOMException=P})()}; --- NEW FILE: jquery-1.3.2.min.js --- /* * jQuery JavaScript Library v1.3.2 * http://jquery.com/ * * Copyright (c) 2009 John Resig * Dual licensed under the MIT and GPL licenses. * http://docs.jquery.com/License * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ (function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return thi... [truncated message content] |
Update of /cvsroot/stack/stack-dev/other/jqplot/plugins In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/other/jqplot/plugins Added Files: Tag: item_state_separation jqplot.mekkoAxisRenderer.js .DS_Store jqplot.dateAxisRenderer.js jqplot.highlighter.js jqplot.pieRenderer.min.js jqplot.trendline.js jqplot.mekkoAxisRenderer.min.js jqplot.barRenderer.js jqplot.dragable.js jqplot.ohlcRenderer.js jqplot.canvasTextRenderer.js jqplot.trendline.min.js jqplot.dragable.min.js jqplot.pointLabels.min.js jqplot.pieRenderer.js jqplot.canvasTextRenderer.min.js jqplot.mekkoRenderer.min.js jqplot.categoryAxisRenderer.min.js jqplot.categoryAxisRenderer.js jqplot.barRenderer.min.js jqplot.highlighter.min.js jqplot.cursor.min.js jqplot.canvasAxisLabelRenderer.js jqplot.ohlcRenderer.min.js jqplot.canvasAxisTickRenderer.js jqplot.pointLabels.js jqplot.dateAxisRenderer.min.js jqplot.logAxisRenderer.min.js jqplot.pointLabels.js.orig jqplot.canvasAxisLabelRenderer.min.js jqplot.mekkoRenderer.js jqplot.cursor.js jqplot.logAxisRenderer.js jqplot.canvasAxisTickRenderer.min.js Log Message: Brought back up to date with big HEAD merge. --- NEW FILE: jqplot.highlighter.js --- /** * Copyright (c) 2009 Chris Leonello * jqPlot is currently available for use in all personal or commercial projects * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * * The author would appreciate an email letting him know of any substantial * use of jqPlot. You can reach the author at: chris dot leonello at gmail * dot com or see http://www.jqplot.com/info.php . This is, of course, * not required. * * If you are feeling kind and generous, consider supporting the project by * making a donation at: http://www.jqplot.com/donate.php . * * Thanks for using jqPlot! * */ (function($) { $.jqplot.eventListenerHooks.push(['jqplotMouseMove', handleMove]); /** * Class: $.jqplot.Highlighter * Plugin which will highlight data points when they are moused over. * * To use this plugin, include the js * file in your source: * * > <script type="text/javascript" src="plugins/jqplot.highlighter.js"></script> * * A tooltip providing information about the data point is enabled by default. * To disable the tooltip, set "showTooltip" to false. * * You can control what data is displayed in the tooltip with various * options. The "tooltipAxes" option controls wether the x, y or both * data values are displayed. * * Some chart types (e.g. hi-low-close) have more than one y value per * data point. To display the additional values in the tooltip, set the * "yvalues" option to the desired number of y values present (3 for a hlc chart). * * By default, data values will be formatted with the same formatting * specifiers as used to format the axis ticks. A custom format code * can be supplied with the tooltipFormatString option. This will apply * to all values in the tooltip. * * For more complete control, the "formatString" option can be set. This * Allows conplete control over tooltip formatting. Values are passed to * the format string in an order determined by the "tooltipAxes" and "yvalues" * options. So, if you have a hi-low-close chart and you just want to display * the hi-low-close values in the tooltip, you could set a formatString like: * * > highlighter: { * > tooltipAxes: 'y', * > yvalues: 3, * > formatString:'<table class="jqplot-highlighter"> * > <tr><td>hi:</td><td>%s</td></tr> * > <tr><td>low:</td><td>%s</td></tr> * > <tr><td>close:</td><td>%s</td></tr></table>' * > } * */ $.jqplot.Highlighter = function(options) { // Group: Properties // //prop: show // true to show the highlight. this.show = $.jqplot.config.enablePlugins; // prop: markerRenderer // Renderer used to draw the marker of the highlighted point. // Renderer will assimilate attributes from the data point being highlighted, // so no attributes need set on the renderer directly. // Default is to turn off shadow drawing on the highlighted point. this.markerRenderer = new $.jqplot.MarkerRenderer({shadow:false}); // prop: showMarker // true to show the marker this.showMarker = true; // prop: lineWidthAdjust // Pixels to add to the lineWidth of the highlight. this.lineWidthAdjust = 2.5; // prop: sizeAdjust // Pixels to add to the overall size of the highlight. this.sizeAdjust = 5; // prop: showTooltip // Show a tooltip with data point values. this.showTooltip = true; // prop: tooltipLocation // Where to position tooltip, 'n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw' this.tooltipLocation = 'nw'; // prop: tooltipFade // true = fade in/out tooltip, flase = show/hide tooltip this.fadeTooltip = true; // prop: tooltipFadeSpeed // 'slow', 'def', 'fast', or number of milliseconds. this.tooltipFadeSpeed = "fast"; // prop: tooltipOffset // Pixel offset of tooltip from the highlight. this.tooltipOffset = 2; // prop: tooltipAxes // Which axes to display in tooltip, 'x', 'y' or 'both', 'xy' or 'yx' // 'both' and 'xy' are equivalent, 'yx' reverses order of labels. this.tooltipAxes = 'both'; // prop; tooltipSeparator // String to use to separate x and y axes in tooltip. this.tooltipSeparator = ', '; // prop: useAxesFormatters // Use the x and y axes formatters to format the text in the tooltip. this.useAxesFormatters = true; // prop: tooltipFormatString // sprintf format string for the tooltip. // Uses Ash Searle's javascript sprintf implementation // found here: http://hexmen.com/blog/2007/03/printf-sprintf/ // See http://perldoc.perl.org/functions/sprintf.html for reference. // Additional "p" and "P" format specifiers added by Chris Leonello. this.tooltipFormatString = '%.5P'; // prop: formatString // alternative to tooltipFormatString // will format the whole tooltip text, populating with x, y values as // indicated by tooltipAxes option. So, you could have a tooltip like: // 'Date: %s, number of cats: %d' to format the whole tooltip at one go. // If useAxesFormatters is true, values will be formatted according to // Axes formatters and you can populate your tooltip string with // %s placeholders. this.formatString = null; // prop: yvalues // Number of y values to expect in the data point array. // Typically this is 1. Certain plots, like OHLC, will // have more y values in each data point array. this.yvalues = 1; this._tooltipElem; this.isHighlighting = false; $.extend(true, this, options); }; // axis.renderer.tickrenderer.formatter // called with scope of plot $.jqplot.Highlighter.init = function (target, data, opts){ var options = opts || {}; // add a highlighter attribute to the plot this.plugins.highlighter = new $.jqplot.Highlighter(options.highlighter); }; // called within scope of series $.jqplot.Highlighter.parseOptions = function (defaults, options) { this.showHighlight = true; }; // called within context of plot // create a canvas which we can draw on. // insert it before the eventCanvas, so eventCanvas will still capture events. $.jqplot.Highlighter.postPlotDraw = function() { this.plugins.highlighter.highlightCanvas = new $.jqplot.GenericCanvas(); this.eventCanvas._elem.before(this.plugins.highlighter.highlightCanvas.createElement(this._gridPadding, 'jqplot-highlight-canvas', this._plotDimensions)); var hctx = this.plugins.highlighter.highlightCanvas.setContext(); var p = this.plugins.highlighter; p._tooltipElem = $('<div class="jqplot-highlighter-tooltip" style="position:absolute;display:none"></div>'); this.target.append(p._tooltipElem); }; $.jqplot.preInitHooks.push($.jqplot.Highlighter.init); $.jqplot.preParseSeriesOptionsHooks.push($.jqplot.Highlighter.parseOptions); $.jqplot.postDrawHooks.push($.jqplot.Highlighter.postPlotDraw); function draw(plot, neighbor) { var hl = plot.plugins.highlighter; var s = plot.series[neighbor.seriesIndex]; var smr = s.markerRenderer; var mr = hl.markerRenderer; mr.style = smr.style; mr.lineWidth = smr.lineWidth + hl.lineWidthAdjust; mr.size = smr.size + hl.sizeAdjust; var rgba = $.jqplot.getColorComponents(smr.color); var newrgb = [rgba[0], rgba[1], rgba[2]]; var alpha = (rgba[3] >= 0.6) ? rgba[3]*0.6 : rgba[3]*(2-rgba[3]); mr.color = 'rgba('+newrgb[0]+','+newrgb[1]+','+newrgb[2]+','+alpha+')'; mr.init(); mr.draw(s.gridData[neighbor.pointIndex][0], s.gridData[neighbor.pointIndex][1], hl.highlightCanvas._ctx); } function showTooltip(plot, series, neighbor) { // neighbor looks like: {seriesIndex: i, pointIndex:j, gridData:p, data:s.data[j]} // gridData should be x,y pixel coords on the grid. // add the plot._gridPadding to that to get x,y in the target. var hl = plot.plugins.highlighter; var elem = hl._tooltipElem; if (hl.useAxesFormatters) { var xf = series._xaxis._ticks[0].formatter; var yf = series._yaxis._ticks[0].formatter; var xfstr = series._xaxis._ticks[0].formatString; var yfstr = series._yaxis._ticks[0].formatString; var str; var xstr = xf(xfstr, neighbor.data[0]); var ystrs = []; for (var i=1; i<hl.yvalues+1; i++) { ystrs.push(yf(yfstr, neighbor.data[i])); } if (hl.formatString) { switch (hl.tooltipAxes) { case 'both': case 'xy': ystrs.unshift(xstr); ystrs.unshift(hl.formatString); str = $.jqplot.sprintf.apply($.jqplot.sprintf, ystrs); break; case 'yx': ystrs.push(xstr); ystrs.unshift(hl.formatString); str = $.jqplot.sprintf.apply($.jqplot.sprintf, ystrs); break; case 'x': str = $.jqplot.sprintf.apply($.jqplot.sprintf, [hl.formatString, xstr]); break; case 'y': ystrs.unshift(hl.formatString); str = $.jqplot.sprintf.apply($.jqplot.sprintf, ystrs); break; default: // same as xy ystrs.unshift(xstr); ystrs.unshift(hl.formatString); str = $.jqplot.sprintf.apply($.jqplot.sprintf, ystrs); break; } } else { switch (hl.tooltipAxes) { case 'both': case 'xy': str = xstr; for (var i=0; i<ystrs.length; i++) { str += hl.tooltipSeparator + ystrs[i]; } break; case 'yx': str = ''; for (var i=0; i<ystrs.length; i++) { str += ystrs[i] + hl.tooltipSeparator; } str += xstr; break; case 'x': str = xstr; break; case 'y': str = ''; for (var i=0; i<ystrs.length; i++) { str += ystrs[i] + hl.tooltipSeparator; } break; default: // same as 'xy' str = xstr; for (var i=0; i<ystrs.length; i++) { str += hl.tooltipSeparator + ystrs[i]; } break; } } } else { var str; if (hl.tooltipAxes == 'both' || hl.tooltipAxes == 'xy') { str = $.jqplot.sprintf(hl.tooltipFormatString, neighbor.data[0]) + hl.tooltipSeparator + $.jqplot.sprintf(hl.tooltipFormatString, neighbor.data[1]); } else if (hl.tooltipAxes == 'yx') { str = $.jqplot.sprintf(hl.tooltipFormatString, neighbor.data[1]) + hl.tooltipSeparator + $.jqplot.sprintf(hl.tooltipFormatString, neighbor.data[0]); } else if (hl.tooltipAxes == 'x') { str = $.jqplot.sprintf(hl.tooltipFormatString, neighbor.data[0]); } else if (hl.tooltipAxes == 'y') { str = $.jqplot.sprintf(hl.tooltipFormatString, neighbor.data[1]); } } elem.html(str); var gridpos = {x:neighbor.gridData[0], y:neighbor.gridData[1]}; var ms = 0; var fact = 0.707; if (series.markerRenderer.show == true) { ms = (series.markerRenderer.size + hl.sizeAdjust)/2; } switch (hl.tooltipLocation) { case 'nw': var x = gridpos.x + plot._gridPadding.left - elem.outerWidth(true) - hl.tooltipOffset - fact * ms; var y = gridpos.y + plot._gridPadding.top - hl.tooltipOffset - elem.outerHeight(true) - fact * ms; break; case 'n': var x = gridpos.x + plot._gridPadding.left - elem.outerWidth(true)/2; var y = gridpos.y + plot._gridPadding.top - hl.tooltipOffset - elem.outerHeight(true) - ms; break; case 'ne': var x = gridpos.x + plot._gridPadding.left + hl.tooltipOffset + fact * ms; var y = gridpos.y + plot._gridPadding.top - hl.tooltipOffset - elem.outerHeight(true) - fact * ms; break; case 'e': var x = gridpos.x + plot._gridPadding.left + hl.tooltipOffset + ms; var y = gridpos.y + plot._gridPadding.top - elem.outerHeight(true)/2; break; case 'se': var x = gridpos.x + plot._gridPadding.left + hl.tooltipOffset + fact * ms; var y = gridpos.y + plot._gridPadding.top + hl.tooltipOffset + fact * ms; break; case 's': var x = gridpos.x + plot._gridPadding.left - elem.outerWidth(true)/2; var y = gridpos.y + plot._gridPadding.top + hl.tooltipOffset + ms; break; case 'sw': var x = gridpos.x + plot._gridPadding.left - elem.outerWidth(true) - hl.tooltipOffset - fact * ms; var y = gridpos.y + plot._gridPadding.top + hl.tooltipOffset + fact * ms; break; case 'w': var x = gridpos.x + plot._gridPadding.left - elem.outerWidth(true) - hl.tooltipOffset - ms; var y = gridpos.y + plot._gridPadding.top - elem.outerHeight(true)/2; break; default: // same as 'nw' var x = gridpos.x + plot._gridPadding.left - elem.outerWidth(true) - hl.tooltipOffset - fact * ms; var y = gridpos.y + plot._gridPadding.top - hl.tooltipOffset - elem.outerHeight(true) - fact * ms; break; } elem.css('left', x); elem.css('top', y); if (hl.fadeTooltip) { elem.fadeIn(hl.tooltipFadeSpeed); } else { elem.show(); } } function handleMove(ev, gridpos, datapos, neighbor, plot) { var hl = plot.plugins.highlighter; if (hl.show) { if (neighbor == null && hl.isHighlighting) { var ctx = hl.highlightCanvas._ctx; ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); if (hl.fadeTooltip) { hl._tooltipElem.fadeOut(hl.tooltipFadeSpeed); } else { hl._tooltipElem.hide(); } hl.isHighlighting = false; } if (neighbor != null && plot.series[neighbor.seriesIndex].showHighlight && !hl.isHighlighting) { hl.isHighlighting = true; if (hl.showMarker) { draw(plot, neighbor); } if (hl.showTooltip) { showTooltip(plot, plot.series[neighbor.seriesIndex], neighbor); } } } } })(jQuery); --- NEW FILE: jqplot.cursor.min.js --- /** * Copyright (c) 2009 Chris Leonello * jqPlot is currently available for use in all personal or commercial projects * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * * Although not required, the author would appreciate an email letting him * know of any substantial use of jqPlot. You can reach the author at: * chris dot leonello at gmail dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by * making a donation at: http://www.jqplot.com/donate.php . */ (function(i){i.jqplot.Cursor=function(o){this.style="crosshair";this.previousCursor="auto";this.show=i.jqplot.config.enablePlugins;this.showTooltip=true;this.followMouse=false;this.tooltipLocation="se";this.tooltipOffset=6;this.showTooltipGridPosition=false;this.showTooltipUnitPosition=true;this.showTooltipDataPosition=false;this.tooltipFormatString="%.4P, %.4P";this.useAxesFormatters=true;this.tooltipAxisGroups=[];this.zoom=false;this.zoomProxy=false;this.zoomTarget=false;this.clickReset=false;this.dblClickReset=true;this.showVerticalLine=false;this.showHorizontalLine=false;this.constrainZoomTo="none";this.shapeRenderer=new i.jqplot.ShapeRenderer();this._zoom={start:[],end:[],started:false,zooming:false,isZoomed:false,axes:{start:{},end:{}}};this._tooltipElem;this.zoomCanvas;this.cursorCanvas;this.intersectionThreshold=2;this.showCursorLegend=false;this.cursorLegendFormatString=i.jqplot.Cursor.cursorLegendFormatString;i.extend(true,this,o)};i.jqplot.Cursor.cursorLegendFormatString="%s x:%s, y:%s";i.jqplot.Cursor.init=function(t,r,q){var o=q||{};this.plugins.cursor=new i.jqplot.Cursor(o.cursor);var u=this.plugins.cursor;if(u.show){i.jqplot.eventListenerHooks.push(["jqplotMouseEnter",b]);i.jqplot.eventListenerHooks.push(["jqplotMouseLeave",f]);i.jqplot.eventListenerHooks.push(["jqplotMouseMove",h]);if(u.showCursorLegend){q.legend=q.legend||{};q.legend.renderer=i.jqplot.CursorLegendRenderer;q.legend.formatString=this.plugins.cursor.cursorLegendFormatString;q.legend.show=true}if(u.zoom){i.jqplot.eventListenerHooks.push(["jqplotMouseDown",a]);i.jqplot.eventListenerHooks.push(["jqplotMouseUp",n]);if(u.clickReset){i.jqplot.eventListenerHooks.push(["jqplotClick",j])}if(u.dblClickReset){i.jqplot.eventListenerHooks.push(["jqplotDblClick",c])}}this.resetZoom=function(){var x=this.axes;if(!u.zoomProxy){for(var w in x){x[w].reset()}this.redraw()}else{var v=this.plugins.cursor.zoomCanvas._ctx;v.clearRect(0,0,v.canvas.width,v.canvas.height)}this.plugins.cursor._zoom.isZoomed=false;this.target.trigger("jqplotResetZoom",[this,this.plugins.cursor])};if(u.showTooltipDataPosition){u.showTooltipUnitPosition=false;u.showTooltipGridPosition=false;if(o.cursor.tooltipFormatString==undefined){u.tooltipFormatString=i.jqplot.Cursor.cursorLegendFormatString}}}};i.jqplot.Cursor.postDraw=function(){var w=this.plugins.cursor;w.zoomCanvas=new i.jqplot.GenericCanvas();this.eventCanvas._elem.before(w.zoomCanvas.createElement(this._gridPadding,"jqplot-zoom-canvas",this._plotDimensions));var v=w.zoomCanvas.setContext();w._tooltipElem=i('<div class="jqplot-cursor-tooltip" style="position:absolute;display:none"></div>');w.zoomCanvas._elem.before(w._tooltipElem);if(w.showVerticalLine||w.showHorizontalLine){w.cursorCanvas=new i.jqplot.GenericCanvas();this.eventCanvas._elem.before(w.cursorCanvas.createElement(this._gridPadding,"jqplot-cursor-canvas",this._plotDimensions));var v=w.cursorCanvas.setContext()}if(w.showTooltipUnitPosition){if(w.tooltipAxisGroups.length===0){var r=this.series;var t;var o=[];for(var q=0;q<r.length;q++){t=r[q];var u=t.xaxis+","+t.yaxis;if(i.inArray(u,o)==-1){o.push(u)}}for(var q=0;q<o.length;q++){w.tooltipAxisGroups.push(o[q].split(","))}}}};i.jqplot.Cursor.zoomProxy=function(v,q){var o=v.plugins.cursor;var u=q.plugins.cursor;o.zoomTarget=true;o.zoom=true;o.style="auto";o.dblClickReset=false;u.zoom=true;u.zoomProxy=true;q.target.bind("jqplotZoom",t);q.target.bind("jqplotResetZoom",r);function t(x,w,z,y,A){o.doZoom(w,z,v,A)}function r(w,x,y){v.resetZoom()}};i.jqplot.Cursor.prototype.resetZoom=function(u,v){var t=u.axes;var r=v._zoom.axes;if(!u.plugins.cursor.zoomProxy&&v._zoom.isZoomed){for(var q in t){t[q]._ticks=[];t[q].min=r[q].min;t[q].max=r[q].max;t[q].numberTicks=r[q].numberTicks;t[q].tickInterval=r[q].tickInterval;t[q].daTickInterval=r[q].daTickInterval}u.redraw();v._zoom.isZoomed=false}else{var o=v.zoomCanvas._ctx;o.clearRect(0,0,o.canvas.width,o.canvas.height)}u.target.trigger("jqplotResetZoom",[u,v])};i.jqplot.Cursor.resetZoom=function(o){o.resetZoom()};i.jqplot.Cursor.prototype.doZoom=function(w,t,x,B){var z=B;var y=x.axes;var q=z._zoom.axes;var r=q.start;var u=q.end;var v,A;var C=x.plugins.cursor.zoomCanvas._ctx;if((z.constrainZoomTo=="none"&&Math.abs(w.x-z._zoom.start[0])>6&&Math.abs(w.y-z._zoom.start[1])>6)||(z.constrainZoomTo=="x"&&Math.abs(w.x-z._zoom.start[0])>6)||(z.constrainZoomTo=="y"&&Math.abs(w.y-z._zoom.start[1])>6)){if(!x.plugins.cursor.zoomProxy){for(var o in t){if(z._zoom.axes[o]==undefined){z._zoom.axes[o]={};z._zoom.axes[o].numberTicks=y[o].numberTicks;z._zoom.axes[o].tickInterval=y[o].tickInterval;z._zoom.axes[o].daTickInterval=y[o].daTickInterval;z._zoom.axes[o].min=y[o].min;z._zoom.axes[o].max=y[o].max}if((z.constrainZoomTo=="none")||(z.constrainZoomTo=="x"&&o.charAt(0)=="x")||(z.constrainZoomTo=="y"&&o.charAt(0)=="y")){dp=t[o];if(dp!=null){if(dp>r[o]){y[o].min=r[o];y[o].max=dp}else{span=r[o]-dp;y[o].max=r[o];y[o].min=dp}y[o].tickInterval=null;y[o].daTickInterval=null;y[o]._ticks=[]}}}C.clearRect(0,0,C.canvas.width,C.canvas.height);x.redraw();z._zoom.isZoomed=true}x.target.trigger("jqplotZoom",[w,t,x,B])}};i.jqplot.preInitHooks.push(i.jqplot.Cursor.init);i.jqplot.postDrawHooks.push(i.jqplot.Cursor.postDraw);function e(D,q,A){var F=A.plugins.cursor;var v="";var J=false;if(F.showTooltipGridPosition){v=D.x+", "+D.y;J=true}if(F.showTooltipUnitPosition){var C;for(var B=0;B<F.tooltipAxisGroups.length;B++){C=F.tooltipAxisGroups[B];if(J){v+="<br />"}if(F.useAxesFormatters){var z=A.axes[C[0]]._ticks[0].formatter;var o=A.axes[C[1]]._ticks[0].formatter;var G=A.axes[C[0]]._ticks[0].formatString;var u=A.axes[C[1]]._ticks[0].formatString;v+=z(G,q[C[0]])+", "+o(u,q[C[1]])}else{v+=i.jqplot.sprintf(F.tooltipFormatString,q[C[0]],q[C[1]])}J=true}}if(F.showTooltipDataPosition){var t=A.series;var I=d(A,D.x,D.y);var J=false;for(var B=0;B<t.length;B++){if(t[B].show){var x=t[B].index;var r=t[B].label.toString();var E=i.inArray(x,I.indices);var y=undefined;var w=undefined;if(E!=-1){var H=I.data[E].data;if(F.useAxesFormatters){var z=t[B]._xaxis._ticks[0].formatter;var o=t[B]._yaxis._ticks[0].formatter;var G=t[B]._xaxis._ticks[0].formatString;var u=t[B]._yaxis._ticks[0].formatString;y=z(G,H[0]);w=o(u,H[1])}else{y=H[0];w=H[1]}if(J){v+="<br />"}v+=i.jqplot.sprintf(F.tooltipFormatString,r,y,w);J=true}}}}F._tooltipElem.html(v)}function g(C,A){var E=A.plugins.cursor;var z=E.cursorCanvas._ctx;z.clearRect(0,0,z.canvas.width,z.canvas.height);if(E.showVerticalLine){E.shapeRenderer.draw(z,[[C.x,0],[C.x,z.canvas.height]])}if(E.showHorizontalLine){E.shapeRenderer.draw(z,[[0,C.y],[z.canvas.width,C.y]])}var G=d(A,C.x,C.y);if(E.showCursorLegend){var q=i(A.targetId+" td.jqplot-cursor-legend-label");for(var B=0;B<q.length;B++){var v=i(q[B]).data("seriesIndex");var t=A.series[v];var r=t.label.toString();var D=i.inArray(v,G.indices);var x=undefined;var w=undefined;if(D!=-1){var H=G.data[D].data;if(E.useAxesFormatters){var y=t._xaxis._ticks[0].formatter;var o=t._yaxis._ticks[0].formatter;var F=t._xaxis._ticks[0].formatString;var u=t._yaxis._ticks[0].formatString;x=y(F,H[0]);w=o(u,H[1])}else{x=H[0];w=H[1]}}if(A.legend.escapeHtml){i(q[B]).text(i.jqplot.sprintf(E.cursorLegendFormatString,r,x,w))}else{i(q[B]).html(i.jqplot.sprintf(E.cursorLegendFormatString,r,x,w))}}}}function d(w,D,C){var z={indices:[],data:[]};var E,u,q,A,t,o;var v;var B=w.plugins.cursor;for(var u=0;u<w.series.length;u++){E=w.series[u];o=E.renderer;if(E.show){v=B.intersectionThreshold;if(E.showMarker){v+=E.markerRenderer.size/2}for(var t=0;t<E.gridData.length;t++){p=E.gridData[t];if(B.showVerticalLine){if(Math.abs(D-p[0])<=v){z.indices.push(u);z.data.push({seriesIndex:u,pointIndex:t,gridData:p,data:E.data[t]})}}}}}return z}function m(q,t){var v=t.plugins.cursor;var r=v._tooltipElem;switch(v.tooltipLocation){case"nw":var o=q.x+t._gridPadding.left-r.outerWidth(true)-v.tooltipOffset;var u=q.y+t._gridPadding.top-v.tooltipOffset-r.outerHeight(true);break;case"n":var o=q.x+t._gridPadding.left-r.outerWidth(true)/2;var u=q.y+t._gridPadding.top-v.tooltipOffset-r.outerHeight(true);break;case"ne":var o=q.x+t._gridPadding.left+v.tooltipOffset;var u=q.y+t._gridPadding.top-v.tooltipOffset-r.outerHeight(true);break;case"e":var o=q.x+t._gridPadding.left+v.tooltipOffset;var u=q.y+t._gridPadding.top-r.outerHeight(true)/2;break;case"se":var o=q.x+t._gridPadding.left+v.tooltipOffset;var u=q.y+t._gridPadding.top+v.tooltipOffset;break;case"s":var o=q.x+t._gridPadding.left-r.outerWidth(true)/2;var u=q.y+t._gridPadding.top+v.tooltipOffset;break;case"sw":var o=q.x+t._gridPadding.left-r.outerWidth(true)-v.tooltipOffset;var u=q.y+t._gridPadding.top+v.tooltipOffset;break;case"w":var o=q.x+t._gridPadding.left-r.outerWidth(true)-v.tooltipOffset;var u=q.y+t._gridPadding.top-r.outerHeight(true)/2;break;default:var o=q.x+t._gridPadding.left+v.tooltipOffset;var u=q.y+t._gridPadding.top+v.tooltipOffset;break}v._tooltipElem.css("left",o);v._tooltipElem.css("top",u)}function l(u){var r=u._gridPadding;var v=u.plugins.cursor;var t=v._tooltipElem;switch(v.tooltipLocation){case"nw":var q=r.left+v.tooltipOffset;var o=r.top+v.tooltipOffset;t.css("left",q);t.css("top",o);break;case"n":var q=(r.left+(u._plotDimensions.width-r.right))/2-t.outerWidth(true)/2;var o=r.top+v.tooltipOffset;t.css("left",q);t.css("top",o);break;case"ne":var q=r.right+v.tooltipOffset;var o=r.top+v.tooltipOffset;t.css({right:q,top:o});break;case"e":var q=r.right+v.tooltipOffset;var o=(r.top+(u._plotDimensions.height-r.bottom))/2-t.outerHeight(true)/2;t.css({right:q,top:o});break;case"se":var q=r.right+v.tooltipOffset;var o=r.bottom+v.tooltipOffset;t.css({right:q,bottom:o});break;case"s":var q=(r.left+(u._plotDimensions.width-r.right))/2-t.outerWidth(true)/2;var o=r.bottom+v.tooltipOffset;t.css({left:q,bottom:o});break;case"sw":var q=r.left+v.tooltipOffset;var o=r.bottom+v.tooltipOffset;t.css({left:q,bottom:o});break;case"w":var q=r.left+v.tooltipOffset;var o=(r.top+(u._plotDimensions.height-r.bottom))/2-t.outerHeight(true)/2;t.css({left:q,top:o});break;default:var q=r.right-v.tooltipOffset;var o=r.bottom+v.tooltipOffset;t.css({right:q,bottom:o});break}}function j(q,o,u,t,r){q.stopPropagation();q.preventDefault();var v=r.plugins.cursor;if(v.clickReset){v.resetZoom(r,v)}return false}function c(q,o,u,t,r){q.stopPropagation();q.preventDefault();var v=r.plugins.cursor;if(v.dblClickReset){v.resetZoom(r,v)}return false}function f(w,t,o,z,u){var v=u.plugins.cursor;if(v.show){i(w.target).css("cursor",v.previousCursor);if(v.showTooltip){v._tooltipElem.hide()}if(v.zoom){v._zoom.started=false;v._zoom.zooming=false;if(!v.zoomProxy){var B=v.zoomCanvas._ctx;B.clearRect(0,0,B.canvas.width,B.canvas.height)}}if(v.showVerticalLine||v.showHorizontalLine){var B=v.cursorCanvas._ctx;B.clearRect(0,0,B.canvas.width,B.canvas.height)}if(v.showCursorLegend){var A=i(u.targetId+" td.jqplot-cursor-legend-label");for(var r=0;r<A.length;r++){var y=i(A[r]).data("seriesIndex");var q=u.series[y];var x=q.label.toString();if(u.legend.escapeHtml){i(A[r]).text(i.jqplot.sprintf(v.cursorLegendFormatString,x,undefined,undefined))}else{i(A[r]).html(i.jqplot.sprintf(v.cursorLegendFormatString,x,undefined,undefined))}}}}}function b(q,o,u,t,r){var v=r.plugins.cursor;if(v.show){v.previousCursor=q.target.style.cursor;q.target.style.cursor=v.style;if(v.showTooltip){e(o,u,r);if(v.followMouse){m(o,r)}else{l(r)}v._tooltipElem.show()}if(v.showVerticalLine||v.showHorizontalLine){g(o,r)}}}function h(r,q,v,u,t){var w=t.plugins.cursor;var o=w.zoomCanvas._ctx;if(w.show){if(w.showTooltip){e(q,v,t);if(w.followMouse){m(q,t)}}if(w.zoom&&w._zoom.started&&!w.zoomTarget){w._zoom.zooming=true;if(w.constrainZoomTo=="x"){w._zoom.end=[q.x,o.canvas.height]}else{if(w.constrainZoomTo=="y"){w._zoom.end=[o.canvas.width,q.y]}else{w._zoom.end=[q.x,q.y]}}k.call(w)}if(w.showVerticalLine||w.showHorizontalLine){g(q,t)}}}function a(w,r,q,x,t){var v=t.plugins.cursor;var u=t.axes;if(v.zoom){if(!v.zoomProxy){var y=v.zoomCanvas._ctx;y.clearRect(0,0,y.canvas.width,y.canvas.height)}if(v.constrainZoomTo=="x"){v._zoom.start=[r.x,0]}else{if(v.constrainZoomTo=="y"){v._zoom.start=[0,r.y]}else{v._zoom.start=[r.x,r.y]}}v._zoom.started=true;for(var o in q){v._zoom.axes.start[o]=q[o]}}}function n(q,o,u,t,r){var v=r.plugins.cursor;if(v.zoom&&v._zoom.zooming&&!v.zoomTarget){v.doZoom(o,u,r,v)}v._zoom.started=false;v._zoom.zooming=false}function k(){var y=this._zoom.start;var u=this._zoom.end;var r=this.zoomCanvas._ctx;var q,v,x,o;if(u[0]>y[0]){q=y[0];o=u[0]-y[0]}else{q=u[0];o=y[0]-u[0]}if(u[1]>y[1]){v=y[1];x=u[1]-y[1]}else{v=u[1];x=y[1]-u[1]}r.fillStyle="rgba(0,0,0,0.2)";r.strokeStyle="#999999";r.lineWidth=1;r.clearRect(0,0,r.canvas.width,r.canvas.height);r.fillRect(0,0,r.canvas.width,r.canvas.height);r.clearRect(q,v,o,x);r.strokeRect(q,v,o,x)}i.jqplot.CursorLegendRenderer=function(o){i.jqplot.TableLegendRenderer.call(this,o);this.formatString="%s"};i.jqplot.CursorLegendRenderer.prototype=new i.jqplot.TableLegendRenderer();i.jqplot.CursorLegendRenderer.prototype.constructor=i.jqplot.CursorLegendRenderer;i.jqplot.CursorLegendRenderer.prototype.draw=function(){if(this.show){var u=this._series;this._elem=i('<table class="jqplot-legend jqplot-cursor-legend" style="position:absolute"></table>');var x=false;for(var t=0;t<u.length;t++){s=u[t];if(s.show){var o=i.jqplot.sprintf(this.formatString,s.label.toString());if(o){var q=s.color;if(s._stack&&!s.fill){q=""}v.call(this,o,q,x,t);x=true}for(var r=0;r<i.jqplot.addLegendRowHooks.length;r++){var w=i.jqplot.addLegendRowHooks[r].call(this,s);if(w){v.call(this,w.label,w.color,x);x=true}}}}}function v(B,A,D,y){var z=(D)?this.rowSpacing:"0";var C=i('<tr class="jqplot-legend jqplot-cursor-legend"></tr>').appendTo(this._elem);C.data("seriesIndex",y);i('<td class="jqplot-legend jqplot-cursor-legend-swatch" style="padding-top:'+z+';"><div style="border:1px solid #cccccc;padding:0.2em;"><div class="jqplot-cursor-legend-swatch" style="background-color:'+A+';"></div></div></td>').appendTo(C);var E=i('<td class="jqplot-legend jqplot-cursor-legend-label" style="vertical-align:middle;padding-top:'+z+';"></td>');E.appendTo(C);E.data("seriesIndex",y);if(this.escapeHtml){E.text(B)}else{E.html(B)}}return this._elem}})(jQuery); --- NEW FILE: jqplot.logAxisRenderer.min.js --- /** * Copyright (c) 2009 Chris Leonello * jqPlot is currently available for use in all personal or commercial projects * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * * Although not required, the author would appreciate an email letting him * know of any substantial use of jqPlot. You can reach the author at: * chris dot leonello at gmail dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by * making a donation at: http://www.jqplot.com/donate.php . */ (function(a){a.jqplot.LogAxisRenderer=function(){a.jqplot.LinearAxisRenderer.call(this);this.axisDefaults={base:10,tickDistribution:"even"}};a.jqplot.LogAxisRenderer.prototype=new a.jqplot.LinearAxisRenderer();a.jqplot.LogAxisRenderer.prototype.constructor=a.jqplot.LogAxisRenderer;a.jqplot.LogAxisRenderer.prototype.init=function(e){a.extend(true,this.renderer,e);for(var h in this.renderer.axisDefaults){if(this[h]==null){this[h]=this.renderer.axisDefaults[h]}}var b=this._dataBounds;for(var f=0;f<this._series.length;f++){var g=this._series[f];var h=g.data;for(var c=0;c<h.length;c++){if(this.name=="xaxis"||this.name=="x2axis"){if(h[c][0]>b.max||b.max==null){b.max=h[c][0]}if(h[c][0]>b.max||b.max==null){b.max=h[c][0]}}else{if(h[c][1]<b.min||b.min==null){b.min=h[c][1]}if(h[c][1]>b.max||b.max==null){b.max=h[c][1]}}}}};a.jqplot.LogAxisRenderer.prototype.createTicks=function(){var A=this._ticks;var x=this.ticks;var D=this.name;var z=this._dataBounds;var s,y;var o,v;var e,d;var b,w;if(x.length){for(w=0;w<x.length;w++){var f=x[w];var k=new this.tickRenderer(this.tickOptions);if(f.constructor==Array){k.value=f[0];k.label=f[1];if(!this.showTicks){k.showLabel=false;k.showMark=false}else{if(!this.showTickMarks){k.showMark=false}}k.setTick(f[0],this.name);this._ticks.push(k)}else{k.value=f;if(!this.showTicks){k.showLabel=false;k.showMark=false}else{if(!this.showTickMarks){k.showMark=false}}k.setTick(f,this.name);this._ticks.push(k)}}this.numberTicks=x.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value}else{if(D=="xaxis"||D=="x2axis"){s=this._plotDimensions.width}else{s=this._plotDimensions.height}o=((this.min!=null)?this.min:z.min);v=((this.max!=null)?this.max:z.max);if(o==v){var g=0.05;o=o*(1-g);v=v*(1+g)}if(this.min!=null&&this.min<=0){throw ("log axis minimum must be greater than 0")}if(this.max!=null&&this.max<=0){throw ("log axis maximum must be greater than 0")}var l=v-o;var n,r;if(this.tickDistribution=="even"){n=(this.min!=null)?this.min:o-o*((this.padMin-1)/2);r=(this.max!=null)?this.max:v+v*((this.padMax-1)/2);this.min=n;this.max=r;l=this.max-this.min;if(this.numberTicks==null){if(s>100){this.numberTicks=parseInt(3+(s-100)/75,10)}else{this.numberTicks=2}}var h=Math.pow(this.base,(1/(this.numberTicks-1)*Math.log(this.max/this.min)/Math.log(this.base)));for(var w=0;w<this.numberTicks;w++){b=this.min*Math.pow(h,w);var k=new this.tickRenderer(this.tickOptions);if(!this.showTicks){k.showLabel=false;k.showMark=false}else{if(!this.showTickMarks){k.showMark=false}}k.setTick(b,this.name);this._ticks.push(k)}}else{if(this.tickDistribution=="power"){n=Math.pow(this.base,Math.ceil(Math.log(o*(2-this.padMin))/Math.log(this.base))-1);r=Math.pow(this.base,Math.floor(Math.log(v*this.padMax)/Math.log(this.base))+1);this.min=n;this.max=r;l=this.max-this.min;var q=0;var c=0;if(this.numberTicks==null){if(s>100){this.numberTicks=Math.round(Math.log(this.max/this.min)/Math.log(this.base)+1);if(this.numberTicks<2){this.numberTicks=2}q=parseInt(3+(s-100)/75,10)}else{this.numberTicks=2;q=2}if(this.numberTicks<q-1){c=Math.floor(q/this.numberTicks)}}for(var w=0;w<this.numberTicks;w++){b=Math.pow(this.base,w-this.numberTicks+1)*this.max;var k=new this.tickRenderer(this.tickOptions);if(!this.showTicks){k.showLabel=false;k.showMark=false}else{if(!this.showTickMarks){k.showMark=false}}k.setTick(b,this.name);this._ticks.push(k);if(c&&w<this.numberTicks-1){var m=Math.pow(this.base,w-this.numberTicks+2)*this.max;var B=m-b;var y=m/(c+1);for(var p=c-1;p>=0;p--){var C=m-y*(p+1);var k=new this.tickRenderer(this.tickOptions);if(!this.showTicks){k.showLabel=false;k.showMark=false}else{if(!this.showTickMarks){k.showMark=false}}k.setTick(C,this.name);this._ticks.push(k)}}}}}}};a.jqplot.LogAxisRenderer.prototype.pack=function(n,j){var d=parseInt(this.base,10);var q=this._ticks;var v=function(h){return Math.log(h)/Math.log(d)};var b=function(h){return Math.pow(Math.E,(Math.log(d)*h))};max=v(this.max);min=v(this.min);var g=j.max;var u=j.min;var l=(this._label==null)?false:this._label.show;for(var c in n){this._elem.css(c,n[c])}this._offsets=j;var f=g-u;var s=max-min;this.p2u=function(h){return b((h-u)*s/f+min)};this.u2p=function(h){return(v(h)-min)*f/s+u};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(h){return(v(h)-min)*f/s};this.series_p2u=function(h){return b(h*s/f+min)}}else{this.series_u2p=function(h){return(v(h)-max)*f/s};this.series_p2u=function(h){return b(h*s/f+max)}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(i=0;i<q.length;i++){var r=q[i];if(r.show&&r.showLabel){var k;if(r.constructor==a.jqplot.CanvasAxisTickRenderer&&r.angle){switch(r.labelPosition){case"auto":if(r.angle<0){k=-r.getWidth()+r._textRenderer.height*Math.sin(-r._textRenderer.angle)/2}else{k=-r._textRenderer.height*Math.sin(r._textRenderer.angle)/2}break;case"end":k=-r.getWidth()+r._textRenderer.height*Math.sin(-r._textRenderer.angle)/2;break;case"start":k=-r._textRenderer.height*Math.sin(r._textRenderer.angle)/2;break;case"middle":k=-r.getWidth()/2+r._textRenderer.height*Math.sin(-r._textRenderer.angle)/2;break;default:k=-r.getWidth()/2+r._textRenderer.height*Math.sin(-r._textRenderer.angle)/2;break}}else{k=-r.getWidth()/2}var e=this.u2p(r.value)+k+"px";r._elem.css("left",e);r.pack()}}if(l){var o=this._label._elem.outerWidth(true);this._label._elem.css("left",u+f/2-o/2+"px");if(this.name=="xaxis"){this._label._elem.css("bottom","0px")}else{this._label._elem.css("top","0px")}this._label.pack()}}else{for(i=0;i<q.length;i++){var r=q[i];if(r.show&&r.showLabel){var k;if(r.constructor==a.jqplot.CanvasAxisTickRenderer&&r.angle){switch(r.labelPosition){case"auto":case"end":if(r.angle<0){k=-r._textRenderer.height*Math.cos(-r._textRenderer.angle)/2}else{k=-r.getHeight()+r._textRenderer.height*Math.cos(r._textRenderer.angle)/2}break;case"start":if(r.angle>0){k=-r._textRenderer.height*Math.cos(-r._textRenderer.angle)/2}else{k=-r.getHeight()+r._textRenderer.height*Math.cos(r._textRenderer.angle)/2}break;case"middle":k=-r.getHeight()/2;break;default:k=-r.getHeight()/2;break}}else{k=-r.getHeight()/2}var e=this.u2p(r.value)+k+"px";r._elem.css("top",e);r.pack()}}if(l){var m=this._label._elem.outerHeight(true);this._label._elem.css("top",g-f/2-m/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}}})(jQuery); --- NEW FILE: jqplot.logAxisRenderer.js --- /** * Copyright (c) 2009 Chris Leonello * jqPlot is currently available for use in all personal or commercial projects * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * * The author would appreciate an email letting him know of any substantial * use of jqPlot. You can reach the author at: chris dot leonello at gmail * dot com or see http://www.jqplot.com/info.php . This is, of course, * not required. * * If you are feeling kind and generous, consider supporting the project by * making a donation at: http://www.jqplot.com/donate.php . * * Thanks for using jqPlot! * */ (function($) { /** * class: $.jqplot.LogAxisRenderer * A plugin for a jqPlot to render a logarithmic axis. * * To use this renderer, include the plugin in your source * > <script type="text/javascript" language="javascript" src="plugins/jqplot.logAxisRenderer.js"></script> * * and supply the appropriate options to your plot * * > {axes:{xaxis:{renderer:$.jqplot.LogAxisRenderer}}} **/ $.jqplot.LogAxisRenderer = function() { $.jqplot.LinearAxisRenderer.call(this); // prop: axisDefaults // Default properties which will be applied directly to the series. // // Group: Properties // // Properties // /// base - the logarithmic base, commonly 2, 10 or Math.E // tickDistribution - 'even' or 'power'. 'even' gives equal pixel // spacing of the ticks on the plot. 'power' gives ticks in powers // of 10. this.axisDefaults = { base : 10, tickDistribution :'even' }; }; $.jqplot.LogAxisRenderer.prototype = new $.jqplot.LinearAxisRenderer(); $.jqplot.LogAxisRenderer.prototype.constructor = $.jqplot.LogAxisRenderer; $.jqplot.LogAxisRenderer.prototype.init = function(options) { // prop: tickRenderer // A class of a rendering engine for creating the ticks labels displayed on the plot, // See <$.jqplot.AxisTickRenderer>. // this.tickRenderer = $.jqplot.AxisTickRenderer; // this.labelRenderer = $.jqplot.AxisLabelRenderer; $.extend(true, this.renderer, options); for (var d in this.renderer.axisDefaults) { if (this[d] == null) { this[d] = this.renderer.axisDefaults[d]; } } var db = this._dataBounds; // Go through all the series attached to this axis and find // the min/max bounds for this axis. for (var i=0; i<this._series.length; i++) { var s = this._series[i]; var d = s.data; for (var j=0; j<d.length; j++) { if (this.name == 'xaxis' || this.name == 'x2axis') { if (d[j][0] > db.max || db.max == null) { db.max = d[j][0]; } if (d[j][0] > db.max || db.max == null) { db.max = d[j][0]; } } else { if (d[j][1] < db.min || db.min == null) { db.min = d[j][1]; } if (d[j][1] > db.max || db.max == null) { db.max = d[j][1]; } } } } }; $.jqplot.LogAxisRenderer.prototype.createTicks = function() { // we're are operating on an axis here var ticks = this._ticks; var userTicks = this.ticks; var name = this.name; var db = this._dataBounds; var dim, interval; var min, max; var pos1, pos2; var tt, i; // if we already have ticks, use them. // ticks must be in order of increasing value. if (userTicks.length) { // ticks could be 1D or 2D array of [val, val, ,,,] or [[val, label], [val, label], ...] or mixed for (i=0; i<userTicks.length; i++){ var ut = userTicks[i]; var t = new this.tickRenderer(this.tickOptions); if (ut.constructor == Array) { t.value = ut[0]; t.label = ut[1]; if (!this.showTicks) { t.showLabel = false; t.showMark = false; } else if (!this.showTickMarks) { t.showMark = false; } t.setTick(ut[0], this.name); this._ticks.push(t); } else { t.value = ut; if (!this.showTicks) { t.showLabel = false; t.showMark = false; } else if (!this.showTickMarks) { t.showMark = false; } t.setTick(ut, this.name); this._ticks.push(t); } } this.numberTicks = userTicks.length; this.min = this._ticks[0].value; this.max = this._ticks[this.numberTicks-1].value; } // we don't have any ticks yet, let's make some! else { if (name == 'xaxis' || name == 'x2axis') { dim = this._plotDimensions.width; } else { dim = this._plotDimensions.height; } min = ((this.min != null) ? this.min : db.min); max = ((this.max != null) ? this.max : db.max); // if min and max are same, space them out a bit if (min == max) { var adj = 0.05; min = min*(1-adj); max = max*(1+adj); } // perform some checks if (this.min != null && this.min <= 0) { throw('log axis minimum must be greater than 0'); } if (this.max != null && this.max <= 0) { throw('log axis maximum must be greater than 0'); } // if (this.pad >1.99) this.pad = 1.99; var range = max - min; var rmin, rmax; if (this.tickDistribution == 'even') { rmin = (this.min != null) ? this.min : min - min*((this.padMin-1)/2); rmax = (this.max != null) ? this.max : max + max*((this.padMax-1)/2); this.min = rmin; this.max = rmax; range = this.max - this.min; if (this.numberTicks == null){ if (dim > 100) { this.numberTicks = parseInt(3+(dim-100)/75, 10); } else { this.numberTicks = 2; } } var u = Math.pow(this.base, (1/(this.numberTicks-1)*Math.log(this.max/this.min)/Math.log(this.base))); for (var i=0; i<this.numberTicks; i++){ tt = this.min * Math.pow(u, i); var t = new this.tickRenderer(this.tickOptions); if (!this.showTicks) { t.showLabel = false; t.showMark = false; } else if (!this.showTickMarks) { t.showMark = false; } t.setTick(tt, this.name); this._ticks.push(t); } } else if (this.tickDistribution == 'power'){ // for power distribution, open up range to get a nice power of axis.renderer.base. // power distribution won't respect the user's min/max settings. rmin = Math.pow(this.base, Math.ceil(Math.log(min*(2-this.padMin))/Math.log(this.base))-1); rmax = Math.pow(this.base, Math.floor(Math.log(max*this.padMax)/Math.log(this.base))+1); this.min = rmin; this.max = rmax; range = this.max - this.min; var fittedTicks = 0; var minorTicks = 0; if (this.numberTicks == null){ if (dim > 100) { this.numberTicks = Math.round(Math.log(this.max/this.min)/Math.log(this.base) + 1); if (this.numberTicks < 2) { this.numberTicks = 2; } fittedTicks = parseInt(3+(dim-100)/75, 10); } else { this.numberTicks = 2; fittedTicks = 2; } // if we don't have enough ticks, add some intermediate ticks // how many to have between major ticks. if (this.numberTicks < fittedTicks-1) { minorTicks = Math.floor(fittedTicks/this.numberTicks); } } for (var i=0; i<this.numberTicks; i++){ tt = Math.pow(this.base, i - this.numberTicks + 1) * this.max; var t = new this.tickRenderer(this.tickOptions); if (!this.showTicks) { t.showLabel = false; t.showMark = false; } else if (!this.showTickMarks) { t.showMark = false; } t.setTick(tt, this.name); this._ticks.push(t); if (minorTicks && i<this.numberTicks-1) { var tt1 = Math.pow(this.base, i - this.numberTicks + 2) * this.max; var spread = tt1 - tt; var interval = tt1 / (minorTicks+1); for (var j=minorTicks-1; j>=0; j--) { var val = tt1-interval*(j+1); var t = new this.tickRenderer(this.tickOptions); if (!this.showTicks) { t.showLabel = false; t.showMark = false; } else if (!this.showTickMarks) { t.showMark = false; } t.setTick(val, this.name); this._ticks.push(t); } } } } } }; $.jqplot.LogAxisRenderer.prototype.pack = function(pos, offsets) { var lb = parseInt(this.base, 10); var ticks = this._ticks; var trans = function (v) { return Math.log(v)/Math.log(lb); }; var invtrans = function (v) { return Math.pow(Math.E, (Math.log(lb)*v)); }; max = trans(this.max); min = trans(this.min); var offmax = offsets.max; var offmin = offsets.min; var lshow = (this._label == null) ? false : this._label.show; for (var p in pos) { this._elem.css(p, pos[p]); } this._offsets = offsets; // pixellength will be + for x axes and - for y axes becasue pixels always measured from top left. var pixellength = offmax - offmin; var unitlength = max - min; // point to unit and unit to point conversions references to Plot DOM element top left corner. this.p2u = function(p){ return invtrans((p - offmin) * unitlength / pixellength + min); }; this.u2p = function(u){ return (trans(u) - min) * pixellength / unitlength + offmin; }; if (this.name == 'xaxis' || this.name == 'x2axis'){ this.series_u2p = function(u){ return (trans(u) - min) * pixellength / unitlength; }; this.series_p2u = function(p){ return invtrans(p * unitlength / pixellength + min); }; } // yaxis is max at top of canvas. else { this.series_u2p = function(u){ return (trans(u) - max) * pixellength / unitlength; }; this.series_p2u = function(p){ return invtrans(p * unitlength / pixellength + max); }; } if (this.show) { if (this.name == 'xaxis' || this.name == 'x2axis') { for (i=0; i<ticks.length; i++) { var t = ticks[i]; if (t.show && t.showLabel) { var shim; if (t.constructor == $.jqplot.CanvasAxisTickRenderer && t.angle) { switch (t.labelPosition) { case 'auto': // position at end if (t.angle < 0) { shim = -t.getWidth() + t._textRenderer.height * Math.sin(-t._textRenderer.angle) / 2; } // position at start else { shim = -t._textRenderer.height * Math.sin(t._textRenderer.angle) / 2; } break; case 'end': shim = -t.getWidth() + t._textRenderer.height * Math.sin(-t._textRenderer.angle) / 2; break; case 'start': shim = -t._textRenderer.height * Math.sin(t._textRenderer.angle) / 2; break; case 'middle': shim = -t.getWidth()/2 + t._textRenderer.height * Math.sin(-t._textRenderer.angle) / 2; break; default: shim = -t.getWidth()/2 + t._textRenderer.height * Math.sin(-t._textRenderer.angle) / 2; break; } } else { shim = -t.getWidth()/2; } // var shim = t.getWidth()/2; var val = this.u2p(t.value) + shim + 'px'; t._elem.css('left', val); t.pack(); } } if (lshow) { var w = this._label._elem.outerWidth(true); this._label._elem.css('left', offmin + pixellength/2 - w/2 + 'px'); if (this.name == 'xaxis') { this._label._elem.css('bottom', '0px'); } else { this._label._elem.css('top', '0px'); } this._label.pack(); } } else { for (i=0; i<ticks.length; i++) { var t = ticks[i]; if (t.show && t.showLabel) { var shim; if (t.constructor == $.jqplot.CanvasAxisTickRenderer && t.angle) { switch (t.labelPosition) { case 'auto': // position at end case 'end': if (t.angle < 0) { shim = -t._textRenderer.height * Math.cos(-t._textRenderer.angle) / 2; } else { shim = -t.getHeight() + t._textRenderer.height * Math.cos(t._textRenderer.angle) / 2; } break; case 'start': if (t.angle > 0) { shim = -t._textRenderer.height * Math.cos(-t._textRenderer.angle) / 2; } else { shim = -t.getHeight() + t._textRenderer.height * Math.cos(t._textRenderer.angle) / 2; } break; case 'middle': // if (t.angle > 0) { // shim = -t.getHeight()/2 + t._textRenderer.height * Math.sin(-t._textRenderer.angle) / 2; // } // else { // shim = -t.getHeight()/2 - t._textRenderer.height * Math.sin(t._textRenderer.angle) / 2; // } shim = -t.getHeight()/2; break; default: shim = -t.getHeight()/2; break; } } else { shim = -t.getHeight()/2; } var val = this.u2p(t.value) + shim + 'px'; t._elem.css('top', val); t.pack(); } } if (lshow) { var h = this._label._elem.outerHeight(true); this._label._elem.css('top', offmax - pixellength/2 - h/2 + 'px'); if (this.name == 'yaxis') { this._label._elem.css('left', '0px'); } else { this._label._elem.css('right', '0px'); } this._label.pack(); } } } }; })(jQuery); --- NEW FILE: jqplot.canvasTextRenderer.js --- /** * Copyright (c) 2009 Chris Leonello * jqPlot is currently available for use in all personal or commercial projects * under both the MIT and GPL version 2.0 licenses. This means that you can * choose the license that best suits your project and use it accordingly. * * The author would appreciate an email letting him know of any substantial * use of jqPlot. You can reach the author at: chris dot leonello at gmail * dot com or see http://www.jqplot.com/info.php . This is, of course, * not required. * * If you are feeling kind and generous, consider supporting the project by * making a donation at: http://www.jqplot.com/donate.php . * * Thanks for using jqPlot! * */ (function($) { // This code is a modified version of the canvastext.js code, copyright below: // // This code is released to the public domain by Jim Studt, 2007. // He may keep some sort of up to date copy at http://www.federated.com/~jim/canvastext/ // $.jqplot.CanvasTextRenderer = function(options){ this.fontStyle = 'normal'; // normal, italic, oblique [not implemented] this.fontVariant = 'normal'; // normal, small caps [not implemented] this.fontWeight = 'normal'; // normal, bold, bolder, lighter, 100 - 900 this.fontSize = '10px'; this.fontFamily = 'sans-serif'; this.fontStretch = 1.0; this.fillStyle = '#666666'; this.angle = 0; this.textAlign = 'start'; this.textBaseline = 'alphabetic'; this.text; this.width; this.height; this.pt2px = 1.28; $.extend(true, this, options); this.normalizedFontSize = this.normalizeFontSize(this.fontSize); this.setHeight(); }; $.jqplot.CanvasTextRenderer.prototype.init = function(options) { $.extend(true, this, options); this.normalizedFontSize = this.normalizeFontSize(this.fontSize); this.setHeight(); }; // convert css spec into point size // returns float $.jqplot.CanvasTextRenderer.prototype.normalizeFontSize = function(sz) { sz = String(sz); n = parseFloat(sz); if (sz.indexOf('px') > -1) { return n/this.pt2px; } else if (sz.indexOf('pt') > -1) { return n; } else if (sz.indexOf('em') > -1) { return n*12; } else if (sz.indexOf('%') > -1) { return n*12/100; } // default to pixels; ... [truncated message content] |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:51
|
Update of /cvsroot/stack/stack-dev/sample_questions/examples In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/sample_questions/examples Added Files: Tag: item_state_separation examples_ODEs.xml examples_matrix_parameter.xml examples_unary-minus.xml examples_random_strings.xml examples_create-examples.xml Log Message: Brought back up to date with big HEAD merge. --- NEW FILE: examples_random_strings.xml --- <?xml version="1.0" encoding="UTF-8"?> <assessmentItem version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2"><questionCasValues><questionStem type="CasText"><castext>The winner is @p@. \[\int @p1@ = @log(1/p1)@.\]</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionStem><questionVariables type="RawKeyVal"><rawKeyVals>p = rand(["Tom", "Dick", "Harry"]); p1 = 1/"cabin"+0</rawKeyVals><forbidFloats>false</forbidFloats><simplify>true</simplify></questionVariables><workedSolution type="CasText"><castext></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></workedSolution><questionNote type="CasText"><castext></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionNote></questionCasValues><questionparts/><PotentialResponseTrees/><MetaData><dc:Publisher stackname="lastUserEditor" type="Meta"><selection>2</selection><default></default><values/></dc:Publisher><dc:language stackname="language" type="Meta"><selection>en</selection><default>en</default><values><value key="en">en</value><value key="fr">fr</value><value key="nl">nl</value><value key="es">es</value><value key="unspecified">Unspecified</value></values></dc:language><dc:title stackname="questionName" type="Meta"><selection>examples_random_strings</selection><default></default><values/></dc:title><dc:description stackname="questionDescription" type="Meta"><selection></selection><default></default><values/></dc:description><dc:publisher stackname="questionPublisher" type="Meta"><selection>http://localhost/stack-dev</selection><default>http://localhost/stack-dev</default><values/></dc:publisher><dc:format stackname="questionFormat" type="Meta"><selection>text/xml; charset="utf-8"</selection><default>text/xml; charset="utf-8"</default><values><value key="0">application</value><value key="1">audio</value><value key="2">image</value><value key="3">message</value><value key="4">model</value><value key="5">text</value><value key="6">video</value><value key="7">multipart</value></values></dc:format><lom:context stackname="questionLearningContext" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="PrimaryEducation">Primary Education</value><value key="SecondaryEducation">Secondary Education</value><value key="HigherEducation">Higher Education</value><value key="UniversityFirstCycle">University First Cycle</value><value key="UniversitySecondCycle">University Second Cycle</value><value key="UniversityPostGrade">University Post Grade</value><value key="TechnicalSchoolFirstCycle">Technical School First Cycle</value><value key="TechnicalSchoolSecondCycle">Technical School Second Cycle</value><value key="ProfessionalFormation">Professional Formation</value><value key="ContinuousFormation">Continuous Formation</value><value key="VocationalTraining">Vocational Training</value><value key="unspecified">Unspecified</value></values></lom:context><lom:difficulty stackname="questionDifficulty" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="VeryEasy">Very Easy</value><value key="Easy">Easy</value><value key="Medium">Medium</value><value key="Difficult">Difficult</value><value key="VeryDifficult">Very Difficult</value><value key="unspecified">Unspecified</value></values></lom:difficulty><questionCompetency type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Think">Think</value><value key="Argue">Argue</value><value key="Solve">Solve</value><value key="Represent">Represent</value><value key="Language">Language</value><value key="Communicate">Communicate</value><value key="Tools">Tools</value><value key="unspecified">Unspecified</value></values></questionCompetency><questionCompentencyLevel type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Elementary">Elementary</value><value key="SimpleConceptual">Simple conceptual</value><value key="Multi-step">Multi-step</value><value key="Complex">Complex</value><value key="unspecified">Unspecified</value></values></questionCompentencyLevel><lom:typicallearningtime stackname="questionTimeAllocated" type="Meta"><selection>00:00:00</selection><default>00:00:00</default><values/></lom:typicallearningtime><dc:rights stackname="questionRights" type="Meta"><selection>http://www.gnu.org/copyleft/gpl.html</selection><default>http://www.gnu.org/copyleft/gpl.html</default><values/></dc:rights><questionExerciseType type="Meta"><selection>AlgebraicExpression</selection><default>AlgebraicExpression</default><values><value key="AlgebraicExpression">Algebraic Expression</value><value key="MCQSingleAnswer">MCQ Single Answer</value><value key="MCQMultpleAnswer">MCQ Multiple Answer</value><value key="FillInBlank">Fill in blank</value><value key="Unspecified">Unspecified</value></values></questionExerciseType><dc:date stackname="questionDateLastEdited" type="Meta"><selection>2009-10-28 13:22:38</selection><default>2009-10-28 10:44:23</default><values/></dc:date><lom:status stackname="questionStatus" type="Meta"><selection>Draft</selection><default>Draft</default><values><value key="Draft">Draft</value><value key="Deployed">Deployed</value><value key="Buggy">Buggy</value></values></lom:status><published type="Meta"><selection>Unpublished</selection><default>Unpublished</default><values><value key="Unpublished">Unpublished</value><value key="Published">Published</value><value key="Private">Private</value></values></published><lom:keyword stackname="keywords" type="Meta"><selection></selection><default></default><values/></lom:keyword></MetaData><ItemOptions><stackoption><name>Display</name><type>list</type><default>LaTeX</default><values><value>LaTeX</value><value>MathML</value></values><casKey>OPT_OUTPUT</casKey><casType>string</casType><selected>LaTeX</selected></stackoption><stackoption><name>MultiplicationSign</name><type>list</type><default>dot</default><values><value>(none)</value><value>dot</value><value>cross</value></values><casKey>make_multsgn</casKey><casType>fun</casType><selected>dot</selected></stackoption><stackoption><name>ComplexNo</name><type>list</type><default>i</default><values><value>i</value><value>j</value></values><casKey>make_complexJ</casKey><casType>fun</casType><selected>i</selected></stackoption><stackoption><name>Floats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>SqrtSign</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>sqrtdispflag</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>Simplify</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>simp</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>MarkModMethod</name><type>list</type><default>Penalty</default><values><value>Penalty</value><value>First Answer</value><value>Last Answer</value></values><casKey></casKey><casType></casType><selected>Penalty</selected></stackoption><stackoption><name>AssumePos</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey>assume_pos</casKey><casType>ex</casType><selected>false</selected></stackoption><stackoption><name>TeacherEmail</name><type>string</type><default></default><casKey></casKey><casType></casType><selected></selected></stackoption><stackoption><name>Feedback</name><type>list</type><default>TGS</default><values><value>TGS</value><value>TG</value><value>GS</value><value>T</value><value>G</value><value>S</value><value>none</value></values><casKey></casKey><casType></casType><selected>TGS</selected></stackoption><stackoption><name>FeedbackGenericCorrect</name><type>html</type><default><span class='correct'>Correct answer, well done.</span></default><casKey></casKey><casType></casType><selected><span class='correct'>Correct answer, well done.</span></selected></stackoption><stackoption><name>FeedbackGenericIncorrect</name><type>html</type><default><span class='incorrect'>Incorrect answer.</span></default><casKey></casKey><casType></casType><selected><span class='incorrect'>Incorrect answer.</span></selected></stackoption><stackoption><name>FeedbackGenericPCorrect</name><type>html</type><default><span class='partially'>Your answer is partially correct.</span></default><casKey></casKey><casType></casType><selected><span class='partially'>Your answer is partially correct.</span></selected></stackoption></ItemOptions><ItemTests/></assessmentItem> --- NEW FILE: examples_create-examples.xml --- <?xml version="1.0" encoding="UTF-8"?> <mathQuiz version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2"><assessmentItem version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2"><questionCasValues><questionStem type="CasText"><castext>Give an example of an even function. #ans1# <IEfeedback>ans1</IEfeedback> <PRTfeedback>Result</PRTfeedback></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionStem><questionVariables type="RawKeyVal"><rawKeyVals></rawKeyVals><forbidFloats>false</forbidFloats><simplify>true</simplify></questionVariables><workedSolution type="CasText"><castext>Remember, a function $f(x)$ is said to be {\em even} if \[ f(x) = f(-x) \] for all values of $x$. Hence, there are many examples which satisfy this definition, $\cos(x)$, $3*x^4$, and even $f(x)=c$ for any constant.</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></workedSolution><questionNote type="CasText"><castext>.</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionNote></questionCasValues><questionparts><questionpart><name>ans1</name><inputType type="Meta"><selection>Algebraic Input</selection><default>Algebraic Input</default><values/></inputType><boxsize>15</boxsize><teachersAns type="CasString"><casString>3*x^4</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>ans1</studentAnsKey><syntax type="Meta"><selection></selection><default></default><values/></syntax><stackoption><name>formalSyntax</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>forbidFloats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>insertStars</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>false</selected></stackoption><stackoption><name>sameType</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>lowestTerms</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_LowestTerms</casKey><casType>ex</casType><selected>true</selected></stackoption><inputTypesParameters/></questionpart></questionparts><PotentialResponseTrees><PotentialResponseTree><prtname>PotResTree_Result</prtname><questionValue>1</questionValue><autoSimplify>true</autoSimplify><feedbackVariables>p = ans1-subst(-x,x,ans1)</feedbackVariables><description type="Meta"><selection></selection><default></default><values/></description><PotentialResponses><PR id="0"><answerTest>AlgEquiv</answerTest><teachersAns>0</teachersAns><studentAns>p</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>1</rawMark><feedback></feedback><ansnote>Result-0-T </ansnote><nextPR>-1</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback></feedback><ansnote>Result-0-F </ansnote><nextPR>-1</nextPR></false><teacherNote></teacherNote></PR></PotentialResponses></PotentialResponseTree></PotentialResponseTrees><MetaData><dc:Publisher stackname="lastUserEditor" type="Meta"><selection>2</selection><default></default><values/></dc:Publisher><dc:language stackname="language" type="Meta"><selection>en</selection><default>en</default><values><value key="en">en</value><value key="fr">fr</value><value key="nl">nl</value><value key="es">es</value><value key="unspecified">Unspecified</value></values></dc:language><dc:title stackname="questionName" type="Meta"><selection>ce_evenf</selection><default></default><values/></dc:title><dc:description stackname="questionDescription" type="Meta"><selection>Give me an even function</selection><default></default><values/></dc:description><dc:publisher stackname="questionPublisher" type="Meta"><selection></selection><default>http://localhost/stack-dev</default><values/></dc:publisher><dc:format stackname="questionFormat" type="Meta"><selection></selection><default>text/xml; charset="utf-8"</default><values><value key="0">application</value><value key="1">audio</value><value key="2">image</value><value key="3">message</value><value key="4">model</value><value key="5">text</value><value key="6">video</value><value key="7">multipart</value></values></dc:format><lom:context stackname="questionLearningContext" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="PrimaryEducation">Primary Education</value><value key="SecondaryEducation">Secondary Education</value><value key="HigherEducation">Higher Education</value><value key="UniversityFirstCycle">University First Cycle</value><value key="UniversitySecondCycle">University Second Cycle</value><value key="UniversityPostGrade">University Post Grade</value><value key="TechnicalSchoolFirstCycle">Technical School First Cycle</value><value key="TechnicalSchoolSecondCycle">Technical School Second Cycle</value><value key="ProfessionalFormation">Professional Formation</value><value key="ContinuousFormation">Continuous Formation</value><value key="VocationalTraining">Vocational Training</value><value key="unspecified">Unspecified</value></values></lom:context><lom:difficulty stackname="questionDifficulty" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="VeryEasy">Very Easy</value><value key="Easy">Easy</value><value key="Medium">Medium</value><value key="Difficult">Difficult</value><value key="VeryDifficult">Very Difficult</value><value key="unspecified">Unspecified</value></values></lom:difficulty><questionCompetency type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Think">Think</value><value key="Argue">Argue</value><value key="Solve">Solve</value><value key="Represent">Represent</value><value key="Language">Language</value><value key="Communicate">Communicate</value><value key="Tools">Tools</value><value key="unspecified">Unspecified</value></values></questionCompetency><questionCompentencyLevel type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Elementary">Elementary</value><value key="SimpleConceptual">Simple conceptual</value><value key="Multi-step">Multi-step</value><value key="Complex">Complex</value><value key="unspecified">Unspecified</value></values></questionCompentencyLevel><lom:typicallearningtime stackname="questionTimeAllocated" type="Meta"><selection>00:00:00</selection><default>00:00:00</default><values/></lom:typicallearningtime><dc:rights stackname="questionRights" type="Meta"><selection>http://www.gnu.org/copyleft/gpl.html</selection><default>http://www.gnu.org/copyleft/gpl.html</default><values/></dc:rights><questionExerciseType type="Meta"><selection>AlgebraicExpression</selection><default>AlgebraicExpression</default><values><value key="AlgebraicExpression">Algebraic Expression</value><value key="MCQSingleAnswer">MCQ Single Answer</value><value key="MCQMultpleAnswer">MCQ Multiple Answer</value><value key="FillInBlank">Fill in blank</value><value key="Unspecified">Unspecified</value></values></questionExerciseType><dc:date stackname="questionDateLastEdited" type="Meta"><selection>2010-03-03 18:48:59</selection><default>2010-03-02 08:42:05</default><values/></dc:date><lom:status stackname="questionStatus" type="Meta"><selection>Draft</selection><default>Draft</default><values><value key="Draft">Draft</value><value key="Deployed">Deployed</value><value key="Buggy">Buggy</value></values></lom:status><published type="Meta"><selection>Unpublished</selection><default>Unpublished</default><values><value key="Unpublished">Unpublished</value><value key="Published">Published</value><value key="Private">Private</value></values></published><lom:keyword stackname="keywords" type="Meta"><selection>demo, create, examples</selection><default>demo, create, examples</default><values/></lom:keyword></MetaData><ItemOptions><stackoption><name>Display</name><type>list</type><default>LaTeX</default><values><value>LaTeX</value><value>MathML</value></values><casKey>OPT_OUTPUT</casKey><casType>string</casType><selected>LaTeX</selected></stackoption><stackoption><name>MultiplicationSign</name><type>list</type><default>dot</default><values><value>(none)</value><value>dot</value><value>cross</value></values><casKey>make_multsgn</casKey><casType>fun</casType><selected>dot</selected></stackoption><stackoption><name>ComplexNo</name><type>list</type><default>i</default><values><value>i</value><value>j</value><value>symi</value><value>symj</value></values><casKey>make_complexJ</casKey><casType>fun</casType><selected>i</selected></stackoption><stackoption><name>Floats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>SqrtSign</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>sqrtdispflag</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>Simplify</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>simp</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>MarkModMethod</name><type>list</type><default>Penalty</default><values><value>Penalty</value><value>First Answer</value><value>Last Answer</value></values><casKey></casKey><casType></casType><selected>Penalty</selected></stackoption><stackoption><name>AssumePos</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey>assume_pos</casKey><casType>ex</casType><selected>false</selected></stackoption><stackoption><name>TeacherEmail</name><type>string</type><default></default><casKey></casKey><casType></casType><selected></selected></stackoption><stackoption><name>Feedback</name><type>list</type><default>TGS</default><values><value>TGS</value><value>TG</value><value>GS</value><value>T</value><value>G</value><value>S</value><value>none</value></values><casKey></casKey><casType></casType><selected>TGS</selected></stackoption><stackoption><name>FeedbackGenericCorrect</name><type>html</type><default><span class='correct'>Correct answer, well done.</span></default><casKey></casKey><casType></casType><selected><span class='correct'>Correct answer, well done.</span></selected></stackoption><stackoption><name>FeedbackGenericIncorrect</name><type>html</type><default><span class='incorrect'>Incorrect answer.</span></default><casKey></casKey><casType></casType><selected><span class='incorrect>Incorrect answer.</span></selected></stackoption><stackoption><name>FeedbackGenericPCorrect</name><type>html</type><default><span class='partially'>Your answer is partially correct.</span></default><casKey></casKey><casType></casType><selected><span class='partially'>Your answer is partially correct.</span></selected></stackoption><stackoption><name>OptWorkedSol</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption></ItemOptions><ItemTests><test><col><key>IE_ans1</key><value>x^2</value></col><col><key>PRT_PotResTree_Result</key><value>Result-0-T </value></col></test><test><col><key>IE_ans1</key><value>x^3</value></col><col><key>PRT_PotResTree_Result</key><value>Result-0-F </value></col></test></ItemTests></assessmentItem><assessmentItem version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2"><questionCasValues><questionStem type="CasText"><castext>Find a function of $f(x)$ which satisfies \[ f(a+b)=f(a)+f(b)\] for all values of $a$ and $b$. #ans1# <IEfeedback>ans1</IEfeedback> <PRTfeedback>Result</PRTfeedback></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionStem><questionVariables type="RawKeyVal"><rawKeyVals></rawKeyVals><forbidFloats>false</forbidFloats><simplify>true</simplify></questionVariables><workedSolution type="CasText"><castext></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></workedSolution><questionNote type="CasText"><castext>.</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionNote></questionCasValues><questionparts><questionpart><name>ans1</name><inputType type="Meta"><selection>Algebraic Input</selection><default>Algebraic Input</default><values/></inputType><boxsize>15</boxsize><teachersAns type="CasString"><casString>x</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>ans1</studentAnsKey><syntax type="Meta"><selection></selection><default></default><values/></syntax><stackoption><name>formalSyntax</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>forbidFloats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>insertStars</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>false</selected></stackoption><stackoption><name>sameType</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>lowestTerms</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_LowestTerms</casKey><casType>ex</casType><selected>true</selected></stackoption><inputTypesParameters/></questionpart></questionparts><PotentialResponseTrees><PotentialResponseTree><prtname>PotResTree_Result</prtname><questionValue>1</questionValue><autoSimplify>true</autoSimplify><feedbackVariables>p1 = subst(a,x,ans1); p2 = subst(b,x,ans1); p3 = subst(a+b,x,ans1)</feedbackVariables><description type="Meta"><selection></selection><default></default><values/></description><PotentialResponses><PR id="0"><answerTest>AlgEquiv</answerTest><teachersAns>p3</teachersAns><studentAns>p1+p2</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>1</rawMark><feedback></feedback><ansnote>Result-0-T </ansnote><nextPR>-1</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback></feedback><ansnote>Result-0-F </ansnote><nextPR>-1</nextPR></false><teacherNote></teacherNote></PR></PotentialResponses></PotentialResponseTree></PotentialResponseTrees><MetaData><dc:Publisher stackname="lastUserEditor" type="Meta"><selection>2</selection><default></default><values/></dc:Publisher><dc:language stackname="language" type="Meta"><selection>en</selection><default>en</default><values><value key="en">en</value><value key="fr">fr</value><value key="nl">nl</value><value key="es">es</value><value key="unspecified">Unspecified</value></values></dc:language><dc:title stackname="questionName" type="Meta"><selection>ce_functional_relation</selection><default></default><values/></dc:title><dc:description stackname="questionDescription" type="Meta"><selection>Find $f(a+b)=f(a)+f(b)$</selection><default></default><values/></dc:description><dc:publisher stackname="questionPublisher" type="Meta"><selection></selection><default>http://localhost/stack-dev</default><values/></dc:publisher><dc:format stackname="questionFormat" type="Meta"><selection></selection><default>text/xml; charset="utf-8"</default><values><value key="0">application</value><value key="1">audio</value><value key="2">image</value><value key="3">message</value><value key="4">model</value><value key="5">text</value><value key="6">video</value><value key="7">multipart</value></values></dc:format><lom:context stackname="questionLearningContext" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="PrimaryEducation">Primary Education</value><value key="SecondaryEducation">Secondary Education</value><value key="HigherEducation">Higher Education</value><value key="UniversityFirstCycle">University First Cycle</value><value key="UniversitySecondCycle">University Second Cycle</value><value key="UniversityPostGrade">University Post Grade</value><value key="TechnicalSchoolFirstCycle">Technical School First Cycle</value><value key="TechnicalSchoolSecondCycle">Technical School Second Cycle</value><value key="ProfessionalFormation">Professional Formation</value><value key="ContinuousFormation">Continuous Formation</value><value key="VocationalTraining">Vocational Training</value><value key="unspecified">Unspecified</value></values></lom:context><lom:difficulty stackname="questionDifficulty" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="VeryEasy">Very Easy</value><value key="Easy">Easy</value><value key="Medium">Medium</value><value key="Difficult">Difficult</value><value key="VeryDifficult">Very Difficult</value><value key="unspecified">Unspecified</value></values></lom:difficulty><questionCompetency type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Think">Think</value><value key="Argue">Argue</value><value key="Solve">Solve</value><value key="Represent">Represent</value><value key="Language">Language</value><value key="Communicate">Communicate</value><value key="Tools">Tools</value><value key="unspecified">Unspecified</value></values></questionCompetency><questionCompentencyLevel type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Elementary">Elementary</value><value key="SimpleConceptual">Simple conceptual</value><value key="Multi-step">Multi-step</value><value key="Complex">Complex</value><value key="unspecified">Unspecified</value></values></questionCompentencyLevel><lom:typicallearningtime stackname="questionTimeAllocated" type="Meta"><selection>00:00:00</selection><default>00:00:00</default><values/></lom:typicallearningtime><dc:rights stackname="questionRights" type="Meta"><selection>http://www.gnu.org/copyleft/gpl.html</selection><default>http://www.gnu.org/copyleft/gpl.html</default><values/></dc:rights><questionExerciseType type="Meta"><selection>AlgebraicExpression</selection><default>AlgebraicExpression</default><values><value key="AlgebraicExpression">Algebraic Expression</value><value key="MCQSingleAnswer">MCQ Single Answer</value><value key="MCQMultpleAnswer">MCQ Multiple Answer</value><value key="FillInBlank">Fill in blank</value><value key="Unspecified">Unspecified</value></values></questionExerciseType><dc:date stackname="questionDateLastEdited" type="Meta"><selection>2010-03-03 18:52:24</selection><default>2010-03-02 08:42:05</default><values/></dc:date><lom:status stackname="questionStatus" type="Meta"><selection>Draft</selection><default>Draft</default><values><value key="Draft">Draft</value><value key="Deployed">Deployed</value><value key="Buggy">Buggy</value></values></lom:status><published type="Meta"><selection>Unpublished</selection><default>Unpublished</default><values><value key="Unpublished">Unpublished</value><value key="Published">Published</value><value key="Private">Private</value></values></published><lom:keyword stackname="keywords" type="Meta"><selection>demo, create, examples</selection><default>demo, create, examples</default><values/></lom:keyword></MetaData><ItemOptions><stackoption><name>Display</name><type>list</type><default>LaTeX</default><values><value>LaTeX</value><value>MathML</value></values><casKey>OPT_OUTPUT</casKey><casType>string</casType><selected>LaTeX</selected></stackoption><stackoption><name>MultiplicationSign</name><type>list</type><default>dot</default><values><value>(none)</value><value>dot</value><value>cross</value></values><casKey>make_multsgn</casKey><casType>fun</casType><selected>dot</selected></stackoption><stackoption><name>ComplexNo</name><type>list</type><default>i</default><values><value>i</value><value>j</value><value>symi</value><value>symj</value></values><casKey>make_complexJ</casKey><casType>fun</casType><selected>i</selected></stackoption><stackoption><name>Floats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>SqrtSign</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>sqrtdispflag</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>Simplify</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>simp</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>MarkModMethod</name><type>list</type><default>Penalty</default><values><value>Penalty</value><value>First Answer</value><value>Last Answer</value></values><casKey></casKey><casType></casType><selected>Penalty</selected></stackoption><stackoption><name>AssumePos</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey>assume_pos</casKey><casType>ex</casType><selected>false</selected></stackoption><stackoption><name>TeacherEmail</name><type>string</type><default></default><casKey></casKey><casType></casType><selected></selected></stackoption><stackoption><name>Feedback</name><type>list</type><default>TGS</default><values><value>TGS</value><value>TG</value><value>GS</value><value>T</value><value>G</value><value>S</value><value>none</value></values><casKey></casKey><casType></casType><selected>TGS</selected></stackoption><stackoption><name>FeedbackGenericCorrect</name><type>html</type><default><span class='correct'>Correct answer, well done.</span></default><casKey></casKey><casType></casType><selected><span class='correct'>Correct answer, well done.</span></selected></stackoption><stackoption><name>FeedbackGenericIncorrect</name><type>html</type><default><span class='incorrect'>Incorrect answer.</span></default><casKey></casKey><casType></casType><selected><span class='incorrect>Incorrect answer.</span></selected></stackoption><stackoption><name>FeedbackGenericPCorrect</name><type>html</type><default><span class='partially'>Your answer is partially correct.</span></default><casKey></casKey><casType></casType><selected><span class='partially'>Your answer is partially correct.</span></selected></stackoption><stackoption><name>OptWorkedSol</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption></ItemOptions><ItemTests><test><col><key>IE_ans1</key><value>x</value></col><col><key>PRT_PotResTree_Result</key><value>Result-0-T </value></col></test><test><col><key>IE_ans1</key><value>x^2</value></col><col><key>PRT_PotResTree_Result</key><value>Result-0-F </value></col></test></ItemTests></assessmentItem><assessmentItem version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2"><questionCasValues><questionStem type="CasText"><castext>Give an example of a function $f(x)$ with a stationary point at $x=@n@$ and which is continuous but not differentiable at $x=0$. <br /> <br /> $f(x)=$ #ans1# <IEfeedback>ans1</IEfeedback> <PRTfeedback>Result</PRTfeedback></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionStem><questionVariables type="RawKeyVal"><rawKeyVals>n = 2+rand(4)</rawKeyVals><forbidFloats>false</forbidFloats><simplify>true</simplify></questionVariables><workedSolution type="CasText"><castext></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></workedSolution><questionNote type="CasText"><castext>@n@</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionNote></questionCasValues><questionparts><questionpart><name>ans1</name><inputType type="Meta"><selection>Algebraic Input</selection><default>Algebraic Input</default><values/></inputType><boxsize>15</boxsize><teachersAns type="CasString"><casString>abs(x)*(x-2*n)</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>ans1</studentAnsKey><syntax type="Meta"><selection></selection><default></default><values/></syntax><stackoption><name>formalSyntax</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>forbidFloats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>insertStars</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>false</selected></stackoption><stackoption><name>sameType</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>lowestTerms</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_LowestTerms</casKey><casType>ex</casType><selected>true</selected></stackoption><inputTypesParameters/><forbiddenWords><Forbid>diff</Forbid><Forbid> diff</Forbid><Forbid> diff</Forbid><Forbid> diff</Forbid></forbiddenWords></questionpart></questionparts><PotentialResponseTrees><PotentialResponseTree><prtname>PotResTree_Result</prtname><questionValue>1</questionValue><autoSimplify>true</autoSimplify><feedbackVariables>p = subst(n,x,diff(ans1,x))</feedbackVariables><description type="Meta"><selection></selection><default></default><values/></description><PotentialResponses><PR id="0"><answerTest>AlgEquiv</answerTest><teachersAns>0</teachersAns><studentAns>p</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>0.34</rawMark><feedback></feedback><ansnote>Result-0-T </ansnote><nextPR>1</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback>Your answer does not have a stationary point at $x=@n@$ but should do.</feedback><ansnote>No stationary point.</ansnote><nextPR>1</nextPR></false><teacherNote></teacherNote></PR><PR id="1"><answerTest>AlgEquiv</answerTest><teachersAns>true</teachersAns><studentAns>continuousp(ans1,x,0)</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>+</rawModMark><rawMark>0.33</rawMark><feedback></feedback><ansnote>Result-1-T </ansnote><nextPR>2</nextPR></true><false><rawModMark>+</rawModMark><rawMark>0</rawMark><feedback>Your answer is not continuous at $x=0$, but needs to be.</feedback><ansnote>Not continuous</ansnote><nextPR>-1</nextPR></false><teacherNote></teacherNote></PR><PR id="2"><answerTest>AlgEquiv</answerTest><teachersAns>false</teachersAns><studentAns>diffp(ans1,x,0)</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>+</rawModMark><rawMark>0.33</rawMark><feedback></feedback><ansnote>Result-2-T </ansnote><nextPR>-1</nextPR></true><false><rawModMark>+</rawModMark><rawMark>0</rawMark><feedback>Your answer is differentiable at $x=0$ but should not be. Consider using $|x|$, which is entered as <tt>abs(x)</tt>, somewhere in your answer.</feedback><ansnote>Result-2-F </ansnote><nextPR>-1</nextPR></false><teacherNote></teacherNote></PR></PotentialResponses></PotentialResponseTree></PotentialResponseTrees><MetaData><dc:Publisher stackname="lastUserEditor" type="Meta"><selection>2</selection><default></default><values/></dc:Publisher><dc:language stackname="language" type="Meta"><selection>en</selection><default>en</default><values><value key="en">en</value><value key="fr">fr</value><value key="nl">nl</value><value key="es">es</value><value key="unspecified">Unspecified</value></values></dc:language><dc:title stackname="questionName" type="Meta"><selection>ce_non-diff</selection><default></default><values/></dc:title><dc:description stackname="questionDescription" type="Meta"><selection>Give a function which is continuous but not diferentiable</selection><default></default><values/></dc:description><dc:publisher stackname="questionPublisher" type="Meta"><selection></selection><default>http://localhost/stack-dev</default><values/></dc:publisher><dc:format stackname="questionFormat" type="Meta"><selection></selection><default>text/xml; charset="utf-8"</default><values><value key="0">application</value><value key="1">audio</value><value key="2">image</value><value key="3">message</value><value key="4">model</value><value key="5">text</value><value key="6">video</value><value key="7">multipart</value></values></dc:format><lom:context stackname="questionLearningContext" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="PrimaryEducation">Primary Education</value><value key="SecondaryEducation">Secondary Education</value><value key="HigherEducation">Higher Education</value><value key="UniversityFirstCycle">University First Cycle</value><value key="UniversitySecondCycle">University Second Cycle</value><value key="UniversityPostGrade">University Post Grade</value><value key="TechnicalSchoolFirstCycle">Technical School First Cycle</value><value key="TechnicalSchoolSecondCycle">Technical School Second Cycle</value><value key="ProfessionalFormation">Professional Formation</value><value key="ContinuousFormation">Continuous Formation</value><value key="VocationalTraining">Vocational Training</value><value key="unspecified">Unspecified</value></values></lom:context><lom:difficulty stackname="questionDifficulty" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="VeryEasy">Very Easy</value><value key="Easy">Easy</value><value key="Medium">Medium</value><value key="Difficult">Difficult</value><value key="VeryDifficult">Very Difficult</value><value key="unspecified">Unspecified</value></values></lom:difficulty><questionCompetency type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Think">Think</value><value key="Argue">Argue</value><value key="Solve">Solve</value><value key="Represent">Represent</value><value key="Language">Language</value><value key="Communicate">Communicate</value><value key="Tools">Tools</value><value key="unspecified">Unspecified</value></values></questionCompetency><questionCompentencyLevel type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Elementary">Elementary</value><value key="SimpleConceptual">Simple conceptual</value><value key="Multi-step">Multi-step</value><value key="Complex">Complex</value><value key="unspecified">Unspecified</value></values></questionCompentencyLevel><lom:typicallearningtime stackname="questionTimeAllocated" type="Meta"><selection>00:00:00</selection><default>00:00:00</default><values/></lom:typicallearningtime><dc:rights stackname="questionRights" type="Meta"><selection>http://www.gnu.org/copyleft/gpl.html</selection><default>http://www.gnu.org/copyleft/gpl.html</default><values/></dc:rights><questionExerciseType type="Meta"><selection>AlgebraicExpression</selection><default>AlgebraicExpression</default><values><value key="AlgebraicExpression">Algebraic Expression</value><value key="MCQSingleAnswer">MCQ Single Answer</value><value key="MCQMultpleAnswer">MCQ Multiple Answer</value><value key="FillInBlank">Fill in blank</value><value key="Unspecified">Unspecified</value></values></questionExerciseType><dc:date stackname="questionDateLastEdited" type="Meta"><selection>2010-03-02 08:55:58</selection><default>2010-03-02 08:42:05</default><values/></dc:date><lom:status stackname="questionStatus" type="Meta"><selection>Draft</selection><default>Draft</default><values><value key="Draft">Draft</value><value key="Deployed">Deployed</value><value key="Buggy">Buggy</value></values></lom:status><published type="Meta"><selection>Unpublished</selection><default>Unpublished</default><values><value key="Unpublished">Unpublished</value><value key="Published">Published</value><value key="Private">Private</value></values></published><lom:keyword stackname="keywords" type="Meta"><selection>demo, create, examples</selection><default>demo, create, examples</default><values/></lom:keyword></MetaData><ItemOptions><stackoption><name>Display</name><type>list</type><default>LaTeX</default><values><value>LaTeX</value><value>MathML</value></values><casKey>OPT_OUTPUT</casKey><casType>string</casType><selected>LaTeX</selected></stackoption><stackoption><name>MultiplicationSign</name><type>list</type><default>dot</default><values><value>(none)</value><value>dot</value><value>cross</value></values><casKey>make_multsgn</casKey><casType>fun</casType><selected>dot</selected></stackoption><stackoption><name>ComplexNo</name><type>list</type><default>i</default><values><value>i</value><value>j</value><value>symi</value><value>symj</value></values><casKey>make_complexJ</casKey><casType>fun</casType><selected>i</selected></stackoption><stackoption><name>Floats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>SqrtSign</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>sqrtdispflag</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>Simplify</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>simp</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>MarkModMethod</name><type>list</type><default>Penalty</default><values><value>Penalty</value><value>First Answer</value><value>Last Answer</value></values><casKey></casKey><casType></casType><selected>Penalty</selected></stackoption><stackoption><name>AssumePos</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey>assume_pos</casKey><casType>ex</casType><selected>false</selected></stackoption><stackoption><name>TeacherEmail</name><type>string</type><default></default><casKey></casKey><casType></casType><selected></selected></stackoption><stackoption><name>Feedback</name><type>list</type><default>TGS</default><values><value>TGS</value><value>TG</value><value>GS</value><value>T</value><value>G</value><value>S</value><value>none</value></values><casKey></casKey><casType></casType><selected>TGS</selected></stackoption><stackoption><name>FeedbackGenericCorrect</name><type>html</type><default><span class='correct'>Correct answer, well done.</span></default><casKey></casKey><casType></casType><selected><span class='correct'>Correct answer, well done.</span></selected></stackoption><stackoption><name>FeedbackGenericIncorrect</name><type>html</type><default><span class='incorrect'>Incorrect answer.</span></default><casKey></casKey><casType></casType><selected><span class='incorrect>Incorrect answer.</span></selected></stackoption><stackoption><name>FeedbackGenericPCorrect</name><type>html</type><default><span class='partially'>Your answer is partially correct.</span></default><casKey></casKey><casType></casType><selected><span class='partially'>Your answer is partially correct.</span></selected></stackoption><stackoption><name>OptWorkedSol</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption></ItemOptions><ItemTests><test><col><key>IE_ans1</key><value>abs(x)*(x-2*n)</value></col><col><key>PRT_PotResTree_Result</key><value>Result-2-T </value></col></test><test><col><key>IE_ans1</key><value>x*(x-2*n)</value></col><col><key>PRT_PotResTree_Result</key><value>Result-2-F </value></col></test><test><col><key>IE_ans1</key><value>(x-2*n)</value></col><col><key>PRT_PotResTree_Result</key><value>Result-2-F </value></col></test></ItemTests></assessmentItem><assessmentItem version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2"><questionCasValues><questionStem type="CasText"><castext>Give an example of an odd function. #ans1# <IEfeedback>ans1</IEfeedback> <PRTfeedback>Result</PRTfeedback></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionStem><questionVariables type="RawKeyVal"><rawKeyVals></rawKeyVals><forbidFloats>false</forbidFloats><simplify>true</simplify></questionVariables><workedSolution type="CasText"><castext>Remember, a function $f(x)$ is said to be {\em odd} if \[ f(x) = -f(-x) \] for all values of $x$. Hence, there are many examples which satisfy this definition, $\sin(x)$, $4*x^5$, and even $f(x)=0$.</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></workedSolution><questionNote type="CasText"><castext>.</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionNote></questionCasValues><questionparts><questionpart><name>ans1</name><inputType type="Meta"><selection>Algebraic Input</selection><default>Algebraic Input</default><values/></inputType><boxsize>15</boxsize><teachersAns type="CasString"><casString>4*x^3</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>ans1</studentAnsKey><syntax type="Meta"><selection></selection><default></default><values/></syntax><stackoption><name>formalSyntax</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>forbidFloats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>insertStars</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>false</selected></stackoption><stackoption><name>sameType</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>lowestTerms</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_LowestTerms</casKey><casType>ex</casType><selected>true</selected></stackoption><inputTypesParameters/></questionpart></questionparts><PotentialResponseTrees><PotentialResponseTree><prtname>PotResTree_Result</prtname><questionValue>1</questionValue><autoSimplify>true</autoSimplify><feedbackVariables>p = ans1+subst(-x,x,ans1)</feedbackVariables><description type="Meta"><selection></selection><default></default><values/></description><PotentialResponses><PR id="0"><answerTest>AlgEquiv</answerTest><teachersAns>0</teachersAns><studentAns>p</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>1</rawMark><feedback></feedback><ansnote>Result-0-T </ansnote><nextPR>-1</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback>Your function should have a symmetry in the $y$ axis, but does not. </feedback><ansnote>Result-0-F </ansnote><nextPR>-1</nextPR></false><teacherNote></teacherNote></PR></PotentialResponses></PotentialResponseTree></PotentialResponseTrees><MetaData><dc:Publisher stackname="lastUserEditor" type="Meta"><selection>2</selection><default></default><values/></dc:Publisher><dc:language stackname="language" type="Meta"><selection>en</selection><default>en</default><values><value key="en">en</value><value key="fr">fr</value><value key="nl">nl</value><value key="es">es</value><value key="unspecified">Unspecified</value></values></dc:language><dc:title stackname="questionName" type="Meta"><selection>ce_oddf</selection><default></default><values/></dc:title><dc:description stackname="questionDescription" type="Meta"><selection>Give me an odd function</selection><default></default><values/></dc:description><dc:publisher stackname="questionPublisher" type="Meta"><selection></selection><default>http://localhost/stack-dev</default><values/></dc:publisher><dc:format stackname="questionFormat" type="Meta"><selection></selection><default>text/xml; charset="utf-8"</default><values><value key="0">application</value><value key="1">audio</value><value key="2">image</value><value key="3">message</value><value key="4">model</value><value key="5">text</value><value key="6">video</value><value key="7">multipart</value></values></dc:format><lom:context stackname="questionLearningContext" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="PrimaryEducation">Primary Education</value><value key="SecondaryEducation">Secondary Education</value><value key="HigherEducation">Higher Education</value><value key="UniversityFirstCycle">University First Cycle</value><value key="UniversitySecondCycle">University Second Cycle</value><value key="UniversityPostGrade">University Post Grade</value><value key="TechnicalSchoolFirstCycle">Technical School First Cycle</value><value key="TechnicalSchoolSecondCycle">Technical School Second Cycle</value><value key="ProfessionalFormation">Professional Formation</value><value key="ContinuousFormation">Continuous Formation</value><value key="VocationalTraining">Vocational Training</value><value key="unspecified">Unspecified</value></values></lom:context><lom:difficulty stackname="questionDifficulty" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="VeryEasy">Very Easy</value><value key="Easy">Easy</value><value key="Medium">Medium</value><value key="Difficult">Difficult</value><value key="VeryDifficult">Very Difficult</value><value key="unspecified">Unspecified</value></values></lom:difficulty><questionCompetency type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Think">Think</value><value key="Argue">Argue</value><value key="Solve">Solve</value><value key="Represent">Represent</value><value key="Language">Language</value><value key="Communicate">Communicate</value><value key="Tools">Tools</value><value key="unspecified">Unspecified</value></values></questionCompetency><questionCompentencyLevel type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Elementary">Elementary</value><value key="SimpleConceptual">Simple conceptual</value><value key="Multi-step">Multi-step</value><value key="Complex">Complex</value><value key="unspecified">Unspecified</value></values></questionCompentencyLevel><lom:typicallearningtime stackname="questionTimeAllocated" type="Meta"><selection>00:00:00</selection><default>00:00:00</default><values/></lom:typicallearningtime><dc:rights stackname="questionRights" type="Meta"><selection>http://www.gnu.org/copyleft/gpl.html</selection><default>http://www.gnu.org/copyleft/gpl.html</default><values/></dc:rights><questionExerciseType type="Meta"><selection>AlgebraicExpression</selection><default>AlgebraicExpression</default><values><value key="AlgebraicExpression">Algebraic Expression</value><value key="MCQSingleAnswer">MCQ Single Answer</value><value key="MCQMultpleAnswer">MCQ Multiple Answer</value><value key="FillInBlank">Fill in blank</value><value key="Unspecified">Unspecified</value></values></questionExerciseType><dc:date stackname="questionDateLastEdited" type="Meta"><selection>2010-03-03 18:54:23</selection><default>2010-03-02 08:42:05</default><values/></dc:date><lom:status stackname="questionStatus" type="Meta"><selection>Draft</selection><default>Draft</default><values><value key="Draft">Draft</value><value key="Deployed">Deployed</value><value key="Buggy">Buggy</value></values></lom:status><published type="Meta"><selection>Unpublished</selection><default>Unpublished</default><values><value key="Unpublished">Unpublished</value><value key="Published">Published</value><value key="Private">Private</value></values></published><lom:keyword stackname="keywords" type="Meta"><selection>demo, create, examples</selection><default>demo, create, examples</default><values/></lom:keyword></MetaData><ItemOptions><stackoption><name>Display</name><type>list</type><default>LaTeX</default><values><value>LaTeX</value><value>MathML</value></values><casKey>OPT_OUTPUT</casKey><casType>string</casType><selected>LaTeX</selected></stackoption><stackoption><name>MultiplicationSign</name><type>list</type><default>dot</default><values><value>(none)</value><value>dot</value><value>cross</value></values><casKey>make_multsgn</casKey><casType>fun</casType><selected>dot</selected></stackoption><stackoption><name>ComplexNo</name><type>list</type><default>i</default><values><value>i</value><value>j</value><value>symi</value><value>symj</value></values><casKey>make_complexJ</casKey><casType>fun</casType><selected>i</selected></stackoption><stackoption><name>Floats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>SqrtSign</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>sqrtdispflag</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>Simplify</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>simp</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>MarkModMethod</name><type>list</type><default>Penalty</default><values><value>Penalty</value><value>First Answer</value><value>Last Answer</value></values><casKey></casKey><casType></casType><selected>Penalty</selected></stackoption><stackoption><name>AssumePos</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey>assume_pos</casKey><casType>ex</casType><selected>false</selected></stackoption><stackoption><name>TeacherEmail</name><type>string</type><default></default><casKey></casKey><casType></casType><selected></selected></stackoption><stackoption><name>Feedback</name><type>list</type><default>TGS</default><values><value>TGS</value><value>TG</value><value>GS</value><value>T</value><value>G</value><value>S</value><value>none</value></values><casKey></casKey><casType></casType><selected>TGS</selected></stackoption><stackoption><name>FeedbackGenericCorrect</name><type>html</type><default><span class='correct'>Correct answer, well done.</span></default><casKey></casKey><casType></casType><selected><span class='correct'>Correct answer, well done.</span></selected></stackoption><stackoption><name>FeedbackGenericIncorrect</name><type>html</type><default><span class='incorrect'>Incorrect answer.</span></default><casKey></casKey><casType></casType><selected><span class='incorrect>Incorrect answer.</span></selected></stackoption><stackoption><name>FeedbackGenericPCorrect</name><type>html</type><default><span class='partially'>Your answer is partially correct.</span></default><casKey></casKey><casType></casType><selected><span class='partially'>Your answer is partially correct.</span></selected></stackoption><stackoption><name>OptWorkedSol</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption></ItemOptions><ItemTests><test><col><key>IE_ans1</key><value>x^3</value></col><col><key>PRT_PotResTree_Result</key><value>Result-0-T </value></col></test><test><col><key>IE_ans1</key><value>x^2</value></col><col><key>PRT_PotResTree_Result</key><value>Result-0-F </value></col></test></ItemTests></assessmentItem><assessmentItem version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2"><questionCasValues><questionStem type="CasText"><castext>Give an example of a quadratic with roots at $x=@n@$ and $x=@m@$. #ans1# <IEfeedback>ans1</IEfeedback> <PRTfeedback>Result</PRTfeedback></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionStem><questionVariables type="RawKeyVal"><rawKeyVals>n = rand(3)+1; m = n+2*(rand(3)+1)</rawKeyVals><forbidFloats>false</forbidFloats><simplify>true</simplify></questionVariables><workedSolution type="CasText"><castext></castext><forbidFloats>false</forbidFloats><simplify>true</simplify></workedSolution><questionNote type="CasText"><castext>$@(x-n)*(x-m)@=@expand((x-n)*(x-m))@$</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionNote></questionCasValues><questionparts><questionpart><name>ans1</name><inputType type="Meta"><selection>Algebraic Input</selection><default>Algebraic Input</default><values/></inputType><boxsize>15</boxsize><teachersAns type="CasString"><casString>(x-n)*(x-m)</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>ans1</studentAnsKey><syntax type="Meta"><selection></selection><default></default><values/></syntax><stackoption><name>formalSyntax</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>forbidFloats</name><type>list</type><default>true</default><valu... [truncated message content] |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:49
|
Update of /cvsroot/stack/stack-dev/opaque/moodleModule/stack_diagnostic In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/opaque/moodleModule/stack_diagnostic Added Files: Tag: item_state_separation block_stack_diagnostic.php styles.php readme.txt config_global.html Log Message: Brought back up to date with big HEAD merge. --- NEW FILE: block_stack_diagnostic.php --- <?php class block_stack_diagnostic extends block_list { function init() { $this->title = get_string('title', 'block_stack_diagnostic'); $this->version = 2007090500; } function get_content() { global $CFG; $root = $CFG->wwwroot; if ($this->content !== NULL) { return $this->content; } $this->content = new stdClass; $this->content->items = array(); $this->content->icons = array(); $this->content->footer = ''; //check STACK question type has been added. $filename = $CFG->dirroot.'/question/type/opaque/stack/'; if (!empty($this->instance->pageid)) { $context = get_context_instance(CONTEXT_COURSE, $this->instance->pageid); } if (empty($context)) { $context = get_context_instance(CONTEXT_SYSTEM); } global $SESSION; $SESSION->stackContext = $context; if(file_exists($filename)) { //$this->content->items[] = print_r($context,1); //$this->content->icons[] = '<img src="'.$root.'/pix/i/outcomes.gif" class="icon" alt="Diagnostic Report" />'; ///* if (has_capability('mod/quiz:attempt', $context)) { $this->content->items[] = 'can attempt quiz '; $this->content->icons[] = '<img src="'.$root.'/pix/i/outcomes.gif" class="icon" alt="Diagnostic Report" />'; } // if (has_capability('mod/quiz:viewreports', $context)) { $this->content->items[] = 'can view <a href="'.$root.'/question/type/opaque/stack/soapPage.php?page=diagnostic">'.get_string('reports', 'block_stack_diagnostic').'</a>'; $this->content->icons[] = '<img src="'.$root.'/pix/i/outcomes.gif" class="icon" alt="Diagnostic Report" />'; //$this->content->items[] = ; // } //*/ } else { $this->content->items[] = get_string('stack_not_installed', 'block_stack'); $this->content->icons[] = '<img src="'.$root.'/blocks/stack/images/warning.png" class="icon" alt="Warning" />'; } return $this->content; } function has_config() { return true; } /*function instance_allow_config() { return true; }*/ } ?> --- NEW FILE: readme.txt --- STACK Block A simple block which allows displays links to access STACK server functions. (http://stack.bham.ac.uk) Users are only shown links to parts they have access rights to. Install ------- To install, copy the stack folder into <moodle directory>/blocks/ Log into moodle and go to the admin page eg. www.yourmoodlesite.com/admin Select a course and turn editing on. You can add then add the STACK Block to that course. Icons ----- Icons from Moodle and http://www.famfamfam.com/lab/icons/silk/ Version History --------------- 1.0 First Release (5th Sept 2007) Jonathan Hart, j.p...@bh... --- NEW FILE: styles.php --- /* We provide our own quiz buttons, one of which triggers a hidden button. */ .submitbtns { display: none; } /* Ensures that elements generated by jsMath don't overlap and thus disable buttons whilst enabling embedded input fields. Workaround from http://www.math.union.edu/~dpvc/jsMath/bugs.html STACK bug #2890734 */ input { z-index: 2; position: relative; } --- NEW FILE: config_global.html --- <h3><?php echo get_string('settings', 'block_stack_diagnostic'); ?></h3> <p><?php echo get_string('noSettings', 'block_stack_diagnostic'); ?></p> <p> <?php $url = '../question/type/opaque/engines.php'; echo get_string('opaqueSettings', 'block_stack_diagnostic', $url); ?> .</p> |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:49
|
Update of /cvsroot/stack/stack-dev/other/jqueryCSS In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/other/jqueryCSS Added Files: Tag: item_state_separation jquery.dataTables.css jquery.ui.css Log Message: Brought back up to date with big HEAD merge. --- NEW FILE: jquery.ui.css --- /* * jQuery UI CSS Framework * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. */ /* Layout helpers ----------------------------------*/ .ui-helper-hidden { display: none; } .ui-helper-hidden-accessible { position: absolute; left: -99999999px; } .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .ui-helper-clearfix { display: inline-block; } /* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix { height:1%; } .ui-helper-clearfix { display:block; } /* end clearfix */ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } /* Interaction Cues ----------------------------------*/ .ui-state-disabled { cursor: default !important; } /* Icons ----------------------------------*/ /* states and images */ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } /* Misc visuals ----------------------------------*/ /* Overlays */ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } /* * jQuery UI CSS Framework * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Helvetica,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=2px&bgColorHeader=dddddd&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=50&borderColorHeader=dddddd&fcHeader=444444&iconColorHeader=0073ea&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=dddddd&fcContent=444444&iconColorContent=ff0084&bgColorDefault=f6f6f6&bgTextureDefault=03_highlight_soft.png&bgImgOpacityDefault=100&borderColorDefault=dddddd&fcDefault=0073ea&iconColorDefault=666666&bgColorHover=0073ea&bgTextureHover=03_highlight_soft.png&bgImgOpacityHover=25&borderColorHover=0073ea&fcHover=ffffff&iconColorHover=ffffff&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=dddddd&fcActive=ff0084&iconColorActive=454545&bgColorHighlight=ffffff&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=cccccc&fcHighlight=444444&iconColorHighlight=0073ea&bgColorError=ffffff&bgTextureError=01_flat.png&bgImgOpacityError=55&borderColorError=ff0084&fcError=222222&iconColorError=ff0084&bgColorOverlay=eeeeee&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=80&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=60&thicknessShadow=4px&offsetTopShadow=-4px&offsetLeftShadow=-4px&cornerRadiusShadow=0px */ /* Component containers ----------------------------------*/ .ui-widget { font-family: Helvetica, Arial, sans-serif; font-size: 1.1em; } .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Helvetica, Arial, sans-serif; font-size: 1em; } .ui-widget-content { border: 1px solid #dddddd; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #444444; } .ui-widget-content a { color: #444444; } .ui-widget-header { border: 1px solid #dddddd; background: #dddddd url(images/ui-bg_highlight-soft_50_dddddd_1x100.png) 50% 50% repeat-x; color: #444444; font-weight: bold; } .ui-widget-header a { color: #444444; } /* Interaction states ----------------------------------*/ .ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #dddddd; background: #f6f6f6 url(images/ui-bg_highlight-soft_100_f6f6f6_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #0073ea; outline: none; } .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #0073ea; text-decoration: none; outline: none; } .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #0073ea; background: #0073ea url(images/ui-bg_highlight-soft_25_0073ea_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; outline: none; } .ui-state-hover a, .ui-state-hover a:hover { color: #ffffff; text-decoration: none; outline: none; } .ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #dddddd; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #ff0084; outline: none; } .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ff0084; outline: none; text-decoration: none; } /* Interaction Cues ----------------------------------*/ .ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #cccccc; background: #ffffff url(images/ui-bg_flat_55_ffffff_40x100.png) 50% 50% repeat-x; color: #444444; } .ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #444444; } .ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #ff0084; background: #ffffff url(images/ui-bg_flat_55_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } .ui-state-error a, .ui-widget-content .ui-state-error a { color: #222222; } .ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #222222; } .ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } .ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } .ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } /* Icons ----------------------------------*/ /* states and images */ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_ff0084_256x240.png); } .ui-widget-content .ui-icon {background-image: url(images/ui-icons_ff0084_256x240.png); } .ui-widget-header .ui-icon {background-image: url(images/ui-icons_0073ea_256x240.png); } .ui-state-default .ui-icon { background-image: url(images/ui-icons_666666_256x240.png); } .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_0073ea_256x240.png); } .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ff0084_256x240.png); } /* positioning */ .ui-icon-carat-1-n { background-position: 0 0; } .ui-icon-carat-1-ne { background-position: -16px 0; } .ui-icon-carat-1-e { background-position: -32px 0; } .ui-icon-carat-1-se { background-position: -48px 0; } .ui-icon-carat-1-s { background-position: -64px 0; } .ui-icon-carat-1-sw { background-position: -80px 0; } .ui-icon-carat-1-w { background-position: -96px 0; } .ui-icon-carat-1-nw { background-position: -112px 0; } .ui-icon-carat-2-n-s { background-position: -128px 0; } .ui-icon-carat-2-e-w { background-position: -144px 0; } .ui-icon-triangle-1-n { background-position: 0 -16px; } .ui-icon-triangle-1-ne { background-position: -16px -16px; } .ui-icon-triangle-1-e { background-position: -32px -16px; } .ui-icon-triangle-1-se { background-position: -48px -16px; } .ui-icon-triangle-1-s { background-position: -64px -16px; } .ui-icon-triangle-1-sw { background-position: -80px -16px; } .ui-icon-triangle-1-w { background-position: -96px -16px; } .ui-icon-triangle-1-nw { background-position: -112px -16px; } .ui-icon-triangle-2-n-s { background-position: -128px -16px; } .ui-icon-triangle-2-e-w { background-position: -144px -16px; } .ui-icon-arrow-1-n { background-position: 0 -32px; } .ui-icon-arrow-1-ne { background-position: -16px -32px; } .ui-icon-arrow-1-e { background-position: -32px -32px; } .ui-icon-arrow-1-se { background-position: -48px -32px; } .ui-icon-arrow-1-s { background-position: -64px -32px; } .ui-icon-arrow-1-sw { background-position: -80px -32px; } .ui-icon-arrow-1-w { background-position: -96px -32px; } .ui-icon-arrow-1-nw { background-position: -112px -32px; } .ui-icon-arrow-2-n-s { background-position: -128px -32px; } .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } .ui-icon-arrow-2-e-w { background-position: -160px -32px; } .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } .ui-icon-arrowstop-1-n { background-position: -192px -32px; } .ui-icon-arrowstop-1-e { background-position: -208px -32px; } .ui-icon-arrowstop-1-s { background-position: -224px -32px; } .ui-icon-arrowstop-1-w { background-position: -240px -32px; } .ui-icon-arrowthick-1-n { background-position: 0 -48px; } .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } .ui-icon-arrowthick-1-e { background-position: -32px -48px; } .ui-icon-arrowthick-1-se { background-position: -48px -48px; } .ui-icon-arrowthick-1-s { background-position: -64px -48px; } .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } .ui-icon-arrowthick-1-w { background-position: -96px -48px; } .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } .ui-icon-arrow-4 { background-position: 0 -80px; } .ui-icon-arrow-4-diag { background-position: -16px -80px; } .ui-icon-extlink { background-position: -32px -80px; } .ui-icon-newwin { background-position: -48px -80px; } .ui-icon-refresh { background-position: -64px -80px; } .ui-icon-shuffle { background-position: -80px -80px; } .ui-icon-transfer-e-w { background-position: -96px -80px; } .ui-icon-transferthick-e-w { background-position: -112px -80px; } .ui-icon-folder-collapsed { background-position: 0 -96px; } .ui-icon-folder-open { background-position: -16px -96px; } .ui-icon-document { background-position: -32px -96px; } .ui-icon-document-b { background-position: -48px -96px; } .ui-icon-note { background-position: -64px -96px; } .ui-icon-mail-closed { background-position: -80px -96px; } .ui-icon-mail-open { background-position: -96px -96px; } .ui-icon-suitcase { background-position: -112px -96px; } .ui-icon-comment { background-position: -128px -96px; } .ui-icon-person { background-position: -144px -96px; } .ui-icon-print { background-position: -160px -96px; } .ui-icon-trash { background-position: -176px -96px; } .ui-icon-locked { background-position: -192px -96px; } .ui-icon-unlocked { background-position: -208px -96px; } .ui-icon-bookmark { background-position: -224px -96px; } .ui-icon-tag { background-position: -240px -96px; } .ui-icon-home { background-position: 0 -112px; } .ui-icon-flag { background-position: -16px -112px; } .ui-icon-calendar { background-position: -32px -112px; } .ui-icon-cart { background-position: -48px -112px; } .ui-icon-pencil { background-position: -64px -112px; } .ui-icon-clock { background-position: -80px -112px; } .ui-icon-disk { background-position: -96px -112px; } .ui-icon-calculator { background-position: -112px -112px; } .ui-icon-zoomin { background-position: -128px -112px; } .ui-icon-zoomout { background-position: -144px -112px; } .ui-icon-search { background-position: -160px -112px; } .ui-icon-wrench { background-position: -176px -112px; } .ui-icon-gear { background-position: -192px -112px; } .ui-icon-heart { background-position: -208px -112px; } .ui-icon-star { background-position: -224px -112px; } .ui-icon-link { background-position: -240px -112px; } .ui-icon-cancel { background-position: 0 -128px; } .ui-icon-plus { background-position: -16px -128px; } .ui-icon-plusthick { background-position: -32px -128px; } .ui-icon-minus { background-position: -48px -128px; } .ui-icon-minusthick { background-position: -64px -128px; } .ui-icon-close { background-position: -80px -128px; } .ui-icon-closethick { background-position: -96px -128px; } .ui-icon-key { background-position: -112px -128px; } .ui-icon-lightbulb { background-position: -128px -128px; } .ui-icon-scissors { background-position: -144px -128px; } .ui-icon-clipboard { background-position: -160px -128px; } .ui-icon-copy { background-position: -176px -128px; } .ui-icon-contact { background-position: -192px -128px; } .ui-icon-image { background-position: -208px -128px; } .ui-icon-video { background-position: -224px -128px; } .ui-icon-script { background-position: -240px -128px; } .ui-icon-alert { background-position: 0 -144px; } .ui-icon-info { background-position: -16px -144px; } .ui-icon-notice { background-position: -32px -144px; } .ui-icon-help { background-position: -48px -144px; } .ui-icon-check { background-position: -64px -144px; } .ui-icon-bullet { background-position: -80px -144px; } .ui-icon-radio-off { background-position: -96px -144px; } .ui-icon-radio-on { background-position: -112px -144px; } .ui-icon-pin-w { background-position: -128px -144px; } .ui-icon-pin-s { background-position: -144px -144px; } .ui-icon-play { background-position: 0 -160px; } .ui-icon-pause { background-position: -16px -160px; } .ui-icon-seek-next { background-position: -32px -160px; } .ui-icon-seek-prev { background-position: -48px -160px; } .ui-icon-seek-end { background-position: -64px -160px; } .ui-icon-seek-first { background-position: -80px -160px; } .ui-icon-stop { background-position: -96px -160px; } .ui-icon-eject { background-position: -112px -160px; } .ui-icon-volume-off { background-position: -128px -160px; } .ui-icon-volume-on { background-position: -144px -160px; } .ui-icon-power { background-position: 0 -176px; } .ui-icon-signal-diag { background-position: -16px -176px; } .ui-icon-signal { background-position: -32px -176px; } .ui-icon-battery-0 { background-position: -48px -176px; } .ui-icon-battery-1 { background-position: -64px -176px; } .ui-icon-battery-2 { background-position: -80px -176px; } .ui-icon-battery-3 { background-position: -96px -176px; } .ui-icon-circle-plus { background-position: 0 -192px; } .ui-icon-circle-minus { background-position: -16px -192px; } .ui-icon-circle-close { background-position: -32px -192px; } .ui-icon-circle-triangle-e { background-position: -48px -192px; } .ui-icon-circle-triangle-s { background-position: -64px -192px; } .ui-icon-circle-triangle-w { background-position: -80px -192px; } .ui-icon-circle-triangle-n { background-position: -96px -192px; } .ui-icon-circle-arrow-e { background-position: -112px -192px; } .ui-icon-circle-arrow-s { background-position: -128px -192px; } .ui-icon-circle-arrow-w { background-position: -144px -192px; } .ui-icon-circle-arrow-n { background-position: -160px -192px; } .ui-icon-circle-zoomin { background-position: -176px -192px; } .ui-icon-circle-zoomout { background-position: -192px -192px; } .ui-icon-circle-check { background-position: -208px -192px; } .ui-icon-circlesmall-plus { background-position: 0 -208px; } .ui-icon-circlesmall-minus { background-position: -16px -208px; } .ui-icon-circlesmall-close { background-position: -32px -208px; } .ui-icon-squaresmall-plus { background-position: -48px -208px; } .ui-icon-squaresmall-minus { background-position: -64px -208px; } .ui-icon-squaresmall-close { background-position: -80px -208px; } .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } .ui-icon-grip-solid-vertical { background-position: -32px -224px; } .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } .ui-icon-grip-diagonal-se { background-position: -80px -224px; } /* Misc visuals ----------------------------------*/ /* Corner radius */ .ui-corner-tl { -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; } .ui-corner-tr { -moz-border-radius-topright: 2px; -webkit-border-top-right-radius: 2px; } .ui-corner-bl { -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; } .ui-corner-br { -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; } .ui-corner-top { -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; -moz-border-radius-topright: 2px; -webkit-border-top-right-radius: 2px; } .ui-corner-bottom { -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; } .ui-corner-right { -moz-border-radius-topright: 2px; -webkit-border-top-right-radius: 2px; -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; } .ui-corner-left { -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; } .ui-corner-all { -moz-border-radius: 2px; -webkit-border-radius: 2px; } /* Overlays */ .ui-widget-overlay { background: #eeeeee url(images/ui-bg_flat_0_eeeeee_40x100.png) 50% 50% repeat-x; opacity: .80;filter:Alpha(Opacity=80); } .ui-widget-shadow { margin: -4px 0 0 -4px; padding: 4px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .60;filter:Alpha(Opacity=60); -moz-border-radius: 0px; -webkit-border-radius: 0px; }/* Accordion ----------------------------------*/ .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } .ui-accordion .ui-accordion-li-fix { display: inline; } .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; } .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; } .ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker ----------------------------------*/ .ui-datepicker { width: 17em; padding: .2em .2em 0; } .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } .ui-datepicker .ui-datepicker-prev { left:2px; } .ui-datepicker .ui-datepicker-next { right:2px; } .ui-datepicker .ui-datepicker-prev-hover { left:1px; } .ui-datepicker .ui-datepicker-next-hover { right:1px; } .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } .ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; } .ui-datepicker select.ui-datepicker-month-year {width: 100%;} .ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year { width: 49%;} .ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; } .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } .ui-datepicker td { border: 0; padding: 1px; } .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } /* with multiple calendars */ .ui-datepicker.ui-datepicker-multi { width:auto; } .ui-datepicker-multi .ui-datepicker-group { float:left; } .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } .ui-datepicker-row-break { clear:both; width:100%; } /* RTL support */ .ui-datepicker-rtl { direction: rtl; } .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } .ui-datepicker-rtl .ui-datepicker-group { float:right; } .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ .ui-datepicker-cover { display: none; /*sorry for IE5*/ display/**/: block; /*sorry for IE5*/ position: absolute; /*must have*/ z-index: -1; /*must have*/ filter: mask(); /*must have*/ top: -4px; /*must have*/ left: -4px; /*must have*/ width: 200px; /*must have*/ height: 200px; /*must have*/ }/* Dialog ----------------------------------*/ .ui-dialog { position: relative; padding: .2em; width: 300px; } .ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } .ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } .ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } .ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } .ui-draggable .ui-dialog-titlebar { cursor: move; } /* Progressbar ----------------------------------*/ .ui-progressbar { height:2em; text-align: left; } .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable ----------------------------------*/ .ui-resizable { position: relative;} .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; } .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; } .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; } .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; } .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider ----------------------------------*/ .ui-slider { position: relative; text-align: left; } .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; } .ui-slider-horizontal { height: .8em; } .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } .ui-slider-horizontal .ui-slider-range-min { left: 0; } .ui-slider-horizontal .ui-slider-range-max { right: 0; } .ui-slider-vertical { width: .8em; height: 100px; } .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } .ui-slider-vertical .ui-slider-range-min { bottom: 0; } .ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs ----------------------------------*/ .ui-tabs { padding: .2em; zoom: 1; } .ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } .ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } .ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } .ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; } .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ .ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } .ui-tabs .ui-tabs-hide { display: none !important; } --- NEW FILE: jquery.dataTables.css --- /* * File: demo_table_jui.css * CVS: $Id$ * Description: CSS descriptions for DataTables demo pages * Author: Allan Jardine * Created: Tue May 12 06:47:22 BST 2009 * Modified: $Date$ by $Author$ * Language: CSS * Project: DataTables * * Copyright 2009 Allan Jardine. All Rights Reserved. * * *************************************************************************** * DESCRIPTION * * The styles given here are suitable for the demos that are used with the standard DataTables * distribution (see www.datatables.net). You will most likely wish to modify these styles to * meet the layout requirements of your site. * * Common issues: * 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is * no conflict between the two pagination types. If you want to use full_numbers pagination * ensure that you either have "example_alt_pagination" as a body class name, or better yet, * modify that selector. * Note that the path used for Images is relative. All images are by default located in * ../images/ - relative to this CSS file. */ /* * jQuery UI specific styling */ .paging_two_button .fg-button { float: left; cursor: pointer; * cursor: hand; } .paging_full_numbers .fg-button { padding: 2px 6px; cursor: pointer; * cursor: hand; } .paging_full_numbers { width: 350px !important; } .fg-toolbar { padding: 5px; background-color: none; } .dataTables_paginate { width: auto; } table.display thead th { padding: 3px 0px 3px 10px; cursor: pointer; * cursor: hand; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Everything below this line is the same as demo_table.css. This file is * required for 'cleanliness' of the markup * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * DataTables features */ .dataTables_wrapper { position: relative; min-height: 302px; _height: 302px; clear: both; } .dataTables_processing { position: absolute; top: 0px; left: 50%; width: 250px; margin-left: -125px; border: 1px solid #ddd; text-align: center; color: #999; font-size: 11px; padding: 2px 0; } .dataTables_length { width: 40%; float: left; } .dataTables_filter { width: 50%; float: right; text-align: right; } .dataTables_info { width: 50%; float: left; } .dataTables_paginate { float: right; text-align: right; } /* Pagination nested */ .paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { height: 19px; width: 19px; margin-left: 3px; float: left; } .paginate_disabled_previous { background-image: url('../images/back_disabled.jpg'); } .paginate_enabled_previous { background-image: url('../images/back_enabled.jpg'); } .paginate_disabled_next { background-image: url('../images/forward_disabled.jpg'); } .paginate_enabled_next { background-image: url('../images/forward_enabled.jpg'); } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * DataTables display */ table.display { margin: 0 auto; width: 100%; clear: both; } table.display tfoot th { padding: 3px 10px; border-top: 1px solid black; font-weight: bold; } table.display tr.heading2 td { border-bottom: 1px solid #aaa; } table.display td { padding: 3px 10px; } table.display td.center { text-align: center; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * DataTables sorting */ .sorting_asc { background: url('../images/sort_asc.jpg') no-repeat center right; } .sorting_desc { background: url('../images/sort_desc.jpg') no-repeat center right; } .sorting { background: url('../images/sort_both.jpg') no-repeat center right; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * DataTables row classes */ table.display tr.odd.gradeA { background-color: #ddffdd; } table.display tr.even.gradeA { background-color: #eeffee; } table.display tr.odd.gradeA { background-color: #ddffdd; } table.display tr.even.gradeA { background-color: #eeffee; } table.display tr.odd.gradeC { background-color: #ddddff; } table.display tr.even.gradeC { background-color: #eeeeff; } table.display tr.odd.gradeX { background-color: #ffdddd; } table.display tr.even.gradeX { background-color: #ffeeee; } table.display tr.odd.gradeU { background-color: #ddd; } table.display tr.even.gradeU { background-color: #eee; } tr.odd { background-color: #E2E4FF; } tr.even { background-color: white; } /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Misc */ .top, .bottom { padding: 15px; background-color: #F5F5F5; border: 1px solid #CCCCCC; } .top .dataTables_info { float: none; } .clear { clear: both; } .dataTables_empty { text-align: center; } tfoot input { margin: 0.5em 0; width: 100%; color: #444; } tfoot input.search_init { color: #999; } td.group { background-color: #d1cfd0; border-bottom: 2px solid #A19B9E; border-top: 2px solid #A19B9E; } td.details { background-color: #d1cfd0; border: 2px solid #A19B9E; } .example_alt_pagination div.dataTables_info { width: 40%; } .paging_full_numbers span.paginate_button, .paging_full_numbers span.paginate_active { border: 1px solid #aaa; -webkit-border-radius: 5px; -moz-border-radius: 5px; padding: 2px 5px; margin: 0 3px; cursor: pointer; *cursor: hand; } .paging_full_numbers span.paginate_button { background-color: #ddd; } .paging_full_numbers span.paginate_button:hover { background-color: #ccc; } .paging_full_numbers span.paginate_active { background-color: #99B3FF; } table.display tr.even.row_selected td { background-color: #B0BED9; } table.display tr.odd.row_selected td { background-color: #9FAFD1; } table.display tr.row_highlighted td { background-color: #B8E0DE; } /* * Sorting classes for columns */ /* For the standard odd/even */ tr.odd td.sorting_1 { background-color: #D3D6FF; } tr.odd td.sorting_2 { background-color: #DADCFF; } tr.odd td.sorting_3 { background-color: #E0E2FF; } tr.even td.sorting_1 { background-color: #EAEBFF; } tr.even td.sorting_2 { background-color: #F2F3FF; } tr.even td.sorting_3 { background-color: #F9F9FF; } /* For the Conditional-CSS grading rows */ /* Colour calculations (based off the main row colours) Level 1: dd > c4 ee > d5 Level 2: dd > d1 ee > e2 */ tr.odd.gradeA td.sorting_1 { background-color: #c4ffc4; } tr.odd.gradeA td.sorting_2 { background-color: #d1ffd1; } tr.odd.gradeA td.sorting_3 { background-color: #d1ffd1; } tr.even.gradeA td.sorting_1 { background-color: #d5ffd5; } tr.even.gradeA td.sorting_2 { background-color: #e2ffe2; } tr.even.gradeA td.sorting_3 { background-color: #e2ffe2; } tr.odd.gradeC td.sorting_1 { background-color: #c4c4ff; } tr.odd.gradeC td.sorting_2 { background-color: #d1d1ff; } tr.odd.gradeC td.sorting_3 { background-color: #d1d1ff; } tr.even.gradeC td.sorting_1 { background-color: #d5d5ff; } tr.even.gradeC td.sorting_2 { background-color: #e2e2ff; } tr.even.gradeC td.sorting_3 { background-color: #e2e2ff; } tr.odd.gradeX td.sorting_1 { background-color: #ffc4c4; } tr.odd.gradeX td.sorting_2 { background-color: #ffd1d1; } tr.odd.gradeX td.sorting_3 { background-color: #ffd1d1; } tr.even.gradeX td.sorting_1 { background-color: #ffd5d5; } tr.even.gradeX td.sorting_2 { background-color: #ffe2e2; } tr.even.gradeX td.sorting_3 { background-color: #ffe2e2; } tr.odd.gradeU td.sorting_1 { background-color: #c4c4c4; } tr.odd.gradeU td.sorting_2 { background-color: #d1d1d1; } tr.odd.gradeU td.sorting_3 { background-color: #d1d1d1; } tr.even.gradeU td.sorting_1 { background-color: #d5d5d5; } tr.even.gradeU td.sorting_2 { background-color: #e2e2e2; } tr.even.gradeU td.sorting_3 { background-color: #e2e2e2; } /* * Row highlighting example */ .ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted { background-color: #ECFFB3; } .ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted { background-color: #E6FF99; } |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:48
|
Update of /cvsroot/stack/stack-dev/lang/en In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/lang/en Modified Files: Tag: item_state_separation stack.php Log Message: Brought back up to date with big HEAD merge. Index: stack.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lang/en/stack.php,v retrieving revision 1.139.2.7.2.1 retrieving revision 1.139.2.7.2.2 diff -C2 -d -r1.139.2.7.2.1 -r1.139.2.7.2.2 *** stack.php 7 Dec 2009 14:41:23 -0000 1.139.2.7.2.1 --- stack.php 9 Nov 2010 16:51:39 -0000 1.139.2.7.2.2 *************** *** 20,24 **** $string['WorkedSolution'] = 'Worked solution'; $string['NoSolution'] = '[No solution available]'; ! $string['YourAttemptsWere'] = 'Your attempts at this question were as follows.'; $string['Answer'] = 'Answer'; $string['NoAttemptsAtQ'] = 'You have made no attempts at this question.'; --- 20,25 ---- $string['WorkedSolution'] = 'Worked solution'; $string['NoSolution'] = '[No solution available]'; ! $string['YourAttemptsWere'] = 'Your attempts at this question were as follows'; ! $string['stack_show/hide_feedback'] = 'show/hide feedback'; $string['Answer'] = 'Answer'; $string['NoAttemptsAtQ'] = 'You have made no attempts at this question.'; *************** *** 46,50 **** $string['stackQuestion_questionName'] = 'Name'; ! $string['stackQuestion_questionKeywords'] = 'Keywords'; $string['stackQuestion_questionBody'] = 'Body'; $string['stackQuestion_questionUserLastEdited'] = 'User'; --- 47,53 ---- $string['stackQuestion_questionName'] = 'Name'; ! $string['stackQuestion_questionKeywordFilter'] = 'Keyword filter'; ! $string['stackQuestion_questionKeywordReset'] = '[reset]'; ! $string['stackQuestion_questionKeywordInvertFilter'] = 'Invert keywords'; $string['stackQuestion_questionBody'] = 'Body'; $string['stackQuestion_questionUserLastEdited'] = 'User'; *************** *** 64,74 **** $string['stackQuestion_questionRights'] = 'Rights statement'; $string['stackQuestion_questionValid'] = 'Valid'; $string['stackQuestion_questionStatus'] = 'Status'; $string['stackQuestion_questionDescription'] = 'Description'; ! $string['stackQuestion_questionDateLastEdited'] = 'Last edited on'; $string['stackQuestion_questionPublished'] = 'Privacy'; $string['stackQuestion_questionRelevance'] = 'Relevance'; ! $string['stackQuestion_questionNoDeployed'] = "# dep'd"; // Used in the question bank order select form to indicate no selection. --- 67,79 ---- $string['stackQuestion_questionRights'] = 'Rights statement'; + $string['stackQuestion_questionHeader'] = '<b>Name</b> (version): Description <small>keywords</small>'; $string['stackQuestion_questionValid'] = 'Valid'; $string['stackQuestion_questionStatus'] = 'Status'; $string['stackQuestion_questionDescription'] = 'Description'; ! $string['stackQuestion_questionDateLastEdited'] = 'Last edited'; $string['stackQuestion_questionPublished'] = 'Privacy'; $string['stackQuestion_questionRelevance'] = 'Relevance'; ! $string['stackQuestion_questionNoDeployed'] = "<abbr title='number deployed'>#</abbr>"; ! $string['stackQuestion_questionActions'] = "Actions"; // Used in the question bank order select form to indicate no selection. *************** *** 121,124 **** --- 126,130 ---- $string['stackOptions_FeedBackGenericPCorrect'] = 'Feedback: partially correct'; $string['stackOptions_FeedBackGenericPCorrect_def'] = "<span class='partially'>Your answer is partially correct.</span>"; + $string['stackOptions_OptWorkedSol'] = 'Worked solution on demand'; $string['stackOptions_QuizMode'] = 'Quiz mode'; $string['stackOptions_SubjectMode'] = 'Allow access to'; *************** *** 269,272 **** --- 275,279 ---- $string['AT_NOTIMPLEMENTED'] = 'This answer test has not been implemented.'; + $string['TEST_FAILED'] = 'The answer test failed to execute correctly: please altert your teacher.'; $string['ATAlgEquiv_SA_not_expression'] = 'Your answer should be an expression, not an equation, inequality, list, set or matrix. '; *************** *** 325,331 **** $string['ATCompSquare_true'] = ''; ! $string['ATCompSquare_wrong'] = ''; $string['ATCompSquare_not_AlgEquiv'] = 'Your answer appears to be in the correct form, but is not equivalent to the correct answer.'; ! $string['ATCompSquare_wrong_no_summands'] = 'The completed square is of the form \( a(\cdots\cdots)^2 + b\) where \(a\) and \(b\) do not depend on your variable. More than one of your summands appears to depend on the variable in your answer.'; --- 332,338 ---- $string['ATCompSquare_true'] = ''; ! $string['ATCompSquare_false'] = ''; $string['ATCompSquare_not_AlgEquiv'] = 'Your answer appears to be in the correct form, but is not equivalent to the correct answer.'; ! $string['ATCompSquare_false_no_summands'] = 'The completed square is of the form \( a(\cdots\cdots)^2 + b\) where \(a\) and \(b\) do not depend on your variable. More than one of your summands appears to depend on the variable in your answer.'; *************** *** 367,375 **** $string['FE_index_main'] = 'main menu'; $string['FE_index_Hints'] = 'Hints'; ! $string['FE_index_search'] = 'Search Questions'; $string['FE_peak_memory'] = 'Peak memory usage: '; $string['FE_publicCopied'] = 'Public question copied'; $string['FE_publicCopy'] = 'You may now '; ! $string['FE_publicCopy2'] = 'modify your personal copy'; $string['FE_publicCopy3'] = 'of the question.'; $string['FE_confirmDelete'] = 'Confirm Delete'; --- 374,383 ---- $string['FE_index_main'] = 'main menu'; $string['FE_index_Hints'] = 'Hints'; ! $string['FE_index_search'] = 'Search'; ! $string['FE_index_question(s)'] = 'question(s)'; $string['FE_peak_memory'] = 'Peak memory usage: '; $string['FE_publicCopied'] = 'Public question copied'; $string['FE_publicCopy'] = 'You may now '; ! $string['FE_publicCopy2'] = 'modify your personal copy'; $string['FE_publicCopy3'] = 'of the question.'; $string['FE_confirmDelete'] = 'Confirm Delete'; *************** *** 379,383 **** $string['FE_noCancel'] = 'No, Cancel'; $string['FE_testQuestion'] = 'Test Question'; ! $string['FE_deployQuestion'] = 'Deploy Question'; $string['FE_question'] = 'Question:'; --- 387,391 ---- $string['FE_noCancel'] = 'No, Cancel'; $string['FE_testQuestion'] = 'Test Question'; ! $string['FE_deployVersion'] = 'Deploy Version'; $string['FE_question'] = 'Question:'; *************** *** 385,398 **** $string['FE_deployQuestion_attemptingDeploy'] = 'Attempting to deploy {$a} instances.'; $string['FE_deployQuestion_deployedInstances'] = 'Deployed {$a} new instances.'; ! $string['FE_deployQuestion_dropping'] = 'Dropping version '; $string['FE_deployQuestion_auto'] = 'Automatically deployed single question instance'; ! $string['FE_deployQuestion_singletonDeployed'] = 'Singleton question deployed (\'Drop\' will re-deploy).'; ! $string['FE_deployQuestion_versions'] = ' instances currently cached.'; ! $string['FE_deployQuestion_version'] = '1 instance currently cached.'; ! $string['FE_deployQuestion_newversions'] = 'new random instances.'; $string['FE_deployQuestion_noi'] = 'No instances added yet.'; $string['FE_deployQuestion_norand'] = 'There are no random instances of this question, and hence no need to deploy more than one version.'; ! $string['FE_deployQuestion_instancesOfQuestion']= 'Instances of question '; $string['FE_deployQuestion_primedResponses'] = 'Primed responses'; $string['FE_validate'] = '{$a[0]} of {$a[1]} questions validated.'; --- 393,417 ---- $string['FE_deployQuestion_attemptingDeploy'] = 'Attempting to deploy {$a} instances.'; $string['FE_deployQuestion_deployedInstances'] = 'Deployed {$a} new instances.'; ! $string['FE_deployQuestion_instancesOfQuestion']= 'Instances of question {$a}'; ! $string['FE_deployQuestion_droppedInstance'] = 'Dropped instance.'; $string['FE_deployQuestion_auto'] = 'Automatically deployed single question instance'; ! $string['FE_deployQuestion_singletonDeployed'] = 'Singleton question deployed (\'Undeploy\' will trigger redeploy).'; ! $string['FE_deployQuestion_xInstances'] = '{$a} instances '; ! $string['FE_deployQuestion_instanceDeployed'] = '1 instance deployed.'; ! $string['FE_deployQuestion_newRandomInstances'] = 'new random instances'; $string['FE_deployQuestion_noi'] = 'No instances added yet.'; $string['FE_deployQuestion_norand'] = 'There are no random instances of this question, and hence no need to deploy more than one version.'; ! $string['FE_deployQuestion_instancesOfVersion']= 'Instances of question version'; ! $string['FE_deployQuestion_autoprime'] = 'automatically prime'; $string['FE_deployQuestion_primedResponses'] = 'Primed responses'; + $string['FE_deployQuestion_ofVersionXdeployed'] = 'of version {$a} deployed.'; + $string['FE_deployQuestion_newerVersion'] = 'There is a newer version of this question available: <strong>version {$a}</strong>. To redeploy with this you will first need to undeploy the instances below. Students will continue to be able to answer those instances if they have already started.'; + $string['FE_deployQuestion_dropInstance'] = 'Dropped an instance ({$a}).'; + $string['FE_deployQuestion_undeployAll'] = 'Undeploy all'; + $string['FE_deployQuestion_confirmUndeployAll'] = 'Are you sure want to drop all deployed instances of this question version?'; + $string['FE_deployQuestion_oldVersionDeployed'] = 'An older version of this question has been deployed. Before you can deploy instances of this latest version you will need to undeploy all instances of the older version below. Students already using this version will be able to continue.'; + $string['FE_deployQuestion_newerVersionCannotDeploy'] = 'There is now a newer version of this question. This means you cannot deploy any more instances from the older version.'; + $string['FE_deployQuestion_undeployOldVersion'] = 'To deploy instances of the latest version you will need to undeploy all instances of this version. '; + $string['FE_deployQuestion_primedResponsesBlurb'] = 'Pregenerated from the question tests, they can include correct answers as well as common mistakes. The cache can be primed to include their straightforward submission to save the work at quiz time.'; $string['FE_validate'] = '{$a[0]} of {$a[1]} questions validated.'; *************** *** 484,487 **** --- 503,507 ---- $string['stackQuestion_PR_AddAPR'] = 'Add a Potential Response'; $string['stackQuestion_PR_requirements'] = 'This Potential Response Tree will become active when the student has answered:'; + $string['PR_ERROR'] = 'Please alert your teacher that the marking algorithm has failed to work because of the following problems:'; $string['stackCas_invalidCommand'] = 'CAS commands not valid'; *************** *** 500,503 **** --- 520,524 ---- $string['stackCas_apostrophe'] = 'Apostrophes are not permitted in responses: '; $string['stackCas_finalChar'] = '\'{$a[0]}\' is an invalid final character in {$a[1]}'; + $string['stackCas_qmchar'] = 'This answer contains a question mark, which is forbidden.'; //Authoring questions *************** *** 515,518 **** --- 536,540 ---- //buttons + $string['stackAuthor_qid'] = 'Question ID:'; $string['stackAuthor_button_update'] = 'Update'; $string['stackAuthor_button_addPRT'] = '+'; *************** *** 532,545 **** $string['stackAuthor_button_exportAsXml'] = 'Export as XML'; $string['chat_button'] = 'chat'; //author editor text $string['stackAuthor_title'] = 'Author Question'; ! $string['stackAuthor_qid'] = 'Question ID:'; $string['stackAuthor_name'] = 'Name:'; $string['stackAuthor_description'] = 'Description:'; $string['stackAuthor_keywords'] = 'Keywords:'; $string['stackAuthor_qvariables'] = 'Question Variables:'; ! $string['stackAuthor_stem'] = 'Question Stem:'; ! $string['stackAuthor_stemInfo'] = '#ans# denotes student answers<br /> @castext@ for castext<br /><html></html> for html <br />$\latex$ for latex'; $string['stackAuthor_workedSolution'] = 'Worked Solution: '; $string['stackAuthor_qnote'] = 'Question Note:'; --- 554,571 ---- $string['stackAuthor_button_exportAsXml'] = 'Export as XML'; $string['chat_button'] = 'chat'; + $string['stackQuiz_button_submit'] = 'Submit'; + $string['stackQuiz_button_finishQuiz'] = 'Finish quiz'; //author editor text + $string['stackAuthor_onlineGuide'] = 'Online Guide'; $string['stackAuthor_title'] = 'Author Question'; ! $string['stackAuthor_editingQuestion'] = 'Editing Question: '; ! $string['stackAuthor_stem'] = 'Stem'; $string['stackAuthor_name'] = 'Name:'; $string['stackAuthor_description'] = 'Description:'; $string['stackAuthor_keywords'] = 'Keywords:'; $string['stackAuthor_qvariables'] = 'Question Variables:'; ! $string['stackAuthor_questionStem'] = 'Question Stem:'; ! $string['stackAuthor_stemInfo'] = '#ans# denotes student answers<br /> @castext@ for castext<br /><html></html> for html <br />latex'; $string['stackAuthor_workedSolution'] = 'Worked Solution: '; $string['stackAuthor_qnote'] = 'Question Note:'; *************** *** 566,569 **** --- 592,597 ---- $string['stackAuthor_LowestTerms'] = 'Require lowest terms'; $string['stackAuthor_sameType'] = 'Check Students answer\'s type'; + $string['stackAuthor_studentVerify'] = 'Student must verify'; + $string['stackAuthor_hideFeedback'] = 'Hide feedback'; $string['stackAuthor_inputTypeOpt'] = 'Input Type Options'; $string['stackAuthor_noInputTypeOpt'] = 'No options'; *************** *** 572,576 **** ! $string['stackAuthor_metadata'] = 'Meta data'; $string['stackAuthor_qstatus'] = 'Question Status:'; $string['stackAuthor_lang'] = 'Language:'; --- 600,604 ---- ! $string['stackAuthor_metadata'] = 'Metadata'; $string['stackAuthor_qstatus'] = 'Question Status:'; $string['stackAuthor_lang'] = 'Language:'; *************** *** 594,600 **** $string['stackAuthor_feedbackIncorrect'] = 'Feedback Incorrect:'; $string['stackAuthor_output'] = 'Output'; $string['stackAuthor_multSign'] = 'Multiplication Sign:'; $string['stackAuthor_surd'] = 'Surd for Square Root:'; ! $string['stackAuthor_ComplexNo'] = 'sqrt(-1) = i (true) or j (false):'; $string['stackAuthor_empty_qstem'] = 'Please fill in the question stem.'; --- 622,629 ---- $string['stackAuthor_feedbackIncorrect'] = 'Feedback Incorrect:'; $string['stackAuthor_output'] = 'Output'; + $string['stackAuthor_OptWorkedSol'] = 'Worked solution on demand'; $string['stackAuthor_multSign'] = 'Multiplication Sign:'; $string['stackAuthor_surd'] = 'Surd for Square Root:'; ! $string['stackAuthor_ComplexNo'] = 'Meaning and display of sqrt(-1):'; $string['stackAuthor_empty_qstem'] = 'Please fill in the question stem.'; *************** *** 603,606 **** --- 632,636 ---- $string['stackAuthor_invalid_workedSolution'] = 'Worked Solution is invalid:'; $string['stackAuthor_invalid_questionNote'] = 'Question Note is invalid:'; + $string['stackAuthor_empty_questionNote'] = 'The Question Note cannot be empty when rand() appears in the question variables. Used to distinguish between different versions of the question.'; $string['stackAuthor_PRTAlreadyExists'] = 'A potential response tree already exists with the name'; $string['stackAuthor_teachersNote'] = 'Teachers Notes:'; *************** *** 614,628 **** //moodle additions to author interface ! $string['stackAuthor_moodleExport'] = 'Moodle Options'; ! $string['stackAuthor_addedMoodle'] = 'Added to Moodle'; $string['stackAuthor_moodleAddSucessful'] = 'Question added to Moodle successfully.'; ! $string['stackAuthor_moodleAddFailed'] = 'Failed to add question to Moodle.'; ! $string['stackAuthor_moodleEngIdFail'] = 'Engine ID missing, could not add to Moodle.'; $string['stackAuthor_moodleUpdateFail'] = 'Failed to update Moodle'; ! $string['stackAuthor_moodleQBFail'] = 'Could not update this question in Moodle\'s question bank.'; ! $string['stackAuthor_moodleSave1st'] = 'The question must be saved before it can be added to Moodle\'s question bank.'; ! $string['stackAuthor_inMoodle'] = 'This question is already in Moodle\'s question bank. Saving the question in STACK will automatically update Moodle.'; ! $string['stackAuthor_moodleSelectCat'] = 'You may add this question to one of Moodle\'s question banks. Select the required category.'; ! $string['stackAuthor_category'] = 'Category:'; $string['stackMoodle_passkeyInvalid'] = 'Invalid passkey for this server.'; --- 644,660 ---- //moodle additions to author interface ! $string['stackAuthor_moodleExport'] = 'Moodle Options'; ! $string['stackAuthor_addToMoodle'] = 'Add to Moodle'; ! $string['stackAuthor_addedMoodle'] = 'Added to Moodle'; $string['stackAuthor_moodleAddSucessful'] = 'Question added to Moodle successfully.'; ! $string['stackAuthor_moodleAddFailed'] = 'Failed to add question to Moodle.'; ! $string['stackAuthor_moodleEngIdFail'] = 'Engine ID missing, could not add to Moodle.'; $string['stackAuthor_moodleUpdateFail'] = 'Failed to update Moodle'; ! $string['stackAuthor_moodleQBFail'] = 'Could not update this question in Moodle\'s question bank.'; ! $string['stackAuthor_moodleSave1st'] = 'The question must be saved before it can be added to Moodle\'s question bank.'; ! $string['stackAuthor_inMoodle'] = 'This question is already in Moodle\'s question bank. Saving the question in STACK will automatically update Moodle.'; ! $string['stackAuthor_moodleSelectCat'] = 'You may add this question to one of Moodle\'s question banks. Select the required category.'; ! $string['stackAuthor_category'] = 'Category:'; ! $string['stackAuthor_savedVersions'] = 'Saved versions'; $string['stackMoodle_passkeyInvalid'] = 'Invalid passkey for this server.'; *************** *** 692,695 **** --- 724,728 ---- $string['Illegal_floats'] = 'Your answer contains floating point numbers, that are not allowed in this question. You need to type in numbers as fractions. For example, you should type 1/3 not 0.3333, which is after all only an approximation to one third.'; $string['DivisionZero'] = 'Your answer results in a division by zero, eg 1/0, which makes no mathematical sense.'; + $string['CommaError'] = 'Your answer contains commas which are not part of a list, set or matrix. <ul><li>If you meant to type in a list, please use <tt>{$a[0]}</tt>,</li><li>If you meant to type in a set, please use <tt>{$a[1]}</tt>.</li></ul>'; //question display strings *************** *** 709,713 **** $string['stackQuestionDisplay_workedSolutionDenied'] = 'You have changed one or more of your answers, because of this the worked solution will not be displayed.'; $string['stackQuestionDisplay_assessmentItem'] = 'Assessment Item'; ! $string['stackQuestionDisplay_resubmit'] = 'Your responses have been accepted and validated. Please review you responses and re-submit to fully evaluate your answers.'; $string['stackQuestionDisplay_PRTunevaluated'] = 'Please continue to work. Feedback will be provided here in due course.'; $string['stackQuestionDisplay_nomarks'] = 'Thank you. There are no marks available.'; --- 742,746 ---- $string['stackQuestionDisplay_workedSolutionDenied'] = 'You have changed one or more of your answers, because of this the worked solution will not be displayed.'; $string['stackQuestionDisplay_assessmentItem'] = 'Assessment Item'; ! $string['stackQuestionDisplay_resubmit'] = 'Your responses have been accepted and validated. Please review your responses and re-submit to fully evaluate your answers.'; $string['stackQuestionDisplay_PRTunevaluated'] = 'Please continue to work. Feedback will be provided here in due course.'; $string['stackQuestionDisplay_nomarks'] = 'Thank you. There are no marks available.'; *************** *** 745,749 **** $string['stackIcon_success'] = 'correct.png'; $string['stackIcon_success_alt'] = 'Success'; ! //Authoring errors --- 778,785 ---- $string['stackIcon_success'] = 'correct.png'; $string['stackIcon_success_alt'] = 'Success'; ! $string['stackIcon_edit'] = 'Edit'; ! $string['stackIcon_try'] = 'Try'; ! $string['stackIcon_deploy'] = 'Deploy'; ! $string['stackIcon_xml'] = 'XML'; //Authoring errors *************** *** 879,882 **** --- 915,919 ---- $string['stackInstall_password'] = 'Password'; $string['stackInstall_password2'] = 'Re-enter Password'; + $string['stackInstall_yourMoodleUsername'] = 'Your Moodle Username'; $string['stackInstall_email'] = 'Email Address (Optional)'; $string['stackInstall_smtp'] = 'SMTP Server <br />(Required for sending emails)'; *************** *** 884,888 **** //p5.php ! $string['stackInstall_configWriteFailed'] = 'Could not write config.php file. Please copy & paste the configuration below into a file named config.php in the directory {$a} then click continue.'; $string['stackInstall_configWriteSucceed'] = 'Configuration file has been written. Ready to test the CAS.'; --- 921,925 ---- //p5.php ! $string['stackInstall_configWriteFailed'] = 'Could not write <tt>config.php</tt> file. Please copy & paste the configuration below into a file named <tt>config.php</tt> in the directory <tt>{$a}</tt> then click continue.'; $string['stackInstall_configWriteSucceed'] = 'Configuration file has been written. Ready to test the CAS.'; *************** *** 965,968 **** --- 1002,1008 ---- $string['stackHealth_dirtest'] = 'Testing writable directories'; $string['stackHealth_noProblems'] = 'No problems found.'; + $string['stackInstall_securityHeader'] = 'Security checks'; + $string['stackHealth_securityPass'] = 'No security issues found.'; + $string['stackHealth_securityFail'] = 'The following security issues below were found.'; $string['stackInstall_confHeader'] = 'Checking config.php'; *************** *** 971,980 **** $string['stackInstall_confBackupExposed'] = 'You have a <tt>config.php~</tt> backup file which may publicly expose sensitive settings'; ! $string['stackInstall_failopenconfig'] = 'Could not open config.php'; ! $string['stackInstall_retryconfig'] = 'Click the back button to retry creating config.php'; $string['stackInstall_testsuite_title'] = 'A test suite for STACK Answer tests'; ! $string['stackInstall_testsuite_intro'] = 'This page allows you to test that the STACK answer tests are functioning correctly. Note that only answer tests can be checked through the web interface. Other Maxima commands need to be checked from the command line: see unittests.mac.'; $string['stackInstall_testsuite_choose'] = 'Please choose an answer test.'; $string['stackInstall_testsuite_pass'] = 'All tests passed!'; --- 1011,1021 ---- $string['stackInstall_confBackupExposed'] = 'You have a <tt>config.php~</tt> backup file which may publicly expose sensitive settings'; ! $string['stackInstall_securityPublicConfig'] = 'Your configuration settings are public as config.php~. You should remove this file.'; + $string['stackInstall_failopenconfig'] = 'Could not open <tt>config.php</tt>'; + $string['stackInstall_retryconfig'] = 'Click the back button to retry creating config.php'; $string['stackInstall_testsuite_title'] = 'A test suite for STACK Answer tests'; ! $string['stackInstall_testsuite_intro'] = 'This page allows you to test that the STACK answer tests are functioning correctly. Note that only answer tests can be checked through the web interface. Other Maxima commands need to be checked from the command line: see unittests.mac.<br />Documentation for the answer tests is available on the <a href=\"http://stack.bham.ac.uk/wiki/index.php/Answer_tests\">wiki</a>.'; $string['stackInstall_testsuite_choose'] = 'Please choose an answer test.'; $string['stackInstall_testsuite_pass'] = 'All tests passed!'; *************** *** 1082,1085 **** --- 1123,1127 ---- $string['stackInputType_list'] = 'List'; $string['stackInputType_Textarea'] = 'Text area'; + $string['stackInputType_slider'] = 'Slider'; //Options editor *************** *** 1118,1122 **** $string['stackOption_Feedback_S'] = 'Score only (no text)'; $string['stackOption_Feedback_none'] = 'No feedback'; ! $string['stackOption_Feedback_none_feedback'] = 'Thank you. There is no specific feedback associated with this question.'; --- 1160,1164 ---- $string['stackOption_Feedback_S'] = 'Score only (no text)'; $string['stackOption_Feedback_none'] = 'No feedback'; ! $string['stackOption_Feedback_none_feedback'] = 'Thank you. Your answer has been accepted.'; *************** *** 1125,1130 **** $string['stackMoodle_questionNotDeployed'] = 'This question currently has no instances deployed.'; ! //Reporting strings $string['stackReport_allAttempts'] = 'All Attempts'; $string['stackReport_lastAttempt'] = 'Last Attempt'; --- 1167,1227 ---- $string['stackMoodle_questionNotDeployed'] = 'This question currently has no instances deployed.'; + // Deployment strings + $string['stackDeploy_button_update'] = 'Update'; // MUST match qtype_opaque + $string['FE_deployQuestion_moveTo'] = 'Move to'; ! // Reporting Strings ! ! // New strings ! $string['stackReport_questions'] = 'Questions'; ! $string['stackReport_students'] = 'Students'; ! $string['stackReport_last100AttemptsScores'] = 'The scores of the last 100 attempts'; ! $string['stackReport_attemptsGraph'] = 'Attempts graph'; ! $string['stackReport_attemptsTable'] = 'Attempts table'; ! $string['stackReport_potentialResponseTrees'] = 'Potential Response Trees'; ! $string['stackReport_attemptsHistory'] = 'History of attempts'; ! $string['stackReport_workedSolution'] = 'Worked Solution'; ! ! // Reporting strings for javascript ! $string['stackReport_js_attemptInfoString'] = 'Student #[student] tried question #[question] on [date] and scored [score]'; ! $string['stackReport_js_prtName'] = 'PRT Name'; ! $string['stackReport_js_answerNote'] = 'Answer Note'; ! $string['stackReport_js_score'] = 'Score'; ! $string['stackReport_js_totalAttempts'] = 'Total Attempts'; ! $string['stackReport_js_percentage'] = 'Percentage'; ! $string['stackReport_js_tooltipHint'] = 'Move your mouse over a point on the graph to see more information about the attempt.'; ! $string['stackReport_js_questions'] = 'Questions'; ! $string['stackReport_js_questionsAttemptedBy'] = 'Questions which [name] attempted'; ! $string['stackReport_js_students'] = 'Students'; ! $string['stackReport_js_studentsWhoAttempted'] = 'Students who attempted question #[question]'; ! $string['stackReport_js_loading'] = 'Loading'; ! $string['stackReport_js_questionNotes'] = 'Question Notes'; ! $string['stackReport_js_noAttempts'] = 'No Attempts'; ! $string['stackReport_js_noPRTs'] = 'This question has no potential response trees.'; ! $string['stackReport_js_questionAttempts'] = 'Attempts over time for question #[id]'; ! $string['stackReport_js_questionGraph'] = 'Graph of scores obtained on question #[id]'; ! $string['stackReport_js_studentAttempts'] = 'Attempts over time for student #[id]'; ! $string['stackReport_js_studentGraph'] = 'Graph of scores obtained by [name]'; ! $string['stackReport_js_tryQuestion'] = 'Try the question'; ! $string['stackReport_js_errorRetrieving'] = 'There was an error retrieving this data'; ! $string['stackReport_js_noWorkedSolution'] = 'There is no worked solution'; ! $string['stackReport_js_tryQuestionInInterface'] = 'Try this question in the test question interface'; ! $string['stackReport_js_dataAboutAttempt'] = 'Data about student [studentID]\'s attempts at question [questionID]'; // note backslash escapes apostrophe ! ! // Reporting strings for datatables ! $string['stackReport_js_dataTable_loading'] = 'Loading'; ! $string['stackReport_js_dataTable_first'] = 'First'; ! $string['stackReport_js_dataTable_last'] = 'Last'; ! $string['stackReport_js_dataTable_next'] = 'Next'; ! $string['stackReport_js_dataTable_previous'] = 'Previous'; ! $string['stackReport_js_dataTable_tableInfo'] = 'Showing _START_ to _END_ of _TOTAL_ entries'; ! $string['stackReport_js_dataTable_tableInfoEmpty'] = 'Showing 0 to 0 of 0 entries'; ! $string['stackReport_js_dataTable_tableInfoFiltered'] = '(filtered from _MAX_ total entries)'; ! $string['stackReport_js_dataTable_processing'] = 'Procssing'; ! $string['stackReport_js_dataTable_search'] = 'Search'; ! $string['stackReport_js_dataTable_zeroRecords'] = 'No matching records found'; ! ! // Older strings from an reporting, may be no long needed ! $string['stackReport_questions'] = 'Questions'; $string['stackReport_allAttempts'] = 'All Attempts'; $string['stackReport_lastAttempt'] = 'Last Attempt'; *************** *** 1162,1166 **** $string['stackReport_rawmark'] = 'Raw Mark'; $string['stackReport_modmark'] = 'Mod Mark'; ! $string['stackReport_ansNote'] = 'Answer Note'; $string['stackReport_errors'] = 'Errors'; $string['stackReport_noMarks'] = 'No marks for this attempt.'; --- 1259,1263 ---- $string['stackReport_rawmark'] = 'Raw Mark'; $string['stackReport_modmark'] = 'Mod Mark'; ! $string['stackReport_answerNote'] = 'Answer Note'; $string['stackReport_errors'] = 'Errors'; $string['stackReport_noMarks'] = 'No marks for this attempt.'; *************** *** 1169,1172 **** --- 1266,1270 ---- $string['stackReport_attempts'] = 'Attempts'; $string['stackReport_question'] = 'Question'; + $string['stackReport_questions'] = 'Questions'; $string['stackReport_numAttempts'] = 'No Attempts'; $string['stackReport_part'] = 'Part'; *************** *** 1179,1183 **** $string['stackReport_IEfeedback'] = 'Invalid: full feedback as ALT-text to icon.'; $string['stackReport_feedback'] = 'Full feedback as ALT-text to icon.'; - $string['stackReport_'] = ''; //Question search strings --- 1277,1280 ---- *************** *** 1211,1215 **** $string['stackUpdate_complete'] = 'Update completed successfully.'; $string['stackUpdate_problems'] = 'There were problems during the update.'; ! $string['stackUpdate_configWriteFailed'] = 'Stack could not automatically update your configuration file. Please copy and paste the text below into your config.php file, overwriting any previous information.'; $string['stackUpdate_backedup'] = 'You can find a backup of your database, before any updates were installed in {$a}.'; --- 1308,1312 ---- $string['stackUpdate_complete'] = 'Update completed successfully.'; $string['stackUpdate_problems'] = 'There were problems during the update.'; ! $string['stackUpdate_configWriteFailed'] = 'Stack could not automatically update your configuration file. Please copy and paste the text below into your <tt>config.php</tt> file, overwriting any previous information.'; $string['stackUpdate_backedup'] = 'You can find a backup of your database, before any updates were installed in {$a}.'; |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:48
|
Update of /cvsroot/stack/stack-dev/install/update/updates In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/install/update/updates Added Files: Tag: item_state_separation TwoPointTwo.php Log Message: Brought back up to date with big HEAD merge. --- NEW FILE: TwoPointTwo.php --- <?php /** * * Welcome to STACK. A system for teaching and assessment using a * computer algebra kernel. * * This file is licensed under the GPL License. * * A copy of the license is in your STACK distribution called * license.txt. If you are missing this file you can obtain * it from: * http://www.stack.bham.ac.uk/license.txt * * @package stackUpdate * @author Simon Hammond * */ /** * Updates stack alpha to 2.2. */ global $config; $root = $config->get('docroot'); require_once($root.'/lib/error.php'); require_once($root.'/lib/items/Item.php'); require_once($root.'/lib/items/QuestionPart.php'); require_once($root.'/lib/database/StackDBItem.php'); require_once($root.'/other/adodb5/adodb.inc.php'); require_once($root.'/lib/database/StackDBADOdb.php'); class TwoPointTwo{ private $errorLog; public function __construct(&$errorLog) { $this->errorLog = $errorLog; } /** * Updates the database */ public function performUpdate() { // Add the new 'question_lines' table global $config; // below from adodbinit.php - expecting to be safer than simple mySQL query: $db = NewADOConnection($config->getDB('dbType')); // Maybe this should be PConnect $db->Connect($config->getDB('host'), $config->getDB('user'), $config->getDB('password'), $config->getDB('database')); $dict = NewDataDictionary($db); // Table structure for table `question_lines` $fields = 'id I(11) UNSIGNED NOTNULL AUTO PRIMARY, latestVersion I(11) UNSIGNED, modified T NOTNULL DEFTIMESTAMP ON UPDATE '.$db->sysTimeStamp; $sqlarray = $dict->CreateTableSQL("question_lines", $fields, ""); if(!$dict->ExecuteSQLArray($sqlarray)) { $toReturn = $dict->ErrorMsg().'<br /><br />'; } // Add 'line' column in stackquestions $conn = new StackDBADOdb(); $conn->connect(); $sqlarray = $dict->AddColumnSQL('stackquestion', 'line I(11) UNSIGNED'); if(!$dict->ExecuteSQLArray($sqlarray)) { $toReturn = $dict->ErrorMsg().'<br /><br />'; } // Create new line for each question, i.e. create row in question_lines and set line with that id. $conn->query('SELECT questionID FROM stackquestion'); // new queries seem to lose prior result so temporarily saving them for($i = 0; $i < $conn->noRows(); $i++) { $qid[] = $conn->result($i, 'questionID'); } for($i = 0; $i < count($qid); $i++) { //insert line for each question $conn->query("INSERT INTO question_lines(latestVersion) VALUES(".$qid[$i].")"); // shortcut: we know sequence of insert ids will be 1,2,3,... i.e. $i // set line id in each question //$conn->query("UPDATE stackquestion SET line=".($i+1)." WHERE questionID=".$qid[$i]); // row indices start at 1 // $item = new Item(NULL, $qid[$i]); // $item->setLine($i+1); // $item->store(); } // update all items for($i = 0; $i < count($qid); $i++) { //$item = new Item(NULL, $qid[$i]); //$item->setLine($i+1); /* echo "<br />post setLine(): "; print_r($item->getLine()); */ // $item->store(); bypassing // we are going to update the questionVariables // get questionVariables field for qID $conn->query("SELECT questionVariables FROM stackquestion where questionID = ".$qid[$i]); $serialisedQV = $conn->result(0, 'questionVariables'); $questionVariables = $conn->base64_unserialize($serialisedQV); $questionVariables['line'] = $i+1; // just changing the relevant field $serialisedQV = $conn->base64_serialize($questionVariables); $sql = "UPDATE stackquestion SET line=".($i+1).", questionVariables=".$conn->dbSafeString($serialisedQV)." WHERE questionID=".$qid[$i]; $conn->query($sql); // row indices start at 1 //echo $sql; // go back and check // $item = new Item(NULL, $qid[$i]); // echo "<br />line stored: "; //print_r($item->getLine()); } //load up each question in turn and set it's line (code from earlier update scripts) /* $db = new StackDBItem(); $db->connect(); $questions = $db->getListOfQuestions(); $i = 0; if(!empty($questions)) { foreach($questions as $question) { $qid = $question['id']; //load the question $item = new Item(NULL, $qid); $item->store(); //save item. $i++; } } //*/ $this->errorLog->addUserError('',$i.' question lines created.'); return true; } } |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:48
|
Update of /cvsroot/stack/stack-dev/lib/blocks In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/lib/blocks Added Files: Tag: item_state_separation BlockInterface.php Log Message: Brought back up to date with big HEAD merge. --- NEW FILE: BlockInterface.php --- <?php /** * * Welcome to STACK. A system for teaching and assessment using a * computer algebra kernel. * * This file is licensed under the GPL License. * * A copy of the license is in your STACK distribution called * license.txt. If you are missing this file you can obtain * it from: * http://www.stack.bham.ac.uk/license.txt * * * @author Matti Harjula * */ require_once("../ui/BlockHandler.php"); /** * Block class "interface". All blocks must implement this "interface". All blocks * must also be stored in /lib/blocks/active/ and named as *Block and placed in * files named *Block.php */ abstract class BlockInterface { /** * Returns the possible identifiers of "pseudo-blocks" that should be * ignored by the parser when inside this type of an block. * * This is used to define substructure for blocks using the same block-syntax * as with real blocks. The main example is the if-else-if: * {% if something %} * {% else %} <= That is not a start tag for an else-block it is just * internal structure of the if block and the parser should * ignore it. Naturally, should it exist somewhere where it is * not a direct child of an if-block it must be considered as * a syntax error. * {% end if %} * * Returns an empty array or false if no identifiers are needed. * * @return array of strings e.g. array("else") for the if-else-if block */ abstract public function getSubBlockIdentifiers(); /** * Returns the identifier of this block. If this is a "for"-block we return * "for". * * @return string */ abstract public function getBlockIdentifier(); /** * Processes the blocks contents. Then returns the processed contents. * * @param string $blockContent * @param array $blockVars Maxima strings of the evaluated variables * @param object $casTextHandler can be used to evaluate the content of this * block if needed. May be needed when block needs to act on the * real contents of the block. For example when the contents of this * block are used as the source code for something it may be necessary * evaluate possible if and for blocks beforehand. * * * * @return string the processed string that replaces the original content * of this block */ abstract public function processBlock($blockContent,$blockVars,$casTextHandler); } ?> |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:48
|
Update of /cvsroot/stack/stack-dev/maxima/gendocs In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/maxima/gendocs Modified Files: Tag: item_state_separation genmaximadata.php Removed Files: Tag: item_state_separation maximafun-stack-1-0.php Log Message: Brought back up to date with big HEAD merge. Index: genmaximadata.php =================================================================== RCS file: /cvsroot/stack/stack-dev/maxima/gendocs/genmaximadata.php,v retrieving revision 1.1 retrieving revision 1.1.18.1 diff -C2 -d -r1.1 -r1.1.18.1 *** genmaximadata.php 18 Sep 2007 16:23:07 -0000 1.1 --- genmaximadata.php 9 Nov 2010 16:51:39 -0000 1.1.18.1 *************** *** 20,2386 **** <tr><td></td><th align="left">Index Entry</th><th align="left"> Section</th></tr> <tr><td colspan="3"> <hr></td></tr> ! <tr><th><a name="SEC300_0">!</a></th><td></td><td></td></tr> ! <tr><td></td><td valign="top"><a href="maxima_5.html#IDX67"><code>!</code></a></td><td valign="top"><a href="maxima_5.html#SEC19">5.7 General operators</a></td></tr> ! <tr><td></td><td valign="top"><a href="maxima_5.html#IDX68"><code>!!</code></a></td><td valign="top"><a href="maxima_5.html#SEC19">5.7 General operators</a></td></tr> ! <tr><td colspan="3"> <hr></td></tr> ! <tr><th><a name="SEC300_1">"</a></th><td></td><td></td></tr> ! <tr><td colspan="3"> <hr></td></tr> ! <tr><th><a name="SEC300_2">#</a></th><td></td><td></td></tr> ! <tr><td></td><td valign="top"><a href="maxima_5.html#IDX69"><code>#</code></a></td><td valign="top"><a href="maxima_5.html#SEC19">5.7 General operators</a></td></tr> [...2444 lines suppressed...] echo "\n"; } *************** *** 2421,2427 **** } ! echo "</pre>"; ! ?> --- 84,91 ---- } ! //print_r($out[2]); ! //print_r($maxima_cmd); + echo "</pre>"; ?> --- maximafun-stack-1-0.php DELETED --- |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:48
|
Update of /cvsroot/stack/stack-dev/lib/filters/active/Hints In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/lib/filters/active/Hints Modified Files: Tag: item_state_separation Hints.php Log Message: Brought back up to date with big HEAD merge. Index: Hints.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/filters/active/Hints/Hints.php,v retrieving revision 1.2 retrieving revision 1.2.8.1 diff -C2 -d -r1.2 -r1.2.8.1 *** Hints.php 11 Sep 2009 08:43:55 -0000 1.2 --- Hints.php 9 Nov 2010 16:51:40 -0000 1.2.8.1 *************** *** 63,67 **** // CJS 3/9/2009. Avoid popups. //$rep = '<html><a href="javascript:helpPopup(\''.$root.'/lib/ui/helpViewer.php?reference=fact§ion='.$val.'\');"><img align="middle" border="0" alt="Question value" src="'.$root.'/pix/help.gif" /></a></html>'; ! $hintroot = '../../lang/'.$config->get('lang').'/doc/'; require_once($hintroot.'student_factsformula.php'); --- 63,67 ---- // CJS 3/9/2009. Avoid popups. //$rep = '<html><a href="javascript:helpPopup(\''.$root.'/lib/ui/helpViewer.php?reference=fact§ion='.$val.'\');"><img align="middle" border="0" alt="Question value" src="'.$root.'/pix/help.gif" /></a></html>'; ! $hintroot = $config->get('docroot').'/lang/'.$config->get('lang').'/doc/'; require_once($hintroot.'student_factsformula.php'); |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:48
|
Update of /cvsroot/stack/stack-dev/other/adminscripts In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/other/adminscripts Added Files: Tag: item_state_separation itemTraverseAndOp.php Log Message: Brought back up to date with big HEAD merge. --- NEW FILE: itemTraverseAndOp.php --- <?php die();// For one-time use only. Modify, enable, use and disable! /* * Handy script to perform an operation across all Items in the database. * First use was changing the underscores to hyphens in question names. */ session_start(); $configFile = '../../config.php'; require($configFile); $config = new stackConfig(); global $config; $root = $config->get('docroot'); require_once $root.'/lib/database/StackDBADOdb.php'; require_once $root.'/lib/items/Item.php'; $db = new StackDBADOdb(); $db->connect(); // which questions to modify $field = 'questionName'; $sql = "SELECT questionID, $field FROM stackquestion"; $db->query($sql); // get list of questions for ($i=0; $i<$db->noRows(); $i++) { $qList[$db->result($i, 'questionID')] = $db->result($i, $field); } echo "<pre>"; foreach($qList as $qID => $content) { $replacement = str_replace('_', '-', $content); $options = NULL; $item = new Item($options, $qID); $item->questionName->setSelection($replacement); echo $content." -> ".$item->$field->getSelection()."\n"; $db->query("UPDATE stackquestion SET $field='$replacement' WHERE questionID=$qID"); $item->store(); } echo "</pre>"; ?> |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:48
|
Update of /cvsroot/stack/stack-dev/opaque In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/opaque Modified Files: Tag: item_state_separation MoodleQuestionDeployment.php soapServer.php MoodleQuestionList.php MoodleDisplayItem.php CheckPassKey.php MoodleStackReport.php StackServer.php newWSDL.wsdl Added Files: Tag: item_state_separation StackAttemptServer.php Log Message: Brought back up to date with big HEAD merge. Index: newWSDL.wsdl =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/newWSDL.wsdl,v retrieving revision 1.8 retrieving revision 1.8.10.1 diff -C2 -d -r1.8 -r1.8.10.1 *** newWSDL.wsdl 23 Jun 2009 14:39:36 -0000 1.8 --- newWSDL.wsdl 9 Nov 2010 16:51:39 -0000 1.8.10.1 *************** *** 111,122 **** <complexType name="QuestionItem"> <sequence> ! <element name="id" nillable="true" type="xsd:int"/> ! <element name="name" nillable="true" type="soapenc:string"/> ! <element name="description" nillable="true" type="soapenc:string"/> ! <element name="valid" nillable="true" type="xsd:int"/> ! <element name="dateEdited" nillable="true" type="soapenc:string"/> ! <element name="moodleCategories" nillable="true" type="impl:ArrayOf_soapenc_string"/> ! <element name="published" nillable="true" type="soapenc:string"/> ! <element name="nodeployed" nillable="true" type="xsd:int"/> </sequence> </complexType> --- 111,124 ---- <complexType name="QuestionItem"> <sequence> ! <element name="id" nillable="true" type="xsd:int" /> ! <element name="version" nillable="true" type="xsd:int" /> ! <element name="name" nillable="true" type="soapenc:string" /> ! <element name="description" nillable="true" type="soapenc:string" /> ! <element name="valid" nillable="true" type="xsd:int" /> ! <element name="dateEdited" nillable="true" type="soapenc:string" /> ! <element name="moodleCategories" nillable="true" type="impl:ArrayOf_soapenc_string" /> ! <element name="published" nillable="true" type="soapenc:string" /> ! <element name="nodeployed" nillable="true" type="xsd:int" /> ! <element name="keywords" nillable="true" type="impl:ArrayOf_soapenc_string" /> </sequence> </complexType> *************** *** 147,155 **** <complexType name="StackQuestionPage"> <sequence> ! <element name="questionItems" nillable="true" type="impl:ArrayOfQuestionItem"/> ! <element name="publicQuestions" nillable="true" type="impl:ArrayOfQuestionItem"/> ! <element name="xhtml" nillable="true" type="soapenc:base64Binary"/> ! <element name="head" nillable="true" type="soapenc:string"/> ! <element name="categories" nillable="true" type="impl:ArrayOfCategories"/> </sequence> </complexType> --- 149,158 ---- <complexType name="StackQuestionPage"> <sequence> ! <element name="questionItems" nillable="true" type="impl:ArrayOfQuestionItem" /> ! <element name="publicQuestions" nillable="true" type="impl:ArrayOfQuestionItem" /> ! <element name="xhtml" nillable="true" type="soapenc:base64Binary" /> ! <element name="head" nillable="true" type="soapenc:string" /> ! <element name="categories" nillable="true" type="impl:ArrayOfCategories" /> ! <element name="keywords" nillable="true" type="impl:ArrayOf_soapenc_string" /> </sequence> </complexType> *************** *** 161,166 **** type="impl:ArrayOfDeployedInstances"> </element> ! <element name="xhtml" type="string"></element> ! <element name="head" type="string"></element> </sequence> --- 164,169 ---- type="impl:ArrayOfDeployedInstances"> </element> ! <element name="xhtml" type="string" /> ! <element name="head" type="string" /> </sequence> *************** *** 176,179 **** --- 179,183 ---- </complexContent> </complexType> + </schema> *************** *** 811,813 **** </wsdl:service> ! </wsdl:definitions> --- 815,817 ---- </wsdl:service> ! </wsdl:definitions> \ No newline at end of file Index: MoodleStackReport.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/MoodleStackReport.php,v retrieving revision 1.4 retrieving revision 1.4.8.1 diff -C2 -d -r1.4 -r1.4.8.1 *** MoodleStackReport.php 16 Sep 2009 12:05:13 -0000 1.4 --- MoodleStackReport.php 9 Nov 2010 16:51:39 -0000 1.4.8.1 *************** *** 40,85 **** { ! if(!empty($param['type'])) ! { $reportType = $param['type']; $xhtml .= $this->report->displayResults($param); - } - $xhtml .= '<br />'; ! if($reportType == NULL) //if still null, display options ! { ! //display filter selector ! $xhtml = "<em>Only very simple reports are currently available</em><br />"; ! $xhtml .= '<p><a href="stackSessionPage.php?page=report&type=question">'.get_string('stackReport_question','stack').'</a></p>'; ! $xhtml .= '<p><a href="stackSessionPage.php?page=report&type=student">'.get_string('stackReport_student','stack').'</a></p>'; ! //$xhtml .= '<p><a href="stackSessionPage.php?page=report&type=markbook">'.get_string('stackReport_markbook','stack').'</a></p>'; ! } ! else ! { ! unset($param['type']); ! unset($param['page']); ! //switch($_GET['reportType']) ! switch($reportType) ! { ! case 'question': ! $xhtml .= $this->report->questionFilterInterface($param); ! break; ! case 'student': ! $xhtml .= $this->report->studentFilterInterface($param); ! break; ! case 'quiz': ! $xhtml .= $this->report->quizFilterInterface($param); ! break; ! case 'markbook': ! $xhtml .= $this->report->markbookFilterInterface($param); ! break; ! } ! $xhtml .= '<br /><br />'; ! $xhtml .= '<a href="stackSessionPage.php?page=report">'.get_string('stackReport_reportType','stack').'</a>'; ! } return $xhtml; --- 40,67 ---- { ! if (isset($param['type'])) { ! $reportType = $param['type']; $xhtml .= $this->report->displayResults($param); ! $xhtml .= '<p><a href="stackSessionPage.php?page=report">'.get_string('stackReport_reportType','stack').'</a></p>'; ! } else { ! ! $xhtml .= '<h1>Select a report type</h1>'; ! $xhtml .= '<div class="section"> ! <h3>Interactive report</h3> ! <p> <a href="stackSessionPage.php?page=report&type=interactive"><button >Load the interactive interface</button></a> </p> ! </div>'; ! $xhtml .= '<form action="stackSessionPage.php?page=report&type=question" method="post">' ! . $report->questionFilterInterface($param) ! . '</form>'; ! $xhtml .= '<form action="stackSessionPage.php?page=report&type=student" method="post">' ! . $report->studentFilterInterface($param) ! . '</form>'; ! } return $xhtml; Index: soapServer.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/soapServer.php,v retrieving revision 1.10 retrieving revision 1.10.18.1 diff -C2 -d -r1.10 -r1.10.18.1 *** soapServer.php 20 Dec 2007 14:42:56 -0000 1.10 --- soapServer.php 9 Nov 2010 16:51:39 -0000 1.10.18.1 *************** *** 25,29 **** ! $ini = ini_set("soap.wsdl_cache_enabled","0"); //$soap = new SoapServer(null, array('uri' => "http://localhost/opaquetest")); --- 25,29 ---- ! // $ini = ini_set("soap.wsdl_cache_enabled","0"); //$soap = new SoapServer(null, array('uri' => "http://localhost/opaquetest")); Index: MoodleQuestionList.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/MoodleQuestionList.php,v retrieving revision 1.7 retrieving revision 1.7.8.1 diff -C2 -d -r1.7 -r1.7.8.1 *** MoodleQuestionList.php 22 Oct 2009 17:37:56 -0000 1.7 --- MoodleQuestionList.php 9 Nov 2010 16:51:39 -0000 1.7.8.1 *************** *** 110,114 **** $keyCheck = new CheckPassKey($this->passKey, $param['userID']); ! if($keyCheck->checkPasskey() == true) { --- 110,114 ---- $keyCheck = new CheckPassKey($this->passKey, $param['userID']); ! if($keyCheck->isValid()) { *************** *** 158,162 **** $this->db->connect(); ! $questions = $this->db->getListOfQuestions($param['userID'],true); $this->db->disconnect(); --- 158,162 ---- $this->db->connect(); ! $questions = $this->db->getLines($param['userID'], true, $param['filter'], $param['keywords']); $this->db->disconnect(); *************** *** 191,206 **** else { foreach($questions as $question) { // apply filter if(stack_questionbank_simple_question_filter($param['filter'], $question, isset($param['casesensitive']))) { ! $qlistArray[] = new QuestionListDT($question['id'], $question['questionName'], $question['questionDescription'], $question['valid'], $question['questionDateLastEdited'], $question['moodleCategories'], $question['published'], $question['nodeployed']); } } ! //$this->logger->finest(print_r($qlistArray,true)); $xhtml .= '<hr />'.$this->HTMLHead; ! $questionPage = new StackQuestionPageDT($qlistArray, $xhtml, $this->HTMLHead, $categories); return $questionPage; } --- 191,213 ---- else { + $kwdb = new StackDBKeywords(); + $kwdb->connect(); + foreach($questions as $question) { // apply filter if(stack_questionbank_simple_question_filter($param['filter'], $question, isset($param['casesensitive']))) { ! // get keywords array ! $keywords = $kwdb->getQuestionsKeywords($question['id']); ! $qlistArray[] = new QuestionListDT($question['id'], $question['questionName'], $question['questionDescription'], $question['valid'], stringUtil::prettifyDate($question['questionDateLastEdited']), $question['moodleCategories'], $question['published'], $question['nodeployed'], $keywords); } } ! $this->logger->debug(print_r($qlistArray,true)); $xhtml .= '<hr />'.$this->HTMLHead; ! $keywords = $kwdb->getAllKeywords(true); // active only ! $this->logger->debug($keywords); ! $questionPage = new StackQuestionPageDT($qlistArray, $xhtml, $this->HTMLHead, $categories, $keywords); return $questionPage; } *************** *** 276,279 **** --- 283,287 ---- $mdb = new MoodleDB(); $mdb->connect(); + //$this->logger->debug("cats:".print_r($param['categories'],1)); $result = $mdb->batchAdd($questions, $param['userID'], $param['stackEngine'], $param['categories']); $mdb->disconnect(); Index: MoodleQuestionDeployment.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/MoodleQuestionDeployment.php,v retrieving revision 1.3.8.1 retrieving revision 1.3.8.1.2.1 diff -C2 -d -r1.3.8.1 -r1.3.8.1.2.1 *** MoodleQuestionDeployment.php 3 Nov 2009 16:03:28 -0000 1.3.8.1 --- MoodleQuestionDeployment.php 9 Nov 2010 16:51:39 -0000 1.3.8.1.2.1 *************** *** 45,48 **** --- 45,49 ---- require_once($root.'/opaque/datatypes/CategoryDT.php'); + require_once $root . '/lib/Logger.php'; class MoodleQuestionDeployment *************** *** 55,58 **** --- 56,60 ---- private $db; + private $logger; /** * *************** *** 79,83 **** private $xhtml; - /** * Constructs the question deployment --- 81,84 ---- *************** *** 91,94 **** --- 92,97 ---- public function __construct($passKey, $paramKey, $paramVal, $head, $title=NULL) { + $this->logger = new Logger("MoodleQuestionDeployment"); + $this->db = new StackDBCache(); $this->db->connect(); *************** *** 100,104 **** $this->xhtml = ''; ! $this->deployment = new Deployment($this->param['id']); } --- 103,108 ---- $this->xhtml = ''; ! $this->logger->debug("in MQD constructor: ".print_r($this->param, 1)); ! $this->deployment = new Deployment($this->param['id'], $this->param['engineID']); } *************** *** 120,123 **** --- 124,145 ---- } $this->deployment->processOperations($param); + + // Handle Moodle question bank operations here + if($param['operation'] == 'update') { + $this->logger->debug("about to call hideQuestion with $stackID and engine:".$this->deployment->getEngineID()); + // add new and remove old + $mDB = new MoodleDB(); + $mDB->connect(); + + $mDB->hideQuestion($param['prior'], $this->deployment->getEngineID()); + $mDB->addQuestion($param['id'], $this->deployment->getLine(), $param['userID'], $this->deployment->getEngineID(), $param['category']); + } + + if($param['operation'] == 'move') { + $mDB = new MoodleDB(); + $mDB->connect(); + + $mDB->addQuestion($param['id'], $this->deployment->getLine(), $param['userID'], $this->deployment->getEngineID(), $param['category']); + } } *************** *** 125,134 **** * List instances */ ! public function getList() { ! if(!$this->deployment->isSingleton()) { ! $this->xhtml .= $this->deployment->size().get_string('FE_deployQuestion_versions', 'stack').'<br />'.$this->deployment->formXHTML(); ! } else { ! $this->xhtml .= get_string('FE_deployQuestion_singletonDeployed', 'stack'); } foreach($this->deployment->getInstances() as $instance) { $item = $this->db->getDisplayItem($instance['id']); --- 147,216 ---- * List instances */ ! public function getList() { ! $itemDB = new StackDBItem(); ! $itemDB->connect(); ! $currentVersion = $itemDB->getLatestVersion($this->param['id']); ! ! $earliest = $this->deployment->earliestDeployedVersion(); ! ! $mDB = new MoodleDB(); ! $mDB->connect(); ! $categories = $mDB->getQuestionCategory($earliest); ! //$this->xhtml .= print_r($categories, 1); ! $selector = $mDB->categorySelector('category', $categories[0]); ! ! if($currentVersion == $this->deployment->getVersion()) { // this is latest version ! //$earliest = $this->deployment->earliestDeployedVersion(); ! if($currentVersion == $earliest || false == $earliest) { // no earlier deployment exists ! if($this->deployment->isSingleton()) $this->xhtml .= get_string('FE_deployQuestion_singletonDeployed', 'stack'); ! else $this->xhtml .= $this->deployment->formXHTML(); ! if($this->deployment->size() > 0) { // don't want to deploy empty versions! ! $this->xhtml .= '<p /><input type="submit" name="submit" value="'.get_string('FE_deployQuestion_moveTo', 'stack').'" '.$selector; ! } ! } else { // earlier version has been deployed - must drop it before we can deploy latest ! //$this->xhtml .= '<div class="warning">'.get_string('FE_deployQuestion_oldVersionDeployed', 'stack')."</div>"; ! $this->xhtml .= "<div class='warning'>Question $currentVersion is a newer version of question $earliest which has already been deployed into a Moodle question bank.<p>You can update the Moodle question bank in a single step with the form below.</div>"; ! $this->deployment = new Deployment($earliest); ! if($this->deployment->size() > 0) { ! //$this->xhtml .= '<p><a href="?id='.$this->param['id'].'&dropall='.$earliest.'">'.get_string('FE_deployQuestion_undeployAll', 'stack').'</a>'; ! //get_string('stackDeploy_button_update', 'qtype_opaque') ! $this->xhtml .= '<p><form action="?id='.$this->param['id'].'&dropall='.$earliest.'">'; ! $this->xhtml .= 'Remove question '.$earliest.' and deploy '.$currentVersion.' with '; ! //$this->xhtml .= ' <input type="checkbox"> Replace in Moodle question bank'; ! ! $this->xhtml .= '<input type="text" name="add" id="add" value="'.$this->deployment->size().'" size="3" maxlength="3"/> '.get_string('FE_deployQuestion_newRandomInstances', 'stack'); ! $this->xhtml .= ' into '.$selector;//'category',$mDB->getQuestionCategory($earliest)); ! /*if($mDB->attemptsOnQuestion()) { ! $this->xhtml .= "<br>Already in use in a quiz!"; ! //$this->xhtml .= '<br />Also replace in Moodle quizzes <input onclick="if(this.checked == true) alert(\'Only do this for minor changes to ensure stored student attempts are still valid!\')" type="checkbox">'; // list them and warn! ! } else $this->xhtml .= "<br>Fortunately not in use in a quiz!"; ! ! $this->xhtml .= "<br>Attempts on question: ".$mDB->attemptsOnQuestion($earliest); ! */ ! $this->xhtml .= '<br /><input type="submit" onclick="if($(\'#add\').val() == \'0\') {alert(\'zero\'); return false;}" name="submit" value="'.get_string('stackDeploy_button_update', 'stack').'">'; ! $this->xhtml .= '<input type="hidden" name="prior" value="'.$earliest.'"></form>'; ! } ! } ! } else { // this is an old version ! $this->xhtml .= get_string('FE_deployQuestion_newerVersionCannotDeploy', 'stack', $currentVersion); ! $this->xhtml .= '<a href="?id='.$currentVersion.'">deploy latest</a>'; ! } ! ! // original stuff below ! /* ! if($this->deployment->size() > 0 && $this->deployment->getVersion() != $currentVersion) { // out-of-date instances exist ! $this->xhtml .= '<p>'.get_string('FE_deployQuestion_newerVersion', 'stack', $currentVersion).'</p>'; } + else { // can deploy more of this version + if(!$this->deployment->isSingleton()) { + $this->xhtml .= '<p>'.get_string('FE_deployQuestion_xInstances', 'stack', $this->deployment->size()).get_string('FE_deployQuestion_ofVersionXdeployed', 'stack', $this->deployment->getVersion()).'</p>'.$this->deployment->formXHTML(); + } else { + $this->xhtml .= get_string('FE_deployQuestion_singletonDeployed', 'stack'); + } + } + */ + + $this->xhtml .= '<h3 class="main">'.get_string('FE_deployQuestion_instancesOfQuestion', 'stack', $this->deployment->getVersion()).'</h3>'; + foreach($this->deployment->getInstances() as $instance) { $item = $this->db->getDisplayItem($instance['id']); *************** *** 136,139 **** --- 218,222 ---- $instancesReturn[] = new StackDeployedInstancesDT($instance['id'], $item->getQuestionNote(), $instance['xhtml'], $item->getQuestionSeed(), $this->deployment->isPrimed($instance['id'])); } + return new StackDeploymentPageDT($this->head, $this->xhtml, $instancesReturn); } --- NEW FILE: StackAttemptServer.php --- <?php /** * * Welcome to STACK. A system for teaching and assessment using a * computer algebra kernel. * * This file is licensed under the GPL License. * * A copy of the license is in your STACK distribution called * license.txt. If you are missing this file you can obtain * it from: * http://www.stack.bham.ac.uk/license.txt * * @author Simon Hammond (s.h...@bh...) * * @package stackOpaque */ require_once ('../config.php'); $config = new stackConfig(); global $config; $root = $config->get('docroot'); require_once ($root . '/lib/ui/DisplayItem.php'); require_once ($root . '/lib/error.php'); require_once ($root . '/lib/stackLegacy.php'); require_once $root . '/lib/items/Item.php'; require_once $root . '/lib/Logger.php'; require_once ('MoodleDisplayItem.php'); require_once 'CheckPassKey.php'; require_once ($root . '/lib/database/StackDBOpaque.php'); require_once ($root . '/lib/database/StackDBItem.php'); require_once ($root . '/opaque/datatypes/Score.php'); require_once ($root . '/opaque/datatypes/StackSoapPageReturn.php'); require_once ($root . '/opaque/datatypes/QuestionListDT.php'); require_once ($root . '/opaque/datatypes/StackQuestionPageDT.php'); require_once ($root . '/opaque/datatypes/CategoryDT.php'); /* * This is a streamlined SOAP server just for handling student attempts. */ class StackAttemptServer { private $errorlog; private $logger; public function __construct() { $this->errorLog = new error(); $this->logger = new Logger('StackAttemptServer'); } private function loadQuestion($sessionID) { $db = new StackDBOpaque(); $db->connect(); $result = $db->getSessionData($sessionID); // fields as an array if ($result['cacheID'] > 0) { // cached MoodleDisplayItem $session = new MoodleDisplayItem($result['userID'], 0); // get new item $session->setStateID($result['cacheID']); // move to right place in cache $session->setProgress($result['progress']); $this->logger->debug("result? ".print_r($result, true)); // get the expired status from the cache state NOT the session $cache = new StackDBCache(); $cache->connect(); $expired = $cache->getExpired($result['cacheID']); // setting a new expired state if necessary if($result['timeclose'] > 0 && $result['timeclose'] < time() && !$expired){ // moving to expired status $session->expire(); // will set expired to true } else { // No change since already expired or not yet time //$this->logger->debug("NOT expiring solution since timeclose is either 0 or >= ".time().")"); $session->setExpired($expired); } } else { $session = $db->base64_unserialize($result['data']); // some other object, e.g. Item } $db->disconnect(); return $session; } private function storeQuestion($question, $sessionID = NULL, $timeclose = 0) { $db = new StackDBOpaque(); $db->connect(); $serialised = $db->base64_serialize($question); if (get_class($question) == 'MoodleDisplayItem') { // can pass $serialised first arg (or NULL, since it'll be cached) $result = $db->storeSession(NULL, $sessionID, $question->getStateID(), $question->getUserID(), $question->getProgress(), $timeclose); } else { $result = $db->storeSession($serialised, $sessionID); // e.g. Authoring session } $db->disconnect(); return $result; } } ?> Index: StackServer.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/StackServer.php,v retrieving revision 1.47 retrieving revision 1.47.8.1 diff -C2 -d -r1.47 -r1.47.8.1 *** StackServer.php 22 Oct 2009 17:37:56 -0000 1.47 --- StackServer.php 9 Nov 2010 16:51:39 -0000 1.47.8.1 *************** *** 30,33 **** --- 30,34 ---- require_once $root . '/lib/items/Item.php'; require_once $root . '/lib/searching/StackSearch.php'; + require_once $root . '/lib/reporting/DiagnosticReport.php'; require_once $root . '/lib/Logger.php'; *************** *** 85,90 **** } ! public function getQuestionMetadata($questionID, $questionVersion, $questionBaseURL) { ! return 'Question Metadata for ' . "$questionID, $questionVersion, $questionBaseURL"; } --- 86,91 ---- } ! public function getQuestionMetadata($questionID, $line, $questionBaseURL) { ! return 'Question Metadata for ' . "$questionID, $line, $questionBaseURL"; } *************** *** 108,112 **** * */ ! public function start($questionID, $questionVersion, $questionBaseURL, $initialParamNames, $initialParamValues, $cachedResources) { $initialParams = array_combine($initialParamNames, $initialParamValues); --- 109,113 ---- * */ ! public function start($versionID, $version, $questionBaseURL, $initialParamNames, $initialParamValues, $cachedResources) { $initialParams = array_combine($initialParamNames, $initialParamValues); *************** *** 120,125 **** } ! //$this->logger->debug("init params in start ".print_r($initialParams, 1)); ! //$this->logger->debug("timeclose = $timeclose"); $startReturn = new StartReturnDT(); --- 121,130 ---- } ! //$this->logger->debug("init params in start ".print_r($initialParams, 1)); ! //$this->logger->debug("timeclose = $timeclose"); ! //$this->logger->debug("version is ".$version." and lineID is ".$lineID); ! ! // $questionID = substr($version, 1 + strpos($version, '.')); // quicker than regex match ! $questionID = substr($versionID, 1); // lop off leading q $startReturn = new StartReturnDT(); *************** *** 127,131 **** $keyCheck = new CheckPassKey($passKey, $userId); ! if ($keyCheck->checkPasskey() == true) { //generate a session uid for the question --- 132,136 ---- $keyCheck = new CheckPassKey($passKey, $userId); ! if ($keyCheck->isValid()) { //generate a session uid for the question *************** *** 133,138 **** $startReturn->questionSession = $sessionID; - $questionID = substr($questionID, 1); - //check question exists $db = new StackDBItem(); --- 138,141 ---- *************** *** 251,254 **** --- 254,258 ---- global $config; $root = $config->get('docroot'); + $weburl = $config->get('weburl'); $param = array_combine($paramKey, $paramVal); *************** *** 259,263 **** $keyCheck = new CheckPassKey($passkey, $userID); ! if ($keyCheck->checkPasskey() == true) { switch ($pageName) { case 'exporter' : --- 263,267 ---- $keyCheck = new CheckPassKey($passkey, $userID); ! if ($keyCheck->isValid()) { switch ($pageName) { case 'exporter' : *************** *** 299,303 **** case 'search' : - $search = new StackSearch($param, $param['userID'], true); $xhtml .= $search->displaySearchForm(); --- 303,306 ---- *************** *** 309,312 **** --- 312,327 ---- break; + case 'diagnostic' : + $diagnostic = new DiagnosticReport($param['userID'], $param['quiz']); + //$xhtml .= "param=".print_r($param,1); + $xhtml .= $diagnostic->display(); + $head = '<link rel="stylesheet" type="text/css" href="'.$weburl.'/other/jqplot/jquery.jqplot.css" />' . + '<!--[if IE]><script language="javascript" type="text/javascript" src="'.$weburl.'/other/jqplot/excanvas.js"></script><![endif]--> + <script type="text/javascript" src="'.$weburl.'/other/jqplot/jquery-1.3.2.min.js"></script>' . + '<script type="text/javascript" src="'.$weburl.'/other/jqplot/jquery.jqplot.min.js"></script>' . + '<script type="text/javascript" src="'.$weburl.'/other/jqplot/plugins/jqplot.categoryAxisRenderer.min.js"></script>' . + '<script type="text/javascript" src="'.$weburl.'/other/jqplot/plugins/jqplot.barRenderer.min.js"></script>'; + break; + default : $xhtml = 'Could not find page "' . $pageName . '".'; *************** *** 329,333 **** public function stackStartAuthor($passKey, $userID, $questionID = NULL) { $keyCheck = new CheckPassKey($passKey, $userID); ! if ($keyCheck->checkPasskey() == true) { $authorStackQuestion = new AuthorDisplay($userID, $questionID); //$author = new AuthorDisplay('1'); --- 344,348 ---- public function stackStartAuthor($passKey, $userID, $questionID = NULL) { $keyCheck = new CheckPassKey($passKey, $userID); ! if ($keyCheck->isValid()) { $authorStackQuestion = new AuthorDisplay($userID, $questionID); //$author = new AuthorDisplay('1'); *************** *** 378,382 **** /** ! * Returns an array of question id's to question names & description * * @access public --- 393,397 ---- /** ! * Returns an array of question ids to question names & description * * @access public *************** *** 387,391 **** $qList->processOperations(); $returning = $qList->getList(); - return $returning; } --- 402,405 ---- *************** *** 406,412 **** $param = array_combine($paramKey, $paramVal); } ! $this->logger->critical("processing deployment with param:".print_r($param, true)); $checkKey = new CheckPassKey($passKey, $userId); ! if ($checkKey->checkPassKey() == true) { $deployment = new MoodleQuestionDeployment($passKey, $paramKey, $paramVal, $this->getHTMLHead()); $deployment->processOperations($param); --- 420,431 ---- $param = array_combine($paramKey, $paramVal); } ! $this->logger->debug("in stackDeployOperation with param:".print_r($param, true)); $checkKey = new CheckPassKey($passKey, $userId); ! if ($checkKey->isValid()) { ! $paramKey[] = 'userID'; ! $paramVal[] = $userId; ! $param['userID'] = $userId; ! //$paramKey[] = 'engineID'; ! //$paramVal[] = ''? $deployment = new MoodleQuestionDeployment($passKey, $paramKey, $paramVal, $this->getHTMLHead()); $deployment->processOperations($param); *************** *** 433,437 **** $checkKey = new CheckPassKey($passKey, $userId); ! if ($checkKey->checkPassKey() == true) { switch ($pageName) { case '' : --- 452,456 ---- $checkKey = new CheckPassKey($passKey, $userId); ! if ($checkKey->isValid()) { switch ($pageName) { case '' : *************** *** 555,558 **** --- 574,578 ---- } + /* Separated into StackAttemptServer */ private function loadQuestion($sessionID) { $db = new StackDBOpaque(); *************** *** 588,591 **** --- 608,612 ---- } + private function storeQuestion($question, $sessionID = NULL, $timeclose = 0) { $db = new StackDBOpaque(); *************** *** 603,606 **** --- 624,628 ---- return $result; } + //*/ private function generateSessionId($qid, $uid) { *************** *** 666,670 **** <script type="text/javascript" src="' . $webroot . '/other/moo.fx/prototype.lite.js"></script> <script type="text/javascript" src="' . $webroot . '/other/moo.fx/moo.fx.js"></script> ! <script type="text/javascript" src="' . $webroot . '/other/moo.fx/moo.fx.js"></script> <script type="text/javascript" src="' . $webroot . '/other/jquery.js"></script> --- 688,692 ---- <script type="text/javascript" src="' . $webroot . '/other/moo.fx/prototype.lite.js"></script> <script type="text/javascript" src="' . $webroot . '/other/moo.fx/moo.fx.js"></script> ! <script type="text/javascript" src="' . $webroot . '/other/flyfeedback.js"></script> <script type="text/javascript" src="' . $webroot . '/other/jquery.js"></script> Index: MoodleDisplayItem.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/MoodleDisplayItem.php,v retrieving revision 1.11.6.1 retrieving revision 1.11.6.1.2.1 diff -C2 -d -r1.11.6.1 -r1.11.6.1.2.1 *** MoodleDisplayItem.php 9 Nov 2009 10:48:46 -0000 1.11.6.1 --- MoodleDisplayItem.php 9 Nov 2010 16:51:39 -0000 1.11.6.1.2.1 *************** *** 54,58 **** * @param int quizId */ ! public function __construct($userId, $questionId, $reconstruct=false, $seed=NULL, $quizId=NULL) { $cache = new StackDBCache(); --- 54,58 ---- * @param int quizId */ ! public function __construct($userId, $versionId, $reconstruct=false, $seed=NULL, $quizId=NULL) { $cache = new StackDBCache(); *************** *** 65,69 **** } // Remember: a stateID of 0 indicates no questions deployed. ! $this->stateID = $cache->selectInitialState($seed, $questionId); $this->userID = $userId; $this->progress = 0; --- 65,69 ---- } // Remember: a stateID of 0 indicates no questions deployed. ! $this->stateID = $cache->selectInitialState($seed, $versionId); $this->userID = $userId; $this->progress = 0; *************** *** 168,175 **** // Extract and remove action from posted. ! $action = $posted['stackaction']; unset($posted['stackaction']); - $moodle_event = $posted['event']; unset($posted['event']); if(8 == $moodle_event) $action = 'Finish';// submission hack if(3 == $moodle_event) $action = 'Grade';// review hack --- 168,209 ---- // Extract and remove action from posted. ! $event = MoodleDisplayItem::mapStackEvent($posted); unset($posted['stackaction']); unset($posted['event']); + + // Either return xhtml for current state or invoke process to use cache. + if(0 == $event) { + $xhtml = $cache->getXHTML($this->stateID); + } else { + $xhtml = $this->processItem($posted, true, $event); + } + + $xhtml = $this->fillInputFields($posted, $xhtml); + + // add STACK buttons + // See bug #2890734 + $xhtml .= "<div class='mdl-align'>"; // submitbtns to be hidden in CSS styles.php + $xhtml .= "<input id='stacksubmit' name='stackaction' type='submit' value='".get_string('stackQuiz_button_submit','stack','')."' />"; + /* Some JavaScript hackery below to ensure we don't have to mess with attempt.php: + * We activate the (hidden) finish button with our own and hide our own on + * the review page. Tested with FF and IE. + */ + $xhtml .= "<input type=\"button\" id=\"stackfinish\" value=\"".get_string('stackQuiz_button_finishQuiz','stack','')."\" name=\"finishattempt\" " . + "onclick=\"document.getElementsByName('finishattempt')[0].click();\" />"; + $xhtml .= "<script>if(window.location.href.indexOf('attempt.php') == -1) {" . + "document.getElementById('stacksubmit').style.display = 'none'; " . + "document.getElementById('stackfinish').style.display = 'none'; " . + "}</script>"; + $xhtml .= "</div>"; + return $xhtml; + } + + /** + * Infers our internal STACK event from the post data supplied by Moodle. + * Factored static function to allow other access, e.g. for Diagnostic reporting + */ + public static function mapStackEvent($posted) { + $action = $posted['stackaction']; + $moodle_event = $posted['event']; if(8 == $moodle_event) $action = 'Finish';// submission hack if(3 == $moodle_event) $action = 'Grade';// review hack *************** *** 197,226 **** $event = 0; // default e.g. by navigating away } ! ! // Either return xhtml for current state or invoke process to use cache. ! if(0 == $event) { ! $xhtml = $cache->getXHTML($this->stateID); ! } else { ! $xhtml = $this->processItem($posted, true, $event); ! } ! ! $xhtml = $this->fillInputFields($posted, $xhtml); ! ! // add STACK buttons ! // See bug #2890734 ! $xhtml .= "<div class='mdl-align'>"; // submitbtns to be hidden in CSS styles.php ! $xhtml .= "<input id='stacksubmit' name='stackaction' type='submit' value='Submit' />"; ! /* Some JavaScript hackery below to ensure we don't have to mess with attempt.php: ! * We activate the (hidden) finish button with our own and hide our own on ! * the review page. Tested with FF and IE. ! */ ! $xhtml .= "<input type=\"button\" id=\"stackfinish\" value=\"Finish Quiz\" name=\"finishattempt\" " . ! "onclick=\"document.getElementsByName('finishattempt')[0].click();\" />"; ! $xhtml .= "<script>if(window.location.href.indexOf('attempt.php') == -1) {" . ! "document.getElementById('stacksubmit').style.display = 'none'; " . ! "document.getElementById('stackfinish').style.display = 'none'; " . ! "}</script>"; ! $xhtml .= "</div>"; ! return $xhtml; } --- 231,235 ---- $event = 0; // default e.g. by navigating away } ! return $event; } Index: CheckPassKey.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/CheckPassKey.php,v retrieving revision 1.4 retrieving revision 1.4.10.1 diff -C2 -d -r1.4 -r1.4.10.1 *** CheckPassKey.php 23 Jun 2009 14:39:36 -0000 1.4 --- CheckPassKey.php 9 Nov 2010 16:51:39 -0000 1.4.10.1 *************** *** 48,52 **** * @return bool */ ! public function checkPasskey() { global $config; --- 48,52 ---- * @return bool */ ! public function isValid() { global $config; |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:48
|
Update of /cvsroot/stack/stack-dev/opaque/moodleModule/opaque In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/opaque/moodleModule/opaque Modified Files: Tag: item_state_separation questiontype.php Added Files: Tag: item_state_separation styles.css Log Message: Brought back up to date with big HEAD merge. --- NEW FILE: styles.css --- /** Fonts --------------------------------------- */ h1.section{ font-family: Lucida Sans, serif; text-align: center; } /** Spans --------------------------------------- */ span.correct{ color: green; } span.partially{ color: orange; } span.incorrect{ color: red; background-color: transparent; } div.displayedEq{ text-align: center; padding: 0.2em; } /** Generic classes -------------------------------- */ img{ border:0; margin-left: 0.1em; margin-right: 0.1em; } .warning{ color: orange; } .icon{ float:right; margin-top: -35px; margin-bottom: -60px; padding: 1.0em; /*background: yellow;*/ } .SyntaxExample1{ border: 1px dotted #333; padding: 0.2em; color: blue; background-color: #eee; font-family: monospace; font-size: 120%; font-weight: bold; } .SyntaxExample2{ color: blue; font-family: monospace; font-size: 100%; font-weight: bold; } /* No dashed box, for inclusion inside other error message boxes*/ .errorMsg{ color: #ff0000; } .error{ color: #ff0000; } p.error{ } .feedback{ } .solutionButton{ } .removeButton{ float:right; } .tableTitle{ font-weight: bold; } .centre{ text-align: center; } .quote{ font-style: italic; text-align: center; width: 80%; } .small{ font-size: 80%; } .relatedBox{ border: 1px dotted #333; padding: 0.2em; margin-left: 1em; margin-right: 1em; } .stackbutton{ margin-left: 0em; margin-right: 1.5em; } .logs{ font-family: monospace; } /** Structural DIVs ----------------------------------------------*/ div.error{ min-width: 30em; color: red; font-weight: bold; font-size: 90%; background-color: #fff; border: 1px dashed #c12926; text-align: left; padding: 0.2em; margin: 1em; } div.clearer{ clear: both; display: inline-block; } /*secondary information to the student, */ /* request feedback, resubmit etc. Netural feedback */ div.secondaryFeedback{ border: 1px solid #e1e1e1; background-color: #eee; padding: 0.2em; margin-bottom: 0.2em; width: 80%; margin-left: auto; margin-right: auto; margin-top: 0.2em; } h3.secondaryFeedback{ font-weight: normal; border-bottom: 1px solid #ccc; } /*feedback to student */ div.InteractionElementFeedback{ background-color: #FFFF99; border: 1px solid #EEEE66; margin-left: auto; margin-right: auto; padding: 0.2em; width: 80%; margin-top: 0.2em; margin-bottom: 0.2em; } /*Make the paragraph have only a single line break between paragraphs*/ p.studentFeedback{ margin: 0em; } /*PRT feedback */ div.PRTFeedback{ border: 1px solid #ccf; background-color: #ddf; width: 80%; margin-left: auto; margin-right: auto; margin-bottom: 0.2em; padding-left: 0.2em; padding-right: 0.2em; padding-bottom: 0.2em; /*Top has enough padding with the <h3>tag */ } h3.PRTFeedback{ font-weight: normal; border-bottom: 1px solid #bbf; } .PRTScore{ float: right; } /*Authoring layout */ div.requirements{ border: 1px solid #000; padding: 0.4em; background-color: #fff; } div.section { border: 1px solid #e1e1e1; background-color: #eee; padding: 0.4em; margin-bottom: 0.5em; margin-left: 140px; } h3.section{ font-weight: normal; border-bottom: 1px solid #aaa; } div.section80{ border: 1px solid #e1e1e1; background-color: #eee; padding: 0.4em; margin-bottom: 0.5em; width: 80%; margin-right: auto; margin-left: auto; } h3.section80{ font-weight: normal; border-bottom: 1px solid #aaa; } div.PRT{ /*border: 1px solid #222;*/ padding: 1.0em; margin: 1em; background-color: #ddd; } div.PR{ border: 1px solid #000; background-color: #fff; margin-top: 1em; margin-bottom: 0.5em; padding: 1em; } div.PRTTrue{ border: 1px solid #DDFFBA; padding: 0.25em; margin-top: 1em; background-color: #efe; } div.PRTFalse{ border: 1px dotted #FFA19E; padding: 0.25em; margin-top: 1em; background-color: #fee; } .interactionElementsTable, .deploymentTable { margin-right: auto; margin-left: auto; text-align: left; width: 95%; background-color: #fff; } div.row { clear: both; padding-top: 0.1em; padding-bottom: 0.1em; min-height: 2em; height: 1%; } div.row span.error { min-width: 30em; color: red; font-weight: bold; font-size: 90%; background-color: #fee; border: 1px dashed #c12926; float: left; text-align: left; padding: 0.2em; } div.row span.label { float: left; width: 250px; text-align: right; padding: 0.25em; } div.row span.formw { float: left; text-align: left; padding: 0.2em; /*width: 300px;*/ } div.row span.full{ float: left; text-align: left; padding: 0.2em; } div.authorMath { background-color:#FFFFFF; border:1px dashed; clear:left; float:none; padding:0.2em; width:505px; display: none; } div#authoringControls { background-color:#EEEEEE; border:1px solid #E1E1E1; padding:5px; position:fixed; width:120px; left:20px; } div#authoringControls input { width: 110px; margin: 1px 5px; } /* Tables --------------------------------------------------------------*/ .tableHeader{ font-weight: bold; background-color: #ddd; } tr.light{ } tr.dark{ background-color: #eee; } .reportTable{ text-align: left; width: 100%; } .reportsStatsTable{ text-align: left; width: 60%; } .optionEditor{ background-color: white; } .matrixTable td { border: 0px solid black; } tr.odd { background-color: #eee; } tr.even { background-color: #fff; } td { vertical-align: top; } /* Lists ------------------------------------------------------------------*/ .horizontal li{ display: inline; list-style-type: none; margin-right: 2em; } /* Searching -------------------------------------------------------------*/ .over80pc{ background-color: #CCFF99; } .over60pc{ background-color: #FFFF99; } .over30pc{ background-color: #FFCC99; } .lower30pc{ background-color: #FF9999; } /* Moodle -------------------------------------------------------------------*/ /*Turn off moodle grading*/ div.grading{ display: none; } /* hide review all questions on one page */ div.controls a{ display: none; } Index: questiontype.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/moodleModule/opaque/questiontype.php,v retrieving revision 1.9 retrieving revision 1.9.8.1 diff -C2 -d -r1.9 -r1.9.8.1 *** questiontype.php 23 Sep 2009 13:20:05 -0000 1.9 --- questiontype.php 9 Nov 2010 16:51:40 -0000 1.9.8.1 *************** *** 73,80 **** $contributions = array('<link rel="stylesheet" type="text/css" href="' . $this->plugin_baseurl() . '/styles.css" />'); ! /* TODO: remove this nasty hardwired hack */ ! $contributions[] = "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://stack.bham.ac.uk/stack-dev/styles.css\" />"; ! $contributions[] = "<script type=\"text/javascript\" src=\"http://stack.bham.ac.uk/stack-dev/lib/ui/inputTypes/dragmath/dragmath.php\"></script>"; ! $contributions[] = "<script type=\"text/javascript\" src=\"http://stack.bham.ac.uk/stack-dev/lib/ui/helpPopup.js\"></script>"; return $contributions; --- 73,79 ---- $contributions = array('<link rel="stylesheet" type="text/css" href="' . $this->plugin_baseurl() . '/styles.css" />'); ! /* TOFIX: references to the STACK base below */ ! //$contributions[] = "<script type=\"text/javascript\" src=\"http://stack.bham.ac.uk/stack-dev/lib/ui/inputTypes/dragmath/dragmath.php\"></script>"; ! //$contributions[] = "<script type=\"text/javascript\" src=\"http://stack.bham.ac.uk/stack-dev/lib/ui/helpPopup.js\"></script>"; return $contributions; *************** *** 226,229 **** --- 225,231 ---- } + function print_question_grading_details(&$question, &$state, $cmoptions, $options) { + // No output in STACK, thanks. + } } |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:48
|
Update of /cvsroot/stack/stack-dev/opaque/minimalClient In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/opaque/minimalClient Modified Files: Tag: item_state_separation minimalClient.php Log Message: Brought back up to date with big HEAD merge. Index: minimalClient.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/minimalClient/minimalClient.php,v retrieving revision 1.8 retrieving revision 1.8.8.1 diff -C2 -d -r1.8 -r1.8.8.1 *** minimalClient.php 8 Oct 2009 09:19:51 -0000 1.8 --- minimalClient.php 9 Nov 2010 16:51:39 -0000 1.8.8.1 *************** *** 19,27 **** $engine_URL = 'http://127.0.0.1/stack-dev/opaque/soapServer.php'; ! $passkey = 'MTI3NjU2'; // See config.php "passkey", or the testsuite throught the web interface. // NOTE: You *must* have a space before the id number. This is weird, and I can't explain it. ! $remoteid = ' 50'; // The questionID number of the stackquestion ! $selection_seed = 1; // This is used to select a random version from the items. $userID = 1; --- 19,27 ---- $engine_URL = 'http://127.0.0.1/stack-dev/opaque/soapServer.php'; ! $passkey = 'Mzg3NTM5'; // See config.php "passkey", or the testsuite throught the web interface. // NOTE: You *must* have a space before the id number. This is weird, and I can't explain it. ! $remoteid = ' 3'; // The questionID number of the stackquestion ! $selection_seed = 2; // This is used to select a random version from the items. $userID = 1; *************** *** 102,106 **** <script> document.getElementById('stacksubmit').style.display = 'inline'; - document.getElementById('stackfinish').style.display = 'inline'; </script> <input type="hidden" id="session" name="session" value="<?php echo $session ?>"><p> --- 102,105 ---- *************** *** 108,112 **** <hr /><p><a href="minimalClient.php">Start again</a></p> <?php ! if(isset($response)) echo '<pre>$response:'.print_r($response, true).'</pre>'; //echo '<pre>$_POST:'.print_r($response, true).'</pre>'; --- 107,111 ---- <hr /><p><a href="minimalClient.php">Start again</a></p> <?php ! //if(isset($response)) echo '<pre>$response:'.print_r($response, true).'</pre>'; //echo '<pre>$_POST:'.print_r($response, true).'</pre>'; |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:48
|
Update of /cvsroot/stack/stack-dev/opaque/moodleModule/opaque/lang/en_utf8 In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/opaque/moodleModule/opaque/lang/en_utf8 Modified Files: Tag: item_state_separation qtype_opaque.php Log Message: Brought back up to date with big HEAD merge. Index: qtype_opaque.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/moodleModule/opaque/lang/en_utf8/qtype_opaque.php,v retrieving revision 1.20.6.1 retrieving revision 1.20.6.1.2.1 diff -C2 -d -r1.20.6.1 -r1.20.6.1.2.1 *** qtype_opaque.php 3 Nov 2009 16:03:28 -0000 1.20.6.1 --- qtype_opaque.php 9 Nov 2010 16:51:40 -0000 1.20.6.1.2.1 *************** *** 64,69 **** $string['noQuestions'] = 'No available Questions'; $string['question(s)'] = 'question(s)'; ! $string['id'] = 'Id'; $string['name'] = 'Name'; $string['description'] = 'Description'; $string['valid'] = 'Valid'; --- 64,73 ---- $string['noQuestions'] = 'No available Questions'; $string['question(s)'] = 'question(s)'; ! $string['id.v'] = 'id.v';// see below ! $string['id.version'] = 'Id.revision'; $string['name'] = 'Name'; + $string['keywords'] = 'keywords'; + $string['keywordsRelatedTo'] = 'Keywords related to'; + $string['mostCommonKeywords'] = 'Most common keywords'; $string['description'] = 'Description'; $string['valid'] = 'Valid'; *************** *** 71,79 **** $string['preview'] = 'Preview'; $string['deploy'] = 'Deploy'; ! $string['nodeployed'] = "#"; $string['actions'] = 'Actions'; $string['export'] = 'Export'; ! $string['delete'] = 'Delete'; ! $string['confirmDeletion'] = 'Are you sure you want to delete?'; $string['caseSensitive'] = 'case sensitive'; $string['invertSelection'] = 'invert selection'; --- 75,87 ---- $string['preview'] = 'Preview'; $string['deploy'] = 'Deploy'; ! $string['deployingQuestion'] = 'Deploying question'; ! $string['prime'] = 'Prime'; ! $string['nodeployed'] = 'Number deployed'; $string['actions'] = 'Actions'; $string['export'] = 'Export'; ! $string['delete'] = 'Delete'; // still used? ! $string['undeploy'] = 'Undeploy'; ! $string['confirmUndeploy'] = 'Are you sure you want to undeploy?'; // for dropping versions ! $string['confirmDeletion'] = 'Are you sure you want to delete?'; // for dropping lines $string['caseSensitive'] = 'case sensitive'; $string['invertSelection'] = 'invert selection'; *************** *** 81,86 **** $string['xml'] = 'XML'; $string['qAvailable'] = 'Questions available from '; ! $string['instantiationsOf'] = 'Instantiations of question '; $string['noInstances'] = 'No instances have been deployed'; $string['qNote'] = 'Question note'; $string['qEngine'] = ' question engine'; --- 89,95 ---- $string['xml'] = 'XML'; $string['qAvailable'] = 'Questions available from '; ! $string['instancesOf'] = 'Instances of question version '; $string['noInstances'] = 'No instances have been deployed'; + $string['noCategories'] = 'No categories available: please create a quiz for this Moodle site.'; $string['qNote'] = 'Question note'; $string['qEngine'] = ' question engine'; *************** *** 120,123 **** --- 129,133 ---- $string['stackAuthor_button_exportXML'] = 'Save & export as XML'; $string['stackAuthor_button_addPR'] = 'Add'; + $string['stackAuthor_finish_reminder'] = '<b>Remember:</b> Finish Authoring with button at bottom of page.'; $string['stackImport_button_Import'] = 'Import'; $string['stackQuestionList_filter'] = 'Filter'; *************** *** 128,136 **** $string['stackAuthor_button_exportAsXml'] = 'Export as XML'; $string['stackDeploy_autoprime'] = 'automatically prime'; ! $string['stackDeploy_showStem'] = 'show question stem'; $string['stackDeploy_primed?'] = 'Primed?'; ! $string['stackDeploy_button_delete'] = 'Delete'; $string['stackDeploy_button_prime'] = 'Prime'; ! //get_string('', 'qtype_opaque') ?> \ No newline at end of file --- 138,149 ---- $string['stackAuthor_button_exportAsXml'] = 'Export as XML'; $string['stackDeploy_autoprime'] = 'automatically prime'; ! $string['stackDeploy_showStem'] = 'show/hide stem'; $string['stackDeploy_primed?'] = 'Primed?'; ! $string['stackDeploy_button_undeploy'] = 'Undeploy'; $string['stackDeploy_button_prime'] = 'Prime'; ! $string['stackDeploy_button_update'] = 'Update'; // MUST match up with $string['stackDeploy_button_update'] in stack.php ! $string['stackDeploy_button_moveTo'] = 'Move to'; // MUST match up with FE_deployQuestion_moveTo in stack.php + //diagnostic + $string['diagnostic'] = 'Diagnostic Report'; ?> \ No newline at end of file |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:48
|
Update of /cvsroot/stack/stack-dev/server In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/server Modified Files: Tag: item_state_separation maximaXMLTranslator.php Log Message: Brought back up to date with big HEAD merge. Index: maximaXMLTranslator.php =================================================================== RCS file: /cvsroot/stack/stack-dev/server/maximaXMLTranslator.php,v retrieving revision 1.8 retrieving revision 1.8.18.1 diff -C2 -d -r1.8 -r1.8.18.1 *** maximaXMLTranslator.php 27 Sep 2007 11:24:18 -0000 1.8 --- maximaXMLTranslator.php 9 Nov 2010 16:51:40 -0000 1.8.18.1 *************** *** 30,38 **** private $xmlIn; //xml coming in ! private $message; //simplexml parser object private $cmdType; //answer test or caschat? private $seed; //timestamp seed ! private $csNames; private $csVars; --- 30,38 ---- private $xmlIn; //xml coming in ! private $message; //simplexml parser object private $cmdType; //answer test or caschat? private $seed; //timestamp seed ! private $csNames; private $csVars; *************** *** 46,52 **** { $this->xmlIn = $xml; ! echo 'XML in: '.$xml; ! try { --- 46,52 ---- { $this->xmlIn = $xml; ! echo 'XML in: '.$xml; ! try { *************** *** 56,71 **** echo 'XML parser failed: '.$e; } ! $this->security = $this->message->security; $this->cmdType = $this->message->cmdtype; $this->seed = $this->message->seed; //$this->seed = time(); ! $this->csNames = ''; $this->csVars = ''; $this->csCmds = ''; ! ! } ! function securityCheck() { --- 56,71 ---- echo 'XML parser failed: '.$e; } ! $this->security = $this->message->security; $this->cmdType = $this->message->cmdtype; $this->seed = $this->message->seed; //$this->seed = time(); ! $this->csNames = ''; $this->csVars = ''; $this->csCmds = ''; ! ! } ! function securityCheck() { *************** *** 74,78 **** $checkArray[] = $this->message->anstest->student; $checkArray[] = $this->message->anstest->teacher; ! return $this->securityCheckCommands($checkArray); } --- 74,78 ---- $checkArray[] = $this->message->anstest->student; $checkArray[] = $this->message->anstest->teacher; ! return $this->securityCheckCommands($checkArray); } *************** *** 84,91 **** } return $this->securityCheckCommands($checkArray); ! } } ! ! /** * Gets just the keywords used in the raw cas string. Gives unique keywords only --- 84,91 ---- } return $this->securityCheckCommands($checkArray); ! } } ! ! /** * Gets just the keywords used in the raw cas string. Gives unique keywords only *************** *** 99,126 **** if(count($checkArray) > 0) { ! foreach($checkArray as $cmd) { $pat = "|[\?_A-Za-z0-9]+|"; preg_match_all($pat,$cmd,$out,PREG_PATTERN_ORDER); ! // Filter out some of these matches. ! ! foreach($out[0] as $key) { // Do we have only numbers, or only 2 characters? // These strings are fine. preg_match("|[0-9]+|",$key,$justnum); ! ! if (empty($justnum) and strlen($key)>2) { //echo "Keyword found: $key <br />"; $upKey = strtoupper($key); ! array_push($strin_keywords, $upKey); ! } } } ! $this->keywords = array_unique($strin_keywords); //var_dump($strin_keywords); if (count($this->keywords) > 0) --- 99,126 ---- if(count($checkArray) > 0) { ! foreach($checkArray as $cmd) { $pat = "|[\?_A-Za-z0-9]+|"; preg_match_all($pat,$cmd,$out,PREG_PATTERN_ORDER); ! // Filter out some of these matches. ! ! foreach($out[0] as $key) { // Do we have only numbers, or only 2 characters? // These strings are fine. preg_match("|[0-9]+|",$key,$justnum); ! ! if (empty($justnum) and strlen($key)>2) { //echo "Keyword found: $key <br />"; $upKey = strtoupper($key); ! array_push($strin_keywords, $upKey); ! } } } ! $this->keywords = array_unique($strin_keywords); //var_dump($strin_keywords); if (count($this->keywords) > 0) *************** *** 138,142 **** } } ! /** * Check security of commands --- 138,142 ---- } } ! /** * Check security of commands *************** *** 148,152 **** $toReturn = true; $problem = ''; ! global $stack_cas; $globalForbid[] = $stack_cas['globalForbid']; --- 148,152 ---- $toReturn = true; $problem = ''; ! global $stack_cas; $globalForbid[] = $stack_cas['globalForbid']; *************** *** 154,158 **** $studentAllow = $stack_cas['studentAllow']; ! if($this->getCommandKeywords($checkArray) === true) { --- 154,158 ---- $studentAllow = $stack_cas['studentAllow']; ! if($this->getCommandKeywords($checkArray) === true) { *************** *** 160,164 **** foreach($this->keywords as $key) { ! if($this->in_array_caseless($key, $globalForbid)) { --- 160,164 ---- foreach($this->keywords as $key) { ! if($this->in_array_caseless($key, $globalForbid)) { *************** *** 183,187 **** //echo "$key is not in teacher forbid.<br>"; } ! } else --- 183,187 ---- //echo "$key is not in teacher forbid.<br>"; } ! } else *************** *** 192,196 **** $toReturn = false; $problem .= "Unknown function: $key"; ! } else --- 192,196 ---- $toReturn = false; $problem .= "Unknown function: $key"; ! } else *************** *** 202,206 **** }//foreach //echo $problem; ! if(!$toReturn) { --- 202,206 ---- }//foreach //echo $problem; ! if(!$toReturn) { *************** *** 215,220 **** return $toReturn; } ! ! function in_array_caseless($search, &$array) { $search = strtolower($search); --- 215,220 ---- return $toReturn; } ! ! function in_array_caseless($search, &$array) { $search = strtolower($search); *************** *** 231,235 **** } } ! function buildMaximaString() { --- 231,235 ---- } } ! function buildMaximaString() { *************** *** 244,265 **** echo 'Creating cas chat'.$this->cmdType; return $this->buildCaschatString(); ! } } ! function buildCaschatString() { ! //sort out maxima commands $i = 0; foreach($this->message->commands->caschat as $cmd) { ! $this->cmd = str_replace('?', 'qmchar', $cmd); // replace any ?'s that slipped through $this->csNames .= ", $cmd->label"; $this->csCmds .= ", print(\"$i=[ error= [\"), cte(\"$cmd->label\",errcatch($cmd->label:$cmd->cmd)) "; $i++; ! } ! $cs ='cab:block([ RANDOM_SEED'; $cs .= $this->csNames; --- 244,265 ---- echo 'Creating cas chat'.$this->cmdType; return $this->buildCaschatString(); ! } } ! function buildCaschatString() { ! //sort out maxima commands $i = 0; foreach($this->message->commands->caschat as $cmd) { ! $this->cmd = str_replace('?', 'qmchar', $cmd); // replace any ?'s that slipped through $this->csNames .= ", $cmd->label"; $this->csCmds .= ", print(\"$i=[ error= [\"), cte(\"$cmd->label\",errcatch($cmd->label:$cmd->cmd)) "; $i++; ! } ! $cs ='cab:block([ RANDOM_SEED'; $cs .= $this->csNames; *************** *** 269,276 **** $cs .= $this->csCmds; $cs .= ", print(\"] ]\") , return(true) ); \n "; ! return $cs; } ! function buildAnsTest() { --- 269,276 ---- $cs .= $this->csCmds; $cs .= ", print(\"] ]\") , return(true) ); \n "; ! return $cs; } ! function buildAnsTest() { *************** *** 278,293 **** $exp2 = $this->message->anstest->teacher; $ansTest = $this->message->anstest->anstesttype; ! ! $cs = "cab:block([ ans1983,str{$this->csNames}] {$this->csVars}, "; ! $cs .= " print(\"[ Timestamp = [ $this->seed ], Ans= [ error = [\"), cte(\"ans1983\",errcatch(ans1983:$exp1)),"; ! $cs .= " print(\" AnswerTestError = [ \"), str:$ansTest(ans1983,$exp2), print(\" ], \"), print(str), return(true)); \n"; ! return $cs; } ! function buildVariables() { ! foreach($this->message->maximavar->mstring as $string) { --- 278,294 ---- $exp2 = $this->message->anstest->teacher; $ansTest = $this->message->anstest->anstesttype; ! ! $cs = "cab:block([ STACK_SA,STACK_TA,str{$this->csNames}] {$this->csVars}, "; ! $cs .= " print(\"[ Timestamp = [ $this->seed ], Ans= [ error = [\"), STACK_SA:cte(\"STACK_SA\",errcatch($exp1)),"; ! $cs .= " print(\" TAAns= [ error = [\"), STACK_TA:cte(\"STACK_TA\",errcatch(STACK_TA:$exp2)),"; ! $cs .= " print(\" AnswerTestError = [ \"), str:$ansTest(STACK_SA,STACK_TA), print(\" ], \"), print(str), return(true)); \n"; ! return $cs; } ! function buildVariables() { ! foreach($this->message->maximavar->mstring as $string) { *************** *** 295,299 **** $this->csVars .= ', '.$string->key.':"'.$string->value.'"'; } ! foreach($this->message->maximavar->mexp as $exp) { --- 296,300 ---- $this->csVars .= ', '.$string->key.':"'.$string->value.'"'; } ! foreach($this->message->maximavar->mexp as $exp) { *************** *** 301,310 **** $this->csVars .= ', '.$exp->key.':'.$exp->value; } ! foreach($this->message->maximavar->mfunc as $func) { $this->csVars .= ', '.$func->key.'('.$func->value.')'; } ! } --- 302,311 ---- $this->csVars .= ', '.$exp->key.':'.$exp->value; } ! foreach($this->message->maximavar->mfunc as $func) { $this->csVars .= ', '.$func->key.'('.$func->value.')'; } ! } |
Update of /cvsroot/stack/stack-dev/opaque/moodleModule/opaque/stack In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/opaque/moodleModule/opaque/stack Modified Files: Tag: item_state_separation soapPage.php stackQuestionList.php stackLib.php stackDeploy.php stackAuthor.php Log Message: Brought back up to date with big HEAD merge. Index: stackDeploy.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/moodleModule/opaque/stack/stackDeploy.php,v retrieving revision 1.2.8.1 retrieving revision 1.2.8.1.2.1 diff -C2 -d -r1.2.8.1 -r1.2.8.1.2.1 *** stackDeploy.php 3 Nov 2009 16:03:28 -0000 1.2.8.1 --- stackDeploy.php 9 Nov 2010 16:51:39 -0000 1.2.8.1.2.1 *************** *** 21,29 **** require_once($CFG->libdir . '/formslib.php'); require_once($CFG->libdir . '/datalib.php'); require_once(dirname(__FILE__) . '/../locallib.php'); ! require_once('stackLib.php'); require_once('../../../editlib.php'); - // Check the user is logged in. require_login(); --- 21,29 ---- require_once($CFG->libdir . '/formslib.php'); require_once($CFG->libdir . '/datalib.php'); + require_once(dirname(__FILE__) . '/../locallib.php'); ! //require_once('stackLib.php'); require_once('../../../editlib.php'); // Check the user is logged in. require_login(); *************** *** 46,52 **** redirect('stackEngineSelector.php'); } ! //print_r($_POST); ! if(!empty($_POST['submit'])) { --- 46,53 ---- redirect('stackEngineSelector.php'); } ! //*/ //print_r($_POST); ! //print_r($USER); ! //exit(); if(!empty($_POST['submit'])) { *************** *** 61,65 **** break; ! case get_string('stackDeploy_button_delete', 'qtype_opaque'): if(!isset($_POST['instances'])) break; foreach($_POST['instances'] as $iid => $on) { --- 62,66 ---- break; ! case get_string('stackDeploy_button_undeploy', 'qtype_opaque'): if(!isset($_POST['instances'])) break; foreach($_POST['instances'] as $iid => $on) { *************** *** 78,81 **** --- 79,101 ---- } break; + + case get_string('stackDeploy_button_update', 'qtype_opaque'): + if(!is_numeric($_POST['prior'])) break; + $specs['id'] = $_GET['id']; // not sure this is needed but, hey. + $specs['prior'] = $_POST['prior']; + $specs['number'] = $_POST['add']; + $specs['category'] = $_POST['category']; + $specs['operation'] = 'update'; + //print_r($specs); + stackUpdateDeployment($SESSION->stackSelectedEngine, $specs); + break; + + case get_string('stackDeploy_button_moveTo', 'qtype_opaque'): + $specs['id'] = $_GET['id']; // not sure this is needed but, hey. + $specs['category'] = $_POST['category']; + $specs['operation'] = 'move'; + //print_r($specs); + stackMoveDeployment($SESSION->stackSelectedEngine, $specs); + break; } } *************** *** 88,91 **** --- 108,118 ---- } + // handle version undeploy + if(!empty($_GET['dropall']) && is_numeric($_GET['dropall'])) { + $specs['id'] = $_GET['id']; + $specs['version'] = $_GET['dropall']; + stackUndeployVersion($SESSION->stackSelectedEngine, $specs); + } + // handle single primings if(!empty($_GET['prime']) && is_numeric($_GET['prime'])) { *************** *** 98,102 **** $param = $_POST + $_GET; ! $deployedPage = stackDeployedList($SESSION->stackSelectedEngine, $param); $deployedList = $deployedPage->deployedInstances; --- 125,131 ---- $param = $_POST + $_GET; ! $deployedPage = stackDeployedList($SESSION->stackSelectedEngine, $param); // problem here ! ! //echo '<pre>'.print_r($deployedPage, 1); $deployedList = $deployedPage->deployedInstances; *************** *** 104,108 **** $engineName = getEngineName($SESSION->stackSelectedEngine); ! $strtitle = get_string('instantiationsOf', 'qtype_opaque').$param['id'].' : '.$engineName.get_string('qEngine', 'qtype_opaque'); $navlinks = array(); $navlinks[] = array('name' => get_string('StackQuestions', 'qtype_opaque', ''), 'link' => 'stackQuestionList.php', 'type' => 'title'); --- 133,137 ---- $engineName = getEngineName($SESSION->stackSelectedEngine); ! $strtitle = get_string('deployingQuestion', 'qtype_opaque').' '.$param['id'];//.' : '.$engineName.get_string('qEngine', 'qtype_opaque'); $navlinks = array(); $navlinks[] = array('name' => get_string('StackQuestions', 'qtype_opaque', ''), 'link' => 'stackQuestionList.php', 'type' => 'title'); *************** *** 115,128 **** echo "<form method='POST' action='?id=".$_GET['id']."'>"; ! echo $deployedPage->xhtml; // may include form fields //echo " <input type='checkbox' name='autoprime' checked='checked'> ".get_string('stackDeploy_autoprime', 'qtype_opaque'); ! echo " <input type='checkbox' name='autoprime' ".(isset($_POST['autoprime'])?'checked="checked"':"")."> ".get_string('stackDeploy_autoprime', 'qtype_opaque'); if($deployedList == NULL) { ! // nothing required: echo '<p>'.get_string('noInstances', 'qtype_opaque').'</p>'; } else { $opts = new stdClass; $opts->noclean = true; --- 144,163 ---- echo "<form method='POST' action='?id=".$_GET['id']."'>"; ! ! echo "<div class='mdl-align'>".$deployedPage->xhtml."</div>"; // may include form fields ! //echo " <input type='checkbox' name='autoprime' checked='checked'> ".get_string('stackDeploy_autoprime', 'qtype_opaque'); ! //echo " <input type='checkbox' name='autoprime' ".(isset($_POST['autoprime'])?'checked="checked"':"")."> ".get_string('stackDeploy_autoprime', 'qtype_opaque'); ! if($deployedList == NULL) { ! // nothing required: ! echo '<p class="mdl-align">'.get_string('noInstances', 'qtype_opaque').'</p>'; } else { + echo '<p>'.get_string('nodeployed', 'qtype_opaque').': '.count($deployedList); + $opts = new stdClass; $opts->noclean = true; *************** *** 136,140 **** echo '<th align="center" class="header">'.get_string('actions', 'qtype_opaque').'</th>'; echo '<th class="header">'.get_string('qNote', 'qtype_opaque').'</th>'; ! echo '<th align="center" class="header">'.get_string('stackDeploy_primed?', 'qtype_opaque').'</th></tr>'; $i = 0; foreach($deployedList as $instance) { --- 171,176 ---- echo '<th align="center" class="header">'.get_string('actions', 'qtype_opaque').'</th>'; echo '<th class="header">'.get_string('qNote', 'qtype_opaque').'</th>'; ! //echo '<th align="center" class="header">'.get_string('stackDeploy_primed?', 'qtype_opaque').'</th>'; ! echo '</tr>'; $i = 0; foreach($deployedList as $instance) { *************** *** 145,160 **** echo '<td align="center">' . '<a href="stackSessionPage.php?page=try&id='.$param['id'].'&instance='.$instance->id.'&seed='.$instance->seed.'" /><img alt="'.get_string('preview', 'qtype_opaque').'" title="'.get_string('preview', 'qtype_opaque').'" src="'.$CFG->wwwroot.'/pix/t/preview.gif" /></a> '. ! '<a href="stackDeploy.php?id='.$param['id'].'&prime='.$instance->id.'"><img alt="'.get_string('primed?', 'qtype_opaque').'" title="'.get_string('prime', 'qtype_opaque').'" src="'.$CFG->wwwroot.'/pix/t/go.gif" /></a> '. ! '<a onclick="return confirm(\''.get_string('confirmDeletion', 'qtype_opaque').'\')" href="stackDeploy.php?id='.$param['id'].'&drop='.$instance->id.'" ><img alt="'.get_string('delete', 'qtype_opaque').'" title="'.get_string('delete', 'qtype_opaque').'" src="'.$CFG->wwwroot.'/pix/t/delete.gif" /></a></td>'; $qID = 'q'.$instance->id; ! $previewBox = '<a href="javascript:;" onClick="$(\'#'.$qID.'\').slideToggle(\'fast\')" /><small>'.get_string('stackDeploy_showStem', 'qtype_opaque').'</small></a><div style="clear:both; border:#999 solid 1px; display:none; padding:10px" id="'.$qID.'">'.$instance->xhtml; echo '<td align="left">'.format_text($instance->qNote.$previewBox.'</div>', FORMAT_MOODLE, $opts).'</td>'; ! echo '<td>'.($instance->isPrimed ? '<img alt="'.get_string('primed', 'qtype_opaque').'." src="'.$CFG->wwwroot.'/pix/i/tick_green_small.gif" />':'').'</td>'; echo '</tr>'; } echo '</tbody></table>'; echo '<a href="javascript:;" onclick="$(\'.groupCB\').click()">'.get_string('invertSelection', 'qtype_opaque').'</a><br /><b>'.get_string('withSelected', 'qtype_opaque').':</b>'; ! echo '<input type="submit" value="'.get_string('stackDeploy_button_delete', 'qtype_opaque').'" name="submit" onclick="return confirm(\''.get_string('confirmDeletion','qtype_opaque').'\')" />'; ! echo '<input type="submit" value="'.get_string('stackDeploy_button_prime', 'qtype_opaque').'" name="submit" />'; echo '</form>'; } --- 181,196 ---- echo '<td align="center">' . '<a href="stackSessionPage.php?page=try&id='.$param['id'].'&instance='.$instance->id.'&seed='.$instance->seed.'" /><img alt="'.get_string('preview', 'qtype_opaque').'" title="'.get_string('preview', 'qtype_opaque').'" src="'.$CFG->wwwroot.'/pix/t/preview.gif" /></a> '. ! //'<a href="stackDeploy.php?id='.$param['id'].'&prime='.$instance->id.'"><img alt="'.get_string('primed?', 'qtype_opaque').'" title="'.get_string('prime', 'qtype_opaque').'" src="'.$CFG->wwwroot.'/pix/t/go.gif" /></a> '. ! '<a onclick="return confirm(\''.get_string('confirmUndeploy', 'qtype_opaque').'\')" href="stackDeploy.php?id='.$param['id'].'&drop='.$instance->id.'" ><img alt="'.get_string('undeploy', 'qtype_opaque').'" title="'.get_string('undeploy', 'qtype_opaque').'" src="'.$CFG->wwwroot.'/pix/t/delete.gif" /></a></td>'; $qID = 'q'.$instance->id; ! $previewBox = ' <a href="javascript:;" onClick="$(\'#'.$qID.'\').slideToggle(\'fast\')" /><small>'.get_string('stackDeploy_showStem', 'qtype_opaque').'</small></a><div style="clear:both; border:#999 solid 1px; display:none; padding:10px" id="'.$qID.'">'.$instance->xhtml; echo '<td align="left">'.format_text($instance->qNote.$previewBox.'</div>', FORMAT_MOODLE, $opts).'</td>'; ! //echo '<td align="center">'.($instance->isPrimed ? '<img alt="'.get_string('primed', 'qtype_opaque').'." src="'.$CFG->wwwroot.'/pix/i/tick_green_small.gif" />':'').'</td>'; echo '</tr>'; } echo '</tbody></table>'; echo '<a href="javascript:;" onclick="$(\'.groupCB\').click()">'.get_string('invertSelection', 'qtype_opaque').'</a><br /><b>'.get_string('withSelected', 'qtype_opaque').':</b>'; ! echo '<input type="submit" value="'.get_string('stackDeploy_button_undeploy', 'qtype_opaque').'" name="submit" Xonclick="return confirm(\''.get_string('confirmUndeploy','qtype_opaque').'\')" />'; ! //echo '<input type="submit" value="'.get_string('stackDeploy_button_prime', 'qtype_opaque').'" name="submit" />'; echo '</form>'; } Index: stackAuthor.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/moodleModule/opaque/stack/stackAuthor.php,v retrieving revision 1.13.10.1 retrieving revision 1.13.10.2 diff -C2 -d -r1.13.10.1 -r1.13.10.2 *** stackAuthor.php 2 Dec 2009 20:13:03 -0000 1.13.10.1 --- stackAuthor.php 9 Nov 2010 16:51:39 -0000 1.13.10.2 *************** *** 110,113 **** --- 110,114 ---- $clean = stripslashes($post); $posted[$key] = $clean; + $posted[$key] = get_magic_quotes_gpc() ? $post : stripslashes($post); } } *************** *** 164,183 **** //echo '<input type="submit" name="submit" value="Update" /> <input type="submit" name="submit" value="Save" /> <input type="submit" name="submit" value="Save as New" /> <input type="submit" name="submit" value="Export as XML" />'; echo '<div id="authoringControls">'; ! print_heading($strtitle); echo '<input type="submit" name="submit" value="'.get_string('stackAuthor_button_update','qtype_opaque').'" /> <input type="submit" name="submit" value="'.get_string('stackAuthor_button_save','qtype_opaque').'" /> <input type="submit" name="submit" value="'.get_string('stackAuthor_button_savenew','qtype_opaque').'" /> <input type="submit" name="submit" value="'.get_string('stackAuthor_button_exportAsXml','qtype_opaque').'" />'; ! echo '<a href="#parts">Parts</a>'; ! echo '<br /><a href="#prt">PRTs</a>'; ! echo '<br /><a href="#tests">Tests</a>'; echo '<p><small>'.get_string('stackAuthor_finish_reminder','qtype_opaque').'</small></p>'; echo '</div>'; ! //echo '<hr>'; ! //var_dump($_POST); ! } ! echo $soapPage->XHTML; ! echo '</form>'; print_box_end(); --- 165,201 ---- //echo '<input type="submit" name="submit" value="Update" /> <input type="submit" name="submit" value="Save" /> <input type="submit" name="submit" value="Save as New" /> <input type="submit" name="submit" value="Export as XML" />'; echo '<div id="authoringControls">'; ! //echo ! //print_heading($strtitle); echo '<input type="submit" name="submit" value="'.get_string('stackAuthor_button_update','qtype_opaque').'" /> <input type="submit" name="submit" value="'.get_string('stackAuthor_button_save','qtype_opaque').'" /> <input type="submit" name="submit" value="'.get_string('stackAuthor_button_savenew','qtype_opaque').'" /> <input type="submit" name="submit" value="'.get_string('stackAuthor_button_exportAsXml','qtype_opaque').'" />'; ! ?> ! <ul> ! <li><a href="#stem">Stem</a></li> ! <li><a href="#parts" onClick="$('#partContainer').slideDown();">Interactions</a></li> ! <li><a href="#prts" onClick="$('#prtContainer').slideDown();">Responses</a></li> ! <li><a href="#options" onClick="$('#optionContainer').slideDown();">Options</a></li> ! <li><a href="#tests" onClick="$('#testContainer').slideDown();">Tests</a></li> ! <li><a href="#meta" onClick="$('#metaContainer').slideDown();">Meta</a></li> ! </ul> ! <?php echo '<p><small>'.get_string('stackAuthor_finish_reminder','qtype_opaque').'</small></p>'; echo '</div>'; + } + echo $soapPage->XHTML; + echo '</form>'; ! // bit of an optional hack to improve UI while keeping things SOAP page simple ! ?> ! <script language="JavaScript" type="text/javascript"> ! $(document).ready(function() { ! console.log($('#versionHistory').children('br').length); ! // $('#authoringControls').append($('#versionHistory').detach().html()); // move ! $('#authoringControls').append($('#versionHistory').html()); // copy ! // would like to limit side to last n items since it is fixed and so doesn't scroll ! }); ! </script> + <?php print_box_end(); Index: stackQuestionList.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/moodleModule/opaque/stack/stackQuestionList.php,v retrieving revision 1.33.6.1 retrieving revision 1.33.6.1.2.1 diff -C2 -d -r1.33.6.1 -r1.33.6.1.2.1 *** stackQuestionList.php 3 Nov 2009 16:03:28 -0000 1.33.6.1 --- stackQuestionList.php 9 Nov 2010 16:51:39 -0000 1.33.6.1.2.1 *************** *** 13,16 **** --- 13,17 ---- * * @author Jonathan Hart (j.p...@bh...) + * @author Simon Hammond (s.h...@bh...) * @copyright © 2007 University of Birmingham * @license http://www.gnu.org/copyleft/gpl.html GNU Public License *************** *** 49,52 **** --- 50,54 ---- $questionPage = stackQuestionList($SESSION->stackSelectedEngine, $param); + //echo "<pre>".print_r($questionPage, 1)."</pre>"; $engineName = getEngineName($SESSION->stackSelectedEngine); *************** *** 55,82 **** print_header_simple($strtitle, '', $strtitle, '', $questionPage->head); print_box_start(); ! print_heading($strtitle); ! ! ! /*echo '<pre>'; ! var_dump($questionPage); ! echo '</pre>';*/ //$url = getStackURL($SESSION->stackSelectedEngine); $docsUrl = 'http://stack.bham.ac.uk/wiki/index.php/Main_Page'; ! echo '<div class="section80"> ! <h3 class="section">'.get_string('addquestion', 'qtype_opaque').'</h3> ! <ul class="horizontal"> ! ! <li><a href="stackAuthor.php?id=new">'.get_string('newQ', 'qtype_opaque').'</a></li> ! <li><a href="soapPage.php?page=import">'.get_string('import', 'qtype_opaque').'</a></li> ! <li><a href="soapPage.php?page=chat">'.get_string('chat', 'qtype_opaque').'</a></li> ! <li><a href="soapPage.php?page=search">'.get_string('search', 'qtype_opaque').'</a></li> ! <li><a href="stackSessionPage.php?page=report">'.get_string('reports', 'qtype_opaque').'</a></li> ! <!--<li><a href="soapPage.php?page=optionsEditor">'.get_string('stackOptions', 'qtype_opaque').'</a></li>--> ! <li><a href="'.$docsUrl.'">Stack Documentation</a></li> ! ! </ul> ! </div>'; $questionList = $questionPage->questionItems; --- 57,72 ---- print_header_simple($strtitle, '', $strtitle, '', $questionPage->head); print_box_start(); ! //print_heading($strtitle); //$url = getStackURL($SESSION->stackSelectedEngine); $docsUrl = 'http://stack.bham.ac.uk/wiki/index.php/Main_Page'; ! echo '<a href="stackAuthor.php?id=new">'.get_string('newQ', 'qtype_opaque').'</a> | ! <a href="soapPage.php?page=import">'.get_string('import', 'qtype_opaque').'</a> | ! <a href="soapPage.php?page=chat">'.get_string('chat', 'qtype_opaque').'</a> | ! <a href="soapPage.php?page=search">'.get_string('search', 'qtype_opaque').'</a> | ! <a href="stackSessionPage.php?page=report">'.get_string('reports', 'qtype_opaque').'</a> | ! <!--<li><a href="soapPage.php?page=optionsEditor">'.get_string('stackOptions', 'qtype_opaque').'</a>--> ! <a href="'.$docsUrl.'">Stack Documentation</a>'; $questionList = $questionPage->questionItems; *************** *** 90,105 **** } ! if($questionList == NULL && !isset($_POST['filter'])) ! { echo '<h3>'.get_string('myQuestions','qtype_opaque').'</h3>'; echo ''.get_string('noQuestions', 'qtype_opaque').''; } ! else ! { echo '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">'; /*echo '<pre>'; var_dump($questionList); ! echo '</pre>';*/ // Filter echo "<p>".count($questionList).' '.get_string('question(s)', 'qtype_opaque')." <input type='text' id='filter' name='filter' value='". --- 80,171 ---- } ! if($questionList == NULL && !isset($_POST['filter'])) { echo '<h3>'.get_string('myQuestions','qtype_opaque').'</h3>'; echo ''.get_string('noQuestions', 'qtype_opaque').''; } ! ! else { ! // tot up keywords ! $kwFreq = array(); ! if(!empty($questionList)) { ! foreach($questionList as $q) { ! if(!empty($q->keywords)) { ! foreach($q->keywords as $kw) { ! if(!isset($kwFreq[$kw])) $kwFreq[$kw] = 1; ! else $kwFreq[$kw]++; ! } ! } ! } ! } ! ! ksort($kwFreq); // sort keywords alphanumerically but still case-sensitive ! $kws = array_keys($kwFreq); ! echo '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">'; /*echo '<pre>'; var_dump($questionList); ! echo '</pre>';//*/ ! ! if(!empty($questionPage->keywords)) { ! // List ALL used keywords ! echo get_string('keywords', 'qtype_opaque').": <a href='stackQuestionList.php'>" . ! (isset($_GET['keywords'])?'*':'<b>*</b>') . ! "</a>, "; ! $firstKeyword = true; ! //foreach($kwFreq as $kw => $freq) { ! $i = 1; ! foreach($questionPage->keywords as $kw) { ! if(!$firstKeyword) { ! echo ', '; ! } else $firstKeyword = false; ! $kwLink = "<a href='?keywords=$kw'>$kw</a>"; ! echo isset($_GET['keywords']) && in_array($kw, $kws) ? "<b>$kwLink</b>": $kwLink; ! if($i++ == 50) { ! echo "<span onmouseover='$(this).hide();$(this).next().show()'>, <b>more...</b></span></a><span style='display:none' class='moreTags'>"; ! } ! } ! if(!$firstKeyword) echo '.'; ! ! if($i > 50) echo "</span>";// closing moretags ! ! if (count($kwFreq) > 0) { ! // keywords associated with given keyword ! if(isset($_GET['keywords'])) { ! echo "<p>".get_string('keywordsRelatedTo', 'qtype_opaque')." <b>".$_GET['keywords']."</b>: "; ! ! $firstKeyword = true; ! foreach($kwFreq as $kw => $freq) { ! //foreach($questionPage->keywords as $kw) { ! if(!$firstKeyword && $_GET['keywords'] != $kw) { ! echo ', '; ! } else $firstKeyword = false; ! ! $kwLink = "<a title='$freq' href='?keywords=$kw'>$kw</a>"; ! //$kwLink = "<a href='?keywords=$kw'>$kw</a>"; ! echo $_GET['keywords'] == $kw ? '': $kwLink; ! } ! if(!$firstKeyword) echo '.'; ! } else if (!empty($kwFreq)) { ! // most common keywords ! arsort($kwFreq); ! $toShow = 10; ! echo "<p>".get_string('mostCommonKeywords', 'qtype_opaque').": "; ! $firstKeyword = true; ! foreach($kwFreq as $kw => $freq) { ! //foreach($questionPage->keywords as $kw) { ! if(!$firstKeyword) { ! echo ', '; ! } else $firstKeyword = false; + $kwLink = "<a title='$freq' href='?keywords=$kw'>$kw</a>"; + echo $kwLink; + $toShow--; + if($toShow <= 0) break; + } + if(!$firstKeyword) echo '.'; + } + } + } + //*/ // Filter echo "<p>".count($questionList).' '.get_string('question(s)', 'qtype_opaque')." <input type='text' id='filter' name='filter' value='". *************** *** 108,129 **** (isset($_POST['casesensitive'])?"checked='checked'":'')."> ".get_string('caseSensitive', 'qtype_opaque')."<p>"; echo '<table style="text-align: left; width: 100%;" border="0" cellpadding="4px" cellspacing="0"> <tbody> ! <tr><td>'; ! //$this->add_checkbox_controller(1, null, null, 1); ?> <input type="checkbox" onclick="c=this.checked;$('.groupingCheckbox').each(function() {this.checked = c})"> <?php ! echo '</td>'; ! ! /*echo '<pre>'; ! var_dump($questionList); ! echo '</pre>';*/ ! $tableHeadings['id'] = '<th class="header"><a href="stackQuestionList.php?sortBy=id&sortOrder=dec">'.get_string('id', 'qtype_opaque').'</a></th>'; ! $tableHeadings['name'] = '<th class="header"><a href="stackQuestionList.php?sortBy=name&sortOrder=asc">'.get_string('name', 'qtype_opaque').'</a></th>'; ! $tableHeadings['description'] = '<th class="header"><a href="stackQuestionList.php?sortBy=description&sortOrder=asc">'.get_string('description', 'qtype_opaque').'</a></th>'; ! $tableHeadings['valid'] = '<th class="header"><a href="stackQuestionList.php?sortBy=valid&sortOrder=asc">'.get_string('valid', 'qtype_opaque').'</a></th>'; ! $tableHeadings['nodeployed'] = '<th class="header" nowrap><a href="stackQuestionList.php?sortBy=nodeployed&sortOrder=asc">'.get_string('nodeployed', 'qtype_opaque').'</a></th>'; $tableHeadings['published'] = '<th class="header"><a href="stackQuestionList.php?sortBy=published&sortOrder=asc">'.get_string('published', 'qtype_opaque').'</a></th>'; $tableHeadings['dateEdited'] = '<th class="header"><a href="stackQuestionList.php?sortBy=dateEdited&sortOrder=asc">'.get_string('dateEdited', 'qtype_opaque').'</a></th>'; --- 174,204 ---- (isset($_POST['casesensitive'])?"checked='checked'":'')."> ".get_string('caseSensitive', 'qtype_opaque')."<p>"; + // keywords associate with given filter + if(isset($_POST['filter']) && !empty($_POST['filter'])) { + echo "<p>".get_string('keywordsRelatedTo', 'qtype_opaque')." '".$_POST['filter']."': "; + + $firstKeyword = true; + foreach($kwFreq as $kw => $freq) { + //foreach($questionPage->keywords as $kw) { + if(!$firstKeyword) { + echo ', '; + } else $firstKeyword = false; + + echo "<a title='$freq' href='?keywords=$kw'>$kw</a>"; + } + if(!$firstKeyword) echo '.'; + } + echo '<table style="text-align: left; width: 100%;" border="0" cellpadding="4px" cellspacing="0"> <tbody> ! <tr><th class="header">'; ?> <input type="checkbox" onclick="c=this.checked;$('.groupingCheckbox').each(function() {this.checked = c})"> <?php ! echo '</th>'; ! $tableHeadings['name'] = '<th class="header"><a href="stackQuestionList.php?sortBy=name&sortOrder=asc">'.get_string('name', 'qtype_opaque').'</a>: <span style="font-weight: normal">'.get_string('description', 'qtype_opaque').' <small>'.get_string('keywords', 'qtype_opaque').'</small></span></th>'; ! $tableHeadings['valid'] = '<th class="header"><a href="stackQuestionList.php?sortBy=valid&sortOrder=asc">'.get_string('valid', 'qtype_opaque').'</a></th>'; ! $tableHeadings['nodeployed'] = '<th class="header" nowrap><a href="stackQuestionList.php?sortBy=nodeployed&sortOrder=asc"><abbr title="'.get_string('nodeployed', 'qtype_opaque').'">#</abbr></a></th>'; $tableHeadings['published'] = '<th class="header"><a href="stackQuestionList.php?sortBy=published&sortOrder=asc">'.get_string('published', 'qtype_opaque').'</a></th>'; $tableHeadings['dateEdited'] = '<th class="header"><a href="stackQuestionList.php?sortBy=dateEdited&sortOrder=asc">'.get_string('dateEdited', 'qtype_opaque').'</a></th>'; *************** *** 166,172 **** echo '<td><input type="checkbox" class="groupingCheckbox" name="'.$questionList[$i]->id.'" value="selected" /></td>'; ! echo '<td>'.$questionList[$i]->id.'</td> ! <td>'.$questionList[$i]->name.'</td>' . ! '<td>'.format_text($questionList[$i]->description, FORMAT_MOODLE, $opts).'</td>'; echo '<td align="center">'; --- 241,261 ---- echo '<td><input type="checkbox" class="groupingCheckbox" name="'.$questionList[$i]->id.'" value="selected" /></td>'; ! //echo '<td>'.$questionList[$i]->id.'.'.$questionList[$i]->version.'</td>'; ! echo '<td><b>'.$questionList[$i]->name.'</b>: '.format_text($questionList[$i]->description, FORMAT_MOODLE, $opts); ! if(!empty($questionList[$i]->keywords)) { ! echo '<br /><small>'; ! $keywords = $questionList[$i]->keywords; ! asort($keywords); ! $firstKeyword = true; ! foreach($keywords as $keyword) { ! if(!$firstKeyword) { ! echo ', '; ! } else $firstKeyword = false; ! $kwLink = "<a href='?keywords=$keyword'>".$keyword."</a>"; ! echo $kwLink; ! } ! echo '</small>'; ! } ! echo '</td>'; echo '<td align="center">'; *************** *** 234,238 **** <tbody> <tr> - <td>'.get_string('id', 'qtype_opaque').'</td> <td>'.get_string('name', 'qtype_opaque').'</td> <td>'.get_string('description', 'qtype_opaque').'</td> --- 323,326 ---- *************** *** 249,266 **** else echo '<tr class="odd">'; ! echo '<td>'.$questionList[$i]->id.'</td> ! <td>'.$questionList[$i]->name.'</td> <td>'.$questionList[$i]->description.'</td>'; if($questionList[$i]->valid == 1) { ! echo '<td>1</td>'; } else { ! echo '<td>0</td>'; } ! echo '<td>'.$questionList[$i]->dateEdited.'</td>'; echo '<td>'; if(!empty($questionList[$i]->moodleCategories)) --- 337,354 ---- else echo '<tr class="odd">'; ! //echo '<td>'.$questionList[$i]->id.'</td> ! echo '<td>'.$questionList[$i]->name.'</td> <td>'.$questionList[$i]->description.'</td>'; if($questionList[$i]->valid == 1) { ! echo '<img alt="1" src="'.$CFG->wwwroot.'/pix/i/tick_green_small.gif" />'; } else { ! echo '<img alt="0" src="'.$CFG->wwwroot.'/pix/i/cross_red_small.gif" />'; } ! echo '<td>'.formatDate($questionList[$i]->dateEdited).'</td>'; echo '<td>'; if(!empty($questionList[$i]->moodleCategories)) *************** *** 275,279 **** } } ! } echo '</td>'; global $USER; --- 363,369 ---- } } ! } else { ! echo get_string('noCategories', 'qtype_opaque'); ! } echo '</td>'; global $USER; *************** *** 307,314 **** if(!empty($catList)) { ! echo '<span class="relatedBox"><input type="submit" value="Move to Moodle Question Bank:" name="Submit"> '; echo $catList; echo '</span>'; ! } echo '<input type="hidden" name="stackEngine" value="'.$SESSION->stackSelectedEngine.'" />'; --- 397,406 ---- if(!empty($catList)) { ! echo '<p /><span class="relatedBox"><input type="submit" value="Move to Moodle Question Bank:" name="Submit"> '; echo $catList; echo '</span>'; ! } else { ! echo get_string('noCategories', 'qtype_opaque'); ! } echo '<input type="hidden" name="stackEngine" value="'.$SESSION->stackSelectedEngine.'" />'; Index: soapPage.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/moodleModule/opaque/stack/soapPage.php,v retrieving revision 1.14 retrieving revision 1.14.10.1 diff -C2 -d -r1.14 -r1.14.10.1 *** soapPage.php 23 Jun 2009 16:18:28 -0000 1.14 --- soapPage.php 9 Nov 2010 16:51:39 -0000 1.14.10.1 *************** *** 33,37 **** redirect('stackEngineSelector.php?return=soapPage.php?page='.$param['page']); } ! if($pageRequest != 'chat') //caschat pages don't need permissions { --- 33,37 ---- redirect('stackEngineSelector.php?return=soapPage.php?page='.$param['page']); } ! if($pageRequest != 'chat' && $pageRequest != 'diagnostic') //caschat/diagnostic pages don't need permissions { Index: stackLib.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/moodleModule/opaque/stack/stackLib.php,v retrieving revision 1.17.8.1 retrieving revision 1.17.8.1.2.1 diff -C2 -d -r1.17.8.1 -r1.17.8.1.2.1 *** stackLib.php 3 Nov 2009 16:03:28 -0000 1.17.8.1 --- stackLib.php 9 Nov 2010 16:51:39 -0000 1.17.8.1.2.1 *************** *** 310,313 **** --- 310,317 ---- $values[] = $USER->id; } + + $keys[] = 'engineID'; + $values[] = $engineID; + $passkey = stackGetPassKey($engineID, $USER->id); *************** *** 319,323 **** /** ! * Drops an instance (or version) of a question given its cache ID. * * @param int engineID --- 323,327 ---- /** ! * Drops an instance of a question given its cache ID. * * @param int engineID *************** *** 359,362 **** --- 363,406 ---- /** + * Undeploys a question version. + * + * @param int engineID + * @param int id + */ + function stackUndeployVersion($engineID, $param) + { + $engine = load_engine_def($engineID); + if(is_string($engine)) + { + echo $engine; //error occured. + } + else + { + $connection = connect_to_engine($engine); + if (is_string($connection)) + { + echo $connection; + } + + global $USER; + $keys[] = 'userID'; + $values[] = $USER->id; + + $keys[] = 'id'; + $values[] = $param['id']; + + $passkey = stackGetPassKey($engineID, $USER->id); + + $keys[] = 'operation'; + $values[] = 'undeploy'; + + $keys[] = 'version'; + $values[] = $param['version']; + + echo soap_call($connection, 'stackDeployOperation', array($passkey, $USER->id, $keys, $values)); + } + } + + /** * Adds an instance (or version) of a question. * *************** *** 402,406 **** /** ! * primes an instance (or version) of a question. * * @param int engineID --- 446,450 ---- /** ! * Primes an instance of a question. * * @param int engineID *************** *** 441,444 **** --- 485,575 ---- } + + /** + * Replaces one deployment to the Moodle quesiton bank with another. + * + * @param array + */ + function stackUpdateDeployment($engineID, $param) { + $engine = load_engine_def($engineID); + if(is_string($engine)) + { + echo $engine; //error occured. + } + else + { + $connection = connect_to_engine($engine); + if (is_string($connection)) + { + echo $connection; + } + + global $USER; + $keys[] = 'userID'; + $values[] = $USER->id; + + $keys[] = 'id'; + $values[] = $param['id']; + + $passkey = stackGetPassKey($engineID, $USER->id); + + $keys[] = 'operation'; + $values[] = 'update'; + + $keys[] = 'prior'; + $values[] = $param['prior']; + + $keys[] = 'number'; + $values[] = $param['number']; + + $keys[] = 'category'; + $values[] = $param['category']; + + $keys[] = 'engineID'; + $values[] = $engineID; + + echo soap_call($connection, 'stackDeployOperation', array($passkey, $USER->id, $keys, $values)); + } + } + + + function stackMoveDeployment($engineID, $param) { + + $engine = load_engine_def($engineID); + if(is_string($engine)) + { + echo $engine; //error occured. + } + else + { + $connection = connect_to_engine($engine); + if (is_string($connection)) + { + echo $connection; + } + + global $USER; + $keys[] = 'userID'; + $values[] = $USER->id; + + $keys[] = 'id'; + $values[] = $param['id']; + + $passkey = stackGetPassKey($engineID, $USER->id); + + $keys[] = 'operation'; + $values[] = 'move'; + + $keys[] = 'category'; + $values[] = $param['category']; + + $keys[] = 'engineID'; + $values[] = $engineID; + + echo soap_call($connection, 'stackDeployOperation', array($passkey, $USER->id, $keys, $values)); + } + } + + /** * Returns the name of the engine from its id *************** *** 641,647 **** { ! ereg('([0-9]*):([0-9]*) ([0-9]*)/([0-9]*)/([0-9]*)',$value->dateEdited, $time); ! ! $ts = mktime($time[1], $time[2], 0, $time[4],$time[3],$time[5]); //works on UK dates only. TODO generate date based of Moodle settings --- 772,776 ---- { ! preg_match('|([0-9]*):([0-9]*) ([0-9]*)/([0-9]*)/([0-9]*)|',$value->dateEdited, $time); $ts = mktime($time[1], $time[2], 0, $time[4],$time[3],$time[5]); //works on UK dates only. TODO generate date based of Moodle settings *************** *** 682,684 **** --- 811,820 ---- } + function formatDate($date) { + preg_match('|([0-9]*):([0-9]*) ([0-9]*)/([0-9]*)/([0-9]*)|',$date, $time); + $ts = mktime($time[1], $time[2], 0, $time[4],$time[3],$time[5]); //works on UK dates only. TODO generate date based of Moodle settings + if($ts < strtotime('00:00')) return date('j M Y', $ts); + else return date('g:ia', $ts); + } + ?> \ No newline at end of file |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:47
|
Update of /cvsroot/stack/stack-dev/lang/en/doc In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/lang/en/doc Modified Files: Tag: item_state_separation maxima_functions.php Log Message: Brought back up to date with big HEAD merge. Index: maxima_functions.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lang/en/doc/maxima_functions.php,v retrieving revision 1.2 retrieving revision 1.2.18.1 diff -C2 -d -r1.2 -r1.2.18.1 *** maxima_functions.php 2 Apr 2008 22:50:28 -0000 1.2 --- maxima_functions.php 9 Nov 2010 16:51:39 -0000 1.2.18.1 *************** *** 18,24 **** <p>This is a complete and alphabetical list of Maxima functions taken from the distributed documentation, ! together with the extent to which they are supported by STACK. This list is taken from Maxima 5.13.0 on 19 September 2007, and so may well be incomplete.</p> ! <p>The reasons why a function may have been excluded from STACK are listed below. <ul> <li>File operations</li> --- 18,24 ---- <p>This is a complete and alphabetical list of Maxima functions taken from the distributed documentation, ! together with the extent to which they are supported by STACK. This list is taken from Maxima 5.21.1 on 1 June 2010, and so may well be incomplete.</p> ! <p>The reasons why a function may have been excluded from STACK are listed below. <ul> <li>File operations</li> *************** *** 49,61 **** if (array_key_exists('use',$vals)) { - // This next if is entirely for formatting reasons. - // Long command or variable names clutter the display if unused. - if (strlen($fun) < 20 or 's' == $vals['use'] or 't' == $vals['use']) { echo "\n<tr>\n"; echo " <td>"; foreach ($vals['urls'] as $url) { ! echo " <a href='{$MaximaDocs}{$url}'>$fun</a> "; } echo "</td>\n"; --- 49,64 ---- if (array_key_exists('use',$vals)) { echo "\n<tr>\n"; echo " <td>"; + $i=0; foreach ($vals['urls'] as $url) { ! $i+=1; ! if ($i==1) { ! echo " <a href='{$MaximaDocs}{$url}'>$fun</pre></a> "; ! } else { ! echo " <a href='{$MaximaDocs}{$url}'>[$i]</pre></a> "; ! } } echo "</td>\n"; *************** *** 69,72 **** --- 72,77 ---- } else if ('never' == $vals['use']) { echo " <td> <font color='gray'>(Forbidden)</font> </td>\n "; + } else if ('NEW' == $vals['use']) { + echo " <td> <font color='red'>NEW</font> </td>\n "; } else echo " <td nowrap='nowrap'>Not supported</td>\n"; *************** *** 91,103 **** echo "</tr>"; } ! ! } } ?> - <hr> - <a href="index.html">STACK documentation home page</a> </body> --- 96,106 ---- echo "</tr>"; } ! } + echo "</table>"; ?> <hr> </body> |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:47
|
Update of /cvsroot/stack/stack-dev/sample_questions/diagnostictests In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/sample_questions/diagnostictests Added Files: Tag: item_state_separation FormulaSheet.tex DiagnosticTests.xml ReadMe.txt Log Message: Brought back up to date with big HEAD merge. --- NEW FILE: DiagnosticTests.xml --- <?xml version="1.0" encoding="UTF-8"?> <mathQuiz version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2"><assessmentItem version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:lom="http://www.imsglobal.org/xsd/imsmd_v1p2"><questionCasValues><questionStem type="CasText"><castext>Expand \(\left(@apbx@\right)^5\). #ans1# <IEfeedback>ans1</IEfeedback> <PRTfeedback>Result</PRTfeedback> <p>How confident are you (as a %)? #con1# <IEfeedback>con1</IEfeedback></p> </castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionStem><questionVariables type="RawKeyVal"><rawKeyVals>a = 2*rand(6)-5; b_magnitude = rand(4)+2; dummy1 = block(while a = b_magnitude do b_magnitude: rand(4)+2,return(b_magnitude)); b_sign = 2*rand(2)-1; b = b_magnitude * b_sign; bx = b*x; bx2 = bx^2; bx3 = bx2*bx; bx4 = bx3*bx; bx5 = bx4*bx; apbx = a+bx; a5 = a^5; b5 = b^5; five_a4_b = 5*a^4*b; five_a_b4 = 5*a*b^4; ten_a2_b3 = 10*a^2*b^3; ten_a3_b2 = 10*a^3*b^2; expansion = a^5+5*a^4*b*x+10*a^3*b^2*x^2+10*a^2*b^3*x^3+5*a*b^4*x^4+b^5*x^5</rawKeyVals><forbidFloats>false</forbidFloats><simplify>true</simplify></questionVariables><workedSolution type="CasText"><castext>For \(n\) a positive integer then by the binomial theorem \[ \left(a + b\right)^n = a^n + \frac{n!}{\left(n-1\right)!\cdot 1!}a^{n-1}\cdot b + \ldots+\frac{n!}{\left(n-r\right)!\cdot r!}a^{n-r}\cdot b^r + \ldots + b^n\mbox{.} \] In this case \(a=@a@\), \(b=@b@\) and \(n=5\); therefore \[\begin{array}{rcl}\displaystyle \left(@apbx@\right)^5 = @a@^5 + 5\cdot @a@^4 \cdot @b@ \cdot x + [...1545 lines suppressed...] \[ x=\frac{@dg1@ - @bg2@}{@ad@ - @bc@} = \frac{@xnum@}{@xden@} = @x_value@ \] and then substituting \(x=@x_value@\) in the former equation we see \[y = \frac{@dg1@ - @ad@ \times @x@}{@bd@} = \frac{@ynum@}{@bd@} = @y_value@\mbox{.}\]</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></workedSolution><questionNote type="CasText"><castext>\[\begin{array}{rcl}\displaystyle @lhs1@&\displaystyle =&\displaystyle @g1@\mbox{,}\\ @lhs2@&\displaystyle =&\displaystyle @g2@\mbox{,}\\ \displaystyle x & \displaystyle = & \displaystyle @x_value@\mbox{,}\\ \displaystyle y & \displaystyle = & \displaystyle @y_value@\mbox{.} \end{array}\]</castext><forbidFloats>false</forbidFloats><simplify>true</simplify></questionNote></questionCasValues><questionparts><questionpart><name>ans1</name><inputType type="Meta"><selection>Algebraic Input</selection><default>Algebraic Input</default><values/></inputType><boxsize>20</boxsize><teachersAns type="CasString"><casString>x_value</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>ans1</studentAnsKey><syntax type="Meta"><selection></selection><default></default><values/></syntax><stackoption><name>formalSyntax</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>forbidFloats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>insertStars</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>false</selected></stackoption><stackoption><name>sameType</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>lowestTerms</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_LowestTerms</casKey><casType>ex</casType><selected>true</selected></stackoption><inputTypesParameters/><forbiddenWords><Forbid>*</Forbid><Forbid> /</Forbid><Forbid> +</Forbid></forbiddenWords></questionpart><questionpart><name>ans2</name><inputType type="Meta"><selection>Algebraic Input</selection><default>Algebraic Input</default><values/></inputType><boxsize>20</boxsize><teachersAns type="CasString"><casString>y_value</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>ans2</studentAnsKey><syntax type="Meta"><selection></selection><default></default><values/></syntax><stackoption><name>formalSyntax</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>forbidFloats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>insertStars</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>false</selected></stackoption><stackoption><name>sameType</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>lowestTerms</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_LowestTerms</casKey><casType>ex</casType><selected>true</selected></stackoption><inputTypesParameters/><forbiddenWords><Forbid>*</Forbid><Forbid> /</Forbid><Forbid> +</Forbid></forbiddenWords></questionpart><questionpart><name>con1</name><inputType type="Meta"><selection>Slider</selection><default>Algebraic Input</default><values/></inputType><boxsize>200</boxsize><teachersAns type="CasString"><casString>0</casString><forbidFloats>false</forbidFloats><simplify>true</simplify></teachersAns><studentAnsKey>con1</studentAnsKey><syntax type="Meta"><selection></selection><default></default><values/></syntax><stackoption><name>formalSyntax</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>forbidFloats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>insertStars</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>false</selected></stackoption><stackoption><name>sameType</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>true</selected></stackoption><stackoption><name>lowestTerms</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_LowestTerms</casKey><casType>ex</casType><selected>true</selected></stackoption><inputTypesParameters/></questionpart></questionparts><PotentialResponseTrees><PotentialResponseTree><prtname>PotResTree_combined_values</prtname><questionValue>1</questionValue><autoSimplify>true</autoSimplify><feedbackVariables>ansg1 = a*ans1+b*ans2; ansg2 = c*ans1+d*ans2; xy_answer = [ans1,ans2]</feedbackVariables><description type="Meta"><selection></selection><default></default><values/></description><PotentialResponses><PR id="0"><answerTest>AlgEquiv</answerTest><teachersAns>xy_values</teachersAns><studentAns>xy_answer</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>1</rawMark><feedback><p>You can check your answer by substituting for \(x\) and \(y\) and confirming that the equations balance.</p></feedback><ansnote>EQN-SIM-TRUE</ansnote><nextPR>-1</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback>Substituting \(x=@ans1@\) and \(y=@ans2@\) \begin{eqnarray*} @lhs1@&=&@ansg1@\mbox{,}\\ @lhs2@&=&@ansg2@\mbox{,} \end{eqnarray*} but substituting in the unique correct values for \(x\) and \(y\) the above equations should evaluate to @g1@ and @g2@ respectively.</feedback><ansnote>EQN-SIM-FALSE-0</ansnote><nextPR>1</nextPR></false><teacherNote></teacherNote></PR><PR id="1"><answerTest>AlgEquiv</answerTest><teachersAns>xy_rhserror</teachersAns><studentAns>xy_answer</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback><p>When you multiply an equation by a constant, remember to multiply both sides, the right hand-side as well as the left hand-side.</p></feedback><ansnote>UNMULTIPLIED_RHS</ansnote><nextPR>-1</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback></feedback><ansnote>EQN-SIM-FALSE-1</ansnote><nextPR>2</nextPR></false><teacherNote></teacherNote></PR><PR id="2"><answerTest>AlgEquiv</answerTest><teachersAns>xy_signerror</teachersAns><studentAns>xy_answer</studentAns><testoptions></testoptions><quietAnsTest></quietAnsTest><true><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback><p>It may be that you added the two equations when you should have subtracted one from the other.</p></feedback><ansnote>SIGN_ERROR</ansnote><nextPR>-1</nextPR></true><false><rawModMark>=</rawModMark><rawMark>0</rawMark><feedback></feedback><ansnote>EQN-SIM-FALSE-2 </ansnote><nextPR>-1</nextPR></false><teacherNote></teacherNote></PR></PotentialResponses></PotentialResponseTree></PotentialResponseTrees><MetaData><dc:Publisher stackname="lastUserEditor" type="Meta"><selection></selection><default></default><values/></dc:Publisher><dc:language stackname="language" type="Meta"><selection>en</selection><default>en</default><values><value key="en">en</value><value key="fr">fr</value><value key="nl">nl</value><value key="es">es</value><value key="unspecified">Unspecified</value></values></dc:language><dc:title stackname="questionName" type="Meta"><selection>Diasgnostic_EQN-SIM_2</selection><default></default><values/></dc:title><dc:description stackname="questionDescription" type="Meta"><selection>Two simultaneous linear equations</selection><default></default><values/></dc:description><dc:publisher stackname="questionPublisher" type="Meta"><selection>http://130.88.73.28/stack-1-0/</selection><default>http://matsrv6.bham.ac.uk/stem</default><values/></dc:publisher><dc:format stackname="questionFormat" type="Meta"><selection>text/xml; charset="utf-8"</selection><default>text/xml; charset="utf-8"</default><values><value key="0">application</value><value key="1">audio</value><value key="2">image</value><value key="3">message</value><value key="4">model</value><value key="5">text</value><value key="6">video</value><value key="7">multipart</value></values></dc:format><lom:context stackname="questionLearningContext" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="PrimaryEducation">Primary Education</value><value key="SecondaryEducation">Secondary Education</value><value key="HigherEducation">Higher Education</value><value key="UniversityFirstCycle">University First Cycle</value><value key="UniversitySecondCycle">University Second Cycle</value><value key="UniversityPostGrade">University Post Grade</value><value key="TechnicalSchoolFirstCycle">Technical School First Cycle</value><value key="TechnicalSchoolSecondCycle">Technical School Second Cycle</value><value key="ProfessionalFormation">Professional Formation</value><value key="ContinuousFormation">Continuous Formation</value><value key="VocationalTraining">Vocational Training</value><value key="unspecified">Unspecified</value></values></lom:context><lom:difficulty stackname="questionDifficulty" type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="VeryEasy">Very Easy</value><value key="Easy">Easy</value><value key="Medium">Medium</value><value key="Difficult">Difficult</value><value key="VeryDifficult">Very Difficult</value><value key="unspecified">Unspecified</value></values></lom:difficulty><questionCompetency type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Think">Think</value><value key="Argue">Argue</value><value key="Solve">Solve</value><value key="Represent">Represent</value><value key="Language">Language</value><value key="Communicate">Communicate</value><value key="Tools">Tools</value><value key="unspecified">Unspecified</value></values></questionCompetency><questionCompentencyLevel type="Meta"><selection>unspecified</selection><default>unspecified</default><values><value key="Elementary">Elementary</value><value key="SimpleConceptual">Simple conceptual</value><value key="Multi-step">Multi-step</value><value key="Complex">Complex</value><value key="unspecified">Unspecified</value></values></questionCompentencyLevel><lom:typicallearningtime stackname="questionTimeAllocated" type="Meta"><selection>00:00:00</selection><default>00:00:00</default><values/></lom:typicallearningtime><dc:rights stackname="questionRights" type="Meta"><selection>http://www.gnu.org/copyleft/gpl.html</selection><default>http://www.gnu.org/copyleft/gpl.html</default><values/></dc:rights><questionExerciseType type="Meta"><selection>AlgebraicExpression</selection><default>AlgebraicExpression</default><values><value key="AlgebraicExpression">Algebraic Expression</value><value key="MCQSingleAnswer">MCQ Single Answer</value><value key="MCQMultpleAnswer">MCQ Multiple Answer</value><value key="FillInBlank">Fill in blank</value><value key="Unspecified">Unspecified</value></values></questionExerciseType><dc:date stackname="questionDateLastEdited" type="Meta"><selection>2010-09-01 12:08:29</selection><default>2010-08-18 16:52:13</default><values/></dc:date><lom:status stackname="questionStatus" type="Meta"><selection>Draft</selection><default>Draft</default><values><value key="Draft">Draft</value><value key="Deployed">Deployed</value><value key="Buggy">Buggy</value></values></lom:status><published type="Meta"><selection>Published</selection><default>Unpublished</default><values><value key="Unpublished">Unpublished</value><value key="Published">Published</value><value key="Private">Private</value></values></published><lom:keyword stackname="keywords" type="Meta"><selection>Manchester, A48A, foundation, diagnostic, EQN-SIM</selection><default>Manchester, A48A, foundation, diagnostic, EQN-SIM</default><values/></lom:keyword></MetaData><ItemOptions><stackoption><name>Display</name><type>list</type><default>LaTeX</default><values><value>LaTeX</value><value>MathML</value></values><casKey>OPT_OUTPUT</casKey><casType>string</casType><selected>LaTeX</selected></stackoption><stackoption><name>MultiplicationSign</name><type>list</type><default>dot</default><values><value>(none)</value><value>dot</value><value>cross</value></values><casKey>make_multsgn</casKey><casType>fun</casType><selected>dot</selected></stackoption><stackoption><name>ComplexNo</name><type>list</type><default>i</default><values><value>i</value><value>j</value><value>symi</value><value>symj</value></values><casKey>make_complexJ</casKey><casType>fun</casType><selected>i</selected></stackoption><stackoption><name>Floats</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>OPT_NoFloats</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>SqrtSign</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>sqrtdispflag</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>Simplify</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey>simp</casKey><casType>ex</casType><selected>true</selected></stackoption><stackoption><name>MarkModMethod</name><type>list</type><default>Penalty</default><values><value>Penalty</value><value>First Answer</value><value>Last Answer</value></values><casKey></casKey><casType></casType><selected>Penalty</selected></stackoption><stackoption><name>AssumePos</name><type>list</type><default>false</default><values><value>true</value><value>false</value></values><casKey>assume_pos</casKey><casType>ex</casType><selected>false</selected></stackoption><stackoption><name>TeacherEmail</name><type>string</type><default>s.h...@bh...</default><casKey></casKey><casType></casType><selected>Nie...@ma...</selected></stackoption><stackoption><name>Feedback</name><type>list</type><default>TGS</default><values><value>TGS</value><value>TG</value><value>GS</value><value>T</value><value>G</value><value>S</value><value>none</value></values><casKey></casKey><casType></casType><selected>G</selected></stackoption><stackoption><name>FeedbackGenericCorrect</name><type>html</type><default><span class='correct'>Correct answer, well done.</span></default><casKey></casKey><casType></casType><selected><span class='correct'>Correct answer, well done.</span></selected></stackoption><stackoption><name>FeedbackGenericIncorrect</name><type>html</type><default><span class='incorrect'>Incorrect answer.</span></default><casKey></casKey><casType></casType><selected><span class='incorrect'>Incorrect answer.</span></selected></stackoption><stackoption><name>FeedbackGenericPCorrect</name><type>html</type><default><span class='partially'>Your answer is partially correct.</span></default><casKey></casKey><casType></casType><selected><span class='partially'>Your answer is partially correct.</span></selected></stackoption><stackoption><name>OptWorkedSol</name><type>list</type><default>true</default><values><value>true</value><value>false</value></values><casKey></casKey><casType></casType><selected>false</selected></stackoption></ItemOptions><ItemTests><test><col><key>IE_ans1</key><value>x_value</value></col><col><key>IE_ans2</key><value>y_value</value></col><col><key>PRT_PotResTree_combined_values</key><value>EQN-SIM-TRUE</value></col><col><key>IE_con1</key><value></value></col></test><test><col><key>IE_ans1</key><value>xrhserror</value></col><col><key>IE_ans2</key><value>yrhserror</value></col><col><key>PRT_PotResTree_combined_values</key><value>UNMULTIPLIED_RHS</value></col><col><key>IE_con1</key><value></value></col></test><test><col><key>IE_ans1</key><value>xsignerror</value></col><col><key>IE_ans2</key><value>ysignerror</value></col><col><key>PRT_PotResTree_combined_values</key><value>SIGN_ERROR</value></col><col><key>IE_con1</key><value></value></col></test></ItemTests></assessmentItem></mathQuiz> --- NEW FILE: FormulaSheet.tex --- \documentclass{article} \usepackage{amsmath,amssymb,latexsym,a4wide,times} \usepackage{epsfig} \usepackage{graphicx} \parindent=0pt \parskip=2mm \columnsep=1cm \newcommand{\R}{{\mathbb R}} \newcommand{\N}{{\mathbb N}} \newcommand{\Z}{{\mathbb Z}} \newcommand{\Q}{{\mathbb Q}} \newcommand{\C}{{\mathbb C}} \renewcommand{\d}{\mathrm{d}} \pagestyle{empty} \begin{document} \begin{center} {\Large\bf Facts and formulae} \end{center} Indices: \[ a^ma^n = a^{m+n},\quad \frac{a^m}{a^n} = a^{m-n},\quad (a^m)^n = a^{mn}\] \[ a^0 = 1,\quad a^{-m} = \frac{1}{a^m},\quad a^{\frac{1}{n}} = \sqrt[n]{a},\quad a^{\frac{m}{n}} = \left(\sqrt[n]{a}\right)^m.\] Logarithms: for any $b>0$, $b \neq 1$: $\log_b(a) = c$, means $a = b^c$. \[\log_b(a) + \log_b(b) = \log_b(ab),\quad \log_b(a) - \log_b(b) = \log_b\left(\frac{a}{b}\right),\quad n\log_b(a) = \log_b\left(a^n\right)\] \[\log_b(1) = 0,\quad \log_b(b) = 1,\quad \log_a(x) = \frac{\log_b(x)}{\log_b(a)}\] Natural logarithms use base $e\approx 2.718$, and are denoted $\log_e$ or alternatively $\ln$. Standard Trigonometric Values \[ \sin(45^\circ)={1\over \sqrt{2}}, \qquad \cos(45^\circ) = {1\over \sqrt{2}},\qquad \tan( 45^\circ)=1 \] \[ \sin (30^\circ)={1\over 2}, \qquad \cos (30^\circ)={\sqrt{3}\over 2},\qquad \tan (30^\circ)={1\over \sqrt{3}}\] \[ \sin (60^\circ)={\sqrt{3}\over 2}, \qquad \cos (60^\circ)={1\over 2},\qquad \tan (60^\circ)={ \sqrt{3}} \] Standard Trigonometric Identities \[\sin(a\pm b)\ = \ \sin(a)\cos(b)\ \pm\ \cos(a)\sin(b)\] \[\cos(a\ \pm\ b)\ = \ \cos(a)\cos(b)\ \mp \sin(a)\sin(b)\] \[\tan (a\ \pm\ b)\ = \ {\tan (a)\ \pm\ \tan (b)\over1\ \mp\ \tan (a)\tan (b)}\] \[2\sin(a)\cos(b)\ = \ \sin(a+b)\ +\ \sin(a-b)\] \[2\cos(a)\cos(b)\ = \ \cos(a-b)\ +\ \cos(a+b)\] \[2\sin(a)\sin(b) \ = \ \cos(a-b)\ -\ \cos(a+b)\] \[\sin^2(a)+\cos^2(a)\ = \ 1\] \[1+{\rm cot}^2(a)\ = \ {\rm cosec}^2(a),\quad \tan^2(a) +1 \ = \ \sec^2(a)\] \[\cos(2a)\ = \ \cos^2(a)-\sin^2(a)\ = \ 2\cos^2(a)-1\ = \ 1-2\sin^2(a)\] \[\sin(2a)\ = \ 2\sin(a)\cos(a)\] \[\sin^2(a) \ = \ {1-\cos (2a)\over 2}, \qquad \cos^2(a)\ = \ {1+\cos(2a)\over 2}\] Hyperbolic Functions \[\cosh(x) = \frac{e^x+e^{-x}}{2}, \qquad \sinh(x)=\frac{e^x-e^{-x}}{2}\] \[\tanh(x) = \frac{\sinh(x)}{\cosh(x)} = \frac{{e^x-e^{-x}}}{e^x+e^{-x}}\] \[{\rm sech}(x) ={1\over \cosh(x)}={2\over {\rm e}^x+{\rm e}^{-x}}, \qquad {\rm cosech}(x)= {1\over \sinh(x)}={2\over {\rm e}^x-{\rm e}^{-x}}\] \[{\rm coth}(x) ={\cosh(x)\over \sinh(x)} = {1\over {\rm tanh}(x)} ={{\rm e}^x+{\rm e}^{-x}\over {\rm e}^x-{\rm e}^{-x}}\] Hyperbolic Identities \[{\rm e}^x=\cosh(x)+\sinh(x), \quad {\rm e}^{-x}=\cosh(x)-\sinh(x)\] \[\cosh^2(x) -\sinh^2(x) = 1$$ $$1-{\rm tanh}^2(x)={\rm sech}^2(x)\] \[{\rm coth}^2(x)-1={\rm cosech}^2(x)$$ $$\sinh(x\pm y)=\sinh(x)\ \cosh(y)\ \pm\ \cosh(x)\ \sinh(y)\] \[\cosh(x\pm y)=\cosh(x)\ \cosh(y)\ \pm\ \sinh(x)\ \sinh(y)\] \[\sinh(2x)=2\,\sinh(x)\cosh(x)\] \[\cosh(2x)=\cosh^2(x)+\sinh^2(x)\] \[\cosh^2(x)={\cosh(2x)+1\over 2}\] \[\sinh^2(x)={\cosh(2x)-1\over 2}\] Inverse Hyperbolic Functions \[\cosh^{-1}(x)=\ln\left(x+\sqrt{x^2-1}\right) \quad \mbox{ for } x\geq 1\] \[ \sinh^{-1}(x)=\ln\left(x+\sqrt{x^2+1}\right)\] \[\tanh^{-1}(x) = \frac{1}{2}\ln\left({1+x\over 1-x}\right) \quad \mbox{ for } -1< x < 1\] Calculus rules The Product Rule: \[\frac{\mathrm{d}}{\mathrm{d}{x}} \big(f(x)g(x)\big) = f(x) \cdot \frac{\mathrm{d} g(x)}{\mathrm{d}{x}} + g(x)\cdot \frac{\mathrm{d} f(x)}{\mathrm{d}{x}}.\] The Quotient Rule: \[\frac{d}{dx}\left(\frac{f(x)}{g(x)}\right)=\frac{g(x)\cdot\frac{df(x)}{dx}\ \ - \ \ f(x)\cdot \frac{dg(x)}{dx}}{g(x)^2}. \] The Chain Rule \[\frac{df(g(x))}{dx} = \frac{dg(x)}{dx}\cdot\frac{df(u)}{du}.\] Integration by Substitution: \[\int f(u){{\rm d}u\over {\rm d}x}{\rm d}x=\int f(u){\rm d}u \quad\hbox{and}\quad \int_a^bf(u){{\rm d}u\over {\rm d}x}\,{\rm d}x = \int_{u(a)}^{u(b)}f(u){\rm d}u.\] Integration by Parts: \[\int_a^b u{{\rm d}v\over {\rm d}x}{\rm d}x=\left[uv\right]_a^b- \int_a^b{{\rm d}u\over {\rm d}x}v\,{\rm d}x.\] \begin{center} \begin{tabular}{ll} $f(x)$ & $f'(x)$\\ $k$, constant & $0$ \\ $x^n$, any constant $n$ & $nx^{n-1}$\\ $e^x$ & $e^x$\\ $\ln(x)=\log_{\rm e}(x)$ & $\frac{1}{x}$ \\ $\sin(x)$ & $\cos(x)$ \\ $\cos(x)$ & $-\sin(x)$ \\ $\tan(x) = \frac{\sin(x)}{\cos(x)}$ & $\sec^2(x)$ \\ $\mbox{cosec}(x)=\frac{1}{\sin(x)}$ & $-\mbox{cosec}(x)\cot(x)$ \\ $\sec(x)=\frac{1}{\cos(x)}$ & $\sec(x)\tan(x)$ \\ $\cot(x)=\frac{\cos(x)}{\sin(x)}$ & $-\mbox{cosec}^2(x)$ \\ $\cosh(x)$ & $\sinh(x)$ \\ $\sinh(x)$ & $\cosh(x)$ \\ $\tanh(x)$ & $\mbox{sech}^2(x)$ \\ $\mbox{sech}(x)$ & $-\mbox{sech}sech(x)\tanh(x)$ \\ $\mbox{cosech}(x)$ & $-\mbox{cosech}(x)\coth(x)$ \\ $coth(x)$ & $-\mbox{cosech}^2(x)$ \\ \end{tabular} \end{center} \[\frac{d}{dx}\left(\sin^{-1}(x)\right) = \frac{1}{\sqrt{1-x^2}},\quad \frac{d}{dx}\left(\cos^{-1}(x)\right) = \frac{-1}{\sqrt{1-x^2}},\quad \frac{d}{dx}\left(\tan^{-1}(x)\right) = \frac{1}{1+x^2} \] \[\frac{d}{dx}\left(\cosh^{-1}(x)\right) = \frac{1}{\sqrt{x^2-1}},\quad \frac{d}{dx}\left(\sinh^{-1}(x)\right) = \frac{1}{\sqrt{x^2+1}},\quad \frac{d}{dx}\left(\tanh^{-1}(x)\right) = \frac{1}{1-x^2}\] \begin{center} \begin{tabular}{lll} $f(x)$ & $\int f(x)\ dx$\\ $e^x$ & $e^x+c$ & \\ $\cos(x)$ & $\sin(x)+c$ & \\ $\sin(x)$ & $-\cos(x)+c$ & \\ $\tan(x)$ & $\ln(\sec(x))+c$ & $-\frac{\pi}{2} < x < \frac{\pi}{2}$\\ $\sec x$ & $\ln (\sec(x)+\tan(x))+c$ & $-{\pi\over 2}< x < {\pi\over 2}$\\ cosec$\, x$ & $\ln ($cosec$(x)-\cot(x))+c$ & $0 < x < \pi$\\ cot$\,x$ & $\ln(\sin(x))+c$ & $0< x< \pi$ \\ $\cosh(x)$ & $\sinh(x)+c$ & \\ $\sinh(x)$ & $\cosh(x) + c$ & \\ $\tanh(x)$ & $\ln(\cosh(x))+c$ & \\ coth$(x)$ & $\ln(\sinh(x))+c $ & $x>0$\\ ${1\over x^2+a^2}$ & ${1\over a}\tan^{-1}{x\over a}+c$ & $a>0$\\ [2pt] ${1\over x^2-a^2}$ & ${1\over 2a}\ln{x-a\over x+a}+c$ & $|x|>a>0$\\ [2pt] ${1\over a^2-x^2}$ & ${1\over 2a}\ln{a+x\over a-x}+c$ & $|x|<a$\\ [3pt] ${1\over \sqrt{x^2+a^2}}$ & $\sinh^{-1}\left(\frac{x}{a}\right) + c$ & $a>0$ \\ ${1\over \sqrt{x^2-a^2}}$ & $\cosh^{-1}\left(\frac{x}{a}\right) + c$ & $x\geq a > 0$ \\ ${1\over \sqrt{x^2+k}}$ & $\ln (x+\sqrt{x^2+k})+c$ & \\ ${1\over \sqrt{a^2-x^2}}$ & $\sin^{-1}\left(\frac{x}{a}\right)+c$ & $-a\leq x\leq a$ \end{tabular} \end{center} \vfill {\scriptsize C J Sangwin, \verb$C.J...@bh...$, \today. This formula sheet is released under Creative Commons Attribution-Share Alike.\\ \includegraphics[width=1.5cm]{88x31.png}} \end{document} --- NEW FILE: ReadMe.txt --- Stimulating Techniques in Entry-level Mathematics with the STACK CAA system In April 2010 the National HE STEM Programme (http://www.stemprogramme.com) funded a mini-project stimulating Techniques in Entry-level Mathematics (STEM) with the STACK computer aided assessment (CAA) system}. The aims of this project are to take existing diagnostic tests in core mathematics and develop similar automatic tests for the STACK computer aided assessment system. The outcome of these tests will be a user profile which links outcomes to existing online learning materials. See http://web.mat.bham.ac.uk/C.J.Sangwin/projects/2010STEM/ The questions in this folder are the results of this project. These questions files are released under Creative Commons Attribution-Share Alike. http://creativecommons.org/licenses/by-sa/2.0/uk/ |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:47
|
Update of /cvsroot/stack/stack-dev/opaque/moodleModule/stack_diagnostic/lang/en_utf8 In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/opaque/moodleModule/stack_diagnostic/lang/en_utf8 Added Files: Tag: item_state_separation block_stack_diagnostic.php Log Message: Brought back up to date with big HEAD merge. --- NEW FILE: block_stack_diagnostic.php --- <?php /** * * Welcome to STACK. A system for teaching and assessment using a * computer algebra kernel. * * This file is licensed under the GPL License. * * A copy of the license is in your STACK distribution called * license.txt. If you are missing this file you can obtain * it from: * http://www.stack.bham.ac.uk/license.txt * * @author Jonathan Hart (j.p...@bh...) * * @package stackBlock * * Language files for stack's moodle block */ $string['title'] = 'Stack Diagnostic Reporting'; $string['reports'] = 'Reports'; $string['questions'] = 'Stack Questions'; $string['new'] = 'New Question'; $string['import'] = 'Import Question'; $string['caschat'] = 'CasChat'; $string['report'] = 'Stack Reports'; $string['editOpt'] = 'Edit Question Options'; $string['stack_not_installed'] = 'Please install STACK question type.'; $string['settings'] = 'STACK Diagnostic Reporting Settings'; $string['noSettings'] = 'The STACK Diagnostic Reporting block has no configuration options.'; ?> |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:47
|
Update of /cvsroot/stack/stack-dev/opaque/datatypes In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/opaque/datatypes Modified Files: Tag: item_state_separation QuestionListDT.php StackQuestionPageDT.php Log Message: Brought back up to date with big HEAD merge. Index: QuestionListDT.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/datatypes/QuestionListDT.php,v retrieving revision 1.4 retrieving revision 1.4.10.1 diff -C2 -d -r1.4 -r1.4.10.1 *** QuestionListDT.php 23 Jun 2009 14:39:37 -0000 1.4 --- QuestionListDT.php 9 Nov 2010 16:51:39 -0000 1.4.10.1 *************** *** 35,40 **** /* int */ public $nodeployed; ! public function __construct($id, $name, $description, $valid, $dateEdited, $moodleCategories, $published, $nodeployed) { $this->id = $id; --- 35,42 ---- /* int */ public $nodeployed; + /* array */ + public $keywords; ! public function __construct($id, $name, $description, $valid, $dateEdited, $moodleCategories, $published, $nodeployed, $keywords) { $this->id = $id; *************** *** 46,49 **** --- 48,52 ---- $this->published = $published; $this->nodeployed = $nodeployed; + $this->keywords = $keywords; } } Index: StackQuestionPageDT.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/datatypes/StackQuestionPageDT.php,v retrieving revision 1.5 retrieving revision 1.5.8.1 diff -C2 -d -r1.5 -r1.5.8.1 *** StackQuestionPageDT.php 27 Aug 2009 16:04:07 -0000 1.5 --- StackQuestionPageDT.php 9 Nov 2010 16:51:39 -0000 1.5.8.1 *************** *** 28,34 **** public $categories; /* array */ ! public $publicQuestions; ! public function __construct($questionItems, $xhtml, $head, $categories) { $this->questionItems = $questionItems; --- 28,36 ---- public $categories; /* array */ ! public $publicQuestions; // not used? ! /* array */ ! public $keywords; ! public function __construct($questionItems, $xhtml, $head, $categories, $keywords) { $this->questionItems = $questionItems; *************** *** 36,39 **** --- 38,42 ---- $this->head = $head; $this->categories = $categories; + $this->keywords = $keywords; } } |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:47
|
Update of /cvsroot/stack/stack-dev/lib/blocks/active In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/lib/blocks/active Added Files: Tag: item_state_separation IfBlock.php ForEachBlock.php BoldBlock.php SizeBlock.php Log Message: Brought back up to date with big HEAD merge. --- NEW FILE: IfBlock.php --- <?php /** * * Welcome to STACK. A system for teaching and assessment using a * computer algebra kernel. * * This file is licensed under the GPL License. * * A copy of the license is in your STACK distribution called * license.txt. If you are missing this file you can obtain * it from: * http://www.stack.bham.ac.uk/license.txt * * * @author Matti Harjula * */ global $config; $root = $config->get('docroot'); require_once($root.'/lib/blocks/BlockInterface.php'); require_once($root.'/lib/ui/BlockHandler.php'); /** * A Block to handle if-else-if structures of this form: * {% if test1 %}... * {% else if test2 %}... * {% else %}... * {% end if %} */ class IfBlock extends BlockInterface { public function getSubBlockIdentifiers(){return array("else");} public function getBlockIdentifier(){return "if";} public function processBlock($content,$vars,$casTextHandler){ $theReturn=""; // This would be so simple if there were no else or else if... as now we need to take in to account nested ifs that may also have elses. // but as our parser can already handle these things rather well this is not that big of an deal $parsedContent=BlockHandler::blockHandlerParser($content,array("else")); $branches=array("true"=>""); $whichBranch="true"; $weHaveElseBranch=false; $weHaveElseIfBranch=false; foreach($parsedContent as $bloc) if(is_array($bloc)){ $branches[$whichBranch].=self::backToStringForm(array($bloc)); }else{ // Now then is there an else of elseif $i=0; while(true){ $startOfFirstBlock=strpos($bloc,"{%",$i); if($startOfFirstBlock>0){ $branches[$whichBranch].=substr($bloc,$i,$startOfFirstBlock-$i); }else if($startOfFirstBlock===FALSE){ $branches[$whichBranch].=substr($bloc,$i); break; } $endOfFirstStartBlock=strpos($bloc,"%}",$startOfFirstBlock+2); $firstStartBlock=substr($bloc,$startOfFirstBlock,$endOfFirstStartBlock-$startOfFirstBlock+2); $blockTokens=self::tokenCleaner(explode(" ",trim(substr($firstStartBlock,2,-2)))); if(count($blockTokens)==1){ // just the else $weHaveElseBranch=true; $whichBranch="false"; $branches["false"]=""; $i=$endOfFirstStartBlock+2; }else{ $weHaveElseIfBranch=true; $whichBranch=implode(" ",array_splice($blockTokens,1)); $branches[$whichBranch]=""; $i=$endOfFirstStartBlock+2; } } } if($vars[0] === 'true') $theReturn.=$branches['true']; else{ // if we have an "else if" there we need to build a new if block so that it can be evaluated if($weHaveElseIfBranch){ $first=true; $second=false; foreach($branches as $test => $content){ if($first){ $first=false; //skipping the true branch $second=true; } else if($second){ $second=false; // The second one is special $theReturn.="{% ".$test." %}$content"; }else if($test=="false") $theReturn.="{% else %}$content"; else $theReturn.="{% else ".$test." %}$content"; } $theReturn.="{% end if %}"; }else if($weHaveElseBranch) $theReturn.=$branches["false"]; } return $theReturn; } private static function backToStringForm($blocks){ $R=""; foreach($blocks as $block) if(is_array($block)){ if(count($block['vars'])>0) $R.="{% ".$block['block_type']." ".implode(" ",$block['vars'])." %}"; else $R.="{% ".$block['block_type']." %}"; $R.=$block['content']; $R.="{% end ".$block['block_type']." %}"; }else $R.=$block; return $R; } private static function tokenCleaner($a){ $b=array(); foreach($a as $t) if(trim($t)!="") $b[]=$t; return $b; } } ?> --- NEW FILE: BoldBlock.php --- <?php global $config; $root = $config->get('docroot'); require_once($root.'/lib/blocks/BlockInterface.php'); class BoldBlock extends BlockInterface{ public function getSubBlockIdentifiers(){return False;} public function getBlockIdentifier(){return "bold";} public function processBlock($content,$vars,$casTextHandler){ return "<b>".$content."</b>"; } } ?> --- NEW FILE: SizeBlock.php --- <?php global $config; $root = $config->get('docroot'); require_once($root.'/lib/blocks/BlockInterface.php'); class SizeBlock extends BlockInterface{ public function getSubBlockIdentifiers(){return False;} public function getBlockIdentifier(){return "size";} public function processBlock($content,$vars,$casTextHandler){ return "<font size='".$vars[0]."'>".$content."</font>"; } } ?> --- NEW FILE: ForEachBlock.php --- <?php /** * * Welcome to STACK. A system for teaching and assessment using a * computer algebra kernel. * * This file is licensed under the GPL License. * * A copy of the license is in your STACK distribution called * license.txt. If you are missing this file you can obtain * it from: * http://www.stack.bham.ac.uk/license.txt * * * @author Matti Harjula * */ global $config; $root = $config->get('docroot'); require_once($root.'/lib/blocks/BlockInterface.php'); /** * A Block to handle foreach structures of this form: * {% foreach [1,2,3,4] as XXX %} * Something XXX * {% end foreach %} * * The block takes any comma-separated list of things that has been wrapped in * something and splits it to values that are injected to a place in the contents * of the block the marker of that place can be freely selected and can be any * continuous string. The contents are repeated as many times as there are items * in the list. * * The use of the "as"-keyword is mandatory. One can define multiple lists to be * iterated and they will be iterated in sync. If these lists are not of the same * length the iteration stops when the first list stops. * * {% foreach [1,2,3,4] as XXX * [2,3,4,5] as YYY %} * Something XXX and YYY * {% end foreach %} * * Something 1 and 2 * Something 2 and 3 * Something 3 and 4 * Something 4 and 5 */ class ForEachBlock extends BlockInterface { public function getSubBlockIdentifiers(){return array("else");} public function getBlockIdentifier(){return "foreach";} public function processBlock($content,$vars,$casTextHandler){ $replacements=array(); $minLength=99999; for($i=0;$i*3<=count($vars);$i+=3){ $items=self::tokenizer(substr($vars[$i],1,-1)); $replacements[$vars[$i+2]]=$items; $minLength=min($minLength,count($items)); } $r=""; for($i=0;$i<$minLength;$i++){ $t=$content; foreach($replacements as $token => $values) $t=str_replace($token,$values[$i],$t); $r.=$t; } return $r; } /** * StringUtil probably has something for this task... */ public static function tokenizer($in) { $braceCount = 0; $parenthesisCount = 0; $bracketCount = 0; $out = array (); $current = ''; $unPlaced = 0; for ($i = 0; $i < strlen($in); $i++) { $unPlaced++; $char = $in[$i]; switch ($char) { case '{' : $braceCount++; $current .= $char; break; case '}' : $braceCount--; $current .= $char; break; case '(' : $parenthesisCount++; $current .= $char; break; case ')' : $parenthesisCount--; $current .= $char; break; case '[' : $bracketCount++; $current .= $char; break; case ']' : $bracketCount--; $current .= $char; break; case ',' : if ($bracketCount == 0 && $parenthesisCount == 0 && $braceCount == 0) { $out[] = $current; $current = ''; $unPlaced = 0; } else $current .= $char; break; default; $current .= $char; } } if ($unPlaced > 0 && $bracketCount == 0 && $parenthesisCount == 0 && $braceCount == 0) $out[] = $current; return $out; } } ?> |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:47
|
Update of /cvsroot/stack/stack-dev/pix In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/pix Added Files: Tag: item_state_separation eye.png lorry.png wrench_orange.png gradient.jpg Published.png Private.png pencil.png help.png xhtml.png arrow_out.png transparent16x16.gif disk.png Unpublished.png arrow_right.png Log Message: Brought back up to date with big HEAD merge. --- NEW FILE: transparent16x16.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Private.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: eye.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: arrow_right.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Unpublished.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: pencil.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: help.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: disk.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: xhtml.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: wrench_orange.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Published.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: lorry.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: arrow_out.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gradient.jpg --- (This appears to be a binary file; contents omitted.) |
From: Simon H. <sim...@us...> - 2010-11-09 16:51:47
|
Update of /cvsroot/stack/stack-dev/lib/deployment In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/lib/deployment Modified Files: Tag: item_state_separation Deployment.php Log Message: Brought back up to date with big HEAD merge. Index: Deployment.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/deployment/Deployment.php,v retrieving revision 1.8.6.2 retrieving revision 1.8.6.2.2.1 diff -C2 -d -r1.8.6.2 -r1.8.6.2.2.1 *** Deployment.php 19 Nov 2009 16:13:38 -0000 1.8.6.2 --- Deployment.php 9 Nov 2010 16:51:39 -0000 1.8.6.2.2.1 *************** *** 22,26 **** /** * This class manages the deployment of question instances. ! * It ensures that singletons are deployed only once. */ --- 22,26 ---- /** * This class manages the deployment of question instances. ! * It ensures that singletons are deployed only once and all instances are of the same version. */ *************** *** 28,38 **** private $cache; ! private $questionID; private $instances; public $autoDeployed; private $logger; ! public function __construct($questionID) { $this->logger = new Logger("Deployment"); --- 28,41 ---- private $cache; ! private $version; ! private $line; // lookup on demand private $instances; public $autoDeployed; + private $engineID; + private $logger; ! public function __construct($version, $engineid = NULL) { $this->logger = new Logger("Deployment"); *************** *** 41,64 **** $this->cache->connect(); ! // assign questionID ! $this->questionID = $questionID; // get deployed instances ! $this->instances = $this->cache->getInstances($this->questionID); // ensure one instance if a singleton $this->ensureSingletonDeployed(); } /* this should probably be elsewhere ~ sph 23/10/09 */ public function formXHTML() { ! //$xhtml = "<form method='POST' action='?id=".$this->questionID."'> $xhtml = "<input type='submit' name='submit' value='add'> ! <input type='text' name='add' value='1' size='3' maxlength='3'/> " . get_string('FE_deployQuestion_newversions', 'stack'); return $xhtml; } public function processOperations($param) { ! //$this->logger->debug("in processOperations, param = ".print_r($param, 1)); // add requests --- 44,74 ---- $this->cache->connect(); ! // assign version ! $this->version = $version; // get deployed instances ! $this->instances = $this->cache->getInstances($this->version); // ensure one instance if a singleton $this->ensureSingletonDeployed(); + + $this->engineID = $engineid; + $this->logger->debug("engine id in Deployment constructor: ".$this->engineID); } /* this should probably be elsewhere ~ sph 23/10/09 */ public function formXHTML() { ! //$xhtml = "<form method='POST' action='?id=".$this->version."'> $xhtml = "<input type='submit' name='submit' value='add'> ! <input type='text' name='add' value='1' size='3' maxlength='3'/> " . get_string('FE_deployQuestion_newRandomInstances', 'stack'); ! //" <input type='checkbox' name='autoprime' ".(isset($_POST['autoprime'])?'checked="checked"':"")."> ".get_string('FE_deployQuestion_autoprime', 'stack'); ! /*" <input type='submit' onclick='return confirm(\"" . ! get_string('FE_deployQuestion_confirmUndeployAll', 'stack')."\")' name='dropall' value='" . ! get_string('FE_deployQuestion_undeployAll', 'stack')."'>";*/ return $xhtml; } public function processOperations($param) { ! $this->logger->debug("here in processOperations, param = ".print_r($param, 1)." and engineid = ".$this->engineID); // add requests *************** *** 66,70 **** if (!$this->isSingleton()) { $msg = get_string('FE_deployQuestion_attemptingDeploy', 'stack', $param['add']); ! $initialStates = $this->cache->deployCache($this->questionID, $param['add']); $msg .= ' '.get_string('FE_deployQuestion_deployedInstances', 'stack', sizeof($initialStates)); } --- 76,101 ---- if (!$this->isSingleton()) { $msg = get_string('FE_deployQuestion_attemptingDeploy', 'stack', $param['add']); ! $initialStates = $this->cache->deployCache($this->version, $param['add']); ! ! //if in Moodle, update ! //$engineID = $param['engineid']; ! if(!empty($this->engineID)) ! { ! $this->logger->debug('In moodle, checking your engine ids'); ! $db = new MoodleDB(); ! $db->connect(); ! $inMoodle = $db->inMoodleQuestionBank($this->version, $this->engineID); ! if($inMoodle == true) ! { ! /*update Moodle's database. ! $result = $db->updateQuestion($this->version, $this->getLine(), $this->authorId, $engineID, $post['category']); ! if($result == false) ! { ! $this->userMessage .= '<h3>'.get_string('stackAuthor_moodleUpdateFail','stack','').'</h3>'.get_string('stackAuthor_moodleQBFail','stack',''); ! } ! //*/ ! } ! } ! $msg .= ' '.get_string('FE_deployQuestion_deployedInstances', 'stack', sizeof($initialStates)); } *************** *** 85,94 **** // drop requests if (isset ($param['drop']) && is_numeric($param['drop'])) { ! $msg = get_string('FE_deployQuestion_dropping', 'stack') . $param['drop'] . '<br />'; ! $this->cache->dropState($param['drop']); $this->refreshInstances(); $this->ensureSingletonDeployed(); // redeploy if dropped a singleton } // prime requests if (isset ($param['operation']) && $param['operation'] == 'prime' && is_numeric($param['instance'])) { --- 116,150 ---- // drop requests if (isset ($param['drop']) && is_numeric($param['drop'])) { ! $msg = get_string('FE_deployQuestion_dropInstance', 'stack', $param['drop']) . '<br />'; ! $this->cache->deinitialiseState($param['drop']);// students may have attempted $this->refreshInstances(); $this->ensureSingletonDeployed(); // redeploy if dropped a singleton } + // undeploy request (version) + if (isset($param['operation']) && $param['operation'] === 'undeploy' && is_numeric($param['version'])) { + $toDrop = new Deployment($param['version']); + $this->logger->debug('trying to drop version'.$param['version']); + $toDrop->drop($param['engine']); + } + + + // update request (the caching part - Moddle Question Bank handled elsewhere) + if (isset($param['operation']) && $param['operation'] == 'update' && is_numeric($param['prior'])) { + // take id, prior, number, category and update + + // undeploy all old + $toDrop = new Deployment($param['prior']); + $this->logger->debug('trying to drop version'.$param['version'].' during update'); + $toDrop->drop($param['engine']); + + // Do new deploy last in case of timeout? + // create new deployment + if (!$this->isSingleton()) { // should auto-deploy in constructor + $msg = get_string('FE_deployQuestion_attemptingDeploy', 'stack', $param['number']); + $initialStates = $this->cache->deployCache($this->version, $param['number']); + } + } + // prime requests if (isset ($param['operation']) && $param['operation'] == 'prime' && is_numeric($param['instance'])) { *************** *** 102,107 **** // ensure singletons are always instantiated public function ensureSingletonDeployed() { ! if ($this->size() === 0 && $this->isSingleton()) { ! $this->cache->deployCache($this->questionID, 1); $this->refreshInstances(); $this->autoDeployed = true; --- 158,165 ---- // ensure singletons are always instantiated public function ensureSingletonDeployed() { ! // check no earlier blocking instances ! ! if ($this->size() === 0 && $this->isSingleton() && $this->earliestDeployedVersion() === false) { ! $this->cache->deployCache($this->version, 1); $this->refreshInstances(); $this->autoDeployed = true; *************** *** 112,116 **** private function refreshInstances() { ! $this->instances = $this->cache->getInstances($this->questionID); } --- 170,175 ---- private function refreshInstances() { ! $this->instances = $this->cache->getInstances($this->version); ! } *************** *** 120,124 **** // Are random versions of this item available? $options = NULL; ! $item = new Item($options, $this->questionID); return $item->questionVariables->contains_rand() == false; } --- 179,183 ---- // Are random versions of this item available? $options = NULL; ! $item = new Item($options, $this->version); return $item->questionVariables->contains_rand() == false; } *************** *** 139,143 **** $this->logger->debug('in primeResponses with ids: ' . print_r($instanceIDs, 1)); $options = NULL; ! $item = new Item($options, $this->questionID); if($item->itemTests !== NULL) { // not guaranteed --- 198,202 ---- $this->logger->debug('in primeResponses with ids: ' . print_r($instanceIDs, 1)); $options = NULL; ! $item = new Item($options, $this->version); if($item->itemTests !== NULL) { // not guaranteed *************** *** 211,215 **** $options = NULL; ! $item = new Item($options, $this->questionID); if($item->itemTests !== NULL) { // not guaranteed --- 270,274 ---- $options = NULL; ! $item = new Item($options, $this->version); if($item->itemTests !== NULL) { // not guaranteed *************** *** 244,247 **** --- 303,372 ---- return true; } + + function getVersion() { + return $this->version; + } + + /* + * Removes all instances from this deployment by deinitialising all the states. + */ + function drop($engineID = NULL) { + if(!empty($this->instances)) { + foreach($this->instances as $instance) { + $this->cache->deinitialiseState($instance['id']); + } + $this->refreshInstances(); + } + + //if in Moodle, update + if(!empty($engineID)) + { + $db = new MoodleDB(); + $db->connect(); + $inMoodle = $db->inMoodleQuestionBank($this->version, $engineID); + if($inMoodle == true) + { + //update Moodle's database. + /*$result = $db->REMOVEQuestion($this->version, $this->authorId, $engineID, $post['category']); + if($result == false) + { + $this->userMessage .= '<h3>'.get_string('stackAuthor_moodleUpdateFail','stack','').'</h3>'.get_string('stackAuthor_moodleQBFail','stack',''); + } + */ + } + } + //*/ + } + + function earliestDeployedVersion() { + $itemDB = new StackDBItem(); + $itemDB->connect(); + $versions = $itemDB->getVersions($itemDB->getLine($this->version)); // returned in descending order + $itemDB->disconnect(); + + $earliest = false; + + // requires versions ordered by descending id + foreach($versions as $date => $id) { + if($this->cache->instancesDeployed($id)) { + $earliest = $id; + } + } + return $earliest; + } + + function getLine() { + if(!isset($this->line)) { + $itemDB = new StackDBItem(); + $itemDB->connect(); + $this->line = $itemDB->getLine($this->version); // returned in descending order + $itemDB->disconnect(); + } + return $this->line; + } + + function getEngineID() { + return $this->engineID; + } } ?> \ No newline at end of file |
Update of /cvsroot/stack/stack-dev/other/jqueryCSS/images In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25193/other/jqueryCSS/images Added Files: Tag: item_state_separation ui-bg_flat_75_ffffff_40x100.png ui-icons_0073ea_256x240.png ui-icons_666666_256x240.png ui-bg_flat_0_eeeeee_40x100.png ui-bg_glass_65_ffffff_1x400.png ui-bg_highlight-soft_100_f6f6f6_1x100.png ui-bg_highlight-soft_50_dddddd_1x100.png ui-bg_highlight-soft_25_0073ea_1x100.png ui-icons_454545_256x240.png ui-icons_ff0084_256x240.png ui-bg_flat_0_aaaaaa_40x100.png ui-icons_ffffff_256x240.png ui-bg_flat_55_ffffff_40x100.png Log Message: Brought back up to date with big HEAD merge. --- NEW FILE: ui-bg_flat_75_ffffff_40x100.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ui-icons_ff0084_256x240.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ui-icons_ffffff_256x240.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ui-icons_0073ea_256x240.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ui-bg_highlight-soft_100_f6f6f6_1x100.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ui-bg_flat_55_ffffff_40x100.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ui-bg_highlight-soft_25_0073ea_1x100.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ui-bg_flat_0_eeeeee_40x100.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ui-icons_666666_256x240.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ui-icons_454545_256x240.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ui-bg_glass_65_ffffff_1x400.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ui-bg_highlight-soft_50_dddddd_1x100.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ui-bg_flat_0_aaaaaa_40x100.png --- (This appears to be a binary file; contents omitted.) |