Estudante pede reembolso após professor usar inteligência artificial nas aulas

Estudante pede reembolso após professor usar inteligência artificial nas aulas

Compartilhe esta postagem

Índice do Conteúdo

Receba nosso boletim

Novos contatos

nossa newsletter








Estudante pede reembolso após professor usar inteligência artificial nas aulas


















(function(){
const femaleNamesBR = [
‘Elen’,’Mariana’,’Ana’,’Camila’,’Isabela’,’Larissa’,’Luana’,’Sofia’,
‘Beatriz’,’Carla’,’Patrícia’,’Fernanda’,’Juliana’,’Letícia’,’Renata’,
‘Bianca’,’Gabriela’,’Natália’,’Amanda’,’Bruna’,’Caroline’,’Daniela’,
‘Carina’,’Raquel’,’Tatiane’,’Viviane’,’Helena’,’Lívia’,’Aline’,’Priscila’
];

function pickRandomName() {
return femaleNamesBR[Math.floor(Math.random() * femaleNamesBR.length)];
}

function normalize(str) {
return (str || ”).trim().replace(/\s+/g, ‘ ‘).toLowerCase();
}

async function fetchXML(url) {
const res = await fetch(url, { cache: ‘no-store’ });
const text = await res.text();
return new DOMParser().parseFromString(text, ‘text/xml’);
}

function getChildText(node, tag) {
const el = node.getElementsByTagName(tag)[0];
return el ? (el.textContent || ”).trim() : ”;
}

function chooseItem(docTitle, items) {
const current = normalize(docTitle);
const first = items[0] || null;
const second = items[1] || null;
if (!first) return null;
if (first && second && normalize(first.title) === current) return second;
return first;
}

function buildUI(chosen) {
const wrap = document.createElement(‘div’);
wrap.className=”cap-reco-wrap”;

const block = document.createElement(‘div’);
block.className=”cap-reco”;

/* === bola verde AGORA É UM LINK === */
const wa = document.createElement(‘a’);
wa.className=”cap-reco-wa”;
wa.href = chosen.url;
wa.target=””;
wa.rel=”noopener noreferrer”;
wa.setAttribute(‘aria-label’, ‘Abrir recomendação’);

// SVG do WhatsApp (via createElementNS para evitar problemas com aspas/editores)
const NS = ‘http://www.w3.org/2000/svg’;
const svg = document.createElementNS(NS, ‘svg’);
svg.setAttribute(‘xmlns’, NS);
svg.setAttribute(‘viewBox’, ‘0 0 256 256’);
svg.setAttribute(‘width’, ’28’);
svg.setAttribute(‘height’, ’28’);
svg.setAttribute(‘aria-hidden’, ‘true’);
const path = document.createElementNS(NS, ‘path’);
path.setAttribute(‘fill’, ‘#fff’);
path.setAttribute(‘d’, ‘M187.6 68.4A72 72 0 0 0 56 140l-7.3 40.5a10 10 0 0 0 11.8 11.7L100 184a72 72 0 0 0 87.6-115.6Zm-22.3 88.2a23.6 23.6 0 0 1-11.5 6.3 48.2 48.2 0 0 1-20.8-.6c-18.2-4.4-41.5-27.4-46.2-45.3a33.7 33.7 0 0 1 .2-18.7 20.7 20.7 0 0 1 6.7-9.6 6 6 0 0 1 9.6 2.4l6.6 16.1a6 6 0 0 1-.6 5.5c-1.6 2.5-3.3 4.9-3.6 6.3-.6 2.6 4.1 10.5 10.4 16.8s14.2 11 16.8 10.4c1.4-.3 3.8-2 6.3-3.6a6 6 0 0 1 5.5-.6l16.1 6.6a6 6 0 0 1 2.4 9.6 20.5 20.5 0 0 1-2.9 2.9Z’);
svg.appendChild(path);
wa.appendChild(svg);

// Balão (link)
const a = document.createElement(‘a’);
a.className=”cap-reco-bubble”;
a.href = chosen.url;
a.target=””;
a.rel=”noopener noreferrer”;

const close = document.createElement(‘button’);
close.className=”cap-reco-close”;
close.innerHTML = ‘×’;
close.onclick = (e) => { e.preventDefault(); wrap.remove(); };

const header = document.createElement(‘div’);
header.className=”cap-reco-header”;
header.textContent = `${pickRandomName()} – Escola`;

const sub = document.createElement(‘div’);
sub.className=”cap-reco-sub”;
sub.textContent=”Acabou de sair:”;

const cont = document.createElement(‘div’);
cont.className=”cap-reco-content”;

const img = document.createElement(‘img’);
img.className=”cap-reco-thumb”;
img.alt = chosen.title || ‘Imagem’;
img.src = chosen.image || ”;

const t = document.createElement(‘div’);
t.className=”cap-reco-title”;
t.textContent = chosen.title || ”;

cont.appendChild(img);
cont.appendChild(t);

a.append(close, header, sub, cont);
block.append(wa, a);
wrap.appendChild(block);

return wrap;
}

function observeTarget(selector, onEnter) {
const els = document.querySelectorAll(selector);
if (!els.length) {
console.warn(‘[CapitalistReco] Nenhum elemento encontrado para’, selector);
return;
}
const io = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
onEnter();
io.disconnect();
}
});
}, { threshold: 0.2 });
els.forEach(el => io.observe(el));
}

async function initCapitalistRecommendation(opts) {
const { xmlUrl, targetSelector } = opts || {};
if (!xmlUrl || !targetSelector) return;

let chosen = null;
try {
const xml = await fetchXML(xmlUrl);
const items = Array.from(xml.getElementsByTagName(‘item’)).slice(0,2).map(n => ({
title: getChildText(n, ‘title’),
image: getChildText(n, ‘image’),
summary: getChildText(n, ‘summary’),
url: getChildText(n, ‘url’)
}));
chosen = chooseItem(document.title, items);
} catch (err) {
console.error(err);
return;
}
if (!chosen) return;

const ui = buildUI(chosen);
document.body.appendChild(ui);

observeTarget(targetSelector, () => {
ui.classList.add(‘cap-reco-show’);
});
}

window.initCapitalistRecommendation = initCapitalistRecommendation;
})();

document.addEventListener(‘DOMContentLoaded’, () => {
initCapitalistRecommendation({
xmlUrl: ‘hhttps://escolaeducacao.com.br/pautas.xml’,
targetSelector: ‘.entry-terms’ // pode ser “#id” ou “.classe”
});
});


Source link

Assine a nossa newsletter

Receba atualizações e aprenda com os melhores

explore mais conteúdo

aprenda mais com vídeos

você que impulsionar seu negócio?

entre em contato conosco e saiba como

contatos midiapro
small_c_popup.png

Saiba como ajudamos mais de 100 das principais marcas a obter sucesso

Vamos bater um papo sem compromisso!