Bend over for XHTML 1.0 Strict ... MDL-8049
Removed Javascript language attribute tags and added CDATA
This commit is contained in:
@@ -42,14 +42,14 @@
|
||||
$file = $CFG->dirroot . '/'.$CFG->admin.'/xmldb/actions/' . $action . '/' . $action . '.js';
|
||||
$wwwfile = $CFG->wwwroot . '/'.$CFG->admin.'/xmldb/actions/' . $action . '/' . $action . '.js';
|
||||
if (file_exists($file) && is_readable($file)) {
|
||||
echo '<script language="JavaScript" type="text/javascript" src="' . $wwwfile . '"></script>' . "\n";
|
||||
echo '<script type="text/javascript" src="' . $wwwfile . '"></script>' . "\n";
|
||||
} else {
|
||||
/// Try to load the postaction javascript if exists
|
||||
if ($postaction) {
|
||||
$file = $CFG->dirroot . '/'.$CFG->admin.'/xmldb/actions/' . $postaction . '/' . $postaction . '.js';
|
||||
$wwwfile = $CFG->wwwroot . '/'.$CFG->admin.'/xmldb/actions/' . $postaction . '/' . $postaction . '.js';
|
||||
if (file_exists($file) && is_readable($file)) {
|
||||
echo '<script language="JavaScript" type="text/javascript" src="' . $wwwfile . '"></script>' . "\n";
|
||||
echo '<script type="text/javascript" src="' . $wwwfile . '"></script>' . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
?>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function selectItemInMenuByName(formId, menuName, selectIndex ) {
|
||||
myForm = document.getElementById(formId)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
?>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function selectItemInMenuByName(formId, menuName, selectIndex ) {
|
||||
myForm = document.getElementById(formId)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php // $Id$
|
||||
|
||||
class block_loancalc extends block_base {
|
||||
|
||||
@@ -14,7 +14,7 @@ class block_loancalc extends block_base {
|
||||
$calc = $CFG->pixpath.'/i/calc.gif';
|
||||
|
||||
$this->content->text = '
|
||||
<script language="JavaScript">
|
||||
<script type="text/javascript">
|
||||
<![CDATA[
|
||||
function Next()
|
||||
{
|
||||
@@ -203,4 +203,4 @@ function comp(v) { // general entry point for all cases
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php // $Id$
|
||||
require_once('../config.php');
|
||||
|
||||
/// main switch for form processing to perform, add/delete etc
|
||||
@@ -56,7 +56,7 @@ switch ($action) {
|
||||
}
|
||||
|
||||
/// Write newly added tags back into window opener.
|
||||
echo '<script language="JavaScript" type="text/javascript">
|
||||
echo '<script type="text/javascript">
|
||||
var o = opener.document.createElement("option");
|
||||
o.innerHTML = "<option>'.$tag->text.'</option>";
|
||||
o.value = '.$tagid.';
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<input type="hidden" name="cal_y" value="" />
|
||||
<input type="hidden" name="username" value="<?php echo $username; ?>" />
|
||||
<input type="hidden" name="authtoken" value="<?php echo $authtoken; ?>" />
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function generate_url() {
|
||||
if (document.getElementById("pw_course").checked) {
|
||||
|
||||
+6
-6
@@ -80,25 +80,25 @@
|
||||
$chooseparts = explode('.', $choose);
|
||||
if (count($chooseparts)==2){
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function set_value(txt) {
|
||||
opener.document.forms['<?php echo $chooseparts[0]."'].".$chooseparts[1] ?>.value = txt;
|
||||
window.close();
|
||||
}
|
||||
-->
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<?php
|
||||
} elseif (count($chooseparts)==1){
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function set_value(txt) {
|
||||
opener.document.getElementById('<?php echo $chooseparts[0] ?>').value = txt;
|
||||
window.close();
|
||||
}
|
||||
-->
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!-- Begin
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
<?php
|
||||
// javascript objects for excluded students
|
||||
@@ -169,10 +169,10 @@ function updateMembers(selectgrade_item) {
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<script language="JavaScript">
|
||||
<script type="text/javascript">
|
||||
<!-- Begin
|
||||
<?php
|
||||
echo 'updateMembers('.$selectedgrade_item.');';
|
||||
?>
|
||||
// end hiding script -->
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
@@ -234,8 +234,8 @@ class htmlarea extends editorObject {
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
echo '<script language="javascript" type="text/javascript" defer="defer">'."\n";
|
||||
echo '<!--'."\n";
|
||||
echo '<script type="text/javascript" defer="defer">'."\n";
|
||||
echo '//<![CDATA['."\n";
|
||||
echo ' var config = new HTMLArea.Config();'."\n";
|
||||
|
||||
foreach ( $conf as $key => $value ) {
|
||||
@@ -298,7 +298,7 @@ class htmlarea extends editorObject {
|
||||
}
|
||||
|
||||
echo ' HTMLArea.replaceAll(config);'."\n";
|
||||
echo '// done hiding -->'."\n";
|
||||
echo '//]]>'."\n";
|
||||
echo '</script>'."\n";
|
||||
|
||||
}
|
||||
@@ -340,15 +340,15 @@ class htmlarea extends editorObject {
|
||||
*/
|
||||
function print_speller_code ($usehtmleditor=false) {
|
||||
|
||||
if(!$usehtmleditor) {
|
||||
echo "\n".'<script language="javascript" type="text/javascript">'."\n";
|
||||
echo "\n".'<script type="text/javascript">'."\n";
|
||||
echo '//<![CDATA['."\n";
|
||||
if (!$usehtmleditor) {
|
||||
echo 'function openSpellChecker() {'."\n";
|
||||
echo "\tvar speller = new spellChecker();\n";
|
||||
echo "\tspeller.popUpUrl = \"" . $this->cfg->wwwroot ."/lib/speller/spellchecker.html\";\n";
|
||||
echo "\tspeller.spellCheckScript = \"". $this->cfg->wwwroot ."/lib/speller/server-scripts/spellchecker.php\";\n";
|
||||
echo "\tspeller.spellCheckAll();\n";
|
||||
echo '}'."\n";
|
||||
echo '</script>'."\n";
|
||||
} else {
|
||||
echo "\n\tfunction spellClickHandler(editor, buttonId) {\n";
|
||||
echo "\t\teditor._textArea.value = editor.getHTML();\n";
|
||||
@@ -360,7 +360,9 @@ class htmlarea extends editorObject {
|
||||
echo "\t\tspeller.openChecker();\n\t";
|
||||
echo '}'."\n";
|
||||
}
|
||||
echo '//]]>'."\n";
|
||||
echo '</script>'."\n";
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>Create anchor</title>
|
||||
<script language="javascript" type="text/javascript" src="popup.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript" src="popup.js"></script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function Init() {
|
||||
__dlg_init();
|
||||
}
|
||||
@@ -35,7 +35,7 @@ function onCancel() {
|
||||
__dlg_close(null);
|
||||
return false;
|
||||
};
|
||||
// -->
|
||||
//]]>
|
||||
</script>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
@@ -46,7 +46,7 @@ button { width: 70px; }
|
||||
border-bottom: 1px solid black; letter-spacing: 2px;
|
||||
}
|
||||
.note { font-size: 8pt; }
|
||||
// -->
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -67,8 +67,8 @@ form { padding: 0px; margin: 0px; }
|
||||
font-size: small; }
|
||||
// -->
|
||||
</style>
|
||||
<script language="javascript" type="text/javascript" src="popup.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript" src="popup.js"></script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function Init() {
|
||||
__dlg_init();
|
||||
@@ -122,7 +122,7 @@ function cancel() {
|
||||
<tr valign="top">
|
||||
<td>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
document.write(tab(7,32))
|
||||
//]]>
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title><?php print_string('insertsmile', 'editor'); ?></title>
|
||||
<link rel="stylesheet" href="dialog.css" type="text/css" />
|
||||
<script language="javascript" type="text/javascript" src="popup.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript" src="popup.js"></script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function Init() {
|
||||
__dlg_init();
|
||||
}
|
||||
@@ -65,7 +65,7 @@ function cancel() {
|
||||
__dlg_close(null);
|
||||
return false;
|
||||
};
|
||||
// -->
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
<body onload="Init()">
|
||||
@@ -122,4 +122,4 @@ function cancel() {
|
||||
<button type="button" onclick="return cancel();"><?php print_string('close', 'editor'); ?></button></td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title><?php print_string("insertimage","editor");?></title>
|
||||
<script language="javascript" type="text/javascript" src="popup.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript" src="popup.js"></script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var preview_window = null;
|
||||
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title><?php print_string("insertimage","editor");?></title>
|
||||
|
||||
<script language="javascript" type="text/javascript" src="popup.js"></script>
|
||||
<script type="text/javascript" src="popup.js"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var preview_window = null;
|
||||
|
||||
function Init() {
|
||||
@@ -116,6 +117,7 @@ function onPreview() {
|
||||
win.focus();
|
||||
return false;
|
||||
};
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title><?php print_string("inserttable","editor");?></title>
|
||||
<script language="javascript" type="text/javascript" src="popup.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript" src="popup.js"></script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
function Init() {
|
||||
__dlg_init();
|
||||
@@ -44,7 +45,7 @@ function onCancel() {
|
||||
__dlg_close(null);
|
||||
return false;
|
||||
};
|
||||
|
||||
//[[>
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
@@ -13,12 +13,14 @@
|
||||
<head>
|
||||
<title><?php print_string("insertlink","editor");?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
function onCancel() {
|
||||
window.close();
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
function checkvalue(elm,formname) {
|
||||
var el = document.getElementById(elm);
|
||||
if(!el.value) {
|
||||
@@ -42,7 +44,7 @@ function submit_form(dothis) {
|
||||
window.fbrowser.document.dirform.submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
<style type="text/css">
|
||||
html, body { background-color: rgb(212,208,200); }
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title><?php print_string("insertlink","editor");?></title>
|
||||
<script language="javascript" type="text/javascript" src="popup.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript" src="popup.js"></script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function onTargetChanged() {
|
||||
var f = document.getElementById("f_other_target");
|
||||
if (this.value == "_other") {
|
||||
@@ -120,6 +121,7 @@ function seturl() {
|
||||
f_url.value = txt;
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<style type="text/css">
|
||||
html, body {
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title><?php print_string("searchandreplace","editor");?></title>
|
||||
<script language="javascript" type="text/javascript" src="popup.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript" src="popup.js"></script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function _CloseOnEsc(ev) {
|
||||
ev || (ev = window.event) || (ev = editor._iframe.contentWindow.event);
|
||||
if (ev.keyCode == 27) {
|
||||
@@ -65,7 +65,7 @@ function onCancel() {
|
||||
return false;
|
||||
};
|
||||
|
||||
-->
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
@@ -244,8 +244,8 @@ class tinymce extends editorObject {
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
echo '<script language="javascript" type="text/javascript">'."\n";
|
||||
echo '<!--'."\n";
|
||||
echo '<script type="text/javascript">'."\n";
|
||||
echo '//<![CDATA['."\n";
|
||||
echo ' tinyMCE.init({'."\n";
|
||||
|
||||
if ( !empty($conf) ) {
|
||||
@@ -278,7 +278,7 @@ class tinymce extends editorObject {
|
||||
if ( $this->printdialogs ) {
|
||||
$this->__dialogs();
|
||||
}
|
||||
echo '// done hiding -->'."\n";
|
||||
echo '//]]>'."\n";
|
||||
echo '</script>'."\n";
|
||||
|
||||
}
|
||||
@@ -378,4 +378,4 @@ class tinymce extends editorObject {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
+1
-1
@@ -1126,7 +1126,7 @@ function validate_' . $this->_formName . '(frm) {
|
||||
}
|
||||
|
||||
function getLockOptionEndScript(){
|
||||
$js = '<script type="text/javascript" language="javascript">'."\n";
|
||||
$js = '<script type="text/javascript">'."\n";
|
||||
$js .= '//<![CDATA['."\n";
|
||||
$js .= "var ".$this->_formName."items= {";
|
||||
foreach ($this->_dependencies as $dependentOn => $elements){
|
||||
|
||||
+39
-305
@@ -2611,11 +2611,11 @@ function get_complete_user_data($field, $value) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($groups = get_records('groups_members', 'userid', $user->id)) {
|
||||
foreach ($groups as $groupmember) {
|
||||
$courseid = get_field('groups', 'courseid', 'id', $groupmember->groupid);
|
||||
if ($groupids = groups_get_all_groups_for_user($user->id)) { //TODO:check.
|
||||
foreach ($groupids as $groupid) {
|
||||
$courseid = groups_get_course($groupid);
|
||||
//change this to 2D array so we can put multiple groups in a course
|
||||
$user->groupmember[$courseid][] = $groupmember->groupid;
|
||||
$user->groupmember[$courseid][] = $groupid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2791,25 +2791,26 @@ function remove_course_contents($courseid, $showfeedback=true) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Delete any groups
|
||||
if ($groups = get_records('groups', 'courseid', $course->id)) {
|
||||
if (delete_records('groups', 'courseid', $course->id)) {
|
||||
if ($showfeedback) {
|
||||
notify($strdeleted .' groups');
|
||||
}
|
||||
foreach ($groups as $group) {
|
||||
if (delete_records('groups_members', 'groupid', $group->id)) {
|
||||
if ($showfeedback) {
|
||||
notify($strdeleted .' groups_members');
|
||||
}
|
||||
} else {
|
||||
$result = false;
|
||||
/// Delete any groups, removing members first. TODO: check.
|
||||
if ($groupids = groups_get_groups($course->id)) {
|
||||
foreach ($groupids as $groupid) {
|
||||
if (groups_remove_all_group_members($groupid)) {
|
||||
if ($showfeedback) {
|
||||
notify($strdeleted .' groups_members');
|
||||
}
|
||||
/// Delete any associated context for this group
|
||||
delete_context(CONTEXT_GROUP, $group->id);
|
||||
} else {
|
||||
$result = false;
|
||||
}
|
||||
/// Delete any associated context for this group ??
|
||||
delete_context(CONTEXT_GROUP, $group->id);
|
||||
|
||||
if (groups_delete_group($groupid)) {
|
||||
if ($showfeedback) {
|
||||
notify($strdeleted .' groups');
|
||||
}
|
||||
} else {
|
||||
$result = false;
|
||||
}
|
||||
} else {
|
||||
$result = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2926,10 +2927,10 @@ function reset_course_userdata($data, $showfeedback=true) {
|
||||
notify($strdeleted .' '.get_string('students'), 'notifysuccess');
|
||||
}
|
||||
|
||||
/// Delete group members (but keep the groups)
|
||||
if ($groups = get_records('groups', 'courseid', $data->courseid)) {
|
||||
foreach ($groups as $group) {
|
||||
if (delete_records('groups_members', 'groupid', $group->id)) {
|
||||
/// Delete group members (but keep the groups) TODO:check.
|
||||
if ($groupids = groups_get_groups($data->courseid)) {
|
||||
foreach ($groupids as $groupid) {
|
||||
if (groups_remove_all_group_members($groupid)) {
|
||||
if ($showfeedback) {
|
||||
notify($strdeleted .' groups_members', 'notifysuccess');
|
||||
}
|
||||
@@ -2951,9 +2952,9 @@ function reset_course_userdata($data, $showfeedback=true) {
|
||||
}
|
||||
|
||||
if (!empty($data->reset_groups)) {
|
||||
if ($groups = get_records('groups', 'courseid', $data->courseid)) {
|
||||
foreach ($groups as $group) {
|
||||
if (delete_records('groups', 'id', $group->id)) {
|
||||
if ($groupids = groups_get_groups($data->courseid)) {
|
||||
foreach ($groupids as $groupid) {
|
||||
if (groups_delete_group($groupid)) {
|
||||
if ($showfeedback) {
|
||||
notify($strdeleted .' groups', 'notifysuccess');
|
||||
}
|
||||
@@ -2992,284 +2993,16 @@ function reset_course_userdata($data, $showfeedback=true) {
|
||||
}
|
||||
|
||||
|
||||
/// GROUPS /////////////////////////////////////////////////////////
|
||||
require_once($CFG->dirroot.'/group/lib.php');
|
||||
/*TODO: functions moved to /group/lib/legacylib.php
|
||||
|
||||
ismember
|
||||
add_user_to_group
|
||||
mygroupid
|
||||
groupmode
|
||||
set_current_group
|
||||
... */
|
||||
|
||||
/**
|
||||
* Determines if the user a member of the given group
|
||||
*
|
||||
* @uses $USER
|
||||
* @param int $groupid The group to check the membership of
|
||||
* @param int $userid The user to check against the group
|
||||
* @return bool
|
||||
*/
|
||||
function ismember($groupid, $userid=0) {
|
||||
global $USER;
|
||||
|
||||
if (!$groupid) { // No point doing further checks
|
||||
return false;
|
||||
}
|
||||
//if groupid is supplied in array format
|
||||
if (!$userid) {
|
||||
if (empty($USER->groupmember)) {
|
||||
return false;
|
||||
}
|
||||
//changed too for multiple groups
|
||||
foreach ($USER->groupmember as $courseid => $mgroupid) {
|
||||
//need to loop one more time...
|
||||
if (is_array($mgroupid)) {
|
||||
foreach ($mgroupid as $index => $mygroupid) {
|
||||
if ($mygroupid == $groupid) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else if ($mgroupid == $groupid) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_array($groupid)){
|
||||
foreach ($groupid as $index => $val){
|
||||
if (record_exists('groups_members', 'groupid', $val, 'userid', $userid)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
return record_exists('groups_members', 'groupid', $groupid, 'userid', $userid);
|
||||
}
|
||||
return false;
|
||||
|
||||
//else group id is in single format
|
||||
|
||||
//return record_exists('groups_members', 'groupid', $groupid, 'userid', $userid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a user to a group, return true upon success or if user already a group member
|
||||
*
|
||||
* @param int $groupid The group id to add user to
|
||||
* @param int $userid The user id to add to the group
|
||||
* @return bool
|
||||
*/
|
||||
function add_user_to_group ($groupid, $userid) {
|
||||
if (ismember($groupid, $userid)) return true;
|
||||
$record->groupid = $groupid;
|
||||
$record->userid = $userid;
|
||||
$record->timeadded = time();
|
||||
return (insert_record('groups_members', $record) !== false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the group ID of the current user in the given course
|
||||
*
|
||||
* @uses $USER
|
||||
* @param int $courseid The course being examined - relates to id field in 'course' table.
|
||||
* @return int
|
||||
*/
|
||||
function mygroupid($courseid) {
|
||||
global $USER;
|
||||
if (empty($USER->groupmember[$courseid])) {
|
||||
return 0;
|
||||
} else {
|
||||
//this is an array of ids >.<
|
||||
return $USER->groupmember[$courseid];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* For a given course, and possibly course module, determine
|
||||
* what the current default groupmode is:
|
||||
* NOGROUPS, SEPARATEGROUPS or VISIBLEGROUPS
|
||||
*
|
||||
* @param course $course A {@link $COURSE} object
|
||||
* @param object $cm A course module object
|
||||
* @return int A group mode (NOGROUPS, SEPARATEGROUPS or VISIBLEGROUPS)
|
||||
*/
|
||||
function groupmode($course, $cm=null) {
|
||||
|
||||
if ($cm and !$course->groupmodeforce) {
|
||||
return $cm->groupmode;
|
||||
}
|
||||
return $course->groupmode;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the current group in the session variable
|
||||
*
|
||||
* @uses $SESSION
|
||||
* @param int $courseid The course being examined - relates to id field in 'course' table.
|
||||
* @param int $groupid The group being examined.
|
||||
* @return int Current group id which was set by this function
|
||||
*/
|
||||
function set_current_group($courseid, $groupid) {
|
||||
global $SESSION;
|
||||
|
||||
return $SESSION->currentgroup[$courseid] = $groupid;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the current group for the current user as an id or an object
|
||||
*
|
||||
* @uses $USER
|
||||
* @uses $SESSION
|
||||
* @param int $courseid The course being examined - relates to id field in 'course' table.
|
||||
* @param bool $full If true, the return value is a full record object. If false, just the id of the record.
|
||||
*/
|
||||
function get_current_group($courseid, $full=false) {
|
||||
global $SESSION, $USER;
|
||||
|
||||
if (!isset($SESSION->currentgroup[$courseid])) {
|
||||
if (empty($USER->groupmember[$courseid]) or has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_COURSE, $courseid))) {
|
||||
|
||||
return 0;
|
||||
} else {
|
||||
//trying to add a hack >.<, always first select the first one in list
|
||||
$SESSION->currentgroup[$courseid] = $USER->groupmember[$courseid][0];
|
||||
}
|
||||
}
|
||||
|
||||
if ($full) {
|
||||
return get_record('groups', 'id', $SESSION->currentgroup[$courseid]);
|
||||
} else {
|
||||
return $SESSION->currentgroup[$courseid];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A combination function to make it easier for modules
|
||||
* to set up groups.
|
||||
*
|
||||
* It will use a given "groupid" parameter and try to use
|
||||
* that to reset the current group for the user.
|
||||
*
|
||||
* @uses VISIBLEGROUPS
|
||||
* @param course $course A {@link $COURSE} object
|
||||
* @param int $groupmode Either NOGROUPS, SEPARATEGROUPS or VISIBLEGROUPS
|
||||
* @param int $groupid Will try to use this optional parameter to
|
||||
* reset the current group for the user
|
||||
* @return int|false Returns the current group id or false if error.
|
||||
*/
|
||||
function get_and_set_current_group($course, $groupmode, $groupid=-1) {
|
||||
|
||||
if (!$groupmode) { // Groups don't even apply
|
||||
return false;
|
||||
}
|
||||
|
||||
$currentgroupid = get_current_group($course->id);
|
||||
|
||||
if ($groupid < 0) { // No change was specified
|
||||
return $currentgroupid;
|
||||
}
|
||||
|
||||
if ($groupid) { // Try to change the current group to this groupid
|
||||
if ($group = get_record('groups', 'id', $groupid, 'courseid', $course->id)) { // Exists
|
||||
if (has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_COURSE, $course->id))) { // Sets current default group
|
||||
$currentgroupid = set_current_group($course->id, $group->id);
|
||||
|
||||
} else if ($groupmode == VISIBLEGROUPS) {
|
||||
// All groups are visible
|
||||
//if (ismember($group->id)){
|
||||
$currentgroupid = set_current_group($course->id, $group->id);//set this since he might post
|
||||
/*)}else {
|
||||
$currentgroupid = $group->id;*/
|
||||
} else if ($groupmode == SEPARATEGROUPS) { // student in separate groups switching
|
||||
if (ismember($group->id)){//check if is a member
|
||||
$currentgroupid = set_current_group($course->id, $group->id); //might need to set_current_group?
|
||||
}
|
||||
else {
|
||||
echo ($group->id);
|
||||
notify('you do not belong to this group!',error);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // When groupid = 0 it means show ALL groups
|
||||
//this is changed, non editting teacher needs access to group 0 as well, for viewing work in visible groups (need to set current group for multiple pages)
|
||||
if (has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_COURSE, $course->id)) AND ($groupmode == VISIBLEGROUPS)) { // Sets current default group
|
||||
$currentgroupid = set_current_group($course->id, 0);
|
||||
|
||||
} else if ($groupmode == VISIBLEGROUPS) { // All groups are visible
|
||||
$currentgroupid = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return $currentgroupid;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A big combination function to make it easier for modules
|
||||
* to set up groups.
|
||||
*
|
||||
* Terminates if the current user shouldn't be looking at this group
|
||||
* Otherwise returns the current group if there is one
|
||||
* Otherwise returns false if groups aren't relevant
|
||||
*
|
||||
* @uses SEPARATEGROUPS
|
||||
* @uses VISIBLEGROUPS
|
||||
* @param course $course A {@link $COURSE} object
|
||||
* @param int $groupmode Either NOGROUPS, SEPARATEGROUPS or VISIBLEGROUPS
|
||||
* @param string $urlroot ?
|
||||
* @return int|false
|
||||
*/
|
||||
function setup_and_print_groups($course, $groupmode, $urlroot) {
|
||||
|
||||
global $USER, $SESSION; //needs his id, need to hack his groups in session
|
||||
|
||||
$changegroup = optional_param('group', -1, PARAM_INT);
|
||||
|
||||
$currentgroup = get_and_set_current_group($course, $groupmode, $changegroup);
|
||||
if ($currentgroup === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($groupmode == SEPARATEGROUPS and !has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_COURSE, $course->id)) and !$currentgroup) {
|
||||
//we are in separate groups and the current group is group 0, as last set.
|
||||
//this can mean that either, this guy has no group
|
||||
//or, this guy just came from a visible all forum, and he left when he set his current group to 0 (show all)
|
||||
|
||||
//for the second situation, we need to perform the trick and get him a group.
|
||||
$courseid = $course->id;
|
||||
if (!empty($USER->groupmember[$courseid])){
|
||||
$currentgroup = get_and_set_current_group($course, $groupmode, $USER->groupmember[$courseid][0]);
|
||||
}
|
||||
else {//else he has no group in this course
|
||||
print_heading(get_string('notingroup'));
|
||||
print_footer($course);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if ($groupmode == VISIBLEGROUPS or ($groupmode and has_capability('moodle/site:accessallgroups', get_context_instance(CONTEXT_COURSE, $course->id)))) {
|
||||
if ($groups = get_records_menu('groups', 'courseid', $course->id, 'name ASC', 'id,name')) {
|
||||
echo '<div align="center">';
|
||||
print_group_menu($groups, $groupmode, $currentgroup, $urlroot);
|
||||
echo '</div>';
|
||||
}
|
||||
}//added code here to allow non-editting teacher to swap in-between his own groups
|
||||
//added code for students in separategrous to swtich groups
|
||||
else if ($groupmode == SEPARATEGROUPS and has_capability('moodle/course:view', get_context_instance(CONTEXT_COURSE, $course->id))) {
|
||||
$validgroups = array();
|
||||
//get all the groups this guy is in in this course
|
||||
if ($p = user_group($course->id,$USER->id)){
|
||||
//extract the name and id for the group
|
||||
foreach ($p as $index => $object){
|
||||
$validgroups[$object->id] = $object->name;
|
||||
}
|
||||
echo '<div align="center">';
|
||||
//print them in the menu
|
||||
print_group_menu($validgroups, $groupmode, $currentgroup, $urlroot,0);
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
return $currentgroup;
|
||||
}
|
||||
|
||||
function generate_email_processing_address($modid,$modargs) {
|
||||
global $CFG;
|
||||
@@ -6451,7 +6184,8 @@ function message_popup_window() {
|
||||
if (get_user_preferences('message_showmessagewindow', 1) == 1) {
|
||||
if (count_records_select('message', 'useridto = \''.$USER->id.'\' AND timecreated > \''.$USER->message_lastpopup.'\'')) {
|
||||
$USER->message_lastpopup = time();
|
||||
return '<script language="JavaScript" type="text/javascript">'."\n openpopup('/message/index.php', 'message', 'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500', 0);\n</script>";
|
||||
return '<script type="text/javascript">'."\n//<![CDATA[\n openpopup('/message/index.php', 'message',
|
||||
'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500', 0);\n//]]>\n</script>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -4779,8 +4779,8 @@ class wsdl extends nusoap_base {
|
||||
a:visited { color: #666666; font-weight: bold; }
|
||||
a:hover { color: cc3300; font-weight: bold; }
|
||||
</style>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
// POP-UP CAPTIONS...
|
||||
function lib_bwcheck(){ //Browsercheck (needed)
|
||||
this.ver=navigator.appVersion
|
||||
@@ -4823,7 +4823,7 @@ class wsdl extends nusoap_base {
|
||||
function popout(){ // Hides message
|
||||
if(oDesc) oDesc.css.visibility = "hidden"
|
||||
}
|
||||
//-->
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -195,8 +195,9 @@ function print_checker_results() {
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo $spellercss ?>" />
|
||||
<script language="javascript" src="<?php echo $word_win_src ?>"></script>
|
||||
<script language="javascript">
|
||||
<script type="text/javascript" src="<?php echo $word_win_src ?>"></script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var suggs = new Array();
|
||||
var words = new Array();
|
||||
var textinputs = new Array();
|
||||
@@ -228,15 +229,16 @@ function init_spell() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onLoad="init_spell();">
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
wordWindowObj.writeBody();
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
+6
-4
@@ -3720,7 +3720,7 @@ function use_html_editor($name='', $editorhidebuttons='', $id='') {
|
||||
if ($id === '') {
|
||||
$id = 'edit-'.$name;
|
||||
}
|
||||
echo "\n".'<script language="javascript" type="text/javascript" defer="defer">'."\n";
|
||||
echo "\n".'<script type="text/javascript" defer="defer">'."\n";
|
||||
echo '//<![CDATA['."\n";
|
||||
echo "$editor = new HTMLArea('$id');\n";
|
||||
echo "var config = $editor.config;\n";
|
||||
@@ -5186,17 +5186,17 @@ function print_speller_code ($usehtmleditor=false, $return=false) {
|
||||
global $CFG;
|
||||
$str = '';
|
||||
|
||||
$str .= "\n".'<script type="text/javascript">'."\n";
|
||||
$str .= '//<![CDATA['."\n";
|
||||
if(!$usehtmleditor) {
|
||||
$str .= "\n".'<script language="javascript" type="text/javascript">'."\n";
|
||||
$str .= 'function openSpellChecker() {'."\n";
|
||||
$str .= "\tvar speller = new spellChecker();\n";
|
||||
$str .= "\tspeller.popUpUrl = \"" . $CFG->wwwroot ."/lib/speller/spellchecker.html\";\n";
|
||||
$str .= "\tspeller.spellCheckScript = \"". $CFG->wwwroot ."/lib/speller/server-scripts/spellchecker.php\";\n";
|
||||
$str .= "\tspeller.spellCheckAll();\n";
|
||||
$str .= '}'."\n";
|
||||
$str .= '</script>'."\n";
|
||||
} else {
|
||||
$str .= "\nfunction spellClickHandler(editor, buttonId) {\n";
|
||||
$str .= "function spellClickHandler(editor, buttonId) {\n";
|
||||
$str .= "\teditor._textArea.value = editor.getHTML();\n";
|
||||
$str .= "\tvar speller = new spellChecker( editor._textArea );\n";
|
||||
$str .= "\tspeller.popUpUrl = \"" . $CFG->wwwroot ."/lib/speller/spellchecker.html\";\n";
|
||||
@@ -5206,6 +5206,8 @@ function print_speller_code ($usehtmleditor=false, $return=false) {
|
||||
$str .= "\tspeller.openChecker();\n";
|
||||
$str .= '}'."\n";
|
||||
}
|
||||
$str .= '//]]>'."\n";
|
||||
$str .= '</script>'."\n";
|
||||
if ($return) {
|
||||
return $str;
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
/// Popup a window if required and quit (usually from external links).
|
||||
if ($popup) {
|
||||
print_header();
|
||||
echo '<script language="JavaScript" type="text/javascript">'."\n openpopup('/message/index.php', 'message', 'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500', 0);\n</script>";
|
||||
echo '<script type="text/javascript">'."\n//<![CDATA[\n openpopup('/message/index.php', 'message', 'menubar=0,location=0,scrollbars,status,resizable,width=400,height=500', 0);\n//]]>\n</script>";
|
||||
redirect("$CFG->wwwroot/");
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -30,9 +30,11 @@
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript" language="javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var dueitems = ['dueday','duemonth','dueyear','duehour', 'dueminute', 'preventlate'];
|
||||
var availableitems = ['availableday','availablemonth','availableyear','availablehour', 'availableminute'];
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<form name="form" method="post" action="../mod/assignment/details.php">
|
||||
|
||||
+3
-3
@@ -247,8 +247,8 @@ class ChatDaemon {
|
||||
|
||||
ob_start();
|
||||
echo '<html><head>';
|
||||
echo '<script language="JavaScript">';
|
||||
echo "<!-- //hide\n";
|
||||
echo '<script text="text/javascript">';
|
||||
echo "//<![CDATA[\n";
|
||||
|
||||
echo 'function openpopup(url,name,options,fullscreen) {';
|
||||
echo 'fullurl = "'.$CFG->wwwroot.'" + url;';
|
||||
@@ -259,7 +259,7 @@ class ChatDaemon {
|
||||
echo '}';
|
||||
echo 'windowobj.focus();';
|
||||
echo 'return false;';
|
||||
echo "}\n-->\n";
|
||||
echo "}\n//]]>\n";
|
||||
echo '</script></head><body style="font-face: serif;" bgcolor="#FFFFFF">';
|
||||
|
||||
echo '<table style="width: 100%;"><tbody>';
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var waitFlag = false;
|
||||
function empty_field_and_submit() {
|
||||
|
||||
@@ -60,13 +60,13 @@
|
||||
if ($chatuser->version == 'header_js') {
|
||||
/// force msg referesh ASAP
|
||||
if ($CFG->chat_normal_updatemode == 'jsupdated') { // See bug MDL-6791
|
||||
echo '<script language="Javascript" type="text/javascript">'.
|
||||
echo '<script type="text/javascript">'.
|
||||
"//<![CDATA[ \n".
|
||||
' parent.input.enableForm();'.
|
||||
"//]]> \n".
|
||||
'</script>';
|
||||
} else {
|
||||
echo '<script language="Javascript" type="text/javascript">'.
|
||||
echo '<script type="text/javascript">'.
|
||||
"//<![CDATA[ \n".
|
||||
' parent.jsupdate.location.href = parent.jsupdate.document.anchors[0].href;'.
|
||||
' parent.input.enableForm();'.
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
$num = 0;
|
||||
}
|
||||
|
||||
print '<script language="Javascript" type="text/javascript">' . "\n";
|
||||
print '<script type="text/javascript">' . "\n";
|
||||
print "//<![CDATA[\n\n";
|
||||
|
||||
$chat_newrow = ($chat_lastrow + $num) % 2;
|
||||
@@ -211,7 +211,7 @@
|
||||
|
||||
// here & should be written & :-D
|
||||
$refreshurl = "{$CFG->wwwroot}/mod/chat/gui_header_js/jsupdated.php?chat_sid=$chat_sid&chat_lasttime=$chat_lasttime&chat_lastrow=$chat_newrow&chat_lastid=$chat_lastid";
|
||||
print '<script language="Javascript" type="text/javascript">' . "\n";
|
||||
print '<script type="text/javascript">' . "\n";
|
||||
print "//<![CDATA[ \n\n";
|
||||
print "location.href = '$refreshurl';\n";
|
||||
print "//]]>\n";
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var timer = null
|
||||
var f = 1; //seconds
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
$bodytag .= '" ';
|
||||
|
||||
// Javascript to insert the field tags into the textarea.
|
||||
$meta = '<script language="JavaScript" type="text/javascript">'."\n";
|
||||
$meta = '<script type="text/javascript">'."\n";
|
||||
$meta .= '//<![CDATA['."\n";
|
||||
$meta .= 'function insert_field_tags(selectlist) {';
|
||||
$meta .= ' if (typeof(currEditor) != \'undefined\' && currEditor._editMode == \'wysiwyg\') {';
|
||||
|
||||
+4
-4
@@ -1674,7 +1674,7 @@ class hotpot_xml_quiz extends hotpot_xml_tree {
|
||||
$this->html = preg_replace($search, '', $this->html);
|
||||
}
|
||||
function insert_script($src=HOTPOT_JS) {
|
||||
$script = '<script src="'.$src.'" type="text/javascript" language="javascript"></script>'."\n";
|
||||
$script = '<script src="'.$src.'" type="text/javascript"></script>'."\n";
|
||||
$this->html = preg_replace('|</head>|i', $script.'</head>', $this->html, 1);
|
||||
}
|
||||
function insert_submission_form($attemptid, $startblock, $endblock, $keep_contents=false) {
|
||||
@@ -2365,8 +2365,8 @@ function hotpot_print_show_links($course, $location, $reference, $actions='', $s
|
||||
}
|
||||
$strenterafilename = get_string('enterafilename', 'hotpot');
|
||||
$html = <<<END_OF_SCRIPT
|
||||
<script type="text/javascript" language="javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function setLink(lnk) {
|
||||
var form = document.forms['form'];
|
||||
return setLinkAttribute(lnk, 'reference', form) && setLinkAttribute(lnk, 'location', form);
|
||||
@@ -2424,7 +2424,7 @@ function hotpot_print_show_links($course, $location, $reference, $actions='', $s
|
||||
var i = s.lastIndexOf('/');
|
||||
return s.substring(0, i);
|
||||
}
|
||||
//-->
|
||||
//]]>
|
||||
</script>
|
||||
END_OF_SCRIPT;
|
||||
|
||||
|
||||
+3
-3
@@ -20,8 +20,8 @@ $text_source_options = array(
|
||||
HOTPOT_TEXTSOURCE_SPECIFIC => get_string("textsourcespecific", "hotpot")
|
||||
);
|
||||
?>
|
||||
<script type="text/javascript" language="javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var nameoffvalues = new Array(0,1,2);
|
||||
var namelockitems = new Array('name');
|
||||
|
||||
@@ -57,7 +57,7 @@ $text_source_options = array(
|
||||
}
|
||||
return(true);
|
||||
}
|
||||
//-->
|
||||
//]]>
|
||||
</script>
|
||||
<center>
|
||||
<form name="form" method="post" action="mod.php">
|
||||
|
||||
@@ -397,8 +397,8 @@ function hotpot_showhide_button($id) {
|
||||
$pref = '1';
|
||||
$text = ($pref=='1' ? $hide : $show);
|
||||
return <<<SHOWHIDE_BUTTON
|
||||
<script language="javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function showhide (id, toggle) {
|
||||
var show = true;
|
||||
obj = document.getElementById(id+'pref');
|
||||
@@ -428,19 +428,19 @@ return <<<SHOWHIDE_BUTTON
|
||||
html += '</form>';
|
||||
document.writeln(html);
|
||||
}
|
||||
//-->
|
||||
//]]>
|
||||
</script>
|
||||
SHOWHIDE_BUTTON
|
||||
;
|
||||
}
|
||||
function hotpot_showhide_set($id) {
|
||||
return <<<SHOWHIDE_SET
|
||||
<script language="javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
if (showhide_allowed) {
|
||||
showhide('$id');
|
||||
}
|
||||
//-->
|
||||
//]]>
|
||||
</script>
|
||||
SHOWHIDE_SET
|
||||
;
|
||||
|
||||
+3
-3
@@ -22,8 +22,8 @@
|
||||
print_header($title, $title);
|
||||
hotpot_print_show_links($params->course, $params->location, $params->reference);
|
||||
?>
|
||||
<script type="text/javascript" language="javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
// http://www.krikkit.net/howto_javascript_copy_clipboard.html
|
||||
function copy_contents(id) {
|
||||
if (id==null) {
|
||||
@@ -39,7 +39,7 @@
|
||||
}
|
||||
}
|
||||
document.write('<span class="helplink"> <a href="javascript:copy_contents()"><?php print_string('copytoclipboard', 'hotpot') ?></A></span>');
|
||||
-->
|
||||
//]]>
|
||||
</script>
|
||||
<?php
|
||||
print_simple_box_start("center", "96%");
|
||||
|
||||
+2
-2
@@ -255,7 +255,7 @@
|
||||
foreach ($feedback as $i=>$str) {
|
||||
$js .= 'FEEDBACK['.$i."] = $str;\n";
|
||||
}
|
||||
$js = '<script type="text/javascript" language="javascript">'."\n//<![CDATA[\n"."FEEDBACK = new Array();\n".$js."//]]>\n</script>\n";
|
||||
$js = '<script type="text/javascript">'."\n//<![CDATA[\n"."FEEDBACK = new Array();\n".$js."//]]>\n</script>\n";
|
||||
$hp->html = preg_replace('|</head>|i', "$js</head>", $hp->html, 1);
|
||||
}
|
||||
// insert hot-potatoes.js
|
||||
@@ -411,7 +411,7 @@
|
||||
default:
|
||||
$iframe_id = 'hotpot_iframe';
|
||||
$body_tags = " onload=\"set_iframe_height('$iframe_id')\"";
|
||||
$iframe_js = '<script src="iframe.js" type="text/javascript" language="javascript"></script>'."\n";
|
||||
$iframe_js = '<script src="iframe.js" type="text/javascript"></script>'."\n";
|
||||
print_header(
|
||||
$title, $heading, $navigation,
|
||||
"", $head.$styles.$scripts.$iframe_js, true, $button,
|
||||
|
||||
+3
-3
@@ -106,8 +106,8 @@ print_textarea($usehtmleditor, 20, 50, 680, 400, "introduction", $form->introduc
|
||||
|
||||
</form>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
function validate(){
|
||||
workspaceObj = document.getElementById("workspace");
|
||||
@@ -773,5 +773,5 @@ function DOL_selectChildOptions(obj,usePreselected) {
|
||||
}
|
||||
|
||||
refreshLists();//refresh the lists when form is displayed.
|
||||
-->
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
@@ -470,13 +470,13 @@
|
||||
if($quiz->timelimit > 0) {
|
||||
// Make sure javascript is enabled for time limited quizzes
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
document.write("<form name=\"responseform\" id=\"responseform\" method=\"post\" action=\"attempt.php\" autocomplete=\"off\">\n");
|
||||
// -->
|
||||
//]]>
|
||||
</script>
|
||||
<noscript>
|
||||
<center><p><strong><?php print_string('noscript', 'quiz'); ?></strong></p></center>
|
||||
<?php print_heading(get_string('noscript', 'quiz')); ?>
|
||||
</noscript>
|
||||
<?php
|
||||
} else {
|
||||
@@ -490,7 +490,8 @@
|
||||
$numpages = quiz_number_of_pages($attempt->layout);
|
||||
if ($numpages > 1) {
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function navigate(page) {
|
||||
var ourForm = document.forms['responseform'];
|
||||
ourForm.page.value=page;
|
||||
@@ -499,6 +500,7 @@
|
||||
}
|
||||
ourForm.submit();
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<?php
|
||||
echo '<input type="hidden" id="page" name="page" value="'.$page."\" />\n";
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
if (!empty($popup)) {
|
||||
?>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
document.write('<input type="button" value="<?php print_string('closewindow') ?>" '+
|
||||
'onclick="javascript: window.opener.location.href=\'view.php?id=<?php echo $cm->id ?>\'; '+
|
||||
'window.close();" />');
|
||||
// -->
|
||||
//]]>
|
||||
</script>
|
||||
<noscript>
|
||||
<?php print_string('closewindow'); ?>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php // $Id$
|
||||
require_once($CFG->dirroot . '/mod/quiz/locallib.php');
|
||||
|
||||
if (!isset($form->timeopen)) {
|
||||
@@ -81,8 +81,10 @@
|
||||
}
|
||||
?>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var timelimititems = ['timelimit'];
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<form method="post" action="module.php" name="form">
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
|
||||
?>
|
||||
|
||||
<script language="javascript">
|
||||
<!--
|
||||
<script text="text/javascript">
|
||||
//<![CDATA[
|
||||
/// This Javascript clock provides a little countdown in the title bar
|
||||
|
||||
var timerID = null;
|
||||
@@ -63,5 +63,5 @@ function showtime() {
|
||||
document.onLoad = startclock();
|
||||
|
||||
|
||||
// -- End of JavaScript code -------------- -->
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
|
||||
?>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var timesup = "<?php print_string("timesup","quiz");?>";
|
||||
var quizclose = <?php echo ($quiz->timeclose - time()) - $timerstartvalue; ?>; // in seconds
|
||||
var quizTimerValue = <?php echo $timerstartvalue; ?>; // in seconds
|
||||
@@ -18,9 +18,9 @@ var ec_page_start = new Date().getTime();
|
||||
// @EC PF : client time when quiz should end
|
||||
var ec_quiz_finish = ec_page_start + <?php echo ($timerstartvalue * 1000); ?>;
|
||||
|
||||
// -->
|
||||
//]]>
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript" src="timer.js"></script>
|
||||
<script type="text/javascript" src="timer.js"></script>
|
||||
<div id="timer">
|
||||
<!--EDIT BELOW CODE TO YOUR OWN MENU-->
|
||||
<table class="generalbox" border="0" cellpadding="0" cellspacing="0" width="150">
|
||||
@@ -43,8 +43,8 @@ var ec_quiz_finish = ec_page_start + <?php echo ($timerstartvalue * 1000); ?>;
|
||||
</table>
|
||||
<!--END OF EDIT-->
|
||||
</div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
var timerbox = xGetElementById('timer');
|
||||
var theTimer = xGetElementById('QuizTimer');
|
||||
@@ -54,5 +54,5 @@ var old = theTop;
|
||||
movecounter(timerbox);
|
||||
|
||||
document.onload = countdown_clock(theTimer);
|
||||
// -->
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<style media="print">body {display:none}</style>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
var message = "<?php print_string('functiondisabled'); ?>";
|
||||
|
||||
+4
-4
@@ -379,17 +379,17 @@
|
||||
|
||||
// TODO eliminate this nasty JavaScript that prints the button.
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
document.write('<input type="button" value="<?php echo $buttontext ?>" onclick="javascript: <?php
|
||||
if ($strconfirmstartattempt) {
|
||||
echo "if (confirm(\\'".addslashes_js($strconfirmstartattempt)."\\'))";
|
||||
}
|
||||
?> window.open(\'<?php echo $attempturl ?>\', \'<?php echo $window ?>\', \'<?php echo $windowoptions ?>\'); " />');
|
||||
// -->
|
||||
//]]>
|
||||
</script>
|
||||
<noscript>
|
||||
<strong><?php print_string('noscript', 'quiz'); ?></strong>
|
||||
<?php print_heading(get_string('noscript', 'quiz')); ?>
|
||||
</noscript>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<td align="right" nowrap="nowrap">
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function showhide (id, set) {
|
||||
divobj = document.getElementById(id);
|
||||
butobj = document.getElementById(id+'button');
|
||||
@@ -28,6 +29,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
@@ -70,9 +72,11 @@
|
||||
|
||||
<td colspan="2">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var popupitems = [<?php echo $popupoptions; ?>];
|
||||
var frameitem = [<?php echo $frameoption; ?>];
|
||||
var allitems = [<?php echo $alloptions; ?>];
|
||||
//]]>
|
||||
</script>
|
||||
<input type="radio" name="windowpopup" value="0" alt="<?php print_string('pagewindow', 'resource') ?>" <?php echo ($windowtype != "popup") ? "checked=\"checked\"" : "" ?>
|
||||
onclick="lockoptions('form', 'windowpopup[0]', frameitem);
|
||||
@@ -116,11 +120,15 @@
|
||||
<?php
|
||||
if ($windowtype == "page") {
|
||||
echo "<script type=\"text/javascript\">";
|
||||
echo "\n//<![CDATA[\n";
|
||||
echo "lockoptions('form','windowpopup[1]', popupitems);";
|
||||
echo "\n//]]>\n";
|
||||
echo "</script>";
|
||||
} else {
|
||||
echo "<script type=\"text/javascript\">";
|
||||
echo "\n//<![CDATA[\n";
|
||||
echo "lockoptions('form','windowpopup[0]', frameitem);";
|
||||
echo "\n//]]>\n";
|
||||
echo "</script>";
|
||||
}
|
||||
?>
|
||||
@@ -190,9 +198,11 @@ for ($i=0; $i < $this->maxparameters; $i++) {
|
||||
</div>
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
showhide('parametersettings', true);
|
||||
showhide('windowsettings', true);
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
$chooseparts = explode('.', $choose);
|
||||
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function set_value(txt) {
|
||||
if (txt.indexOf('/') > -1) {
|
||||
path = txt.substring(txt.indexOf('/'),txt.length);
|
||||
@@ -31,7 +31,7 @@
|
||||
opener.document.forms['<?php echo $chooseparts[0]."'].".$chooseparts[1] ?>.value = '<?php p(RESOURCE_LOCALPATH) ?>'+path;
|
||||
window.close();
|
||||
}
|
||||
-->
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<br />
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
set_user_preference('resource_localpath', $pathname);
|
||||
}
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
window.close();
|
||||
-->
|
||||
//]]>
|
||||
</script>
|
||||
<?php
|
||||
exit;
|
||||
@@ -24,8 +24,8 @@
|
||||
print_simple_box(get_string('localfilepath', 'resource', $CFG->wwwroot.'/user/edit.php?course='.SITEID), 'center');
|
||||
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function set_value(txt) {
|
||||
if (txt.indexOf('/') > -1) {
|
||||
txt = txt.substring(0,txt.lastIndexOf('/'));
|
||||
@@ -35,7 +35,7 @@
|
||||
document.myform.pathname.value = txt;
|
||||
document.myform.submit();
|
||||
}
|
||||
-->
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<br />
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<td align="right" nowrap="nowrap">
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function showhide (id, set) {
|
||||
divobj = document.getElementById(id);
|
||||
butobj = document.getElementById(id+'button');
|
||||
@@ -28,6 +29,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
@@ -63,9 +65,11 @@
|
||||
|
||||
<td colspan="2">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var popupitems = [<?php echo $popupoptions; ?>];
|
||||
var blockitem = [<?php echo $blockoption; ?>];
|
||||
var allitems = [<?php echo $alloptions; ?>];
|
||||
//]]>
|
||||
</script>
|
||||
<input type="radio" name="windowpopup" value="0" alt="<?php print_string('pagewindow', 'resource') ?>" <?php echo ($windowtype != 'popup') ? 'checked="checked"' : '' ?>
|
||||
onclick="lockoptions('form', 'windowpopup[0]', blockitem);
|
||||
@@ -109,9 +113,9 @@
|
||||
<?php p($strheight) ?><br />
|
||||
<?php
|
||||
if ($windowtype == "page") {
|
||||
echo "<script type=\"text/javascript\">";
|
||||
echo "<script type=\"text/javascript\">\n//<![CDATA[\n";
|
||||
echo "lockoptions('form','windowpopup[1]', popupitems);";
|
||||
echo "</script>";
|
||||
echo "\n//]]>\n</script>";
|
||||
}
|
||||
?>
|
||||
</blockquote>
|
||||
@@ -123,8 +127,10 @@
|
||||
</div>
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
showhide('windowsettings', true);
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
<td align="right" nowrap="nowrap">
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function showhide (id, set) {
|
||||
divobj = document.getElementById(id);
|
||||
butobj = document.getElementById(id+'button');
|
||||
@@ -75,6 +76,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
@@ -113,8 +115,10 @@
|
||||
|
||||
<td colspan="2">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var popupitems = [<?php echo $popupoptions; ?>];
|
||||
var allitems = [<?php echo $alloptions; ?>];
|
||||
//]]>
|
||||
</script>
|
||||
<input type="radio" name="windowpopup" value="0" alt="<?php print_string('pagewindow', 'resource') ?>" <?php echo ($windowtype != "popup") ? "checked=\"checked\"" : "" ?>
|
||||
onclick="lockoptions('form', 'windowpopup[1]', popupitems);" />
|
||||
@@ -153,13 +157,13 @@
|
||||
<?php p($strheight) ?><br />
|
||||
<?php
|
||||
if ($windowtype == "page") {
|
||||
echo "<script type=\"text/javascript\">";
|
||||
echo "<script type=\"text/javascript\">\n//<![CDATA[\n";
|
||||
echo "lockoptions('form','windowpopup[1]', popupitems);";
|
||||
echo "</script>";
|
||||
echo "\n//]]>\n</script>";
|
||||
} else {
|
||||
echo "<script type=\"text/javascript\">";
|
||||
echo "<script type=\"text/javascript\">\n//<![CDATA[\n";
|
||||
echo "lockoptions('form','windowpopup[0]', frameitem);";
|
||||
echo "</script>";
|
||||
echo "\n//]]>\n</script>";
|
||||
}
|
||||
?>
|
||||
</blockquote>
|
||||
@@ -245,13 +249,13 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
optiondeselector();
|
||||
</script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
showhide('parametersettings', true);
|
||||
showhide('windowsettings', true);
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
|
||||
?>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
opener.document.forms['form'].reference.value = '<?php echo addslashes($resource) ?>';
|
||||
opener.document.forms['form'].name.value = '<?php echo addslashes(urldecode($title)) ?>';
|
||||
opener.focus();
|
||||
window.close();
|
||||
-->
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -60,8 +60,10 @@ $query .= '&HIVE_SESSION='.$SESSION->HIVE_SESSION;
|
||||
echo '<input type="hidden" name="HIVE_SEREF" value="'.$CFG->wwwroot.'/sso/hive/expired.php">';
|
||||
echo '<input type="hidden" name="HIVE_SESSION" value="'.$SESSION->HIVE_SESSION.'">';
|
||||
echo '</form>';
|
||||
echo '<script language="javascript"/>';
|
||||
echo '<script type="text/javascript"/>';
|
||||
echo "\n//<![CDATA[\n";
|
||||
echo 'document.OPEN_HIVE_FORM.submit();';
|
||||
echo "\n//]]>\n";
|
||||
echo '</script>';
|
||||
|
||||
print_footer();
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
<td align="right" nowrap="nowrap">
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function showhide (id, set) {
|
||||
divobj = document.getElementById(id);
|
||||
butobj = document.getElementById(id+'button');
|
||||
@@ -28,6 +29,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
@@ -84,9 +86,11 @@
|
||||
|
||||
<td colspan="2">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var popupitems = [<?php echo $popupoptions; ?>];
|
||||
var frameitem = [<?php echo $frameoption; ?>];
|
||||
var allitems = [<?php echo $alloptions; ?>];
|
||||
//]]>
|
||||
</script>
|
||||
<input type="radio" name="windowpopup" value="0" alt="<?php print_string('pagewindow', 'resource') ?>" <?php echo ($windowtype != "popup") ? "checked=\"checked\"" : "" ?>
|
||||
onclick="lockoptions('form', 'windowpopup[0]', frameitem);
|
||||
@@ -129,13 +133,13 @@
|
||||
<?php p($strheight) ?><br />
|
||||
<?php
|
||||
if ($windowtype == "page") {
|
||||
echo "<script type=\"text/javascript\">";
|
||||
echo "<script type=\"text/javascript\">\n//<![CDATA[\n";
|
||||
echo "lockoptions('form','windowpopup[1]', popupitems);";
|
||||
echo "</script>";
|
||||
echo "\n//]]>\n</script>";
|
||||
} else {
|
||||
echo "<script type=\"text/javascript\">";
|
||||
echo "<script type=\"text/javascript\">\n//<![CDATA[\n";
|
||||
echo "lockoptions('form','windowpopup[0]', frameitem);";
|
||||
echo "</script>";
|
||||
echo "\n//]]>\n</script>";
|
||||
}
|
||||
?>
|
||||
</blockquote>
|
||||
@@ -204,9 +208,11 @@ for ($i=0; $i < $this->maxparameters; $i++) {
|
||||
</div>
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
showhide('parametersettings', true);
|
||||
showhide('windowsettings', true);
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
<tr valign="top">
|
||||
<td colspan="2">
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function showhide (id, set) {
|
||||
divobj = document.getElementById(id);
|
||||
butobj = document.getElementById(id+'button');
|
||||
@@ -26,6 +27,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -76,9 +78,11 @@
|
||||
|
||||
<td colspan="2">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var popupitems = [<?php echo $popupoptions; ?>];
|
||||
var blockitem = [<?php echo $blockoption; ?>];
|
||||
var allitems = [<?php echo $alloptions; ?>];
|
||||
//]]>
|
||||
</script>
|
||||
<input type="radio" name="windowpopup" value="0" alt="<?php print_string("pagewindow", "resource") ?>" <?php echo ($windowtype != "popup") ? 'checked="checked"' : '' ?>
|
||||
onclick="lockoptions('form', 'windowpopup[0]', blockitem);
|
||||
@@ -124,9 +128,9 @@
|
||||
<?php p($strheight) ?><br />
|
||||
<?php
|
||||
if ($windowtype == "page") {
|
||||
echo "<script type=\"text/javascript\">";
|
||||
echo "<script type=\"text/javascript\">\n//<![CDATA[\n";
|
||||
echo "lockoptions('form','windowpopup[1]', popupitems);";
|
||||
echo "</script>";
|
||||
echo "\n//]]>\n</script>";
|
||||
}
|
||||
?>
|
||||
</blockquote>
|
||||
@@ -138,8 +142,10 @@
|
||||
</div>
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
showhide('windowsettings', true);
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php // $Id$
|
||||
function scorm_add_time($a, $b) {
|
||||
$aes = explode(':',$a);
|
||||
$bes = explode(':',$b);
|
||||
@@ -467,8 +467,8 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
||||
$result->toc .= "\t</ul>\n";
|
||||
if ($scorm->hidetoc == 0) {
|
||||
$result->toc .= '
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function expandCollide(which,list,item) {
|
||||
var nn=document.ids?true:false
|
||||
var w3c=document.getElementById?true:false
|
||||
@@ -485,7 +485,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
||||
new cookie("hide:SCORMitem" + item, 1, -1, "/").set();
|
||||
}
|
||||
}
|
||||
-->
|
||||
//]]>
|
||||
</script>'."\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php // $Id$
|
||||
|
||||
function scorm_eval_prerequisites($prerequisites,$usertracks) {
|
||||
$element = '';
|
||||
@@ -363,8 +363,8 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
||||
$result->toc .= "\t</ul>\n";
|
||||
if ($scorm->hidetoc == 0) {
|
||||
$result->toc .= '
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function expandCollide(which,list,item) {
|
||||
var nn=document.ids?true:false
|
||||
var w3c=document.getElementById?true:false
|
||||
@@ -381,7 +381,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
||||
new cookie("hide:SCORMitem" + item, 1, -1, "/").set();
|
||||
}
|
||||
}
|
||||
-->
|
||||
//]]>
|
||||
</script>'."\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php // $Id$
|
||||
/* // Added by Pham Minh Duc
|
||||
case 'IMSSS:SEQUENCING':
|
||||
$parent = array_pop($parents);
|
||||
@@ -534,8 +534,8 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
||||
$result->toc .= "\t</ul>\n";
|
||||
if ($scorm->hidetoc == 0) {
|
||||
$result->toc .= '
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function expandCollide(which,list,item) {
|
||||
var nn=document.ids?true:false
|
||||
var w3c=document.getElementById?true:false
|
||||
@@ -552,7 +552,7 @@ function scorm_get_toc($user,$scorm,$liststyle,$currentorg='',$scoid='',$mode='n
|
||||
new cookie("hide:SCORMitem" + item, 1, -1, "/").set();
|
||||
}
|
||||
}
|
||||
-->
|
||||
//]]>
|
||||
</script>'."\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php // $Id$
|
||||
require_once('../../config.php');
|
||||
require_once('locallib.php');
|
||||
|
||||
@@ -109,10 +109,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>LoadSCO</title>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
setTimeout('document.location = "<?php echo $result ?>";',2000);
|
||||
-->
|
||||
//]]>
|
||||
</script>
|
||||
<noscript>
|
||||
<meta http-equiv="refresh" content="2;url=<?php echo $result ?>" />
|
||||
|
||||
+4
-2
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php // $Id$
|
||||
require_once($CFG->dirroot.'/mod/scorm/locallib.php');
|
||||
if (!isset($form->name)) {
|
||||
$form->name = '';
|
||||
@@ -458,9 +458,11 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
showhide('advancedsettings', true);
|
||||
showhide('windowsettings', true);
|
||||
//]]>
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -130,21 +130,21 @@
|
||||
'', '', true, $exitlink.update_module_button($cm->id, $course->id, $strscorm), '', false, $bodyscript);
|
||||
if ($sco->scormtype == 'sco') {
|
||||
?>
|
||||
<script language="JavaScript" type="text/javascript" src="request.js"></script>
|
||||
<script language="JavaScript" type="text/javascript" src="api.php?id=<?php echo $cm->id.$scoidstr.$modestr.$attemptstr ?>"></script>
|
||||
<script type="text/javascript" src="request.js"></script>
|
||||
<script type="text/javascript" src="api.php?id=<?php echo $cm->id.$scoidstr.$modestr.$attemptstr ?>"></script>
|
||||
<?php
|
||||
}
|
||||
if (($sco->previd != 0) && ((!isset($sco->previous)) || ($sco->previous == 0))) {
|
||||
$scostr = '&scoid='.$sco->previd;
|
||||
echo ' <script language="javascript">var prev="'.$CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modepop.$scostr."\";</script>\n";
|
||||
echo ' <script type="text/javascript">'."\n//<![CDATA[\n".'var prev="'.$CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modepop.$scostr."\";\n//]]>\n</script>\n";
|
||||
} else {
|
||||
echo ' <script language="javascript">var prev="'.$CFG->wwwroot.'/mod/scorm/view.php?id='.$cm->id."\";</script>\n";
|
||||
echo ' <script type="text/javascript">'."\n//<![CDATA[\n".'var prev="'.$CFG->wwwroot.'/mod/scorm/view.php?id='.$cm->id."\";\n//]]>\n</script>\n";
|
||||
}
|
||||
if (($sco->nextid != 0) && ((!isset($sco->next)) || ($sco->next == 0))) {
|
||||
$scostr = '&scoid='.$sco->nextid;
|
||||
echo ' <script language="javascript">var next="'.$CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modepop.$scostr."\";</script>\n";
|
||||
echo ' <script type="text/javascript">'."\n//<![CDATA[\n".'var next="'.$CFG->wwwroot.'/mod/scorm/player.php?id='.$cm->id.$orgstr.$modepop.$scostr."\";\n//]]>\n</script>\n";
|
||||
} else {
|
||||
echo ' <script language="javascript">var next="'.$CFG->wwwroot.'/mod/scorm/view.php?id='.$cm->id."\";</script>\n";
|
||||
echo ' <script type="text/javascript">'."\n//<![CDATA[\n".'var next="'.$CFG->wwwroot.'/mod/scorm/view.php?id='.$cm->id."\";\n//]]>\n</script>\n";
|
||||
}
|
||||
?>
|
||||
<div id="scormpage">
|
||||
@@ -237,7 +237,8 @@
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<script lanuguage="javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function openpopup(url,name,options,width,height) {
|
||||
fullurl = "<?php echo $CFG->wwwroot.'/mod/scorm/' ?>" + url;
|
||||
windowobj = window.open(fullurl,name,options);
|
||||
@@ -260,6 +261,7 @@
|
||||
width = <?php p($scorm->width) ?>;
|
||||
height = <?php p($scorm->height) ?>;
|
||||
var main = openpopup(url, "scormpopup", "<?php p($scorm->options) ?>", width, height);
|
||||
//]]>
|
||||
</script>
|
||||
<noscript>
|
||||
<iframe id="main"
|
||||
@@ -282,4 +284,3 @@
|
||||
</div> <!-- Page -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -2575,7 +2575,7 @@ function ewiki_binary($break=0) {
|
||||
|
||||
if ($id) {
|
||||
echo<<<EOF
|
||||
<html><head><title>File/Picture Upload</title><script language="JavaScript" type="text/javascript"><!--
|
||||
<html><head><title>File/Picture Upload</title><script type="text/javascript"><!--
|
||||
opener.document.forms["ewiki"].elements["content"].value += "\\nUPLOADED PICTURE: [$id$title]\\n";
|
||||
window.setTimeout("self.close()", 5000);
|
||||
//--></script></head><body bgcolor="#440707" text="#FFFFFF">Your uploaded file was saved as<br /><big><b>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
//-->
|
||||
</style>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
function login()
|
||||
@@ -169,4 +169,4 @@
|
||||
</CENTER>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</HTML>
|
||||
|
||||
@@ -84,7 +84,8 @@ $QTYPES[$question->qtype]->print_question_form_end($question,
|
||||
'onclick="return determineMinAndMax();"',
|
||||
'<input type="hidden" name="wizardpage" value="question" />');
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function determineMinAndMax() {
|
||||
// This client-side script will determine the values for min and max
|
||||
// based on the input for answer and acceptederror.
|
||||
@@ -111,4 +112,5 @@ function determineMinAndMax() {
|
||||
}
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
@@ -13,7 +13,21 @@
|
||||
<?php echo $loggedinas ?>
|
||||
<?php echo $homelink ?>
|
||||
|
||||
|
||||
<?php if (isadmin()) {
|
||||
echo $performanceinfo;
|
||||
?>
|
||||
<br />
|
||||
<hr noshade="noshade" />
|
||||
<p align="center">
|
||||
<a href="http://validator.w3.org/check?verbose=1&ss=1&uri=<?php echo urlencode(qualified_me()) ?>">Validate HTML</a> |
|
||||
<a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&url1=<?php echo urlencode(qualified_me()) ?>">Section 508 Check</a> |
|
||||
<a href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=0&warnp2n3e=1&url1=<?php echo urlencode(qualified_me()) ?>">WCAG 1 (2,3) Check</a>
|
||||
</p>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user