Comunidad de diseño web y desarrollo en internet online

Moodle y Javascript

Citar            
MensajeEscrito el 28 Ene 2011 09:22 pm
Hola que tal como están?

Estoy tratando de colocar un reproductor de video y otro de mp3 en Moodle, probé ciertos códigos en javascript y funcionan perfectamente en HTML, pero cuando lo uso en Moodle no funciona, alguién tuvo alguna experiencia con esto y puede darme alguna sugerencia?

Muchas gracias.
Saludos.

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

chrome
Citar            
MensajeEscrito el 28 Ene 2011 11:13 pm
pues, Moodle funciona con HTML y Javascript, no debería funcionar, pero sin código ni más información al respecto poco se puede hacer

Por tribak

Claber

2448 de clabLevel

6 tutoriales

Genero:Masculino   Héroes

Fotógrafo o algo

chrome
Citar            
MensajeEscrito el 28 Ene 2011 11:47 pm
Gracias por tu respuesta, este es el código:

Código :

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<style type="text/css">

#topbar{
    position:absolute;
    width: 100%;
    height: 62px;
        z-index: 400;
}

</style>
<script type="text/javascript">
var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 0 //set x offset of bar in pixels
var startY = 5 //set y offset of bar in pixels
var verticalpos="frombottom" //enter "fromtop" or "frombottom"

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar").style.visibility="hidden"
}

