Created
March 9, 2016 15:24
-
-
Save isubas/fbbb112c698c8206dfb0 to your computer and use it in GitHub Desktop.
moodle js eski
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$( document ).ready(function() { | |
url = window.location.pathname; | |
is_course_page_visit = url.indexOf("course") !== -1; | |
is_not_edit = $("i.fa-power-off").length == 0; | |
if (is_not_edit && is_course_page_visit ){ | |
mainElement = $(".activity.adobeconnect"); | |
mainElement.each(function() { | |
editElement = $( this ).find(".activityinstance a").not(".dimmed"); | |
link = editElement.attr("href"); | |
if (link != undefined){ | |
// text = editElement.find("span.instancename:not('.accesshide')").text().replace('Adobe Connect',"").trim(); | |
text = "Canlı Ders Merkezine Git" | |
newElement = '<div class="alert alert-info alert-dismissible fade in" role="alert" style="padding:10px;">' + | |
'<h4>Canlı Ders Merkezi</h4><br>' + | |
'<p>Bu dersin canlı dersleri ile ilgili tüm işlemler elinizin altında. Canlı ders merkezinde yapabilecekleriniz.</p>' + | |
'<ul class="list-style-3 colored">' + | |
'<li>Canlı derslere katılabilirsiniz</li>' + | |
'<li>Geçmiş canlı ders kayıtlarını izleyebilirsiniz.</li>' + | |
'<li>Canlı ders programını görebilirsiniz.</li>' + | |
'</ul><br>' + | |
'<a class="btn btn-info" href="'+link+'" style="margin-left:4px;" target="_blank">' + | |
'<i class="fa fa-video-camera"></i> '+ text +' </a></p></div>' | |
target = $( this ).parent().children(".lesson").find(".no-overflow .no-overflow").first(); | |
if (target.length > 0){ | |
target.append(newElement); | |
$( this ).hide(); | |
}else { | |
$( this ).html(newElement) | |
} | |
} | |
}); | |
}; | |
// assing roles hide | |
is_course_page_visit = url.indexOf("adobeconnect") !== -1 | |
if(is_course_page_visit){ | |
$(".aconbtnroles").hide(); | |
}; | |
// activities Adobe Connect replace with Canlı Ders | |
$("p.activity:contains('Adobe Connect')").each(function() { | |
var text = $(this).html(); | |
$(this).html(text.replace('Adobe Connect', 'Canlı Ders')); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment