.duplicate()メソッドはフォーム間では機能しません(私が見る限りではありません)ので、複数の選択項目をあるフォームから別のフォームにコピーするクイックルーチンを作成しました。項目をコピーするとGoogleクイズフォームの間でgetFeedbackForCorrectが返される
(私は教室でクイズを設定するためにこれをやっている。私は、形成的評価のためのクイズでは、単一のトピックに関する質問の銀行を持っていると総括的評価のためにこれらのランダムな質問を組み合わせたい。)
私は「コード書かれた作品は、質問をコピーしてもうまくいきますが、フィードバックはできません。これは私の最初のガスコードので、謝罪です!
TypeError:オブジェクトItemに関数getFeedbackForCorrectが見つかりません。 (行32、ファイル "コード")
function copyMultipleChoiceItem(item1, item2) {
// copies MC question item1 to item2 - tested PDW 17/05/20
// copy of feedback not working
//
// basic question items
item2.setTitle(item1.getTitle());
item2.setPoints(item1.asMultipleChoiceItem().getPoints());
item2.setRequired(item1.asMultipleChoiceItem().isRequired());
item2.setHelpText(item1.getHelpText());
// the choices
var choices = item1.asMultipleChoiceItem().getChoices();
for (var i = 0; i < choices.length; i++) {
item2.createChoice(choices[i].getValue(),choices[i].isCorrectAnswer());
}
item2.setChoices(choices);
// the feedback and links - cannot get this to work!
var feedback1 = item1.getFeedbackForCorrect();
var feedback2 = FormApp.createFeedback()
.setDisplayText(feedback1.getText());
// then do list of URLs
item2.setFeedbackForCorrect(feedback2);
}
私の答えは、問題を解決しましたか? –
ありがとうサンディー - 輝かしい!。ここの文書は少し不明ですが、私はこれらのオブジェクトがどのように構造化されているかを把握していると思います。 –