Parent Directory
|
Revision Log
Revision 1.2 - (view) (download)
| 1 : | dservos | 1.1 | <?php |
| 2 : | dservos | 1.2 | /////////////////////////////////////////////////////////////////////////// |
| 3 : | // // | ||
| 4 : | // NOTICE OF COPYRIGHT // | ||
| 5 : | // // | ||
| 6 : | // Moodle - Modular Object-Oriented Dynamic Learning Environment // | ||
| 7 : | // http://moodle.org // | ||
| 8 : | // // | ||
| 9 : | // Copyright (C) 1999 onwards Martin Dougiamas http://moodle.com // | ||
| 10 : | // // | ||
| 11 : | // This program is free software; you can redistribute it and/or modify // | ||
| 12 : | // it under the terms of the GNU General Public License as published by // | ||
| 13 : | // the Free Software Foundation; either version 2 of the License, or // | ||
| 14 : | // (at your option) any later version. // | ||
| 15 : | // // | ||
| 16 : | // This program is distributed in the hope that it will be useful, // | ||
| 17 : | // but WITHOUT ANY WARRANTY; without even the implied warranty of // | ||
| 18 : | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // | ||
| 19 : | // GNU General Public License for more details: // | ||
| 20 : | // // | ||
| 21 : | // http://www.gnu.org/copyleft/gpl.html // | ||
| 22 : | // // | ||
| 23 : | /////////////////////////////////////////////////////////////////////////// | ||
| 24 : | |||
| 25 : | /** | ||
| 26 : | * generates HTML for the visual report. | ||
| 27 : | * This still needs work. | ||
| 28 : | */ | ||
| 29 : | |||
| 30 : | dservos | 1.1 | require_once '../../../config.php'; |
| 31 : | |||
| 32 : | if(!isset($courseid) || is_null($courseid)) { | ||
| 33 : | $courseid = required_param('id'); | ||
| 34 : | } | ||
| 35 : | |||
| 36 : | if(!isset($course) || is_null($course)) { | ||
| 37 : | if(isset($DB) && !is_null($DB)) { | ||
| 38 : | $course = $DB->get_record('course', array('id' => $courseid)); | ||
| 39 : | } else { | ||
| 40 : | $course = get_record('course', 'id', $courseid); | ||
| 41 : | } | ||
| 42 : | } | ||
| 43 : | |||
| 44 : | $flashvars = array(); | ||
| 45 : | $flashvars['username'] = $USER->username; | ||
| 46 : | $flashvars['userid'] = $USER->id; | ||
| 47 : | $flashvars['courseid'] = $courseid; | ||
| 48 : | $flashvars['coursefullname'] = $course->fullname; | ||
| 49 : | $flashvars['courseshortname'] = $course->shortname; | ||
| 50 : | $flashvars['sessionid'] = session_id(); | ||
| 51 : | $flashvars['sessioncookie'] = $CFG->sessioncookie; | ||
| 52 : | $flashvars['sessiontest'] = $SESSION->session_test; | ||
| 53 : | $flashvars['dirroot'] = $CFG->dirroot; | ||
| 54 : | $flashvars['wwwroot'] = $CFG->wwwroot; | ||
| 55 : | $flashvars['langmodulename'] = get_string('modulename', 'gradereport_visual'); | ||
| 56 : | $flashvars['langgrade'] =get_string('grades'); | ||
| 57 : | |||
| 58 : | $flashvarstext = ''; | ||
| 59 : | foreach($flashvars as $key=>$val) { | ||
| 60 : | $flashvarstext .= $key. '=' . addslashes(urlencode(strip_tags($val))) . '&'; | ||
| 61 : | } | ||
| 62 : | $flashvarstext = substr($flashvarstext, 0, strlen($flashvarstext) - 1); | ||
| 63 : | |||
| 64 : | ?> | ||
| 65 : | <div style="vertical-align: top; text-align: center;"> | ||
| 66 : | <script src="AC_OETags.js" language="javascript"></script> | ||
| 67 : | <script language="JavaScript" type="text/javascript"> | ||
| 68 : | <!-- | ||
| 69 : | // ----------------------------------------------------------------------------- | ||
| 70 : | // Major version of Flash required | ||
| 71 : | var requiredMajorVersion = 9; | ||
| 72 : | // Minor version of Flash required | ||
| 73 : | var requiredMinorVersion = 0; | ||
| 74 : | // Minor version of Flash required | ||
| 75 : | var requiredRevision = 28; | ||
| 76 : | // ----------------------------------------------------------------------------- | ||
| 77 : | |||
| 78 : | |||
| 79 : | // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65) | ||
| 80 : | var hasProductInstall = DetectFlashVer(6, 0, 65); | ||
| 81 : | |||
| 82 : | // Version check based upon the values defined in globals | ||
| 83 : | var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); | ||
| 84 : | |||
| 85 : | if ( hasProductInstall && !hasRequestedVersion ) { | ||
| 86 : | // DO NOT MODIFY THE FOLLOWING FOUR LINES | ||
| 87 : | // Location visited after installation is complete if installation is required | ||
| 88 : | var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn"; | ||
| 89 : | var MMredirectURL = window.location; | ||
| 90 : | document.title = document.title.slice(0, 47) + " - Flash Player Installation"; | ||
| 91 : | var MMdoctitle = document.title; | ||
| 92 : | |||
| 93 : | AC_FL_RunContent( | ||
| 94 : | "flashVars", "<?php echo $flashvarstext; ?>", | ||
| 95 : | |||
| 96 : | "src", "playerProductInstall", | ||
| 97 : | "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"", | ||
| 98 : | "width", "800", | ||
| 99 : | "height", "600", | ||
| 100 : | "align", "middle", | ||
| 101 : | "id", "flare_visualization", | ||
| 102 : | "quality", "high", | ||
| 103 : | "bgcolor", "#FFFFFF", | ||
| 104 : | "name", "flare_visualization", | ||
| 105 : | "allowScriptAccess","sameDomain", | ||
| 106 : | "type", "application/x-shockwave-flash", | ||
| 107 : | "pluginspage", "http://www.adobe.com/go/getflashplayer" | ||
| 108 : | ); | ||
| 109 : | } else if (hasRequestedVersion) { | ||
| 110 : | // if we've detected an acceptable version | ||
| 111 : | // embed the Flash Content SWF when all tests are passed | ||
| 112 : | AC_FL_RunContent( | ||
| 113 : | "flashVars", "<?php echo $flashvarstext; ?>", | ||
| 114 : | |||
| 115 : | "src", "flare_visualization", | ||
| 116 : | "width", "800", | ||
| 117 : | "height", "600", | ||
| 118 : | "align", "middle", | ||
| 119 : | "id", "flare_visualization", | ||
| 120 : | "quality", "high", | ||
| 121 : | "bgcolor", "#FFFFFF", | ||
| 122 : | "name", "flare_visualization", | ||
| 123 : | "allowScriptAccess","sameDomain", | ||
| 124 : | "type", "application/x-shockwave-flash", | ||
| 125 : | "pluginspage", "http://www.adobe.com/go/getflashplayer" | ||
| 126 : | ); | ||
| 127 : | } else { // flash is too old or we can't detect the plugin | ||
| 128 : | var alternateContent = 'Alternate HTML content should be placed here. ' | ||
| 129 : | + 'This content requires the Adobe Flash Player. ' | ||
| 130 : | + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>'; | ||
| 131 : | document.write(alternateContent); // insert non-flash content | ||
| 132 : | } | ||
| 133 : | // --> | ||
| 134 : | </script> | ||
| 135 : | <noscript> | ||
| 136 : | <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" | ||
| 137 : | id="flare_visualization" width="800" height="600" | ||
| 138 : | codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"> | ||
| 139 : | <param name="flashVars" value="<?php echo $flashvarstext;?>" /> | ||
| 140 : | |||
| 141 : | <param name="movie" value="flare_visualization.swf" /> | ||
| 142 : | <param name="quality" value="high" /> | ||
| 143 : | <param name="bgcolor" value="#FFFFFF" /> | ||
| 144 : | <param name="allowScriptAccess" value="sameDomain" /> | ||
| 145 : | <embed src="flare_visualization.swf" quality="high" bgcolor="#ffffff" | ||
| 146 : | flashVars="<?php echo $flashvarstext; ?>" | ||
| 147 : | width="800" height="600" name="flare_visualization" align="middle" | ||
| 148 : | play="true" | ||
| 149 : | loop="false" | ||
| 150 : | quality="high" | ||
| 151 : | allowScriptAccess="sameDomain" | ||
| 152 : | type="application/x-shockwave-flash" | ||
| 153 : | pluginspage="http://www.adobe.com/go/getflashplayer"> | ||
| 154 : | </embed> | ||
| 155 : | </object> | ||
| 156 : | </noscript> | ||
| 157 : | </div> |
| Moodle CVS Admin | ViewVC Help |
| Powered by ViewVC 1.0.7 |