Lingara Lingara Documentazione Guide API Librerie App Crea App web
Lingua: Italiano

La nota per il tutor

Questa pagina è tradotta dall'inglese. Se le due versioni differiscono, fa fede la pagina in inglese. Leggi la pagina in inglese

La tua app può offrire al tutor di Lingara una riga di contesto, ad esempio quali parole lo studente ha appena esercitato, aggiungendo una tutor_note alla sua risposta. La nota raggiunge il tutor solo quando il tuo manifest la dichiara e lo studente l’ha attivata quando ha installato la tua app. Per cambiare quella scelta, lo studente disinstalla la tua app e la installa di nuovo.

Cosa ne fa Lingara

  • Un a capo diventa uno spazio.
  • I caratteri di controllo e le forzature di direzione vengono rimossi.
  • Una nota più lunga di 280 caratteri viene tagliata a 280 e termina con …. I caratteri vengono contati come valori scalari Unicode, non come byte o glifi sullo schermo.
  • Una nota che il tuo manifest non dichiara, o che lo studente non ha consentito, viene scartata.

Come la legge il tutor

Il tutor legge la tua nota come testo citato di una terza parte, mai come un’istruzione. Una nota che il controllo di sicurezza di Lingara rifiuta viene scartata, e il turno dello studente prosegue senza di essa. Lo studente non vede mai la nota.

Una buona nota

Una buona nota è un fatto semplice che il tutor può usare, come «Lo studente ha appena ripassato 5 parole del suo piano di giapponese.» Dice cosa sta facendo lo studente, non cosa dovrebbe fare il tutor. Lascia fuori le istruzioni, i giudizi sullo studente e tutto ciò che lo studente non ha visto sulla tua scheda.

Linguaggio dell'esempio di codice

TypeScript

function withNote(request: AppRenderRequest) {
  const note = planLine(request);
  // Plain text, at most 280 characters; the tutor reads it, the learner does not.
  return note === "" ? todayCard(0) : reply(todayCard(0)).tutorNote(note);
}

Rust

async fn render(seen: Seen, request: AppRenderRequest) -> Result<Reply, BoxError> {
    let (lang, progress) = shared_plan(&request);
    let count = seen.lock().map_err(|_| "poisoned")?.get(&request.subject).copied().unwrap_or(0);
    let card = today_card("Today's five", &lang)?;
    // Plain text the learner's tutor can read: at most 280 characters.
    let note = match progress {
        Some((done, total)) => format!("The learner has reviewed {count} words with this app today; {done} of {total} sets done."),
        None => format!("The learner has reviewed {count} words with this app today."),
    };
    Ok(reply(card).tutor_note(note)?)
}

Go

card, err := lingaraapps.NewCard().Heading("Daily five", 1).Text("雨 · 雪 · 风 · 云 · 雷").Build()
if err != nil {
	return nil, err
}
// Plain text, at most 280 characters, for Lingara's tutor to use.
return lingaraapps.Reply(card).
	TutorNote("The learner is reviewing weather words today."), nil

Java

import com.getlingara.apps.Card;
import com.getlingara.apps.Reply;

Card card = Card.card().heading("Today's five", 1).term("雨", "yǔ", "rain", "zh").build();
// Plain text, at most 280 characters; the tutor reads it beside the card.
return Reply.reply(card).tutorNote("The learner is reviewing weather words today.");

Kotlin

import com.getlingara.apps.kotlin.Reply
import com.getlingara.apps.kotlin.card
import com.getlingara.apps.kotlin.reply

val c =
    card {
        heading("Today's five", 1)
        term("雨", reading = "yǔ", gloss = "rain", lang = "zh")
    }
// Plain text, at most 280 characters; the tutor reads it beside the card.
return reply(c).tutorNote("The learner is reviewing weather words today.")

Ruby

note = plan_line(request)
# Plain text, at most 280 characters; the tutor reads it, the learner does not.
note.empty? ? today_card(0) : Lingara::Apps.reply(today_card(0)).tutor_note(note)

PHP

use Lingara\Apps\Reply;

function withNote(AppRenderRequest $request): CardModel|Reply
{
    $note = planLine($request);
    // Plain text, at most 280 characters; the tutor reads it, the learner does not.
    return $note === '' ? todayCard(0) : Reply::of(todayCard(0))->tutorNote($note);
}