removed mods directory from the ATutor codebase
[atutor.git] / mods / cpref_switch / side_menu.inc.php
diff --git a/mods/cpref_switch/side_menu.inc.php b/mods/cpref_switch/side_menu.inc.php
deleted file mode 100644 (file)
index 56e9608..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php \r
-global $savant;\r
-global $_base_path;\r
-\r
-include_once('module.inc.php');\r
-/* start output buffering: */\r
-ob_start(); ?>\r
-\r
-<script type="text/javascript">\r
-//<!--\r
-ATutor = ATutor || {};\r
-ATutor.cpref_switch = ATutor.cpref_switch || {};\r
-\r
-(function (ATutor) {\r
-       /**\r
-       * Sends the alternative content request to the server and reloads the page on successful completion.\r
-       * Perhaps change this to a .ajax request so that we can display a fail message if it doesn't work.\r
-       */\r
-       ATutor.cpref_switch.doPost = function () {\r
-               \r
-        jQuery.post("<?php echo AT_BASE_HREF; ?>mods/cpref_switch/ajax_save.php", \r
-                { "<?php echo AT_POST_ALT_TO_TEXT; ?>": jQuery("#cs_preferred_alt_to_text").val(),\r
-                  "<?php echo AT_POST_ALT_TO_AUDIO; ?>": jQuery("#cs_preferred_alt_to_audio").val(),\r
-                  "<?php echo AT_POST_ALT_TO_VISUAL; ?>": jQuery("#cs_preferred_alt_to_visual").val()\r
-                 },\r
-                 function (isPrefsChanged) {\r
-                     if (isPrefsChanged) {\r
-                         //provide feedback\r
-                         jQuery("#cpref_switch_feedback").show();\r
-                     }\r
-                     else {\r
-                        jQuery("#cpref_switch_feedback").hide();\r
-                     }\r
-                     if ((location.href.indexOf("content.php") > -1) && (location.href.indexOf("cid") > -1) && isPrefsChanged === '1') {\r
-                       //if page is reloaded, the ajax stops running - no feedback is possible\r
-                         location.reload(true);  \r
-                     }\r
-                 }\r
-        );        \r
-    };   \r
-})(ATutor);\r
-//-->\r
-</script>\r
-\r
-<?php\r
-$alt_to_text_values = array(AT_PREF_NONE, AT_PREF_AUDIO, AT_PREF_VISUAL, AT_PREF_SIGN);\r
-$alt_to_text_labels = array(_AT(AT_PREF_NONE), _AT(AT_PREF_AUDIO), _AT(AT_PREF_VISUAL), _AT(AT_PREF_SIGN));\r
-$alt_to_text = AT_PREF_NONE;\r
-if ($_SESSION['prefs']['PREF_USE_ALTERNATIVE_TO_TEXT'] == 1) {\r
-    $alt_to_text = $_SESSION['prefs']['PREF_ALT_TO_TEXT'];\r
-}\r
-\r
-\r
-$alt_to_audio_values = array(AT_PREF_NONE, AT_PREF_TEXT, AT_PREF_VISUAL, AT_PREF_SIGN);\r
-$alt_to_audio_labels = array(_AT(AT_PREF_NONE), _AT(AT_PREF_TEXT), _AT(AT_PREF_VISUAL), _AT(AT_PREF_SIGN));\r
-$alt_to_audio = AT_PREF_NONE;\r
-if ($_SESSION['prefs']['PREF_USE_ALTERNATIVE_TO_AUDIO'] == 1) {\r
-    $alt_to_audio = $_SESSION['prefs']['PREF_ALT_TO_AUDIO'];\r
-}\r
-\r
-$alt_to_visual_values = array(AT_PREF_NONE, AT_PREF_TEXT, AT_PREF_AUDIO, AT_PREF_SIGN);\r
-$alt_to_visual_labels = array(_AT(AT_PREF_NONE), _AT(AT_PREF_TEXT), _AT(AT_PREF_AUDIO), _AT(AT_PREF_SIGN));\r
-$alt_to_visual = AT_PREF_NONE;\r
-if ($_SESSION['prefs']['PREF_USE_ALTERNATIVE_TO_VISUAL'] == 1) {\r
-    $alt_to_visual = $_SESSION['prefs']['PREF_ALT_TO_VISUAL'];\r
-}\r
-\r
-?>\r
-\r
-<form class="cpref_switch" method="post" name="cpref_switch_form" action="">\r
-<fieldset style="position: relative;padding: 1em;height: 15.5em; margin:0.5em">\r
-<legend style="display:none"><?php echo _AT('content_settings') ?></legend>\r
-\r
-<label style="display:block;margin-bottom:0.25em;" for="cs_preferred_alt_to_text"><?php echo _AT("alt_to_text") ?></label>\r
-<select style="margin-bottom:1em;margin-left:1em;" name="cs_preferred_alt_to_text" id="cs_preferred_alt_to_text">\r
-    <?php \r
-        foreach ($alt_to_text_values as $key => $value) {\r
-            echo '<option value="'.$value.'"';\r
-            if ($alt_to_text == $value) echo ' selected="selected"';\r
-            echo '>'.$alt_to_text_labels[$key]."</option>";\r
-        } \r
-    ?>\r
-</select>\r
-\r
-<label style="display:block;margin-bottom:0.25em;" for="cs_preferred_alt_to_audio"><?php echo _AT("alt_to_audio") ?></label>\r
-<select style="margin-bottom:1em;margin-left:1em;"name="cs_preferred_alt_to_audio" id="cs_preferred_alt_to_audio">\r
-    <?php \r
-        foreach ($alt_to_audio_values as $key => $value) {\r
-            echo '<option value="'.$value.'" ';\r
-            if ($alt_to_audio == $value) echo 'selected="selected"';\r
-            echo '>'.$alt_to_audio_labels[$key]."</option>";\r
-        } \r
-    ?>\r
-</select>\r
-\r
-<label style="display:block;margin-bottom:0.25em;" for="cs_preferred_alt_to_visual"><?php echo _AT("alt_to_visual") ?></label>\r
-<select style="margin-bottom:1em;margin-left:1em;"name="cs_preferred_alt_to_visual" id="cs_preferred_alt_to_visual">\r
-    <?php \r
-        foreach ($alt_to_visual_values as $key => $value) {\r
-            echo '<option value="'.$value.'" ';\r
-            if ($alt_to_visual == $value) echo 'selected="selected"';\r
-            echo '>'.$alt_to_visual_labels[$key]."</option>";\r
-        } \r
-    ?>\r
-</select>\r
-\r
-<div style="color:#17B506;position:absolute;left:1em;right:3em;display:none" id="cpref_switch_feedback" role="region" aria-live="polite" aria-relevant="all"><?php echo _AT("AT_FEEDBACK_ACTION_COMPLETED_SUCCESSFULLY")?></div>\r
-<input style="position:absolute;right:2em;bottom:2em;" class="button" type="button" value="<?php echo _AT('apply') ?>" onclick="ATutor.cpref_switch.doPost();" />\r
-\r
-</fieldset>\r
-</form>\r
-\r
-<?php\r
-$savant->assign('dropdown_contents', ob_get_contents());\r
-ob_end_clean();\r
-\r
-$savant->assign('title', _AT('content_settings')); // the box title\r
-$savant->display('include/box.tmpl.php');\r
-?>
\ No newline at end of file