This file contains 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
function cleanData() { | |
SpreadsheetApp.flush(); | |
var ss = SpreadsheetApp.openById('1B7nsY41C7PeGMwmLQXoaO4kQ0u_mOwFOjfPesuvktyY'); //берем данные из таблицы с логами обращения к G Диску, в скобках подставляем ID таблицы | |
var s = ss.getSheetByName('Лист1') //в качестве рабочего листа - Лист1. Если в таблице не так, то переименовываем | |
var ts = SpreadsheetApp.openById('1GCoApFoMep5XuA3PsbpwOtxfNkYhMsixDtlZTuiJM2Q'); //берем аккаунты учителей из таблицы, ID которой указываем | |
var t = ts.getSheetByName('Лист1'); | |
var all = s.getDataRange().getValues(); | |
var rows = s.getLastRow(); | |
var tall = t.getDataRange().getValues(); |
This file contains 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
// Глобальные переменные | |
var email = Session.getEffectiveUser().getEmail(); // адрес пользователя | |
email = email.toLowerCase(); | |
var date = new Date(); | |
var SPREADSHEET_ID = "0ApcwrJ2inIl8dGxpdlJ4VGJTM0RYX1c3Ulo4b3hJbXc"; | |
var doc = SpreadsheetApp.openById(SPREADSHEET_ID); | |
var s = doc.getActiveSheet(); | |
var userName = Session.getEffectiveUser().getUsername(); | |
var total = 0; // Общее количество баллов | |
var score = [ ]; // Массив отметок |
This file contains 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
function onOpen() { | |
var ui = SpreadsheetApp.getUi(); | |
ui.createMenu('Баба ЕГЭ') | |
.addItem('Задать количество вопросов', 'setNumQuestions') | |
.addSeparator() | |
.addItem('Создать тест', 'makeRandomTest') | |
.addToUi(); | |
} |
This file contains 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
// lang.gas | |
// Contains definitions for all localized strings in Flubaroo. | |
// Any language specific string or message should be placed in this file. | |
gbl_lang_id = ""; // identifies the language if the UI. | |
function setLanguage() | |
{ |
This file contains 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
function restructure() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
//указываем на таблицу, в которой мы работаем | |
var sourceSheet = ss.getSheetByName("Form Responses 1"); | |
//указываем на лист, из которого берем данные | |
This file contains 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
function cleanUp(){ | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var s = ss.getActiveSheet(); | |
var i = s.getLastRow(); | |
var values = s.getRange(1,1,i).getValues(); | |
for (i; i > 0; i--) { | |
if (values[i-1] == "") { | |
s.deleteRow(i); | |
} |
This file contains 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
function helloWorld() { | |
Browser.msgBox("А теперь получайте удовольствие от того, что получилось!"); | |
} |
This file contains 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
function addHeaderNumbering () { | |
var pars = DocumentApp.getActiveDocument().getBody().getParagraphs(); | |
var counterHeader = [0, 0, 0, 0, 0, 0]; | |
for(var i=0; i<pars.length; i++) { | |
var par = pars[i]; | |
var hdg = par.getHeading(); | |
if (hdg == DocumentApp.ParagraphHeading.HEADING1) { | |
_addNumberingForHeaderType(DocumentApp.ParagraphHeading.HEADING1, par, 0, counterHeader); |