function staticbar(){
barheight=document.getElementById("topbar").offsetHeight
var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
var d = document;
function ml(id){
var el=d.getElementById(id);
if (!persistclose || persistclose && get_cookie("remainclosed")=="")
el.style.visibility="visible"
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function(){
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : iecompattest().scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("topbar");
stayTopLeft();
}

if (window.addEventListener)
window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
window.attachEvent("onload", staticbar)
else if (document.getElementById)
window.onload=staticbar
</script>

<div id="topbar"> 
  <div align="center"><div id="content">
   
   <div id="dewplayer_content">
   <object data="dewplayer-bubble.swf" width="250" height="65" name="dewplayer" id="dewplayer" type="application/x-shockwave-flash">
   <param name="movie" value="dewplayer-bubble.swf" />
   <param name="flashvars" value="mp3=mp3/6Socializing-Debrief2.mp3" />
   <param name="wmode" value="transparent" />
   </object>
   </div>

</div>

<script type="text/javascript">
var flashvars = {
  mp3: "mp3/6Socializing-Debrief2.mp3"
};
var params = {
  wmode: "transparent"
};
var attributes = {
  id: "dewplayer"
};
swfobject.embedSWF("dewplayer-bubble.swf", "dewplayer_content", "250", "65", "9.0.0", false, flashvars, params, attributes);
</script>
  </div>
</div>
<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Starting conversations with tag questions</title>

<style type="3D&quot;text/css&quot;">=0A=
=0A=
#topbar{=0A=
position:absolute;=0A=
width: 100%;=0A=
height: 62px;=0A=
z-index: 400;=0A=
}=0A=
=0A=
</style>
</head>
<body>
<div style="text-align: center;"><big><big><span style="font-family: Arial; font-weight: bold;">STARTING
CONVERSATIONS WITH TAG QUESTIONS</span></big></big></div>
<p style="font-family: Arial;" class="Style17"><small><big style="font-style: italic;"><big>Instructions: Please
click on the floating mp3 player below, and listen as you read the text.</big></big></small></p>
<p style="font-family: Arial;" class="Style17"><small>[6Socializing-Debrief2.mp3]</small></p>
<p class="Style1" style="margin-top: 12.6pt; text-align: justify; font-family: Arial;"><span style="font-size: 11pt;">After Penny has struck up a
conversation with
George and they have made their introductions—"Nice to finally meet
you.
Good to meet you too"—what does Penny say next to get the conversation
going?<o:p></o:p></span></p>
<p class="Style5" style="font-family: Arial;"><span class="CharacterStyle3"><b><span style="font-size: 10.5pt; line-height: 80%;">Penny:</span></b><span style="color: rgb(2, 3, 233);"> So, interesting speech,
wasn't it?<o:p></o:p></span></span></p>
<p class="Style5" style="margin-top: 0.05in; font-family: Arial;"><span class="CharacterStyle3"><b><span style="font-size: 10.5pt; line-height: 80%;">George:</span></b><span style="color: rgb(2, 3, 233);"> Yes, looks like we have a
few
challenges ahead.<o:p></o:p></span></span></p>
<p class="Style1" style="margin-top: 12.6pt; text-align: justify; font-family: Arial;"><span style="font-size: 11pt;">Penny is using a "tag question"—a
question
ending with "isn't it?" "wasn't it" "aren't they"
"weren't they" "don't you think so?" and so on. This type
of question is ideal for starting conversations because it gives your
partner
an easy chance to respond.<o:p></o:p></span></p>
<p class="Style5" style="font-family: Arial;"><span class="CharacterStyle3"><span style="">Let's
look at some more typical tag questions you
can ask:<o:p></o:p></span></span></p>
<ul>
<li><span style="font-size: 11pt; color: rgb(246, 3, 3); letter-spacing: 0.6pt;"><span style=""><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"></span></span></span><span style="font-size: 11pt; color: rgb(246, 3, 3);">Horrible
weather, isn't it?<o:p></o:p></span></li>
<li><span style="font-size: 11pt; color: rgb(246, 3, 3); letter-spacing: 0.6pt;"><span style=""><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"></span></span></span><span style="font-size: 11pt; color: rgb(246, 3, 3);">Great hotel,
isn't it?<o:p></o:p></span><span style="font-size: 11pt; color: rgb(246, 3, 3); letter-spacing: 0.6pt;"><span style=""></span></span></li>
<li><span style="font-size: 11pt; color: rgb(246, 3, 3); letter-spacing: 0.6pt;"><span style=""><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"></span></span></span><span style="font-size: 11pt; color: rgb(246, 3, 3);">A beautiful
day, isn't it?<o:p></o:p></span></li>
<li><span style="font-size: 11pt; color: rgb(246, 3, 3); letter-spacing: 0.6pt;"><span style=""><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"></span></span></span><span style="font-size: 11pt; color: rgb(246, 3, 3);">Great game,
wasn't it?<o:p></o:p></span></li>
<li><span style="font-size: 11pt; line-height: 80%; color: rgb(246, 3, 2); letter-spacing: 0.2pt;"><span style=""><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"></span></span></span><span style="font-size: 11pt; line-height: 80%; color: rgb(246, 3, 2);">
Splendid program, don't you think?<o:p></o:p></span></li>
<li><span style="font-size: 11pt; line-height: 80%; color: rgb(246, 3, 2); letter-spacing: 0.2pt;"><span style=""><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"></span></span></span><span style="font-size: 11pt; line-height: 80%; color: rgb(246, 3, 2);">The
food here is really great, isn't it?<o:p></o:p></span></li>
<li><span style="font-size: 11pt; line-height: 80%; color: rgb(246, 3, 2); letter-spacing: 0.2pt;"><span style=""><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"></span></span></span><span style="font-size: 11pt; line-height: 80%; color: rgb(246, 3, 2);">Amazing
team, aren't they?<o:p></o:p></span></li>
<li><span style="font-size: 11pt; line-height: 80%; color: rgb(246, 3, 2); letter-spacing: 0.2pt;"><span style=""><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"></span></span></span><span style="font-size: 11pt; line-height: 80%; color: rgb(246, 3, 2);">It's
been a long day, hasn't it?<o:p></o:p></span></li>
</ul>
<p class="Style16" style="margin-top: 12.6pt; line-height: normal; font-family: Arial;"><span class="CharacterStyle3"><span style="">Can you
think of any
more good tag questions? I'm sure you can! Tag questions give you a
great way
to get the dialog going.<o:p></o:p></span></span></p>
<p class="Style1" style="margin-top: 0.2in; text-align: justify; font-family: Arial;"><span style="font-size: 11pt;">Of course you don't just network at
formal social
events, such as parties or dinners. Many everyday situations provide
you opportunities
to meet new people—waiting in the hotel lobby, standing in line,
working out in
the gym, having a cocktail in a bar. Sometimes we skip over the
greeting and
move straight to the tag question, don't we?<o:p></o:p></span></p>
<p class="Style16" style="margin: 16.2pt 0in 0.0001pt; text-indent: 0in; font-family: Arial;"><span class="CharacterStyle3"><span style="color: rgb(51, 153, 103); letter-spacing: 0.4pt;"><span style="">A:<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;</span></span></span></span><span class="CharacterStyle3"><span style="color: rgb(51, 153, 103);">Great
game, isn't it?<o:p></o:p></span></span></p>
<p class="Style16" style="margin-left: 0in; text-indent: 0in; font-family: Arial;"><span class="CharacterStyle3"><span style="color: rgb(51, 153, 103); letter-spacing: 0.4pt;"><span style="">B:<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;</span></span></span></span><span class="CharacterStyle3"><span style="color: rgb(51, 153, 103);">Yes,
amazing!<o:p></o:p></span></span></p>
<p class="Style16" style="margin: 0.05in 0in 0.0001pt; text-indent: 0in; font-family: Arial;"><span class="CharacterStyle3"><span style="color: rgb(51, 153, 103);"><span style="">A:<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;</span></span></span></span><span class="CharacterStyle3"><span style="color: rgb(51, 153, 103);">I don't think we've met.
My name's
Ronald. What's yours?<o:p></o:p></span></span></p>
<p class="Style16" style="margin-left: 0in; text-indent: 0in; font-family: Arial;"><span class="CharacterStyle3"><span style="color: rgb(51, 153, 103);"><span style="">B:<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;</span></span></span></span><span class="CharacterStyle3"><span style="color: rgb(51, 153, 103);">I'm Cindy.<o:p></o:p></span></span></p>
<p class="Style1" style="margin-top: 0.2in; font-family: Arial;"><span style="font-size: 11pt;">In addition to tag questions, there
are a variety of great
wh- questions </span><i><span style="font-size: 10.5pt;">(who,
what, where, when, why,
</span></i><span style="font-size: 11pt;">how
questions) that you can use to get the
conversation going:<o:p></o:p></span></p>
<ul>
<li><span class="CharacterStyle3"><span style="color: rgb(246, 3, 2); letter-spacing: 0.4pt;"><span style=""><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></span></span><span class="CharacterStyle3"><span style="color: rgb(246, 3, 2);">Where are you staying?<o:p></o:p></span></span></li>
<li><span class="CharacterStyle3"><span style="color: rgb(246, 3, 2); letter-spacing: 0.4pt;"><span style=""><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></span></span><span class="CharacterStyle3"><span style="color: rgb(246, 3, 2);">How long have you been in <st1:country-region w:st="on"><st1:place w:st="on">Singapore</st1:place></st1:country-region>?<o:p></o:p></span></span></li>
<li><span class="CharacterStyle3"><span style="color: rgb(246, 3, 2); letter-spacing: 0.4pt;"><span style=""><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></span></span><span class="CharacterStyle3"><span style="color: rgb(246, 3, 2);">How was your flight?<o:p></o:p></span></span></li>
<li><span class="CharacterStyle3"><span style="color: rgb(246, 3, 2); letter-spacing: 0.4pt;"><span style=""><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></span></span><span class="CharacterStyle3"><span style="color: rgb(246, 3, 2);">Is this your first time here?<o:p></o:p></span></span></li>
<li><span class="CharacterStyle3"><span style="color: rgb(246, 3, 2); letter-spacing: 0.4pt;"><span style=""><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></span></span><span class="CharacterStyle3"><span style="color: rgb(246, 3, 2);">What do you think of the food?<o:p></o:p></span></span></li>
<li><span class="CharacterStyle3"><span style="color: rgb(246, 3, 2); letter-spacing: 0.4pt;"><span style=""><span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></span></span><span class="CharacterStyle3"><span style="color: rgb(246, 3, 2);">When did you arrive?<o:p></o:p></span></span></li>
</ul>

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

chrome
Citar            
MensajeEscrito el 28 Ene 2011 11:57 pm
ese código es del player? tienes en mente que no puedes meter un tag html dentro de otro? muchas lineas de ese código parecen no tener nada que ver con un reproductor de mp3, necesitas limpiar todo

No existe una solución entre los plugins de moodle?
http://moodle.org/mod/data/view.php?id=6009

Por tribak

Claber

2448 de clabLevel

6 tutoriales

Genero:Masculino   Héroes

Fotógrafo o algo

chrome
Citar            
MensajeEscrito el 29 Ene 2011 12:13 am
Dentro del código esta todo el contenido de la página, el resultado es el siguiente:

http://www.asezsolutions.com.ar/development/speakusaenglish/test.html

Tuve que agregar código para que el player sea flotante, como verás funciona bien en ese link pero el tema es cuando lo quiero usar desde moodle.

Gracias!

Por CLAnonimo

Claber

600 de clabLevel

5 tutoriales
1 articulo

 

Este es un usuario anónimo genérico para las cuentas borradas o perdidas.

chrome

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.